// TODO: don't require pop
if (!expr) context.consumeCurrentValue();
}
public void compileVCall(Node node, BodyCompiler context, boolean expr) {
VCallNode vcallNode = (VCallNode) node;
if (RubyInstanceConfig.DYNOPT_COMPILE_ENABLED) {
if (vcallNode.callAdapter instanceof CachingCallSite) {
CachingCallSite cacheSite = (CachingCallSite)vcallNode.callAdapter;
if (cacheSite.isOptimizable()) {
CacheEntry entry = cacheSite.getCache();
// recursive calls
if (compileRecursiveCall(vcallNode.getName(), entry.token, CallType.VARIABLE, false, entry.method, context, null, null, expr)) return;
// peephole inlining for trivial targets
if (compileTrivialCall(vcallNode.getName(), entry.method, entry.token, context, expr)) return;
}
}
}
context.getInvocationCompiler().invokeDynamic(vcallNode.getName(), null, null, CallType.VARIABLE, null, false);
// TODO: don't require pop
if (!expr) context.consumeCurrentValue();
}