first local assignment risc test
comes with casualties slot_load needs more work
This commit is contained in:
@ -4,6 +4,9 @@ module Mom
|
||||
class Instruction
|
||||
include Common::List
|
||||
|
||||
def to_risc(m)
|
||||
Risc::Label.new(self.class.name, self.class.name + "_todo")
|
||||
end
|
||||
# implement flatten as noop to avoid condition
|
||||
def flatten( options = {} )
|
||||
return self
|
||||
|
@ -32,11 +32,11 @@ module Mom
|
||||
@left , @right = left , right
|
||||
end
|
||||
|
||||
def to_risc_load(context)
|
||||
reg = context.use_reg( @right.ct_type)
|
||||
def to_risc(compiler)
|
||||
reg = compiler.use_reg( @right.ct_type)
|
||||
const = Risc.load_constant(self, @right , reg)
|
||||
const.set_next Risc.reg_to_slot(self, reg , @left.known_object, @left.slots.first)
|
||||
context.release_reg(reg)
|
||||
const << Risc.reg_to_slot(self, reg , @left.known_object, @left.slots.first)
|
||||
compiler.release_reg(reg)
|
||||
return const
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user