fix method seperation

Since Compiled method split into Method and
CompiledMethodInfo (parfait/vm) lots of call
syntax changes
This commit is contained in:
Torsten Ruger
2015-05-24 13:31:33 +03:00
parent 1d9ef6d5c8
commit 1a499a1de9
11 changed files with 71 additions and 85 deletions

View File

@ -6,7 +6,8 @@ module Builtin
# set/get instance variable use it.
# This is just a placeholder, as we code this in ruby, but the instance methods need the definition before.
def index_of context , name = Virtual::Integer
index_function = Virtual::CompiledMethod.new(:index_of , Virtual::Reference , [Virtual::Reference] , Virtual::Integer )
index_function = Virtual::CompiledMethodInfo.create_method("Object" , "index_of" , [Virtual::Reference] )
index_function.info.return_type = Virtual::Integer
return index_function
end
@ -23,7 +24,7 @@ module Builtin
# end
# The at_index is just "below" the api, something we need but don't want to expose, so we can't code the above in ruby
def _get_instance_variable context , name = Virtual::Integer
get_function = Virtual::CompiledMethod.new(:_get_instance_variable , [ Virtual::Reference ] , Virtual::Reference ,Virtual::Mystery )
get_function = Virtual::CompiledMethodInfo.create_method("Object","_get_instance_variable" , [ Virtual::Reference ] )
return get_function
me = get_function.receiver
var_name = get_function.args.first
@ -44,7 +45,7 @@ module Builtin
end
def _set_instance_variable(context , name = Virtual::Integer , value = Virtual::Integer )
set_function = Virtual::CompiledMethod.new(:_set_instance_variable ,[Virtual::Reference ,Virtual::Reference], Virtual::Reference ,Virtual::Mystery )
set_function = Virtual::CompiledMethodInfo.create_method("Object","_set_instance_variable" ,[Virtual::Reference ,Virtual::Reference] )
return set_function
receiver set_function
me = set_function.receiver