|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ScriptCompiler
Compiler represents the current state of a compiler and all appropriate transitions and modifications that can be made within it. The methods here begin and end a class for a given compile run, begin and end methods for the script being compiled, set line number information, and generate code for all the basic operations necessary for a script to run. The intent of this interface is to provide a library-neutral set of functions for compiling a given script using any backend or any output format.
| Method Summary | |
|---|---|
void |
endScript(boolean generateLoad,
boolean generateMain)
End compilation for the current script, closing all context and structures used for the compilation. |
BodyCompiler |
startFileMethod(CompilerCallback args,
StaticScope scope,
ASTInspector inspector)
Begin compilation for the root of a script named __file__. |
BodyCompiler |
startMethod(java.lang.String rubyName,
java.lang.String javaName,
CompilerCallback argsHandler,
StaticScope scope,
ASTInspector inspector)
Begin compilation for a method that has the specified number of local variables. |
BodyCompiler |
startRoot(java.lang.String rubyName,
java.lang.String javaName,
StaticScope scope,
ASTInspector inspector)
Begin compilation for a the root of a script. |
void |
startScript(StaticScope scope)
Begin compilation for a script, preparing all necessary context and code to support this script's compiled representation. |
| Method Detail |
|---|
void startScript(StaticScope scope)
void endScript(boolean generateLoad,
boolean generateMain)
BodyCompiler startMethod(java.lang.String rubyName,
java.lang.String javaName,
CompilerCallback argsHandler,
StaticScope scope,
ASTInspector inspector)
javaName - The outward user-readable name of the method. A unique name will be generated based on this.arity - The arity of the method's argument listlocalVarCount - The number of local variables that will be used by the method.
BodyCompiler startRoot(java.lang.String rubyName,
java.lang.String javaName,
StaticScope scope,
ASTInspector inspector)
javaName - The outward user-readable name of the method. A unique name will be generated based on this.arity - The arity of the method's argument listlocalVarCount - The number of local variables that will be used by the method.
BodyCompiler startFileMethod(CompilerCallback args,
StaticScope scope,
ASTInspector inspector)
args - Arguments to the script, as passed via jitted wrappersscope - The StaticScope for the scriptinspector - The ASTInspector for the nodes for the script
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||