sun.jvm.hotspot.runtime.BasicType Java Examples

The following examples show how to use sun.jvm.hotspot.runtime.BasicType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConstantTag.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public BasicType basicType() {
  switch (tag) {
  case JVM_CONSTANT_Integer :
    return BasicType.T_INT;
  case JVM_CONSTANT_Float :
    return BasicType.T_FLOAT;
  case JVM_CONSTANT_Long :
    return BasicType.T_LONG;
  case JVM_CONSTANT_Double :
    return BasicType.T_DOUBLE;

  case JVM_CONSTANT_Class :
  case JVM_CONSTANT_String :
  case JVM_CONSTANT_UnresolvedClass :
  case JVM_CONSTANT_UnresolvedClassInError :
  case JVM_CONSTANT_MethodHandleInError :
  case JVM_CONSTANT_MethodTypeInError :
  case JVM_CONSTANT_ClassIndex :
  case JVM_CONSTANT_StringIndex :
  case JVM_CONSTANT_MethodHandle :
  case JVM_CONSTANT_MethodType :
    return BasicType.T_OBJECT;
  default:
    throw new InternalError("unexpected tag: " + tag);
  }
}
 
Example #2
Source File: ConstantTag.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public BasicType basicType() {
  switch (tag) {
  case JVM_CONSTANT_Integer :
    return BasicType.T_INT;
  case JVM_CONSTANT_Float :
    return BasicType.T_FLOAT;
  case JVM_CONSTANT_Long :
    return BasicType.T_LONG;
  case JVM_CONSTANT_Double :
    return BasicType.T_DOUBLE;

  case JVM_CONSTANT_Class :
  case JVM_CONSTANT_String :
  case JVM_CONSTANT_UnresolvedClass :
  case JVM_CONSTANT_UnresolvedClassInError :
  case JVM_CONSTANT_MethodHandleInError :
  case JVM_CONSTANT_MethodTypeInError :
  case JVM_CONSTANT_ClassIndex :
  case JVM_CONSTANT_StringIndex :
  case JVM_CONSTANT_MethodHandle :
  case JVM_CONSTANT_MethodType :
    return BasicType.T_OBJECT;
  default:
    throw new InternalError("unexpected tag: " + tag);
  }
}
 
Example #3
Source File: StackFrameImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public ObjectReference thisObject() {
    validateStackFrame();
    MethodImpl currentMethod = (MethodImpl)location.method();
    if (currentMethod.isStatic() || currentMethod.isNative()) {
        return null;
    }
    if (thisObject == null) {
        StackValueCollection values = saFrame.getLocals();
        if (Assert.ASSERTS_ENABLED) {
            Assert.that(values.size() > 0, "this is missing");
        }
        // 'this' at index 0.
        if (values.get(0).getType() == BasicType.getTConflict()) {
          return null;
        }
        OopHandle handle = values.oopHandleAt(0);
        ObjectHeap heap = vm.saObjectHeap();
        thisObject = vm.objectMirror(heap.newOop(handle));
    }
    return thisObject;
}
 
Example #4
Source File: StackFrameImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public Map getValues(List variables) {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();

    int count = variables.size();
    Map map = new HashMap(count);
    for (int ii=0; ii<count; ++ii) {
        LocalVariableImpl variable = (LocalVariableImpl)variables.get(ii);
        if (!variable.isVisible(this)) {
            throw new IllegalArgumentException(variable.name() +
                             " is not valid at this frame location");
        }
        ValueImpl valueImpl;
        int ss = variable.slot();
        char c = variable.signature().charAt(0);
        BasicType variableType = BasicType.charToBasicType(c);
        valueImpl = getSlotValue(values, variableType, ss);
        map.put(variable, valueImpl);
    }
    return map;
}
 
Example #5
Source File: StackFrameImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public List getArgumentValues() {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();
    MethodImpl mmm = (MethodImpl)location.method();
    if (mmm.isNative())
        return null;
    List argSigs = mmm.argumentSignatures();
    int count = argSigs.size();
    List res = new ArrayList(0);

    int slot = mmm.isStatic()? 0 : 1;
    for (int ii = 0; ii < count; ++slot, ++ii) {
        char sigChar = ((String)argSigs.get(ii)).charAt(0);
        BasicType variableType = BasicType.charToBasicType(sigChar);
        res.add(getSlotValue(values, variableType, slot));
        if (sigChar == 'J' || sigChar == 'D') {
            slot++;
        }
    }
    return res;
}
 
Example #6
Source File: ConstantTag.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public BasicType basicType() {
  switch (tag) {
  case JVM_CONSTANT_Integer :
    return BasicType.T_INT;
  case JVM_CONSTANT_Float :
    return BasicType.T_FLOAT;
  case JVM_CONSTANT_Long :
    return BasicType.T_LONG;
  case JVM_CONSTANT_Double :
    return BasicType.T_DOUBLE;

  case JVM_CONSTANT_Class :
  case JVM_CONSTANT_String :
  case JVM_CONSTANT_UnresolvedClass :
  case JVM_CONSTANT_UnresolvedClassInError :
  case JVM_CONSTANT_MethodHandleInError :
  case JVM_CONSTANT_MethodTypeInError :
  case JVM_CONSTANT_ClassIndex :
  case JVM_CONSTANT_StringIndex :
  case JVM_CONSTANT_MethodHandle :
  case JVM_CONSTANT_MethodType :
    return BasicType.T_OBJECT;
  default:
    throw new InternalError("unexpected tag: " + tag);
  }
}
 
Example #7
Source File: ConstantTag.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public BasicType basicType() {
  switch (tag) {
  case JVM_CONSTANT_Integer :
    return BasicType.T_INT;
  case JVM_CONSTANT_Float :
    return BasicType.T_FLOAT;
  case JVM_CONSTANT_Long :
    return BasicType.T_LONG;
  case JVM_CONSTANT_Double :
    return BasicType.T_DOUBLE;

  case JVM_CONSTANT_Class :
  case JVM_CONSTANT_String :
  case JVM_CONSTANT_UnresolvedClass :
  case JVM_CONSTANT_UnresolvedClassInError :
  case JVM_CONSTANT_MethodHandleInError :
  case JVM_CONSTANT_MethodTypeInError :
  case JVM_CONSTANT_ClassIndex :
  case JVM_CONSTANT_StringIndex :
  case JVM_CONSTANT_MethodHandle :
  case JVM_CONSTANT_MethodType :
    return BasicType.T_OBJECT;
  default:
    throw new InternalError("unexpected tag: " + tag);
  }
}
 
Example #8
Source File: StackFrameImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public ObjectReference thisObject() {
    validateStackFrame();
    MethodImpl currentMethod = (MethodImpl)location.method();
    if (currentMethod.isStatic() || currentMethod.isNative()) {
        return null;
    }
    if (thisObject == null) {
        StackValueCollection values = saFrame.getLocals();
        if (Assert.ASSERTS_ENABLED) {
            Assert.that(values.size() > 0, "this is missing");
        }
        // 'this' at index 0.
        if (values.get(0).getType() == BasicType.getTConflict()) {
          return null;
        }
        OopHandle handle = values.oopHandleAt(0);
        ObjectHeap heap = vm.saObjectHeap();
        thisObject = vm.objectMirror(heap.newOop(handle));
    }
    return thisObject;
}
 
Example #9
Source File: StackFrameImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public Map getValues(List variables) {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();

    int count = variables.size();
    Map map = new HashMap(count);
    for (int ii=0; ii<count; ++ii) {
        LocalVariableImpl variable = (LocalVariableImpl)variables.get(ii);
        if (!variable.isVisible(this)) {
            throw new IllegalArgumentException(variable.name() +
                             " is not valid at this frame location");
        }
        ValueImpl valueImpl;
        int ss = variable.slot();
        char c = variable.signature().charAt(0);
        BasicType variableType = BasicType.charToBasicType(c);
        valueImpl = getSlotValue(values, variableType, ss);
        map.put(variable, valueImpl);
    }
    return map;
}
 
Example #10
Source File: StackFrameImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public List getArgumentValues() {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();
    MethodImpl mmm = (MethodImpl)location.method();
    if (mmm.isNative())
        return null;
    List argSigs = mmm.argumentSignatures();
    int count = argSigs.size();
    List res = new ArrayList(0);

    int slot = mmm.isStatic()? 0 : 1;
    for (int ii = 0; ii < count; ++slot, ++ii) {
        char sigChar = ((String)argSigs.get(ii)).charAt(0);
        BasicType variableType = BasicType.charToBasicType(sigChar);
        res.add(getSlotValue(values, variableType, slot));
        if (sigChar == 'J' || sigChar == 'D') {
            slot++;
        }
    }
    return res;
}
 
Example #11
Source File: StackFrameImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public ObjectReference thisObject() {
    validateStackFrame();
    MethodImpl currentMethod = (MethodImpl)location.method();
    if (currentMethod.isStatic() || currentMethod.isNative()) {
        return null;
    }
    if (thisObject == null) {
        StackValueCollection values = saFrame.getLocals();
        if (Assert.ASSERTS_ENABLED) {
            Assert.that(values.size() > 0, "this is missing");
        }
        // 'this' at index 0.
        if (values.get(0).getType() == BasicType.getTConflict()) {
          return null;
        }
        OopHandle handle = values.oopHandleAt(0);
        ObjectHeap heap = vm.saObjectHeap();
        thisObject = vm.objectMirror(heap.newOop(handle));
    }
    return thisObject;
}
 
Example #12
Source File: StackFrameImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public ObjectReference thisObject() {
    validateStackFrame();
    MethodImpl currentMethod = (MethodImpl)location.method();
    if (currentMethod.isStatic() || currentMethod.isNative()) {
        return null;
    }
    if (thisObject == null) {
        StackValueCollection values = saFrame.getLocals();
        if (Assert.ASSERTS_ENABLED) {
            Assert.that(values.size() > 0, "this is missing");
        }
        // 'this' at index 0.
        if (values.get(0).getType() == BasicType.getTConflict()) {
          return null;
        }
        OopHandle handle = values.oopHandleAt(0);
        ObjectHeap heap = vm.saObjectHeap();
        thisObject = vm.objectMirror(heap.newOop(handle));
    }
    return thisObject;
}
 
Example #13
Source File: StackFrameImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public Map getValues(List variables) {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();

    int count = variables.size();
    Map map = new HashMap(count);
    for (int ii=0; ii<count; ++ii) {
        LocalVariableImpl variable = (LocalVariableImpl)variables.get(ii);
        if (!variable.isVisible(this)) {
            throw new IllegalArgumentException(variable.name() +
                             " is not valid at this frame location");
        }
        ValueImpl valueImpl;
        int ss = variable.slot();
        char c = variable.signature().charAt(0);
        BasicType variableType = BasicType.charToBasicType(c);
        valueImpl = getSlotValue(values, variableType, ss);
        map.put(variable, valueImpl);
    }
    return map;
}
 
Example #14
Source File: StackFrameImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public List getArgumentValues() {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();
    MethodImpl mmm = (MethodImpl)location.method();
    if (mmm.isNative())
        return null;
    List argSigs = mmm.argumentSignatures();
    int count = argSigs.size();
    List res = new ArrayList(0);

    int slot = mmm.isStatic()? 0 : 1;
    for (int ii = 0; ii < count; ++slot, ++ii) {
        char sigChar = ((String)argSigs.get(ii)).charAt(0);
        BasicType variableType = BasicType.charToBasicType(sigChar);
        res.add(getSlotValue(values, variableType, slot));
        if (sigChar == 'J' || sigChar == 'D') {
            slot++;
        }
    }
    return res;
}
 
Example #15
Source File: ConstantTag.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public BasicType basicType() {
  switch (tag) {
  case JVM_CONSTANT_Integer :
    return BasicType.T_INT;
  case JVM_CONSTANT_Float :
    return BasicType.T_FLOAT;
  case JVM_CONSTANT_Long :
    return BasicType.T_LONG;
  case JVM_CONSTANT_Double :
    return BasicType.T_DOUBLE;

  case JVM_CONSTANT_Class :
  case JVM_CONSTANT_String :
  case JVM_CONSTANT_UnresolvedClass :
  case JVM_CONSTANT_UnresolvedClassInError :
  case JVM_CONSTANT_MethodHandleInError :
  case JVM_CONSTANT_MethodTypeInError :
  case JVM_CONSTANT_ClassIndex :
  case JVM_CONSTANT_StringIndex :
  case JVM_CONSTANT_MethodHandle :
  case JVM_CONSTANT_MethodType :
    return BasicType.T_OBJECT;
  default:
    throw new InternalError("unexpected tag: " + tag);
  }
}
 
Example #16
Source File: StackFrameImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public ObjectReference thisObject() {
    validateStackFrame();
    MethodImpl currentMethod = (MethodImpl)location.method();
    if (currentMethod.isStatic() || currentMethod.isNative()) {
        return null;
    }
    if (thisObject == null) {
        StackValueCollection values = saFrame.getLocals();
        if (Assert.ASSERTS_ENABLED) {
            Assert.that(values.size() > 0, "this is missing");
        }
        // 'this' at index 0.
        if (values.get(0).getType() == BasicType.getTConflict()) {
          return null;
        }
        OopHandle handle = values.oopHandleAt(0);
        ObjectHeap heap = vm.saObjectHeap();
        thisObject = vm.objectMirror(heap.newOop(handle));
    }
    return thisObject;
}
 
Example #17
Source File: StackFrameImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public Map getValues(List variables) {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();

    int count = variables.size();
    Map map = new HashMap(count);
    for (int ii=0; ii<count; ++ii) {
        LocalVariableImpl variable = (LocalVariableImpl)variables.get(ii);
        if (!variable.isVisible(this)) {
            throw new IllegalArgumentException(variable.name() +
                             " is not valid at this frame location");
        }
        ValueImpl valueImpl;
        int ss = variable.slot();
        char c = variable.signature().charAt(0);
        BasicType variableType = BasicType.charToBasicType(c);
        valueImpl = getSlotValue(values, variableType, ss);
        map.put(variable, valueImpl);
    }
    return map;
}
 
Example #18
Source File: StackFrameImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public List getArgumentValues() {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();
    MethodImpl mmm = (MethodImpl)location.method();
    if (mmm.isNative())
        return null;
    List argSigs = mmm.argumentSignatures();
    int count = argSigs.size();
    List res = new ArrayList(0);

    int slot = mmm.isStatic()? 0 : 1;
    for (int ii = 0; ii < count; ++slot, ++ii) {
        char sigChar = ((String)argSigs.get(ii)).charAt(0);
        BasicType variableType = BasicType.charToBasicType(sigChar);
        res.add(getSlotValue(values, variableType, slot));
        if (sigChar == 'J' || sigChar == 'D') {
            slot++;
        }
    }
    return res;
}
 
Example #19
Source File: ConstantTag.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public BasicType basicType() {
  switch (tag) {
  case JVM_CONSTANT_Integer :
    return BasicType.T_INT;
  case JVM_CONSTANT_Float :
    return BasicType.T_FLOAT;
  case JVM_CONSTANT_Long :
    return BasicType.T_LONG;
  case JVM_CONSTANT_Double :
    return BasicType.T_DOUBLE;

  case JVM_CONSTANT_Class :
  case JVM_CONSTANT_String :
  case JVM_CONSTANT_UnresolvedClass :
  case JVM_CONSTANT_UnresolvedClassInError :
  case JVM_CONSTANT_MethodHandleInError :
  case JVM_CONSTANT_MethodTypeInError :
  case JVM_CONSTANT_ClassIndex :
  case JVM_CONSTANT_StringIndex :
  case JVM_CONSTANT_MethodHandle :
  case JVM_CONSTANT_MethodType :
    return BasicType.T_OBJECT;
  default:
    throw new InternalError("unexpected tag: " + tag);
  }
}
 
