< prev index next >

src/java.base/share/classes/java/lang/LiveStackFrameInfo.java

Print this page




  25 package java.lang;
  26 
  27 final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame {
  28     private static Object[] EMPTY_ARRAY = new Object[0];
  29 
  30     // These flags must match the values maintained in the VM
  31     private static final int MODE_INTERPRETED = 0x01;
  32     private static final int MODE_COMPILED    = 0x02;
  33 
  34     LiveStackFrameInfo(StackWalker walker) {
  35         super(walker);
  36     }
  37 
  38     // These fields are initialized by the VM if ExtendedOption.LOCALS_AND_OPERANDS is set
  39     private Object[] monitors = EMPTY_ARRAY;
  40     private Object[] locals = EMPTY_ARRAY;
  41     private Object[] operands = EMPTY_ARRAY;
  42     private int mode = 0;
  43 
  44     @Override









  45     public Object[] getMonitors() {
  46         return monitors;
  47     }
  48 
  49     @Override
  50     public Object[] getLocals() {
  51         return locals;
  52     }
  53 
  54     @Override
  55     public Object[] getStack() {
  56         return operands;
  57     }
  58 
  59     @Override
  60     public String toString() {
  61         StringBuilder retVal = new StringBuilder(super.toString());
  62         if (mode != 0) {
  63             retVal.append("(");
  64             if ((mode & MODE_INTERPRETED) == MODE_INTERPRETED) {




  25 package java.lang;
  26 
  27 final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame {
  28     private static Object[] EMPTY_ARRAY = new Object[0];
  29 
  30     // These flags must match the values maintained in the VM
  31     private static final int MODE_INTERPRETED = 0x01;
  32     private static final int MODE_COMPILED    = 0x02;
  33 
  34     LiveStackFrameInfo(StackWalker walker) {
  35         super(walker);
  36     }
  37 
  38     // These fields are initialized by the VM if ExtendedOption.LOCALS_AND_OPERANDS is set
  39     private Object[] monitors = EMPTY_ARRAY;
  40     private Object[] locals = EMPTY_ARRAY;
  41     private Object[] operands = EMPTY_ARRAY;
  42     private int mode = 0;
  43 
  44     @Override
  45     protected void clear() {
  46         super.clear();
  47         monitors = EMPTY_ARRAY;
  48         locals = EMPTY_ARRAY;
  49         operands = EMPTY_ARRAY;
  50         mode = 0;
  51     }
  52 
  53     @Override
  54     public Object[] getMonitors() {
  55         return monitors;
  56     }
  57 
  58     @Override
  59     public Object[] getLocals() {
  60         return locals;
  61     }
  62 
  63     @Override
  64     public Object[] getStack() {
  65         return operands;
  66     }
  67 
  68     @Override
  69     public String toString() {
  70         StringBuilder retVal = new StringBuilder(super.toString());
  71         if (mode != 0) {
  72             retVal.append("(");
  73             if ((mode & MODE_INTERPRETED) == MODE_INTERPRETED) {


< prev index next >