move resolve_method code from word to mom

rather make resolve an instruction.
Since it was coded in risc anyway, we not only save the setup and call
But also makes the mom instruction flow clearer
The method really came from not wanting to code it in risc, but with
the Builder, that is now surprisingly painless
This commit is contained in:
Torsten Ruger
2018-04-08 18:55:17 +03:00
parent 8c322329fb
commit 33ffcf1d88
8 changed files with 84 additions and 28 deletions

View File

@ -29,13 +29,10 @@ module Risc
IsZero, SlotToReg, OperatorInstruction, IsNotZero, Label,
SlotToReg, Branch, Label, LoadConstant, SlotToReg,
OperatorInstruction, IsZero, SlotToReg, OperatorInstruction, IsNotZero,
Label, SlotToReg, Branch, Label, LoadConstant,
SlotToReg, OperatorInstruction, IsZero, SlotToReg, OperatorInstruction,
IsNotZero, Label, SlotToReg, Branch, Label,
LoadConstant, SlotToReg, OperatorInstruction, IsZero, SlotToReg,
OperatorInstruction, IsNotZero, Label, SlotToReg, Branch,
Label, LoadConstant, SlotToReg, OperatorInstruction, IsZero,
Label, Transfer, Syscall, NilClass]
RegToSlot, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
SlotToReg, FunctionReturn, SlotToReg, LoadConstant, RegToSlot,
Label, LoadConstant, LoadConstant, SlotToReg, RegToSlot,
RegToSlot, SlotToReg, SlotToReg]
#assert_equal 1 , get_return
end