2 summary:: FunctionDefs contain code which can be executed from a Function.
3 categories::Core>Kernel
9 Even though it is possible to change the values in the various arrays that define the FunctionDef,
10 you should not do it, unless you like to crash.
14 Get the byte code array.
17 { |a = 9, b = 10, c| a + b }.def.code;
22 Get the source code string.
24 { |a = 9, b = 10, c| a + b }.def.sourceCode.postcs;
29 Get the enclosing FunctionDef or Method.
31 method::findReferences
33 return a list of all references to a given symbol.
37 Get the Array of Symbols of the argument names.
40 { |a = 9, b = 10, c| a + b }.def.argNames;
42 method::prototypeFrame
44 Get the array of default values for argument and temporary variables.
47 { |a = 9, b = 10, c| a + b }.def.prototypeFrame;
51 Get the Array of Symbols of the local variable names.
54 { |a = 9, b = 10, c| var x = 9; a + b + x }.def.varNames;
56 method::argumentString
58 Return a string that contains arguments and their default values for embedding in a string
61 { |a = 9, b = 10, c| a + b }.def.argumentString;
64 method::makeEnvirFromArgs
66 Get the Array of Symbols of the local variable names.
69 { |a = 9, b = 10, c| a + b }.def.makeEnvirFromArgs;
76 "Disassemble" and post the FunctionDef's byte code instructions to the text window.