https://github.com/akkartik/mu/blob/master/apps/dquotes.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 == code
18
19
20
21
22 Entry:
23
24
25
26 68/push Heap/imm32
27 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Heap-size/disp32
28
29 e8/call new-segment/disp32
30
31 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
32
33
34
35 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
36
37
38 81 7/subop/compare 1/mod/*+disp8 5/rm32/EBP . . . . 0/disp8 1/imm32
39 7e/jump-if-lesser-or-equal $run-main/disp8
40
41
42 68/push "test"/imm32
43 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
44
45 e8/call kernel-string-equal?/disp32
46
47 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
48
49 3d/compare-EAX-and 1/imm32
50 75/jump-if-not-equal $run-main/disp8
51
52 e8/call run-tests/disp32
53 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/EBX Num-test-failures/disp32
54 eb/jump $main:end/disp8
55 $run-main:
56
57
58 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
59 89/copy 3/mod/direct 0/rm32/EAX . . . 4/r32/ESP . .
60
61
62 c7 0/subop/copy 0/mod/direct 0/rm32/EAX . . . . . 0/imm32
63
64
65 50/push-EAX/ed
66 68/push Stderr/imm32
67 68/push Stdout/imm32
68 68/push Stdin/imm32
69
70 e8/call convert/disp32
71
72 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x10/imm32
73
74 bb/copy-to-EBX 0/imm32
75 $main:end:
76 b8/copy-to-EAX 1/imm32/exit
77 cd/syscall 0x80/imm8
78
79
80
81
82
83 convert:
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108 55/push-EBP
109 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
110
111 50/push-EAX
112 51/push-ECX
113 52/push-EDX
114 53/push-EBX
115 56/push-ESI
116 57/push-EDI
117
118 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 0x200/imm32
119 68/push 0x200/imm32/length
120 68/push 0/imm32/read
121 68/push 0/imm32/write
122 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
123
124 68/push 0/imm32/end
125 68/push 0/imm32/start
126 89/copy 3/mod/direct 2/rm32/EDX . . . 4/r32/ESP . .
127
128
129
130 68/push 1/imm32
131 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Segment-size/disp32
132 68/push Heap/imm32
133
134 e8/call new-stream/disp32
135
136 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
137
138 89/copy 3/mod/direct 7/rm32/EDI . . . 0/r32/EAX . .
139
140
141 68/push "== data\n"/imm32
142 57/push-EDI
143
144 e8/call write/disp32
145
146 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
147 $convert:line-loop:
148
149
150 51/push-ECX
151
152 e8/call clear-stream/disp32
153
154 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
155
156
157 51/push-ECX
158 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
159
160 e8/call read-line-buffered/disp32
161
162 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
163 $convert:check0:
164
165 81 7/subop/compare 0/mod/indirect 1/rm32/ECX . . . . . 0/imm32
166 0f 84/jump-if-equal $convert:break/disp32
167 $convert:word-loop:
168
169
170 52/push-EDX
171 51/push-ECX
172
173 e8/call next-word-or-string/disp32
174
175 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
176 $convert:check1:
177
178
179
180 52/push-EDX
181
182 e8/call slice-empty?/disp32
183
184 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
185
186 3d/compare-EAX-and 0/imm32
187 0f 85/jump-if-not-equal $convert:next-line/disp32
188 $convert:check-for-comment:
189
190
191 8b/copy 0/mod/indirect 2/rm32/EDX . . . 6/r32/ESI . .
192
193 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
194 8a/copy-byte 0/mod/indirect 6/rm32/ESI . . . 0/r32/AL . .
195
196 3d/compare-EAX-and 0x23/imm32/hash
197 74/jump-if-equal $convert:word-loop/disp8
198 $convert:check-for-string-literal:
199
200 3d/compare-EAX-and 0x22/imm32/dquote
201 75/jump-if-not-equal $convert:regular-word/disp8
202 $convert:string-literal:
203
204
205 57/push-EDI
206 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
207 52/push-EDX
208
209 e8/call process-string-literal/disp32
210
211 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
212
213 eb/jump $convert:next-word/disp8
214 $convert:regular-word:
215
216
217 52/push-EDX
218 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
219
220 e8/call write-slice-buffered/disp32
221
222 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
223
224 $convert:next-word:
225
226
227 68/push " "/imm32
228 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
229
230 e8/call write-buffered/disp32
231
232 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
233
234 eb/jump $convert:word-loop/disp8
235 $convert:next-line:
236
237
238 68/push Newline/imm32
239 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
240
241 e8/call write-buffered/disp32
242
243 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
244
245 e9/jump $convert:line-loop/disp32
246 $convert:break:
247
248
249 57/push-EDI
250 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
251
252 e8/call write-stream-data/disp32
253
254 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
255
256
257 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
258
259 e8/call flush/disp32
260
261 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
262 $convert:end:
263
264 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x214/imm32
265
266 5f/pop-to-EDI
267 5e/pop-to-ESI
268 5b/pop-to-EBX
269 5a/pop-to-EDX
270 59/pop-to-ECX
271 58/pop-to-EAX
272
273 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
274 5d/pop-to-EBP
275 c3/return
276
277
278
279 process-string-literal:
280
281
282
283
284
285
286
287
288 55/push-EBP
289 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
290
291 51/push-ECX
292
293 81 5/subop/subtract 3/mod/direct 4/rm32/ESP . . . . . 0xa/imm32
294 68/push 0xa/imm32/decimal-digits-in-32bit-number
295 68/push 0/imm32/read
296 68/push 0/imm32/write
297 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
298
299
300
301 68/push "_string"/imm32
302 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0x10/disp8 .
303
304 e8/call write/disp32
305
306 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
307
308
309 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Next-string-literal/disp32
310 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0x10/disp8 .
311
312 e8/call print-int32-decimal/disp32
313
314 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
315
316
317 68/push ":\n"/imm32
318 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0x10/disp8 .
319
320 e8/call write/disp32
321
322 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
323
324
325 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
326 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0x10/disp8 .
327
328 e8/call emit-string-literal-data/disp32
329
330 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
331
332
333 68/push Newline/imm32
334 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0x10/disp8 .
335
336 e8/call write/disp32
337
338 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
339
340
341
342 68/push "_string"/imm32
343 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
344
345 e8/call write-buffered/disp32
346
347 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
348
349
350 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Next-string-literal/disp32
351 51/push-ECX
352
353 e8/call print-int32-decimal/disp32
354
355 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
356
357
358 51/push-ECX
359 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
360
361 e8/call write-stream-data/disp32
362
363 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
364
365
366 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
367 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 .
368
369 e8/call emit-metadata/disp32
370
371 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
372
373 ff 0/subop/increment 0/mod/indirect 5/rm32/.disp32 . . . Next-string-literal/disp32
374 $process-string-literal:end:
375
376 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x16/imm32
377
378 59/pop-to-ECX
379
380 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
381 5d/pop-to-EBP
382 c3/return
383
384 test-convert-is-idempotent-by-default:
385
386 55/push-EBP
387 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
388
389
390
391 68/push _test-input-stream/imm32
392
393 e8/call clear-stream/disp32
394
395 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
396
397
398 b8/copy-to-EAX _test-input-buffered-file/imm32
399 05/add-to-EAX 4/imm32
400 50/push-EAX
401
402 e8/call clear-stream/disp32
403
404 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
405
406
407 68/push _test-output-stream/imm32
408
409 e8/call clear-stream/disp32
410
411 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
412
413
414 b8/copy-to-EAX _test-output-buffered-file/imm32
415 05/add-to-EAX 4/imm32
416 50/push-EAX
417
418 e8/call clear-stream/disp32
419
420 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
421
422
423
424
425
426
427
428
429
430
431
432
433 68/push "# comment 1\n"/imm32
434 68/push _test-input-stream/imm32
435
436 e8/call write/disp32
437
438 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
439
440
441 68/push " # comment 2 indented\n"/imm32
442 68/push _test-input-stream/imm32
443
444 e8/call write/disp32
445
446 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
447
448
449 68/push "== code 0x1\n"/imm32
450 68/push _test-input-stream/imm32
451
452 e8/call write/disp32
453
454 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
455
456
457 68/push "# comment 3 inside a segment\n"/imm32
458 68/push _test-input-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 "1\n"/imm32
466 68/push _test-input-stream/imm32
467
468 e8/call write/disp32
469
470 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
471
472
473 68/push "\n"/imm32
474 68/push _test-input-stream/imm32
475
476 e8/call write/disp32
477
478 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
479
480
481 68/push "2 3 # comment 4 inline with other contents\n"/imm32
482 68/push _test-input-stream/imm32
483
484 e8/call write/disp32
485
486 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
487
488
489 68/push "== data 0x2\n"/imm32
490 68/push _test-input-stream/imm32
491
492 e8/call write/disp32
493
494 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
495
496
497 68/push "4 5/imm32\n"/imm32
498 68/push _test-input-stream/imm32
499
500 e8/call write/disp32
501
502 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
503
504
505 68/push _test-output-buffered-file/imm32
506 68/push _test-input-buffered-file/imm32
507
508 e8/call convert/disp32
509
510 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
511
512
513 68/push _test-output-buffered-file/imm32
514
515 e8/call flush/disp32
516
517 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
518
519
520
521
522
523
524
525
526
527
528
529 +-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------
555
556
557 68/push "F - test-convert-is-idempotent-by-default/0"/imm32
558 68/push ""/imm32
559 68/push _test-output-stream/imm32
560
561 e8/call check-next-stream-line-equal/disp32
562
563 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
564
565
566 68/push "F - test-convert-is-idempotent-by-default/1"/imm32
567 68/push ""/imm32
568 68/push _test-output-stream/imm32
569
570 e8/call check-next-stream-line-equal/disp32
571
572 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
573
574
575 68/push "F - test-convert-is-idempotent-by-default/2"/imm32
576 68/push "== code 0x1 "/imm32
577 68/push _test-output-stream/imm32
578
579 e8/call check-next-stream-line-equal/disp32
580
581 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
582
583
584 68/push "F - test-convert-is-idempotent-by-default/3"/imm32
585 68/push ""/imm32
586 68/push _test-output-stream/imm32
587
588 e8/call check-next-stream-line-equal/disp32
589
590 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
591
592
593 68/push "F - test-convert-is-idempotent-by-default/4"/imm32
594 68/push "1 "/imm32
595 68/push _test-output-stream/imm32
596
597 e8/call check-next-stream-line-equal/disp32
598
599 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
600
601
602 68/push "F - test-convert-is-idempotent-by-default/5"/imm32
603 68/push ""/imm32
604 68/push _test-output-stream/imm32
605
606 e8/call check-next-stream-line-equal/disp32
607
608 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
609
610
611 68/push "F - test-convert-is-idempotent-by-default/6"/imm32
612 68/push "2 3 "/imm32
613 68/push _test-output-stream/imm32
614
615 e8/call check-next-stream-line-equal/disp32
616
617 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
618
619
620 68/push "F - test-convert-is-idempotent-by-default/7"/imm32
621 68/push "== data 0x2 "/imm32
622 68/push _test-output-stream/imm32
623
624 e8/call check-next-stream-line-equal/disp32
625
626 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
627
628
629 68/push "F - test-convert-is-idempotent-by-default/8"/imm32
630 68/push "4 5/imm32 "/imm32
631 68/push _test-output-stream/imm32
632
633 e8/call check-next-stream-line-equal/disp32
634
635 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
636
637 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
638 5d/pop-to-EBP
639 c3/return
640
641 test-convert-processes-string-literals:
642
643 55/push-EBP
644 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
645
646
647
648 68/push _test-input-stream/imm32
649
650 e8/call clear-stream/disp32
651
652 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
653
654
655 b8/copy-to-EAX _test-input-buffered-file/imm32
656 05/add-to-EAX 4/imm32
657 50/push-EAX
658
659 e8/call clear-stream/disp32
660
661 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
662
663
664 68/push _test-output-stream/imm32
665
666 e8/call clear-stream/disp32
667
668 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
669
670
671 b8/copy-to-EAX _test-output-buffered-file/imm32
672 05/add-to-EAX 4/imm32
673 50/push-EAX
674
675 e8/call clear-stream/disp32
676
677 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
678
679
680
681
682 68/push "== code 0x1\n"/imm32
683 68/push _test-input-stream/imm32
684
685 e8/call write/disp32
686
687 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
688
689
690 68/push "1 \"a\"/x\n"/imm32
691 68/push _test-input-stream/imm32
692
693 e8/call write/disp32
694
695 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
696
697
698 68/push "2 \"bc\"/y\n"/imm32
699 68/push _test-input-stream/imm32
700
701 e8/call write/disp32
702
703 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
704
705
706 68/push _test-output-buffered-file/imm32
707 68/push _test-input-buffered-file/imm32
708
709 e8/call convert/disp32
710
711 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
712
713
714 68/push _test-output-buffered-file/imm32
715
716 e8/call flush/disp32
717
718 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735 +-- 33 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------
768
769
770 68/push "F - test-convert-processes-string-literals/0"/imm32
771 68/push "== code 0x1 "/imm32
772 68/push _test-output-stream/imm32
773
774 e8/call check-next-stream-line-equal/disp32
775
776 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
777
778
779 68/push "F - test-convert-processes-string-literals/1"/imm32
780 68/push "1 _string1/x "/imm32
781 68/push _test-output-stream/imm32
782
783 e8/call check-next-stream-line-equal/disp32
784
785 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
786
787
788 68/push "F - test-convert-processes-string-literals/2"/imm32
789 68/push "2 _string2/y "/imm32
790 68/push _test-output-stream/imm32
791
792 e8/call check-next-stream-line-equal/disp32
793
794 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
795
796
797 68/push "F - test-convert-processes-string-literals/3"/imm32
798 68/push "== data"/imm32
799 68/push _test-output-stream/imm32
800
801 e8/call check-next-stream-line-equal/disp32
802
803 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
804
805
806 68/push "F - test-convert-processes-string-literals/4"/imm32
807 68/push "_string1:"/imm32
808 68/push _test-output-stream/imm32
809
810 e8/call check-next-stream-line-equal/disp32
811
812 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
813
814
815 68/push "F - test-convert-processes-string-literals/5"/imm32
816 68/push "0x00000001/imm32 61/a "/imm32
817 68/push _test-output-stream/imm32
818
819 e8/call check-next-stream-line-equal/disp32
820
821 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
822
823
824 68/push "F - test-convert-processes-string-literals/6"/imm32
825 68/push "_string2:"/imm32
826 68/push _test-output-stream/imm32
827
828 e8/call check-next-stream-line-equal/disp32
829
830 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
831
832
833 68/push "F - test-convert-processes-string-literals/7"/imm32
834 68/push "0x00000002/imm32 62/b 63/c "/imm32
835 68/push _test-output-stream/imm32
836
837 e8/call check-next-stream-line-equal/disp32
838
839 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
840
841 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
842 5d/pop-to-EBP
843 c3/return
844
845
846 emit-string-literal-data:
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870 55/push-EBP
871 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
872
873 50/push-EAX
874 51/push-ECX
875 52/push-EDX
876 56/push-ESI
877
878 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 0xc/disp8 .
879
880 8b/copy 0/mod/indirect 6/rm32/ESI . . . 2/r32/EDX . .
881
882 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 6/r32/ESI 4/disp8 .
883 $emit-string-literal-data:emit-length:
884
885
886 56/push-ESI
887 52/push-EDX
888
889 e8/call string-length-at-start-of-slice/disp32
890
891 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
892
893
894
895 50/push-EAX
896 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
897
898 e8/call print-int32/disp32
899
900 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
901
902
903 68/push "/imm32 "/imm32
904 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
905
906 e8/call write/disp32
907
908 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
909 $emit-string-literal-data:loop-init:
910
911 42/increment-EDX
912
913 31/xor 3/mod/direct 1/rm32/ECX . . . 1/r32/ECX . .
914 $emit-string-literal-data:loop:
915
916 39/compare 3/mod/direct 2/rm32/EDX . . . 6/r32/ESI . .
917 0f 83/jump-if-greater-or-equal-unsigned $emit-string-literal-data:end/disp32
918
919 8a/copy-byte 0/mod/indirect 2/rm32/EDX . . . 1/r32/CL . .
920
921 81 7/subop/compare 3/mod/direct 1/rm32/ECX . . . . . 0x22/imm32/dquote
922 74/jump-if-equal $emit-string-literal-data:end/disp8
923
924 81 7/subop/compare 3/mod/direct 1/rm32/ECX . . . . . 0x5c/imm32/backslash
925 75/jump-if-not-equal $emit-string-literal-data:emit/disp8
926
927 42/increment-EDX
928
929 39/compare 3/mod/direct 2/rm32/EDX . . . 6/r32/ESI . .
930 73/jump-if-greater-or-equal-unsigned $emit-string-literal-data:end/disp8
931
932 8a/copy-byte 0/mod/indirect 2/rm32/EDX . . . 1/r32/CL . .
933
934 81 7/subop/compare 3/mod/direct 1/rm32/ECX . . . . . 0x6e/imm32/n
935 75/jump-if-not-equal $emit-string-literal-data:emit/disp8
936 b9/copy-to-ECX 0x0a/imm32/newline
937 $emit-string-literal-data:emit:
938
939
940 51/push-ECX
941 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
942
943 e8/call append-byte-hex/disp32
944
945 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
946
947
948
949 51/push-ECX
950
951 e8/call is-alphanumeric?/disp32
952
953 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
954
955 3d/compare-EAX-and 0/imm32
956 74/jump-if-equal $emit-string-literal-data:char-done/disp8
957
958
959 68/push Slash/imm32
960 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
961
962 e8/call write/disp32
963
964 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
965
966
967 51/push-ECX
968 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
969
970 e8/call append-byte/disp32
971
972 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
973 $emit-string-literal-data:char-done:
974
975
976 68/push Space/imm32
977 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
978
979 e8/call write/disp32
980
981 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
982
983 42/increment-EDX
984 e9/jump $emit-string-literal-data:loop/disp32
985 $emit-string-literal-data:end:
986
987 5e/pop-to-ESI
988 5a/pop-to-EDX
989 59/pop-to-ECX
990 58/pop-to-EAX
991
992 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
993 5d/pop-to-EBP
994 c3/return
995
996 is-alphanumeric?:
997
998 55/push-EBP
999 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1000
1001 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 0/r32/EAX 8/disp8 .
1002
1003 3d/compare-EAX-with 0x30/imm32/0
1004 7c/jump-if-lesser $is-alphanumeric?:false/disp8
1005
1006 3d/compare-EAX-with 0x39/imm32/9
1007 7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
1008
1009 3d/compare-EAX-with 0x41/imm32/A
1010 7c/jump-if-lesser $is-alphanumeric?:false/disp8
1011
1012 3d/compare-EAX-with 0x5a/imm32/Z
1013 7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
1014
1015 3d/compare-EAX-with 0x61/imm32/a
1016 7c/jump-if-lesser $is-alphanumeric?:false/disp8
1017
1018 3d/compare-EAX-with 0x7a/imm32/z
1019 7e/jump-if-lesser-or-equal $is-alphanumeric?:true/disp8
1020
1021 $is-alphanumeric?:false:
1022 b8/copy-to-EAX 0/imm32/false
1023 eb/jump $is-alphanumeric?:end/disp8
1024 $is-alphanumeric?:true:
1025 b8/copy-to-EAX 1/imm32/true
1026 $is-alphanumeric?:end:
1027
1028 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1029 5d/pop-to-EBP
1030 c3/return
1031
1032 test-emit-string-literal-data:
1033
1034 55/push-EBP
1035 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1036
1037
1038
1039 68/push _test-output-stream/imm32
1040
1041 e8/call clear-stream/disp32
1042
1043 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1044
1045 68/push _test-slice-abc-limit/imm32
1046 68/push _test-slice-abc/imm32
1047 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1048
1049
1050 51/push-ECX
1051 68/push _test-output-stream/imm32
1052
1053 e8/call emit-string-literal-data/disp32
1054
1055 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1056 +-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------
1082
1083
1084 68/push "F - test-emit-string-literal-data"/imm32
1085 68/push "0x00000003/imm32 61/a 62/b 63/c "/imm32
1086 68/push _test-output-stream/imm32
1087
1088 e8/call check-stream-equal/disp32
1089
1090 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1091
1092 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1093 5d/pop-to-EBP
1094 c3/return
1095
1096 test-emit-string-literal-data-empty:
1097
1098 55/push-EBP
1099 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1100
1101
1102
1103 68/push _test-output-stream/imm32
1104
1105 e8/call clear-stream/disp32
1106
1107 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1108
1109 68/push 0/imm32/end
1110 68/push 0/imm32/start
1111 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1112
1113
1114 51/push-ECX
1115 68/push _test-output-stream/imm32
1116
1117 e8/call emit-string-literal-data/disp32
1118
1119 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1120 +-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------
1146
1147
1148 68/push "F - test-emit-string-literal-data-empty"/imm32
1149 68/push "0x00000000/imm32 "/imm32
1150 68/push _test-output-stream/imm32
1151
1152 e8/call check-stream-equal/disp32
1153
1154 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1155
1156 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1157 5d/pop-to-EBP
1158 c3/return
1159
1160
1161 test-emit-string-literal-data-no-metadata-for-non-alphanumerics:
1162
1163 55/push-EBP
1164 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1165
1166
1167
1168 68/push _test-output-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 68/push _test-slice-a-space-b-limit/imm32
1175 68/push _test-slice-a-space-b/imm32
1176 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1177
1178
1179 51/push-ECX
1180 68/push _test-output-stream/imm32
1181
1182 e8/call emit-string-literal-data/disp32
1183
1184 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1185 +-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------
1211
1212
1213 68/push "F - test-emit-string-literal-data-no-metadata-for-non-alphanumerics"/imm32
1214 68/push "0x00000003/imm32 61/a 20 62/b "/imm32
1215 68/push _test-output-stream/imm32
1216
1217 e8/call check-stream-equal/disp32
1218
1219 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1220
1221 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1222 5d/pop-to-EBP
1223 c3/return
1224
1225 test-emit-string-literal-data-handles-escape-sequences:
1226
1227 55/push-EBP
1228 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1229
1230
1231
1232 68/push _test-output-stream/imm32
1233
1234 e8/call clear-stream/disp32
1235
1236 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1237
1238 68/push _test-slice-a-dquote-b-limit/imm32
1239 68/push _test-slice-a-dquote-b/imm32
1240 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1241
1242
1243 51/push-ECX
1244 68/push _test-output-stream/imm32
1245
1246 e8/call emit-string-literal-data/disp32
1247
1248 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1249 +-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------
1275
1276
1277 68/push "F - test-emit-string-literal-data-handles-escape-sequences"/imm32
1278 68/push "0x00000003/imm32 61/a 22 62/b "/imm32
1279 68/push _test-output-stream/imm32
1280
1281 e8/call check-stream-equal/disp32
1282
1283 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1284
1285 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1286 5d/pop-to-EBP
1287 c3/return
1288
1289 test-emit-string-literal-data-handles-newline-escape:
1290
1291 55/push-EBP
1292 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1293
1294
1295
1296 68/push _test-output-stream/imm32
1297
1298 e8/call clear-stream/disp32
1299
1300 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1301
1302 68/push _test-slice-a-newline-b-limit/imm32
1303 68/push _test-slice-a-newline-b/imm32
1304 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1305
1306
1307 51/push-ECX
1308 68/push _test-output-stream/imm32
1309
1310 e8/call emit-string-literal-data/disp32
1311
1312 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1313 +-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------
1339
1340
1341 68/push "F - test-emit-string-literal-data-handles-newline-escape"/imm32
1342 68/push "0x00000003/imm32 61/a 0a 62/b "/imm32
1343 68/push _test-output-stream/imm32
1344
1345 e8/call check-stream-equal/disp32
1346
1347 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1348
1349 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1350 5d/pop-to-EBP
1351 c3/return
1352
1353
1354 emit-metadata:
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371 55/push-EBP
1372 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1373
1374 50/push-EAX
1375 51/push-ECX
1376 52/push-EDX
1377 53/push-EBX
1378 56/push-ESI
1379
1380 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 0xc/disp8 .
1381
1382 8b/copy 0/mod/indirect 6/rm32/ESI . . . 1/r32/ECX . .
1383
1384 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 2/r32/EDX 4/disp8 .
1385
1386 52/push-EDX
1387 68/push 0/imm32
1388 89/copy 3/mod/direct 3/rm32/EBX . . . 4/r32/ESP . .
1389
1390 b8/copy-to-EAX 0/imm32
1391 $emit-metadata:check-for-string-literal:
1392
1393 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 0/r32/AL . .
1394 3d/compare-EAX-and 0x22/imm32/dquote
1395 75/jump-if-not-equal $emit-metadata:skip-datum-loop/disp8
1396 $emit-metadata:skip-string-literal:
1397
1398
1399 52/push-EDX
1400 51/push-ECX
1401
1402 e8/call skip-string-in-slice/disp32
1403
1404 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1405
1406 89/copy 3/mod/direct 1/rm32/ECX . . . 0/r32/EAX . .
1407 eb/jump $emit-metadata:emit/disp8
1408 $emit-metadata:skip-datum-loop:
1409
1410
1411 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
1412 74/jump-if-equal $emit-metadata:end/disp8
1413
1414 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 0/r32/AL . .
1415 3d/compare-EAX-and 0x2f/imm32/slash
1416 74/jump-if-equal $emit-metadata:emit/disp8
1417
1418 41/increment-ECX
1419 eb/jump $emit-metadata:skip-datum-loop/disp8
1420 $emit-metadata:emit:
1421
1422 89/copy 0/mod/indirect 3/rm32/EBX . . . 1/r32/ECX . .
1423
1424
1425 53/push-EBX
1426 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
1427
1428 e8/call write-slice-buffered/disp32
1429
1430 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . 8/imm32 .
1431 $emit-metadata:end:
1432
1433 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . 8/imm32 .
1434
1435 5e/pop-to-ESI
1436 5b/pop-to-EBX
1437 5a/pop-to-EDX
1438 59/pop-to-ECX
1439 58/pop-to-EAX
1440
1441 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1442 5d/pop-to-EBP
1443 c3/return
1444
1445 test-emit-metadata:
1446
1447 55/push-EBP
1448 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1449
1450
1451
1452 68/push _test-output-stream/imm32
1453
1454 e8/call clear-stream/disp32
1455
1456 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1457
1458
1459 b8/copy-to-EAX _test-output-buffered-file/imm32
1460 05/add-to-EAX 4/imm32
1461 50/push-EAX
1462
1463 e8/call clear-stream/disp32
1464
1465 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1466
1467 b8/copy-to-EAX "abc/def"/imm32
1468 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
1469 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
1470 05/add-to-EAX 4/imm32
1471
1472 51/push-ECX
1473 50/push-EAX
1474 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1475
1476
1477 51/push-ECX
1478 68/push _test-output-buffered-file/imm32
1479
1480 e8/call emit-metadata/disp32
1481
1482 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1483
1484
1485 68/push _test-output-buffered-file/imm32
1486
1487 e8/call flush/disp32
1488
1489 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1490
1491
1492 68/push "F - test-emit-metadata"/imm32
1493 68/push "/def"/imm32
1494 68/push _test-output-stream/imm32
1495
1496 e8/call check-stream-equal/disp32
1497
1498 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1499
1500 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1501 5d/pop-to-EBP
1502 c3/return
1503
1504 test-emit-metadata-none:
1505
1506 55/push-EBP
1507 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1508
1509
1510
1511 68/push _test-output-stream/imm32
1512
1513 e8/call clear-stream/disp32
1514
1515 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1516
1517
1518 b8/copy-to-EAX _test-output-buffered-file/imm32
1519 05/add-to-EAX 4/imm32
1520 50/push-EAX
1521
1522 e8/call clear-stream/disp32
1523
1524 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1525
1526 b8/copy-to-EAX "abc"/imm32
1527 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
1528 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
1529 05/add-to-EAX 4/imm32
1530
1531 51/push-ECX
1532 50/push-EAX
1533 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1534
1535
1536 51/push-ECX
1537 68/push _test-output-buffered-file/imm32
1538
1539 e8/call emit-metadata/disp32
1540
1541 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1542
1543
1544 68/push _test-output-buffered-file/imm32
1545
1546 e8/call flush/disp32
1547
1548 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1549
1550
1551 68/push "F - test-emit-metadata-none"/imm32
1552 68/push ""/imm32
1553 68/push _test-output-stream/imm32
1554
1555 e8/call check-stream-equal/disp32
1556
1557 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1558
1559 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1560 5d/pop-to-EBP
1561 c3/return
1562
1563 test-emit-metadata-multiple:
1564
1565 55/push-EBP
1566 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1567
1568
1569
1570 68/push _test-output-stream/imm32
1571
1572 e8/call clear-stream/disp32
1573
1574 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1575
1576
1577 b8/copy-to-EAX _test-output-buffered-file/imm32
1578 05/add-to-EAX 4/imm32
1579 50/push-EAX
1580
1581 e8/call clear-stream/disp32
1582
1583 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1584
1585 b8/copy-to-EAX "abc/def/ghi"/imm32
1586 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
1587 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
1588 05/add-to-EAX 4/imm32
1589
1590 51/push-ECX
1591 50/push-EAX
1592 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1593
1594
1595 51/push-ECX
1596 68/push _test-output-buffered-file/imm32
1597
1598 e8/call emit-metadata/disp32
1599
1600 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1601
1602
1603 68/push _test-output-buffered-file/imm32
1604
1605 e8/call flush/disp32
1606
1607 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1608
1609
1610 68/push "F - test-emit-metadata-multiple"/imm32
1611 68/push "/def/ghi"/imm32
1612 68/push _test-output-stream/imm32
1613
1614 e8/call check-stream-equal/disp32
1615
1616 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1617
1618 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1619 5d/pop-to-EBP
1620 c3/return
1621
1622 test-emit-metadata-when-no-datum:
1623
1624 55/push-EBP
1625 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1626
1627
1628
1629 68/push _test-output-stream/imm32
1630
1631 e8/call clear-stream/disp32
1632
1633 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1634
1635
1636 b8/copy-to-EAX _test-output-buffered-file/imm32
1637 05/add-to-EAX 4/imm32
1638 50/push-EAX
1639
1640 e8/call clear-stream/disp32
1641
1642 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1643
1644 b8/copy-to-EAX "/abc"/imm32
1645
1646 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
1647 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
1648 51/push-ECX
1649
1650 05/add-to-EAX 4/imm32
1651 50/push-EAX
1652
1653 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1654
1655
1656 51/push-ECX
1657 68/push _test-output-buffered-file/imm32
1658
1659 e8/call emit-metadata/disp32
1660
1661 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1662
1663
1664 68/push _test-output-buffered-file/imm32
1665
1666 e8/call flush/disp32
1667
1668 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1669
1670
1671 68/push "F - test-emit-metadata-when-no-datum"/imm32
1672 68/push "/abc"/imm32
1673 68/push _test-output-stream/imm32
1674
1675 e8/call check-stream-equal/disp32
1676
1677 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1678
1679 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1680 5d/pop-to-EBP
1681 c3/return
1682
1683 test-emit-metadata-in-string-literal:
1684
1685 55/push-EBP
1686 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1687
1688
1689
1690 68/push _test-output-stream/imm32
1691
1692 e8/call clear-stream/disp32
1693
1694 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1695
1696
1697 b8/copy-to-EAX _test-output-buffered-file/imm32
1698 05/add-to-EAX 4/imm32
1699 50/push-EAX
1700
1701 e8/call clear-stream/disp32
1702
1703 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1704
1705 68/push _test-slice-literal-string-with-limit/imm32
1706 68/push _test-slice-literal-string/imm32/start
1707 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1708
1709
1710 51/push-ECX
1711 68/push _test-output-buffered-file/imm32
1712
1713 e8/call emit-metadata/disp32
1714
1715 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1716
1717
1718 68/push _test-output-buffered-file/imm32
1719
1720 e8/call flush/disp32
1721
1722 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1723 +-- 26 lines: #? # dump output ---------------------------------------------------------------------------------------------------------------------------
1749
1750
1751 68/push "F - test-emit-metadata-in-string-literal"/imm32
1752 68/push "/ghi"/imm32
1753 68/push _test-output-stream/imm32
1754
1755 e8/call check-stream-equal/disp32
1756
1757 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1758
1759 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1760 5d/pop-to-EBP
1761 c3/return
1762
1763
1764
1765 next-word-or-string:
1766
1767 55/push-EBP
1768 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1769
1770 50/push-EAX
1771 51/push-ECX
1772 56/push-ESI
1773 57/push-EDI
1774
1775 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 8/disp8 .
1776
1777 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 7/r32/EDI 0xc/disp8 .
1778
1779
1780 68/push 0x20/imm32/space
1781 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
1782
1783 e8/call skip-chars-matching/disp32
1784
1785 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1786 $next-word-or-string:check0:
1787
1788
1789 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 0/r32/EAX 4/disp8 .
1790
1791 3b/compare 0/mod/indirect 6/rm32/ESI . . . 0/r32/EAX . .
1792 7c/jump-if-lesser $next-word-or-string:check-for-comment/disp8
1793
1794 c7 0/subop/copy 0/mod/direct 7/rm32/EDI . . . . . 0/imm32
1795 c7 0/subop/copy 1/mod/*+disp8 7/rm32/EDI . . . . 4/disp8 0/imm32
1796 eb/jump $next-word-or-string:end/disp8
1797 $next-word-or-string:check-for-comment:
1798
1799 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
1800 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/EAX 0xc/disp8 .
1801 89/copy 0/mod/indirect 7/rm32/EDI . . . 0/r32/EAX . .
1802
1803
1804 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
1805 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0xc/disp8 .
1806
1807 3d/compare-EAX-and 0x23/imm32/pound
1808 75/jump-if-not-equal $next-word-or-string:check-for-string-literal/disp8
1809 $next-word-or-string:comment:
1810
1811 8b/copy 0/mod/indirect 6/rm32/ESI . . . 0/r32/EAX . .
1812 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 0/index/EAX . 0/r32/EAX 0xc/disp8 .
1813 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 0/r32/EAX 4/disp8 .
1814
1815 8b/copy 0/mod/indirect 6/rm32/ESI . . . 0/r32/EAX . .
1816 89/copy 1/mod/*+disp8 6/rm32/ESI . . . 0/r32/EAX 4/disp8 .
1817
1818 eb/jump $next-word-or-string:end/disp8
1819 $next-word-or-string:check-for-string-literal:
1820
1821
1822 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
1823 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0xc/disp8 .
1824
1825 3d/compare-EAX-and 0x22/imm32/dquote
1826 75/jump-if-not-equal $next-word-or-string:regular-word/disp8
1827 $next-word-or-string:string-literal:
1828
1829
1830 56/push-ESI
1831
1832 e8/call skip-string/disp32
1833
1834 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1835
1836 $next-word-or-string:regular-word:
1837
1838
1839 ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 .
1840
1841 e8/call skip-chars-not-matching-whitespace/disp32
1842
1843 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1844
1845 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 .
1846 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/EAX 0xc/disp8 .
1847 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 0/r32/EAX 4/disp8 .
1848 $next-word-or-string:end:
1849
1850 5f/pop-to-EDI
1851 5e/pop-to-ESI
1852 59/pop-to-ECX
1853 58/pop-to-EAX
1854
1855 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1856 5d/pop-to-EBP
1857 c3/return
1858
1859 test-next-word-or-string:
1860
1861 55/push-EBP
1862 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1863
1864
1865
1866 68/push _test-input-stream/imm32
1867
1868 e8/call clear-stream/disp32
1869
1870 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1871
1872 68/push 0/imm32/end
1873 68/push 0/imm32/start
1874 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1875
1876
1877 68/push " ab"/imm32
1878 68/push _test-input-stream/imm32
1879
1880 e8/call write/disp32
1881
1882 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1883
1884
1885 51/push-ECX
1886 68/push _test-input-stream/imm32
1887
1888 e8/call next-word-or-string/disp32
1889
1890 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1891
1892
1893 68/push "F - test-next-word-or-string/updates-stream-read-correctly"/imm32
1894 68/push 4/imm32
1895 b8/copy-to-EAX _test-input-stream/imm32
1896 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 .
1897
1898 e8/call check-ints-equal/disp32
1899
1900 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1901
1902
1903
1904 68/push "F - test-next-word-or-string: start"/imm32
1905 68/push 0xe/imm32
1906
1907 8b/copy 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
1908 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-input-stream/imm32
1909 50/push-EAX
1910
1911 e8/call check-ints-equal/disp32
1912
1913 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1914
1915
1916
1917 68/push "F - test-next-word-or-string: end"/imm32
1918 68/push 0x10/imm32
1919
1920 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
1921 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-input-stream/imm32
1922 50/push-EAX
1923
1924 e8/call check-ints-equal/disp32
1925
1926 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1927
1928 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
1929 5d/pop-to-EBP
1930 c3/return
1931
1932 test-next-word-or-string-returns-whole-comment:
1933
1934 55/push-EBP
1935 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
1936
1937
1938
1939 68/push _test-input-stream/imm32
1940
1941 e8/call clear-stream/disp32
1942
1943 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
1944
1945 68/push 0/imm32/end
1946 68/push 0/imm32/start
1947 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
1948
1949
1950 68/push " # a"/imm32
1951 68/push _test-input-stream/imm32
1952
1953 e8/call write/disp32
1954
1955 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1956
1957
1958 51/push-ECX
1959 68/push _test-input-stream/imm32
1960
1961 e8/call next-word-or-string/disp32
1962
1963 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
1964
1965
1966 68/push "F - test-next-word-or-string-returns-whole-comment/updates-stream-read-correctly"/imm32
1967 68/push 5/imm32
1968 b8/copy-to-EAX _test-input-stream/imm32
1969 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 .
1970
1971 e8/call check-ints-equal/disp32
1972
1973 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1974
1975
1976
1977 68/push "F - test-next-word-or-string-returns-whole-comment: start"/imm32
1978 68/push 0xe/imm32
1979
1980 8b/copy 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
1981 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-input-stream/imm32
1982 50/push-EAX
1983
1984 e8/call check-ints-equal/disp32
1985
1986 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
1987
1988
1989
1990 68/push "F - test-next-word-or-string-returns-whole-comment: end"/imm32
1991 68/push 0x11/imm32
1992
1993 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
1994 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-input-stream/imm32
1995 50/push-EAX
1996
1997 e8/call check-ints-equal/disp32
1998
1999 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
2000
2001 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
2002 5d/pop-to-EBP
2003 c3/return
2004
2005 test-next-word-or-string-returns-empty-slice-on-eof:
2006
2007 55/push-EBP
2008 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
2009
2010
2011
2012 68/push _test-input-stream/imm32
2013
2014 e8/call clear-stream/disp32
2015
2016 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
2017
2018 68/push 0/imm32/end
2019 68/push 0/imm32/start
2020 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
2021
2022
2023
2024 51/push-ECX
2025 68/push _test-input-stream/imm32
2026
2027 e8/call next-word-or-string/disp32
2028
2029 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
2030
2031
2032 68/push "F - test-next-word-or-string-returns-empty-string-on-eof"/imm32
2033 68/push 0/imm32
2034
2035 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
2036 2b/subtract 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
2037 50/push-EAX
2038
2039 e8/call check-ints-equal/disp32
2040
2041 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
2042
2043 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
2044 5d/pop-to-EBP
2045 c3/return
2046
2047 test-next-word-or-string-returns-string-literal:
2048
2049 55/push-EBP
2050 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
2051
2052
2053
2054 68/push _test-input-stream/imm32
2055
2056 e8/call clear-stream/disp32
2057
2058 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
2059
2060 68/push 0/imm32/end
2061 68/push 0/imm32/start
2062 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
2063
2064
2065 68/push " \"a b\"/imm32 "/imm32
2066 68/push _test-input-stream/imm32
2067
2068 e8/call write/disp32
2069
2070 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
2071
2072
2073 51/push-ECX
2074 68/push _test-input-stream/imm32
2075
2076 e8/call next-word-or-string/disp32
2077
2078 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
2079
2080
2081
2082 68/push "F - test-next-word-or-string-returns-string-literal: start"/imm32
2083 68/push 0xd/imm32
2084
2085 8b/copy 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
2086 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-input-stream/imm32
2087 50/push-EAX
2088
2089 e8/call check-ints-equal/disp32
2090
2091 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
2092
2093
2094
2095 68/push "F - test-next-word-or-string-returns-string-literal: end"/imm32
2096 68/push 0x18/imm32
2097
2098 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
2099 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-input-stream/imm32
2100 50/push-EAX
2101
2102 e8/call check-ints-equal/disp32
2103
2104 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
2105
2106 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
2107 5d/pop-to-EBP
2108 c3/return
2109
2110 test-next-word-or-string-returns-string-with-escapes:
2111
2112 55/push-EBP
2113 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
2114
2115
2116
2117 68/push _test-input-stream/imm32
2118
2119 e8/call clear-stream/disp32
2120
2121 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32
2122
2123 68/push 0/imm32/end
2124 68/push 0/imm32/start
2125 89/copy 3/mod/direct 1/rm32/ECX . . . 4/r32/ESP . .
2126
2127
2128 68/push " \"a\\\"b\"/x"/imm32
2129 68/push _test-input-stream/imm32
2130
2131 e8/call write/disp32
2132
2133 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
2134
2135
2136 51/push-ECX
2137 68/push _test-input-stream/imm32
2138
2139 e8/call next-word-or-string/disp32
2140
2141 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
2142
2143
2144
2145 68/push "F - test-next-word-or-string-returns-string-with-escapes: start"/imm32
2146 68/push 0xd/imm32
2147
2148 8b/copy 0/mod/indirect 1/rm32/ECX . . . 0/r32/EAX . .
2149 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-input-stream/imm32
2150 50/push-EAX
2151
2152 e8/call check-ints-equal/disp32
2153
2154 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
2155
2156
2157
2158 68/push "F - test-next-word-or-string-returns-string-with-escapes: end"/imm32
2159 68/push 0x15/imm32
2160
2161 8b/copy 1/mod/*+disp8 1/rm32/ECX . . . 0/r32/EAX 4/disp8 .
2162 81 5/subop/subtract 3/mod/direct 0/rm32/EAX . . . . . _test-input-stream/imm32
2163 50/push-EAX
2164
2165 e8/call check-ints-equal/disp32
2166
2167 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
2168
2169 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
2170 5d/pop-to-EBP
2171 c3/return
2172
2173 string-length-at-start-of-slice:
2174
2175 55/push-EBP
2176 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
2177
2178 51/push-ECX
2179 52/push-EDX
2180 53/push-EBX
2181
2182 8b/copy 1/mod/*+disp8 5/rm32/EBP . . 1/r32/ECX 8/disp8 .
2183
2184 8b/copy 1/mod/*+disp8 5/rm32/EBP . . 2/r32/EDX 0xc/disp8 .
2185
2186 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . .
2187
2188 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . .
2189
2190 41/increment-ECX
2191 $string-length-at-start-of-slice:loop:
2192
2193 39/compare 3/mod/direct 1/rm32/ECX . . . 2/r32/EDX . .
2194 73/jump-if-greater-unsigned-or-equal $string-length-at-start-of-slice:end/disp8
2195
2196 8a/copy-byte 0/mod/indirect 1/rm32/ECX . . . 3/r32/BL . .
2197 $string-length-at-start-of-slice:dquote:
2198
2199 81 7/subop/compare 3/mod/direct 3/rm32/EBX . . . . . 0x22/imm32/dquote
2200 74/jump-if-equal $string-length-at-start-of-slice:end/disp8
2201 $string-length-at-start-of-slice:check-for-escape:
2202
2203 81 7/subop/compare 3/mod/direct 3/rm32/EBX . . . . . 0x5c/imm32/backslash
2204 75/jump-if-not-equal $string-length-at-start-of-slice:continue/disp8
2205 $string-length-at-start-of-slice:escape:
2206
2207 41/increment-ECX
2208 $string-length-at-start-of-slice:continue:
2209
2210 40/increment-EAX
2211
2212 41/increment-ECX
2213 eb/jump $string-length-at-start-of-slice:loop/disp8
2214 $string-length-at-start-of-slice:end:
2215
2216 5b/pop-to-EBX
2217 5a/pop-to-EDX
2218 59/pop-to-ECX
2219
2220 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
2221 5d/pop-to-EBP
2222 c3/return
2223
2224 test-string-length-at-start-of-slice:
2225
2226 55/push-EBP
2227 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
2228
2229 b8/copy-to-EAX "\"abc\" def"/imm32
2230 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
2231 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
2232 05/add-to-EAX 4/imm32
2233
2234
2235 51/push-ECX
2236 50/push-EAX
2237
2238 e8/call string-length-at-start-of-slice/disp32
2239
2240 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
2241
2242
2243 68/push "F - test-string-length-at-start-of-slice"/imm32
2244 68/push 3/imm32
2245 50/push-EAX
2246
2247 e8/call check-ints-equal/disp32
2248
2249 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
2250
2251 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
2252 5d/pop-to-EBP
2253 c3/return
2254
2255 test-string-length-at-start-of-slice-escaped:
2256
2257 55/push-EBP
2258 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . .
2259
2260 b8/copy-to-EAX "\"ab\\c\" def"/imm32
2261 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . .
2262 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/EAX 1/index/ECX . 1/r32/ECX 4/disp8 .
2263 05/add-to-EAX 4/imm32
2264
2265
2266 51/push-ECX
2267 50/push-EAX
2268
2269 e8/call string-length-at-start-of-slice/disp32
2270
2271 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32
2272
2273
2274 68/push "F - test-string-length-at-start-of-slice-escaped"/imm32
2275 68/push 3/imm32
2276 50/push-EAX
2277
2278 e8/call check-ints-equal/disp32
2279
2280 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32
2281
2282 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . .
2283 5d/pop-to-EBP
2284 c3/return
2285
2286 == data
2287
2288 Next-string-literal:
2289 1/imm32
2290
2291
2292 Space:
2293
2294 1/imm32
2295
2296 20/space
2297
2298
2299 Slash:
2300
2301 1/imm32
2302
2303 2f/slash
2304
2305 _test-slice-abc:
2306 22/dquote 61/a 62/b 63/c 22/dquote
2307 2f/slash 64/d
2308 _test-slice-abc-limit:
2309
2310 _test-slice-a-space-b:
2311 22/dquote 61/a 20/space 62/b 22/dquote
2312 _test-slice-a-space-b-limit:
2313
2314 _test-slice-a-dquote-b:
2315 22/dquote 61/a 5c/backslash 22/dquote 62/b 22/dquote
2316 _test-slice-a-dquote-b-limit:
2317
2318 _test-slice-a-newline-b:
2319 22/dquote 61/a 5c/backslash 6e/n 62/b 22/dquote
2320 _test-slice-a-newline-b-limit:
2321
2322
2323 _test-slice-literal-string:
2324 22/dquote
2325 61/a 62/b 63/c
2326 2f/slash 64/d 65/e 66/f
2327 22/dquote
2328 2f/slash 67/g 68/h 69/i
2329 _test-slice-literal-string-with-limit:
2330
2331