split compilers resolve_type into the three possibilities
cleaner code, though temporary it shifts some dirt into the index method. up next
This commit is contained in:
@ -69,8 +69,12 @@ module Risc
|
||||
# scope related slots are resolved by the compiler by methood/block
|
||||
def slot_type( slot , type)
|
||||
case slot
|
||||
when :frame , :arguments , :receiver
|
||||
new_type = self.resolve_type(slot)
|
||||
when :frame
|
||||
new_type = self.frame_type
|
||||
when :arguments
|
||||
new_type = self.arg_type
|
||||
when :receiver
|
||||
new_type = self.receiver_type
|
||||
when Symbol
|
||||
new_type = type.type_for(slot)
|
||||
raise "Not found object #{slot}: in #{type}" unless new_type
|
||||
|
Reference in New Issue
Block a user