Skip to content

Instantly share code, notes, and snippets.

@CalebWhiting
Created October 23, 2013 21:16
Show Gist options
  • Select an option

  • Save CalebWhiting/7126906 to your computer and use it in GitHub Desktop.

Select an option

Save CalebWhiting/7126906 to your computer and use it in GitHub Desktop.
InsnPattern base = new InsnPattern(
new IntInsn(6),
new Insn(Opcodes.ISUB),
new FieldInsn(Opcodes.PUTSTATIC, "I"),
new IntInsn(6),
new Insn(Opcodes.ISUB),
new FieldInsn(Opcodes.PUTSTATIC, "I")
);
base.debug(); // output shown below
addHook("base-x", base, 2);
addHook("base-y", base, 5);
t.ap(IIIIII)V
0: BIPUSH '6'
1: ISUB
2: PUTSTATIC 'I i.cl'
3: BIPUSH '6'
4: ISUB
5: PUTSTATIC 'I c.cv'
client.it(IIIII)V
0: BIPUSH '6'
1: ISUB
2: PUTSTATIC 'I i.cl'
3: BIPUSH '6'
4: ISUB
5: PUTSTATIC 'I c.cv'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment