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