comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLBuiltinNode.java @ 13836:64c77f0577bb

More documentation and improvements of Simple Language
author Christian Wimmer <christian.wimmer@oracle.com>
date Thu, 30 Jan 2014 17:53:27 -0800
parents b16ec83edc73
children abe7128ca473
comparison
equal deleted inserted replaced
13835:67e4e7f56911 13836:64c77f0577bb
31 * that defines the function arguments.<br> 31 * that defines the function arguments.<br>
32 * Builtin functions need access to the {@link SLContext}. Instead of defining a Java field manually 32 * Builtin functions need access to the {@link SLContext}. Instead of defining a Java field manually
33 * and setting it in a constructor, we use the Truffle DSL annotation {@link NodeField} that 33 * and setting it in a constructor, we use the Truffle DSL annotation {@link NodeField} that
34 * generates the field and constructor automatically. 34 * generates the field and constructor automatically.
35 * <p> 35 * <p>
36 * The builitin functions are registered in {@link SLContext#installBuiltins}. Every builtin node 36 * The builtin functions are registered in {@link SLContext#installBuiltins}. Every builtin node
37 * subclass is instantiated there, wrapped into a function, and added to the 37 * subclass is instantiated there, wrapped into a function, and added to the
38 * {@link SLFunctionRegistry}. This ensures that builtin functions can be called like user-defined 38 * {@link SLFunctionRegistry}. This ensures that builtin functions can be called like user-defined
39 * functions; there is no special function lookup or call node for builtin functions. 39 * functions; there is no special function lookup or call node for builtin functions.
40 */ 40 */
41 @NodeChild(value = "arguments", type = SLExpressionNode[].class) 41 @NodeChild(value = "arguments", type = SLExpressionNode[].class)