Skip to content

Instantly share code, notes, and snippets.

@timotheecour
Created November 17, 2020 19:16
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 timotheecour/fc575c054cddba5bea32df98d1c50cdc to your computer and use it in GitHub Desktop.
Save timotheecour/fc575c054cddba5bea32df98d1c50cdc to your computer and use it in GitHub Desktop.
when defined case11e:
type Foo = object
f0: int
proc main=
var f = Foo(f0: 3)
var f2 = f.addr
f2[].f0 += 1
f2.f0 += 1
echo "--"
echo f
static: main()
main()
code listing:
157 LdNull r1, 4 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(256, 9)
158 LdNull r2, 4 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(256, 16)
159 LdImmInt r3, 3 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(256, 21)
160 WrObj r2, r0, r3 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(256, 21)
161 AsgnComplex r1, r2, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(256, 9)
162 LdNull r4, 5 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(257, 9)
163 AsgnComplex r2, r1, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(257, 14)
164 AsgnRef r4, r2, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(257, 9)
165 LdDeref r2, r4, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(258, 7)
166 LdObj r5, r2, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(258, 9)
167 NodeToReg r3, r5, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(258, 9)
168 AddImmInt r3, r3, r129 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(258, 13)
169 LdDeref r2, r4, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(258, 7)
170 WrObj r2, r0, r3 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(258, 9)
171 LdDeref r2, r4, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(259, 5)
172 LdObj r5, r2, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(259, 7)
173 NodeToReg r3, r5, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(259, 7)
174 AddImmInt r3, r3, r129 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(259, 11)
175 LdDeref r2, r4, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(259, 5)
176 WrObj r2, r0, r3 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(259, 7)
177 LdConst r6, "--" (10) # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(260, 10)
178 Echo r6, r1, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(260, 10)
179 LdConst r8, $ (11) # /Users/timothee/git_clone/nim/Nim_prs/lib/system.nim(1982, 32)
180 FastAsgnComplex r9, r1, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(261, 10)
181 IndCallAsgn r7, r8, nargs:2 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(261, 10)
182 Echo r7, r1, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(261, 10)
183 Ret r0, r0, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(256, 5)
184 Eof r0, r0, r0 # /Users/timothee/git_clone/nim/timn/tests/nim/all/t11293.nim(256, 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment