Package org.jruby.ast

Examples of org.jruby.ast.DVarNode


                };
        context.createNewSymbol(dstrCallback, dsymbolNode.size());
    }

    public void compileDVar(Node node, BodyCompiler context) {
        DVarNode dvarNode = (DVarNode) node;

        context.getVariableCompiler().retrieveLocalVariable(dvarNode.getIndex(), dvarNode.getDepth());
    }
View Full Code Here


       
        if (slot >= 0) {
            // mark as captured if from containing scope
            if (depth > 0) capture(slot);
           
            return new DVarNode(position, ((depth << 16) | slot), name);
        }
       
        return enclosingScope.declare(position, name, depth + 1);
    }
View Full Code Here

            }
        }
    }

    public void compileDVar(Node node, BodyCompiler context, boolean expr) {
        DVarNode dvarNode = (DVarNode) node;

        if (expr) context.getVariableCompiler().retrieveLocalVariable(dvarNode.getIndex(), dvarNode.getDepth());
    }
View Full Code Here

       
        if (slot >= 0) {
            // mark as captured if from containing scope
            if (depth > 0) capture(slot);
           
            return new DVarNode(position, ((depth << 16) | slot), name);
        }
       
        return enclosingScope.declare(position, name, depth + 1);
    }
View Full Code Here

    public Node declare(ISourcePosition position, String name, int depth) {
        int slot = exists(name);

        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

    }

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

    public Node declare(ISourcePosition position, String name, int depth) {
        int slot = exists(name);

        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

TOP

Related Classes of org.jruby.ast.DVarNode

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.