Package org.jruby.runtime.callsite

Examples of org.jruby.runtime.callsite.CachingCallSite


        DYNOPT: if (RubyInstanceConfig.DYNOPT_COMPILE_ENABLED) {
            // dynopt does not handle non-local block flow control yet, so we bail out
            // if there's a closure.
            if (callNode.getIterNode() != null) break DYNOPT;
            if (callNode.callAdapter instanceof CachingCallSite) {
                CachingCallSite cacheSite = (CachingCallSite)callNode.callAdapter;
                if (cacheSite.isOptimizable()) {
                    CacheEntry entry = cacheSite.getCache();
                    if (entry.method.getNativeCall() != null) {
                        NativeCall nativeCall = entry.method.getNativeCall();

                        // only do direct calls for specific arity
                        if (argsCallback == null || argsCallback.getArity() >= 0 && argsCallback.getArity() <= 3) {
View Full Code Here


        DYNOPT: if (RubyInstanceConfig.DYNOPT_COMPILE_ENABLED) {
            // dynopt does not handle non-local block flow control yet, so we bail out
            if (fcallNode.getIterNode() != null) break DYNOPT;
            if (fcallNode.callAdapter instanceof CachingCallSite) {
                CachingCallSite cacheSite = (CachingCallSite)fcallNode.callAdapter;
                if (cacheSite.isOptimizable()) {
                    CacheEntry entry = cacheSite.getCache();

                    if (closureArg == null && (argsCallback == null || (argsCallback.getArity() >= 0 && argsCallback.getArity() <= 3))) {
                        // recursive calls
                        if (compileRecursiveCall(fcallNode.getName(), entry.token, CallType.FUNCTIONAL, fcallNode.getIterNode() instanceof IterNode, entry.method, context, argsCallback, closureArg, expr)) return;
View Full Code Here

    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
View Full Code Here

                        // System.out.println("checking: " + instr);
                        CallBase call = (CallBase)instr;
                        CallSite cs = call.getCallSite();
                        // System.out.println("callsite: " + cs);
                        if (cs != null && (cs instanceof CachingCallSite)) {
                            CachingCallSite ccs = (CachingCallSite)cs;
                            // SSS FIXME: To use this, CachingCallSite.java needs modification
                            // isPolymorphic or something equivalent needs to be enabled there.
                            if (ccs.isOptimizable()) {
                                CacheEntry ce = ccs.getCache();
                                DynamicMethod tgt = ce.method;
                                if (tgt instanceof InterpretedIRMethod) {
                                    InterpretedIRMethod dynMeth = (InterpretedIRMethod)tgt;
                                    IRScope tgtMethod = dynMeth.getIRMethod();
                                    Instr[] instrs = tgtMethod.getInstrsForInterpretation();
View Full Code Here

            CallBase call = cs.call;
            if (calledScopes.size() == 1 && !call.inliningBlocked()) {
                CallSite runtimeCS = call.getCallSite();
                if (runtimeCS != null && (runtimeCS instanceof CachingCallSite)) {
                    CachingCallSite ccs = (CachingCallSite)runtimeCS;
                    CacheEntry ce = ccs.getCache();

                    if (!(ce.method instanceof InterpretedIRMethod)) {
                        // System.out.println("NOT IR-M!");
                        continue;
                    } else {
View Full Code Here

TOP

Related Classes of org.jruby.runtime.callsite.CachingCallSite

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.