Implemented opcodes, natives, fixed iterators
This commit is contained in:
parent
49916f5564
commit
dfb6060df9
6 changed files with 1485 additions and 1585 deletions
|
@ -88,6 +88,8 @@ impl Bytecode {
|
|||
0x5A => (Instruction::DuplicateInsertDown(), 1),
|
||||
|
||||
0x60 => (Instruction::AddInt(), 1),
|
||||
0x61 => (Instruction::AddLong(), 1),
|
||||
0x63 => (Instruction::AddDouble(), 1),
|
||||
0x64 => (Instruction::SubtractInt(), 1),
|
||||
0x65 => (Instruction::SubtractLong(), 1),
|
||||
0x68 => (Instruction::MultiplyInt(), 1),
|
||||
|
@ -95,10 +97,12 @@ impl Bytecode {
|
|||
0x6A => (Instruction::MultiplyFloat(), 1),
|
||||
0x6C => (Instruction::DivideInt(), 1),
|
||||
0x6D => (Instruction::DivideLong(), 1),
|
||||
0x6E => (Instruction::DivideFloat(), 1),
|
||||
|
||||
0x74 => (Instruction::NegateInt(), 1),
|
||||
0x75 => (Instruction::NegateLong(), 1),
|
||||
0x78 => (Instruction::ArithmeticShiftIntLeft(), 1),
|
||||
0x79 => (Instruction::ArithmeticShiftLongLeft(), 1),
|
||||
0x7A => (Instruction::ArithmeticShiftIntRight(), 1),
|
||||
0x7C => (Instruction::LogicalShiftIntRight(), 1),
|
||||
0x7E => (Instruction::AndInt(), 1),
|
||||
|
@ -110,7 +114,10 @@ impl Bytecode {
|
|||
|
||||
0x86 => (Instruction::ConvertIntToFloat(), 1),
|
||||
0x88 => (Instruction::ConvertLongToInt(), 1),
|
||||
0x89 => (Instruction::ConvertLongToFloat(), 1),
|
||||
0x8B => (Instruction::ConvertFloatToInt(), 1),
|
||||
0x8D => (Instruction::ConvertFloatToDouble(), 1),
|
||||
0x8F => (Instruction::ConvertDoubleToLong(), 1),
|
||||
0x91 => (Instruction::ConvertIntToByte(), 1),
|
||||
0x92 => (Instruction::ConvertIntToChar(), 1),
|
||||
0x94 => (Instruction::CompareLong(), 1),
|
||||
|
@ -361,6 +368,8 @@ pub enum Instruction {
|
|||
DuplicateInsertDown() = 0x5A, // duplicate top stack value and insert two low
|
||||
|
||||
AddInt() = 0x60, // int addition
|
||||
AddLong() = 0x61, // long addition
|
||||
AddDouble() = 0x63, // double addition
|
||||
SubtractInt() = 0x64, // int subtraction
|
||||
SubtractLong() = 0x65, // long subtraction
|
||||
MultiplyInt() = 0x68, // int multiplication
|
||||
|
@ -368,10 +377,12 @@ pub enum Instruction {
|
|||
MultiplyFloat() = 0x6A, // float multiplication
|
||||
DivideInt() = 0x6C, // integer division, round toward zero and more rules
|
||||
DivideLong() = 0x6D, // long division
|
||||
DivideFloat() = 0x6E, // float division
|
||||
|
||||
NegateInt() = 0x74, // arithmetic negation
|
||||
NegateLong() = 0x75, // arithmetic negation
|
||||
ArithmeticShiftIntLeft() = 0x78, // shift int left, preserve sign
|
||||
ArithmeticShiftLongLeft() = 0x79, // shift long left, preserve sign
|
||||
ArithmeticShiftIntRight() = 0x7A, // shift int right, preserve sign
|
||||
LogicalShiftIntRight() = 0x7C, // shift int right with zero extension
|
||||
AndInt() = 0x7E, // bitwise and
|
||||
|
@ -383,7 +394,10 @@ pub enum Instruction {
|
|||
|
||||
ConvertIntToFloat() = 0x86, // change data type
|
||||
ConvertLongToInt() = 0x88, // change data type
|
||||
ConvertLongToFloat() = 0x89, // change data type
|
||||
ConvertFloatToInt() = 0x8B, // change data type
|
||||
ConvertFloatToDouble() = 0x8D, // change data type
|
||||
ConvertDoubleToLong() = 0x8F, // change data type
|
||||
ConvertIntToByte() = 0x91, // truncate int to 8 bits
|
||||
ConvertIntToChar() = 0x92, // truncate int to 16 bits
|
||||
CompareLong() = 0x94, // compare long
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue