Skip to content

Instantly share code, notes, and snippets.

@bdw

bdw/Comments.txt Secret

Created July 30, 2014 22:26
Show Gist options
  • Save bdw/899799631900fab733fa to your computer and use it in GitHub Desktop.
Save bdw/899799631900fab733fa to your computer and use it in GitHub Desktop.
Broken frame JIT compiled
I'm reasonably fairly sure that the JIT compilation of this frame - and no other - is necessary for our continued failure.
Why is this so?
a): this is the exact frame that's JIT compiled just before our regexes start misbehaving in nqp/t/qregex/01-qregex.nqp
(which is just before test 56 if you just use the 'subrules' file)
b): disable JIT compiling it (by inserting a known-uncompilable frame?)
c): it's not related to OSR (even though it adds OSR points, because MVM_spesh_osr_finalize is not called in this case, and it really just starts at the beginning)
jit-cuid_244_1406670054.97288..bin: file format binary
/*
append label: 0
append label: 2
append_ins: <wval>
append_ins: <set>
append_ins: <goto>
append label: 1
append_ins: <set>
append label: 3
append_ins: <PHI>
append_ins: <const_s>
append_ins: <atkey_o>
append_ins: <ifnonnull>
append label: 5
append_ins: <wval>
append_ins: <set>
append_ins: <goto>
append label: 4
append_ins: <set>
append label: 6
append_ins: <PHI>
append_ins: <iter>
append label: 7
append_ins: <unless_o>
append label: 9
append_ins: <shift_o>
append_ins: <prepargs>
Invoke arg: <arg_o>
Invoke instruction: <invoke_v>
append label: 10
append_ins: <goto>
append label: 8
append_ins: <getlex>
append_ins: <iter>
append label: 11
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append label: 13
append_ins: <shift_o>
append label: 14
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <PHI>
append_ins: <prepargs>
Invoke arg: <arg_o>
Invoke instruction: <invoke_v>
append label: 15
append_ins: <goto>
append label: 12
append_ins: <null>
append_ins: <return_o>
*/
Disassembly of section .data:
0000000000000000 <.data>:
0: 55 push rbp
1: 48 89 e5 mov rbp,rsp
4: 48 83 ec 60 sub rsp,0x60
8: 4c 89 75 f8 mov QWORD PTR [rbp-0x8],r14
c: 4c 89 6d f0 mov QWORD PTR [rbp-0x10],r13
10: 4c 89 65 e8 mov QWORD PTR [rbp-0x18],r12
14: 48 89 5d e0 mov QWORD PTR [rbp-0x20],rbx
18: 49 89 fe mov r14,rdi
1b: 49 89 f5 mov r13,rsi
1e: 4d 8b 66 50 mov r12,QWORD PTR [r14+0x50]
22: 49 8b 5c 24 10 mov rbx,QWORD PTR [r12+0x10]
27: ff e2 jmp rdx
// append_ins: <getcode> local[6], idx=0xb40
29: 49 8b 4d 30 mov rcx,QWORD PTR [r13+0x30]
2d: 48 8b 89 b0 04 00 00 mov rcx,QWORD PTR [rcx+0x4b0]
34: 48 89 4b 30 mov QWORD PTR [rbx+0x30],rcx
// append_ins: <takeclosure> local[6], local[6]
38: 4d 89 f3 mov r11,r14
3b: 4c 89 df mov rdi,r11
3e: 4c 8b 5b 30 mov r11,QWORD PTR [rbx+0x30]
42: 4c 89 de mov rsi,r11
45: 49 ba f0 1d 52 f7 ff movabs r10,0x7ffff7521df0
4c: 7f 00 00
4f: 41 ff d2 call r10
52: 48 89 43 30 mov QWORD PTR [rbx+0x30],rax
// append_ins: <getcode> local[7], idx=0x4b8
56: 49 8b 4d 30 mov rcx,QWORD PTR [r13+0x30]
5a: 48 8b 89 b8 04 00 00 mov rcx,QWORD PTR [rcx+0x4b8]
61: 48 89 4b 38 mov QWORD PTR [rbx+0x38],rcx
// append_ins: <takeclosure> local[7], local[7]
65: 4d 89 f3 mov r11,r14
68: 4c 89 df mov rdi,r11
6b: 4c 8b 5b 38 mov r11,QWORD PTR [rbx+0x38]
6f: 4c 89 de mov rsi,r11
72: 49 ba f0 1d 52 f7 ff movabs r10,0x7ffff7521df0
79: 7f 00 00
7c: 41 ff d2 call r10
7f: 48 89 43 38 mov QWORD PTR [rbx+0x38],rax
// append_ins: <sp_fastcreate> local[0], size=0x20, type=spesh_idx[2]
83: 4c 89 f7 mov rdi,r14
86: 48 c7 c6 20 00 00 00 mov rsi,0x20
8d: 49 ba 20 0e 56 f7 ff movabs r10,0x7ffff7560e20
94: 7f 00 00
97: 41 ff d2 call r10
9a: 49 8b 8c 24 88 00 00 mov rcx,QWORD PTR [r12+0x88]
a1: 00
a2: 48 8b 49 10 mov rcx,QWORD PTR [rcx+0x10]
a6: 48 89 48 10 mov QWORD PTR [rax+0x10],rcx
aa: 66 c7 40 06 20 00 mov WORD PTR [rax+0x6],0x20
b0: 41 8b 4e 1c mov ecx,DWORD PTR [r14+0x1c]
b4: 89 08 mov DWORD PTR [rax],ecx
b6: 48 89 03 mov QWORD PTR [rbx],rax
// append_ins: <bindlex> lex=0, outers=0, local[0]
b9: 4c 89 e1 mov rcx,r12
bc: 48 8b 49 08 mov rcx,QWORD PTR [rcx+0x8]
c0: 48 8b 13 mov rdx,QWORD PTR [rbx]
c3: 48 89 11 mov QWORD PTR [rcx],rdx
// append_ins: <getlex> local[2], lex=2, outers=1
c6: 4d 89 e3 mov r11,r12
c9: 4d 8b 5b 28 mov r11,QWORD PTR [r11+0x28]
cd: 4d 8b 53 08 mov r10,QWORD PTR [r11+0x8]
d1: 4d 8b 52 10 mov r10,QWORD PTR [r10+0x10]
d5: 49 83 fa 00 cmp r10,0x0
d9: 75 1d jne 0xf8
db: 4c 89 f7 mov rdi,r14
de: 4c 89 de mov rsi,r11
e1: 48 c7 c2 02 00 00 00 mov rdx,0x2
e8: 49 ba 60 25 52 f7 ff movabs r10,0x7ffff7522560
ef: 7f 00 00
f2: 41 ff d2 call r10
f5: 49 89 c2 mov r10,rax
f8: 4c 89 53 10 mov QWORD PTR [rbx+0x10],r10
// GC_SYNC_POINT
fc: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
101: 74 10 je 0x113
103: 4c 89 f7 mov rdi,r14
106: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
10d: 7f 00 00
110: 41 ff d2 call r10
// append_ins: <ifnonnull>
113: 48 8b 4b 10 mov rcx,QWORD PTR [rbx+0x10]
117: 48 85 c9 test rcx,rcx
11a: 74 12 je 0x12e
11c: 49 8b 96 80 00 00 00 mov rdx,QWORD PTR [r14+0x80]
123: 48 8b 52 60 mov rdx,QWORD PTR [rdx+0x60]
127: 48 39 d1 cmp rcx,rdx
12a: 74 02 je 0x12e
12c: eb 52 jmp 0x180
12e: 4d 89 f3 mov r11,r14
131: 4c 89 df mov rdi,r11
134: 4d 89 eb mov r11,r13
137: 4c 89 de mov rsi,r11
13a: 49 c7 c3 00 00 00 00 mov r11,0x0
141: 4c 89 da mov rdx,r11
144: 49 c7 c3 1a 00 00 00 mov r11,0x1a
14b: 4c 89 d9 mov rcx,r11
14e: 49 ba 20 7c 5e f7 ff movabs r10,0x7ffff75e7c20
155: 7f 00 00
158: 41 ff d2 call r10
15b: 48 89 43 20 mov QWORD PTR [rbx+0x20],rax
15f: 48 8b 4b 20 mov rcx,QWORD PTR [rbx+0x20]
163: 48 89 4b 18 mov QWORD PTR [rbx+0x18],rcx
167: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
16c: 74 10 je 0x17e
16e: 4c 89 f7 mov rdi,r14
171: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
178: 7f 00 00
17b: 41 ff d2 call r10
17e: eb 08 jmp 0x188
// set local[3], local[2]
180: 48 8b 4b 10 mov rcx,QWORD PTR [rbx+0x10]
184: 48 89 4b 18 mov QWORD PTR [rbx+0x18],rcx
// const_s local[5], 'charspec'
188: 48 b9 a0 de 02 00 70 movabs rcx,0x62700002dea0
18f: 62 00 00
192: 48 89 4b 28 mov QWORD PTR [rbx+0x28],rcx
// atkey_o local[3], local[3] (getlex(idx=2,outer=1)), local[5] ('charspec')
196: 4d 89 f3 mov r11,r14
199: 4c 89 df mov rdi,r11
19c: 4c 8b 5b 18 mov r11,QWORD PTR [rbx+0x18]
1a0: 4c 89 de mov rsi,r11
1a3: 4c 8b 5b 28 mov r11,QWORD PTR [rbx+0x28]
1a7: 4c 89 da mov rdx,r11
1aa: 49 ba 10 9f 58 f7 ff movabs r10,0x7ffff7589f10
1b1: 7f 00 00
1b4: 41 ff d2 call r10
1b7: 48 89 43 18 mov QWORD PTR [rbx+0x18],rax // is VMArray
// GC_SYNC_POINT
1bb: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
1c0: 74 10 je 0x1d2
1c2: 4c 89 f7 mov rdi,r14
1c5: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
1cc: 7f 00 00
1cf: 41 ff d2 call r10
// ifnonnull local[3], -> 0x23f
1d2: 48 8b 4b 18 mov rcx,QWORD PTR [rbx+0x18]
1d6: 48 85 c9 test rcx,rcx
1d9: 74 12 je 0x1ed
1db: 49 8b 96 80 00 00 00 mov rdx,QWORD PTR [r14+0x80]
1e2: 48 8b 52 60 mov rdx,QWORD PTR [rdx+0x60]
1e6: 48 39 d1 cmp rcx,rdx
1e9: 74 02 je 0x1ed
1eb: eb 52 jmp 0x23f
1ed: 4d 89 f3 mov r11,r14
1f0: 4c 89 df mov rdi,r11
1f3: 4d 89 eb mov r11,r13
1f6: 4c 89 de mov rsi,r11
1f9: 49 c7 c3 00 00 00 00 mov r11,0x0
200: 4c 89 da mov rdx,r11
203: 49 c7 c3 1a 00 00 00 mov r11,0x1a
20a: 4c 89 d9 mov rcx,r11
20d: 49 ba 20 7c 5e f7 ff movabs r10,0x7ffff75e7c20
214: 7f 00 00
217: 41 ff d2 call r10
21a: 48 89 43 10 mov QWORD PTR [rbx+0x10],rax
21e: 48 8b 4b 10 mov rcx,QWORD PTR [rbx+0x10]
222: 48 89 4b 20 mov QWORD PTR [rbx+0x20],rcx
226: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
22b: 74 10 je 0x23d
22d: 4c 89 f7 mov rdi,r14
230: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
237: 7f 00 00
23a: 41 ff d2 call r10
23d: eb 08 jmp 0x247
// set local[4], local[3]
23f: 48 8b 4b 18 mov rcx,QWORD PTR [rbx+0x18]
243: 48 89 4b 20 mov QWORD PTR [rbx+0x20],rcx
// iter local[2], local[4]
247: 4d 89 f3 mov r11,r14
24a: 4c 89 df mov rdi,r11
24d: 4c 8b 5b 20 mov r11,QWORD PTR [rbx+0x20]
251: 4c 89 de mov rsi,r11
254: 49 ba 30 0b 63 f7 ff movabs r10,0x7ffff7630b30
25b: 7f 00 00
25e: 41 ff d2 call r10
261: 48 89 43 10 mov QWORD PTR [rbx+0x10],rax
// unless_o local[2] (our iter object), -> 0x3d6
265: 4d 89 f3 mov r11,r14
268: 4c 89 df mov rdi,r11
26b: 4c 8b 5b 10 mov r11,QWORD PTR [rbx+0x10]
26f: 4c 89 de mov rsi,r11
272: 4c 8d 9b b8 00 00 00 lea r11,[rbx+0xb8] // intermediate local[23]
279: 4c 89 da mov rdx,r11
27c: 49 c7 c3 00 00 00 00 mov r11,0x0
283: 4c 89 d9 mov rcx,r11
286: 49 c7 c3 00 00 00 00 mov r11,0x0
28d: 4d 89 d8 mov r8,r11
290: 49 c7 c3 01 00 00 00 mov r11,0x1
297: 4d 89 d9 mov r9,r11
29a: 49 ba b0 b3 53 f7 ff movabs r10,0x7ffff753b3b0
2a1: 7f 00 00
2a4: 41 ff d2 call r10
// iter istrue never invokes, so this is skipped
2a7: 4d 3b 66 50 cmp r12,QWORD PTR [r14+0x50]
2ab: 74 1b je 0x2c8
2ad: 48 8d 0d 14 00 00 00 lea rcx,[rip+0x14] # 0x2c8
2b4: 49 89 8c 24 08 01 00 mov QWORD PTR [r12+0x108],rcx
2bb: 00
2bc: 48 c7 c0 01 00 00 00 mov rax,0x1
2c3: e9 1e 03 00 00 jmp 0x5e6
// GC_SYNC_POINT
2c8: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
2cd: 74 10 je 0x2df
2cf: 4c 89 f7 mov rdi,r14
2d2: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
2d9: 7f 00 00
2dc: 41 ff d2 call r10
// if_i local[23], 0x3d6
2df: 48 8b 83 b8 00 00 00 mov rax,QWORD PTR [rbx+0xb8]
2e6: 48 85 c0 test rax,rax
2e9: 0f 85 e7 00 00 00 jne 0x3d6
// shift_o local[2], local[3]
2ef: 4d 89 f3 mov r11,r14
2f2: 4c 89 df mov rdi,r11
2f5: 4c 8b 5b 10 mov r11,QWORD PTR [rbx+0x10]
2f9: 4c 89 de mov rsi,r11
2fc: 49 ba 90 9d 58 f7 ff movabs r10,0x7ffff7589d90 // much funk going on
303: 7f 00 00
306: 41 ff d2 call r10
309: 48 89 43 18 mov QWORD PTR [rbx+0x18],rax
// prepargs
30d: 4c 89 f7 mov rdi,r14
310: 4c 89 ee mov rsi,r13
313: 48 c7 c2 00 00 00 00 mov rdx,0x0
31a: 49 ba 00 82 4b f7 ff movabs r10,0x7ffff74b8200
321: 7f 00 00
324: 41 ff d2 call r10
// args_o arg[0], lcoal[3]
327: 49 89 c3 mov r11,rax
32a: 4d 8b 54 24 18 mov r10,QWORD PTR [r12+0x18]
32f: 4c 8b 4b 18 mov r9,QWORD PTR [rbx+0x18]
333: 4d 89 0a mov QWORD PTR [r10],r9
// invoke_v
336: 41 c7 84 24 b0 00 00 mov DWORD PTR [r12+0xb0],0x0
33d: 00 00 00 00 00
342: 49 c7 84 24 a8 00 00 mov QWORD PTR [r12+0xa8],0x0
349: 00 00 00 00 00
34e: 49 8b 56 30 mov rdx,QWORD PTR [r14+0x30] // get_cur_op
352: 48 8b 12 mov rdx,QWORD PTR [rdx]
355: 49 89 94 24 a0 00 00 mov QWORD PTR [r12+0xa0],rdx
35c: 00
35d: 48 8d 15 56 00 00 00 lea rdx,[rip+0x56] # 0x3ba // jit_entry_label
364: 49 89 94 24 08 01 00 mov QWORD PTR [r12+0x108],rdx
36b: 00
36c: 4c 89 55 d8 mov QWORD PTR [rbp-0x28],r10
370: 4c 89 5d d0 mov QWORD PTR [rbp-0x30],r11
374: 4c 89 f7 mov rdi,r14
377: 48 8b 73 30 mov rsi,QWORD PTR [rbx+0x30]
37b: 48 8d 55 d0 lea rdx,[rbp-0x30]
37f: 4c 89 d1 mov rcx,r10
382: 49 ba 60 8c 52 f7 ff movabs r10,0x7ffff7528c60
389: 7f 00 00
38c: 41 ff d2 call r10
38f: 4c 8b 5d d0 mov r11,QWORD PTR [rbp-0x30]
393: 4c 8b 55 d8 mov r10,QWORD PTR [rbp-0x28]
397: 4c 89 f7 mov rdi,r14
39a: 48 89 c6 mov rsi,rax
39d: 4c 89 da mov rdx,r11
3a0: 4c 89 d1 mov rcx,r10
3a3: 4c 8b 50 10 mov r10,QWORD PTR [rax+0x10]
3a7: 4d 8b 52 68 mov r10,QWORD PTR [r10+0x68]
3ab: 41 ff d2 call r10
3ae: 48 c7 c0 01 00 00 00 mov rax,0x1
3b5: e9 2c 02 00 00 jmp 0x5e6
// GC_SYNC_POINT
3ba: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
3bf: 74 10 je 0x3d1
3c1: 4c 89 f7 mov rdi,r14
3c4: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
3cb: 7f 00 00
3ce: 41 ff d2 call r10
// goto
3d1: e9 8f fe ff ff jmp 0x265
// getlex local[4], outer=0, idx=0
3d6: 4d 89 e3 mov r11,r12
3d9: 4d 8b 53 08 mov r10,QWORD PTR [r11+0x8]
3dd: 4d 8b 12 mov r10,QWORD PTR [r10]
3e0: 49 83 fa 00 cmp r10,0x0
3e4: 75 1d jne 0x403
3e6: 4c 89 f7 mov rdi,r14
3e9: 4c 89 de mov rsi,r11
3ec: 48 c7 c2 00 00 00 00 mov rdx,0x0
3f3: 49 ba 60 25 52 f7 ff movabs r10,0x7ffff7522560 // vivify (not necessary because i
// assigned this very lex just a
// few instructions ago)
3fa: 7f 00 00
3fd: 41 ff d2 call r10
400: 49 89 c2 mov r10,rax
403: 4c 89 53 20 mov QWORD PTR [rbx+0x20],r10
// iter local[3], local[4]
407: 4d 89 f3 mov r11,r14
40a: 4c 89 df mov rdi,r11
40d: 4c 8b 5b 20 mov r11,QWORD PTR [rbx+0x20]
411: 4c 89 de mov rsi,r11
414: 49 ba 30 0b 63 f7 ff movabs r10,0x7ffff7630b30
41b: 7f 00 00
41e: 41 ff d2 call r10
421: 48 89 43 18 mov QWORD PTR [rbx+0x18],rax
// unless_o (first part, istrue_o)
425: 4d 89 f3 mov r11,r14
428: 4c 89 df mov rdi,r11
42b: 4c 8b 5b 18 mov r11,QWORD PTR [rbx+0x18]
42f: 4c 89 de mov rsi,r11
432: 4c 8d 9b b8 00 00 00 lea r11,[rbx+0xb8]
439: 4c 89 da mov rdx,r11
43c: 49 c7 c3 00 00 00 00 mov r11,0x0
443: 4c 89 d9 mov rcx,r11
446: 49 c7 c3 00 00 00 00 mov r11,0x0
44d: 4d 89 d8 mov r8,r11
450: 49 c7 c3 01 00 00 00 mov r11,0x1
457: 4d 89 d9 mov r9,r11
45a: 49 ba b0 b3 53 f7 ff movabs r10,0x7ffff753b3b0
461: 7f 00 00
464: 41 ff d2 call r10
// shouldn't be invokish right (it isn't, but this is the guard)
467: 4d 3b 66 50 cmp r12,QWORD PTR [r14+0x50]
46b: 74 1b je 0x488
46d: 48 8d 0d 14 00 00 00 lea rcx,[rip+0x14] # 0x488
474: 49 89 8c 24 08 01 00 mov QWORD PTR [r12+0x108],rcx
47b: 00
47c: 48 c7 c0 01 00 00 00 mov rax,0x1
483: e9 5e 01 00 00 jmp 0x5e6
// GC_SYNC_POINT
488: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
48d: 74 10 je 0x49f
48f: 4c 89 f7 mov rdi,r14
492: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
499: 7f 00 00
49c: 41 ff d2 call r10
// unless_o (second part: if_i)
49f: 48 8b 83 b8 00 00 00 mov rax,QWORD PTR [rbx+0xb8]
4a6: 48 85 c0 test rax,rax
4a9: 0f 85 e4 00 00 00 jne 0x593
// shift_o local[8], local[3] (our hash iterator)
4af: 4d 89 f3 mov r11,r14
4b2: 4c 89 df mov rdi,r11
4b5: 4c 8b 5b 18 mov r11,QWORD PTR [rbx+0x18]
4b9: 4c 89 de mov rsi,r11
4bc: 49 ba 90 9d 58 f7 ff movabs r10,0x7ffff7589d90
4c3: 7f 00 00
4c6: 41 ff d2 call r10
4c9: 48 89 43 40 mov QWORD PTR [rbx+0x40],rax // note that this is actually
// our iterator object
// append_ins: <prepargs>
4cd: 4c 89 f7 mov rdi,r14
4d0: 4c 89 ee mov rsi,r13
4d3: 48 c7 c2 00 00 00 00 mov rdx,0x0
4da: 49 ba 00 82 4b f7 ff movabs r10,0x7ffff74b8200
4e1: 7f 00 00
4e4: 41 ff d2 call r10
4e7: 49 89 c3 mov r11,rax
//Invoke arg: <arg_o> args[0], local[8]
4ea: 4d 8b 54 24 18 mov r10,QWORD PTR [r12+0x18]
4ef: 4c 8b 4b 40 mov r9,QWORD PTR [rbx+0x40]
4f3: 4d 89 0a mov QWORD PTR [r10],r9
// Invoke instruction: <invoke_v>
4f6: 41 c7 84 24 b0 00 00 mov DWORD PTR [r12+0xb0],0x0 // return type
4fd: 00 00 00 00 00
502: 49 c7 84 24 a8 00 00 mov QWORD PTR [r12+0xa8],0x0 // return value
509: 00 00 00 00 00
// get cur_interp_op
50e: 49 8b 56 30 mov rdx,QWORD PTR [r14+0x30]
512: 48 8b 12 mov rdx,QWORD PTR [rdx]
515: 49 89 94 24 a0 00 00 mov QWORD PTR [r12+0xa0],rdx // return address
51c: 00
51d: 48 8d 15 53 00 00 00 lea rdx,[rip+0x53] # 0x577 // jit reantry label
524: 49 89 94 24 08 01 00 mov QWORD PTR [r12+0x108],rdx
52b: 00
52c: 4c 89 55 d8 mov QWORD PTR [rbp-0x28],r10 // args
530: 4c 89 5d d0 mov QWORD PTR [rbp-0x30],r11 // cur_callsite
534: 4c 89 f7 mov rdi,r14
537: 48 8b 73 38 mov rsi,QWORD PTR [rbx+0x38]
53b: 48 8d 55 d0 lea rdx,[rbp-0x30]
53f: 4c 89 d1 mov rcx,r10
542: 49 ba 60 8c 52 f7 ff movabs r10,0x7ffff7528c60
549: 7f 00 00
54c: 41 ff d2 call r10
54f: 4c 8b 5d d0 mov r11,QWORD PTR [rbp-0x30] // saved on stack frame
553: 4c 8b 55 d8 mov r10,QWORD PTR [rbp-0x28]
557: 4c 89 f7 mov rdi,r14
55a: 48 89 c6 mov rsi,rax
55d: 4c 89 da mov rdx,r11
560: 4c 89 d1 mov rcx,r10
563: 4c 8b 50 10 mov r10,QWORD PTR [rax+0x10]
567: 4d 8b 52 68 mov r10,QWORD PTR [r10+0x68]
56b: 41 ff d2 call r10 // invoke it!
56e: 48 c7 c0 01 00 00 00 mov rax,0x1
575: eb 6f jmp 0x5e6
// GC_SYNC_POINT
577: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
57c: 74 10 je 0x58e
57e: 4c 89 f7 mov rdi,r14
581: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
588: 7f 00 00
58b: 41 ff d2 call r10
// goto (repeat loop)
58e: e9 92 fe ff ff jmp 0x425
// null local[4]
593: 49 8b 8e 80 00 00 00 mov rcx,QWORD PTR [r14+0x80]
59a: 48 8b 49 60 mov rcx,QWORD PTR [rcx+0x60]
59e: 48 89 4b 20 mov QWORD PTR [rbx+0x20],rcx
// return_o local[4] (our VMNull thingy)
5a2: 4d 89 f3 mov r11,r14
5a5: 4c 89 df mov rdi,r11
5a8: 4c 8b 5b 20 mov r11,QWORD PTR [rbx+0x20]
5ac: 4c 89 de mov rsi,r11
5af: 49 c7 c3 00 00 00 00 mov r11,0x0
5b6: 4c 89 da mov rdx,r11
5b9: 49 ba 00 cc 4b f7 ff movabs r10,0x7ffff74bcc00
5c0: 7f 00 00
5c3: 41 ff d2 call r10
// GC_SYNC_POINT (we should remove this, all of this)
5c6: 49 83 7e 10 00 cmp QWORD PTR [r14+0x10],0x0
5cb: 74 10 je 0x5dd
5cd: 4c 89 f7 mov rdi,r14
5d0: 49 ba e0 f6 55 f7 ff movabs r10,0x7ffff755f6e0
5d7: 7f 00 00
5da: 41 ff d2 call r10
5dd: eb 00 jmp 0x5df
5df: 48 c7 c0 00 00 00 00 mov rax,0x0
// epilogue
5e6: 4c 8b 75 f8 mov r14,QWORD PTR [rbp-0x8]
5ea: 4c 8b 6d f0 mov r13,QWORD PTR [rbp-0x10]
5ee: 4c 8b 65 e8 mov r12,QWORD PTR [rbp-0x18]
5f2: 48 8b 5d e0 mov rbx,QWORD PTR [rbp-0x20]
5f6: 48 89 ec mov rsp,rbp
5f9: 5d pop rbp
5fa: c3 ret
token cclass_elem {
$<sign>=['+'|'-'|<?>]
<.normspace>?
[
| '[' $<charspec>=(
|| [ <!after '[' > \s* '-' <!before \s* ']'> ] <.obs: '- as character range','.. for range, for explicit - in character class, escape it or place it as the first or last thing'>
|| \s* ( '\\' <cclass_backslash> || (<-[\]\\]>) )
[
\s* '..' \s*
( '\\' <cclass_backslash> || (<-[\]\\]>) )
]**0..1
)*
{ # note that this is the only thing that is actually JIT compiled
my %seen;
for $<charspec> {
%seen{$_[0][0]} := (%seen{$_[0][0]} // 0) + 1 if nqp::defined($_[0][0]);
%seen{$_[1][0]} := (%seen{$_[1][0]} // 0) + 1 if nqp::defined($_[1][0]);
}
for %seen {
next if $_.value < 2;
self.worry("Repeated character (" ~ $_.key ~ ") unexpectedly found in character class");
}
}
\s* ']'
| $<name>=[\w+]
| ':' $<invert>=['!'|<?>] $<uniprop>=[\w+]
]
<.normspace>?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment