use of org.develnext.jphp.core.tokenizer.token.expr.operator.DynamicAccessAssignExprToken in project jphp by jphp-compiler.
the class CallCompiler method writePushDynamicMethod.
/**
* $var->method()
*/
public Memory writePushDynamicMethod(CallExprToken function, boolean returnValue, boolean writeOpcode, PushCallStatistic statistic) {
expr.getMethod().getEntity().setImmutable(false);
if (!writeOpcode)
return null;
DynamicAccessExprToken access = (DynamicAccessExprToken) function.getName();
if (access instanceof DynamicAccessAssignExprToken) {
expr.unexpectedToken(access);
}
expr.writeLineNumber(function);
expr.writeDynamicAccessPrepare(access, true);
expr.writePushParameters(function.getParameters());
expr.writeSysStaticCall(ObjectInvokeHelper.class, "invokeMethod", Memory.class, Memory.class, String.class, String.class, Environment.class, TraceInfo.class, Memory[].class);
if (!returnValue) {
expr.writePopAll(1);
}
if (statistic != null) {
statistic.returnType = StackItem.Type.REFERENCE;
}
return null;
}
Aggregations