Package org.mvel2.util

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


        else {
          break;
        }
      }
    }
    return stk.peek();
  }

  @Override
  public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) {
    ExecutionStack stack = (ExecutionStack) ctx;
View Full Code Here



      switch (instruction.opcode) {
        case Operator.STORE:
          if (instruction.cache == null) {
            instruction.cache = factory.createVariable(instruction.expr, stack.peek());
          }
          else {
            ((VariableResolver) instruction.cache).setValue(stack.peek());
          }
          break;
View Full Code Here

        case Operator.STORE:
          if (instruction.cache == null) {
            instruction.cache = factory.createVariable(instruction.expr, stack.peek());
          }
          else {
            ((VariableResolver) instruction.cache).setValue(stack.peek());
          }
          break;
        case Operator.LOAD:
          if (instruction.cache == null) {
            instruction.cache = factory.getVariableResolver(instruction.expr);
View Full Code Here

          }
          stack.push(((VariableResolver) instruction.cache).getValue());
          break;
        case Operator.GETFIELD:
          try {
            if (stack.isEmpty() || !(stack.peek() instanceof Class)) {
              throw new CompileException("getfield without class", expr, blockStart);
            }

            Field field;
            if (instruction.cache == null) {
View Full Code Here

            throw new CompileException("field access error", expr, blockStart, e);
          }
          break;
        case Operator.STOREFIELD:
          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();
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();
View Full Code Here

          throw new CompileException("failed to compileShared sub expression", new char[0], 0, e);
        }
      }
      while ((tk = tk.nextASTNode) != null);

      return stk.peek();
    }
    catch (NullPointerException e) {
      if (tk != null && tk.isOperator() && tk.nextASTNode != null) {
        throw new CompileException("incomplete statement: "
            + tk.getName() + " (possible use of reserved keyword as identifier: " + tk.getName() + ")", tk.getExpr(), tk.getStart());
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();
View Full Code Here

          throw new CompileException("failed to compileShared sub expression", new char[0], 0, e);
        }
      }
      while ((tk = tk.nextASTNode) != null);

      return stk.peek();
    }
    catch (NullPointerException e) {
      if (tk != null && tk.isOperator() && tk.nextASTNode != null) {
        throw new CompileException("incomplete statement: "
            + tk.getName() + " (possible use of reserved keyword as identifier: " + tk.getName() + ")", tk.getExpr(), tk.getStart());
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.