Example #20
Source File: ConstantTag.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public BasicType basicType() {
  switch (tag) {
  case JVM_CONSTANT_Integer :
    return BasicType.T_INT;
  case JVM_CONSTANT_Float :
    return BasicType.T_FLOAT;
  case JVM_CONSTANT_Long :
    return BasicType.T_LONG;
  case JVM_CONSTANT_Double :
    return BasicType.T_DOUBLE;

  case JVM_CONSTANT_Class :
  case JVM_CONSTANT_String :
  case JVM_CONSTANT_UnresolvedClass :
  case JVM_CONSTANT_UnresolvedClassInError :
  case JVM_CONSTANT_MethodHandleInError :
  case JVM_CONSTANT_MethodTypeInError :
  case JVM_CONSTANT_ClassIndex :
  case JVM_CONSTANT_StringIndex :
  case JVM_CONSTANT_MethodHandle :
  case JVM_CONSTANT_MethodType :
    return BasicType.T_OBJECT;
  default:
    throw new InternalError("unexpected tag: " + tag);
  }
}
 
Example #21
Source File: StackFrameImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public List getArgumentValues() {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();
    MethodImpl mmm = (MethodImpl)location.method();
    if (mmm.isNative())
        return null;
    List argSigs = mmm.argumentSignatures();
    int count = argSigs.size();
    List res = new ArrayList(0);

    int slot = mmm.isStatic()? 0 : 1;
    for (int ii = 0; ii < count; ++slot, ++ii) {
        char sigChar = ((String)argSigs.get(ii)).charAt(0);
        BasicType variableType = BasicType.charToBasicType(sigChar);
        res.add(getSlotValue(values, variableType, slot));
        if (sigChar == 'J' || sigChar == 'D') {
            slot++;
        }
    }
    return res;
}
 
Example #22
Source File: StackFrameImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public Map getValues(List variables) {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();

    int count = variables.size();
    Map map = new HashMap(count);
    for (int ii=0; ii<count; ++ii) {
        LocalVariableImpl variable = (LocalVariableImpl)variables.get(ii);
        if (!variable.isVisible(this)) {
            throw new IllegalArgumentException(variable.name() +
                             " is not valid at this frame location");
        }
        ValueImpl valueImpl;
        int ss = variable.slot();
        char c = variable.signature().charAt(0);
        BasicType variableType = BasicType.charToBasicType(c);
        valueImpl = getSlotValue(values, variableType, ss);
        map.put(variable, valueImpl);
    }
    return map;
}
 
Example #23
Source File: StackFrameImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public ObjectReference thisObject() {
    validateStackFrame();
    MethodImpl currentMethod = (MethodImpl)location.method();
    if (currentMethod.isStatic() || currentMethod.isNative()) {
        return null;
    }
    if (thisObject == null) {
        StackValueCollection values = saFrame.getLocals();
        if (Assert.ASSERTS_ENABLED) {
            Assert.that(values.size() > 0, "this is missing");
        }
        // 'this' at index 0.
        if (values.get(0).getType() == BasicType.getTConflict()) {
          return null;
        }
        OopHandle handle = values.oopHandleAt(0);
        ObjectHeap heap = vm.saObjectHeap();
        thisObject = vm.objectMirror(heap.newOop(handle));
    }
    return thisObject;
}
 
Example #24
Source File: StackFrameImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public ObjectReference thisObject() {
    validateStackFrame();
    MethodImpl currentMethod = (MethodImpl)location.method();
    if (currentMethod.isStatic() || currentMethod.isNative()) {
        return null;
    }
    if (thisObject == null) {
        StackValueCollection values = saFrame.getLocals();
        if (Assert.ASSERTS_ENABLED) {
            Assert.that(values.size() > 0, "this is missing");
        }
        // 'this' at index 0.
        if (values.get(0).getType() == BasicType.getTConflict()) {
          return null;
        }
        OopHandle handle = values.oopHandleAt(0);
        ObjectHeap heap = vm.saObjectHeap();
        thisObject = vm.objectMirror(heap.newOop(handle));
    }
    return thisObject;
}
 
Example #25
Source File: StackFrameImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public Map getValues(List variables) {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();

    int count = variables.size();
    Map map = new HashMap(count);
    for (int ii=0; ii<count; ++ii) {
        LocalVariableImpl variable = (LocalVariableImpl)variables.get(ii);
        if (!variable.isVisible(this)) {
            throw new IllegalArgumentException(variable.name() +
                             " is not valid at this frame location");
        }
        ValueImpl valueImpl;
        int ss = variable.slot();
        char c = variable.signature().charAt(0);
        BasicType variableType = BasicType.charToBasicType(c);
        valueImpl = getSlotValue(values, variableType, ss);
        map.put(variable, valueImpl);
    }
    return map;
}
 
Example #26
Source File: ConstantTag.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public BasicType basicType() {
  switch (tag) {
  case JVM_CONSTANT_Integer :
    return BasicType.T_INT;
  case JVM_CONSTANT_Float :
    return BasicType.T_FLOAT;
  case JVM_CONSTANT_Long :
    return BasicType.T_LONG;
  case JVM_CONSTANT_Double :
    return BasicType.T_DOUBLE;

  case JVM_CONSTANT_Class :
  case JVM_CONSTANT_String :
  case JVM_CONSTANT_UnresolvedClass :
  case JVM_CONSTANT_UnresolvedClassInError :
  case JVM_CONSTANT_MethodHandleInError :
  case JVM_CONSTANT_MethodTypeInError :
  case JVM_CONSTANT_ClassIndex :
  case JVM_CONSTANT_StringIndex :
  case JVM_CONSTANT_MethodHandle :
  case JVM_CONSTANT_MethodType :
    return BasicType.T_OBJECT;
  default:
    throw new InternalError("unexpected tag: " + tag);
  }
}
 
Example #27
Source File: StackFrameImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public List getArgumentValues() {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();
    MethodImpl mmm = (MethodImpl)location.method();
    if (mmm.isNative())
        return null;
    List argSigs = mmm.argumentSignatures();
    int count = argSigs.size();
    List res = new ArrayList(0);

    int slot = mmm.isStatic()? 0 : 1;
    for (int ii = 0; ii < count; ++slot, ++ii) {
        char sigChar = ((String)argSigs.get(ii)).charAt(0);
        BasicType variableType = BasicType.charToBasicType(sigChar);
        res.add(getSlotValue(values, variableType, slot));
        if (sigChar == 'J' || sigChar == 'D') {
            slot++;
        }
    }
    return res;
}
 
Example #28
Source File: StackFrameImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public Map getValues(List variables) {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();

    int count = variables.size();
    Map map = new HashMap(count);
    for (int ii=0; ii<count; ++ii) {
        LocalVariableImpl variable = (LocalVariableImpl)variables.get(ii);
        if (!variable.isVisible(this)) {
            throw new IllegalArgumentException(variable.name() +
                             " is not valid at this frame location");
        }
        ValueImpl valueImpl;
        int ss = variable.slot();
        char c = variable.signature().charAt(0);
        BasicType variableType = BasicType.charToBasicType(c);
        valueImpl = getSlotValue(values, variableType, ss);
        map.put(variable, valueImpl);
    }
    return map;
}
 
Example #29
Source File: StackFrameImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public List getArgumentValues() {
    validateStackFrame();
    StackValueCollection values = saFrame.getLocals();
    MethodImpl mmm = (MethodImpl)location.method();
    if (mmm.isNative())
        return null;
    List argSigs = mmm.argumentSignatures();
    int count = argSigs.size();
    List res = new ArrayList(0);

    int slot = mmm.isStatic()? 0 : 1;
    for (int ii = 0; ii < count; ++slot, ++ii) {
        char sigChar = ((String)argSigs.get(ii)).charAt(0);
        BasicType variableType = BasicType.charToBasicType(sigChar);
        res.add(getSlotValue(values, variableType, slot));
        if (sigChar == 'J' || sigChar == 'D') {
            slot++;
        }
    }
    return res;
}
 
Example #30
Source File: FieldType.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Only valid for T_ARRAY; throws unspecified exception otherwise */
public ArrayInfo getArrayInfo() {
  int index = 1;
  int dim   = 1;
  index = skipOptionalSize(signature, index);
  while (signature.getByteAt(index) == '[') {
    index++;
    dim++;
    skipOptionalSize(signature, index);
  }
  int elementType = BasicType.charToType((char) signature.getByteAt(index));
  return new ArrayInfo(dim, elementType);
}