passing compiler to to_mom, not method

To be able to delegate scope (block/method) things later
This commit is contained in:
Torsten Ruger
2018-07-05 14:02:38 +03:00
parent 16d91f24ce
commit 3f80953385
15 changed files with 78 additions and 74 deletions

View File

@ -10,8 +10,8 @@ module Vool
class LocalVariable < Expression
include Named
def slot_definition(method)
if method.arguments_type.variable_index(@name)
def slot_definition(compiler)
if compiler.method.arguments_type.variable_index(@name)
type = :arguments
else
type = :frame
@ -25,7 +25,7 @@ module Vool
class InstanceVariable < Expression
include Named
def slot_definition(method)
def slot_definition(compiler)
Mom::SlotDefinition.new(:message , [ :receiver , @name] )
end
# used to collect type information