moved slots to own directory

This commit is contained in:
Torsten Ruger
2015-05-06 08:38:29 +03:00
parent cdea4915f9
commit 4f1508ca61
11 changed files with 130 additions and 107 deletions

View File

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

View File

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