add global variable space

could in the long run move spaces functionality to the class
and since the class is global anyway, wouldn’t need this
This commit is contained in:
Torsten Ruger
2015-11-07 12:19:04 +02:00
parent b1939e9828
commit 9ebe28450b
4 changed files with 16 additions and 2 deletions

View File

@ -12,6 +12,12 @@ module Soml
add_code Register.get_slot(statement , :message , :receiver , ret )
return ret
end
if(name == :space)
space = Parfait::Space.object_space
reg = use_reg :Space , space
add_code Register::LoadConstant.new( statement, space , reg )
return reg
end
# either an argument, so it's stored in message
if( index = @method.has_arg(name))
ret = use_reg @method.arguments[index].type