Skip to content

Instantly share code, notes, and snippets.

@pramoth
Created March 10, 2019 21:43
Show Gist options
  • Select an option

  • Save pramoth/7dac6274aba7b1589049d2e3fc3fd642 to your computer and use it in GitHub Desktop.

Select an option

Save pramoth/7dac6274aba7b1589049d2e3fc3fd642 to your computer and use it in GitHub Desktop.
export class Thread {
...
constructor() {
let bytecode = [
Opcode.ICONST_0,
Opcode.ISTORE_1,
Opcode.ILOAD_1,
Opcode.BIPUSH,
10,
Opcode.IF_ICMPGE,
0,
16,
Opcode.ILOAD_1,
Opcode.PRINT,
Opcode.IINC,
1,
1,
Opcode.GOTO,
0,
2,
Opcode.RETURN]
this.stackFrame.push(new StackFrame([], bytecode))
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment