Class: Nydp::InterpretedFunctionWithoutClosure
Constant Summary
Nydp::InterpretedFunction::NIL
Instance Attribute Summary
#arg_names, #body, #context_builder
Instance Method Summary
collapse
build, #can_do?, compile_body, #compile_do_expr_to_ruby, #compile_to_ruby, index_parameters, #inspect, #lexical_reach, #nydp_type, #run_body, #to_s
Methods included from Helper
#cons, #list, #literal?, #pair?, #sig, #sym, #sym?
Methods included from Converter
#n2r, #r2n, #rubify
Instance Method Details
#execute(vm) ⇒ Object
251
252
253
254
|
# File 'lib/nydp/interpreted_function.rb', line 251
def execute vm
self
end
|
#invoke(vm, arg_values) ⇒ Object
242
243
244
245
246
247
248
249
|
# File 'lib/nydp/interpreted_function.rb', line 242
def invoke vm, arg_values
cc = vm.current_context
vm.current_context = set_args(vm.current_context, arg_values)
res = run_body(vm)
vm.current_context = cc
res
end
|
#invoke_1(vm) ⇒ Object
206
207
208
209
210
211
212
213
|
# File 'lib/nydp/interpreted_function.rb', line 206
def invoke_1 vm
cc = vm.current_context
vm.current_context = set_args_0(vm.current_context)
res = run_body(vm)
vm.current_context = cc
res
end
|
#invoke_2(vm, arg) ⇒ Object
215
216
217
218
219
220
221
222
|
# File 'lib/nydp/interpreted_function.rb', line 215
def invoke_2 vm, arg
cc = vm.current_context
vm.current_context = set_args_1(vm.current_context, arg)
res = run_body(vm)
vm.current_context = cc
res
end
|
#invoke_3(vm, arg_0, arg_1) ⇒ Object
224
225
226
227
228
229
230
231
|
# File 'lib/nydp/interpreted_function.rb', line 224
def invoke_3 vm, arg_0, arg_1
cc = vm.current_context
vm.current_context = set_args_2(vm.current_context, arg_0, arg_1)
res = run_body(vm)
vm.current_context = cc
res
end
|
#invoke_4(vm, arg_0, arg_1, arg_2) ⇒ Object
233
234
235
236
237
238
239
240
|
# File 'lib/nydp/interpreted_function.rb', line 233
def invoke_4 vm, arg_0, arg_1, arg_2
cc = vm.current_context
vm.current_context = set_args_3(vm.current_context, arg_0, arg_1, arg_2)
res = run_body(vm)
vm.current_context = cc
res
end
|