Examples of LocalVariable


Examples of org.exist.xquery.LocalVariable

  public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {
//    System.out.println("enter "+toString());//+" : contextItem = "+contextItem.toString());//TODO: remove
   
        // Save the local variable stack
        LocalVariable mark = context.markLocalVariables(false);

    Sequence value = null;
    for (Entry<String, WithParam> entry : params.entrySet()) {
      value = entry.getValue().eval(contextSequence, contextItem);

            // Declare the iteration variable
            LocalVariable var = new LocalVariable(entry.getValue().getName());
//            var.setSequenceType(sequenceType);
            context.declareVariableBinding(var);
            var.setValue(value);
    }
   
    XSLStylesheet xslt = getXSLContext().getXSLStylesheet();

    Sequence result = xslt.template(name, contextSequence, contextItem);
View Full Code Here

Examples of org.freud.analysed.classbytecode.method.LocalVariable

            final String desc,
            final String signature,
            final org.objectweb.asm.Label start,
            final org.objectweb.asm.Label end,
            final int index) {
        variableByNameMap.put(name, new LocalVariable(name, desc, signature, declareLabel(start), declareLabel(end)));
    }
View Full Code Here

Examples of org.jruby.compiler.ir.operands.LocalVariable

        return newScope;
    }

    @Override
    public LocalVariable getLocalVariable(String name) {
        LocalVariable variable = localVariables.get(name);
        if (variable == null) {
            variable = new LocalVariable(name, nextLocalVariableSlot);
            localVariables.put(name, variable);
            nextLocalVariableSlot++;
        }

        return variable;
View Full Code Here

Examples of org.jruby.compiler.ir.operands.LocalVariable

    public boolean canRaiseException() { return false; }

    @Interp
    @Override
    public Label interpret(InterpreterContext interp, IRubyObject self) {
        LocalVariable v = (LocalVariable)getResult();
        if (bindingSlot == -1)
            bindingSlot = sourceMethod.getBindingSlot(getSlotName());
        interp.setLocalVariable(v.getLocation(), interp.getSharedBindingVariable(bindingSlot));
        return null;
    }
View Full Code Here

Examples of org.jruby.compiler.ir.operands.LocalVariable

    public StaticScope allocateStaticScope(StaticScope parent) {
        Iterator<LocalVariable> variables = getLiveLocalVariables();
        StaticScope scope = constructStaticScope(parent);

        while (variables.hasNext()) {
            LocalVariable variable = variables.next();
            int destination = scope.addVariable(variable.getName());
            System.out.println("Allocating " + variable + " to " + destination);

                    // Ick: Same Variable objects are not used for all references to the same variable.  S
                    // o setting destination on one will not set them on all
            variable.setLocation(destination);
        }

        return scope;
    }
View Full Code Here

Examples of org.jruby.compiler.ir.operands.LocalVariable

    @Override
    public boolean canRaiseException() { return false; }

    @Override
    public Label interpret(InterpreterContext interp, IRubyObject self) {
      LocalVariable v = (LocalVariable) getArg();
        if (bindingSlot == -1)
            bindingSlot = targetMethod.getBindingSlot(v.getName());
        interp.setSharedBindingVariable(bindingSlot, interp.getLocalVariable(v.getLocation()));
        return null;
    }
View Full Code Here

Examples of org.jruby.ir.operands.LocalVariable

            if (i instanceof ResultInstr) {
                Variable v = ((ResultInstr) i).getResult();

                // %self is local to every scope and never crosses scope boundaries and need not be spilled/refilled
                if (v instanceof LocalVariable && !((LocalVariable) v).isSelf()) {
                    LocalVariable lv = (LocalVariable) v;
                    dirtyVars.add(lv);

                    // Make sure there is a replacement tmp-var allocated for lv
                    getLocalVarReplacement(lv, scope, varRenameMap);
                }
View Full Code Here

Examples of org.netbeans.api.debugger.jpda.LocalVariable

    public Object getValueAt(TableModel original, Object node, String columnID)
    throws UnknownTypeException
    {
        if (node instanceof LocalVariable && columnID.compareTo("LocalsValue") == 0)
        {
            LocalVariable localVar = (LocalVariable) node;
            String varName = localVar.getName();
            try {
                return (String) _getValueFn.invoke(varName);
            } catch (Exception ex) {
                Exceptions.printStackTrace(ex);
            }
View Full Code Here

Examples of org.openquark.cal.internal.javamodel.JavaExpression.LocalVariable

   
    private static boolean encodeLocalVariableDeclaration(JavaStatement.LocalVariableDeclaration declaration, GenerationContext context) throws JavaGenerationException{
       
        MethodVisitor mv = context.getMethodVisitor();
       
        LocalVariable localVariable = declaration.getLocalVariable();
       
        // encode the instructions for the initializer if any.      
        JavaExpression initializer = declaration.getInitializer();
        if (initializer != null) {
            encodeExpr(initializer, context);           
        }
       
        int localVarIndex = context.addLocalVar(localVariable.getName(), localVariable.getTypeName());
              
        // Store the value from the initializer (if any) into the local var.
        if (initializer != null) {
          
            //encode the store instruction
            mv.visitVarInsn(getStoreOpCode(localVariable.getTypeName()), localVarIndex);           
        }
             
        return false;
    }
View Full Code Here

Examples of org.pdf4j.saxon.instruct.LocalVariable

        if (!redundant) {
            GeneralVariable inst;
            if (global) {
                throw new AssertionError("Global variable found when compiling local variable");
            } else {
                inst = new LocalVariable();
                inst.setContainer(this);
                if (select != null) {
                    select.setContainer(this);
                }
                initializeInstruction(exec, inst);
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.