Class: Nydp::InterpretedFunctionWithoutClosure

Inherits:
InterpretedFunction show all
Defined in:
lib/nydp/interpreted_function.rb

Constant Summary

Constants inherited from InterpretedFunction

Nydp::InterpretedFunction::NIL

Instance Attribute Summary

Attributes inherited from InterpretedFunction

#arg_names, #body, #context_builder

Instance Method Summary collapse

Methods inherited from InterpretedFunction

build, compile_body, index_parameters, #inspect, #lexical_reach, #nydp_type, #to_s

Methods included from Helper

#cons, #list, #literal?, #pair?, #sig, #sym, #sym?

Methods included from Converter

#n2r, #r2n

Instance Method Details

#execute(vm) ⇒ Object



118
119
120
# File 'lib/nydp/interpreted_function.rb', line 118

def execute vm
  vm.push_arg self
end

#invoke(vm, arg_values) ⇒ Object



114
115
116
# File 'lib/nydp/interpreted_function.rb', line 114

def invoke vm, arg_values
  vm.push_instructions self.body, set_args(vm.current_context, arg_values)
end

#invoke_1(vm) ⇒ Object



98
99
100
# File 'lib/nydp/interpreted_function.rb', line 98

def invoke_1 vm
  vm.push_instructions self.body, set_args_0(vm.current_context)
end

#invoke_2(vm, arg) ⇒ Object



102
103
104
# File 'lib/nydp/interpreted_function.rb', line 102

def invoke_2 vm, arg
  vm.push_instructions self.body, set_args_1(vm.current_context, arg)
end

#invoke_3(vm, arg_0, arg_1) ⇒ Object



106
107
108
# File 'lib/nydp/interpreted_function.rb', line 106

def invoke_3 vm, arg_0, arg_1
  vm.push_instructions self.body, set_args_2(vm.current_context, arg_0, arg_1)
end

#invoke_4(vm, arg_0, arg_1, arg_2) ⇒ Object



110
111
112
# File 'lib/nydp/interpreted_function.rb', line 110

def invoke_4 vm, arg_0, arg_1, arg_2
  vm.push_instructions self.body, set_args_3(vm.current_context, arg_0, arg_1, arg_2)
end