recode resolve method as assembler

definitely needs some refactoring
in fact i was hoping to code this in ruby (with compiler tweeks)
but there it is: goes through the linked list of methods of the type
and compares their name with self (method on word)
if not found ends in sys exit for now
This commit is contained in:
Torsten Ruger
2018-04-02 19:32:59 +03:00
parent beb487eb09
commit 576ae9261d
2 changed files with 39 additions and 7 deletions

View File

@ -25,13 +25,9 @@ module Risc
LoadConstant, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
SlotToReg, RegToSlot, LoadConstant, SlotToReg, RegToSlot,
SlotToReg, LoadConstant, FunctionCall, Label, SlotToReg,
SlotToReg, RegToSlot, SlotToReg, SlotToReg, FunctionReturn,
SlotToReg, LoadConstant, RegToSlot, Label, LoadConstant,
SlotToReg, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
SlotToReg, SlotToReg, SlotToReg, RegToSlot, LoadConstant,
SlotToReg, SlotToReg, SlotToReg, SlotToReg, RegToSlot,
SlotToReg, SlotToReg, SlotToReg, RegToSlot, LoadConstant,
SlotToReg]
SlotToReg, SlotToReg, SlotToReg, Label, LoadConstant,
SlotToReg, OperatorInstruction, IsZero, Label, Transfer,
Syscall, NilClass]
#assert_equal 1 , get_return
end