用Java实现JVM第十章《异常处理》

用Java实现JVM第十章《异常处理》

案例介绍

异常处理是java语言非常重要的一个语法,本章主要实现如何处理抛出的异常。

在Java语言中,异常可以分为两类:Checked异常和Unchecked异常。Unchecked异常包括java.lang.RuntimeException、java.lang.Error以及它们的子类,提前异常都是Checked异常。所有异常都最终继承自java.lang.Throwable。如果一个方法有可能导致Checked异常抛出,则该方法要么需要捕获该异常并妥善处理,要么必须把该异常列在自己的throws子句中,否则无法通过编译。Unchanged异常没有这个限制。请注意,Java虚拟机规范并没有这个规定,这只是Java语言的语法规则。

异常可以由Java虚拟机抛出,也可以由Java代码抛出。当Java虚拟机在运行过程中遇到比较严重的问题时,会抛出java.lang.Error的某个子类,如*Error、OutOfMemoryError等。程序一般无法从这种异常里恢复,所以在代码中通常也不必关心这类异常。

一部分执行在执行过程中会导致Java虚拟机抛出java.lang.RuntimeException的某个子类,如NullPointerException、IndexOutOfBoundsException等。这类异常一般是代码中的bug导致的,需要格外注意。在代码中抛出和处理异常是由athrow指令和方法的异常处理表配合完成的。

环境准备

1、jdk 1.8.0

2、IntelliJ IDEA Community Edition 2018.3.1 x64

配置信息

1、调试配置

2.1、配置位置:Run/Debug Configurations -> program arguments

2.2、配置内容:-Xjre "C:\Program Files\Java\jdk1.8.0_161\jre" E:\itstack\git\istack-demo\itstack-demo-jvm\itstack-demo-jvm-10\target\test-classes\org\itstack\demo\test\HelloWorld

代码示例

itstack-demo-jvm-10
├── pom.xml
└── src
    └── main
    │    └── java
    │        └── org.itstack.demo.jvm
    │             ├── _native
    │             │   ├── java
    │             │   │   ├── _Class.java
    │             │   │   ├── _Double.java
    │             │   │   ├── _Float.java
    │             │   │   ├── _Object.java
    │             │   │   ├── _String.java
    │             │   │   ├── _System.java
    │             │   │   └── _Throwable.java   
    │             │   └── sun   
    │             ├── NativeMethod.java
    │             └── Registry.java 
    │             ├── classfile
    │             │   ├── attributes   
    │             │   ├── constantpool 
    │             │   ├── ClassFile.java
    │             │   ├── ClassReader.java
    │             │   └── MemberInfo.java   
    │             ├── classpath
    │             │   ├── impl
    │             │   │   ├── CompositeEntry.java
    │             │   │   ├── DirEntry.java 
    │             │   │   ├── WildcardEntry.java 
    │             │   │   └── ZipEntry.java    
    │             │   ├── Classpath.java
    │             │   └── Entry.java   
    │             ├── classpath
    │             │   ├── base
    │             │   │   ├── BytecodeReader.java
    │             │   │   ├── ClassInitLogic.java
    │             │   │   ├── Instruction.java
    │             │   │   ├── InstructionBranch.java
    │             │   │   ├── InstructionIndex8.java
    │             │   │   ├── InstructionIndex16.java
    │             │   │   ├── InstructionNoOperands.java    
    │             │   │   └── MethodInvokeLogic.java
    │             │   ├── comparisons
    │             │   ├── constants
    │             │   ├── control
    │             │   ├── conversions
    │             │   ├── extended
    │             │   ├── loads
    │             │   ├── math
    │             │   ├── references
    │             │   │   ├── ANEW_ARRAY.java
    │             │   │   ├── ARRAY_LENGTH.java
    │             │   │   ├── ATHROW.java
    │             │   │   ├── CHECK_CAST.java
    │             │   │   ├── GET_FIELD.java
    │             │   │   ├── GET_STATIC.java
    │             │   │   ├── INSTANCE_OF.java
    │             │   │   ├── INVOKE_INTERFACE.java
    │             │   │   ├── INVOKE_SPECIAL.java
    │             │   │   ├── INVOKE_STATIC.java
    │             │   │   ├── INVOKE_VIRTUAL.java
    │             │   │   ├── MULTI_ANEW_ARRAY.java
    │             │   │   ├── NEW.java
    │             │   │   ├── NEW_ARRAY.java
    │             │   │   ├── PUT_FIELD.java
    │             │   │   └── PUT_STATIC.java
    │             │   ├── reserved
    │             │   │   └── INVOKE_NATIVE.java    
    │             │   ├── stack
    │             │   ├── store
    │             │   │   └── xastore
    │             │   │       ├── AASTORE.java  
    │             │   │       ├── BASTORE.java  
    │             │   │       ├── CASTORE.java  
    │             │   │       ├── DASTORE.java
    │             │   │       ├── FASTORE.java
    │             │   │       ├── IASTORE.java
    │             │   │       ├── LASTORE.java  
    │             │   │       └── SASTORE.java      
    │             │   └── Factory   
    │             ├── rtda
    │             │   ├── heap
    │             │   │   ├── constantpool
    │             │   │   ├── methodarea
    │             │   │   │   ├── Class.java    
    │             │   │   │   ├── ClassMember.java  
    │             │   │   │   ├── ExceptionTable.java   
    │             │   │   │   ├── Field.java    
    │             │   │   │   ├── Method.java 
    │             │   │   │   ├── MethodDescriptor.java 
    │             │   │   │   ├── MethodDescriptorParser.java 
    │             │   │   │   ├── MethodLookup.java     
    │             │   │   │   ├── Object.java   
    │             │   │   │   ├── Slots.java   
    │             │   │   │   └── StringPool.java   
    │             │   │   └── ClassLoader.java  
    │             │   ├── Frame.java
    │             │   ├── JvmStack.java
    │             │   ├── LocalVars.java
    │             │   ├── OperandStack.java
    │             │   ├── Slot.java 
    │             │   └── Thread.java
    │             ├── Cmd.java
    │             ├── Interpret.java    
    │             └── Main.java
    └── test
         └── java
             └── org.itstack.demo.test
                 └── HelloWorld.java

如下为新增代码:

ClassReader.java (优化)

/**
 * http://www.itstack.org
 * create by fuzhengwei on 2019/5/12
 * <p>
 * java虚拟机定义了u1、u2、u4三种数据类型来表示;1字节、2字节、4字节,无符号整数。
 * 在如下实现中,用增位方式表示无符号类型:
 * u1、u2可以用int类型存储,因为int类型是4字节
 * u4 需要用long类型存储,因为long类型是8字节
 */
public class ClassReader {
    private byte[] data;
    public ClassReader(byte[] data) {
        this.data = data;
    }
    //u1
    public int readUint8() {
        byte[] val = readByte(1);
        return byte2int(val);
    }
    //u2
    public int readUint16() {
        byte[] val = readByte(2);
        return byte2int(val);
    }
    //u4
    public long readUint32() {
        byte[] val = readByte(4);
        String str_hex = new BigInteger(1, val).toString(16);
        return Long.parseLong(str_hex, 16);
    }
    public int readUint32TInteger(){
        byte[] val = readByte(4);
        return new BigInteger(1, val).intValue();
    }
    public float readUint64TFloat() {
        byte[] val = readByte(8);
        return new BigInteger(1, val).floatValue();
    }
    public long readUint64TLong() {
        byte[] val = readByte(8);
        return new BigInteger(1, val).longValue();
    }
    public double readUint64TDouble() {
        byte[] val = readByte(8);
        return new BigInteger(1, val).doubleValue();
    }
    public int[] readUint16s() {
        int n = this.readUint16();
        int[] s = new int[n];
        for (int i = 0; i < n; i++) {
            s[i] = this.readUint16();
        }
        return s;
    }
    public byte[] readBytes(int n) {
        return readByte(n);
    }
    private byte[] readByte(int length) {
        byte[] copy = new byte[length];
        System.arraycopy(data, 0, copy, 0, length);
        System.arraycopy(data, length, data, 0, data.length - length);
        return copy;
    }
    private int byte2int(byte[] val) {
        String str_hex = new BigInteger(1, val).toString(16);
        return Integer.parseInt(str_hex, 16);
    }
}

_Throwable.java

public class _Throwable {
    private StackTraceElement stackTraceElement;
    private final String jlThrowable = "java/lang/Throwable";
    public _Throwable() {
        Registry.register(jlThrowable, "fillInStackTrace", "(I)Ljava/lang/Throwable;", new NativeMethod(this, "fillInStackTrace"));
        Registry.register(jlThrowable, "registerNatives", "()V", new NativeMethod(this, "registerNatives"));
    }
    public void registerNatives(Frame frame) {
        // do nothing
    }
    public String string() {
        return String.format("%s.%s(%s:%d)", this.stackTraceElement.className, this.stackTraceElement.methodName, this.stackTraceElement.fileName, this.stackTraceElement.lineNumber);
    }
    public void fillInStackTrace(Frame frame) {
        Object thiz = frame.localVars().getThis();
        frame.operandStack().pushRef(thiz);
        _Throwable[] stes = createStackTraceElements(thiz, frame.thread());
        thiz.setExtra(stes);
    }
    private _Throwable[] createStackTraceElements(Object tObj, Thread thread) {
        int skip = distanceToObject(tObj.clazz()) + 2;
        Frame[] frames = thread.getFrames();
        _Throwable[] stes = new _Throwable[frames.length - skip];
        int idx = 0;
        for (int i = skip; i < frames.length; i++) {
            stes[idx] = createStackTraceElement(frames[i]);
        }
        return stes;
    }
    private int distanceToObject(Class clazz) {
        int distance = 0;
        for (Class c = clazz.superClass(); c != null; c = c.superClass()) {
            distance++;
        }
        return distance;
    }
    private _Throwable createStackTraceElement(Frame frame) {
        Method method = frame.method();
        Class clazz = method.clazz();
        StackTraceElement stackTraceElement = new StackTraceElement();
        stackTraceElement.fileName = clazz.sourceFile();
        stackTraceElement.className = clazz.javaName();
        stackTraceElement.methodName = method.name();
        stackTraceElement.lineNumber = method.getLineNumber(frame.nextPC() - 1);
        _Throwable throwable = new _Throwable();
        throwable.stackTraceElement = stackTraceElement;
        return throwable;
    }
    private class StackTraceElement {
        private String fileName;
        private String className;
        private String methodName;
        private int lineNumber;
    }
}

ATHROW.java

public class ATHROW extends InstructionNoOperands {
    @Override
    public void execute(Frame frame) {
        Object ex = frame.operandStack().popRef();
        if (ex == null) {
            throw new NullPointerException();
        }
        Thread thread = frame.thread();
        if (!findAndGotoExceptionHandler(thread, ex)) {
            handleUncaughtException(thread, ex);
        }
    }
    private boolean findAndGotoExceptionHandler(Thread thread, Object ex) {
        do {
            Frame frame = thread.currentFrame();
            int pc = frame.nextPC() - 1;
            int handlerPc = frame.method().findExceptionHandler(ex.clazz(), pc);
            if (handlerPc > 0) {
                OperandStack stack = frame.operandStack();
                stack.clear();
                stack.pushRef(ex);
                frame.setNextPC(handlerPc);
                return true;
            }
            thread.popFrame();
        } while (!thread.isStackEmpty());
        return false;
    }
    private void handleUncaughtException(Thread thread, Object ex) {
        thread.clearStack();
        Object jMsg = ex.getRefVar("detailMessage", "Ljava/lang/String;");
        String msg = StringPool.goString(jMsg);
        System.out.println(ex.clazz().javaName() + ":" + msg);
        java.lang.Object extra = ex.extra();
        _Throwable[] throwables = (_Throwable[]) extra;
        for (_Throwable t : throwables) {
            System.out.println(t.string());
        }
    }
}

ExceptionTable.java

public class ExceptionTable {
    private ExceptionHandler[] exceptionTable;
    public ExceptionTable(CodeAttribute.ExceptionTableEntry[] entries, RunTimeConstantPool runTimeConstantPool) {
        this.exceptionTable = new ExceptionHandler[entries.length];
        int i = 0;
        for (CodeAttribute.ExceptionTableEntry entry : entries) {
            ExceptionHandler handler = new ExceptionHandler(
                    entry.startPC(),
                    entry.endPC(),
                    entry.handlerPC(),
                    getCatchType(entry.catchType(), runTimeConstantPool)
            );
            this.exceptionTable[i++] = handler;
        }
    }
    public ClassRef getCatchType(int idx, RunTimeConstantPool runTimeConstantPool) {
        if (idx == 0) return null;
        return (ClassRef) runTimeConstantPool.getConstants(idx);
    }
    public ExceptionHandler findExceptionHandler(Class exClass, int pc) {
        for (ExceptionHandler handler : exceptionTable) {
            if (pc >= handler.startPC && pc < handler.endPC) {
                if (null == handler.catchType) {
                    return handler;
                }
                Class catchClass = handler.catchType.resolvedClass();
                if (catchClass == exClass || catchClass.isSubClassOf(exClass)) {
                    return handler;
                }
            }
        }
        return null;
    }
    class ExceptionHandler {
        int startPC;
        int endPC;
        int handlerPC;
        ClassRef catchType;
        ExceptionHandler(int startPC, int endPC, int handlerPC, ClassRef catchType) {
            this.startPC = startPC;
            this.endPC = endPC;
            this.handlerPC = handlerPC;
            this.catchType = catchType;
        }
    }
}

Method.java

public class Method extends ClassMember {
    public int maxStack;
    public int maxLocals;
    public byte[] code;
    private ExceptionTable exceptionTable;
    private LineNumberTableAttribute lineNumberTable;
    private int argSlotCount;
    Method[] newMethods(Class clazz, MemberInfo[] cfMethods) {
        Method[] methods = new Method[cfMethods.length];
        for (int i = 0; i < cfMethods.length; i++) {
            methods[i] = newMethod(clazz, cfMethods[i]);
        }
        return methods;
    }
    private Method newMethod(Class clazz, MemberInfo cfMethod) {
        Method method = new Method();
        method.clazz = clazz;
        method.copyMemberInfo(cfMethod);
        method.copyAttributes(cfMethod);
        MethodDescriptor md = MethodDescriptorParser.parseMethodDescriptorParser(method.descriptor);
        method.calcArgSlotCount(md.parameterTypes);
        if (method.isNative()) {
            method.injectCodeAttribute(md.returnType);
        }
        return method;
    }
    private void injectCodeAttribute(String returnType) {
        this.maxStack = 4; //todo
        this.maxLocals = this.argSlotCount;
        switch (returnType.getBytes()[0]) {
            case 'V':
                this.code = new byte[]{(byte) 0xfe, (byte) 0xb1};
                break;
            case 'L':
            case '[':
                this.code = new byte[]{(byte) 0xfe, (byte) 0xb0};
                break;
            case 'D':
                this.code = new byte[]{(byte) 0xfe, (byte) 0xaf};
                break;
            case 'F':
                this.code = new byte[]{(byte) 0xfe, (byte) 0xae};
                break;
            case 'J':
                this.code = new byte[]{(byte) 0xfe, (byte) 0xad};
                break;
            default:
                this.code = new byte[]{(byte) 0xfe, (byte) 0xac};
                break;
        }
    }
    private void copyAttributes(MemberInfo cfMethod) {
        CodeAttribute codeAttr = cfMethod.codeAttribute();
        if (null != codeAttr) {
            this.maxStack = codeAttr.maxStack();
            this.maxLocals = codeAttr.maxLocals();
            this.code = codeAttr.data();
            this.lineNumberTable = codeAttr.lineNumberTableAttribute();
            this.exceptionTable = new ExceptionTable(codeAttr.exceptionTable(), this.clazz.constantPool());
        }
    }
    private void calcArgSlotCount(List<String> parameterTypes) {
        for (String paramType : parameterTypes) {
            this.argSlotCount++;
            if ("J".equals(paramType) || "D".equals(paramType)) {
                this.argSlotCount++;
            }
        }
        if (!this.isStatic()) {
            this.argSlotCount++;
        }
    }
    public boolean isSynchronized() {
        return 0 != (this.accessFlags & AccessFlags.ACC_SYNCHRONIZED);
    }
    public boolean isBridge() {
        return 0 != (this.accessFlags & AccessFlags.ACC_BRIDGE);
    }
    public boolean isVarargs() {
        return 0 != (this.accessFlags & AccessFlags.ACC_VARARGS);
    }
    public boolean isNative() {
        return 0 != (this.accessFlags & AccessFlags.ACC_NATIVE);
    }
    public boolean isAbstract() {
        return 0 != (this.accessFlags & AccessFlags.ACC_ABSTRACT);
    }
    public boolean isStrict() {
        return 0 != (this.accessFlags & AccessFlags.ACC_STRICT);
    }
    public int maxStack() {
        return this.maxStack;
    }
    public int maxLocals() {
        return this.maxLocals;
    }
    public byte[] code() {
        return this.code;
    }
    public int argSlotCount() {
        return this.argSlotCount;
    }
    public int findExceptionHandler(Class exClass, int pc) {
        ExceptionTable.ExceptionHandler handler = this.exceptionTable.findExceptionHandler(exClass, pc);
        if (handler != null) {
            return handler.handlerPC;
        }
        return -1;
    }
    public int getLineNumber(int pc) {
        if (this.isNative()) return -2;
        if (this.lineNumberTable == null) return -1;
        return this.lineNumberTable.getLineNumber(pc);
    }
}

HelloWorld.java

public class HelloWorld {
    public static void main(String[] args) {
        throw new RuntimeException("自定义异常");
    }
}

测试结果

-Xjre "C:\Program Files\Java\jdk1.8.0_161\jre" E:\itstack\git\istack-demo\itstack-demo-jvm\itstack-demo-jvm-10\target\test-classes\org\itstack\demo\test\HelloWorld -verbose

public class org.itstack.demo.test.HelloWorld {
  public org.itstack.demo.test.HelloWorld();
    Code:
       0: aload_0
       1: invokespecial #1                  // Method java/lang/Object."<init>":()V
       4: return
  public static void main(java.lang.String[]);
    Code:
       0: new           #2                  // class java/lang/RuntimeException
       3: dup
       4: ldc           #3                  // String 自定义异常
       6: invokespecial #4                  // Method java/lang/RuntimeException."<init>":(Ljava/lang/String;)V
       9: athrow
}
指令码 助记符 描述(栈指操作数栈)
0x2a aload_0 从局部变量0中装载引用类型值入栈
0xb7 invokespecial 编译时方法绑定调用方法
0xb1 return void函数返回
0xbb new 创建新的对象实例
0x59 dup 复制栈顶一个字长的数据,将复制后的数据压栈
0x12 ldc 常量池中的常量值(int, float, string reference, object reference)入栈
0xbf athrow 抛出异常
org/itstack/demo/test/HelloWorld.main()     寄存器(指令):0xbb -> NEW
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0x12 -> LDC
java/lang/Throwable.<clinit>()  寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.getClassLoader()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.getClassLoader()    寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.getClassLoader0()   寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.getClassLoader0()   寄存器(指令):0xb4 -> GET_FIELD
java/lang/Class.getClassLoader0()   寄存器(指令):0xb0 -> ARETURN
java/lang/Class.getClassLoader()    寄存器(指令):0x4c -> ASTORE_1
java/lang/Class.getClassLoader()    寄存器(指令):0x2b -> ALOAD_1
java/lang/Class.getClassLoader()    寄存器(指令):0xc7 -> IFNONNULL
java/lang/Class.getClassLoader()    寄存器(指令):0x01 -> ACONST_NULL
java/lang/Class.getClassLoader()    寄存器(指令):0xb0 -> ARETURN
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x4c -> ASTORE_1
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2b -> ALOAD_1
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xc7 -> IFNONNULL
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Class.<clinit>()  寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Class.registerNatives()   寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Class.registerNatives()   寄存器(指令):0xb1 -> RETURN
java/lang/Class.<clinit>()  寄存器(指令):0x04 -> ICONST_1
java/lang/Class.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Class.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Class.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/lang/Class.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Class.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Class.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Class.<clinit>()  寄存器(指令):0xb1 -> RETURN
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Class.desiredAssertionStatus0()   寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Class.desiredAssertionStatus0()   寄存器(指令):0xac -> IRETURN
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xac -> IRETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0x9a -> IFNE
java/lang/Throwable.<clinit>()  寄存器(指令):0x04 -> ICONST_1
java/lang/Throwable.<clinit>()  寄存器(指令):0xa7 -> GOTO
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0xbb -> NEW
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/util/ArrayList.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/util/ArrayList.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/util/ArrayList.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/util/ArrayList.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/util/ArrayList.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/util/ArrayList.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/util/ArrayList.<clinit>()  寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0xbb -> NEW
java/lang/Throwable.<clinit>()  寄存器(指令):0x59 -> DUP
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/ArrayList.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/util/ArrayList.<init>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractList.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractCollection.<init>()   寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractCollection.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractList.<init>()     寄存器(指令):0x03 -> ICONST_0
java/util/AbstractList.<init>()     寄存器(指令):0xb5 -> PUT_FIELD
java/util/AbstractList.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/ArrayList.<init>()    寄存器(指令):0x1b -> ILOAD_1
java/util/ArrayList.<init>()    寄存器(指令):0x9e -> IFLE
java/util/ArrayList.<init>()    寄存器(指令):0x1b -> ILOAD_1
java/util/ArrayList.<init>()    寄存器(指令):0x9a -> IFNE
java/util/ArrayList.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/util/ArrayList.<init>()    寄存器(指令):0xb2 -> GET_STATIC
java/util/ArrayList.<init>()    寄存器(指令):0xb5 -> PUT_FIELD
java/util/ArrayList.<init>()    寄存器(指令):0xa7 -> GOTO
java/util/ArrayList.<init>()    寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0xb8 -> INVOKE_STATIC
java/util/Collections.<clinit>()    寄存器(指令):0xbb -> NEW
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.<clinit>()    寄存器(指令):0xbb -> NEW
java/util/Collections.<clinit>()    寄存器(指令):0x59 -> DUP
java/util/Collections.<clinit>()    寄存器(指令):0x01 -> ACONST_NULL
java/util/Collections.<clinit>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$EmptySet.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$EmptySet.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$EmptySet.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$EmptySet.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractSet.<init>()  寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractSet.<init>()  寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractCollection.<init>()   寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractCollection.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractSet.<init>()  寄存器(指令):0xb1 -> RETURN
java/util/Collections$EmptySet.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections$EmptySet.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.<clinit>()    寄存器(指令):0xb3 -> PUT_STATIC
java/util/Collections.<clinit>()    寄存器(指令):0xbb -> NEW
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.<clinit>()    寄存器(指令):0xbb -> NEW
java/util/Collections.<clinit>()    寄存器(指令):0x59 -> DUP
java/util/Collections.<clinit>()    寄存器(指令):0x01 -> ACONST_NULL
java/util/Collections.<clinit>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$EmptyList.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$EmptyList.<init>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$EmptyList.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$EmptyList.<init>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractList.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractCollection.<init>()   寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractCollection.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractList.<init>()     寄存器(指令):0x03 -> ICONST_0
java/util/AbstractList.<init>()     寄存器(指令):0xb5 -> PUT_FIELD
java/util/AbstractList.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections$EmptyList.<init>()    寄存器(指令):0xb1 -> RETURN
java/util/Collections$EmptyList.<init>()    寄存器(指令):0xb1 -> RETURN
java/util/Collections.<clinit>()    寄存器(指令):0xb3 -> PUT_STATIC
java/util/Collections.<clinit>()    寄存器(指令):0xbb -> NEW
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.<clinit>()    寄存器(指令):0xbb -> NEW
java/util/Collections.<clinit>()    寄存器(指令):0x59 -> DUP
java/util/Collections.<clinit>()    寄存器(指令):0x01 -> ACONST_NULL
java/util/Collections.<clinit>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$EmptyMap.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$EmptyMap.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$EmptyMap.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$EmptyMap.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractMap.<init>()  寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractMap.<init>()  寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractMap.<init>()  寄存器(指令):0xb1 -> RETURN
java/util/Collections$EmptyMap.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections$EmptyMap.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.<clinit>()    寄存器(指令):0xb3 -> PUT_STATIC
java/util/Collections.<clinit>()    寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0xb8 -> INVOKE_STATIC
java/util/Collections.unmodifiableList()    寄存器(指令):0x2a -> ALOAD_0
java/util/Collections.unmodifiableList()    寄存器(指令):0xc1 -> INSTANCE_OF
java/util/Collections.unmodifiableList()    寄存器(指令):0x99 -> IFEQ
java/util/Collections.unmodifiableList()    寄存器(指令):0xbb -> NEW
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Object.registerNatives()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Object.registerNatives()  寄存器(指令):0xb1 -> RETURN
java/lang/Object.<clinit>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.unmodifiableList()    寄存器(指令):0xbb -> NEW
java/util/Collections.unmodifiableList()    寄存器(指令):0x59 -> DUP
java/util/Collections.unmodifiableList()    寄存器(指令):0x2a -> ALOAD_0
java/util/Collections.unmodifiableList()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xc7 -> IFNONNULL
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb5 -> PUT_FIELD
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb5 -> PUT_FIELD
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.unmodifiableList()    寄存器(指令):0xb0 -> ARETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0x12 -> LDC
java/lang/Throwable.<clinit>()  寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.getClassLoader()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.getClassLoader()    寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.getClassLoader0()   寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.getClassLoader0()   寄存器(指令):0xb4 -> GET_FIELD
java/lang/Class.getClassLoader0()   寄存器(指令):0xb0 -> ARETURN
java/lang/Class.getClassLoader()    寄存器(指令):0x4c -> ASTORE_1
java/lang/Class.getClassLoader()    寄存器(指令):0x2b -> ALOAD_1
java/lang/Class.getClassLoader()    寄存器(指令):0xc7 -> IFNONNULL
java/lang/Class.getClassLoader()    寄存器(指令):0x01 -> ACONST_NULL
java/lang/Class.getClassLoader()    寄存器(指令):0xb0 -> ARETURN
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x4c -> ASTORE_1
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2b -> ALOAD_1
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xc7 -> IFNONNULL
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Class.desiredAssertionStatus0()   寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Class.desiredAssertionStatus0()   寄存器(指令):0xac -> IRETURN
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xac -> IRETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0x9a -> IFNE
java/lang/Throwable.<clinit>()  寄存器(指令):0x04 -> ICONST_1
java/lang/Throwable.<clinit>()  寄存器(指令):0xa7 -> GOTO
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0xbb -> NEW
java/lang/Throwable.<clinit>()  寄存器(指令):0x59 -> DUP
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/ArrayList.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/util/ArrayList.<init>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractList.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractCollection.<init>()   寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractCollection.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractList.<init>()     寄存器(指令):0x03 -> ICONST_0
java/util/AbstractList.<init>()     寄存器(指令):0xb5 -> PUT_FIELD
java/util/AbstractList.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/ArrayList.<init>()    寄存器(指令):0x1b -> ILOAD_1
java/util/ArrayList.<init>()    寄存器(指令):0x9e -> IFLE
java/util/ArrayList.<init>()    寄存器(指令):0x1b -> ILOAD_1
java/util/ArrayList.<init>()    寄存器(指令):0x9a -> IFNE
java/util/ArrayList.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/util/ArrayList.<init>()    寄存器(指令):0xb2 -> GET_STATIC
java/util/ArrayList.<init>()    寄存器(指令):0xb5 -> PUT_FIELD
java/util/ArrayList.<init>()    寄存器(指令):0xa7 -> GOTO
java/util/ArrayList.<init>()    寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0xb8 -> INVOKE_STATIC
java/util/Collections.unmodifiableList()    寄存器(指令):0x2a -> ALOAD_0
java/util/Collections.unmodifiableList()    寄存器(指令):0xc1 -> INSTANCE_OF
java/util/Collections.unmodifiableList()    寄存器(指令):0x99 -> IFEQ
java/util/Collections.unmodifiableList()    寄存器(指令):0xbb -> NEW
java/util/Collections.unmodifiableList()    寄存器(指令):0x59 -> DUP
java/util/Collections.unmodifiableList()    寄存器(指令):0x2a -> ALOAD_0
java/util/Collections.unmodifiableList()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xc7 -> IFNONNULL
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb5 -> PUT_FIELD
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb5 -> PUT_FIELD
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.unmodifiableList()    寄存器(指令):0xb0 -> ARETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0x12 -> LDC
java/lang/Throwable.<clinit>()  寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.getClassLoader()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.getClassLoader()    寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Class.getClassLoader0()   寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.getClassLoader0()   寄存器(指令):0xb4 -> GET_FIELD
java/lang/Class.getClassLoader0()   寄存器(指令):0xb0 -> ARETURN
java/lang/Class.getClassLoader()    寄存器(指令):0x4c -> ASTORE_1
java/lang/Class.getClassLoader()    寄存器(指令):0x2b -> ALOAD_1
java/lang/Class.getClassLoader()    寄存器(指令):0xc7 -> IFNONNULL
java/lang/Class.getClassLoader()    寄存器(指令):0x01 -> ACONST_NULL
java/lang/Class.getClassLoader()    寄存器(指令):0xb0 -> ARETURN
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x4c -> ASTORE_1
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2b -> ALOAD_1
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xc7 -> IFNONNULL
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xb8 -> INVOKE_STATIC
java/lang/Class.desiredAssertionStatus0()   寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Class.desiredAssertionStatus0()   寄存器(指令):0xac -> IRETURN
java/lang/Class.desiredAssertionStatus()    寄存器(指令):0xac -> IRETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0x9a -> IFNE
java/lang/Throwable.<clinit>()  寄存器(指令):0x04 -> ICONST_1
java/lang/Throwable.<clinit>()  寄存器(指令):0xa7 -> GOTO
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0xbb -> NEW
java/lang/Throwable.<clinit>()  寄存器(指令):0x59 -> DUP
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/ArrayList.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/util/ArrayList.<init>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractList.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/AbstractCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractCollection.<init>()   寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractCollection.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/AbstractList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/AbstractList.<init>()     寄存器(指令):0x03 -> ICONST_0
java/util/AbstractList.<init>()     寄存器(指令):0xb5 -> PUT_FIELD
java/util/AbstractList.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/ArrayList.<init>()    寄存器(指令):0x1b -> ILOAD_1
java/util/ArrayList.<init>()    寄存器(指令):0x9e -> IFLE
java/util/ArrayList.<init>()    寄存器(指令):0x1b -> ILOAD_1
java/util/ArrayList.<init>()    寄存器(指令):0x9a -> IFNE
java/util/ArrayList.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/util/ArrayList.<init>()    寄存器(指令):0xb2 -> GET_STATIC
java/util/ArrayList.<init>()    寄存器(指令):0xb5 -> PUT_FIELD
java/util/ArrayList.<init>()    寄存器(指令):0xa7 -> GOTO
java/util/ArrayList.<init>()    寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0xb8 -> INVOKE_STATIC
java/util/Collections.unmodifiableList()    寄存器(指令):0x2a -> ALOAD_0
java/util/Collections.unmodifiableList()    寄存器(指令):0xc1 -> INSTANCE_OF
java/util/Collections.unmodifiableList()    寄存器(指令):0x99 -> IFEQ
java/util/Collections.unmodifiableList()    寄存器(指令):0xbb -> NEW
java/util/Collections.unmodifiableList()    寄存器(指令):0x59 -> DUP
java/util/Collections.unmodifiableList()    寄存器(指令):0x2a -> ALOAD_0
java/util/Collections.unmodifiableList()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xc7 -> IFNONNULL
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb5 -> PUT_FIELD
java/util/Collections$UnmodifiableCollection.<init>()   寄存器(指令):0xb1 -> RETURN
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0x2b -> ALOAD_1
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb5 -> PUT_FIELD
java/util/Collections$UnmodifiableList.<init>()     寄存器(指令):0xb1 -> RETURN
java/util/Collections.unmodifiableList()    寄存器(指令):0xb0 -> ARETURN
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.<clinit>()  寄存器(指令):0xbd -> ANEW_ARRAY
java/lang/Throwable.<clinit>()  寄存器(指令):0xb3 -> PUT_STATIC
java/lang/Throwable.<clinit>()  寄存器(指令):0xb1 -> RETURN
org/itstack/demo/test/HelloWorld.main()     寄存器(指令):0xbb -> NEW
org/itstack/demo/test/HelloWorld.main()     寄存器(指令):0x59 -> DUP
org/itstack/demo/test/HelloWorld.main()     寄存器(指令):0x12 -> LDC
org/itstack/demo/test/HelloWorld.main()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/RuntimeException.<init>()     寄存器(指令):0x2a -> ALOAD_0
java/lang/RuntimeException.<init>()     寄存器(指令):0x2b -> ALOAD_1
java/lang/RuntimeException.<init>()     寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Exception.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Exception.<init>()    寄存器(指令):0x2b -> ALOAD_1
java/lang/Exception.<init>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Throwable.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.<init>()    寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Object.<init>()   寄存器(指令):0xb1 -> RETURN
java/lang/Throwable.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.<init>()    寄存器(指令):0xb5 -> PUT_FIELD
java/lang/Throwable.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.<init>()    寄存器(指令):0xb2 -> GET_STATIC
java/lang/Throwable.<init>()    寄存器(指令):0xb5 -> PUT_FIELD
java/lang/Throwable.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.<init>()    寄存器(指令):0xb2 -> GET_STATIC
java/lang/Throwable.<init>()    寄存器(指令):0xb5 -> PUT_FIELD
java/lang/Throwable.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.<init>()    寄存器(指令):0xb6 -> INVOKE_VIRTUAL
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0xb4 -> GET_FIELD
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0xc7 -> IFNONNULL
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0x03 -> ICONST_0
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0xb7 -> INVOKE_SPECIAL
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0xfe -> INVOKE_NATIVE
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0xb0 -> ARETURN
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0x57 -> POP
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0xb2 -> GET_STATIC
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0xb5 -> PUT_FIELD
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.fillInStackTrace()  寄存器(指令):0xb0 -> ARETURN
java/lang/Throwable.<init>()    寄存器(指令):0x57 -> POP
java/lang/Throwable.<init>()    寄存器(指令):0x2a -> ALOAD_0
java/lang/Throwable.<init>()    寄存器(指令):0x2b -> ALOAD_1
java/lang/Throwable.<init>()    寄存器(指令):0xb5 -> PUT_FIELD
java/lang/Throwable.<init>()    寄存器(指令):0xb1 -> RETURN
java/lang/Exception.<init>()    寄存器(指令):0xb1 -> RETURN
java/lang/RuntimeException.<init>()     寄存器(指令):0xb1 -> RETURN
org/itstack/demo/test/HelloWorld.main()     寄存器(指令):0xbf -> ATHROW
java.lang.RuntimeException:自定义异常
org.itstack.demo.test.HelloWorld.main(HelloWorld.java:9)
Process finished with exit code 0
上一篇:用Java实现JVM第三章《解析class文件》


下一篇:用Java实现JVM第二章《搜索class文件》