use of com.googlecode.aviator.code.asm.ASMCodeGenerator.MethodMetaData in project aviatorscript by killme2008.
the class InterpretCodeGenerator method onMethodInvoke.
@Override
public void onMethodInvoke(final Token<?> lookhead) {
final MethodMetaData methodMetaData = this.methodMetaDataStack.pop();
@SuppressWarnings("unchecked") final List<FunctionArgument> params = lookhead != null ? (List<FunctionArgument>) lookhead.getMeta(Constants.PARAMS_META, Collections.EMPTY_LIST) : Collections.<FunctionArgument>emptyList();
if (this.instance.getOptionValue(Options.CAPTURE_FUNCTION_ARGS).bool) {
int funcId = getNextFuncInvocationId();
getFuncsArgs().put(funcId, Collections.unmodifiableList(params));
methodMetaData.funcId = funcId;
}
emit(new SendIR(methodMetaData.methodName, methodMetaData.parameterCount, methodMetaData.token.getMeta(Constants.UNPACK_ARGS, false), methodMetaData.funcId, new SourceInfo(this.sourceFile, methodMetaData.token.getLineNo())));
}
use of com.googlecode.aviator.code.asm.ASMCodeGenerator.MethodMetaData in project aviatorscript by killme2008.
the class InterpretCodeGenerator method onMethodParameter.
@Override
public void onMethodParameter(final Token<?> lookhead) {
MethodMetaData currentMethodMetaData = this.methodMetaDataStack.peek();
currentMethodMetaData.parameterCount++;
}
use of com.googlecode.aviator.code.asm.ASMCodeGenerator.MethodMetaData in project aviatorscript by killme2008.
the class InterpretCodeGenerator method onMethodName.
@Override
public void onMethodName(final Token<?> lookhead) {
final MethodMetaData metadata = new MethodMetaData(lookhead, lookhead.getType() == TokenType.Delegate ? null : lookhead.getLexeme());
this.methodMetaDataStack.push(metadata);
}
Aggregations