finished init routine
and better implemented sys calls
This commit is contained in:
@ -34,7 +34,7 @@ module Register
|
||||
# a temporary place to store the new frame
|
||||
frame_tmp = space_tmp.next_reg_use
|
||||
# move the spave to it's register (mov instruction gets the address of the object)
|
||||
new_codes = [ LoadConstant.new( space_tmp , Parfait::Space.object_space )]
|
||||
new_codes = [ LoadConstant.new( Parfait::Space.object_space , space_tmp )]
|
||||
# find index in the space where to grab frame/message
|
||||
ind = Parfait::Space.object_space.get_layout().index_of( kind )
|
||||
raise "index not found for #{kind}.#{kind.class}" unless ind
|
||||
|
@ -33,7 +33,7 @@ module Register
|
||||
tmp = RegisterReference.tmp_reg
|
||||
# for constants we have to "move" the constants value
|
||||
if( code.from.is_a?(Parfait::Value) or code.from.is_a?(Symbol))
|
||||
move1 = LoadConstant.new( tmp , code.from )
|
||||
move1 = LoadConstant.new( code.from , tmp )
|
||||
else # while otherwise we "load"
|
||||
move1 = GetSlot.new( code.from.reg , code.from.index , tmp )
|
||||
end
|
||||
|
Reference in New Issue
Block a user