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 AviatorClassLoaderprotected final EnvCompile environment only has the *instance*.private intprotected Map<Integer, List<FunctionArgument>> function params info.protected final AviatorEvaluatorInstanceprotected Map<String, LambdaFunctionBootstrap> Compiled lambda functions.protected LambdaGeneratorprotected final ArrayDeque<ASMCodeGenerator.MethodMetaData> protected CodeGeneratorparent code generator when compiling lambda.protected Parserprotected final Stringprotected SymbolTableprotected Map<String, VariableMeta> -
Constructor Summary
ConstructorsConstructorDescriptionBaseEvalCodeGenerator(AviatorEvaluatorInstance instance, String sourceFile, AviatorClassLoader classLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<Integer, List<FunctionArgument>> protected intvoidinitMethods(Map<String, Integer> methods) voidsetLambdaBootstraps(Map<String, LambdaFunctionBootstrap> lambdaBootstraps) voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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, onUnsignedShiftRightMethods inherited from interface 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:
initMethodsin interfaceEvalCodeGenerator
-
setParser
- Specified by:
setParserin interfaceCodeGenerator
-
setLambdaBootstraps
- Specified by:
setLambdaBootstrapsin interfaceEvalCodeGenerator
-
getClassLoader
- Specified by:
getClassLoaderin interfaceEvalCodeGenerator
-