use of com.googlecode.aviator.code.interpreter.ir.SendIR 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())));
}
Aggregations