Skip to content

Instantly share code, notes, and snippets.

@TkTech
Created February 12, 2020 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TkTech/9ce315bcd221689699287d8f861ae5ab to your computer and use it in GitHub Desktop.
Save TkTech/9ce315bcd221689699287d8f861ae5ab to your computer and use it in GitHub Desktop.
[0000]├─<Class('TryCatch', ['public'])>
[0000]│ ├─<Bytecode(major=52, minor=0)>
[0000]│ ├─<Super('java/lang/Object')>
[0000]│ ├─<Method('<init>', '()V')>
[0000]│ │ └─<Code(max_locals=1, max_stack=1)>
[0000]│ │ ├─<Instruction('aload_0')>
[0000]│ │ ├─<Instruction('invokespecial')>
[0000]│ │ │ └─<MethodReference('java/lang/Object', '<init>', '()V')>
[0000]│ │ └─<Instruction('return')>
[0000]│ └─<Method('test', '()V')>
[0000]│ └─<Code(max_locals=2, max_stack=2)>
[0000]│ ├─<TryCatch('java/lang/ArithmeticException', target='catch_1')>
[0000]│ │ ├─<Instruction('iconst_1')>
[0000]│ │ ├─<Instruction('iconst_0')>
[0000]│ │ ├─<Instruction('idiv')>
[0000]│ │ └─<Instruction('istore_1')>
[0000]│ ├─<Instruction('goto')>
[0000]│ │ └─<Jump('label_1')>
[0000]│ ├─<Label('catch_1')>
[0000]│ ├─<Instruction('astore_1')>
[0000]│ ├─<Instruction('return')>
[0000]│ ├─<Label('label_1')>
[0000]│ └─<Instruction('return')>
public class TryCatch {
public void test() {
try {
int i = 1 / 0;
} catch(ArithmeticException e) {
return;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment