Fix first Slot instruction that uses builder
now without method_missing and names but still with instance_eval, hmm. Tried without, makes code much less readable
This commit is contained in:
@ -142,6 +142,9 @@ module Risc
|
||||
return ins
|
||||
end
|
||||
|
||||
def load_object(object)
|
||||
@compiler.load_object(object)
|
||||
end
|
||||
# for some methods that return an integer it is beneficial to pre allocate the
|
||||
# integer and store it in the return value. That is what this function does.
|
||||
#
|
||||
|
@ -96,6 +96,7 @@ module Risc
|
||||
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.register.set_compiler(self)
|
||||
add_code ins
|
||||
# todo for constants (not objects)
|
||||
# add_constant(right) if compiler
|
||||
|
Reference in New Issue
Block a user