rename locals from type to role in message
This commit is contained in:
@ -24,7 +24,7 @@ module Typed
|
||||
return nil unless index
|
||||
# TODO, check type @method.locals[index].type
|
||||
named_list = use_reg(:NamedList)
|
||||
add_code Register.get_slot(statement , :message , :named_list , named_list )
|
||||
add_code Register.get_slot(statement , :message , :locals , named_list )
|
||||
return Register.set_slot(statement , value , named_list , index )
|
||||
end
|
||||
end
|
||||
|
@ -27,7 +27,7 @@ module Typed
|
||||
index = @method.has_local( statement.name )
|
||||
raise "must define variable '#{statement.name}' before using it" unless index
|
||||
named_list = use_reg :NamedList
|
||||
add_code Register.get_slot(statement , :message , :named_list , named_list )
|
||||
add_code Register.get_slot(statement , :message , :locals , named_list )
|
||||
ret = use_reg @method.locals_type( index )
|
||||
add_code Register.get_slot(statement , named_list , index, ret )
|
||||
return ret
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
module Parfait
|
||||
class Message < Object
|
||||
attributes [:next_message , :receiver , :named_list , :return_address ]
|
||||
attributes [:next_message , :receiver , :locals , :return_address ]
|
||||
attributes [:return_value, :caller , :name ]
|
||||
|
||||
include Indexed
|
||||
@ -17,7 +17,7 @@ module Parfait
|
||||
|
||||
def initialize next_m
|
||||
self.next_message = next_m
|
||||
self.named_list = NamedList.new()
|
||||
self.locals = NamedList.new()
|
||||
self.caller = nil
|
||||
super()
|
||||
end
|
||||
|
Reference in New Issue
Block a user