Package net.sf.joafip.store.entity.proxy

Examples of net.sf.joafip.store.entity.proxy.StackElement


    return interprete(OPCODE_DESC_ARRAY[opcode], currentStackElement);
  }

  private StackElement interprete(final OpcodeDesc opcodeDesc,
      final StackElement currentStackElement) throws EnhanceException {
    StackElement pointer = currentStackElement;
    final EnumType[] popTypes = opcodeDesc.getPopTypes();
    for (int index = popTypes.length - 1; index >= 0; index--) {
      pointer = pop(pointer, popTypes[index]);
    }
    final EnumType pushType = opcodeDesc.getPushType();
View Full Code Here


    EnumStackEltType stackEltType = pointer.getType();
    if (!stackEltType.equals(type.getLowType())) {
      throw new EnhanceException("type mismatch " + stackEltType
          + " in the stack for " + type.getLowType() + " expected");
    }
    StackElement newPointer = pointer.getPrevious();
    if (type.getCategory() == 2) {
      if (newPointer == null) {
        throw new EnhanceException(EMPTY_STACK);
      }
      stackEltType = newPointer.getType();
      if (!stackEltType.equals(type.getHighType())) {
        throw new EnhanceException("type mismatch " + stackEltType
            + " in the stack for " + type.getHighType()
            + " expected");
      }
      newPointer = newPointer.getPrevious();
    }
    return newPointer;
  }
View Full Code Here

    return newPointer;
  }

  private StackElement push(final StackElement pointer,
      final EnumType pushType) {
    final StackElement previous;
    if (pushType.getCategory() == 2) {
      previous = new StackElement(pointer, pushType.getHighType());
    } else {
      previous = pointer;
    }
    return new StackElement(previous, pushType.getLowType());
  }
View Full Code Here

    // category 1 computational type
    final EnumStackEltType type = currentStackElement.getType();
    if (type.getCategory() == 2) {
      throw new IllegalArgumentException("can not dup type of category 2");
    }
    final StackElement pointer = push(currentStackElement, type);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    return pointer;
  }
View Full Code Here

    return pointer;
  }

  private StackElement push(final StackElement currentStackElement,
      final EnumStackEltType type) {
    return new StackElement(currentStackElement, type);
  }
View Full Code Here

    final EnumStackEltType type1 = currentStackElement.getType();
    if (type1.getCategory() == 2) {
      throw new IllegalArgumentException(
          "can not dupX1 type of category 2");
    }
    final StackElement value2 = pop(currentStackElement);
    final EnumStackEltType type2 = value2.getType();
    if (type2.getCategory() == 2) {
      throw new IllegalArgumentException(
          "can not dupX1 type of category 2");
    }
    StackElement pointer = pop(value2);
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type2);
    if (value2.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    return pointer;
  }
View Full Code Here

    final EnumStackEltType type1 = currentStackElement.getType();
    if (type1.getCategory() == 2) {
      throw new IllegalArgumentException(
          "can not dup X2 type of category 2");
    }
    final StackElement value2 = pop(currentStackElement);
    final StackElement value3 = pop(value2);
    StackElement pointer = pop(value3);
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, value3.getType());
    if (value3.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, value2.getType());
    if (value2.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    return pointer;
  }
View Full Code Here

    //
    // Duplicate the top one or two values on the operand stack and push the
    // duplicated value or values back onto the operand stack in the
    // original order.
    final EnumStackEltType type1 = currentStackElement.getType();
    final StackElement value2 = pop(currentStackElement);
    StackElement pointer = pop(value2);
    pointer = push(pointer, value2.getType());
    if (value2.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, value2.getType());
    if (value2.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    return pointer;
  }
View Full Code Here

    //
    // Duplicate the top one or two values on the operand stack and insert
    // the duplicated values, in the original order, one value beneath the
    // original value or values in the operand stack.
    final EnumStackEltType type1 = currentStackElement.getType();
    final StackElement value2 = pop(currentStackElement);
    final StackElement value3 = pop(value2);
    StackElement pointer = pop(value3);
    pointer = push(pointer, value2.getType());
    if (value2.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, value3.getType());
    if (value3.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, value2.getType());
    if (value2.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    return pointer;
  }
View Full Code Here

    // type (§3.11.1).
    //
    // Duplicate the top one or two values on the operand stack and insert
    // the duplicated values, in the original order, into the operand stack.
    final EnumStackEltType type1 = currentStackElement.getType();
    final StackElement value2 = pop(currentStackElement);
    final StackElement value3 = pop(value2);
    final StackElement value4 = pop(value3);
    StackElement pointer = pop(value4);
    pointer = push(pointer, value2.getType());
    if (value2.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, value4.getType());
    if (value4.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, value3.getType());
    if (value3.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, value2.getType());
    if (value2.isThisReference()) {
      pointer.setIsThisRef();
    }
    pointer = push(pointer, type1);
    if (currentStackElement.isThisReference()) {
      pointer.setIsThisRef();
    }
    return pointer;
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.entity.proxy.StackElement

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.