https://github.com/akkartik/mu/blob/main/124next-token.subx
1
2
3 == code
4
5
6
7
8
9
10 next-token-from-slice:
11
12 55/push-ebp
13 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
14
15 50/push-eax
16 51/push-ecx
17 52/push-edx
18 57/push-edi
19
20 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 .
21
22 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0x10/disp8 .
23
24 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 0x14/disp8 .
25
26
27 52/push-edx
28 51/push-ecx
29 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 .
30
31 e8/call skip-chars-matching-in-slice/disp32
32
33 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
34
35 89/copy 0/mod/indirect 7/rm32/edi . . . 0/r32/eax . .
36
37
38 52/push-edx
39 51/push-ecx
40 50/push-eax
41
42 e8/call skip-chars-not-matching-in-slice/disp32
43
44 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
45
46 89/copy 1/mod/*+disp8 7/rm32/edi . . . 0/r32/eax 4/disp8 .
47
48 5f/pop-to-edi
49 5a/pop-to-edx
50 59/pop-to-ecx
51 58/pop-to-eax
52
53 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
54 5d/pop-to-ebp
55 c3/return
56
57 test-next-token-from-slice:
58
59 55/push-ebp
60 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
61
62 b8/copy-to-eax " ab"/imm32
63 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
64 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
65 05/add-to-eax 4/imm32
66
67 68/push 0/imm32/end
68 68/push 0/imm32/start
69 89/copy 3/mod/direct 7/rm32/edi . . . 4/r32/esp . .
70
71
72 57/push-edi
73 68/push 0x20/imm32
74 51/push-ecx
75 50/push-eax
76
77 e8/call next-token-from-slice/disp32
78
79 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
80
81
82
83 68/push "F - test-next-token-from-slice: start"/imm32
84 68/push 2/imm32
85
86 8b/copy 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . .
87 2b/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
88 51/push-ecx
89
90 e8/call check-ints-equal/disp32
91
92 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
93
94
95
96 68/push "F - test-next-token-from-slice: end"/imm32
97 68/push 4/imm32
98
99 8b/copy 1/mod/*+disp8 7/rm32/edi . . . 1/r32/ecx 4/disp8 .
100 2b/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
101 51/push-ecx
102
103 e8/call check-ints-equal/disp32
104
105 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
106
107 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
108 5d/pop-to-ebp
109 c3/return
110
111 test-next-token-from-slice-Eof:
112
113 55/push-ebp
114 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
115
116 68/push 0/imm32/end
117 68/push 0/imm32/start
118 89/copy 3/mod/direct 7/rm32/edi . . . 4/r32/esp . .
119
120
121 57/push-edi
122 68/push 0x20/imm32
123 68/push 0/imm32
124 68/push 0/imm32
125
126 e8/call next-token-from-slice/disp32
127
128 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
129
130
131
132 68/push "F - test-next-token-from-slice-Eof"/imm32
133 68/push 0/imm32
134
135 8b/copy 1/mod/*+disp8 7/rm32/edi . . . 1/r32/ecx 4/disp8 .
136 2b/subtract 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . .
137 51/push-ecx
138
139 e8/call check-ints-equal/disp32
140
141 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
142
143 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
144 5d/pop-to-ebp
145 c3/return
146
147 test-next-token-from-slice-nothing:
148
149 55/push-ebp
150 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
151
152 b8/copy-to-eax " "/imm32
153 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
154 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
155 05/add-to-eax 4/imm32
156
157 68/push 0/imm32/end
158 68/push 0/imm32/start
159 89/copy 3/mod/direct 7/rm32/edi . . . 4/r32/esp . .
160
161
162 57/push-edi
163 68/push 0x20/imm32
164 51/push-ecx
165 50/push-eax
166
167 e8/call next-token-from-slice/disp32
168
169 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
170
171
172
173 68/push "F - test-next-token-from-slice-Eof"/imm32
174 68/push 0/imm32
175
176 8b/copy 1/mod/*+disp8 7/rm32/edi . . . 1/r32/ecx 4/disp8 .
177 2b/subtract 0/mod/indirect 7/rm32/edi . . . 1/r32/ecx . .
178 51/push-ecx
179
180 e8/call check-ints-equal/disp32
181
182 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
183
184 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
185 5d/pop-to-ebp
186 c3/return
187
188 skip-chars-matching:
189
190 55/push-ebp
191 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
192
193 50/push-eax
194 51/push-ecx
195 52/push-edx
196 53/push-ebx
197 56/push-esi
198
199 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
200
201 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
202
203 8b/copy 0/mod/indirect 6/rm32/esi . . . 3/r32/ebx . .
204
205 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0xc/disp8 .
206 $skip-chars-matching:loop:
207
208 39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . .
209 7d/jump-if->= $skip-chars-matching:end/disp8
210
211 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
212 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 .
213
214 39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
215 75/jump-if-!= $skip-chars-matching:end/disp8
216
217 41/increment-ecx
218 eb/jump $skip-chars-matching:loop/disp8
219 $skip-chars-matching:end:
220
221 89/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
222
223 5e/pop-to-esi
224 5b/pop-to-ebx
225 5a/pop-to-edx
226 59/pop-to-ecx
227 58/pop-to-eax
228
229 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
230 5d/pop-to-ebp
231 c3/return
232
233 test-skip-chars-matching:
234
235
236
237 68/push _test-stream/imm32
238
239 e8/call clear-stream/disp32
240
241 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
242
243
244 68/push " ab"/imm32
245 68/push _test-stream/imm32
246
247 e8/call write/disp32
248
249 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
250
251
252 68/push 0x20/imm32
253 68/push _test-stream/imm32
254
255 e8/call skip-chars-matching/disp32
256
257 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
258
259
260 68/push "F - test-skip-chars-matching"/imm32
261 68/push 2/imm32
262
263 b8/copy-to-eax _test-stream/imm32
264 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
265
266 e8/call check-ints-equal/disp32
267
268 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
269
270 c3/return
271
272 test-skip-chars-matching-none:
273
274
275
276 68/push _test-stream/imm32
277
278 e8/call clear-stream/disp32
279
280 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
281
282
283 68/push "ab"/imm32
284 68/push _test-stream/imm32
285
286 e8/call write/disp32
287
288 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
289
290
291 68/push 0x20/imm32
292 68/push _test-stream/imm32
293
294 e8/call skip-chars-matching/disp32
295
296 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
297
298
299 68/push "F - test-skip-chars-matching-none"/imm32
300 68/push 0/imm32
301
302 b8/copy-to-eax _test-stream/imm32
303 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
304
305 e8/call check-ints-equal/disp32
306
307 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
308
309 c3/return
310
311 skip-chars-matching-whitespace:
312
313 55/push-ebp
314 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
315
316 50/push-eax
317 51/push-ecx
318 53/push-ebx
319 56/push-esi
320
321 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
322
323 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
324
325 8b/copy 0/mod/indirect 6/rm32/esi . . . 3/r32/ebx . .
326 $skip-chars-matching-whitespace:loop:
327
328 39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . .
329 7d/jump-if->= $skip-chars-matching-whitespace:end/disp8
330
331 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
332 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 .
333
334 3d/compare-eax-and 0x20/imm32/space
335 74/jump-if-= $skip-chars-matching-whitespace:body/disp8
336
337 3d/compare-eax-and 0x0a/imm32/newline
338 74/jump-if-= $skip-chars-matching-whitespace:body/disp8
339
340 3d/compare-eax-and 0x09/imm32/tab
341 74/jump-if-= $skip-chars-matching-whitespace:body/disp8
342
343 3d/compare-eax-and 0x0d/imm32/cr
344 75/jump-if-!= $skip-chars-matching-whitespace:end/disp8
345 $skip-chars-matching-whitespace:body:
346
347 41/increment-ecx
348 eb/jump $skip-chars-matching-whitespace:loop/disp8
349 $skip-chars-matching-whitespace:end:
350
351 89/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
352
353 5e/pop-to-esi
354 5b/pop-to-ebx
355 59/pop-to-ecx
356 58/pop-to-eax
357
358 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
359 5d/pop-to-ebp
360 c3/return
361
362 test-skip-chars-matching-whitespace:
363
364
365
366 68/push _test-stream/imm32
367
368 e8/call clear-stream/disp32
369
370 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
371
372
373 68/push " \nab"/imm32
374 68/push _test-stream/imm32
375
376 e8/call write/disp32
377
378 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
379
380
381 68/push _test-stream/imm32
382
383 e8/call skip-chars-matching-whitespace/disp32
384
385 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
386
387
388 68/push "F - test-skip-chars-matching-whitespace"/imm32
389 68/push 2/imm32
390
391 b8/copy-to-eax _test-stream/imm32
392 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
393
394 e8/call check-ints-equal/disp32
395
396 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
397
398 c3/return
399
400
401 skip-chars-not-matching:
402
403 55/push-ebp
404 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
405
406 50/push-eax
407 51/push-ecx
408 52/push-edx
409 53/push-ebx
410 56/push-esi
411
412 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
413
414 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
415
416 8b/copy 0/mod/indirect 6/rm32/esi . . . 3/r32/ebx . .
417
418 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0xc/disp8 .
419 $skip-chars-not-matching:loop:
420
421 39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . .
422 7d/jump-if->= $skip-chars-not-matching:end/disp8
423
424 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
425 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 .
426
427 39/compare 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
428 74/jump-if-= $skip-chars-not-matching:end/disp8
429
430 41/increment-ecx
431 eb/jump $skip-chars-not-matching:loop/disp8
432 $skip-chars-not-matching:end:
433
434 89/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
435
436 5e/pop-to-esi
437 5b/pop-to-ebx
438 5a/pop-to-edx
439 59/pop-to-ecx
440 58/pop-to-eax
441
442 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
443 5d/pop-to-ebp
444 c3/return
445
446 test-skip-chars-not-matching:
447
448
449
450 68/push _test-stream/imm32
451
452 e8/call clear-stream/disp32
453
454 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
455
456
457 68/push "ab "/imm32
458 68/push _test-stream/imm32
459
460 e8/call write/disp32
461
462 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
463
464
465 68/push 0x20/imm32
466 68/push _test-stream/imm32
467
468 e8/call skip-chars-not-matching/disp32
469
470 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
471
472
473 68/push "F - test-skip-chars-not-matching"/imm32
474 68/push 2/imm32
475
476 b8/copy-to-eax _test-stream/imm32
477 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
478
479 e8/call check-ints-equal/disp32
480
481 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
482
483 c3/return
484
485 test-skip-chars-not-matching-none:
486
487
488
489 68/push _test-stream/imm32
490
491 e8/call clear-stream/disp32
492
493 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
494
495
496 68/push " ab"/imm32
497 68/push _test-stream/imm32
498
499 e8/call write/disp32
500
501 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
502
503
504 68/push 0x20/imm32
505 68/push _test-stream/imm32
506
507 e8/call skip-chars-not-matching/disp32
508
509 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
510
511
512 68/push "F - test-skip-chars-not-matching-none"/imm32
513 68/push 0/imm32
514
515 b8/copy-to-eax _test-stream/imm32
516 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
517
518 e8/call check-ints-equal/disp32
519
520 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
521
522 c3/return
523
524 test-skip-chars-not-matching-all:
525
526
527
528 68/push _test-stream/imm32
529
530 e8/call clear-stream/disp32
531
532 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
533
534
535 68/push "ab"/imm32
536 68/push _test-stream/imm32
537
538 e8/call write/disp32
539
540 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
541
542
543 68/push 0x20/imm32
544 68/push _test-stream/imm32
545
546 e8/call skip-chars-not-matching/disp32
547
548 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
549
550
551 68/push "F - test-skip-chars-not-matching-all"/imm32
552 68/push 2/imm32
553
554 b8/copy-to-eax _test-stream/imm32
555 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
556
557 e8/call check-ints-equal/disp32
558
559 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
560
561 c3/return
562
563 skip-chars-not-matching-whitespace:
564
565 55/push-ebp
566 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
567
568 50/push-eax
569 51/push-ecx
570 53/push-ebx
571 56/push-esi
572
573 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
574
575 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
576
577 8b/copy 0/mod/indirect 6/rm32/esi . . . 3/r32/ebx . .
578 $skip-chars-not-matching-whitespace:loop:
579
580 39/compare 3/mod/direct 1/rm32/ecx . . . 3/r32/ebx . .
581 7d/jump-if->= $skip-chars-not-matching-whitespace:end/disp8
582
583 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
584 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/esi 1/index/ecx . 0/r32/AL 0xc/disp8 .
585
586 3d/compare-eax-and 0x20/imm32/space
587 74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
588
589 3d/compare-eax-and 0x0a/imm32/newline
590 74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
591
592 3d/compare-eax-and 0x09/imm32/tab
593 74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
594
595 3d/compare-eax-and 0x0d/imm32/cr
596 74/jump-if-= $skip-chars-not-matching-whitespace:end/disp8
597
598 41/increment-ecx
599 eb/jump $skip-chars-not-matching-whitespace:loop/disp8
600 $skip-chars-not-matching-whitespace:end:
601
602 89/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 .
603
604 5e/pop-to-esi
605 5b/pop-to-ebx
606 59/pop-to-ecx
607 58/pop-to-eax
608
609 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
610 5d/pop-to-ebp
611 c3/return
612
613 test-skip-chars-not-matching-whitespace:
614
615
616
617 68/push _test-stream/imm32
618
619 e8/call clear-stream/disp32
620
621 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
622
623
624 68/push "ab\n"/imm32
625 68/push _test-stream/imm32
626
627 e8/call write/disp32
628
629 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
630
631
632 68/push _test-stream/imm32
633
634 e8/call skip-chars-not-matching-whitespace/disp32
635
636 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
637
638
639 68/push "F - test-skip-chars-not-matching-whitespace"/imm32
640 68/push 2/imm32
641
642 b8/copy-to-eax _test-stream/imm32
643 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
644
645 e8/call check-ints-equal/disp32
646
647 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
648
649 c3/return
650
651 skip-chars-matching-in-slice:
652
653 55/push-ebp
654 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
655
656 51/push-ecx
657 52/push-edx
658 53/push-ebx
659
660 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 .
661
662 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 .
663
664 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0x10/disp8 .
665
666 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . .
667 $skip-chars-matching-in-slice:loop:
668
669 39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
670 73/jump-if-addr>= $skip-chars-matching-in-slice:end/disp8
671
672 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 3/r32/BL . .
673
674 39/compare 3/mod/direct 3/rm32/ebx . . . 2/r32/edx . .
675 75/jump-if-!= $skip-chars-matching-in-slice:end/disp8
676
677 40/increment-eax
678 eb/jump $skip-chars-matching-in-slice:loop/disp8
679 $skip-chars-matching-in-slice:end:
680
681 5b/pop-to-ebx
682 5a/pop-to-edx
683 59/pop-to-ecx
684
685 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
686 5d/pop-to-ebp
687 c3/return
688
689 test-skip-chars-matching-in-slice:
690
691 b8/copy-to-eax " ab"/imm32
692 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
693 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
694 05/add-to-eax 4/imm32
695
696
697 68/push 0x20/imm32/space
698 51/push-ecx
699 50/push-eax
700
701 e8/call skip-chars-matching-in-slice/disp32
702
703 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
704
705
706 68/push "F - test-skip-chars-matching-in-slice"/imm32
707 68/push 2/imm32
708
709 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
710 51/push-ecx
711
712 e8/call check-ints-equal/disp32
713
714 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
715
716 c3/return
717
718 test-skip-chars-matching-in-slice-none:
719
720 b8/copy-to-eax "ab"/imm32
721 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
722 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
723 05/add-to-eax 4/imm32
724
725
726 68/push 0x20/imm32/space
727 51/push-ecx
728 50/push-eax
729
730 e8/call skip-chars-matching-in-slice/disp32
731
732 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
733
734
735 68/push "F - test-skip-chars-matching-in-slice-none"/imm32
736 68/push 2/imm32
737
738 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
739 51/push-ecx
740
741 e8/call check-ints-equal/disp32
742
743 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
744
745 c3/return
746
747 skip-chars-matching-whitespace-in-slice:
748
749 55/push-ebp
750 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
751
752 51/push-ecx
753 53/push-ebx
754
755 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 .
756
757 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 .
758
759 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . .
760 $skip-chars-matching-whitespace-in-slice:loop:
761
762 39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
763 0f 83/jump-if-addr>= $skip-chars-matching-in-slice:end/disp32
764
765 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 3/r32/BL . .
766
767 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x20/imm32/space
768 74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
769
770 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x0a/imm32/newline
771 74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
772
773 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x09/imm32/tab
774 74/jump-if-= $skip-chars-matching-whitespace-in-slice:body/disp8
775
776 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x0d/imm32/cr
777 75/jump-if-!= $skip-chars-matching-whitespace-in-slice:end/disp8
778 $skip-chars-matching-whitespace-in-slice:body:
779
780 40/increment-eax
781 eb/jump $skip-chars-matching-whitespace-in-slice:loop/disp8
782 $skip-chars-matching-whitespace-in-slice:end:
783
784 5b/pop-to-ebx
785 59/pop-to-ecx
786
787 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
788 5d/pop-to-ebp
789 c3/return
790
791 test-skip-chars-matching-whitespace-in-slice:
792
793 b8/copy-to-eax " \nab"/imm32
794 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
795 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
796 05/add-to-eax 4/imm32
797
798
799 51/push-ecx
800 50/push-eax
801
802 e8/call skip-chars-matching-whitespace-in-slice/disp32
803
804 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
805
806
807 68/push "F - test-skip-chars-matching-whitespace-in-slice"/imm32
808 68/push 2/imm32
809
810 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
811 51/push-ecx
812
813 e8/call check-ints-equal/disp32
814
815 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
816
817 c3/return
818
819
820 skip-chars-not-matching-in-slice:
821
822 55/push-ebp
823 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
824
825 51/push-ecx
826 52/push-edx
827 53/push-ebx
828
829 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 .
830
831 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 .
832
833 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 2/r32/edx 0x10/disp8 .
834
835 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . .
836 $skip-chars-not-matching-in-slice:loop:
837
838 39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
839 73/jump-if-addr>= $skip-chars-not-matching-in-slice:end/disp8
840
841 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 3/r32/BL . .
842
843 39/compare 3/mod/direct 3/rm32/ebx . . . 2/r32/edx . .
844 74/jump-if-= $skip-chars-not-matching-in-slice:end/disp8
845
846 40/increment-eax
847 eb/jump $skip-chars-not-matching-in-slice:loop/disp8
848 $skip-chars-not-matching-in-slice:end:
849
850 5b/pop-to-ebx
851 5a/pop-to-edx
852 59/pop-to-ecx
853
854 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
855 5d/pop-to-ebp
856 c3/return
857
858 test-skip-chars-not-matching-in-slice:
859
860 b8/copy-to-eax "ab "/imm32
861 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
862 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
863 05/add-to-eax 4/imm32
864
865
866 68/push 0x20/imm32/space
867 51/push-ecx
868 50/push-eax
869
870 e8/call skip-chars-not-matching-in-slice/disp32
871
872 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
873
874
875 68/push "F - test-skip-chars-not-matching-in-slice"/imm32
876 68/push 1/imm32
877
878 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
879 51/push-ecx
880
881 e8/call check-ints-equal/disp32
882
883 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
884
885 c3/return
886
887 test-skip-chars-not-matching-in-slice-none:
888
889 b8/copy-to-eax " ab"/imm32
890 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
891 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
892 05/add-to-eax 4/imm32
893
894
895 68/push 0x20/imm32/space
896 51/push-ecx
897 50/push-eax
898
899 e8/call skip-chars-not-matching-in-slice/disp32
900
901 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
902
903
904 68/push "F - test-skip-chars-not-matching-in-slice-none"/imm32
905 68/push 3/imm32
906
907 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
908 51/push-ecx
909
910 e8/call check-ints-equal/disp32
911
912 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
913
914 c3/return
915
916 test-skip-chars-not-matching-in-slice-all:
917
918 b8/copy-to-eax "ab"/imm32
919 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
920 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
921 05/add-to-eax 4/imm32
922
923
924 68/push 0x20/imm32/space
925 51/push-ecx
926 50/push-eax
927
928 e8/call skip-chars-not-matching-in-slice/disp32
929
930 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
931
932
933 68/push "F - test-skip-chars-not-matching-in-slice-all"/imm32
934 68/push 0/imm32
935
936 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
937 51/push-ecx
938
939 e8/call check-ints-equal/disp32
940
941 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
942
943 c3/return
944
945 skip-chars-not-matching-whitespace-in-slice:
946
947 55/push-ebp
948 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
949
950 51/push-ecx
951 53/push-ebx
952
953 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 8/disp8 .
954
955 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0xc/disp8 .
956
957 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . .
958 $skip-chars-not-matching-whitespace-in-slice:loop:
959
960 39/compare 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
961 0f 83/jump-if-addr>= $skip-chars-not-matching-in-slice:end/disp32
962
963 8a/copy-byte 0/mod/indirect 0/rm32/eax . . . 3/r32/BL . .
964
965 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x20/imm32/space
966 74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
967
968 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x0a/imm32/newline
969 74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
970
971 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x09/imm32/tab
972 74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
973
974 81 7/subop/compare 3/mod/direct 3/rm32/ebx . . . . . 0x0d/imm32/cr
975 74/jump-if-= $skip-chars-not-matching-whitespace-in-slice:end/disp8
976
977 40/increment-eax
978 eb/jump $skip-chars-not-matching-whitespace-in-slice:loop/disp8
979 $skip-chars-not-matching-whitespace-in-slice:end:
980
981 5b/pop-to-ebx
982 59/pop-to-ecx
983
984 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
985 5d/pop-to-ebp
986 c3/return
987
988 test-skip-chars-not-matching-whitespace-in-slice:
989
990 b8/copy-to-eax "ab\n"/imm32
991 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
992 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
993 05/add-to-eax 4/imm32
994
995
996 51/push-ecx
997 50/push-eax
998
999 e8/call skip-chars-not-matching-whitespace-in-slice/disp32
1000
1001 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1002
1003
1004 68/push "F - test-skip-chars-not-matching-whitespace-in-slice"/imm32
1005 68/push 1/imm32
1006
1007 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
1008 51/push-ecx
1009
1010 e8/call check-ints-equal/disp32
1011
1012 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1013
1014 c3/return
1015
1016
1017
1018 skip-string:
1019
1020 55/push-ebp
1021 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1022
1023 50/push-eax
1024 51/push-ecx
1025 52/push-edx
1026
1027 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 8/disp8 .
1028
1029
1030 8b/copy 1/mod/*+disp8 1/rm32/ecx . . 2/r32/edx 8/disp8 .
1031 8d/copy-address 1/mod/*+disp8 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx 0xc/disp8 .
1032 52/push-edx
1033
1034 8b/copy 1/mod/*+disp8 1/rm32/ecx . . 2/r32/edx 4/disp8 .
1035 8d/copy-address 1/mod/*+disp8 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx 0xc/disp8 .
1036 52/push-edx
1037
1038 e8/call skip-string-in-slice/disp32
1039
1040 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1041
1042 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1043 2d/subtract-from-eax 0xc/imm32
1044 89/copy 1/mod/*+disp8 1/rm32/ecx . . 0/r32/eax 4/disp8 .
1045 $skip-string:end:
1046
1047 5a/pop-to-edx
1048 59/pop-to-ecx
1049 58/pop-to-eax
1050
1051 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1052 5d/pop-to-ebp
1053 c3/return
1054
1055 test-skip-string:
1056
1057 55/push-ebp
1058 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1059
1060
1061
1062 68/push _test-stream/imm32
1063
1064 e8/call clear-stream/disp32
1065
1066 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1067
1068
1069
1070 68/push "\"abc\" def"/imm32
1071 68/push _test-stream/imm32
1072
1073 e8/call write/disp32
1074
1075 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1076
1077
1078 68/push "F - test-skip-string/precondition"/imm32
1079 68/push 0/imm32
1080 b8/copy-to-eax _test-stream/imm32
1081 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1082
1083 e8/call check-ints-equal/disp32
1084
1085 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1086
1087
1088 68/push _test-stream/imm32
1089
1090 e8/call skip-string/disp32
1091
1092 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1093
1094
1095 68/push "F - test-skip-string"/imm32
1096 68/push 5/imm32
1097 b8/copy-to-eax _test-stream/imm32
1098 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1099
1100 e8/call check-ints-equal/disp32
1101
1102 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1103
1104 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1105 5d/pop-to-ebp
1106 c3/return
1107
1108 test-skip-string-ignores-spaces:
1109
1110 55/push-ebp
1111 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1112
1113
1114
1115 68/push _test-stream/imm32
1116
1117 e8/call clear-stream/disp32
1118
1119 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1120
1121
1122
1123 68/push "\"a b\"/yz"/imm32
1124 68/push _test-stream/imm32
1125
1126 e8/call write/disp32
1127
1128 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1129
1130
1131 68/push "F - test-skip-string-ignores-spaces/precondition"/imm32
1132 68/push 0/imm32
1133 b8/copy-to-eax _test-stream/imm32
1134 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1135
1136 e8/call check-ints-equal/disp32
1137
1138 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1139
1140
1141 68/push _test-stream/imm32
1142
1143 e8/call skip-string/disp32
1144
1145 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1146
1147
1148 68/push "F - test-skip-string-ignores-spaces"/imm32
1149 68/push 5/imm32
1150 b8/copy-to-eax _test-stream/imm32
1151 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1152
1153 e8/call check-ints-equal/disp32
1154
1155 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1156
1157 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1158 5d/pop-to-ebp
1159 c3/return
1160
1161 test-skip-string-ignores-escapes:
1162
1163 55/push-ebp
1164 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1165
1166
1167
1168 68/push _test-stream/imm32
1169
1170 e8/call clear-stream/disp32
1171
1172 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1173
1174
1175
1176 68/push "\"a\\\"b\"/yz"/imm32
1177 68/push _test-stream/imm32
1178
1179 e8/call write/disp32
1180
1181 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1182
1183
1184 68/push "F - test-skip-string-ignores-escapes/precondition"/imm32
1185 68/push 0/imm32
1186 b8/copy-to-eax _test-stream/imm32
1187 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1188
1189 e8/call check-ints-equal/disp32
1190
1191 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1192
1193
1194 68/push _test-stream/imm32
1195
1196 e8/call skip-string/disp32
1197
1198 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1199
1200
1201 68/push "F - test-skip-string-ignores-escapes"/imm32
1202 68/push 6/imm32
1203 b8/copy-to-eax _test-stream/imm32
1204 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1205
1206 e8/call check-ints-equal/disp32
1207
1208 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1209
1210 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1211 5d/pop-to-ebp
1212 c3/return
1213
1214 test-skip-string-works-from-mid-stream:
1215
1216 55/push-ebp
1217 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1218
1219
1220
1221 68/push _test-stream/imm32
1222
1223 e8/call clear-stream/disp32
1224
1225 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1226
1227
1228
1229 68/push "0 \"a\\\"b\"/yz"/imm32
1230 68/push _test-stream/imm32
1231
1232 e8/call write/disp32
1233
1234 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1235
1236 b8/copy-to-eax _test-stream/imm32
1237 c7 0/subop/copy 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 2/imm32
1238
1239
1240 68/push _test-stream/imm32
1241
1242 e8/call skip-string/disp32
1243
1244 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1245
1246
1247 68/push "F - test-skip-string-works-from-mid-stream"/imm32
1248 68/push 8/imm32
1249 b8/copy-to-eax _test-stream/imm32
1250 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1251
1252 e8/call check-ints-equal/disp32
1253
1254 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1255
1256 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1257 5d/pop-to-ebp
1258 c3/return
1259
1260 skip-string-in-slice:
1261
1262 55/push-ebp
1263 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1264
1265 51/push-ecx
1266 52/push-edx
1267 53/push-ebx
1268
1269 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 8/disp8 .
1270
1271 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 2/r32/edx 0xc/disp8 .
1272
1273 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
1274
1275 41/increment-ecx
1276 $skip-string-in-slice:loop:
1277
1278 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1279 73/jump-if-addr>= $skip-string-in-slice:return-curr/disp8
1280
1281 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
1282 $skip-string-in-slice:dquote:
1283
1284 3d/compare-eax-and 0x22/imm32/double-quote
1285 74/jump-if-= $skip-string-in-slice:break/disp8
1286 $skip-string-in-slice:check-for-escape:
1287
1288 3d/compare-eax-and 0x5c/imm32/backslash
1289 75/jump-if-!= $skip-string-in-slice:continue/disp8
1290 $skip-string-in-slice:escape:
1291 41/increment-ecx
1292 $skip-string-in-slice:continue:
1293
1294 41/increment-ecx
1295 eb/jump $skip-string-in-slice:loop/disp8
1296 $skip-string-in-slice:break:
1297
1298 41/increment-ecx
1299 $skip-string-in-slice:return-curr:
1300
1301 89/copy 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1302 $skip-string-in-slice:end:
1303
1304 5b/pop-to-ebx
1305 5a/pop-to-edx
1306 59/pop-to-ecx
1307
1308 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1309 5d/pop-to-ebp
1310 c3/return
1311
1312 test-skip-string-in-slice:
1313
1314 55/push-ebp
1315 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1316
1317 b8/copy-to-eax "\"abc\" def"/imm32
1318 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1319 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1320 05/add-to-eax 4/imm32
1321
1322
1323 51/push-ecx
1324 50/push-eax
1325
1326 e8/call skip-string-in-slice/disp32
1327
1328 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1329
1330
1331 68/push "F - test-skip-string-in-slice"/imm32
1332 68/push 4/imm32
1333
1334 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
1335 51/push-ecx
1336
1337 e8/call check-ints-equal/disp32
1338
1339 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1340
1341 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1342 5d/pop-to-ebp
1343 c3/return
1344
1345 test-skip-string-in-slice-ignores-spaces:
1346
1347 55/push-ebp
1348 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1349
1350 b8/copy-to-eax "\"a b\"/yz"/imm32
1351 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1352 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1353 05/add-to-eax 4/imm32
1354
1355
1356 51/push-ecx
1357 50/push-eax
1358
1359 e8/call skip-string-in-slice/disp32
1360
1361 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1362
1363
1364 68/push "F - test-skip-string-in-slice-ignores-spaces"/imm32
1365 68/push 3/imm32
1366
1367 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
1368 51/push-ecx
1369
1370 e8/call check-ints-equal/disp32
1371
1372 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1373
1374 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1375 5d/pop-to-ebp
1376 c3/return
1377
1378 test-skip-string-in-slice-ignores-escapes:
1379
1380 55/push-ebp
1381 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1382
1383 b8/copy-to-eax "\"a\\\"b\"/yz"/imm32
1384 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1385 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1386 05/add-to-eax 4/imm32
1387
1388
1389 51/push-ecx
1390 50/push-eax
1391
1392 e8/call skip-string-in-slice/disp32
1393
1394 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1395
1396
1397 68/push "F - test-skip-string-in-slice-ignores-escapes"/imm32
1398 68/push 3/imm32
1399
1400 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
1401 51/push-ecx
1402
1403 e8/call check-ints-equal/disp32
1404
1405 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1406
1407 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1408 5d/pop-to-ebp
1409 c3/return
1410
1411 test-skip-string-in-slice-stops-at-end:
1412
1413 55/push-ebp
1414 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1415
1416 b8/copy-to-eax "\"abc"/imm32
1417 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1418 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1419 05/add-to-eax 4/imm32
1420
1421
1422 51/push-ecx
1423 50/push-eax
1424
1425 e8/call skip-string-in-slice/disp32
1426
1427 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1428
1429
1430 68/push "F - test-skip-string-in-slice-stops-at-end"/imm32
1431 68/push 0/imm32
1432
1433 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
1434 51/push-ecx
1435
1436 e8/call check-ints-equal/disp32
1437
1438 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1439
1440 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1441 5d/pop-to-ebp
1442 c3/return
1443
1444
1445
1446 skip-until-close-paren:
1447
1448 55/push-ebp
1449 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1450
1451 50/push-eax
1452 51/push-ecx
1453 52/push-edx
1454
1455 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 8/disp8 .
1456
1457
1458 8b/copy 1/mod/*+disp8 1/rm32/ecx . . 2/r32/edx 8/disp8 .
1459 8d/copy-address 1/mod/*+disp8 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx 0xc/disp8 .
1460 52/push-edx
1461
1462 8b/copy 1/mod/*+disp8 1/rm32/ecx . . 2/r32/edx 4/disp8 .
1463 8d/copy-address 1/mod/*+disp8 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx 0xc/disp8 .
1464 52/push-edx
1465
1466 e8/call skip-until-close-paren-in-slice/disp32
1467
1468 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1469
1470 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1471 2d/subtract-from-eax 0xc/imm32
1472 89/copy 1/mod/*+disp8 1/rm32/ecx . . 0/r32/eax 4/disp8 .
1473 $skip-until-close-paren:end:
1474
1475 5a/pop-to-edx
1476 59/pop-to-ecx
1477 58/pop-to-eax
1478
1479 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1480 5d/pop-to-ebp
1481 c3/return
1482
1483 test-skip-until-close-paren:
1484
1485 55/push-ebp
1486 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1487
1488
1489
1490 68/push _test-stream/imm32
1491
1492 e8/call clear-stream/disp32
1493
1494 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1495
1496
1497
1498 68/push "*(abc) def"/imm32
1499 68/push _test-stream/imm32
1500
1501 e8/call write/disp32
1502
1503 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1504
1505
1506 68/push "F - test-skip-until-close-paren/precondition"/imm32
1507 68/push 0/imm32
1508 b8/copy-to-eax _test-stream/imm32
1509 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1510
1511 e8/call check-ints-equal/disp32
1512
1513 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1514
1515
1516 68/push _test-stream/imm32
1517
1518 e8/call skip-until-close-paren/disp32
1519
1520 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1521
1522
1523 68/push "F - test-skip-until-close-paren"/imm32
1524 68/push 5/imm32
1525 b8/copy-to-eax _test-stream/imm32
1526 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1527
1528 e8/call check-ints-equal/disp32
1529
1530 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1531
1532 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1533 5d/pop-to-ebp
1534 c3/return
1535
1536 test-skip-until-close-paren-ignores-spaces:
1537
1538 55/push-ebp
1539 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1540
1541
1542
1543 68/push _test-stream/imm32
1544
1545 e8/call clear-stream/disp32
1546
1547 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1548
1549
1550 68/push "*(a b)/yz"/imm32
1551 68/push _test-stream/imm32
1552
1553 e8/call write/disp32
1554
1555 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1556
1557
1558 68/push "F - test-skip-until-close-paren-ignores-spaces/precondition"/imm32
1559 68/push 0/imm32
1560 b8/copy-to-eax _test-stream/imm32
1561 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1562
1563 e8/call check-ints-equal/disp32
1564
1565 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1566
1567
1568 68/push _test-stream/imm32
1569
1570 e8/call skip-until-close-paren/disp32
1571
1572 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1573
1574
1575 68/push "F - test-skip-until-close-paren-ignores-spaces"/imm32
1576 68/push 5/imm32
1577 b8/copy-to-eax _test-stream/imm32
1578 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1579
1580 e8/call check-ints-equal/disp32
1581
1582 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1583
1584 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1585 5d/pop-to-ebp
1586 c3/return
1587
1588 test-skip-until-close-paren-works-from-mid-stream:
1589
1590 55/push-ebp
1591 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1592
1593
1594
1595 68/push _test-stream/imm32
1596
1597 e8/call clear-stream/disp32
1598
1599 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1600
1601
1602 68/push "0 *(a b)/yz"/imm32
1603 68/push _test-stream/imm32
1604
1605 e8/call write/disp32
1606
1607 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1608
1609 b8/copy-to-eax _test-stream/imm32
1610 c7 0/subop/copy 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 2/imm32
1611
1612
1613 68/push _test-stream/imm32
1614
1615 e8/call skip-until-close-paren/disp32
1616
1617 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1618
1619
1620 68/push "F - test-skip-until-close-paren-works-from-mid-stream"/imm32
1621 68/push 7/imm32
1622 b8/copy-to-eax _test-stream/imm32
1623 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 .
1624
1625 e8/call check-ints-equal/disp32
1626
1627 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1628
1629 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1630 5d/pop-to-ebp
1631 c3/return
1632
1633 skip-until-close-paren-in-slice:
1634
1635 55/push-ebp
1636 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1637
1638 51/push-ecx
1639 52/push-edx
1640
1641 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 1/r32/ecx 8/disp8 .
1642
1643 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 2/r32/edx 0xc/disp8 .
1644
1645 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
1646
1647 41/increment-ecx
1648 $skip-until-close-paren-in-slice:loop:
1649
1650 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1651 73/jump-if-addr>= $skip-until-close-paren-in-slice:break/disp8
1652
1653 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . .
1654 $skip-until-close-paren-in-slice:check-close:
1655
1656 3d/compare-eax-and 0x29/imm32/close-paren
1657 74/jump-if-= $skip-until-close-paren-in-slice:break/disp8
1658
1659 41/increment-ecx
1660 eb/jump $skip-until-close-paren-in-slice:loop/disp8
1661 $skip-until-close-paren-in-slice:break:
1662
1663 89/copy 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1664 $skip-until-close-paren-in-slice:end:
1665
1666 5a/pop-to-edx
1667 59/pop-to-ecx
1668
1669 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1670 5d/pop-to-ebp
1671 c3/return
1672
1673 test-skip-until-close-paren-in-slice:
1674
1675 55/push-ebp
1676 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1677
1678 b8/copy-to-eax "*(abc) def"/imm32
1679 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1680 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1681 05/add-to-eax 4/imm32
1682
1683
1684 51/push-ecx
1685 50/push-eax
1686
1687 e8/call skip-until-close-paren-in-slice/disp32
1688
1689 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1690
1691
1692 68/push "F - test-skip-until-close-paren-in-slice"/imm32
1693 68/push 5/imm32
1694
1695 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
1696 51/push-ecx
1697
1698 e8/call check-ints-equal/disp32
1699
1700 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1701
1702 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1703 5d/pop-to-ebp
1704 c3/return
1705
1706 test-skip-until-close-paren-in-slice-ignores-spaces:
1707
1708 55/push-ebp
1709 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1710
1711 b8/copy-to-eax "*(a b)/yz"/imm32
1712 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1713 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1714 05/add-to-eax 4/imm32
1715
1716
1717 51/push-ecx
1718 50/push-eax
1719
1720 e8/call skip-until-close-paren-in-slice/disp32
1721
1722 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1723
1724
1725 68/push "F - test-skip-until-close-paren-in-slice-ignores-spaces"/imm32
1726 68/push 4/imm32
1727
1728 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
1729 51/push-ecx
1730
1731 e8/call check-ints-equal/disp32
1732
1733 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1734
1735 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1736 5d/pop-to-ebp
1737 c3/return
1738
1739 test-skip-until-close-paren-in-slice-stops-at-end:
1740
1741 55/push-ebp
1742 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1743
1744 b8/copy-to-eax "*(abc"/imm32
1745 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . .
1746 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 .
1747 05/add-to-eax 4/imm32
1748
1749
1750 51/push-ecx
1751 50/push-eax
1752
1753 e8/call skip-until-close-paren-in-slice/disp32
1754
1755 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1756
1757
1758 68/push "F - test-skip-until-close-paren-in-slice-stops-at-end"/imm32
1759 68/push 0/imm32
1760
1761 29/subtract 3/mod/direct 1/rm32/ecx . . . 0/r32/eax . .
1762 51/push-ecx
1763
1764 e8/call check-ints-equal/disp32
1765
1766 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1767
1768 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1769 5d/pop-to-ebp
1770 c3/return
1771
1772