Examples of StackElement


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

    // 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

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

    return pointer;
  }

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

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

    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

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

    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

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

    //
    // 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

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

    //
    // 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

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

    // 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

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

    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 EnumStackEltType type2 = value2.getType();
    if (type2.getCategory() == 2) {
      throw new IllegalArgumentException(
          "can not dup X2 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();
    }
    return pointer;
  }
View Full Code Here

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

    // ..., [arg1, [arg2 ...]] ...
    // INVOKEINTERFACE
    // ..., objectref, [arg1, [arg2 ...]] ...
    // INVOKEDYNAMIC 186 unused
    //
    StackElement pointer = currentStackElement;
    final Type[] types = Type.getArgumentTypes(desc);
    for (int index = types.length - 1; index >= 0; index--) {
      pointer = pop(pointer, typeFromAsmType(types[index]));
    }
    if (opcode == Opcodes.INVOKESTATIC) {
      internalCall = true;
    } else {
      if (!EnumStackEltType.REF.equals(pointer.getType())) {
        throw new EnhanceException("bad type " + pointer.getType()
            + " for opcode " + opcode);
      }
      internalCall = !ownedMethodCall || pointer.isThisReference();
      pointer = pop(pointer);
    }
    final Type returnType = Type.getReturnType(desc);
    if (!Type.VOID_TYPE.equals(returnType)) {
      pointer = push(pointer, typeFromAsmType(returnType));
View Full Code Here

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

  }

  public StackElement multiANewArray(final int dims,
      final StackElement currentStackElement) throws EnhanceException {
    // ..., count1, [count2, ...] => ..., arrayref
    StackElement pointer = currentStackElement;
    for (int count = 0; count < dims; count++) {
      pointer = pop(pointer, EnumType.INT);
    }
    return push(pointer, EnumType.REF);
  }
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.