Package com.googlecode.aviator.code
Class BaseEvalCodeGenerator
java.lang.Object
com.googlecode.aviator.code.BaseEvalCodeGenerator
- All Implemented Interfaces:
CodeGenerator
,EvalCodeGenerator
- Direct Known Subclasses:
ASMCodeGenerator
,InterpretCodeGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AviatorClassLoader
protected final Env
Compile environment only has the *instance*.private int
protected Map
<Integer, List<FunctionArgument>> function params info.protected final AviatorEvaluatorInstance
protected Map
<String, LambdaFunctionBootstrap> Compiled lambda functions.protected LambdaGenerator
protected final ArrayDeque
<ASMCodeGenerator.MethodMetaData> protected CodeGenerator
parent code generator when compiling lambda.protected Parser
protected final String
protected SymbolTable
protected Map
<String, VariableMeta> -
Constructor Summary
ConstructorsConstructorDescriptionBaseEvalCodeGenerator
(AviatorEvaluatorInstance instance, String sourceFile, AviatorClassLoader classLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected Map
<Integer, List<FunctionArgument>> protected int
void
initMethods
(Map<String, Integer> methods) void
setLambdaBootstraps
(Map<String, LambdaFunctionBootstrap> lambdaBootstraps) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.googlecode.aviator.code.CodeGenerator
getResult, onAdd, onAndLeft, onAndRight, onArray, onArrayIndexEnd, onArrayIndexStart, onAssignment, onBitAnd, onBitNot, onBitOr, onBitXor, onConstant, onDiv, onEq, onExponent, onGe, onGt, onJoinLeft, onJoinRight, onLambdaArgument, onLambdaBodyEnd, onLambdaBodyStart, onLambdaDefineStart, onLe, onLt, onMatch, onMethodInvoke, onMethodName, onMethodParameter, onMod, onMult, onNeg, onNeq, onNot, onShiftLeft, onShiftRight, onSub, onTernaryBoolean, onTernaryEnd, onTernaryLeft, onTernaryRight, onUnsignedShiftRight
Methods inherited from interface com.googlecode.aviator.code.EvalCodeGenerator
genNewLambdaCode, initConstants, initVariables, start
-
Field Details
-
instance
-
variables
-
sourceFile
-
lambdaGenerator
-
classLoader
-
parser
-
symbolTable
-
parentCodeGenerator
parent code generator when compiling lambda. -
lambdaBootstraps
Compiled lambda functions. -
methodMetaDataStack
-
funcsArgs
function params info. -
funcInvocationId
private int funcInvocationId -
compileEnv
Compile environment only has the *instance*. -
methodTokens
-
-
Constructor Details
-
BaseEvalCodeGenerator
public BaseEvalCodeGenerator(AviatorEvaluatorInstance instance, String sourceFile, AviatorClassLoader classLoader)
-
-
Method Details
-
getFuncsArgs
-
getNextFuncInvocationId
protected int getNextFuncInvocationId() -
initMethods
- Specified by:
initMethods
in interfaceEvalCodeGenerator
-
setParser
- Specified by:
setParser
in interfaceCodeGenerator
-
setLambdaBootstraps
- Specified by:
setLambdaBootstraps
in interfaceEvalCodeGenerator
-
getClassLoader
- Specified by:
getClassLoader
in interfaceEvalCodeGenerator
-