Convert SimpleCall to new regs

Also fix bug in RegsiterValue/Slot with chain, where logic was dodgy and compiler not set
This commit is contained in:
2020-03-01 23:38:23 +02:00
parent 4b303977a7
commit ff49ff50c0
8 changed files with 54 additions and 23 deletions

View File

@ -94,8 +94,7 @@ module Risc
# add the instruction to the code and return the register_value that was created
# for further use
def load_object( object )
raise "must be Parfait, not #{object.class}" unless object.is_a?(Parfait::Object)
ins = Risc.load_constant("load to #{object.type}" , object)
ins = Risc.load_constant("load to #{object}" , object)
ins.register.set_compiler(self)
add_code ins
# todo for constants (not objects)