public interface ScriptCompiler
Modifier and Type | Method and Description |
---|---|
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.
|
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 scriptCopyright © 2002-2009 JRuby Team. All Rights Reserved.