moved slots to own directory
This commit is contained in:
@ -13,7 +13,7 @@ module Compiler
|
||||
# attr_reader :value
|
||||
def self.compile_integer expession , method , message
|
||||
int = Virtual::IntegerConstant.new(expession.value)
|
||||
to = Virtual::NewReturn.new(Virtual::Integer , int)
|
||||
to = Virtual::Return.new(Virtual::Integer , int)
|
||||
method.add_code Virtual::Set.new( to , int)
|
||||
to
|
||||
end
|
||||
@ -81,6 +81,6 @@ module Compiler
|
||||
|
||||
def self.compile_variable expession, method , message
|
||||
method.add_code Virtual::InstanceGet.new(expession.name)
|
||||
Virtual::NewReturn.new( Virtual::Mystery )
|
||||
Virtual::Return.new( Virtual::Mystery )
|
||||
end
|
||||
end
|
||||
|
@ -21,6 +21,6 @@ module Compiler
|
||||
method.add_code Virtual::MessageSend.new(expession.name , me , compiled_args) #and pass control
|
||||
# the effect of the method is that the NewMessage Return slot will be filled, return it
|
||||
# (this is what is moved _inside_ above loop for such expressions that are calls (or constants))
|
||||
Virtual::NewReturn.new( method.return_type )
|
||||
Virtual::Return.new( method.return_type )
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user