mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-10 14:26:45 +00:00
Overload methods are not grouped together (#210)
* Overload methods are not grouped together
This commit is contained in:
parent
638c5b3bb3
commit
5f3c34911c
@ -104,18 +104,9 @@ public class DefaultInstructionSet implements InstructionSet {
|
|||||||
return defaultInstruction;
|
return defaultInstruction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new instruction to the instructionSet
|
* Get an instruction from its mnemonic
|
||||||
*
|
|
||||||
* @param opcode opcode of the instruction
|
|
||||||
* @param instruction Instruction to add
|
|
||||||
*/
|
*/
|
||||||
public void addInstruction(int opcode, Instruction instruction) {
|
|
||||||
instructionMap.put(opcode, instruction);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Instruction get(String mnemonic) {
|
public Instruction get(String mnemonic) {
|
||||||
for (Instruction ins : instructionMap.values()) {
|
for (Instruction ins : instructionMap.values()) {
|
||||||
@ -131,7 +122,15 @@ public class DefaultInstructionSet implements InstructionSet {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Add a new instruction to the instructionSet
|
||||||
|
*
|
||||||
|
* @param opcode opcode of the instruction
|
||||||
|
* @param instruction Instruction to add
|
||||||
|
*/
|
||||||
|
public void addInstruction(int opcode, Instruction instruction) {
|
||||||
|
instructionMap.put(opcode, instruction);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void add(Instruction instruction) {
|
public void add(Instruction instruction) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user