finished init routine

and better implemented sys calls
This commit is contained in:
Torsten Ruger
2015-06-25 16:31:09 +03:00
parent cedc6e1b61
commit 32e1903884
10 changed files with 57 additions and 26 deletions

View File

@ -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

View File

@ -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