Examples of VCallNode


Examples of org.jruby.ast.VCallNode

        context.aliasGlobal(valiasNode.getNewName(), valiasNode.getOldName());
    }

    public void compileVCall(Node node, BodyCompiler context) {
        VCallNode vcallNode = (VCallNode) node;
       
        context.getInvocationCompiler().invokeDynamic(vcallNode.getName(), null, null, CallType.VARIABLE, null, false);
    }
View Full Code Here

Examples of org.jruby.ast.VCallNode

           
            //System.out.println("LVAR: " + name + ", l: " + depth + ", i: " + slot);
            return new LocalVarNode(position, ((depth << 16) | slot), name);
        }
       
        return new VCallNode(position, name);
    }
View Full Code Here

Examples of org.jruby.ast.VCallNode

        // 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();
    }
View Full Code Here

Examples of org.jruby.ast.VCallNode

           
            //System.out.println("LVAR: " + name + ", l: " + depth + ", i: " + slot);
            return new LocalVarNode(position, ((depth << 16) | slot), name);
        }
       
        return new VCallNode(position, name);
    }
View Full Code Here

Examples of org.jruby.ast.VCallNode

    public Node declare(ISourcePosition position, String name, int depth) {
        int slot = exists(name);
       
        if (slot >= 0) return new LocalVarNode(position, ((depth << 16) | slot), name);
       
        return new VCallNode(position, name);
    }
View Full Code Here

Examples of org.jruby.ast.VCallNode

        if (slot >= 0) {
            return isBlockOrEval ? new DVarNode(position, ((depth << 16) | slot), name) : new LocalVarNode(position, ((depth << 16) | slot), name);
        }

        return isBlockOrEval ? enclosingScope.declare(position, name, depth + 1) : new VCallNode(position, name);
    }
View Full Code Here

Examples of org.jruby.ast.VCallNode

        if (slot >= 0) {
            return isBlockOrEval ? new DVarNode(position, ((depth << 16) | slot), name) : new LocalVarNode(position, ((depth << 16) | slot), name);
        }

        return isBlockOrEval ? enclosingScope.declare(position, name, depth + 1) : new VCallNode(position, name);
    }
View Full Code Here

Examples of org.jrubyparser.ast.VCallNode

          if("setparameters".equals(callNode.getName()))
            for(String name : getArgs(callNode))
              parameterMap.put(name, getEntry(callNode));
          break;
        case VCALLNODE:
          VCallNode vcallNode = (VCallNode) n;
          // A call to 'ensurable' adds 'ensure' parameter
          if(ENSURABLE.equals(vcallNode.getName()))
            parameterMap.put("ensure", new PPTypeInfo.Entry("", false, false));
          break;
        case INSTASGNNODE:
          InstAsgnNode docNode = (InstAsgnNode) n;
          if("@doc".equals(docNode.getName())) {
View Full Code Here

Examples of org.jrubyparser.ast.VCallNode

            propertyMap.put(getFirstArg(callNode), getEntry(callNode));
          else if(ENSURABLE.equals(callNode.getName()))
            parameterMap.put("ensure", getEntry(callNode));
          break;
        case VCALLNODE:
          VCallNode vcallNode = (VCallNode) n;
          // A call to 'ensurable' adds 'ensure' parameter
          if(ENSURABLE.equals(vcallNode.getName()))
            parameterMap.put("ensure", new PPTypeInfo.Entry("", false, false));
          break;
        case INSTASGNNODE:
          InstAsgnNode docNode = (InstAsgnNode) n;
          if("@doc".equals(docNode.getName())) {
View Full Code Here

Examples of org.jrubyparser.ast.VCallNode

            desc = getFirstArgDefault(cn, "");
          // return new PPTypeInfo.Entry(getFirstArgDefault(cn, ""),
          // false);
        }
        else if(n.getNodeType() == NodeType.VCALLNODE) {
          VCallNode vn = (VCallNode) n;
          if("isnamevar".equals(vn.getName()))
            namevar = true;
        }

      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.