Skip to content

Instantly share code, notes, and snippets.

@khyperia
Created March 20, 2019 16:06
Show Gist options
  • Save khyperia/80c91510e9638c4c34ea7daedf9eb24b to your computer and use it in GitHub Desktop.
Save khyperia/80c91510e9638c4c34ea7daedf9eb24b to your computer and use it in GitHub Desktop.
js> dis(class c{x=2;})
flags: CONSTRUCTOR
loc op
----- --
00000: functionthis # THIS
00001: setlocal 0 # THIS
00005: pop #
main:
00006: getgname ".initializers" # .initializers
00011: zero # .initializers 0
00012: callelem # .initializers[0]
00013: getlocal 0 # .initializers[0] this
00017: call-ignores-rv 0 # .initializers[0](...)
00020: pop #
00021: retrval #
Source notes:
ofs line pc delta desc args
---- ---- ----- ------ -------- ------
0: 2 21 [ 21] xdelta
1: 2 21 [ 0] colspan 5
3: 2 21 [ 0] breakpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment