.
This commit is contained in:
4
TODO.md
4
TODO.md
@@ -28,7 +28,9 @@ After some additional development:
|
||||
- [x] External interface
|
||||
- [x] Code execution (except functions)
|
||||
- [x] Functions
|
||||
- [ ] Print stack
|
||||
- [x] Print stack
|
||||
|
||||
- [ ] Assembler
|
||||
|
||||
After some additional development:
|
||||
- [ ] Bytecode loader
|
||||
|
||||
@@ -58,9 +58,12 @@ void VM::step()
|
||||
case Instruction::Sum:
|
||||
stack_.push(binary_operation(stack_.pop(), stack_.pop(), BinaryOperationType::Sum));
|
||||
break;
|
||||
case Instruction::Return:
|
||||
case Instruction::Return: {
|
||||
Value v = stack_.pop();
|
||||
stack_.pop_fp();
|
||||
stack_.push(v);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
throw VMInvalidOpcode((uint8_t) op.instruction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user