Package org.mvel2.util

Examples of org.mvel2.util.ExecutionStack.pop()


              throw new CompileException("getfield without class", expr, blockStart);
            }

            Field field;
            if (instruction.cache == null) {
              instruction.cache = field = ((Class) stack.pop()).getField(instruction.expr);
            }
            else {
              stack.discard();
              field = (Field) instruction.cache;
            }
View Full Code Here


            else {
              stack.discard();
              field = (Field) instruction.cache;
            }

            stack.push(field.get(stack.pop()));
          }
          catch (Exception e) {
            throw new CompileException("field access error", expr, blockStart, e);
          }
          break;
View Full Code Here

          try {
            if (stack.isEmpty() || !(stack.peek() instanceof Class)) {
              throw new CompileException("storefield without class", expr, blockStart);
            }

            Class cls = (Class) stack.pop();
            Object val = stack.pop();
            cls.getField(instruction.expr).set(stack.pop(), val);
            stack.push(val);
          }
          catch (Exception e) {
View Full Code Here

            if (stack.isEmpty() || !(stack.peek() instanceof Class)) {
              throw new CompileException("storefield without class", expr, blockStart);
            }

            Class cls = (Class) stack.pop();
            Object val = stack.pop();
            cls.getField(instruction.expr).set(stack.pop(), val);
            stack.push(val);
          }
          catch (Exception e) {
            throw new CompileException("field access error", expr, blockStart, e);
View Full Code Here

              throw new CompileException("storefield without class", expr, blockStart);
            }

            Class cls = (Class) stack.pop();
            Object val = stack.pop();
            cls.getField(instruction.expr).set(stack.pop(), val);
            stack.push(val);
          }
          catch (Exception e) {
            throw new CompileException("field access error", expr, blockStart, e);
          }
View Full Code Here

          if (stack.isEmpty()) {
            throw new CompileException("invoke without class", expr, blockStart);
          }

          parms = new Object[call.size()];
          for (int i = 0; !call.isEmpty(); i++) parms[i] = call.pop();

          if ("<init>".equals(instruction.expr)) {
            Constructor c;
            if (instruction.cache == null) {
              instruction.cache = c = ParseTools.getBestConstructorCandidate(parms, (Class) stack.pop(), false);
View Full Code Here

        else if (stk.isEmpty()) {
          stk.push(tk.getReducedValueAccelerated(ctx, ctx, variableFactory));
        }

        if (variableFactory.tiltFlag()) {
          return stk.pop();
        }

        switch (operator = tk.getOperator()) {
          case RETURN:
            variableFactory.setTiltFlag(true);
View Full Code Here

        }

        switch (operator = tk.getOperator()) {
          case RETURN:
            variableFactory.setTiltFlag(true);
            return stk.pop();

          case NOOP:
            continue;

          case TERNARY:
View Full Code Here

            }
            stk.clear();
            continue;

          case TERNARY_ELSE:
            return stk.pop();

          case END_OF_STMT:
            /**
             * If the program doesn't end here then we wipe anything off the stack that remains.
             * Althought it may seem like intuitive stack optimizations could be leveraged by
View Full Code Here

        stk.push(tk.nextASTNode.getReducedValueAccelerated(ctx, ctx, variableFactory), operator);

        try {
          while (stk.isReduceable()) {
            if ((Integer) stk.peek() == CHOR) {
              stk.pop();
              v1 = stk.pop();
              v2 = stk.pop();
              if (!isEmpty(v2) || !isEmpty(v1)) {
                stk.clear();
                stk.push(!isEmpty(v2) ? v2 : v1);
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.