https://github.com/akkartik/mu/blob/master/apps/mu.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238 == data
239
240 Program:
241 _Program-functions:
242 0/imm32
243 _Program-functions->payload:
244 0/imm32
245 _Program-types:
246 0/imm32
247 _Program-types->payload:
248 0/imm32
249 _Program-signatures:
250 0/imm32
251 _Program-signatures->payload:
252 0/imm32
253
254
255
256
257
258
259
260
261
262
263
264
265 Function-name:
266 0/imm32
267 Function-inouts:
268 8/imm32
269 Function-outputs:
270 0x10/imm32
271 Function-body:
272 0x18/imm32
273 Function-next:
274 0x20/imm32
275 Function-size:
276 0x28/imm32/40
277
278 Primitive-name:
279 0/imm32
280 Primitive-inouts:
281 8/imm32
282 Primitive-outputs:
283 0x10/imm32
284 Primitive-subx-name:
285 0x18/imm32
286 Primitive-subx-rm32:
287 0x20/imm32
288 Primitive-subx-r32:
289 0x24/imm32
290 Primitive-subx-imm32:
291 0x28/imm32
292 Primitive-subx-imm8:
293 0x2c/imm32
294 Primitive-subx-disp32:
295 0x30/imm32
296 Primitive-subx-xm32:
297 0x34/imm32
298 Primitive-subx-x32:
299 0x38/imm32
300 Primitive-next:
301 0x3c/imm32
302 Primitive-size:
303 0x44/imm32/68
304
305 Stmt-tag:
306 0/imm32
307
308 Block-stmts:
309 4/imm32
310 Block-var:
311 0xc/imm32
312
313 Stmt1-operation:
314 4/imm32
315 Stmt1-inouts:
316 0xc/imm32
317 Stmt1-outputs:
318 0x14/imm32
319
320 Vardef-var:
321 4/imm32
322
323 Regvardef-operation:
324 4/imm32
325 Regvardef-inouts:
326 0xc/imm32
327 Regvardef-outputs:
328 0x14/imm32
329
330 Stmt-size:
331 0x1c/imm32
332
333 Var-name:
334 0/imm32
335 Var-type:
336 8/imm32
337 Var-block-depth:
338 0x10/imm32
339 Var-offset:
340 0x14/imm32
341 Var-register:
342 0x18/imm32
343 Var-size:
344 0x20/imm32
345
346 List-value:
347 0/imm32
348 List-next:
349 8/imm32
350 List-size:
351 0x10/imm32
352
353
354 Stmt-var-value:
355 0/imm32
356 Stmt-var-next:
357 8/imm32
358 Stmt-var-is-deref:
359 0x10/imm32
360 Stmt-var-size:
361 0x14/imm32
362
363
364
365 Live-var-value:
366 0/imm32
367 Live-var-register-spilled:
368 8/imm32
369 Live-var-size:
370 0xc/imm32
371
372
373
374 Type-tree-is-atom:
375 0/imm32
376
377 Type-tree-value:
378 4/imm32
379 Type-tree-value-size:
380 8/imm32
381 Type-tree-parameter-name:
382 8/imm32
383
384 Type-tree-left:
385 4/imm32
386 Type-tree-right:
387 0xc/imm32
388
389 Type-tree-size:
390 0x14/imm32
391
392
393
394
395 Type-id:
396 0/imm32/write
397 0/imm32/read
398 0x100/imm32/size
399
400 0/imm32
401
402 "int"/imm32
403 "addr"/imm32
404 "array"/imm32
405 "handle"/imm32
406 "boolean"/imm32
407 0/imm32
408
409 "offset"/imm32
410
411 "byte"/imm32
412 0/imm32
413
414 0/imm32
415
416 "stream"/imm32
417 "slice"/imm32
418 "code-point"/imm32
419 "grapheme"/imm32
420
421
422 "float"/imm32
423
424 0/imm32
425
426
427
428 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
429 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
430 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
431 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
432 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
433 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
434
435 Primitive-type-ids:
436 0x44
437
438
439
440
441 Typeinfo-id:
442 0/imm32
443 Typeinfo-fields:
444 4/imm32
445
446
447
448
449
450 Typeinfo-total-size-in-bytes:
451 0xc/imm32
452 Typeinfo-next:
453 0x10/imm32
454 Typeinfo-size:
455 0x18/imm32
456
457
458
459 Typeinfo-fields-row-size:
460 0x10/imm32
461
462
463
464
465
466
467
468
469 Typeinfo-entry-input-var:
470 0/imm32
471 Typeinfo-entry-index:
472 8/imm32
473 Typeinfo-entry-output-var:
474 0xc/imm32
475 Typeinfo-entry-size:
476 0x14/imm32
477
478 == code
479
480 Entry:
481
482 89/<- %ebp 4/r32/esp
483 (new-segment *Heap-size Heap)
484
485 {
486
487 81 7/subop/compare *ebp 1/imm32
488 7e/jump-if-<= break/disp8
489
490 (kernel-string-equal? *(ebp+8) "test")
491 3d/compare-eax-and 0/imm32/false
492 74/jump-if-= break/disp8
493
494 (run-tests)
495
496 8b/-> *Num-test-failures 3/r32/ebx
497 eb/jump $mu-main:end/disp8
498 }
499
500 (convert-mu Stdin Stdout Stderr 0)
501 (flush Stdout)
502
503 bb/copy-to-ebx 0/imm32
504 $mu-main:end:
505 e8/call syscall_exit/disp32
506
507 convert-mu:
508
509 55/push-ebp
510 89/<- %ebp 4/r32/esp
511
512 50/push-eax
513
514 c7 0/subop/copy *Next-block-index 1/imm32
515 8b/-> *Primitive-type-ids 0/r32/eax
516 89/<- *Type-id 0/r32/eax
517 c7 0/subop/copy *_Program-functions 0/imm32
518 c7 0/subop/copy *_Program-functions->payload 0/imm32
519 c7 0/subop/copy *_Program-types 0/imm32
520 c7 0/subop/copy *_Program-types->payload 0/imm32
521 c7 0/subop/copy *_Program-signatures 0/imm32
522 c7 0/subop/copy *_Program-signatures->payload 0/imm32
523
524 (parse-mu *(ebp+8) *(ebp+0x10) *(ebp+0x14))
525 (populate-mu-type-sizes *(ebp+0x10) *(ebp+0x14))
526
527 (check-mu-types *(ebp+0x10) *(ebp+0x14))
528 (emit-subx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
529 $convert-mu:end:
530
531 58/pop-to-eax
532
533 89/<- %esp 5/r32/ebp
534 5d/pop-to-ebp
535 c3/return
536
537 test-convert-empty-input:
538
539
540 55/push-ebp
541 89/<- %ebp 4/r32/esp
542
543 (clear-stream _test-input-stream)
544 (clear-stream $_test-input-buffered-file->buffer)
545 (clear-stream _test-output-stream)
546 (clear-stream $_test-output-buffered-file->buffer)
547
548 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
549 (flush _test-output-buffered-file)
550 (check-stream-equal _test-output-stream "" "F - test-convert-empty-input")
551
552 89/<- %esp 5/r32/ebp
553 5d/pop-to-ebp
554 c3/return
555
556 test-convert-function-skeleton:
557
558 55/push-ebp
559 89/<- %ebp 4/r32/esp
560
561 (clear-stream _test-input-stream)
562 (clear-stream $_test-input-buffered-file->buffer)
563 (clear-stream _test-output-stream)
564 (clear-stream $_test-output-buffered-file->buffer)
565
566 (write _test-input-stream "fn foo {\n")
567 (write _test-input-stream "}\n")
568
569 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
570 (flush _test-output-buffered-file)
571 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
577
578 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-skeleton/0")
579 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-skeleton/1")
580 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-skeleton/2")
581 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-skeleton/3")
582 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-skeleton/4")
583 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-skeleton/5")
584 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-skeleton/6")
585 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-skeleton/7")
586
587 89/<- %esp 5/r32/ebp
588 5d/pop-to-ebp
589 c3/return
590
591 test-convert-multiple-function-skeletons:
592
593 55/push-ebp
594 89/<- %ebp 4/r32/esp
595
596 (clear-stream _test-input-stream)
597 (clear-stream $_test-input-buffered-file->buffer)
598 (clear-stream _test-output-stream)
599 (clear-stream $_test-output-buffered-file->buffer)
600
601 (write _test-input-stream "fn foo {\n")
602 (write _test-input-stream "}\n")
603 (write _test-input-stream "fn bar {\n")
604 (write _test-input-stream "}\n")
605
606 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
607 (flush _test-output-buffered-file)
608 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
614
615 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-multiple-function-skeletons/0")
616 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/1")
617 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/2")
618 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/3")
619 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/4")
620 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/5")
621 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/6")
622 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/7")
623
624 (check-next-stream-line-equal _test-output-stream "bar:" "F - test-convert-multiple-function-skeletons/10")
625 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/11")
626 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/12")
627 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/13")
628 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/14")
629 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/15")
630 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/16")
631 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/17")
632
633 89/<- %esp 5/r32/ebp
634 5d/pop-to-ebp
635 c3/return
636
637 test-convert-function-with-arg:
638
639 55/push-ebp
640 89/<- %ebp 4/r32/esp
641
642 (clear-stream _test-input-stream)
643 (clear-stream $_test-input-buffered-file->buffer)
644 (clear-stream _test-output-stream)
645 (clear-stream $_test-output-buffered-file->buffer)
646
647 (write _test-input-stream "fn foo n: int {\n")
648 (write _test-input-stream "}\n")
649
650 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
651 (flush _test-output-buffered-file)
652 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
658
659 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg/0")
660 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg/1")
661 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg/2")
662 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg/3")
663 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg/4")
664 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg/5")
665 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg/6")
666 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg/7")
667
668 89/<- %esp 5/r32/ebp
669 5d/pop-to-ebp
670 c3/return
671
672 test-function-with-redefined-name:
673
674 55/push-ebp
675 89/<- %ebp 4/r32/esp
676
677 (clear-stream _test-input-stream)
678 (clear-stream $_test-input-buffered-file->buffer)
679 (clear-stream _test-output-stream)
680 (clear-stream $_test-output-buffered-file->buffer)
681 (clear-stream _test-error-stream)
682 (clear-stream $_test-error-buffered-file->buffer)
683
684 68/push 0/imm32
685 68/push 0/imm32
686 89/<- %edx 4/r32/esp
687 (tailor-exit-descriptor %edx 0x10)
688
689 (write _test-input-stream "fn foo {\n")
690 (write _test-input-stream "}\n")
691 (write _test-input-stream "fn foo {\n")
692 (write _test-input-stream "}\n")
693
694 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
695
696
697 89/<- %edx 4/r32/esp
698 (flush _test-output-buffered-file)
699 (flush _test-error-buffered-file)
700 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
706
707 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name: output should be empty")
708 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name: error message")
709
710 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name: exit status")
711
712 81 0/subop/add %esp 8/imm32
713
714 5d/pop-to-ebp
715 c3/return
716
717 test-function-with-redefined-name-2:
718
719 55/push-ebp
720 89/<- %ebp 4/r32/esp
721
722 (clear-stream _test-input-stream)
723 (clear-stream $_test-input-buffered-file->buffer)
724 (clear-stream _test-output-stream)
725 (clear-stream $_test-output-buffered-file->buffer)
726 (clear-stream _test-error-stream)
727 (clear-stream $_test-error-buffered-file->buffer)
728
729 68/push 0/imm32
730 68/push 0/imm32
731 89/<- %edx 4/r32/esp
732 (tailor-exit-descriptor %edx 0x10)
733
734 (write _test-input-stream "fn foo {\n")
735 (write _test-input-stream "}\n")
736 (write _test-input-stream "sig foo\n")
737
738 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
739
740
741 89/<- %edx 4/r32/esp
742 (flush _test-output-buffered-file)
743 (flush _test-error-buffered-file)
744 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
750
751 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name-2: output should be empty")
752 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name-2: error message")
753
754 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name-2: exit status")
755
756 81 0/subop/add %esp 8/imm32
757
758 5d/pop-to-ebp
759 c3/return
760
761 test-function-with-redefined-name-3:
762
763 55/push-ebp
764 89/<- %ebp 4/r32/esp
765
766 (clear-stream _test-input-stream)
767 (clear-stream $_test-input-buffered-file->buffer)
768 (clear-stream _test-output-stream)
769 (clear-stream $_test-output-buffered-file->buffer)
770 (clear-stream _test-error-stream)
771 (clear-stream $_test-error-buffered-file->buffer)
772
773 68/push 0/imm32
774 68/push 0/imm32
775 89/<- %edx 4/r32/esp
776 (tailor-exit-descriptor %edx 0x10)
777
778 (write _test-input-stream "sig foo\n")
779 (write _test-input-stream "fn foo {\n")
780 (write _test-input-stream "}\n")
781
782 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
783
784
785 89/<- %edx 4/r32/esp
786 (flush _test-output-buffered-file)
787 (flush _test-error-buffered-file)
788 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
794
795 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name-3: output should be empty")
796 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name-3: error message")
797
798 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name-3: exit status")
799
800 81 0/subop/add %esp 8/imm32
801
802 5d/pop-to-ebp
803 c3/return
804
805 test-function-with-inout-in-register:
806
807 55/push-ebp
808 89/<- %ebp 4/r32/esp
809
810 (clear-stream _test-input-stream)
811 (clear-stream $_test-input-buffered-file->buffer)
812 (clear-stream _test-output-stream)
813 (clear-stream $_test-output-buffered-file->buffer)
814 (clear-stream _test-error-stream)
815 (clear-stream $_test-error-buffered-file->buffer)
816
817 68/push 0/imm32
818 68/push 0/imm32
819 89/<- %edx 4/r32/esp
820 (tailor-exit-descriptor %edx 0x10)
821
822 (write _test-input-stream "fn foo x/eax: int {\n")
823 (write _test-input-stream "}\n")
824
825 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
826
827
828 89/<- %edx 4/r32/esp
829 (flush _test-output-buffered-file)
830 (flush _test-error-buffered-file)
831 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
837
838 (check-stream-equal _test-output-stream "" "F - test-function-with-inout-in-register: output should be empty")
839 (check-next-stream-line-equal _test-error-stream "fn foo: function inout 'x' cannot be in a register" "F - test-function-with-inout-in-register: error message")
840
841 (check-ints-equal *(edx+4) 2 "F - test-function-with-inout-in-register: exit status")
842
843 81 0/subop/add %esp 8/imm32
844
845 5d/pop-to-ebp
846 c3/return
847
848 test-convert-function-with-arg-and-body:
849
850 55/push-ebp
851 89/<- %ebp 4/r32/esp
852
853 (clear-stream _test-input-stream)
854 (clear-stream $_test-input-buffered-file->buffer)
855 (clear-stream _test-output-stream)
856 (clear-stream $_test-output-buffered-file->buffer)
857
858 (write _test-input-stream "fn foo n: int {\n")
859 (write _test-input-stream " increment n\n")
860 (write _test-input-stream "}\n")
861
862 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
863 (flush _test-output-buffered-file)
864 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
870
871 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg-and-body/0")
872 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg-and-body/1")
873 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg-and-body/2")
874 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg-and-body/3")
875 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-arg-and-body/4")
876 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-arg-and-body/5")
877 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-arg-and-body/6")
878 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-arg-and-body/7")
879 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-arg-and-body/8")
880 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg-and-body/9")
881 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg-and-body/10")
882 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg-and-body/11")
883 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg-and-body/12")
884
885 89/<- %esp 5/r32/ebp
886 5d/pop-to-ebp
887 c3/return
888
889 test-convert-function-distinguishes-args:
890
891 55/push-ebp
892 89/<- %ebp 4/r32/esp
893
894 (clear-stream _test-input-stream)
895 (clear-stream $_test-input-buffered-file->buffer)
896 (clear-stream _test-output-stream)
897 (clear-stream $_test-output-buffered-file->buffer)
898
899 (write _test-input-stream "fn foo a: int, b: int {\n")
900 (write _test-input-stream " increment b\n")
901 (write _test-input-stream "}\n")
902
903 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
904 (flush _test-output-buffered-file)
905 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
911
912 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-distinguishes-args/0")
913 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-distinguishes-args/1")
914 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-distinguishes-args/2")
915 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-distinguishes-args/3")
916 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-distinguishes-args/4")
917 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-distinguishes-args/5")
918 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x0000000c)" "F - test-convert-function-distinguishes-args/6")
919 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-distinguishes-args/7")
920 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-distinguishes-args/8")
921 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-distinguishes-args/9")
922 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-distinguishes-args/10")
923 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-distinguishes-args/11")
924 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-distinguishes-args/12")
925
926 89/<- %esp 5/r32/ebp
927 5d/pop-to-ebp
928 c3/return
929
930 test-convert-function-with-return-literal:
931
932 55/push-ebp
933 89/<- %ebp 4/r32/esp
934
935 (clear-stream _test-input-stream)
936 (clear-stream $_test-input-buffered-file->buffer)
937 (clear-stream _test-output-stream)
938 (clear-stream $_test-output-buffered-file->buffer)
939
940 (write _test-input-stream "fn foo -> _/eax: int {\n")
941 (write _test-input-stream " return 0\n")
942 (write _test-input-stream "}\n")
943
944 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
945 (flush _test-output-buffered-file)
946 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
952
953 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-literal/0")
954 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-literal/1")
955 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-literal/2")
956 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-literal/3")
957 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-literal/4")
958 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-literal/5")
959 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy %eax 0/imm32" "F - test-convert-function-with-return-literal/6")
960 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-literal/7")
961 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-literal/8")
962 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-literal/9")
963 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-literal/10")
964 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-literal/11")
965 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-literal/12")
966 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-literal/13")
967
968 89/<- %esp 5/r32/ebp
969 5d/pop-to-ebp
970 c3/return
971
972 test-convert-function-with-return:
973
974 55/push-ebp
975 89/<- %ebp 4/r32/esp
976
977 (clear-stream _test-input-stream)
978 (clear-stream $_test-input-buffered-file->buffer)
979 (clear-stream _test-output-stream)
980 (clear-stream $_test-output-buffered-file->buffer)
981
982 (write _test-input-stream "fn foo -> _/eax: int {\n")
983 (write _test-input-stream " var y: int\n")
984 (write _test-input-stream " return y\n")
985 (write _test-input-stream "}\n")
986
987 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
988 (flush _test-output-buffered-file)
989 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
995
996 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return/0")
997 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return/1")
998 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return/2")
999 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return/3")
1000 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return/4")
1001 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return/5")
1002 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return/6")
1003 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-function-with-return/7")
1004 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return/8")
1005 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return/9")
1006 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return/10")
1007 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return/11")
1008 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return/12")
1009 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return/13")
1010 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return/14")
1011 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return/15")
1012
1013 89/<- %esp 5/r32/ebp
1014 5d/pop-to-ebp
1015 c3/return
1016
1017 test-convert-function-with-return-register:
1018
1019 55/push-ebp
1020 89/<- %ebp 4/r32/esp
1021
1022 (clear-stream _test-input-stream)
1023 (clear-stream $_test-input-buffered-file->buffer)
1024 (clear-stream _test-output-stream)
1025 (clear-stream $_test-output-buffered-file->buffer)
1026
1027 (write _test-input-stream "fn foo -> _/eax: int {\n")
1028 (write _test-input-stream " var y/eax: int <- copy 3\n")
1029 (write _test-input-stream " return y\n")
1030 (write _test-input-stream "}\n")
1031
1032 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1033 (flush _test-output-buffered-file)
1034 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1040
1041 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register/0")
1042 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register/1")
1043 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register/2")
1044 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register/3")
1045 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register/4")
1046 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register/5")
1047 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register/6")
1048 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register/7")
1049 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register/8")
1050 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register/9")
1051 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register/10")
1052 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register/11")
1053 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register/12")
1054 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register/13")
1055 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register/14")
1056 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register/15")
1057 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register/16")
1058
1059 89/<- %esp 5/r32/ebp
1060 5d/pop-to-ebp
1061 c3/return
1062
1063 test-function-with-output-without-register:
1064
1065 55/push-ebp
1066 89/<- %ebp 4/r32/esp
1067
1068 (clear-stream _test-input-stream)
1069 (clear-stream $_test-input-buffered-file->buffer)
1070 (clear-stream _test-output-stream)
1071 (clear-stream $_test-output-buffered-file->buffer)
1072 (clear-stream _test-error-stream)
1073 (clear-stream $_test-error-buffered-file->buffer)
1074
1075 68/push 0/imm32
1076 68/push 0/imm32
1077 89/<- %edx 4/r32/esp
1078 (tailor-exit-descriptor %edx 0x10)
1079
1080 (write _test-input-stream "fn foo -> _: int {\n")
1081 (write _test-input-stream "}\n")
1082
1083 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1084
1085
1086 89/<- %edx 4/r32/esp
1087 (flush _test-output-buffered-file)
1088 (flush _test-error-buffered-file)
1089 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1095
1096 (check-stream-equal _test-output-stream "" "F - test-function-with-output-without-register: output should be empty")
1097 (check-next-stream-line-equal _test-error-stream "fn foo: function output '_' must be in a register, in instruction 'fn foo -> _: int {" "F - test-function-with-output-without-register: error message")
1098
1099 (check-ints-equal *(edx+4) 2 "F - test-function-with-output-without-register: exit status")
1100
1101 81 0/subop/add %esp 8/imm32
1102
1103 5d/pop-to-ebp
1104 c3/return
1105
1106 test-function-with-outputs-in-conflicting-registers:
1107
1108 55/push-ebp
1109 89/<- %ebp 4/r32/esp
1110
1111 (clear-stream _test-input-stream)
1112 (clear-stream $_test-input-buffered-file->buffer)
1113 (clear-stream _test-output-stream)
1114 (clear-stream $_test-output-buffered-file->buffer)
1115 (clear-stream _test-error-stream)
1116 (clear-stream $_test-error-buffered-file->buffer)
1117
1118 68/push 0/imm32
1119 68/push 0/imm32
1120 89/<- %edx 4/r32/esp
1121 (tailor-exit-descriptor %edx 0x10)
1122
1123 (write _test-input-stream "fn foo -> _/eax: int, _/eax: int {\n")
1124 (write _test-input-stream "}\n")
1125
1126 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1127
1128
1129 89/<- %edx 4/r32/esp
1130 (flush _test-output-buffered-file)
1131 (flush _test-error-buffered-file)
1132 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1138
1139 (check-stream-equal _test-output-stream "" "F - test-function-with-outputs-in-conflicting-registers: output should be empty")
1140 (check-next-stream-line-equal _test-error-stream "fn foo: outputs must be in unique registers" "F - test-function-with-outputs-in-conflicting-registers: error message")
1141
1142 (check-ints-equal *(edx+4) 2 "F - test-function-with-outputs-in-conflicting-registers: exit status")
1143
1144 81 0/subop/add %esp 8/imm32
1145
1146 5d/pop-to-ebp
1147 c3/return
1148
1149 test-function-with-named-output:
1150
1151 55/push-ebp
1152 89/<- %ebp 4/r32/esp
1153
1154 (clear-stream _test-input-stream)
1155 (clear-stream $_test-input-buffered-file->buffer)
1156 (clear-stream _test-output-stream)
1157 (clear-stream $_test-output-buffered-file->buffer)
1158 (clear-stream _test-error-stream)
1159 (clear-stream $_test-error-buffered-file->buffer)
1160
1161 68/push 0/imm32
1162 68/push 0/imm32
1163 89/<- %edx 4/r32/esp
1164 (tailor-exit-descriptor %edx 0x10)
1165
1166 (write _test-input-stream "fn foo -> x/eax: int {\n")
1167 (write _test-input-stream " return 0\n")
1168 (write _test-input-stream "}\n")
1169
1170 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1171
1172
1173 89/<- %edx 4/r32/esp
1174 (flush _test-output-buffered-file)
1175 (flush _test-error-buffered-file)
1176 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1182
1183 (check-stream-equal _test-output-stream "" "F - test-function-with-named-output: output should be empty")
1184 (check-next-stream-line-equal _test-error-stream "fn foo: function outputs cannot be named; rename 'x' in the header to '_'" "F - test-function-with-named-output: error message")
1185
1186 (check-ints-equal *(edx+4) 2 "F - test-function-with-named-output: exit status")
1187
1188 81 0/subop/add %esp 8/imm32
1189
1190 5d/pop-to-ebp
1191 c3/return
1192
1193 test-return-with-wrong-type:
1194
1195 55/push-ebp
1196 89/<- %ebp 4/r32/esp
1197
1198 (clear-stream _test-input-stream)
1199 (clear-stream $_test-input-buffered-file->buffer)
1200 (clear-stream _test-output-stream)
1201 (clear-stream $_test-output-buffered-file->buffer)
1202 (clear-stream _test-error-stream)
1203 (clear-stream $_test-error-buffered-file->buffer)
1204
1205 68/push 0/imm32
1206 68/push 0/imm32
1207 89/<- %edx 4/r32/esp
1208 (tailor-exit-descriptor %edx 0x10)
1209
1210 (write _test-input-stream "fn foo -> _/eax: int {\n")
1211 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
1212 (write _test-input-stream " return x\n")
1213 (write _test-input-stream "}\n")
1214
1215 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1216
1217
1218 89/<- %edx 4/r32/esp
1219 (flush _test-output-buffered-file)
1220 (flush _test-error-buffered-file)
1221 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1227
1228 (check-stream-equal _test-output-stream "" "F - test-return-with-wrong-type: output should be empty")
1229 (check-next-stream-line-equal _test-error-stream "fn foo: return: 'x' has the wrong type" "F - test-return-with-wrong-type: error message")
1230
1231 (check-ints-equal *(edx+4) 2 "F - test-return-with-wrong-type: exit status")
1232
1233 81 0/subop/add %esp 8/imm32
1234
1235 5d/pop-to-ebp
1236 c3/return
1237
1238 test-missing-return:
1239
1240 55/push-ebp
1241 89/<- %ebp 4/r32/esp
1242
1243 (clear-stream _test-input-stream)
1244 (clear-stream $_test-input-buffered-file->buffer)
1245 (clear-stream _test-output-stream)
1246 (clear-stream $_test-output-buffered-file->buffer)
1247 (clear-stream _test-error-stream)
1248 (clear-stream $_test-error-buffered-file->buffer)
1249
1250 68/push 0/imm32
1251 68/push 0/imm32
1252 89/<- %edx 4/r32/esp
1253 (tailor-exit-descriptor %edx 0x10)
1254
1255 (write _test-input-stream "fn foo -> _/eax: int {\n")
1256 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
1257 (write _test-input-stream "}\n")
1258
1259 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1260
1261
1262 89/<- %edx 4/r32/esp
1263 (flush _test-output-buffered-file)
1264 (flush _test-error-buffered-file)
1265 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1271
1272 (check-stream-equal _test-output-stream "" "F - test-missing-return: output should be empty")
1273 (check-next-stream-line-equal _test-error-stream "fn foo: final statement should be a 'return'" "F - test-missing-return: error message")
1274
1275 (check-ints-equal *(edx+4) 2 "F - test-missing-return: exit status")
1276
1277 81 0/subop/add %esp 8/imm32
1278
1279 5d/pop-to-ebp
1280 c3/return
1281
1282 test-early-exit-without-return:
1283
1284 55/push-ebp
1285 89/<- %ebp 4/r32/esp
1286
1287 (clear-stream _test-input-stream)
1288 (clear-stream $_test-input-buffered-file->buffer)
1289 (clear-stream _test-output-stream)
1290 (clear-stream $_test-output-buffered-file->buffer)
1291 (clear-stream _test-error-stream)
1292 (clear-stream $_test-error-buffered-file->buffer)
1293
1294 68/push 0/imm32
1295 68/push 0/imm32
1296 89/<- %edx 4/r32/esp
1297 (tailor-exit-descriptor %edx 0x10)
1298
1299 (write _test-input-stream "fn foo -> _/eax: int {\n")
1300 (write _test-input-stream " break\n")
1301 (write _test-input-stream " return 0\n")
1302 (write _test-input-stream "}\n")
1303
1304 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1305
1306
1307 89/<- %edx 4/r32/esp
1308 (flush _test-output-buffered-file)
1309 (flush _test-error-buffered-file)
1310 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1316
1317 (check-stream-equal _test-output-stream "" "F - test-early-exit-without-return: output should be empty")
1318 (check-next-stream-line-equal _test-error-stream "fn foo has outputs, so you cannot 'break' out of the outermost block. Use 'return'." "F - test-early-exit-without-return: error message")
1319
1320 (check-ints-equal *(edx+4) 2 "F - test-early-exit-without-return: exit status")
1321
1322 81 0/subop/add %esp 8/imm32
1323
1324 5d/pop-to-ebp
1325 c3/return
1326
1327 test-return-with-too-few-inouts:
1328
1329 55/push-ebp
1330 89/<- %ebp 4/r32/esp
1331
1332 (clear-stream _test-input-stream)
1333 (clear-stream $_test-input-buffered-file->buffer)
1334 (clear-stream _test-output-stream)
1335 (clear-stream $_test-output-buffered-file->buffer)
1336 (clear-stream _test-error-stream)
1337 (clear-stream $_test-error-buffered-file->buffer)
1338
1339 68/push 0/imm32
1340 68/push 0/imm32
1341 89/<- %edx 4/r32/esp
1342 (tailor-exit-descriptor %edx 0x10)
1343
1344 (write _test-input-stream "fn foo -> _/eax: int {\n")
1345 (write _test-input-stream " return\n")
1346 (write _test-input-stream "}\n")
1347
1348 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1349
1350
1351 89/<- %edx 4/r32/esp
1352 (flush _test-output-buffered-file)
1353 (flush _test-error-buffered-file)
1354 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1360
1361 (check-stream-equal _test-output-stream "" "F - test-return-with-too-few-inouts: output should be empty")
1362 (check-next-stream-line-equal _test-error-stream "fn foo: return: too few inouts" "F - test-return-with-too-few-inouts: error message")
1363
1364 (check-ints-equal *(edx+4) 2 "F - test-return-with-too-few-inouts: exit status")
1365
1366 81 0/subop/add %esp 8/imm32
1367
1368 5d/pop-to-ebp
1369 c3/return
1370
1371 test-return-with-too-many-inouts:
1372
1373 55/push-ebp
1374 89/<- %ebp 4/r32/esp
1375
1376 (clear-stream _test-input-stream)
1377 (clear-stream $_test-input-buffered-file->buffer)
1378 (clear-stream _test-output-stream)
1379 (clear-stream $_test-output-buffered-file->buffer)
1380 (clear-stream _test-error-stream)
1381 (clear-stream $_test-error-buffered-file->buffer)
1382
1383 68/push 0/imm32
1384 68/push 0/imm32
1385 89/<- %edx 4/r32/esp
1386 (tailor-exit-descriptor %edx 0x10)
1387
1388 (write _test-input-stream "fn foo -> _/eax: int {\n")
1389 (write _test-input-stream " return 0, 0\n")
1390 (write _test-input-stream "}\n")
1391
1392 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1393
1394
1395 89/<- %edx 4/r32/esp
1396 (flush _test-output-buffered-file)
1397 (flush _test-error-buffered-file)
1398 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1404
1405 (check-stream-equal _test-output-stream "" "F - test-return-with-too-many-inouts: output should be empty")
1406 (check-next-stream-line-equal _test-error-stream "fn foo: return: too many inouts" "F - test-return-with-too-many-inouts: error message")
1407
1408 (check-ints-equal *(edx+4) 2 "F - test-return-with-too-many-inouts: exit status")
1409
1410 81 0/subop/add %esp 8/imm32
1411
1412 5d/pop-to-ebp
1413 c3/return
1414
1415 test-return-unavailable-value:
1416
1417 55/push-ebp
1418 89/<- %ebp 4/r32/esp
1419
1420 (clear-stream _test-input-stream)
1421 (clear-stream $_test-input-buffered-file->buffer)
1422 (clear-stream _test-output-stream)
1423 (clear-stream $_test-output-buffered-file->buffer)
1424 (clear-stream _test-error-stream)
1425 (clear-stream $_test-error-buffered-file->buffer)
1426
1427 68/push 0/imm32
1428 68/push 0/imm32
1429 89/<- %edx 4/r32/esp
1430 (tailor-exit-descriptor %edx 0x10)
1431
1432 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1433 (write _test-input-stream " var x/eax: int <- copy 0\n")
1434 (write _test-input-stream " var y/ecx: int <- copy 0\n")
1435 (write _test-input-stream " return y, x\n")
1436 (write _test-input-stream "}\n")
1437
1438 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1439
1440
1441 89/<- %edx 4/r32/esp
1442 (flush _test-output-buffered-file)
1443 (flush _test-error-buffered-file)
1444 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1450
1451 (check-stream-equal _test-output-stream "" "F - test-return-unavailable-value: output should be empty")
1452 (check-next-stream-line-equal _test-error-stream "fn foo: return: 'x' is no longer available" "F - test-return-unavailable-value: error message")
1453
1454 (check-ints-equal *(edx+4) 2 "F - test-return-unavailable-value: exit status")
1455
1456 81 0/subop/add %esp 8/imm32
1457
1458 5d/pop-to-ebp
1459 c3/return
1460
1461 test-convert-return-with-duplicate-values:
1462
1463 55/push-ebp
1464 89/<- %ebp 4/r32/esp
1465
1466 (clear-stream _test-input-stream)
1467 (clear-stream $_test-input-buffered-file->buffer)
1468 (clear-stream _test-output-stream)
1469 (clear-stream $_test-output-buffered-file->buffer)
1470
1471 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1472 (write _test-input-stream " var x/eax: int <- copy 0x34\n")
1473 (write _test-input-stream " return x, x\n")
1474 (write _test-input-stream "}\n")
1475
1476 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1477 (flush _test-output-buffered-file)
1478 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1484
1485 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-return-with-duplicate-values/0")
1486 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-return-with-duplicate-values/1")
1487 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-return-with-duplicate-values/2")
1488 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-return-with-duplicate-values/3")
1489 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-return-with-duplicate-values/4")
1490 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-return-with-duplicate-values/5")
1491 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-return-with-duplicate-values/6")
1492 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0x34/imm32" "F - test-convert-return-with-duplicate-values/7")
1493 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-return-with-duplicate-values/8")
1494 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000001/r32" "F - test-convert-return-with-duplicate-values/9")
1495 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-return-with-duplicate-values/10")
1496 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-return-with-duplicate-values/11")
1497 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-return-with-duplicate-values/12")
1498 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-return-with-duplicate-values/13")
1499 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-return-with-duplicate-values/14")
1500 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-return-with-duplicate-values/15")
1501 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-return-with-duplicate-values/16")
1502 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-return-with-duplicate-values/17")
1503
1504 89/<- %esp 5/r32/ebp
1505 5d/pop-to-ebp
1506 c3/return
1507
1508 test-convert-return-with-duplicate-values-2:
1509
1510 55/push-ebp
1511 89/<- %ebp 4/r32/esp
1512
1513 (clear-stream _test-input-stream)
1514 (clear-stream $_test-input-buffered-file->buffer)
1515 (clear-stream _test-output-stream)
1516 (clear-stream $_test-output-buffered-file->buffer)
1517
1518 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1519 (write _test-input-stream " var x/ecx: int <- copy 0x34\n")
1520 (write _test-input-stream " return x, x\n")
1521 (write _test-input-stream "}\n")
1522
1523 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1524 (flush _test-output-buffered-file)
1525 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1531
1532 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-return-with-duplicate-values-2/0")
1533 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-return-with-duplicate-values-2/1")
1534 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-return-with-duplicate-values-2/2")
1535 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-return-with-duplicate-values-2/3")
1536 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-return-with-duplicate-values-2/4")
1537 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-return-with-duplicate-values-2/5")
1538 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-return-with-duplicate-values-2/6")
1539 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x34/imm32" "F - test-convert-return-with-duplicate-values-2/7")
1540 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-return-with-duplicate-values-2/8")
1541 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000001/r32" "F - test-convert-return-with-duplicate-values-2/9")
1542 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-return-with-duplicate-values-2/10")
1543 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-return-with-duplicate-values-2/11")
1544 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-return-with-duplicate-values-2/12")
1545 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-return-with-duplicate-values-2/13")
1546 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-return-with-duplicate-values-2/14")
1547 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-return-with-duplicate-values-2/15")
1548 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-return-with-duplicate-values-2/16")
1549 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-return-with-duplicate-values-2/17")
1550
1551 89/<- %esp 5/r32/ebp
1552 5d/pop-to-ebp
1553 c3/return
1554
1555 test-convert-function-with-literal-arg:
1556
1557 55/push-ebp
1558 89/<- %ebp 4/r32/esp
1559
1560 (clear-stream _test-input-stream)
1561 (clear-stream $_test-input-buffered-file->buffer)
1562 (clear-stream _test-output-stream)
1563 (clear-stream $_test-output-buffered-file->buffer)
1564
1565 (write _test-input-stream "fn foo a: int, b: int -> _/eax: int {\n")
1566 (write _test-input-stream " var result/eax: int <- copy a\n")
1567 (write _test-input-stream " result <- add 1\n")
1568 (write _test-input-stream " return result\n")
1569 (write _test-input-stream "}\n")
1570
1571 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1572 (flush _test-output-buffered-file)
1573 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1579
1580 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg/0")
1581 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg/1")
1582 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg/2")
1583 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg/3")
1584 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg/4")
1585 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg/5")
1586 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-literal-arg/6")
1587 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-with-literal-arg/7")
1588 (check-next-stream-line-equal _test-output-stream " 05/add-to-eax 1/imm32" "F - test-convert-function-with-literal-arg/8")
1589 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-literal-arg/9")
1590 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg/10")
1591 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg/11")
1592 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg/12")
1593 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg/13")
1594 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg/14")
1595 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg/15")
1596 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg/16")
1597 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg/17")
1598
1599 89/<- %esp 5/r32/ebp
1600 5d/pop-to-ebp
1601 c3/return
1602
1603 test-convert-function-with-literal-arg-2:
1604
1605 55/push-ebp
1606 89/<- %ebp 4/r32/esp
1607
1608 (clear-stream _test-input-stream)
1609 (clear-stream $_test-input-buffered-file->buffer)
1610 (clear-stream _test-output-stream)
1611 (clear-stream $_test-output-buffered-file->buffer)
1612
1613 (write _test-input-stream "fn foo a: int, b: int -> _/ebx: int {\n")
1614 (write _test-input-stream " var result/ebx: int <- copy a\n")
1615 (write _test-input-stream " result <- add 1\n")
1616 (write _test-input-stream " return result\n")
1617 (write _test-input-stream "}\n")
1618
1619 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1620 (flush _test-output-buffered-file)
1621 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1627
1628 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg-2/0")
1629 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg-2/1")
1630 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg-2/2")
1631 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg-2/3")
1632 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg-2/4")
1633 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg-2/5")
1634 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-with-literal-arg-2/6")
1635 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/7")
1636 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %ebx 1/imm32" "F - test-convert-function-with-literal-arg-2/8")
1637 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/9")
1638 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg-2/10")
1639 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg-2/11")
1640 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg-2/12")
1641 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg-2/13")
1642 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg-2/14")
1643 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg-2/15")
1644 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg-2/16")
1645 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg-2/17")
1646
1647 89/<- %esp 5/r32/ebp
1648 5d/pop-to-ebp
1649 c3/return
1650
1651 test-convert-function-call-with-literal-arg:
1652
1653 55/push-ebp
1654 89/<- %ebp 4/r32/esp
1655
1656 (clear-stream _test-input-stream)
1657 (clear-stream $_test-input-buffered-file->buffer)
1658 (clear-stream _test-output-stream)
1659 (clear-stream $_test-output-buffered-file->buffer)
1660
1661 (write _test-input-stream "fn main -> _/ebx: int {\n")
1662 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
1663 (write _test-input-stream " return result\n")
1664 (write _test-input-stream "}\n")
1665 (write _test-input-stream "fn do-add a: int, b: int -> _/eax: int {\n")
1666 (write _test-input-stream " var result/eax: int <- copy a\n")
1667 (write _test-input-stream " result <- add b\n")
1668 (write _test-input-stream " return result\n")
1669 (write _test-input-stream "}\n")
1670
1671 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1672 (flush _test-output-buffered-file)
1673 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1679
1680 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-literal-arg/0")
1681 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/1")
1682 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/2")
1683 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/3")
1684 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/4")
1685 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-literal-arg/5")
1686 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
1687 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-literal-arg/7")
1688 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
1689 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
1690 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
1691 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/11")
1692 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-literal-arg/12")
1693 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/13")
1694 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/14")
1695 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/15")
1696 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/16")
1697 (check-next-stream-line-equal _test-output-stream "do-add:" "F - test-convert-function-call-with-literal-arg/17")
1698 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/18")
1699 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/19")
1700 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/20")
1701 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/21")
1702 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:loop:" "F - test-convert-function-call-with-literal-arg/22")
1703 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/23")
1704 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/24")
1705 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0x0000000c) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/25")
1706 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/26")
1707 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
1708 (check-next-stream-line-equal _test-output-stream " e9/jump $do-add:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/28")
1709 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/29")
1710 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:break:" "F - test-convert-function-call-with-literal-arg/30")
1711 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/31")
1712 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/32")
1713 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/33")
1714 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/34")
1715
1716 89/<- %esp 5/r32/ebp
1717 5d/pop-to-ebp
1718 c3/return
1719
1720 test-convert-function-call-with-literal-string-arg:
1721
1722 55/push-ebp
1723 89/<- %ebp 4/r32/esp
1724
1725 (clear-stream _test-input-stream)
1726 (clear-stream $_test-input-buffered-file->buffer)
1727 (clear-stream _test-output-stream)
1728 (clear-stream $_test-output-buffered-file->buffer)
1729
1730 (write _test-input-stream "fn foo {\n")
1731 (write _test-input-stream " string-func \"abc\"\n")
1732 (write _test-input-stream "}\n")
1733 (write _test-input-stream "sig string-func in: (addr array byte)\n")
1734
1735 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1736
1737
1738
1739 89/<- %esp 5/r32/ebp
1740 5d/pop-to-ebp
1741 c3/return
1742
1743 test-convert-function-call-with-null-addr:
1744
1745 55/push-ebp
1746 89/<- %ebp 4/r32/esp
1747
1748 (clear-stream _test-input-stream)
1749 (clear-stream $_test-input-buffered-file->buffer)
1750 (clear-stream _test-output-stream)
1751 (clear-stream $_test-output-buffered-file->buffer)
1752
1753 (write _test-input-stream "fn foo {\n")
1754 (write _test-input-stream " bar 0\n")
1755 (write _test-input-stream "}\n")
1756 (write _test-input-stream "sig bar in: (addr int)\n")
1757
1758 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1759
1760
1761
1762 89/<- %esp 5/r32/ebp
1763 5d/pop-to-ebp
1764 c3/return
1765
1766 test-convert-function-call-with-signature:
1767
1768 55/push-ebp
1769 89/<- %ebp 4/r32/esp
1770
1771 (clear-stream _test-input-stream)
1772 (clear-stream $_test-input-buffered-file->buffer)
1773 (clear-stream _test-output-stream)
1774 (clear-stream $_test-output-buffered-file->buffer)
1775
1776 (write _test-input-stream "fn main -> _/ebx: int {\n")
1777 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
1778 (write _test-input-stream " return result\n")
1779 (write _test-input-stream "}\n")
1780 (write _test-input-stream "sig do-add a: int, b: int -> _/eax: int\n")
1781
1782 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1783 (flush _test-output-buffered-file)
1784 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1790
1791 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-signature/0")
1792 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-signature/1")
1793 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-signature/2")
1794 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-signature/3")
1795 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-signature/4")
1796 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-signature/5")
1797 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
1798 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-signature/6")
1799 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
1800 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
1801 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
1802 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-signature/7")
1803 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-signature/8")
1804 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-signature/9")
1805 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-signature/10")
1806 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-signature/11")
1807 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-signature/12")
1808
1809 89/<- %esp 5/r32/ebp
1810 5d/pop-to-ebp
1811 c3/return
1812
1813 test-convert-function-with-local-var-in-mem:
1814
1815 55/push-ebp
1816 89/<- %ebp 4/r32/esp
1817
1818 (clear-stream _test-input-stream)
1819 (clear-stream $_test-input-buffered-file->buffer)
1820 (clear-stream _test-output-stream)
1821 (clear-stream $_test-output-buffered-file->buffer)
1822
1823 (write _test-input-stream "fn foo {\n")
1824 (write _test-input-stream " var x: int\n")
1825 (write _test-input-stream " increment x\n")
1826 (write _test-input-stream "}\n")
1827
1828 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1829 (flush _test-output-buffered-file)
1830 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1836
1837 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem/0")
1838 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem/1")
1839 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem/2")
1840 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem/3")
1841 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem/4")
1842 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem/5")
1843 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem/6")
1844 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem/7")
1845 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-mem/8")
1846 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem/9")
1847 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem/10")
1848 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem/11")
1849 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem/12")
1850 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem/13")
1851 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem/14")
1852
1853 89/<- %esp 5/r32/ebp
1854 5d/pop-to-ebp
1855 c3/return
1856
1857 test-convert-invalid-literal:
1858
1859 55/push-ebp
1860 89/<- %ebp 4/r32/esp
1861
1862 (clear-stream _test-input-stream)
1863 (clear-stream $_test-input-buffered-file->buffer)
1864 (clear-stream _test-output-stream)
1865 (clear-stream $_test-output-buffered-file->buffer)
1866 (clear-stream _test-error-stream)
1867 (clear-stream $_test-error-buffered-file->buffer)
1868
1869 68/push 0/imm32
1870 68/push 0/imm32
1871 89/<- %edx 4/r32/esp
1872 (tailor-exit-descriptor %edx 0x10)
1873
1874 (write _test-input-stream "fn foo {\n")
1875 (write _test-input-stream " increment 1n\n")
1876 (write _test-input-stream "}\n")
1877
1878 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1879
1880
1881 89/<- %edx 4/r32/esp
1882 (flush _test-output-buffered-file)
1883 (flush _test-error-buffered-file)
1884 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1890
1891 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-literal: output should be empty")
1892 (check-next-stream-line-equal _test-error-stream "fn foo: variable '1n' cannot begin with a digit (or do you have a typo in a number?)" "F - test-convert-invalid-literal: error message")
1893
1894 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-literal: exit status")
1895
1896 81 0/subop/add %esp 8/imm32
1897
1898 5d/pop-to-ebp
1899 c3/return
1900
1901 test-local-var-in-mem-has-no-initializer:
1902
1903 55/push-ebp
1904 89/<- %ebp 4/r32/esp
1905
1906 (clear-stream _test-input-stream)
1907 (clear-stream $_test-input-buffered-file->buffer)
1908 (clear-stream _test-output-stream)
1909 (clear-stream $_test-output-buffered-file->buffer)
1910 (clear-stream _test-error-stream)
1911 (clear-stream $_test-error-buffered-file->buffer)
1912
1913 68/push 0/imm32
1914 68/push 0/imm32
1915 89/<- %edx 4/r32/esp
1916 (tailor-exit-descriptor %edx 0x10)
1917
1918 (write _test-input-stream "fn foo {\n")
1919 (write _test-input-stream " var x: int <- copy 0\n")
1920 (write _test-input-stream " increment x\n")
1921 (write _test-input-stream "}\n")
1922
1923 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1924
1925
1926 89/<- %edx 4/r32/esp
1927 (flush _test-output-buffered-file)
1928 (flush _test-error-buffered-file)
1929 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1935
1936 (check-stream-equal _test-output-stream "" "F - test-var-in-mem-has-no-initializer: output should be empty")
1937 (check-next-stream-line-equal _test-error-stream "fn foo: var x: variables on the stack can't take an initializer" "F - test-var-in-mem-has-no-initializer: error message")
1938
1939 (check-ints-equal *(edx+4) 2 "F - test-var-in-mem-has-no-initializer: exit status")
1940
1941 81 0/subop/add %esp 8/imm32
1942
1943 5d/pop-to-ebp
1944 c3/return
1945
1946 test-convert-function-with-local-var-with-compound-type-in-mem:
1947
1948 55/push-ebp
1949 89/<- %ebp 4/r32/esp
1950
1951 (clear-stream _test-input-stream)
1952 (clear-stream $_test-input-buffered-file->buffer)
1953 (clear-stream _test-output-stream)
1954 (clear-stream $_test-output-buffered-file->buffer)
1955
1956 (write _test-input-stream "fn foo {\n")
1957 (write _test-input-stream " var x: (addr int)\n")
1958 (write _test-input-stream " copy-to x, 0\n")
1959 (write _test-input-stream "}\n")
1960
1961 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1962 (flush _test-output-buffered-file)
1963 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1969
1970 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/0")
1971 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/1")
1972 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/2")
1973 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/3")
1974 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-compound-type-in-mem/4")
1975 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/5")
1976 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-compound-type-in-mem/6")
1977 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy *(ebp+0xfffffffc) 0/imm32" "F - test-convert-function-with-local-var-with-compound-type-in-mem/7")
1978 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-with-compound-type-in-mem/8")
1979 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-compound-type-in-mem/9")
1980 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/10")
1981 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/11")
1982 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/12")
1983 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/13")
1984 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-compound-type-in-mem/14")
1985
1986 89/<- %esp 5/r32/ebp
1987 5d/pop-to-ebp
1988 c3/return
1989
1990 test-convert-function-with-local-var-in-reg:
1991
1992 55/push-ebp
1993 89/<- %ebp 4/r32/esp
1994
1995 (clear-stream _test-input-stream)
1996 (clear-stream $_test-input-buffered-file->buffer)
1997 (clear-stream _test-output-stream)
1998 (clear-stream $_test-output-buffered-file->buffer)
1999
2000 (write _test-input-stream "fn foo {\n")
2001 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2002 (write _test-input-stream " x <- increment\n")
2003 (write _test-input-stream "}\n")
2004
2005 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2006 (flush _test-output-buffered-file)
2007 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2013
2014 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-reg/0")
2015 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-reg/1")
2016 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-reg/2")
2017 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-reg/3")
2018 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-reg/4")
2019 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-reg/5")
2020 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-reg/6")
2021 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-reg/7")
2022 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-local-var-in-reg/8")
2023 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-reg/9")
2024 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-reg/10")
2025 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-reg/11")
2026 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-reg/12")
2027 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-reg/13")
2028 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-reg/14")
2029 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-reg/15")
2030
2031 89/<- %esp 5/r32/ebp
2032 5d/pop-to-ebp
2033 c3/return
2034
2035 test-convert-function-with-allocate:
2036
2037 55/push-ebp
2038 89/<- %ebp 4/r32/esp
2039
2040 (clear-stream _test-input-stream)
2041 (clear-stream $_test-input-buffered-file->buffer)
2042 (clear-stream _test-output-stream)
2043 (clear-stream $_test-output-buffered-file->buffer)
2044
2045 (write _test-input-stream "fn foo {\n")
2046 (write _test-input-stream " var x/ecx: (addr handle int) <- copy 0\n")
2047 (write _test-input-stream " allocate x\n")
2048 (write _test-input-stream "}\n")
2049
2050 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2051 (flush _test-output-buffered-file)
2052 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2058
2059 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-allocate/0")
2060 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-allocate/1")
2061 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-allocate/2")
2062 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-allocate/3")
2063 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-allocate/4")
2064 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-allocate/5")
2065 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-allocate/6")
2066 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-allocate/7")
2067 (check-next-stream-line-equal _test-output-stream " (allocate Heap 0x00000004 %ecx)" "F - test-convert-function-with-allocate/8")
2068 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-allocate/9")
2069 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-allocate/10")
2070 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-allocate/11")
2071 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-allocate/12")
2072 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-allocate/13")
2073 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-allocate/14")
2074 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-allocate/15")
2075
2076 89/<- %esp 5/r32/ebp
2077 5d/pop-to-ebp
2078 c3/return
2079
2080 test-initializer-in-hex:
2081
2082 55/push-ebp
2083 89/<- %ebp 4/r32/esp
2084
2085 (clear-stream _test-input-stream)
2086 (clear-stream $_test-input-buffered-file->buffer)
2087 (clear-stream _test-output-stream)
2088 (clear-stream $_test-output-buffered-file->buffer)
2089 (clear-stream _test-error-stream)
2090 (clear-stream $_test-error-buffered-file->buffer)
2091
2092 68/push 0/imm32
2093 68/push 0/imm32
2094 89/<- %edx 4/r32/esp
2095 (tailor-exit-descriptor %edx 0x10)
2096
2097 (write _test-input-stream "fn foo {\n")
2098 (write _test-input-stream " var x/ecx: int <- copy 10\n")
2099 (write _test-input-stream "}\n")
2100
2101 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2102
2103
2104 89/<- %edx 4/r32/esp
2105 (flush _test-output-buffered-file)
2106 (flush _test-error-buffered-file)
2107 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2113
2114 (check-stream-equal _test-output-stream "" "F - test-initializer-in-hex: output should be empty")
2115 (check-next-stream-line-equal _test-error-stream "literal integers are always hex in Mu; start '10' with a '0x' to be unambiguous, converting it to hexadecimal as necessary." "F - test-initializer-in-hex: error message")
2116
2117 (check-ints-equal *(edx+4) 2 "F - test-initializer-in-hex: exit status")
2118
2119 81 0/subop/add %esp 8/imm32
2120
2121 5d/pop-to-ebp
2122 c3/return
2123
2124 test-convert-function-with-second-local-var-in-same-reg:
2125
2126 55/push-ebp
2127 89/<- %ebp 4/r32/esp
2128
2129 (clear-stream _test-input-stream)
2130 (clear-stream $_test-input-buffered-file->buffer)
2131 (clear-stream _test-output-stream)
2132 (clear-stream $_test-output-buffered-file->buffer)
2133
2134 (write _test-input-stream "fn foo {\n")
2135 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2136 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2137 (write _test-input-stream " y <- increment\n")
2138 (write _test-input-stream "}\n")
2139
2140 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2141 (flush _test-output-buffered-file)
2142 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2148
2149 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-second-local-var-in-same-reg/0")
2150 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-second-local-var-in-same-reg/1")
2151 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/2")
2152 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-second-local-var-in-same-reg/3")
2153 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-second-local-var-in-same-reg/4")
2154 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-second-local-var-in-same-reg/5")
2155 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-second-local-var-in-same-reg/6")
2156 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-second-local-var-in-same-reg/7")
2157 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-second-local-var-in-same-reg/8")
2158 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-second-local-var-in-same-reg/9")
2159 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-second-local-var-in-same-reg/10")
2160 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-second-local-var-in-same-reg/11")
2161 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-second-local-var-in-same-reg/12")
2162 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-second-local-var-in-same-reg/13")
2163 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-second-local-var-in-same-reg/14")
2164 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/15")
2165 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-second-local-var-in-same-reg/16")
2166
2167 89/<- %esp 5/r32/ebp
2168 5d/pop-to-ebp
2169 c3/return
2170
2171 test-read-clobbered-reg-var:
2172
2173 55/push-ebp
2174 89/<- %ebp 4/r32/esp
2175
2176 (clear-stream _test-input-stream)
2177 (clear-stream $_test-input-buffered-file->buffer)
2178 (clear-stream _test-output-stream)
2179 (clear-stream $_test-output-buffered-file->buffer)
2180 (clear-stream _test-error-stream)
2181 (clear-stream $_test-error-buffered-file->buffer)
2182
2183 68/push 0/imm32
2184 68/push 0/imm32
2185 89/<- %edx 4/r32/esp
2186 (tailor-exit-descriptor %edx 0x10)
2187
2188 (write _test-input-stream "fn foo {\n")
2189 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2190 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2191 (write _test-input-stream " x <- increment\n")
2192 (write _test-input-stream "}\n")
2193
2194 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2195
2196
2197 89/<- %edx 4/r32/esp
2198 (flush _test-output-buffered-file)
2199 (flush _test-error-buffered-file)
2200 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2206
2207 (check-stream-equal _test-output-stream "" "F - test-read-clobbered-reg-var: output should be empty")
2208 (check-next-stream-line-equal _test-error-stream "fn foo: register ecx reads var 'x' after writing var 'y'" "F - test-read-clobbered-reg-var: error message")
2209
2210 (check-ints-equal *(edx+4) 2 "F - test-read-clobbered-reg-var: exit status")
2211
2212 81 0/subop/add %esp 8/imm32
2213
2214 5d/pop-to-ebp
2215 c3/return
2216
2217 test-overlapping-int-fp-registers:
2218
2219 55/push-ebp
2220 89/<- %ebp 4/r32/esp
2221
2222 (clear-stream _test-input-stream)
2223 (clear-stream $_test-input-buffered-file->buffer)
2224 (clear-stream _test-output-stream)
2225 (clear-stream $_test-output-buffered-file->buffer)
2226 (clear-stream _test-error-stream)
2227 (clear-stream $_test-error-buffered-file->buffer)
2228
2229 68/push 0/imm32
2230 68/push 0/imm32
2231 89/<- %edx 4/r32/esp
2232 (tailor-exit-descriptor %edx 0x10)
2233
2234 (write _test-input-stream "fn foo {\n")
2235 (write _test-input-stream " var x/eax: int <- copy 3\n")
2236 (write _test-input-stream " var y/xmm0: float <- convert x\n")
2237 (write _test-input-stream " x <- increment\n")
2238 (write _test-input-stream "}\n")
2239
2240 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2241
2242
2243 89/<- %edx 4/r32/esp
2244 (flush _test-output-buffered-file)
2245 (flush _test-error-buffered-file)
2246 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2252
2253 (check-next-stream-line-equal _test-error-stream "" "F - test-overlapping-int-fp-registers: error message")
2254
2255
2256 81 0/subop/add %esp 8/imm32
2257
2258 5d/pop-to-ebp
2259 c3/return
2260
2261 test-convert-function-call:
2262
2263 55/push-ebp
2264 89/<- %ebp 4/r32/esp
2265
2266 (clear-stream _test-input-stream)
2267 (clear-stream $_test-input-buffered-file->buffer)
2268 (clear-stream _test-output-stream)
2269 (clear-stream $_test-output-buffered-file->buffer)
2270
2271 (write _test-input-stream "fn main -> _/ebx: int {\n")
2272 (write _test-input-stream " var result/ebx: int <- foo\n")
2273 (write _test-input-stream " return result\n")
2274 (write _test-input-stream "}\n")
2275 (write _test-input-stream "fn foo -> _/ebx: int {\n")
2276 (write _test-input-stream " var result/ebx: int <- copy 3\n")
2277 (write _test-input-stream " return result\n")
2278 (write _test-input-stream "}\n")
2279
2280 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2281 (flush _test-output-buffered-file)
2282 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2288
2289 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call/0")
2290 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/1")
2291 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/2")
2292 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/3")
2293 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/4")
2294 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call/5")
2295 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
2296 (check-next-stream-line-equal _test-output-stream " (foo)" "F - test-convert-function-call/6")
2297 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2298 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
2299 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2300 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/7")
2301 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call/8")
2302 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/9")
2303 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/10")
2304 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/11")
2305 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/12")
2306 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call/13")
2307 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/14")
2308 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/15")
2309 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/16")
2310 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/17")
2311 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call/18")
2312 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
2313 (check-next-stream-line-equal _test-output-stream " bb/copy-to-ebx 3/imm32" "F - test-convert-function-call/19")
2314 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2315 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
2316 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2317 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/20")
2318 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call/21")
2319 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/22")
2320 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/23")
2321 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/24")
2322 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/25")
2323
2324 89/<- %esp 5/r32/ebp
2325 5d/pop-to-ebp
2326 c3/return
2327
2328 test-convert-function-call-with-inout-with-compound-type:
2329
2330 55/push-ebp
2331 89/<- %ebp 4/r32/esp
2332
2333 (clear-stream _test-input-stream)
2334 (clear-stream $_test-input-buffered-file->buffer)
2335 (clear-stream _test-output-stream)
2336 (clear-stream $_test-output-buffered-file->buffer)
2337
2338 (write _test-input-stream "fn f {\n")
2339 (write _test-input-stream " var x: (addr int)\n")
2340 (write _test-input-stream " g x\n")
2341 (write _test-input-stream "}\n")
2342 (write _test-input-stream "fn g a: (addr int) {\n")
2343 (write _test-input-stream "}\n")
2344
2345 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2346 (flush _test-output-buffered-file)
2347 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2353
2354 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-inout-with-compound-type/0")
2355 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/1")
2356 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/2")
2357 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/3")
2358 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-inout-with-compound-type/4")
2359 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-inout-with-compound-type/5")
2360 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-inout-with-compound-type/6")
2361 (check-next-stream-line-equal _test-output-stream " (g *(ebp+0xfffffffc))" "F - test-convert-function-call-with-inout-with-compound-type/7")
2362 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-call-with-inout-with-compound-type/8")
2363 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-inout-with-compound-type/9")
2364 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-inout-with-compound-type/10")
2365 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/11")
2366 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/12")
2367 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/13")
2368 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/14")
2369 (check-next-stream-line-equal _test-output-stream "g:" "F - test-convert-function-call-with-inout-with-compound-type/15")
2370 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/16")
2371 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/17")
2372 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/18")
2373 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/19")
2374 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/20")
2375 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/21")
2376 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/22")
2377
2378 89/<- %esp 5/r32/ebp
2379 5d/pop-to-ebp
2380 c3/return
2381
2382 test-convert-function-call-with-inout-with-type-parameter:
2383
2384 55/push-ebp
2385 89/<- %ebp 4/r32/esp
2386
2387 (clear-stream _test-input-stream)
2388 (clear-stream $_test-input-buffered-file->buffer)
2389 (clear-stream _test-output-stream)
2390 (clear-stream $_test-output-buffered-file->buffer)
2391 (clear-stream _test-error-stream)
2392 (clear-stream $_test-error-buffered-file->buffer)
2393
2394 68/push 0/imm32
2395 68/push 0/imm32
2396 89/<- %edx 4/r32/esp
2397 (tailor-exit-descriptor %edx 0x10)
2398
2399 (write _test-input-stream "fn f {\n")
2400 (write _test-input-stream " var x: (addr int)\n")
2401 (write _test-input-stream " g x\n")
2402 (write _test-input-stream "}\n")
2403 (write _test-input-stream "fn g a: (addr _) {\n")
2404 (write _test-input-stream "}\n")
2405
2406 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2407
2408
2409 89/<- %edx 4/r32/esp
2410 (flush _test-output-buffered-file)
2411 (flush _test-error-buffered-file)
2412 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2418
2419 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-type-parameter: error stream should be empty")
2420
2421
2422 81 0/subop/add %esp 8/imm32
2423
2424 5d/pop-to-ebp
2425 c3/return
2426
2427 test-convert-function-call-with-incorrect-inout-type:
2428
2429 55/push-ebp
2430 89/<- %ebp 4/r32/esp
2431
2432 (clear-stream _test-input-stream)
2433 (clear-stream $_test-input-buffered-file->buffer)
2434 (clear-stream _test-output-stream)
2435 (clear-stream $_test-output-buffered-file->buffer)
2436 (clear-stream _test-error-stream)
2437 (clear-stream $_test-error-buffered-file->buffer)
2438
2439 68/push 0/imm32
2440 68/push 0/imm32
2441 89/<- %edx 4/r32/esp
2442 (tailor-exit-descriptor %edx 0x10)
2443
2444 (write _test-input-stream "fn f {\n")
2445 (write _test-input-stream " var x: int\n")
2446 (write _test-input-stream " g x\n")
2447 (write _test-input-stream "}\n")
2448 (write _test-input-stream "fn g a: foo {\n")
2449 (write _test-input-stream "}\n")
2450
2451 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2452
2453
2454 89/<- %edx 4/r32/esp
2455 (flush _test-output-buffered-file)
2456 (flush _test-error-buffered-file)
2457 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2463
2464 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-inout-type: output should be empty")
2465 (check-next-stream-line-equal _test-error-stream "fn f: call g: type for inout 'x' is not right" "F - test-convert-function-call-with-incorrect-inout-type: error message")
2466
2467 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-inout-type: exit status")
2468
2469 81 0/subop/add %esp 8/imm32
2470 5d/pop-to-ebp
2471 c3/return
2472
2473 test-convert-function-call-with-inout-with-incorrect-compound-type:
2474
2475 55/push-ebp
2476 89/<- %ebp 4/r32/esp
2477
2478 (clear-stream _test-input-stream)
2479 (clear-stream $_test-input-buffered-file->buffer)
2480 (clear-stream _test-output-stream)
2481 (clear-stream $_test-output-buffered-file->buffer)
2482 (clear-stream _test-error-stream)
2483 (clear-stream $_test-error-buffered-file->buffer)
2484
2485 68/push 0/imm32
2486 68/push 0/imm32
2487 89/<- %edx 4/r32/esp
2488 (tailor-exit-descriptor %edx 0x10)
2489
2490 (write _test-input-stream "fn f {\n")
2491 (write _test-input-stream " var x: (addr int)\n")
2492 (write _test-input-stream " g x\n")
2493 (write _test-input-stream "}\n")
2494 (write _test-input-stream "fn g a: (addr bool) {\n")
2495 (write _test-input-stream "}\n")
2496
2497 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2498
2499
2500 89/<- %edx 4/r32/esp
2501 (flush _test-output-buffered-file)
2502 (flush _test-error-buffered-file)
2503 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2509
2510 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incorrect-compound-type: output should be empty")
2511 (check-next-stream-line-equal _test-error-stream "fn f: call g: type for inout 'x' is not right" "F - test-convert-function-call-with-inout-with-incorrect-compound-type: error message")
2512
2513 81 0/subop/add %esp 8/imm32
2514
2515 5d/pop-to-ebp
2516 c3/return
2517
2518 test-convert-function-call-with-inout-with-multiple-type-parameters:
2519
2520 55/push-ebp
2521 89/<- %ebp 4/r32/esp
2522
2523 (clear-stream _test-input-stream)
2524 (clear-stream $_test-input-buffered-file->buffer)
2525 (clear-stream _test-output-stream)
2526 (clear-stream $_test-output-buffered-file->buffer)
2527 (clear-stream _test-error-stream)
2528 (clear-stream $_test-error-buffered-file->buffer)
2529
2530 68/push 0/imm32
2531 68/push 0/imm32
2532 89/<- %edx 4/r32/esp
2533 (tailor-exit-descriptor %edx 0x10)
2534
2535 (write _test-input-stream "fn f {\n")
2536 (write _test-input-stream " var x: (addr int)\n")
2537 (write _test-input-stream " var y: (addr int)\n")
2538 (write _test-input-stream " g x, y\n")
2539 (write _test-input-stream "}\n")
2540 (write _test-input-stream "fn g a: (addr _), b: (addr _) {\n")
2541 (write _test-input-stream "}\n")
2542
2543 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2544
2545
2546 89/<- %edx 4/r32/esp
2547 (flush _test-output-buffered-file)
2548 (flush _test-error-buffered-file)
2549 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2555
2556 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-multiple-type-parameters: error stream should be empty")
2557
2558
2559 81 0/subop/add %esp 8/imm32
2560
2561 5d/pop-to-ebp
2562 c3/return
2563
2564 test-type-parameter-matches-rest-of-type:
2565
2566 55/push-ebp
2567 89/<- %ebp 4/r32/esp
2568
2569 (clear-stream _test-input-stream)
2570 (clear-stream $_test-input-buffered-file->buffer)
2571 (clear-stream _test-output-stream)
2572 (clear-stream $_test-output-buffered-file->buffer)
2573 (clear-stream _test-error-stream)
2574 (clear-stream $_test-error-buffered-file->buffer)
2575
2576 68/push 0/imm32
2577 68/push 0/imm32
2578 89/<- %edx 4/r32/esp
2579 (tailor-exit-descriptor %edx 0x10)
2580
2581 (write _test-input-stream "fn f {\n")
2582 (write _test-input-stream " var x: (addr array int)\n")
2583 (write _test-input-stream " g x\n")
2584 (write _test-input-stream "}\n")
2585 (write _test-input-stream "fn g a: (addr _) {\n")
2586 (write _test-input-stream "}\n")
2587
2588 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2589
2590
2591 89/<- %edx 4/r32/esp
2592 (flush _test-output-buffered-file)
2593 (flush _test-error-buffered-file)
2594 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2600
2601 (check-stream-equal _test-error-stream "" "F - test-type-parameter-matches-rest-of-type: error stream should be empty")
2602
2603
2604 81 0/subop/add %esp 8/imm32
2605
2606 5d/pop-to-ebp
2607 c3/return
2608
2609 test-convert-function-call-with-inout-with-incompatible-type-parameters:
2610
2611 55/push-ebp
2612 89/<- %ebp 4/r32/esp
2613
2614 (clear-stream _test-input-stream)
2615 (clear-stream $_test-input-buffered-file->buffer)
2616 (clear-stream _test-output-stream)
2617 (clear-stream $_test-output-buffered-file->buffer)
2618 (clear-stream _test-error-stream)
2619 (clear-stream $_test-error-buffered-file->buffer)
2620
2621 68/push 0/imm32
2622 68/push 0/imm32
2623 89/<- %edx 4/r32/esp
2624 (tailor-exit-descriptor %edx 0x10)
2625
2626 (write _test-input-stream "fn f {\n")
2627 (write _test-input-stream " var x: (addr int)\n")
2628 (write _test-input-stream " var y: (addr boolean)\n")
2629 (write _test-input-stream " g x, y\n")
2630 (write _test-input-stream "}\n")
2631 (write _test-input-stream "fn g a: (addr _T), b: (addr _T) {\n")
2632 (write _test-input-stream "}\n")
2633
2634 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2635
2636
2637 89/<- %edx 4/r32/esp
2638 (flush _test-output-buffered-file)
2639 (flush _test-error-buffered-file)
2640 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2646
2647 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incompatible-type-parameters: output should be empty")
2648 (check-next-stream-line-equal _test-error-stream "fn f: call g: type for inout 'y' is not right" "F - test-convert-function-call-with-inout-with-incompatible-type-parameters: error message")
2649
2650 81 0/subop/add %esp 8/imm32
2651
2652 5d/pop-to-ebp
2653 c3/return
2654
2655 test-convert-function-call-with-too-few-inouts:
2656
2657 55/push-ebp
2658 89/<- %ebp 4/r32/esp
2659
2660 (clear-stream _test-input-stream)
2661 (clear-stream $_test-input-buffered-file->buffer)
2662 (clear-stream _test-output-stream)
2663 (clear-stream $_test-output-buffered-file->buffer)
2664 (clear-stream _test-error-stream)
2665 (clear-stream $_test-error-buffered-file->buffer)
2666
2667 68/push 0/imm32
2668 68/push 0/imm32
2669 89/<- %edx 4/r32/esp
2670 (tailor-exit-descriptor %edx 0x10)
2671
2672 (write _test-input-stream "fn f {\n")
2673 (write _test-input-stream " g\n")
2674 (write _test-input-stream "}\n")
2675 (write _test-input-stream "fn g a: int {\n")
2676 (write _test-input-stream "}\n")
2677
2678 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2679
2680
2681 89/<- %edx 4/r32/esp
2682 (flush _test-output-buffered-file)
2683 (flush _test-error-buffered-file)
2684 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2690
2691 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-inouts: output should be empty")
2692 (check-next-stream-line-equal _test-error-stream "fn f: call g: too few inouts" "F - test-convert-function-call-with-too-few-inouts: error message")
2693
2694 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-inouts: exit status")
2695
2696 81 0/subop/add %esp 8/imm32
2697 5d/pop-to-ebp
2698 c3/return
2699
2700 test-convert-function-call-with-too-many-inouts:
2701
2702 55/push-ebp
2703 89/<- %ebp 4/r32/esp
2704
2705 (clear-stream _test-input-stream)
2706 (clear-stream $_test-input-buffered-file->buffer)
2707 (clear-stream _test-output-stream)
2708 (clear-stream $_test-output-buffered-file->buffer)
2709 (clear-stream _test-error-stream)
2710 (clear-stream $_test-error-buffered-file->buffer)
2711
2712 68/push 0/imm32
2713 68/push 0/imm32
2714 89/<- %edx 4/r32/esp
2715 (tailor-exit-descriptor %edx 0x10)
2716
2717 (write _test-input-stream "fn f {\n")
2718 (write _test-input-stream " var x: int\n")
2719 (write _test-input-stream " g x\n")
2720 (write _test-input-stream "}\n")
2721 (write _test-input-stream "fn g {\n")
2722 (write _test-input-stream "}\n")
2723
2724 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2725
2726
2727 89/<- %edx 4/r32/esp
2728 (flush _test-output-buffered-file)
2729 (flush _test-error-buffered-file)
2730 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2736
2737 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-inouts: output should be empty")
2738 (check-next-stream-line-equal _test-error-stream "fn f: call g: too many inouts" "F - test-convert-function-call-with-too-many-inouts: error message")
2739
2740 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-inouts: exit status")
2741
2742 81 0/subop/add %esp 8/imm32
2743 5d/pop-to-ebp
2744 c3/return
2745
2746 test-convert-function-call-with-incorrect-output-type:
2747
2748 55/push-ebp
2749 89/<- %ebp 4/r32/esp
2750
2751 (clear-stream _test-input-stream)
2752 (clear-stream $_test-input-buffered-file->buffer)
2753 (clear-stream _test-output-stream)
2754 (clear-stream $_test-output-buffered-file->buffer)
2755 (clear-stream _test-error-stream)
2756 (clear-stream $_test-error-buffered-file->buffer)
2757
2758 68/push 0/imm32
2759 68/push 0/imm32
2760 89/<- %edx 4/r32/esp
2761 (tailor-exit-descriptor %edx 0x10)
2762
2763 (write _test-input-stream "fn f {\n")
2764 (write _test-input-stream " var x/eax: int <- g\n")
2765 (write _test-input-stream "}\n")
2766 (write _test-input-stream "fn g -> _/eax: foo {\n")
2767 (write _test-input-stream "}\n")
2768
2769 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2770
2771
2772 89/<- %edx 4/r32/esp
2773 (flush _test-output-buffered-file)
2774 (flush _test-error-buffered-file)
2775 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2781
2782 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-type: output should be empty")
2783 (check-next-stream-line-equal _test-error-stream "fn f: call g: type for output 'x' is not right" "F - test-convert-function-call-with-incorrect-output-type: error message")
2784
2785 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-type: exit status")
2786
2787 81 0/subop/add %esp 8/imm32
2788 5d/pop-to-ebp
2789 c3/return
2790
2791 test-convert-function-call-with-too-few-outputs:
2792
2793 55/push-ebp
2794 89/<- %ebp 4/r32/esp
2795
2796 (clear-stream _test-input-stream)
2797 (clear-stream $_test-input-buffered-file->buffer)
2798 (clear-stream _test-output-stream)
2799 (clear-stream $_test-output-buffered-file->buffer)
2800 (clear-stream _test-error-stream)
2801 (clear-stream $_test-error-buffered-file->buffer)
2802
2803 68/push 0/imm32
2804 68/push 0/imm32
2805 89/<- %edx 4/r32/esp
2806 (tailor-exit-descriptor %edx 0x10)
2807
2808 (write _test-input-stream "fn f {\n")
2809 (write _test-input-stream " g\n")
2810 (write _test-input-stream "}\n")
2811 (write _test-input-stream "fn g -> _/eax: int {\n")
2812 (write _test-input-stream "}\n")
2813
2814 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2815
2816
2817 89/<- %edx 4/r32/esp
2818 (flush _test-output-buffered-file)
2819 (flush _test-error-buffered-file)
2820 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2826
2827 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-outputs: output should be empty")
2828 (check-next-stream-line-equal _test-error-stream "fn f: call g: too few outputs" "F - test-convert-function-call-with-too-few-outputs: error message")
2829
2830 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-outputs: exit status")
2831
2832 81 0/subop/add %esp 8/imm32
2833 5d/pop-to-ebp
2834 c3/return
2835
2836 test-convert-function-call-with-too-many-outputs:
2837
2838 55/push-ebp
2839 89/<- %ebp 4/r32/esp
2840
2841 (clear-stream _test-input-stream)
2842 (clear-stream $_test-input-buffered-file->buffer)
2843 (clear-stream _test-output-stream)
2844 (clear-stream $_test-output-buffered-file->buffer)
2845 (clear-stream _test-error-stream)
2846 (clear-stream $_test-error-buffered-file->buffer)
2847
2848 68/push 0/imm32
2849 68/push 0/imm32
2850 89/<- %edx 4/r32/esp
2851 (tailor-exit-descriptor %edx 0x10)
2852
2853 (write _test-input-stream "fn f {\n")
2854 (write _test-input-stream " var x/eax: int <- g\n")
2855 (write _test-input-stream "}\n")
2856 (write _test-input-stream "fn g {\n")
2857 (write _test-input-stream "}\n")
2858
2859 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2860
2861
2862 89/<- %edx 4/r32/esp
2863 (flush _test-output-buffered-file)
2864 (flush _test-error-buffered-file)
2865 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2871
2872 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-outputs: output should be empty")
2873 (check-next-stream-line-equal _test-error-stream "fn f: call g: too many outputs" "F - test-convert-function-call-with-too-many-outputs: error message")
2874
2875 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-outputs: exit status")
2876
2877 81 0/subop/add %esp 8/imm32
2878 5d/pop-to-ebp
2879 c3/return
2880
2881 test-convert-function-call-with-missing-output-register:
2882
2883 55/push-ebp
2884 89/<- %ebp 4/r32/esp
2885
2886 (clear-stream _test-input-stream)
2887 (clear-stream $_test-input-buffered-file->buffer)
2888 (clear-stream _test-output-stream)
2889 (clear-stream $_test-output-buffered-file->buffer)
2890 (clear-stream _test-error-stream)
2891 (clear-stream $_test-error-buffered-file->buffer)
2892
2893 68/push 0/imm32
2894 68/push 0/imm32
2895 89/<- %edx 4/r32/esp
2896 (tailor-exit-descriptor %edx 0x10)
2897
2898 (write _test-input-stream "fn f {\n")
2899 (write _test-input-stream " var x: int\n")
2900 (write _test-input-stream " x <- g\n")
2901 (write _test-input-stream "}\n")
2902 (write _test-input-stream "fn g -> _/eax: int {\n")
2903 (write _test-input-stream "}\n")
2904
2905 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2906
2907
2908 89/<- %edx 4/r32/esp
2909 (flush _test-output-buffered-file)
2910 (flush _test-error-buffered-file)
2911 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2917
2918 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-missing-output-register: output should be empty")
2919 (check-next-stream-line-equal _test-error-stream "fn f: call g: output 'x' is not in a register" "F - test-convert-function-call-with-missing-output-register: error message")
2920
2921 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-missing-output-register: exit status")
2922
2923 81 0/subop/add %esp 8/imm32
2924 5d/pop-to-ebp
2925 c3/return
2926
2927 test-convert-function-call-with-incorrect-output-register:
2928
2929 55/push-ebp
2930 89/<- %ebp 4/r32/esp
2931
2932 (clear-stream _test-input-stream)
2933 (clear-stream $_test-input-buffered-file->buffer)
2934 (clear-stream _test-output-stream)
2935 (clear-stream $_test-output-buffered-file->buffer)
2936 (clear-stream _test-error-stream)
2937 (clear-stream $_test-error-buffered-file->buffer)
2938
2939 68/push 0/imm32
2940 68/push 0/imm32
2941 89/<- %edx 4/r32/esp
2942 (tailor-exit-descriptor %edx 0x10)
2943
2944 (write _test-input-stream "fn f {\n")
2945 (write _test-input-stream " var x/ecx: int <- g\n")
2946 (write _test-input-stream "}\n")
2947 (write _test-input-stream "fn g -> _/eax: int {\n")
2948 (write _test-input-stream "}\n")
2949
2950 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2951
2952
2953 89/<- %edx 4/r32/esp
2954 (flush _test-output-buffered-file)
2955 (flush _test-error-buffered-file)
2956 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2962
2963 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-register: output should be empty")
2964 (check-next-stream-line-equal _test-error-stream "fn f: call g: register for output 'x' is not right" "F - test-convert-function-call-with-incorrect-output-register: error message")
2965
2966 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-register: exit status")
2967
2968 81 0/subop/add %esp 8/imm32
2969 5d/pop-to-ebp
2970 c3/return
2971
2972 test-convert-function-with-local-var-dereferenced:
2973
2974 55/push-ebp
2975 89/<- %ebp 4/r32/esp
2976
2977 (clear-stream _test-input-stream)
2978 (clear-stream $_test-input-buffered-file->buffer)
2979 (clear-stream _test-output-stream)
2980 (clear-stream $_test-output-buffered-file->buffer)
2981
2982 (write _test-input-stream "fn foo {\n")
2983 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
2984 (write _test-input-stream " increment *x\n")
2985 (write _test-input-stream "}\n")
2986
2987 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2988 (flush _test-output-buffered-file)
2989 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2995
2996 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-dereferenced/0")
2997 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-dereferenced/1")
2998 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-dereferenced/2")
2999 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-dereferenced/3")
3000 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-dereferenced/4")
3001 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-dereferenced/5")
3002 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-dereferenced/6")
3003 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-dereferenced/7")
3004 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-with-local-var-dereferenced/8")
3005 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-dereferenced/9")
3006 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-dereferenced/10")
3007 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-dereferenced/11")
3008 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-dereferenced/12")
3009 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-dereferenced/13")
3010 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-dereferenced/14")
3011 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-dereferenced/15")
3012
3013 89/<- %esp 5/r32/ebp
3014 5d/pop-to-ebp
3015 c3/return
3016
3017 test-dereference-of-var-on-stack:
3018
3019 55/push-ebp
3020 89/<- %ebp 4/r32/esp
3021
3022 (clear-stream _test-input-stream)
3023 (clear-stream $_test-input-buffered-file->buffer)
3024 (clear-stream _test-output-stream)
3025 (clear-stream $_test-output-buffered-file->buffer)
3026 (clear-stream _test-error-stream)
3027 (clear-stream $_test-error-buffered-file->buffer)
3028
3029 68/push 0/imm32
3030 68/push 0/imm32
3031 89/<- %edx 4/r32/esp
3032 (tailor-exit-descriptor %edx 0x10)
3033
3034 (write _test-input-stream "fn foo {\n")
3035 (write _test-input-stream " var x: (addr int)\n")
3036 (write _test-input-stream " increment *x\n")
3037 (write _test-input-stream "}\n")
3038
3039 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3040
3041
3042 89/<- %edx 4/r32/esp
3043 (flush _test-output-buffered-file)
3044 (flush _test-error-buffered-file)
3045 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3051
3052 (check-stream-equal _test-output-stream "" "F - test-dereference-of-var-on-stack: output should be empty")
3053 (check-next-stream-line-equal _test-error-stream "fn foo: cannot dereference var 'x' on stack" "F - test-dereference-of-var-on-stack: error message")
3054
3055 (check-ints-equal *(edx+4) 2 "F - test-dereference-of-var-on-stack: exit status")
3056
3057 81 0/subop/add %esp 8/imm32
3058
3059 5d/pop-to-ebp
3060 c3/return
3061
3062
3063 test-convert-function-with-byte-operations:
3064
3065 55/push-ebp
3066 89/<- %ebp 4/r32/esp
3067
3068 (clear-stream _test-input-stream)
3069 (clear-stream $_test-input-buffered-file->buffer)
3070 (clear-stream _test-output-stream)
3071 (clear-stream $_test-output-buffered-file->buffer)
3072
3073 (write _test-input-stream "fn foo {\n")
3074 (write _test-input-stream " var x/eax: byte <- copy 0\n")
3075 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
3076 (write _test-input-stream " y <- copy-byte x\n")
3077 (write _test-input-stream " var z/edx: (addr byte) <- copy 0\n")
3078 (write _test-input-stream " y <- copy-byte *z\n")
3079 (write _test-input-stream " copy-byte-to *z, x\n")
3080 (write _test-input-stream "}\n")
3081
3082 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3083 (flush _test-output-buffered-file)
3084 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3090
3091 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-byte-operations/0")
3092 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-byte-operations/1")
3093 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-byte-operations/2")
3094 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-byte-operations/3")
3095 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-byte-operations/4")
3096 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-byte-operations/5")
3097 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-byte-operations/6")
3098 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-byte-operations/7")
3099 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-byte-operations/8")
3100 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-byte-operations/9")
3101 (check-next-stream-line-equal _test-output-stream " 8a/byte-> %eax 0x00000001/r32" "F - test-convert-function-with-byte-operations/10")
3102 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-function-with-byte-operations/11")
3103 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 0/imm32" "F - test-convert-function-with-byte-operations/12")
3104 (check-next-stream-line-equal _test-output-stream " 8a/byte-> *edx 0x00000001/r32" "F - test-convert-function-with-byte-operations/13")
3105 (check-next-stream-line-equal _test-output-stream " 88/byte<- *edx 0x00000000/r32" "F - test-convert-function-with-byte-operations/14")
3106 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-function-with-byte-operations/15")
3107 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-byte-operations/16")
3108 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-byte-operations/17")
3109 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-byte-operations/18")
3110 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-byte-operations/19")
3111 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-byte-operations/20")
3112 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-byte-operations/21")
3113 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-byte-operations/22")
3114 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-byte-operations/23")
3115
3116 89/<- %esp 5/r32/ebp
3117 5d/pop-to-ebp
3118 c3/return
3119
3120
3121 test-copy-byte-var-from-fn-arg:
3122
3123 55/push-ebp
3124 89/<- %ebp 4/r32/esp
3125
3126 (clear-stream _test-input-stream)
3127 (clear-stream $_test-input-buffered-file->buffer)
3128 (clear-stream _test-output-stream)
3129 (clear-stream $_test-output-buffered-file->buffer)
3130
3131 (write _test-input-stream "fn foo x: byte, y: int {\n")
3132 (write _test-input-stream " var a/eax: byte <- copy x\n")
3133 (write _test-input-stream " var b/eax: int <- copy y\n")
3134 (write _test-input-stream "}\n")
3135
3136 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3137 (flush _test-output-buffered-file)
3138 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3144
3145 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-copy-byte-from-fn-arg/0")
3146 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-copy-byte-from-fn-arg/1")
3147 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-copy-byte-from-fn-arg/2")
3148 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-copy-byte-from-fn-arg/3")
3149 (check-next-stream-line-equal _test-output-stream " {" "F - test-copy-byte-from-fn-arg/4")
3150 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-copy-byte-from-fn-arg/5")
3151 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-copy-byte-from-fn-arg/6")
3152 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/7")
3153 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x0000000c) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/8")
3154 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-copy-byte-from-fn-arg/9")
3155 (check-next-stream-line-equal _test-output-stream " }" "F - test-copy-byte-from-fn-arg/10")
3156 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-copy-byte-from-fn-arg/11")
3157 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-copy-byte-from-fn-arg/12")
3158 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-copy-byte-from-fn-arg/13")
3159 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-copy-byte-from-fn-arg/14")
3160 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-copy-byte-from-fn-arg/15")
3161
3162 89/<- %esp 5/r32/ebp
3163 5d/pop-to-ebp
3164 c3/return
3165
3166 test-convert-compare-register-with-literal:
3167
3168 55/push-ebp
3169 89/<- %ebp 4/r32/esp
3170
3171 (clear-stream _test-input-stream)
3172 (clear-stream $_test-input-buffered-file->buffer)
3173 (clear-stream _test-output-stream)
3174 (clear-stream $_test-output-buffered-file->buffer)
3175
3176 (write _test-input-stream "fn foo {\n")
3177 (write _test-input-stream " var x/ecx: int <- copy 0\n")
3178 (write _test-input-stream " compare x, 0\n")
3179 (write _test-input-stream "}\n")
3180
3181 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3182 (flush _test-output-buffered-file)
3183 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3189
3190 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compare-register-with-literal/0")
3191 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compare-register-with-literal/1")
3192 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compare-register-with-literal/2")
3193 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compare-register-with-literal/3")
3194 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compare-register-with-literal/4")
3195 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compare-register-with-literal/5")
3196 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
3197 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-compare-register-with-literal/7")
3198 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0/imm32" "F - test-convert-compare-register-with-literal/8")
3199 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
3200 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compare-register-with-literal/10")
3201 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compare-register-with-literal/11")
3202 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compare-register-with-literal/12")
3203 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compare-register-with-literal/13")
3204 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compare-register-with-literal/14")
3205 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compare-register-with-literal/15")
3206
3207 89/<- %esp 5/r32/ebp
3208 5d/pop-to-ebp
3209 c3/return
3210
3211 test-unknown-variable:
3212
3213 55/push-ebp
3214 89/<- %ebp 4/r32/esp
3215
3216 (clear-stream _test-input-stream)
3217 (clear-stream $_test-input-buffered-file->buffer)
3218 (clear-stream _test-output-stream)
3219 (clear-stream $_test-output-buffered-file->buffer)
3220 (clear-stream _test-error-stream)
3221 (clear-stream $_test-error-buffered-file->buffer)
3222
3223 68/push 0/imm32
3224 68/push 0/imm32
3225 89/<- %edx 4/r32/esp
3226 (tailor-exit-descriptor %edx 0x10)
3227
3228 (write _test-input-stream "fn foo {\n")
3229 (write _test-input-stream " compare x, 0\n")
3230 (write _test-input-stream "}\n")
3231
3232 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3233
3234
3235 89/<- %edx 4/r32/esp
3236 (flush _test-output-buffered-file)
3237 (flush _test-error-buffered-file)
3238 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3244
3245 (check-stream-equal _test-output-stream "" "F - test-unknown-variable: output should be empty")
3246 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable: error message")
3247
3248 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable: exit status")
3249
3250 81 0/subop/add %esp 8/imm32
3251
3252 5d/pop-to-ebp
3253 c3/return
3254
3255 test-convert-function-with-local-var-in-block:
3256
3257 55/push-ebp
3258 89/<- %ebp 4/r32/esp
3259
3260 (clear-stream _test-input-stream)
3261 (clear-stream $_test-input-buffered-file->buffer)
3262 (clear-stream _test-output-stream)
3263 (clear-stream $_test-output-buffered-file->buffer)
3264
3265 (write _test-input-stream "fn foo {\n")
3266 (write _test-input-stream " {\n")
3267 (write _test-input-stream " var x: int\n")
3268 (write _test-input-stream " increment x\n")
3269 (write _test-input-stream " }\n")
3270 (write _test-input-stream "}\n")
3271
3272 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3273 (flush _test-output-buffered-file)
3274 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3280
3281 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-block/0")
3282 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-block/1")
3283 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-block/2")
3284 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-block/3")
3285 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/4")
3286 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-block/5")
3287 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/6")
3288 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-block/7")
3289 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-block/8")
3290 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-block/9")
3291 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-block/10")
3292 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/11")
3293 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-block/12")
3294 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/13")
3295 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-block/14")
3296 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-block/15")
3297 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-block/16")
3298 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-block/17")
3299 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-block/18")
3300
3301 89/<- %esp 5/r32/ebp
3302 5d/pop-to-ebp
3303 c3/return
3304
3305 test-convert-function-with-local-var-in-mem-after-block:
3306
3307 55/push-ebp
3308 89/<- %ebp 4/r32/esp
3309
3310 (clear-stream _test-input-stream)
3311 (clear-stream $_test-input-buffered-file->buffer)
3312 (clear-stream _test-output-stream)
3313 (clear-stream $_test-output-buffered-file->buffer)
3314
3315 (write _test-input-stream "fn foo {\n")
3316 (write _test-input-stream " {\n")
3317 (write _test-input-stream " var y: int\n")
3318 (write _test-input-stream " }\n")
3319 (write _test-input-stream " var x: int\n")
3320 (write _test-input-stream " increment x\n")
3321 (write _test-input-stream "}\n")
3322
3323 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3324 (flush _test-output-buffered-file)
3325 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3331
3332 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem-after-block/0")
3333 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem-after-block/1")
3334 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/2")
3335 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem-after-block/3")
3336 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/4")
3337 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/5")
3338 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/6")
3339 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/7")
3340 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/8")
3341 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/9")
3342 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/10")
3343 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-mem-after-block/11")
3344 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/12")
3345 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem-after-block/13")
3346 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/14")
3347 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/15")
3348 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem-after-block/16")
3349 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem-after-block/17")
3350 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem-after-block/18")
3351 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/19")
3352 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem-after-block/20")
3353
3354 89/<- %esp 5/r32/ebp
3355 5d/pop-to-ebp
3356 c3/return
3357
3358 test-convert-function-with-local-var-in-named-block:
3359
3360 55/push-ebp
3361 89/<- %ebp 4/r32/esp
3362
3363 (clear-stream _test-input-stream)
3364 (clear-stream $_test-input-buffered-file->buffer)
3365 (clear-stream _test-output-stream)
3366 (clear-stream $_test-output-buffered-file->buffer)
3367
3368 (write _test-input-stream "fn foo {\n")
3369 (write _test-input-stream " $bar: {\n")
3370 (write _test-input-stream " var x: int\n")
3371 (write _test-input-stream " increment x\n")
3372 (write _test-input-stream " }\n")
3373 (write _test-input-stream "}\n")
3374
3375 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3376 (flush _test-output-buffered-file)
3377 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3383
3384 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-named-block/0")
3385 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-named-block/1")
3386 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-named-block/2")
3387 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-named-block/3")
3388 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/4")
3389 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-named-block/5")
3390 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/6")
3391 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-local-var-in-named-block/7")
3392 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-named-block/8")
3393 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-named-block/9")
3394 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-named-block/10")
3395 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/11")
3396 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-local-var-in-named-block/12")
3397 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/13")
3398 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-named-block/14")
3399 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-named-block/15")
3400 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-named-block/16")
3401 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-named-block/17")
3402 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-named-block/18")
3403
3404 89/<- %esp 5/r32/ebp
3405 5d/pop-to-ebp
3406 c3/return
3407
3408 test-unknown-variable-in-named-block:
3409
3410 55/push-ebp
3411 89/<- %ebp 4/r32/esp
3412
3413 (clear-stream _test-input-stream)
3414 (clear-stream $_test-input-buffered-file->buffer)
3415 (clear-stream _test-output-stream)
3416 (clear-stream $_test-output-buffered-file->buffer)
3417 (clear-stream _test-error-stream)
3418 (clear-stream $_test-error-buffered-file->buffer)
3419
3420 68/push 0/imm32
3421 68/push 0/imm32
3422 89/<- %edx 4/r32/esp
3423 (tailor-exit-descriptor %edx 0x10)
3424
3425 (write _test-input-stream "fn foo {\n")
3426 (write _test-input-stream " $a: {\n")
3427 (write _test-input-stream " compare x, 0\n")
3428 (write _test-input-stream " }\n")
3429 (write _test-input-stream "}\n")
3430
3431 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3432
3433
3434 89/<- %edx 4/r32/esp
3435 (flush _test-output-buffered-file)
3436 (flush _test-error-buffered-file)
3437 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3443
3444 (check-stream-equal _test-output-stream "" "F - test-unknown-variable-in-named-block: output should be empty")
3445 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable-in-named-block: error message")
3446
3447 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable-in-named-block: exit status")
3448
3449 81 0/subop/add %esp 8/imm32
3450
3451 5d/pop-to-ebp
3452 c3/return
3453
3454 test-always-shadow-outermost-reg-vars-in-function:
3455
3456 55/push-ebp
3457 89/<- %ebp 4/r32/esp
3458
3459 (clear-stream _test-input-stream)
3460 (clear-stream $_test-input-buffered-file->buffer)
3461 (clear-stream _test-output-stream)
3462 (clear-stream $_test-output-buffered-file->buffer)
3463
3464 (write _test-input-stream "fn foo {\n")
3465 (write _test-input-stream " var x/ecx: int <- copy 3\n")
3466 (write _test-input-stream "}\n")
3467
3468 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3469 (flush _test-output-buffered-file)
3470 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3476
3477 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-always-shadow-outermost-reg-vars-in-function/0")
3478 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-always-shadow-outermost-reg-vars-in-function/1")
3479 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/2")
3480 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-always-shadow-outermost-reg-vars-in-function/3")
3481 (check-next-stream-line-equal _test-output-stream " {" "F - test-always-shadow-outermost-reg-vars-in-function/4")
3482 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-always-shadow-outermost-reg-vars-in-function/5")
3483 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
3484 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-always-shadow-outermost-reg-vars-in-function/8")
3485 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
3486 (check-next-stream-line-equal _test-output-stream " }" "F - test-always-shadow-outermost-reg-vars-in-function/12")
3487 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-always-shadow-outermost-reg-vars-in-function/13")
3488 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-always-shadow-outermost-reg-vars-in-function/14")
3489 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-always-shadow-outermost-reg-vars-in-function/15")
3490 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/16")
3491 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-always-shadow-outermost-reg-vars-in-function/17")
3492
3493 89/<- %esp 5/r32/ebp
3494 5d/pop-to-ebp
3495 c3/return
3496
3497 test-shadow-local:
3498
3499 55/push-ebp
3500 89/<- %ebp 4/r32/esp
3501
3502 (clear-stream _test-input-stream)
3503 (clear-stream $_test-input-buffered-file->buffer)
3504 (clear-stream _test-output-stream)
3505 (clear-stream $_test-output-buffered-file->buffer)
3506
3507 (write _test-input-stream "fn foo {\n")
3508 (write _test-input-stream " var x/ecx: int <- copy 3\n")
3509 (write _test-input-stream " {\n")
3510 (write _test-input-stream " var y/ecx: int <- copy 4\n")
3511 (write _test-input-stream " }\n")
3512 (write _test-input-stream " x <- increment\n")
3513 (write _test-input-stream "}\n")
3514
3515 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3516 (flush _test-output-buffered-file)
3517 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3523
3524 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-local/0")
3525 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-local/1")
3526 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-local/2")
3527 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-local/3")
3528 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/4")
3529 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-local/5")
3530 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/6")
3531 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-local/7")
3532 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/8")
3533 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-local/9")
3534 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/10")
3535 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-local/11")
3536 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/12")
3537 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/13")
3538 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-local/14")
3539 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-local/15")
3540 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/16")
3541 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/17")
3542 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-local/18")
3543 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-local/19")
3544 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-local/20")
3545 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-local/21")
3546 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-local/22")
3547
3548 89/<- %esp 5/r32/ebp
3549 5d/pop-to-ebp
3550 c3/return
3551
3552 test-shadow-name:
3553
3554 55/push-ebp
3555 89/<- %ebp 4/r32/esp
3556
3557 (clear-stream _test-input-stream)
3558 (clear-stream $_test-input-buffered-file->buffer)
3559 (clear-stream _test-output-stream)
3560 (clear-stream $_test-output-buffered-file->buffer)
3561
3562 (write _test-input-stream "fn foo {\n")
3563 (write _test-input-stream " var x/ecx: int <- copy 3\n")
3564 (write _test-input-stream " {\n")
3565 (write _test-input-stream " var x/edx: int <- copy 4\n")
3566 (write _test-input-stream " }\n")
3567 (write _test-input-stream " x <- increment\n")
3568 (write _test-input-stream "}\n")
3569
3570 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3571 (flush _test-output-buffered-file)
3572 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3578
3579 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name/0")
3580 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name/1")
3581 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name/2")
3582 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name/3")
3583 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/4")
3584 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name/5")
3585 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name/6")
3586 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name/7")
3587 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/8")
3588 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name/9")
3589 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name/10")
3590 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name/11")
3591 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name/12")
3592 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/13")
3593 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name/14")
3594 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name/15")
3595 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name/16")
3596 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/17")
3597 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name/18")
3598 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name/19")
3599 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name/20")
3600 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name/21")
3601 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name/22")
3602
3603 89/<- %esp 5/r32/ebp
3604 5d/pop-to-ebp
3605 c3/return
3606
3607 test-shadow-name-2:
3608
3609 55/push-ebp
3610 89/<- %ebp 4/r32/esp
3611
3612 (clear-stream _test-input-stream)
3613 (clear-stream $_test-input-buffered-file->buffer)
3614 (clear-stream _test-output-stream)
3615 (clear-stream $_test-output-buffered-file->buffer)
3616
3617 (write _test-input-stream "fn foo {\n")
3618 (write _test-input-stream " var x/ecx: int <- copy 3\n")
3619 (write _test-input-stream " {\n")
3620 (write _test-input-stream " var x/edx: int <- copy 4\n")
3621 (write _test-input-stream " var y/ecx: int <- copy 5\n")
3622 (write _test-input-stream " }\n")
3623 (write _test-input-stream " x <- increment\n")
3624 (write _test-input-stream "}\n")
3625
3626 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3627 (flush _test-output-buffered-file)
3628 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3634
3635 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name-2/0")
3636 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name-2/1")
3637 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name-2/2")
3638 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name-2/3")
3639 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/4")
3640 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name-2/5")
3641 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/6")
3642 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name-2/7")
3643 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/8")
3644 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name-2/9")
3645 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name-2/10")
3646 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name-2/11")
3647 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/12")
3648 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 5/imm32" "F - test-shadow-name-2/13")
3649 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/14")
3650 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name-2/15")
3651 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/16")
3652 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name-2/17")
3653 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name-2/18")
3654 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/19")
3655 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/20")
3656 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name-2/21")
3657 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name-2/22")
3658 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name-2/23")
3659 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name-2/24")
3660 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name-2/25")
3661
3662 89/<- %esp 5/r32/ebp
3663 5d/pop-to-ebp
3664 c3/return
3665
3666 test-do-not-spill-same-register-in-block:
3667
3668 55/push-ebp
3669 89/<- %ebp 4/r32/esp
3670
3671 (clear-stream _test-input-stream)
3672 (clear-stream $_test-input-buffered-file->buffer)
3673 (clear-stream _test-output-stream)
3674 (clear-stream $_test-output-buffered-file->buffer)
3675
3676 (write _test-input-stream "fn foo {\n")
3677 (write _test-input-stream " var x/ecx: int <- copy 3\n")
3678 (write _test-input-stream " var y/ecx: int <- copy 4\n")
3679 (write _test-input-stream " y <- increment\n")
3680 (write _test-input-stream "}\n")
3681
3682 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3683 (flush _test-output-buffered-file)
3684 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3690
3691 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-do-not-spill-same-register-in-block/0")
3692 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-do-not-spill-same-register-in-block/1")
3693 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-do-not-spill-same-register-in-block/2")
3694 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-do-not-spill-same-register-in-block/3")
3695 (check-next-stream-line-equal _test-output-stream " {" "F - test-do-not-spill-same-register-in-block/4")
3696 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-do-not-spill-same-register-in-block/5")
3697 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-do-not-spill-same-register-in-block/6")
3698 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-do-not-spill-same-register-in-block/7")
3699 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-do-not-spill-same-register-in-block/8")
3700 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-do-not-spill-same-register-in-block/9")
3701 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-do-not-spill-same-register-in-block/10")
3702 (check-next-stream-line-equal _test-output-stream " }" "F - test-do-not-spill-same-register-in-block/11")
3703 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-do-not-spill-same-register-in-block/12")
3704 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-do-not-spill-same-register-in-block/13")
3705 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-do-not-spill-same-register-in-block/14")
3706 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-do-not-spill-same-register-in-block/15")
3707 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-do-not-spill-same-register-in-block/16")
3708
3709 89/<- %esp 5/r32/ebp
3710 5d/pop-to-ebp
3711 c3/return
3712
3713 test-spill-different-register-in-block:
3714
3715 55/push-ebp
3716 89/<- %ebp 4/r32/esp
3717
3718 (clear-stream _test-input-stream)
3719 (clear-stream $_test-input-buffered-file->buffer)
3720 (clear-stream _test-output-stream)
3721 (clear-stream $_test-output-buffered-file->buffer)
3722
3723 (write _test-input-stream "fn foo {\n")
3724 (write _test-input-stream " var x/eax: int <- copy 3\n")
3725 (write _test-input-stream " var y/ecx: int <- copy 4\n")
3726 (write _test-input-stream " y <- increment\n")
3727 (write _test-input-stream "}\n")
3728
3729 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3730 (flush _test-output-buffered-file)
3731 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3737
3738 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-spill-different-register-in-block/0")
3739 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-spill-different-register-in-block/1")
3740 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-spill-different-register-in-block/2")
3741 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-spill-different-register-in-block/3")
3742 (check-next-stream-line-equal _test-output-stream " {" "F - test-spill-different-register-in-block/4")
3743 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-spill-different-register-in-block/5")
3744 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-spill-different-register-in-block/6")
3745 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-spill-different-register-in-block/7")
3746 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-spill-different-register-in-block/8")
3747 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-spill-different-register-in-block/9")
3748 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-spill-different-register-in-block/10")
3749 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-spill-different-register-in-block/11")
3750 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-spill-different-register-in-block/12")
3751 (check-next-stream-line-equal _test-output-stream " }" "F - test-spill-different-register-in-block/13")
3752 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-spill-different-register-in-block/14")
3753 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-spill-different-register-in-block/15")
3754 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-spill-different-register-in-block/16")
3755 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-spill-different-register-in-block/17")
3756 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-spill-different-register-in-block/18")
3757
3758 89/<- %esp 5/r32/ebp
3759 5d/pop-to-ebp
3760 c3/return
3761
3762 test-convert-function-with-branches-in-block:
3763
3764 55/push-ebp
3765 89/<- %ebp 4/r32/esp
3766
3767 (clear-stream _test-input-stream)
3768 (clear-stream $_test-input-buffered-file->buffer)
3769 (clear-stream _test-output-stream)
3770 (clear-stream $_test-output-buffered-file->buffer)
3771
3772 (write _test-input-stream "fn foo x: int {\n")
3773 (write _test-input-stream " {\n")
3774 (write _test-input-stream " break-if->=\n")
3775 (write _test-input-stream " loop-if-addr<\n")
3776 (write _test-input-stream " increment x\n")
3777 (write _test-input-stream " loop\n")
3778 (write _test-input-stream " }\n")
3779 (write _test-input-stream "}\n")
3780
3781 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3782 (flush _test-output-buffered-file)
3783 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3789
3790 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
3791 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
3792 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
3793 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
3794 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
3795 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
3796 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
3797 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
3798 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
3799 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
3800 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
3801 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
3802 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
3803 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
3804 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
3805 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
3806 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
3807 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
3808 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
3809 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
3810 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
3811 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
3812 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
3813 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
3814 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
3815 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
3816
3817 89/<- %esp 5/r32/ebp
3818 5d/pop-to-ebp
3819 c3/return
3820
3821 test-convert-function-with-branches-in-block-2:
3822
3823 55/push-ebp
3824 89/<- %ebp 4/r32/esp
3825
3826 (clear-stream _test-input-stream)
3827 (clear-stream $_test-input-buffered-file->buffer)
3828 (clear-stream _test-output-stream)
3829 (clear-stream $_test-output-buffered-file->buffer)
3830
3831 (write _test-input-stream "fn foo x: int {\n")
3832 (write _test-input-stream " {\n")
3833 (write _test-input-stream " break-if->=\n")
3834 (write _test-input-stream " loop-if-float<\n")
3835 (write _test-input-stream " increment x\n")
3836 (write _test-input-stream " loop\n")
3837 (write _test-input-stream " }\n")
3838 (write _test-input-stream "}\n")
3839
3840 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3841 (flush _test-output-buffered-file)
3842 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3848
3849 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
3850 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
3851 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
3852 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
3853 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
3854 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
3855 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
3856 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
3857 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
3858 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
3859 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
3860 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
3861 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
3862 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
3863 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
3864 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
3865 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
3866 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
3867 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
3868 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
3869 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
3870 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
3871 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
3872 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
3873 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
3874 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
3875
3876 89/<- %esp 5/r32/ebp
3877 5d/pop-to-ebp
3878 c3/return
3879
3880 test-convert-function-with-branches-in-named-block:
3881
3882 55/push-ebp
3883 89/<- %ebp 4/r32/esp
3884
3885 (clear-stream _test-input-stream)
3886 (clear-stream $_test-input-buffered-file->buffer)
3887 (clear-stream _test-output-stream)
3888 (clear-stream $_test-output-buffered-file->buffer)
3889
3890 (write _test-input-stream "fn foo x: int {\n")
3891 (write _test-input-stream " $bar: {\n")
3892 (write _test-input-stream " break-if->= $bar\n")
3893 (write _test-input-stream " loop-if-addr< $bar\n")
3894 (write _test-input-stream " increment x\n")
3895 (write _test-input-stream " loop\n")
3896 (write _test-input-stream " }\n")
3897 (write _test-input-stream "}\n")
3898
3899 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3900 (flush _test-output-buffered-file)
3901 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3907
3908 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-named-block/0")
3909 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-named-block/1")
3910 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-named-block/2")
3911 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-named-block/3")
3912 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/4")
3913 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-named-block/5")
3914 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/6")
3915 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-branches-in-named-block/7")
3916 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/8")
3917 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-named-block/9")
3918 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:break/disp32" "F - test-convert-function-with-branches-in-named-block/10")
3919 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/11")
3920 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/12")
3921 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-named-block/13")
3922 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:loop/disp32" "F - test-convert-function-with-branches-in-named-block/14")
3923 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/15")
3924 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-named-block/16")
3925 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-named-block/17")
3926 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/18")
3927 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-branches-in-named-block/19")
3928 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/20")
3929 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-named-block/21")
3930 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-named-block/22")
3931 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-named-block/23")
3932 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-named-block/24")
3933 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-named-block/25")
3934
3935 89/<- %esp 5/r32/ebp
3936 5d/pop-to-ebp
3937 c3/return
3938
3939 test-convert-function-with-var-in-nested-block:
3940
3941 55/push-ebp
3942 89/<- %ebp 4/r32/esp
3943
3944 (clear-stream _test-input-stream)
3945 (clear-stream $_test-input-buffered-file->buffer)
3946 (clear-stream _test-output-stream)
3947 (clear-stream $_test-output-buffered-file->buffer)
3948
3949 (write _test-input-stream "fn foo x: int {\n")
3950 (write _test-input-stream " {\n")
3951 (write _test-input-stream " {\n")
3952 (write _test-input-stream " var x: int\n")
3953 (write _test-input-stream " increment x\n")
3954 (write _test-input-stream " }\n")
3955 (write _test-input-stream " }\n")
3956 (write _test-input-stream "}\n")
3957
3958 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3959 (flush _test-output-buffered-file)
3960 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3966
3967 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-var-in-nested-block/0")
3968 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-var-in-nested-block/1")
3969 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-var-in-nested-block/2")
3970 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-var-in-nested-block/3")
3971 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/4")
3972 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-var-in-nested-block/5")
3973 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/6")
3974 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-var-in-nested-block/7")
3975 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/8")
3976 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-var-in-nested-block/9")
3977 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-var-in-nested-block/10")
3978 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-var-in-nested-block/11")
3979 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-var-in-nested-block/12")
3980 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/13")
3981 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-var-in-nested-block/14")
3982 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/15")
3983 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-var-in-nested-block/16")
3984 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/17")
3985 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-var-in-nested-block/18")
3986 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-var-in-nested-block/19")
3987 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-var-in-nested-block/20")
3988 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-var-in-nested-block/21")
3989 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-var-in-nested-block/22")
3990
3991 89/<- %esp 5/r32/ebp
3992 5d/pop-to-ebp
3993 c3/return
3994
3995 test-convert-function-with-multiple-vars-in-nested-blocks:
3996
3997 55/push-ebp
3998 89/<- %ebp 4/r32/esp
3999
4000 (clear-stream _test-input-stream)
4001 (clear-stream $_test-input-buffered-file->buffer)
4002 (clear-stream _test-output-stream)
4003 (clear-stream $_test-output-buffered-file->buffer)
4004
4005 (write _test-input-stream "fn foo x: int {\n")
4006 (write _test-input-stream " {\n")
4007 (write _test-input-stream " var x/eax: int <- copy 0\n")
4008 (write _test-input-stream " {\n")
4009 (write _test-input-stream " var y: int\n")
4010 (write _test-input-stream " x <- add y\n")
4011 (write _test-input-stream " }\n")
4012 (write _test-input-stream " }\n")
4013 (write _test-input-stream "}\n")
4014
4015 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4016 (flush _test-output-buffered-file)
4017 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4023
4024 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/0")
4025 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/1")
4026 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/2")
4027 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/3")
4028 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/4")
4029 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/5")
4030 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/6")
4031 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/7")
4032 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/8")
4033 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/9")
4034 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/10")
4035 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/11")
4036 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/12")
4037 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/13")
4038 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/14")
4039 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/15")
4040 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/16")
4041 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/17")
4042 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/18")
4043 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/19")
4044 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/20")
4045 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/21")
4046 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/22")
4047 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/23")
4048 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/24")
4049 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-multiple-vars-in-nested-blocks/25")
4050
4051 89/<- %esp 5/r32/ebp
4052 5d/pop-to-ebp
4053 c3/return
4054
4055 test-convert-function-with-branches-and-local-vars:
4056
4057
4058
4059
4060 55/push-ebp
4061 89/<- %ebp 4/r32/esp
4062
4063 (clear-stream _test-input-stream)
4064 (clear-stream $_test-input-buffered-file->buffer)
4065 (clear-stream _test-output-stream)
4066 (clear-stream $_test-output-buffered-file->buffer)
4067
4068 (write _test-input-stream "fn foo {\n")
4069 (write _test-input-stream " {\n")
4070 (write _test-input-stream " var x: int\n")
4071 (write _test-input-stream " break-if->=\n")
4072 (write _test-input-stream " increment x\n")
4073 (write _test-input-stream " }\n")
4074 (write _test-input-stream "}\n")
4075
4076 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4077 (flush _test-output-buffered-file)
4078 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4084
4085 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-local-vars/0")
4086 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-local-vars/1")
4087 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-local-vars/2")
4088 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-local-vars/3")
4089 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/4")
4090 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-local-vars/5")
4091 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/6")
4092 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-local-vars/7")
4093 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-local-vars/8")
4094 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/9")
4095 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-local-vars/10")
4096 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-branches-and-local-vars/11")
4097 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-local-vars/12")
4098 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/13")
4099 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-local-vars/14")
4100 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-branches-and-local-vars/15")
4101 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/16")
4102 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-local-vars/17")
4103 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/18")
4104 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-local-vars/19")
4105 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-local-vars/20")
4106 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-local-vars/21")
4107 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-local-vars/22")
4108 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-local-vars/23")
4109
4110 89/<- %esp 5/r32/ebp
4111 5d/pop-to-ebp
4112 c3/return
4113
4114 test-convert-function-with-conditional-loops-and-local-vars:
4115
4116
4117
4118
4119 55/push-ebp
4120 89/<- %ebp 4/r32/esp
4121
4122 (clear-stream _test-input-stream)
4123 (clear-stream $_test-input-buffered-file->buffer)
4124 (clear-stream _test-output-stream)
4125 (clear-stream $_test-output-buffered-file->buffer)
4126
4127 (write _test-input-stream "fn foo {\n")
4128 (write _test-input-stream " {\n")
4129 (write _test-input-stream " var x: int\n")
4130 (write _test-input-stream " loop-if->=\n")
4131 (write _test-input-stream " increment x\n")
4132 (write _test-input-stream " }\n")
4133 (write _test-input-stream "}\n")
4134
4135 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4136 (flush _test-output-buffered-file)
4137 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4143
4144 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-conditional-loops-and-local-vars/0")
4145 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-conditional-loops-and-local-vars/1")
4146 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/2")
4147 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-conditional-loops-and-local-vars/3")
4148 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/4")
4149 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/5")
4150 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/6")
4151 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/7")
4152 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/8")
4153 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/9")
4154 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-conditional-loops-and-local-vars/10")
4155 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/11")
4156 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-conditional-loops-and-local-vars/12")
4157 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/13")
4158 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-conditional-loops-and-local-vars/14")
4159 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/15")
4160 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/16")
4161 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/17")
4162 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/18")
4163 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/19")
4164 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-conditional-loops-and-local-vars/20")
4165 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/21")
4166 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/22")
4167 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-conditional-loops-and-local-vars/23")
4168
4169 89/<- %esp 5/r32/ebp
4170 5d/pop-to-ebp
4171 c3/return
4172
4173 test-convert-function-with-unconditional-loops-and-local-vars:
4174
4175
4176
4177
4178 55/push-ebp
4179 89/<- %ebp 4/r32/esp
4180
4181 (clear-stream _test-input-stream)
4182 (clear-stream $_test-input-buffered-file->buffer)
4183 (clear-stream _test-output-stream)
4184 (clear-stream $_test-output-buffered-file->buffer)
4185
4186 (write _test-input-stream "fn foo {\n")
4187 (write _test-input-stream " {\n")
4188 (write _test-input-stream " var x: int\n")
4189 (write _test-input-stream " loop\n")
4190 (write _test-input-stream " increment x\n")
4191 (write _test-input-stream " }\n")
4192 (write _test-input-stream "}\n")
4193
4194 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4195 (flush _test-output-buffered-file)
4196 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4202
4203 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-loops-and-local-vars/0")
4204 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-loops-and-local-vars/1")
4205 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/2")
4206 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-loops-and-local-vars/3")
4207 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/4")
4208 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/5")
4209 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/6")
4210 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/7")
4211 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/8")
4212 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/9")
4213 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-unconditional-loops-and-local-vars/10")
4214
4215 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/11")
4216 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/12")
4217 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/13")
4218 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/14")
4219 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-loops-and-local-vars/15")
4220 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/16")
4221 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/17")
4222 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-loops-and-local-vars/18")
4223
4224 89/<- %esp 5/r32/ebp
4225 5d/pop-to-ebp
4226 c3/return
4227
4228 test-convert-function-with-branches-and-loops-and-local-vars:
4229
4230 55/push-ebp
4231 89/<- %ebp 4/r32/esp
4232
4233 (clear-stream _test-input-stream)
4234 (clear-stream $_test-input-buffered-file->buffer)
4235 (clear-stream _test-output-stream)
4236 (clear-stream $_test-output-buffered-file->buffer)
4237
4238 (write _test-input-stream "fn foo {\n")
4239 (write _test-input-stream " {\n")
4240 (write _test-input-stream " var x: int\n")
4241 (write _test-input-stream " break-if->=\n")
4242 (write _test-input-stream " increment x\n")
4243 (write _test-input-stream " loop\n")
4244 (write _test-input-stream " }\n")
4245 (write _test-input-stream "}\n")
4246
4247 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4248 (flush _test-output-buffered-file)
4249 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4255
4256 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-loops-and-local-vars/0")
4257 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-loops-and-local-vars/1")
4258 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/2")
4259 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-loops-and-local-vars/3")
4260 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/4")
4261 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/5")
4262 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/6")
4263 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/7")
4264 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/8")
4265 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/9")
4266 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/10")
4267 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/11")
4268 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/12")
4269 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/13")
4270 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-loops-and-local-vars/14")
4271 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/15")
4272 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/16")
4273 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/17")
4274 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/18")
4275 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/19")
4276 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/20")
4277 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-loops-and-local-vars/21")
4278 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/22")
4279 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/23")
4280 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-loops-and-local-vars/24")
4281
4282 89/<- %esp 5/r32/ebp
4283 5d/pop-to-ebp
4284 c3/return
4285
4286 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars:
4287
4288 55/push-ebp
4289 89/<- %ebp 4/r32/esp
4290
4291 (clear-stream _test-input-stream)
4292 (clear-stream $_test-input-buffered-file->buffer)
4293 (clear-stream _test-output-stream)
4294 (clear-stream $_test-output-buffered-file->buffer)
4295
4296 (write _test-input-stream "fn foo {\n")
4297 (write _test-input-stream " a: {\n")
4298 (write _test-input-stream " var x: int\n")
4299 (write _test-input-stream " {\n")
4300 (write _test-input-stream " var y: int\n")
4301 (write _test-input-stream " break-if->= a\n")
4302 (write _test-input-stream " increment x\n")
4303 (write _test-input-stream " loop\n")
4304 (write _test-input-stream " }\n")
4305 (write _test-input-stream " }\n")
4306 (write _test-input-stream "}\n")
4307
4308 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4309 (flush _test-output-buffered-file)
4310 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4316
4317 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/0")
4318 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/1")
4319 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/2")
4320 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/3")
4321 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/4")
4322 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/5")
4323 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/6")
4324 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/7")
4325 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/8")
4326 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/9")
4327 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/10")
4328 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/11")
4329 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/12")
4330 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/13")
4331 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/14")
4332 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/15")
4333 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/16")
4334 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/17")
4335 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/18")
4336 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/19")
4337 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/20")
4338 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/21")
4339 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/22")
4340 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/23")
4341 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/24")
4342 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/25")
4343 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/26")
4344 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/27")
4345 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/28")
4346 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/29")
4347 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/30")
4348 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/31")
4349
4350 89/<- %esp 5/r32/ebp
4351 5d/pop-to-ebp
4352 c3/return
4353
4354 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2:
4355
4356 55/push-ebp
4357 89/<- %ebp 4/r32/esp
4358
4359 (clear-stream _test-input-stream)
4360 (clear-stream $_test-input-buffered-file->buffer)
4361 (clear-stream _test-output-stream)
4362 (clear-stream $_test-output-buffered-file->buffer)
4363
4364
4365 (write _test-input-stream "fn foo {\n")
4366 (write _test-input-stream " a: {\n")
4367 (write _test-input-stream " var x: int\n")
4368 (write _test-input-stream " {\n")
4369 (write _test-input-stream " break-if->= a\n")
4370 (write _test-input-stream " }\n")
4371 (write _test-input-stream " }\n")
4372 (write _test-input-stream "}\n")
4373
4374 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4375 (flush _test-output-buffered-file)
4376 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4382
4383 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/0")
4384 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/1")
4385 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/2")
4386 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/3")
4387 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/4")
4388 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/5")
4389 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/6")
4390 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/7")
4391 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/8")
4392 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/9")
4393 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/10")
4394 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/11")
4395 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/12")
4396 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/13")
4397 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/14")
4398 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/15")
4399 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/16")
4400 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/17")
4401 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/18")
4402 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/19")
4403 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/20")
4404 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/21")
4405 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/22")
4406 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/23")
4407 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/24")
4408 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/25")
4409 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/26")
4410
4411 89/<- %esp 5/r32/ebp
4412 5d/pop-to-ebp
4413 c3/return
4414
4415 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3:
4416
4417 55/push-ebp
4418 89/<- %ebp 4/r32/esp
4419
4420 (clear-stream _test-input-stream)
4421 (clear-stream $_test-input-buffered-file->buffer)
4422 (clear-stream _test-output-stream)
4423 (clear-stream $_test-output-buffered-file->buffer)
4424
4425
4426 (write _test-input-stream "fn foo {\n")
4427 (write _test-input-stream " a: {\n")
4428 (write _test-input-stream " var x: int\n")
4429 (write _test-input-stream " {\n")
4430 (write _test-input-stream " break a\n")
4431 (write _test-input-stream " }\n")
4432 (write _test-input-stream " }\n")
4433 (write _test-input-stream "}\n")
4434
4435 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4436 (flush _test-output-buffered-file)
4437 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4443
4444 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/0")
4445 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/1")
4446 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/2")
4447 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/3")
4448 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/4")
4449 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/5")
4450 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/6")
4451 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/7")
4452 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/8")
4453 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/9")
4454 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/10")
4455 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/11")
4456 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/12")
4457 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/14")
4458 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/15")
4459 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/16")
4460 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/17")
4461 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/18")
4462 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/19")
4463 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/20")
4464 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/21")
4465 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/22")
4466 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/23")
4467 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/24")
4468
4469 89/<- %esp 5/r32/ebp
4470 5d/pop-to-ebp
4471 c3/return
4472
4473 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4:
4474
4475 55/push-ebp
4476 89/<- %ebp 4/r32/esp
4477
4478 (clear-stream _test-input-stream)
4479 (clear-stream $_test-input-buffered-file->buffer)
4480 (clear-stream _test-output-stream)
4481 (clear-stream $_test-output-buffered-file->buffer)
4482
4483 (write _test-input-stream "fn foo {\n")
4484 (write _test-input-stream " a: {\n")
4485 (write _test-input-stream " var x/esi: int <- copy 0\n")
4486 (write _test-input-stream " {\n")
4487 (write _test-input-stream " break a\n")
4488 (write _test-input-stream " }\n")
4489 (write _test-input-stream " }\n")
4490 (write _test-input-stream "}\n")
4491
4492 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4493 (flush _test-output-buffered-file)
4494 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4500
4501 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/0")
4502 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/1")
4503 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/2")
4504 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/3")
4505 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/4")
4506 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/5")
4507 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/6")
4508 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/7")
4509 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/8")
4510 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/9")
4511 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/10")
4512 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/11")
4513 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/12")
4514 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/13")
4515 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/14")
4516 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/15")
4517 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/16")
4518 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/17")
4519 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/18")
4520 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/19")
4521 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/20")
4522 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/21")
4523 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/22")
4524 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/23")
4525 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/24")
4526
4527 89/<- %esp 5/r32/ebp
4528 5d/pop-to-ebp
4529 c3/return
4530
4531 test-convert-function-with-nonlocal-unconditional-break-and-local-vars:
4532
4533 55/push-ebp
4534 89/<- %ebp 4/r32/esp
4535
4536 (clear-stream _test-input-stream)
4537 (clear-stream $_test-input-buffered-file->buffer)
4538 (clear-stream _test-output-stream)
4539 (clear-stream $_test-output-buffered-file->buffer)
4540
4541 (write _test-input-stream "fn foo {\n")
4542 (write _test-input-stream " a: {\n")
4543 (write _test-input-stream " var x: int\n")
4544 (write _test-input-stream " {\n")
4545 (write _test-input-stream " var y: int\n")
4546 (write _test-input-stream " break a\n")
4547 (write _test-input-stream " increment x\n")
4548 (write _test-input-stream " }\n")
4549 (write _test-input-stream " }\n")
4550 (write _test-input-stream "}\n")
4551
4552 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4553 (flush _test-output-buffered-file)
4554 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4560
4561 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/0")
4562 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/1")
4563 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/2")
4564 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/3")
4565 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/4")
4566 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/5")
4567 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/6")
4568 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/7")
4569 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/8")
4570 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/9")
4571 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/10")
4572 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/11")
4573 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/12")
4574 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/13")
4575 (check-next-stream-line-equal _test-output-stream " e9/jump a:break/disp32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/14")
4576 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/15")
4577 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/16")
4578 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/17")
4579 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/18")
4580 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/19")
4581 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/20")
4582 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/21")
4583 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/22")
4584 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/23")
4585 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/24")
4586 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/25")
4587
4588 89/<- %esp 5/r32/ebp
4589 5d/pop-to-ebp
4590 c3/return
4591
4592 test-convert-function-with-unconditional-break-and-local-vars:
4593
4594 55/push-ebp
4595 89/<- %ebp 4/r32/esp
4596
4597 (clear-stream _test-input-stream)
4598 (clear-stream $_test-input-buffered-file->buffer)
4599 (clear-stream _test-output-stream)
4600 (clear-stream $_test-output-buffered-file->buffer)
4601
4602 (write _test-input-stream "fn foo {\n")
4603 (write _test-input-stream " {\n")
4604 (write _test-input-stream " var x: int\n")
4605 (write _test-input-stream " {\n")
4606 (write _test-input-stream " var y: int\n")
4607 (write _test-input-stream " break\n")
4608 (write _test-input-stream " increment x\n")
4609 (write _test-input-stream " }\n")
4610 (write _test-input-stream " }\n")
4611 (write _test-input-stream "}\n")
4612
4613 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4614 (flush _test-output-buffered-file)
4615 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4621
4622 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-break-and-local-vars/0")
4623 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-break-and-local-vars/1")
4624 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/2")
4625 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-break-and-local-vars/3")
4626 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/4")
4627 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/5")
4628 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/6")
4629 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/7")
4630 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/8")
4631 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/9")
4632 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/10")
4633 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/11")
4634 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/12")
4635 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/13")
4636 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/14")
4637 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/15")
4638 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/16")
4639 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/17")
4640 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/18")
4641 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/19")
4642 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-break-and-local-vars/20")
4643 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/21")
4644 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/22")
4645 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-break-and-local-vars/23")
4646
4647 89/<- %esp 5/r32/ebp
4648 5d/pop-to-ebp
4649 c3/return
4650
4651 test-convert-function-with-nonlocal-unconditional-loop-and-local-vars:
4652
4653 55/push-ebp
4654 89/<- %ebp 4/r32/esp
4655
4656 (clear-stream _test-input-stream)
4657 (clear-stream $_test-input-buffered-file->buffer)
4658 (clear-stream _test-output-stream)
4659 (clear-stream $_test-output-buffered-file->buffer)
4660
4661 (write _test-input-stream "fn foo {\n")
4662 (write _test-input-stream " a: {\n")
4663 (write _test-input-stream " var x: int\n")
4664 (write _test-input-stream " {\n")
4665 (write _test-input-stream " var y: int\n")
4666 (write _test-input-stream " loop a\n")
4667 (write _test-input-stream " increment x\n")
4668 (write _test-input-stream " }\n")
4669 (write _test-input-stream " }\n")
4670 (write _test-input-stream "}\n")
4671
4672 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4673 (flush _test-output-buffered-file)
4674 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4680
4681 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/0")
4682 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/1")
4683 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/2")
4684 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/3")
4685 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/4")
4686 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/5")
4687 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/6")
4688 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/7")
4689 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/8")
4690 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/9")
4691 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/10")
4692 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/11")
4693 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/12")
4694 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/13")
4695 (check-next-stream-line-equal _test-output-stream " e9/jump a:loop/disp32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/14")
4696 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/15")
4697 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/16")
4698 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/17")
4699 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/18")
4700 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/19")
4701 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/20")
4702 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/21")
4703 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/22")
4704 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/23")
4705 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/24")
4706 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/25")
4707
4708 89/<- %esp 5/r32/ebp
4709 5d/pop-to-ebp
4710 c3/return
4711
4712 test-convert-function-with-local-array-var-in-mem:
4713
4714 55/push-ebp
4715 89/<- %ebp 4/r32/esp
4716
4717 (clear-stream _test-input-stream)
4718 (clear-stream $_test-input-buffered-file->buffer)
4719 (clear-stream _test-output-stream)
4720 (clear-stream $_test-output-buffered-file->buffer)
4721
4722 (write _test-input-stream "fn foo {\n")
4723 (write _test-input-stream " var x: (array int 3)\n")
4724 (write _test-input-stream "}\n")
4725
4726 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4727 (flush _test-output-buffered-file)
4728 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4734
4735 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-var-in-mem/0")
4736 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-var-in-mem/1")
4737 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-var-in-mem/2")
4738 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-var-in-mem/3")
4739 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-var-in-mem/4")
4740 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-var-in-mem/5")
4741
4742 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-function-with-local-array-var-in-mem/7")
4743 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-function-with-local-array-var-in-mem/8")
4744
4745 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-function-with-local-array-var-in-mem/9")
4746
4747 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-var-in-mem/10")
4748 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-var-in-mem/11")
4749 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-var-in-mem/12")
4750 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-var-in-mem/13")
4751 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-var-in-mem/14")
4752 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-var-in-mem/15")
4753
4754 89/<- %esp 5/r32/ebp
4755 5d/pop-to-ebp
4756 c3/return
4757
4758 test-array-size-in-hex:
4759
4760 55/push-ebp
4761 89/<- %ebp 4/r32/esp
4762
4763 (clear-stream _test-input-stream)
4764 (clear-stream $_test-input-buffered-file->buffer)
4765 (clear-stream _test-output-stream)
4766 (clear-stream $_test-output-buffered-file->buffer)
4767 (clear-stream _test-error-stream)
4768 (clear-stream $_test-error-buffered-file->buffer)
4769
4770 68/push 0/imm32
4771 68/push 0/imm32
4772 89/<- %edx 4/r32/esp
4773 (tailor-exit-descriptor %edx 0x10)
4774
4775 (write _test-input-stream "fn foo {\n")
4776 (write _test-input-stream " var x: (array int 10)\n")
4777 (write _test-input-stream "}\n")
4778
4779 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4780
4781
4782 89/<- %edx 4/r32/esp
4783 (flush _test-output-buffered-file)
4784 (flush _test-error-buffered-file)
4785 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
4791
4792 (check-stream-equal _test-output-stream "" "F - test-array-size-in-hex: output should be empty")
4793 (check-next-stream-line-equal _test-error-stream "literal integers are always hex in Mu; start '10' with a '0x' to be unambiguous, converting it to hexadecimal as necessary." "F - test-array-size-in-hex: error message")
4794
4795 (check-ints-equal *(edx+4) 2 "F - test-array-size-in-hex: exit status")
4796
4797 81 0/subop/add %esp 8/imm32
4798
4799 5d/pop-to-ebp
4800 c3/return
4801
4802 test-convert-function-with-populate:
4803
4804 55/push-ebp
4805 89/<- %ebp 4/r32/esp
4806
4807 (clear-stream _test-input-stream)
4808 (clear-stream $_test-input-buffered-file->buffer)
4809 (clear-stream _test-output-stream)
4810 (clear-stream $_test-output-buffered-file->buffer)
4811
4812 (write _test-input-stream "fn foo {\n")
4813 (write _test-input-stream " var x/ecx: (addr handle array int) <- copy 0\n")
4814 (write _test-input-stream " populate x, 7\n")
4815 (write _test-input-stream "}\n")
4816
4817 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4818 (flush _test-output-buffered-file)
4819 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4825
4826 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-populate/0")
4827 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-populate/1")
4828 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-populate/2")
4829 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-populate/3")
4830 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-populate/4")
4831 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-populate/5")
4832 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-populate/6")
4833 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-populate/7")
4834 (check-next-stream-line-equal _test-output-stream " (allocate-array2 Heap 0x00000004 7 %ecx)" "F - test-convert-function-with-populate/8")
4835 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-populate/9")
4836 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-populate/10")
4837 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-populate/11")
4838 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-populate/12")
4839 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-populate/13")
4840 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-populate/14")
4841 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-populate/15")
4842
4843 89/<- %esp 5/r32/ebp
4844 5d/pop-to-ebp
4845 c3/return
4846
4847
4848 test-convert-function-with-local-array-of-bytes-in-mem:
4849
4850 55/push-ebp
4851 89/<- %ebp 4/r32/esp
4852
4853 (clear-stream _test-input-stream)
4854 (clear-stream $_test-input-buffered-file->buffer)
4855 (clear-stream _test-output-stream)
4856 (clear-stream $_test-output-buffered-file->buffer)
4857
4858 (write _test-input-stream "fn foo {\n")
4859 (write _test-input-stream " var x: (array byte 3)\n")
4860 (write _test-input-stream "}\n")
4861
4862 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4863 (flush _test-output-buffered-file)
4864 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4870
4871 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-of-bytes-in-mem/0")
4872 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-of-bytes-in-mem/1")
4873 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/2")
4874 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-of-bytes-in-mem/3")
4875 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-of-bytes-in-mem/4")
4876 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-of-bytes-in-mem/5")
4877
4878 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x00000003)" "F - test-convert-function-with-local-array-of-bytes-in-mem/7")
4879 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/8")
4880
4881 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000007/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/9")
4882
4883 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-of-bytes-in-mem/10")
4884 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-of-bytes-in-mem/11")
4885 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-of-bytes-in-mem/12")
4886 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/13")
4887 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/14")
4888 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-of-bytes-in-mem/15")
4889
4890 89/<- %esp 5/r32/ebp
4891 5d/pop-to-ebp
4892 c3/return
4893
4894 test-convert-address:
4895
4896 55/push-ebp
4897 89/<- %ebp 4/r32/esp
4898
4899 (clear-stream _test-input-stream)
4900 (clear-stream $_test-input-buffered-file->buffer)
4901 (clear-stream _test-output-stream)
4902 (clear-stream $_test-output-buffered-file->buffer)
4903
4904 (write _test-input-stream "fn foo {\n")
4905 (write _test-input-stream " var a: int\n")
4906 (write _test-input-stream " var b/eax: (addr int) <- address a\n")
4907 (write _test-input-stream "}\n")
4908
4909 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4910 (flush _test-output-buffered-file)
4911 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4917
4918 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-address/0")
4919 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-address/1")
4920 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-address/2")
4921 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-address/3")
4922 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-address/4")
4923 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-address/5")
4924 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-address/6")
4925 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-address/7")
4926 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-address/8")
4927 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-address/9")
4928 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-address/10")
4929 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-address/11")
4930 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-address/12")
4931 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-address/13")
4932 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-address/14")
4933 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-address/15")
4934 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-address/16")
4935
4936 89/<- %esp 5/r32/ebp
4937 5d/pop-to-ebp
4938 c3/return
4939
4940 test-convert-floating-point-convert:
4941
4942 55/push-ebp
4943 89/<- %ebp 4/r32/esp
4944
4945 (clear-stream _test-input-stream)
4946 (clear-stream $_test-input-buffered-file->buffer)
4947 (clear-stream _test-output-stream)
4948 (clear-stream $_test-output-buffered-file->buffer)
4949
4950 (write _test-input-stream "fn foo {\n")
4951 (write _test-input-stream " var a/eax: int <- copy 0\n")
4952 (write _test-input-stream " var b/xmm1: float <- convert a\n")
4953 (write _test-input-stream "}\n")
4954
4955 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4956 (flush _test-output-buffered-file)
4957 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4963
4964 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert/0")
4965 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert/1")
4966 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert/2")
4967 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert/3")
4968 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert/4")
4969 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert/5")
4970 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert/6")
4971 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert/7")
4972 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert/8")
4973 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert/9")
4974 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-floating-point-convert/10")
4975 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert/11")
4976 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert/12")
4977 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert/13")
4978 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert/14")
4979 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert/15")
4980 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert/16")
4981 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert/17")
4982 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert/18")
4983 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert/19")
4984
4985 89/<- %esp 5/r32/ebp
4986 5d/pop-to-ebp
4987 c3/return
4988
4989 test-convert-floating-point-convert-2:
4990
4991 55/push-ebp
4992 89/<- %ebp 4/r32/esp
4993
4994 (clear-stream _test-input-stream)
4995 (clear-stream $_test-input-buffered-file->buffer)
4996 (clear-stream _test-output-stream)
4997 (clear-stream $_test-output-buffered-file->buffer)
4998
4999 (write _test-input-stream "fn foo {\n")
5000 (write _test-input-stream " var a/eax: int <- copy 0\n")
5001 (write _test-input-stream " var b/xmm1: float <- convert a\n")
5002 (write _test-input-stream " a <- convert b\n")
5003 (write _test-input-stream "}\n")
5004
5005 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5006 (flush _test-output-buffered-file)
5007 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5013
5014 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert-2/0")
5015 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert-2/1")
5016 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert-2/2")
5017 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert-2/3")
5018 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert-2/4")
5019 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert-2/5")
5020 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert-2/6")
5021 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert-2/7")
5022 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert-2/8")
5023 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert-2/9")
5024 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-floating-point-convert-2/10")
5025 (check-next-stream-line-equal _test-output-stream " f3 0f 2d/convert-to-int %xmm1 0x00000000/r32" "F - test-convert-floating-point-convert-2/11")
5026 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert-2/12")
5027 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert-2/13")
5028 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert-2/14")
5029 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert-2/15")
5030 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert-2/16")
5031 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert-2/17")
5032 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert-2/18")
5033 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert-2/19")
5034 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert-2/20")
5035
5036 89/<- %esp 5/r32/ebp
5037 5d/pop-to-ebp
5038 c3/return
5039
5040 test-convert-floating-point-operation:
5041
5042 55/push-ebp
5043 89/<- %ebp 4/r32/esp
5044
5045 (clear-stream _test-input-stream)
5046 (clear-stream $_test-input-buffered-file->buffer)
5047 (clear-stream _test-output-stream)
5048 (clear-stream $_test-output-buffered-file->buffer)
5049
5050 (write _test-input-stream "fn f {\n")
5051 (write _test-input-stream " var m: float\n")
5052 (write _test-input-stream " var x/xmm1: float <- copy m\n")
5053 (write _test-input-stream " var y/xmm5: float <- copy m\n")
5054 (write _test-input-stream " x <- copy y\n")
5055 (write _test-input-stream " copy-to m, y\n")
5056 (write _test-input-stream " x <- add y\n")
5057 (write _test-input-stream " x <- add m\n")
5058 (write _test-input-stream " x <- subtract y\n")
5059 (write _test-input-stream " x <- subtract m\n")
5060 (write _test-input-stream " x <- multiply y\n")
5061 (write _test-input-stream " x <- multiply m\n")
5062 (write _test-input-stream " x <- divide y\n")
5063 (write _test-input-stream " x <- divide m\n")
5064 (write _test-input-stream " x <- reciprocal y\n")
5065 (write _test-input-stream " x <- reciprocal m\n")
5066 (write _test-input-stream " x <- square-root y\n")
5067 (write _test-input-stream " x <- square-root m\n")
5068 (write _test-input-stream " x <- inverse-square-root y\n")
5069 (write _test-input-stream " x <- inverse-square-root m\n")
5070 (write _test-input-stream " x <- max y\n")
5071 (write _test-input-stream " x <- max m\n")
5072 (write _test-input-stream " x <- min y\n")
5073 (write _test-input-stream " x <- min m\n")
5074 (write _test-input-stream " compare x, y\n")
5075 (write _test-input-stream " compare x, m\n")
5076 (write _test-input-stream "}\n")
5077
5078 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5079 (flush _test-output-buffered-file)
5080 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5086
5087 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-operation/0")
5088 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-operation/1")
5089 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-operation/2")
5090 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-operation/3")
5091 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-operation/4")
5092 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-operation/5")
5093 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-operation/6")
5094 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/7")
5095 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-operation/8")
5096 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/9")
5097 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/10")
5098 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 5/x32" "F - test-convert-floating-point-operation/11")
5099 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/12")
5100 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy %xmm1 0x00000005/x32" "F - test-convert-floating-point-operation/13")
5101 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/14")
5102 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/15")
5103 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/16")
5104 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/17")
5105 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/18")
5106 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/19")
5107 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/20")
5108 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/21")
5109 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/22")
5110 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/23")
5111 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/24")
5112 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/25")
5113 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/26")
5114 (check-next-stream-line-equal _test-output-stream " f3 0f 52/inverse-square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/27")
5115 (check-next-stream-line-equal _test-output-stream " f3 0f 52/inverse-square-root *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/28")
5116 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/29")
5117 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/30")
5118 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/31")
5119 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/32")
5120 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare %xmm1 0x00000005/x32" "F - test-convert-floating-point-operation/33")
5121 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/34")
5122 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 5/x32" "F - test-convert-floating-point-operation/35")
5123 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/36")
5124 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-operation/37")
5125 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/38")
5126 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-operation/39")
5127 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-operation/40")
5128 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-operation/41")
5129 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-operation/42")
5130 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-operation/43")
5131 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-operation/44")
5132 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-operation/45")
5133
5134 89/<- %esp 5/r32/ebp
5135 5d/pop-to-ebp
5136 c3/return
5137
5138 test-convert-floating-point-dereferenced:
5139
5140 55/push-ebp
5141 89/<- %ebp 4/r32/esp
5142
5143 (clear-stream _test-input-stream)
5144 (clear-stream $_test-input-buffered-file->buffer)
5145 (clear-stream _test-output-stream)
5146 (clear-stream $_test-output-buffered-file->buffer)
5147
5148 (write _test-input-stream "fn f {\n")
5149 (write _test-input-stream " var m: float\n")
5150 (write _test-input-stream " var x/xmm1: float <- copy m\n")
5151 (write _test-input-stream " var y/eax: (addr float) <- copy 0\n")
5152 (write _test-input-stream " x <- multiply *y\n")
5153 (write _test-input-stream "}\n")
5154
5155 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5156 (flush _test-output-buffered-file)
5157 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5163
5164 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-dereferenced/0")
5165 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-dereferenced/1")
5166 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-dereferenced/2")
5167 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-dereferenced/3")
5168 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-dereferenced/4")
5169 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-dereferenced/5")
5170 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-dereferenced/6")
5171 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-dereferenced/7")
5172 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-dereferenced/8")
5173 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-dereferenced/9")
5174 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-dereferenced/10")
5175 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-dereferenced/11")
5176 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *eax 0x00000001/x32" "F - test-convert-floating-point-dereferenced/12")
5177 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-dereferenced/13")
5178 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-dereferenced/14")
5179 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
5180 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-dereferenced/16")
5181 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-dereferenced/17")
5182 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-dereferenced/18")
5183 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-dereferenced/19")
5184 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-dereferenced/20")
5185 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-dereferenced/21")
5186 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-dereferenced/22")
5187
5188 89/<- %esp 5/r32/ebp
5189 5d/pop-to-ebp
5190 c3/return
5191
5192 test-convert-length-of-array:
5193
5194 55/push-ebp
5195 89/<- %ebp 4/r32/esp
5196
5197 (clear-stream _test-input-stream)
5198 (clear-stream $_test-input-buffered-file->buffer)
5199 (clear-stream _test-output-stream)
5200 (clear-stream $_test-output-buffered-file->buffer)
5201
5202 (write _test-input-stream "fn foo a: (addr array int) {\n")
5203 (write _test-input-stream " var b/eax: (addr array int) <- copy a\n")
5204 (write _test-input-stream " var c/eax: int <- length b\n")
5205 (write _test-input-stream "}\n")
5206
5207 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5208 (flush _test-output-buffered-file)
5209 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5215
5216 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array/0")
5217 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array/1")
5218 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array/2")
5219 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array/3")
5220 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array/4")
5221 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array/5")
5222 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array/6")
5223 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array/7")
5224 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array/8")
5225 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array/9")
5226 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array/10")
5227 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array/11")
5228 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array/12")
5229 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array/13")
5230 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array/14")
5231 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array/15")
5232 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array/16")
5233
5234 89/<- %esp 5/r32/ebp
5235 5d/pop-to-ebp
5236 c3/return
5237
5238
5239 test-convert-length-of-array-of-bytes:
5240
5241 55/push-ebp
5242 89/<- %ebp 4/r32/esp
5243
5244 (clear-stream _test-input-stream)
5245 (clear-stream $_test-input-buffered-file->buffer)
5246 (clear-stream _test-output-stream)
5247 (clear-stream $_test-output-buffered-file->buffer)
5248
5249 (write _test-input-stream "fn foo a: (addr array byte) {\n")
5250 (write _test-input-stream " var b/eax: (addr array byte) <- copy a\n")
5251 (write _test-input-stream " var c/eax: int <- length b\n")
5252 (write _test-input-stream "}\n")
5253
5254 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5255 (flush _test-output-buffered-file)
5256 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5262
5263 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-bytes/0")
5264 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-bytes/1")
5265 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-bytes/2")
5266 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-bytes/3")
5267 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-bytes/4")
5268 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-bytes/5")
5269 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-bytes/6")
5270 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/7")
5271 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/8")
5272 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-bytes/9")
5273 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-bytes/10")
5274 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-bytes/11")
5275 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-bytes/12")
5276 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-bytes/13")
5277 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-bytes/14")
5278 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-bytes/15")
5279
5280 89/<- %esp 5/r32/ebp
5281 5d/pop-to-ebp
5282 c3/return
5283
5284 test-convert-length-of-array-on-stack:
5285
5286 55/push-ebp
5287 89/<- %ebp 4/r32/esp
5288
5289 (clear-stream _test-input-stream)
5290 (clear-stream $_test-input-buffered-file->buffer)
5291 (clear-stream _test-output-stream)
5292 (clear-stream $_test-output-buffered-file->buffer)
5293
5294 (write _test-input-stream "fn foo {\n")
5295 (write _test-input-stream " var a: (array int 3)\n")
5296 (write _test-input-stream " var b/eax: int <- length a\n")
5297 (write _test-input-stream "}\n")
5298
5299 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5300 (flush _test-output-buffered-file)
5301 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5307
5308 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-on-stack/0")
5309 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-on-stack/1")
5310 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-on-stack/2")
5311 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-on-stack/3")
5312 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-on-stack/4")
5313 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-on-stack/5")
5314
5315 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-length-of-array-on-stack/6")
5316 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-length-of-array-on-stack/7")
5317 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-on-stack/8")
5318 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff0) 0x00000000/r32" "F - test-convert-length-of-array-on-stack/9")
5319 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array-on-stack/10")
5320 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-on-stack/11")
5321 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-length-of-array-on-stack/12")
5322 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-on-stack/13")
5323 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-on-stack/14")
5324 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-on-stack/15")
5325 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-on-stack/16")
5326 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-on-stack/17")
5327 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-on-stack/18")
5328
5329 89/<- %esp 5/r32/ebp
5330 5d/pop-to-ebp
5331 c3/return
5332
5333 test-reg-var-def-with-read-of-same-register:
5334
5335 55/push-ebp
5336 89/<- %ebp 4/r32/esp
5337
5338 (clear-stream _test-input-stream)
5339 (clear-stream $_test-input-buffered-file->buffer)
5340 (clear-stream _test-output-stream)
5341 (clear-stream $_test-output-buffered-file->buffer)
5342 (clear-stream _test-error-stream)
5343 (clear-stream $_test-error-buffered-file->buffer)
5344
5345 68/push 0/imm32
5346 68/push 0/imm32
5347 89/<- %edx 4/r32/esp
5348 (tailor-exit-descriptor %edx 0x10)
5349
5350 (write _test-input-stream "fn foo {\n")
5351 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5352 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5353 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
5354 (write _test-input-stream "}\n")
5355
5356 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5357
5358
5359 89/<- %edx 4/r32/esp
5360 (flush _test-output-buffered-file)
5361 (flush _test-error-buffered-file)
5362 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5368 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5374 (check-stream-equal _test-error-stream "" "F - test-reg-var-def-with-read-of-same-register: error stream should be empty")
5375
5376 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-reg-var-def-with-read-of-same-register/0")
5377 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-reg-var-def-with-read-of-same-register/1")
5378 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-reg-var-def-with-read-of-same-register/2")
5379 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-reg-var-def-with-read-of-same-register/3")
5380 (check-next-stream-line-equal _test-output-stream " {" "F - test-reg-var-def-with-read-of-same-register/4")
5381 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-reg-var-def-with-read-of-same-register/5")
5382 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-reg-var-def-with-read-of-same-register/6")
5383 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-reg-var-def-with-read-of-same-register/7")
5384 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-reg-var-def-with-read-of-same-register/8")
5385 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-reg-var-def-with-read-of-same-register/9")
5386 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-reg-var-def-with-read-of-same-register/11")
5387 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-reg-var-def-with-read-of-same-register/13")
5388 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-reg-var-def-with-read-of-same-register/14")
5389 (check-next-stream-line-equal _test-output-stream " }" "F - test-reg-var-def-with-read-of-same-register/15")
5390 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-reg-var-def-with-read-of-same-register/16")
5391 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-reg-var-def-with-read-of-same-register/17")
5392 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-reg-var-def-with-read-of-same-register/18")
5393 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-reg-var-def-with-read-of-same-register/19")
5394 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-reg-var-def-with-read-of-same-register/20")
5395
5396 81 0/subop/add %esp 8/imm32
5397
5398 5d/pop-to-ebp
5399 c3/return
5400
5401 test-convert-index-into-array:
5402
5403 55/push-ebp
5404 89/<- %ebp 4/r32/esp
5405
5406 (clear-stream _test-input-stream)
5407 (clear-stream $_test-input-buffered-file->buffer)
5408 (clear-stream _test-output-stream)
5409 (clear-stream $_test-output-buffered-file->buffer)
5410
5411 (write _test-input-stream "fn foo {\n")
5412 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5413 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5414 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
5415 (write _test-input-stream "}\n")
5416
5417 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5418 (flush _test-output-buffered-file)
5419 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5425
5426 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array/0")
5427 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array/1")
5428 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array/2")
5429 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array/3")
5430 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array/4")
5431 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array/5")
5432 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array/6")
5433 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array/7")
5434 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array/8")
5435 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array/9")
5436 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-convert-index-into-array/10")
5437 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array/11")
5438 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array/12")
5439 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array/13")
5440 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array/14")
5441 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array/15")
5442 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array/16")
5443 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array/17")
5444 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array/18")
5445
5446 89/<- %esp 5/r32/ebp
5447 5d/pop-to-ebp
5448 c3/return
5449
5450 test-convert-index-into-array-of-bytes:
5451
5452 55/push-ebp
5453 89/<- %ebp 4/r32/esp
5454
5455 (clear-stream _test-input-stream)
5456 (clear-stream $_test-input-buffered-file->buffer)
5457 (clear-stream _test-output-stream)
5458 (clear-stream $_test-output-buffered-file->buffer)
5459
5460 (write _test-input-stream "fn foo {\n")
5461 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
5462 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5463 (write _test-input-stream " var x/eax: (addr byte) <- index arr, idx\n")
5464 (write _test-input-stream "}\n")
5465
5466 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5467 (flush _test-output-buffered-file)
5468 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5474
5475 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes/0")
5476 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes/1")
5477 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes/2")
5478 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes/3")
5479 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes/4")
5480 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes/5")
5481 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes/6")
5482 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes/7")
5483 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes/8")
5484 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes/9")
5485 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000000 + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes/11")
5486 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes/13")
5487 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes/14")
5488 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes/15")
5489 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes/16")
5490 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes/17")
5491 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes/18")
5492 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes/19")
5493 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes/20")
5494
5495 89/<- %esp 5/r32/ebp
5496 5d/pop-to-ebp
5497 c3/return
5498
5499 test-convert-index-into-array-with-literal:
5500
5501 55/push-ebp
5502 89/<- %ebp 4/r32/esp
5503
5504 (clear-stream _test-input-stream)
5505 (clear-stream $_test-input-buffered-file->buffer)
5506 (clear-stream _test-output-stream)
5507 (clear-stream $_test-output-buffered-file->buffer)
5508
5509 (write _test-input-stream "fn foo {\n")
5510 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5511 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
5512 (write _test-input-stream "}\n")
5513
5514 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5515 (flush _test-output-buffered-file)
5516 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5522
5523 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-with-literal/0")
5524 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-with-literal/1")
5525 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-with-literal/2")
5526 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-with-literal/3")
5527 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-with-literal/4")
5528 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-with-literal/5")
5529 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-with-literal/6")
5530 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-with-literal/7")
5531
5532 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x0000000c) 0x00000000/r32" "F - test-convert-index-into-array-with-literal/8")
5533 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-with-literal/9")
5534 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-with-literal/10")
5535 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-with-literal/11")
5536 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-with-literal/12")
5537 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-with-literal/13")
5538 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-with-literal/14")
5539 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-with-literal/15")
5540
5541 89/<- %esp 5/r32/ebp
5542 5d/pop-to-ebp
5543 c3/return
5544
5545 test-convert-index-into-array-of-bytes-with-literal:
5546
5547 55/push-ebp
5548 89/<- %ebp 4/r32/esp
5549
5550 (clear-stream _test-input-stream)
5551 (clear-stream $_test-input-buffered-file->buffer)
5552 (clear-stream _test-output-stream)
5553 (clear-stream $_test-output-buffered-file->buffer)
5554
5555 (write _test-input-stream "fn foo {\n")
5556 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
5557 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
5558 (write _test-input-stream "}\n")
5559
5560 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5561 (flush _test-output-buffered-file)
5562 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5568
5569 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-with-literal/0")
5570 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-with-literal/1")
5571 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/2")
5572 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-with-literal/3")
5573 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-with-literal/4")
5574 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-with-literal/5")
5575 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-with-literal/6")
5576 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-with-literal/7")
5577
5578 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000006) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-with-literal/8")
5579 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-with-literal/9")
5580 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-with-literal/10")
5581 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-with-literal/11")
5582 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-with-literal/12")
5583 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-with-literal/13")
5584 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/14")
5585 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-with-literal/15")
5586
5587 89/<- %esp 5/r32/ebp
5588 5d/pop-to-ebp
5589 c3/return
5590
5591 test-convert-index-into-array-on-stack:
5592
5593 55/push-ebp
5594 89/<- %ebp 4/r32/esp
5595
5596 (clear-stream _test-input-stream)
5597 (clear-stream $_test-input-buffered-file->buffer)
5598 (clear-stream _test-output-stream)
5599 (clear-stream $_test-output-buffered-file->buffer)
5600
5601 (write _test-input-stream "fn foo {\n")
5602 (write _test-input-stream " var arr: (array int 3)\n")
5603 (write _test-input-stream " var idx/eax: int <- copy 2\n")
5604 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
5605 (write _test-input-stream "}\n")
5606
5607 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5608 (flush _test-output-buffered-file)
5609 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5615
5616 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack/0")
5617 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack/1")
5618 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack/2")
5619 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack/3")
5620 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack/4")
5621 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack/5")
5622
5623 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack/6")
5624 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack/7")
5625
5626 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack/8")
5627 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 2/imm32" "F - test-convert-index-into-array-on-stack/9")
5628
5629 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + eax<<0x00000002 + 0xfffffff4) 0x00000000/r32" "F - test-convert-index-into-array-on-stack/10")
5630
5631 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack/11")
5632
5633 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack/12")
5634
5635 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack/13")
5636 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack/14")
5637 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack/15")
5638 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack/16")
5639 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack/17")
5640 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack/18")
5641
5642 89/<- %esp 5/r32/ebp
5643 5d/pop-to-ebp
5644 c3/return
5645
5646 test-convert-index-into-array-on-stack-with-literal:
5647
5648 55/push-ebp
5649 89/<- %ebp 4/r32/esp
5650
5651 (clear-stream _test-input-stream)
5652 (clear-stream $_test-input-buffered-file->buffer)
5653 (clear-stream _test-output-stream)
5654 (clear-stream $_test-output-buffered-file->buffer)
5655
5656 (write _test-input-stream "fn foo {\n")
5657 (write _test-input-stream " var arr: (array int 3)\n")
5658 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
5659 (write _test-input-stream "}\n")
5660
5661 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5662 (flush _test-output-buffered-file)
5663 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5669
5670 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack-with-literal/0")
5671 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack-with-literal/1")
5672 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack-with-literal/2")
5673 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack-with-literal/3")
5674 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack-with-literal/4")
5675 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack-with-literal/5")
5676
5677 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack-with-literal/6")
5678 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack-with-literal/7")
5679
5680 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack-with-literal/8")
5681
5682 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + 0xfffffffc) 0x00000000/r32" "F - test-convert-index-into-array-on-stack-with-literal/9")
5683
5684 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack-with-literal/10")
5685
5686 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack-with-literal/11")
5687
5688 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack-with-literal/12")
5689 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack-with-literal/13")
5690 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack-with-literal/14")
5691 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack-with-literal/15")
5692 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack-with-literal/16")
5693 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack-with-literal/17")
5694
5695 89/<- %esp 5/r32/ebp
5696 5d/pop-to-ebp
5697 c3/return
5698
5699 test-convert-index-into-array-of-bytes-on-stack-with-literal:
5700
5701 55/push-ebp
5702 89/<- %ebp 4/r32/esp
5703
5704 (clear-stream _test-input-stream)
5705 (clear-stream $_test-input-buffered-file->buffer)
5706 (clear-stream _test-output-stream)
5707 (clear-stream $_test-output-buffered-file->buffer)
5708
5709 (write _test-input-stream "fn foo {\n")
5710 (write _test-input-stream " var arr: (array byte 3)\n")
5711 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
5712 (write _test-input-stream "}\n")
5713
5714 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5715 (flush _test-output-buffered-file)
5716 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5722
5723 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/0")
5724 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/1")
5725 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/2")
5726 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/3")
5727 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/4")
5728 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/5")
5729
5730 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x00000003)" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/6")
5731 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/7")
5732
5733 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/8")
5734
5735 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + 0xffffffff) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/9")
5736
5737 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/10")
5738
5739 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000007/imm32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/11")
5740
5741 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/12")
5742 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/13")
5743 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/14")
5744 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/15")
5745 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/16")
5746 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/17")
5747
5748 89/<- %esp 5/r32/ebp
5749 5d/pop-to-ebp
5750 c3/return
5751
5752 test-convert-index-into-array-using-offset:
5753
5754 55/push-ebp
5755 89/<- %ebp 4/r32/esp
5756
5757 (clear-stream _test-input-stream)
5758 (clear-stream $_test-input-buffered-file->buffer)
5759 (clear-stream _test-output-stream)
5760 (clear-stream $_test-output-buffered-file->buffer)
5761
5762 (write _test-input-stream "fn foo {\n")
5763 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5764 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5765 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
5766 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
5767 (write _test-input-stream "}\n")
5768
5769 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5770 (flush _test-output-buffered-file)
5771 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5777
5778 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset/0")
5779 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset/1")
5780 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset/2")
5781 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset/3")
5782 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset/4")
5783 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset/5")
5784 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset/6")
5785 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset/7")
5786 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset/8")
5787 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-using-offset/9")
5788 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset/10")
5789 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-using-offset/11")
5790 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset/12")
5791 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset/13")
5792 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset/14")
5793 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset/15")
5794 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset/16")
5795 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset/17")
5796 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset/18")
5797 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset/19")
5798
5799 89/<- %esp 5/r32/ebp
5800 5d/pop-to-ebp
5801 c3/return
5802
5803 test-convert-index-into-array-of-bytes-using-offset:
5804
5805 55/push-ebp
5806 89/<- %ebp 4/r32/esp
5807
5808 (clear-stream _test-input-stream)
5809 (clear-stream $_test-input-buffered-file->buffer)
5810 (clear-stream _test-output-stream)
5811 (clear-stream $_test-output-buffered-file->buffer)
5812
5813 (write _test-input-stream "fn foo {\n")
5814 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
5815 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5816 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
5817 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
5818 (write _test-input-stream "}\n")
5819
5820 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5821 (flush _test-output-buffered-file)
5822 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5828
5829 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset/0")
5830 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset/1")
5831 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/2")
5832 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset/3")
5833 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset/4")
5834 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset/5")
5835 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset/6")
5836 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset/7")
5837 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/8")
5838 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes-using-offset/9")
5839 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000001/imm32 0x00000001/r32" "F - test-convert-index-into-array-of-bytes-using-offset/10")
5840 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-using-offset/11")
5841 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/12")
5842 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset/13")
5843 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset/14")
5844 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset/15")
5845 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset/16")
5846 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset/17")
5847 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/18")
5848 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset/19")
5849
5850 89/<- %esp 5/r32/ebp
5851 5d/pop-to-ebp
5852 c3/return
5853
5854 test-convert-index-into-array-using-offset-on-stack:
5855
5856 55/push-ebp
5857 89/<- %ebp 4/r32/esp
5858
5859 (clear-stream _test-input-stream)
5860 (clear-stream $_test-input-buffered-file->buffer)
5861 (clear-stream _test-output-stream)
5862 (clear-stream $_test-output-buffered-file->buffer)
5863
5864 (write _test-input-stream "fn foo {\n")
5865 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5866 (write _test-input-stream " var idx: int\n")
5867 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
5868 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
5869 (write _test-input-stream "}\n")
5870
5871 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5872 (flush _test-output-buffered-file)
5873 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5879
5880 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset-on-stack/0")
5881 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset-on-stack/1")
5882 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset-on-stack/2")
5883 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset-on-stack/3")
5884 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset-on-stack/4")
5885 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset-on-stack/5")
5886 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset-on-stack/6")
5887 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/7")
5888 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/8")
5889 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset-on-stack/9")
5890 (check-next-stream-line-equal _test-output-stream " 69/multiply *(ebp+0xfffffff8) 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset-on-stack/10")
5891 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-using-offset-on-stack/11")
5892 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset-on-stack/12")
5893 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-index-into-array-using-offset-on-stack/13")
5894 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset-on-stack/14")
5895 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset-on-stack/15")
5896 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset-on-stack/16")
5897 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset-on-stack/17")
5898 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset-on-stack/18")
5899 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset-on-stack/19")
5900 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset-on-stack/20")
5901
5902 89/<- %esp 5/r32/ebp
5903 5d/pop-to-ebp
5904 c3/return
5905
5906 test-convert-index-into-array-of-bytes-using-offset-on-stack:
5907
5908 55/push-ebp
5909 89/<- %ebp 4/r32/esp
5910
5911 (clear-stream _test-input-stream)
5912 (clear-stream $_test-input-buffered-file->buffer)
5913 (clear-stream _test-output-stream)
5914 (clear-stream $_test-output-buffered-file->buffer)
5915
5916 (write _test-input-stream "fn foo {\n")
5917 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
5918 (write _test-input-stream " var idx: int\n")
5919 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
5920 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
5921 (write _test-input-stream "}\n")
5922
5923 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5924 (flush _test-output-buffered-file)
5925 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5931
5932 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/0")
5933 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/1")
5934 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/2")
5935 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/3")
5936 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/4")
5937 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/5")
5938 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/6")
5939 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/7")
5940 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/8")
5941 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/9")
5942 (check-next-stream-line-equal _test-output-stream " 69/multiply *(ebp+0xfffffff8) 0x00000001/imm32 0x00000001/r32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/10")
5943 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/11")
5944 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/12")
5945 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/13")
5946 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/14")
5947 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/15")
5948 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/16")
5949 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/17")
5950 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/18")
5951 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/19")
5952 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/20")
5953
5954 89/<- %esp 5/r32/ebp
5955 5d/pop-to-ebp
5956 c3/return
5957
5958 test-convert-function-and-type-definition:
5959
5960 55/push-ebp
5961 89/<- %ebp 4/r32/esp
5962
5963 (clear-stream _test-input-stream)
5964 (clear-stream $_test-input-buffered-file->buffer)
5965 (clear-stream _test-output-stream)
5966 (clear-stream $_test-output-buffered-file->buffer)
5967
5968 (write _test-input-stream "fn foo a: (addr t) {\n")
5969 (write _test-input-stream " var _a/eax: (addr t) <- copy a\n")
5970 (write _test-input-stream " var b/ecx: (addr int) <- get _a, x\n")
5971 (write _test-input-stream " var c/ecx: (addr int) <- get _a, y\n")
5972 (write _test-input-stream "}\n")
5973 (write _test-input-stream "type t {\n")
5974 (write _test-input-stream " x: int\n")
5975 (write _test-input-stream " y: int\n")
5976 (write _test-input-stream "}\n")
5977
5978 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5979 (flush _test-output-buffered-file)
5980 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5986
5987 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-and-type-definition/0")
5988 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-and-type-definition/1")
5989 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-and-type-definition/2")
5990 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-and-type-definition/3")
5991 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-and-type-definition/4")
5992 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-and-type-definition/5")
5993 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-and-type-definition/6")
5994 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-and-type-definition/7")
5995 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-and-type-definition/8")
5996 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000000) 0x00000001/r32" "F - test-convert-function-and-type-definition/9")
5997 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000004) 0x00000001/r32" "F - test-convert-function-and-type-definition/11")
5998 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-and-type-definition/13")
5999 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-and-type-definition/14")
6000 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-and-type-definition/15")
6001 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-and-type-definition/16")
6002 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-and-type-definition/17")
6003 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-and-type-definition/18")
6004 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-and-type-definition/19")
6005 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-and-type-definition/20")
6006
6007 89/<- %esp 5/r32/ebp
6008 5d/pop-to-ebp
6009 c3/return
6010
6011 test-type-definition-with-array:
6012
6013 55/push-ebp
6014 89/<- %ebp 4/r32/esp
6015
6016 (clear-stream _test-input-stream)
6017 (clear-stream $_test-input-buffered-file->buffer)
6018 (clear-stream _test-output-stream)
6019 (clear-stream $_test-output-buffered-file->buffer)
6020 (clear-stream _test-error-stream)
6021 (clear-stream $_test-error-buffered-file->buffer)
6022
6023 68/push 0/imm32
6024 68/push 0/imm32
6025 89/<- %edx 4/r32/esp
6026 (tailor-exit-descriptor %edx 0x10)
6027
6028 (write _test-input-stream "type t {\n")
6029 (write _test-input-stream " a: (array int 3)\n")
6030 (write _test-input-stream "}\n")
6031
6032 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6033
6034
6035 89/<- %edx 4/r32/esp
6036 (flush _test-output-buffered-file)
6037 (flush _test-error-buffered-file)
6038 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6044
6045 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-array: output should be empty")
6046 (check-next-stream-line-equal _test-error-stream "type t: 'array' elements not allowed for now" "F - test-type-definition-with-array: error message")
6047
6048 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-array: exit status")
6049
6050 81 0/subop/add %esp 8/imm32
6051
6052 5d/pop-to-ebp
6053 c3/return
6054
6055 test-type-definition-with-addr:
6056
6057 55/push-ebp
6058 89/<- %ebp 4/r32/esp
6059
6060 (clear-stream _test-input-stream)
6061 (clear-stream $_test-input-buffered-file->buffer)
6062 (clear-stream _test-output-stream)
6063 (clear-stream $_test-output-buffered-file->buffer)
6064 (clear-stream _test-error-stream)
6065 (clear-stream $_test-error-buffered-file->buffer)
6066
6067 68/push 0/imm32
6068 68/push 0/imm32
6069 89/<- %edx 4/r32/esp
6070 (tailor-exit-descriptor %edx 0x10)
6071
6072 (write _test-input-stream "type t {\n")
6073 (write _test-input-stream " a: (addr int)\n")
6074 (write _test-input-stream "}\n")
6075
6076 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6077
6078
6079 89/<- %edx 4/r32/esp
6080 (flush _test-output-buffered-file)
6081 (flush _test-error-buffered-file)
6082 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6088
6089 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-addr: output should be empty")
6090 (check-next-stream-line-equal _test-error-stream "type t: 'addr' elements not allowed" "F - test-type-definition-with-addr: error message")
6091
6092 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-addr: exit status")
6093
6094 81 0/subop/add %esp 8/imm32
6095
6096 5d/pop-to-ebp
6097 c3/return
6098
6099 test-convert-function-with-local-var-with-user-defined-type:
6100
6101 55/push-ebp
6102 89/<- %ebp 4/r32/esp
6103
6104 (clear-stream _test-input-stream)
6105 (clear-stream $_test-input-buffered-file->buffer)
6106 (clear-stream _test-output-stream)
6107 (clear-stream $_test-output-buffered-file->buffer)
6108
6109 (write _test-input-stream "fn foo {\n")
6110 (write _test-input-stream " var a: t\n")
6111 (write _test-input-stream "}\n")
6112 (write _test-input-stream "type t {\n")
6113 (write _test-input-stream " x: int\n")
6114 (write _test-input-stream " y: int\n")
6115 (write _test-input-stream "}\n")
6116
6117 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6118 (flush _test-output-buffered-file)
6119 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6125
6126 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type/0")
6127 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type/1")
6128 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/2")
6129 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-with-user-defined-type/3")
6130 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type/4")
6131 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type/5")
6132 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/6")
6133 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/7")
6134 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/8")
6135 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type/9")
6136 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type/10")
6137 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type/11")
6138 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-with-user-defined-type/12")
6139 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/13")
6140 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type/14")
6141
6142 89/<- %esp 5/r32/ebp
6143 5d/pop-to-ebp
6144 c3/return
6145
6146 test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type:
6147
6148 55/push-ebp
6149 89/<- %ebp 4/r32/esp
6150
6151 (clear-stream _test-input-stream)
6152 (clear-stream $_test-input-buffered-file->buffer)
6153 (clear-stream _test-output-stream)
6154 (clear-stream $_test-output-buffered-file->buffer)
6155
6156 (write _test-input-stream "fn foo {\n")
6157 (write _test-input-stream " var a: t\n")
6158 (write _test-input-stream "}\n")
6159 (write _test-input-stream "type t {\n")
6160 (write _test-input-stream " x: s\n")
6161 (write _test-input-stream "}\n")
6162 (write _test-input-stream "type s {\n")
6163 (write _test-input-stream " z: int\n")
6164 (write _test-input-stream "}\n")
6165
6166 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6167 (flush _test-output-buffered-file)
6168 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6174
6175 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/0")
6176 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/1")
6177 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/2")
6178 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/3")
6179 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/4")
6180 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/5")
6181 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/7")
6182 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/8")
6183 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/9")
6184 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/10")
6185 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/11")
6186 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/12")
6187 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/13")
6188 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/14")
6189
6190 89/<- %esp 5/r32/ebp
6191 5d/pop-to-ebp
6192 c3/return
6193
6194 test-convert-function-call-with-arg-of-user-defined-type:
6195
6196 55/push-ebp
6197 89/<- %ebp 4/r32/esp
6198
6199 (clear-stream _test-input-stream)
6200 (clear-stream $_test-input-buffered-file->buffer)
6201 (clear-stream _test-output-stream)
6202 (clear-stream $_test-output-buffered-file->buffer)
6203
6204 (write _test-input-stream "fn f {\n")
6205 (write _test-input-stream " var a: t\n")
6206 (write _test-input-stream " foo a\n")
6207 (write _test-input-stream "}\n")
6208 (write _test-input-stream "fn foo x: t {\n")
6209 (write _test-input-stream "}\n")
6210 (write _test-input-stream "type t {\n")
6211 (write _test-input-stream " x: int\n")
6212 (write _test-input-stream " y: int\n")
6213 (write _test-input-stream "}\n")
6214
6215 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6216 (flush _test-output-buffered-file)
6217 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6223
6224 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
6225 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
6226 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
6227 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type/3")
6228 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
6229 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
6230
6231 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
6232 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
6233
6234 (check-next-stream-line-equal _test-output-stream " (foo *(ebp+0xfffffff8) *(ebp+0xfffffffc))" "F - test-convert-function-call-with-arg-of-user-defined-type/8")
6235
6236 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/9")
6237 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
6238 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
6239 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
6240 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/13")
6241 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
6242 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
6243 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
6244 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
6245 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
6246 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type/19")
6247 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
6248 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/21")
6249 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
6250 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
6251
6252 89/<- %esp 5/r32/ebp
6253 5d/pop-to-ebp
6254 c3/return
6255
6256 test-convert-function-call-with-arg-of-user-defined-type-register-indirect:
6257
6258 55/push-ebp
6259 89/<- %ebp 4/r32/esp
6260
6261 (clear-stream _test-input-stream)
6262 (clear-stream $_test-input-buffered-file->buffer)
6263 (clear-stream _test-output-stream)
6264 (clear-stream $_test-output-buffered-file->buffer)
6265
6266 (write _test-input-stream "fn f {\n")
6267 (write _test-input-stream " var a/eax: (addr t) <- copy 0\n")
6268 (write _test-input-stream " foo *a\n")
6269 (write _test-input-stream "}\n")
6270 (write _test-input-stream "fn foo x: t {\n")
6271 (write _test-input-stream "}\n")
6272 (write _test-input-stream "type t {\n")
6273 (write _test-input-stream " x: int\n")
6274 (write _test-input-stream " y: int\n")
6275 (write _test-input-stream "}\n")
6276
6277 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6278 (flush _test-output-buffered-file)
6279 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6285
6286 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
6287 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
6288 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
6289 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type/3")
6290 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
6291 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
6292
6293 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
6294 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
6295
6296 (check-next-stream-line-equal _test-output-stream " (foo *(eax+0x00000000) *(eax+0x00000004))" "F - test-convert-function-call-with-arg-of-user-defined-type/8")
6297
6298 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-call-with-arg-of-user-defined-type/9")
6299 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
6300 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
6301 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
6302 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/13")
6303 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
6304 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
6305 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
6306 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
6307 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
6308 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type/19")
6309 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
6310 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/21")
6311 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
6312 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
6313
6314 89/<- %esp 5/r32/ebp
6315 5d/pop-to-ebp
6316 c3/return
6317
6318
6319
6320 test-convert-function-call-with-arg-of-user-defined-type-by-reference:
6321
6322 55/push-ebp
6323 89/<- %ebp 4/r32/esp
6324
6325 (clear-stream _test-input-stream)
6326 (clear-stream $_test-input-buffered-file->buffer)
6327 (clear-stream _test-output-stream)
6328 (clear-stream $_test-output-buffered-file->buffer)
6329
6330 (write _test-input-stream "fn f {\n")
6331 (write _test-input-stream " var a: t\n")
6332 (write _test-input-stream " var b/eax: (addr t) <- address a\n")
6333 (write _test-input-stream " foo b\n")
6334 (write _test-input-stream "}\n")
6335 (write _test-input-stream "fn foo x: (addr t) {\n")
6336 (write _test-input-stream " var x/ecx: (addr t) <- copy x\n")
6337 (write _test-input-stream "}\n")
6338 (write _test-input-stream "type t {\n")
6339 (write _test-input-stream " x: int\n")
6340 (write _test-input-stream " y: int\n")
6341 (write _test-input-stream "}\n")
6342
6343 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6344 (flush _test-output-buffered-file)
6345 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6351
6352 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/0")
6353 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/1")
6354 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/2")
6355 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/3")
6356 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/4")
6357 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/5")
6358
6359 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/6")
6360 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/7")
6361
6362 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/8")
6363 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/9")
6364
6365 (check-next-stream-line-equal _test-output-stream " (foo %eax)" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/10")
6366
6367 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/11")
6368 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/12")
6369 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/13")
6370 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/14")
6371 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/15")
6372 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/16")
6373 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/17")
6374 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/18")
6375 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/19")
6376 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/20")
6377 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/21")
6378 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/22")
6379 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/23")
6380 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/24")
6381 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/25")
6382 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000001/r32" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/26")
6383 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/27")
6384 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/28")
6385 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/29")
6386 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/30")
6387 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/31")
6388 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/32")
6389 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/33")
6390
6391 89/<- %esp 5/r32/ebp
6392 5d/pop-to-ebp
6393 c3/return
6394
6395 test-convert-get-on-local-variable:
6396
6397 55/push-ebp
6398 89/<- %ebp 4/r32/esp
6399
6400 (clear-stream _test-input-stream)
6401 (clear-stream $_test-input-buffered-file->buffer)
6402 (clear-stream _test-output-stream)
6403 (clear-stream $_test-output-buffered-file->buffer)
6404
6405 (write _test-input-stream "fn foo {\n")
6406 (write _test-input-stream " var a: t\n")
6407 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
6408 (write _test-input-stream "}\n")
6409 (write _test-input-stream "type t {\n")
6410 (write _test-input-stream " x: int\n")
6411 (write _test-input-stream " y: int\n")
6412 (write _test-input-stream "}\n")
6413
6414 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6415 (flush _test-output-buffered-file)
6416 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6422
6423 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-local-variable/0")
6424 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-local-variable/1")
6425 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-local-variable/2")
6426 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-local-variable/3")
6427 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-local-variable/4")
6428 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-local-variable/5")
6429
6430 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/6")
6431 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/7")
6432
6433 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-local-variable/8")
6434
6435 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000001/r32" "F - test-convert-get-on-local-variable/9")
6436
6437 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-local-variable/10")
6438
6439 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-get-on-local-variable/11")
6440 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-local-variable/12")
6441 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-local-variable/13")
6442 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-local-variable/14")
6443 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-local-variable/15")
6444 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-local-variable/16")
6445 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-local-variable/17")
6446
6447 89/<- %esp 5/r32/ebp
6448 5d/pop-to-ebp
6449 c3/return
6450
6451 test-convert-get-on-function-argument:
6452
6453 55/push-ebp
6454 89/<- %ebp 4/r32/esp
6455
6456 (clear-stream _test-input-stream)
6457 (clear-stream $_test-input-buffered-file->buffer)
6458 (clear-stream _test-output-stream)
6459 (clear-stream $_test-output-buffered-file->buffer)
6460
6461 (write _test-input-stream "fn foo a: t {\n")
6462 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
6463 (write _test-input-stream "}\n")
6464 (write _test-input-stream "type t {\n")
6465 (write _test-input-stream " x: int\n")
6466 (write _test-input-stream " y: int\n")
6467 (write _test-input-stream "}\n")
6468
6469 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6470 (flush _test-output-buffered-file)
6471 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6477
6478 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument/0")
6479 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument/1")
6480 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument/2")
6481 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument/3")
6482 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument/4")
6483 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument/5")
6484
6485 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument/6")
6486
6487 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument/7")
6488
6489 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument/8")
6490 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument/9")
6491 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument/10")
6492 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument/11")
6493 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument/12")
6494 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument/13")
6495 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument/14")
6496
6497 89/<- %esp 5/r32/ebp
6498 5d/pop-to-ebp
6499 c3/return
6500
6501 test-convert-get-on-function-argument-with-known-type:
6502
6503 55/push-ebp
6504 89/<- %ebp 4/r32/esp
6505
6506 (clear-stream _test-input-stream)
6507 (clear-stream $_test-input-buffered-file->buffer)
6508 (clear-stream _test-output-stream)
6509 (clear-stream $_test-output-buffered-file->buffer)
6510
6511 (write _test-input-stream "type t {\n")
6512 (write _test-input-stream " x: int\n")
6513 (write _test-input-stream " y: int\n")
6514 (write _test-input-stream "}\n")
6515 (write _test-input-stream "fn foo a: t {\n")
6516 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
6517 (write _test-input-stream "}\n")
6518
6519 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6520 (flush _test-output-buffered-file)
6521 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6527
6528 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument-with-known-type/0")
6529 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument-with-known-type/1")
6530 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument-with-known-type/2")
6531 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument-with-known-type/3")
6532 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument-with-known-type/4")
6533 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument-with-known-type/5")
6534
6535 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument-with-known-type/6")
6536
6537 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument-with-known-type/7")
6538
6539 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument-with-known-type/8")
6540 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument-with-known-type/9")
6541 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument-with-known-type/10")
6542 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument-with-known-type/11")
6543 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument-with-known-type/12")
6544 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument-with-known-type/13")
6545 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument-with-known-type/14")
6546
6547 89/<- %esp 5/r32/ebp
6548 5d/pop-to-ebp
6549 c3/return
6550
6551 test-add-with-too-many-inouts:
6552
6553 55/push-ebp
6554 89/<- %ebp 4/r32/esp
6555
6556 (clear-stream _test-input-stream)
6557 (clear-stream $_test-input-buffered-file->buffer)
6558 (clear-stream _test-output-stream)
6559 (clear-stream $_test-output-buffered-file->buffer)
6560 (clear-stream _test-error-stream)
6561 (clear-stream $_test-error-buffered-file->buffer)
6562
6563 68/push 0/imm32
6564 68/push 0/imm32
6565 89/<- %edx 4/r32/esp
6566 (tailor-exit-descriptor %edx 0x10)
6567
6568 (write _test-input-stream "fn foo {\n")
6569 (write _test-input-stream " var a: int\n")
6570 (write _test-input-stream " var b/ecx: int <- add a, 0\n")
6571 (write _test-input-stream "}\n")
6572
6573 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6574
6575
6576 89/<- %edx 4/r32/esp
6577 (flush _test-output-buffered-file)
6578 (flush _test-error-buffered-file)
6579 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6585
6586 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts: output should be empty")
6587 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add: too many inouts; most primitives support at most two arguments, across inouts and outputs" "F - test-add-with-too-many-inouts: error message")
6588
6589 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts: exit status")
6590
6591 81 0/subop/add %esp 8/imm32
6592
6593 5d/pop-to-ebp
6594 c3/return
6595
6596 test-add-with-too-many-inouts-2:
6597
6598 55/push-ebp
6599 89/<- %ebp 4/r32/esp
6600
6601 (clear-stream _test-input-stream)
6602 (clear-stream $_test-input-buffered-file->buffer)
6603 (clear-stream _test-output-stream)
6604 (clear-stream $_test-output-buffered-file->buffer)
6605 (clear-stream _test-error-stream)
6606 (clear-stream $_test-error-buffered-file->buffer)
6607
6608 68/push 0/imm32
6609 68/push 0/imm32
6610 89/<- %edx 4/r32/esp
6611 (tailor-exit-descriptor %edx 0x10)
6612
6613 (write _test-input-stream "fn foo {\n")
6614 (write _test-input-stream " var a: int\n")
6615 (write _test-input-stream " add-to a, 0, 1\n")
6616 (write _test-input-stream "}\n")
6617
6618 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6619
6620
6621 89/<- %edx 4/r32/esp
6622 (flush _test-output-buffered-file)
6623 (flush _test-error-buffered-file)
6624 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6630
6631 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts-2: output should be empty")
6632 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add-to: too many inouts; most primitives support at most two arguments, across inouts and outputs" "F - test-add-with-too-many-inouts-2: error message")
6633
6634 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts-2: exit status")
6635
6636 81 0/subop/add %esp 8/imm32
6637
6638 5d/pop-to-ebp
6639 c3/return
6640
6641 test-add-with-too-many-outputs:
6642
6643 55/push-ebp
6644 89/<- %ebp 4/r32/esp
6645
6646 (clear-stream _test-input-stream)
6647 (clear-stream $_test-input-buffered-file->buffer)
6648 (clear-stream _test-output-stream)
6649 (clear-stream $_test-output-buffered-file->buffer)
6650 (clear-stream _test-error-stream)
6651 (clear-stream $_test-error-buffered-file->buffer)
6652
6653 68/push 0/imm32
6654 68/push 0/imm32
6655 89/<- %edx 4/r32/esp
6656 (tailor-exit-descriptor %edx 0x10)
6657
6658 (write _test-input-stream "fn foo {\n")
6659 (write _test-input-stream " var a/eax: int <- copy 0\n")
6660 (write _test-input-stream " var b/ebx: int <- copy 0\n")
6661 (write _test-input-stream " var c/ecx: int <- copy 0\n")
6662 (write _test-input-stream " c, b <- add a\n")
6663 (write _test-input-stream "}\n")
6664
6665 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6666
6667
6668 89/<- %edx 4/r32/esp
6669 (flush _test-output-buffered-file)
6670 (flush _test-error-buffered-file)
6671 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6677
6678 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-outputs: output should be empty")
6679 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add: too many outputs; most primitives support at most one output" "F - test-add-with-too-many-outputs: error message")
6680
6681 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-outputs: exit status")
6682
6683 81 0/subop/add %esp 8/imm32
6684
6685 5d/pop-to-ebp
6686 c3/return
6687
6688 test-add-with-non-number:
6689
6690 55/push-ebp
6691 89/<- %ebp 4/r32/esp
6692
6693 (clear-stream _test-input-stream)
6694 (clear-stream $_test-input-buffered-file->buffer)
6695 (clear-stream _test-output-stream)
6696 (clear-stream $_test-output-buffered-file->buffer)
6697 (clear-stream _test-error-stream)
6698 (clear-stream $_test-error-buffered-file->buffer)
6699
6700 68/push 0/imm32
6701 68/push 0/imm32
6702 89/<- %edx 4/r32/esp
6703 (tailor-exit-descriptor %edx 0x10)
6704
6705 (write _test-input-stream "fn foo {\n")
6706 (write _test-input-stream " var a: int\n")
6707 (write _test-input-stream " var b/ecx: (addr int) <- add a\n")
6708 (write _test-input-stream "}\n")
6709
6710 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6711
6712
6713 89/<- %edx 4/r32/esp
6714 (flush _test-output-buffered-file)
6715 (flush _test-error-buffered-file)
6716 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6722
6723 (check-stream-equal _test-output-stream "" "F - test-add-with-non-number: output should be empty")
6724 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add: 'b' must be a non-addr non-offset scalar" "F - test-add-with-non-number: error message")
6725
6726 (check-ints-equal *(edx+4) 2 "F - test-add-with-non-number: exit status")
6727
6728 81 0/subop/add %esp 8/imm32
6729
6730 5d/pop-to-ebp
6731 c3/return
6732
6733 test-add-with-addr-dereferenced:
6734
6735 55/push-ebp
6736 89/<- %ebp 4/r32/esp
6737
6738 (clear-stream _test-input-stream)
6739 (clear-stream $_test-input-buffered-file->buffer)
6740 (clear-stream _test-output-stream)
6741 (clear-stream $_test-output-buffered-file->buffer)
6742
6743 (write _test-input-stream "fn foo {\n")
6744 (write _test-input-stream " var a/eax: (addr int) <- copy 0\n")
6745 (write _test-input-stream " add-to *a, 1\n")
6746 (write _test-input-stream "}\n")
6747
6748 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6749 (flush _test-output-buffered-file)
6750
6751
6752 89/<- %esp 5/r32/ebp
6753 5d/pop-to-ebp
6754 c3/return
6755
6756 test-copy-with-no-inout:
6757
6758 55/push-ebp
6759 89/<- %ebp 4/r32/esp
6760
6761 (clear-stream _test-input-stream)
6762 (clear-stream $_test-input-buffered-file->buffer)
6763 (clear-stream _test-output-stream)
6764 (clear-stream $_test-output-buffered-file->buffer)
6765 (clear-stream _test-error-stream)
6766 (clear-stream $_test-error-buffered-file->buffer)
6767
6768 68/push 0/imm32
6769 68/push 0/imm32
6770 89/<- %edx 4/r32/esp
6771 (tailor-exit-descriptor %edx 0x10)
6772
6773 (write _test-input-stream "fn foo {\n")
6774 (write _test-input-stream " var x/eax: boolean <- copy\n")
6775 (write _test-input-stream "}\n")
6776
6777 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6778
6779
6780 89/<- %edx 4/r32/esp
6781 (flush _test-output-buffered-file)
6782 (flush _test-error-buffered-file)
6783 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6789
6790 (check-stream-equal _test-output-stream "" "F - test-copy-with-no-inout: output should be empty")
6791 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' expects an inout" "F - test-copy-with-no-inout: error message")
6792
6793 (check-ints-equal *(edx+4) 2 "F - test-copy-with-no-inout: exit status")
6794
6795 81 0/subop/add %esp 8/imm32
6796
6797 5d/pop-to-ebp
6798 c3/return
6799
6800 test-copy-with-multiple-inouts:
6801
6802 55/push-ebp
6803 89/<- %ebp 4/r32/esp
6804
6805 (clear-stream _test-input-stream)
6806 (clear-stream $_test-input-buffered-file->buffer)
6807 (clear-stream _test-output-stream)
6808 (clear-stream $_test-output-buffered-file->buffer)
6809 (clear-stream _test-error-stream)
6810 (clear-stream $_test-error-buffered-file->buffer)
6811
6812 68/push 0/imm32
6813 68/push 0/imm32
6814 89/<- %edx 4/r32/esp
6815 (tailor-exit-descriptor %edx 0x10)
6816
6817 (write _test-input-stream "fn foo {\n")
6818 (write _test-input-stream " var x/eax: boolean <- copy 0, 0\n")
6819 (write _test-input-stream "}\n")
6820
6821 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6822
6823
6824 89/<- %edx 4/r32/esp
6825 (flush _test-output-buffered-file)
6826 (flush _test-error-buffered-file)
6827 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6833
6834 (check-stream-equal _test-output-stream "" "F - test-copy-with-multiple-inouts: output should be empty")
6835 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' must have just one inout" "F - test-copy-with-multiple-inouts: error message")
6836
6837 (check-ints-equal *(edx+4) 2 "F - test-copy-with-multiple-inouts: exit status")
6838
6839 81 0/subop/add %esp 8/imm32
6840
6841 5d/pop-to-ebp
6842 c3/return
6843
6844 test-copy-with-no-output:
6845
6846 55/push-ebp
6847 89/<- %ebp 4/r32/esp
6848
6849 (clear-stream _test-input-stream)
6850 (clear-stream $_test-input-buffered-file->buffer)
6851 (clear-stream _test-output-stream)
6852 (clear-stream $_test-output-buffered-file->buffer)
6853 (clear-stream _test-error-stream)
6854 (clear-stream $_test-error-buffered-file->buffer)
6855
6856 68/push 0/imm32
6857 68/push 0/imm32
6858 89/<- %edx 4/r32/esp
6859 (tailor-exit-descriptor %edx 0x10)
6860
6861 (write _test-input-stream "fn foo {\n")
6862 (write _test-input-stream " copy 0\n")
6863 (write _test-input-stream "}\n")
6864
6865 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6866
6867
6868 89/<- %edx 4/r32/esp
6869 (flush _test-output-buffered-file)
6870 (flush _test-error-buffered-file)
6871 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6877
6878 (check-stream-equal _test-output-stream "" "F - test-copy-with-no-output: output should be empty")
6879 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' expects an output" "F - test-copy-with-no-output: error message")
6880
6881 (check-ints-equal *(edx+4) 2 "F - test-copy-with-no-output: exit status")
6882
6883 81 0/subop/add %esp 8/imm32
6884
6885 5d/pop-to-ebp
6886 c3/return
6887
6888 test-copy-with-multiple-outputs:
6889
6890 55/push-ebp
6891 89/<- %ebp 4/r32/esp
6892
6893 (clear-stream _test-input-stream)
6894 (clear-stream $_test-input-buffered-file->buffer)
6895 (clear-stream _test-output-stream)
6896 (clear-stream $_test-output-buffered-file->buffer)
6897 (clear-stream _test-error-stream)
6898 (clear-stream $_test-error-buffered-file->buffer)
6899
6900 68/push 0/imm32
6901 68/push 0/imm32
6902 89/<- %edx 4/r32/esp
6903 (tailor-exit-descriptor %edx 0x10)
6904
6905 (write _test-input-stream "fn foo {\n")
6906 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
6907 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
6908 (write _test-input-stream " x, y <- copy 0\n")
6909 (write _test-input-stream "}\n")
6910
6911 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6912
6913
6914 89/<- %edx 4/r32/esp
6915 (flush _test-output-buffered-file)
6916 (flush _test-error-buffered-file)
6917 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6923
6924 (check-stream-equal _test-output-stream "" "F - test-copy-with-multiple-outputs: output should be empty")
6925 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' must have just one output" "F - test-copy-with-multiple-outputs: error message")
6926
6927 (check-ints-equal *(edx+4) 2 "F - test-copy-with-multiple-outputs: exit status")
6928
6929 81 0/subop/add %esp 8/imm32
6930
6931 5d/pop-to-ebp
6932 c3/return
6933
6934 test-copy-invalid-value-to-address:
6935
6936 55/push-ebp
6937 89/<- %ebp 4/r32/esp
6938
6939 (clear-stream _test-input-stream)
6940 (clear-stream $_test-input-buffered-file->buffer)
6941 (clear-stream _test-output-stream)
6942 (clear-stream $_test-output-buffered-file->buffer)
6943 (clear-stream _test-error-stream)
6944 (clear-stream $_test-error-buffered-file->buffer)
6945
6946 68/push 0/imm32
6947 68/push 0/imm32
6948 89/<- %edx 4/r32/esp
6949 (tailor-exit-descriptor %edx 0x10)
6950
6951 (write _test-input-stream "fn foo {\n")
6952 (write _test-input-stream " var x/eax: int <- copy 0\n")
6953 (write _test-input-stream " var y/ecx: (addr int) <- copy x\n")
6954 (write _test-input-stream "}\n")
6955
6956 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6957
6958
6959 89/<- %edx 4/r32/esp
6960 (flush _test-output-buffered-file)
6961 (flush _test-error-buffered-file)
6962 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6968
6969 (check-stream-equal _test-output-stream "" "F - test-copy-invalid-value-to-address: output should be empty")
6970 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: 'y' must be a non-addr non-offset scalar" "F - test-copy-invalid-value-to-address: error message")
6971
6972 (check-ints-equal *(edx+4) 2 "F - test-copy-invalid-value-to-address: exit status")
6973
6974 81 0/subop/add %esp 8/imm32
6975
6976 5d/pop-to-ebp
6977 c3/return
6978
6979 test-copy-null-value-to-addr:
6980
6981 55/push-ebp
6982 89/<- %ebp 4/r32/esp
6983
6984 (clear-stream _test-input-stream)
6985 (clear-stream $_test-input-buffered-file->buffer)
6986 (clear-stream _test-output-stream)
6987 (clear-stream $_test-output-buffered-file->buffer)
6988
6989 (write _test-input-stream "fn foo {\n")
6990 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
6991 (write _test-input-stream "}\n")
6992
6993 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6994 (flush _test-output-buffered-file)
6995 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7001
7002
7003 89/<- %esp 5/r32/ebp
7004 5d/pop-to-ebp
7005 c3/return
7006
7007 test-copy-invalid-value-to-offset:
7008
7009 55/push-ebp
7010 89/<- %ebp 4/r32/esp
7011
7012 (clear-stream _test-input-stream)
7013 (clear-stream $_test-input-buffered-file->buffer)
7014 (clear-stream _test-output-stream)
7015 (clear-stream $_test-output-buffered-file->buffer)
7016 (clear-stream _test-error-stream)
7017 (clear-stream $_test-error-buffered-file->buffer)
7018
7019 68/push 0/imm32
7020 68/push 0/imm32
7021 89/<- %edx 4/r32/esp
7022 (tailor-exit-descriptor %edx 0x10)
7023
7024 (write _test-input-stream "fn foo {\n")
7025 (write _test-input-stream " var x/eax: int <- copy 0\n")
7026 (write _test-input-stream " var y/ecx: (offset int) <- copy x\n")
7027 (write _test-input-stream "}\n")
7028
7029 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7030
7031
7032 89/<- %edx 4/r32/esp
7033 (flush _test-output-buffered-file)
7034 (flush _test-error-buffered-file)
7035 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7041
7042 (check-stream-equal _test-output-stream "" "F - test-copy-invalid-value-to-address: output should be empty")
7043 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: 'y' must be a non-addr non-offset scalar" "F - test-copy-invalid-value-to-address: error message")
7044
7045 (check-ints-equal *(edx+4) 2 "F - test-copy-invalid-value-to-offset: exit status")
7046
7047 81 0/subop/add %esp 8/imm32
7048
7049 5d/pop-to-ebp
7050 c3/return
7051
7052 test-copy-null-value-to-offset:
7053
7054 55/push-ebp
7055 89/<- %ebp 4/r32/esp
7056
7057 (clear-stream _test-input-stream)
7058 (clear-stream $_test-input-buffered-file->buffer)
7059 (clear-stream _test-output-stream)
7060 (clear-stream $_test-output-buffered-file->buffer)
7061
7062 (write _test-input-stream "fn foo {\n")
7063 (write _test-input-stream " var y/ecx: (offset int) <- copy 0\n")
7064 (write _test-input-stream "}\n")
7065
7066 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7067 (flush _test-output-buffered-file)
7068 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7074
7075
7076 89/<- %esp 5/r32/ebp
7077 5d/pop-to-ebp
7078 c3/return
7079
7080 test-copy-deref-address:
7081
7082 55/push-ebp
7083 89/<- %ebp 4/r32/esp
7084
7085 (clear-stream _test-input-stream)
7086 (clear-stream $_test-input-buffered-file->buffer)
7087 (clear-stream _test-output-stream)
7088 (clear-stream $_test-output-buffered-file->buffer)
7089
7090 (write _test-input-stream "fn foo {\n")
7091 (write _test-input-stream " var x/eax: (addr addr int) <- copy 0\n")
7092 (write _test-input-stream " var y/ecx: (addr int) <- copy *x\n")
7093 (write _test-input-stream "}\n")
7094
7095 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7096 (flush _test-output-buffered-file)
7097 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7103
7104 (check-next-stream-line-equal _test-error-stream "" "F - test-copy-deref-address: error message")
7105
7106 5d/pop-to-ebp
7107 c3/return
7108
7109 test-copy-to-non-register:
7110
7111 55/push-ebp
7112 89/<- %ebp 4/r32/esp
7113
7114 (clear-stream _test-input-stream)
7115 (clear-stream $_test-input-buffered-file->buffer)
7116 (clear-stream _test-output-stream)
7117 (clear-stream $_test-output-buffered-file->buffer)
7118 (clear-stream _test-error-stream)
7119 (clear-stream $_test-error-buffered-file->buffer)
7120
7121 68/push 0/imm32
7122 68/push 0/imm32
7123 89/<- %edx 4/r32/esp
7124 (tailor-exit-descriptor %edx 0x10)
7125
7126 (write _test-input-stream "fn foo {\n")
7127 (write _test-input-stream " var x: int\n")
7128 (write _test-input-stream " x <- copy 0\n")
7129 (write _test-input-stream "}\n")
7130
7131 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7132
7133
7134 89/<- %edx 4/r32/esp
7135 (flush _test-output-buffered-file)
7136 (flush _test-error-buffered-file)
7137 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7143
7144 (check-stream-equal _test-output-stream "" "F - test-copy-to-non-register: output should be empty")
7145 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: output 'x' not in a register" "F - test-copy-to-non-register: error message")
7146
7147 (check-ints-equal *(edx+4) 2 "F - test-copy-to-non-register: exit status")
7148
7149 81 0/subop/add %esp 8/imm32
7150
7151 5d/pop-to-ebp
7152 c3/return
7153
7154 test-copy-non-scalar:
7155
7156 55/push-ebp
7157 89/<- %ebp 4/r32/esp
7158
7159 (clear-stream _test-input-stream)
7160 (clear-stream $_test-input-buffered-file->buffer)
7161 (clear-stream _test-output-stream)
7162 (clear-stream $_test-output-buffered-file->buffer)
7163 (clear-stream _test-error-stream)
7164 (clear-stream $_test-error-buffered-file->buffer)
7165
7166 68/push 0/imm32
7167 68/push 0/imm32
7168 89/<- %edx 4/r32/esp
7169 (tailor-exit-descriptor %edx 0x10)
7170
7171 (write _test-input-stream "fn foo {\n")
7172 (write _test-input-stream " var x: (handle int)\n")
7173 (write _test-input-stream " var y/eax: int <- copy x\n")
7174 (write _test-input-stream "}\n")
7175
7176 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7177
7178
7179 89/<- %edx 4/r32/esp
7180 (flush _test-output-buffered-file)
7181 (flush _test-error-buffered-file)
7182 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7188
7189 (check-stream-equal _test-output-stream "" "F - test-copy-non-scalar: output should be empty")
7190 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: 'x' is too large to fit in a register" "F - test-copy-non-scalar: error message")
7191
7192 (check-ints-equal *(edx+4) 2 "F - test-copy-non-scalar: exit status")
7193
7194 81 0/subop/add %esp 8/imm32
7195
7196 5d/pop-to-ebp
7197 c3/return
7198
7199 test-copy-to-with-no-inout:
7200
7201 55/push-ebp
7202 89/<- %ebp 4/r32/esp
7203
7204 (clear-stream _test-input-stream)
7205 (clear-stream $_test-input-buffered-file->buffer)
7206 (clear-stream _test-output-stream)
7207 (clear-stream $_test-output-buffered-file->buffer)
7208 (clear-stream _test-error-stream)
7209 (clear-stream $_test-error-buffered-file->buffer)
7210
7211 68/push 0/imm32
7212 68/push 0/imm32
7213 89/<- %edx 4/r32/esp
7214 (tailor-exit-descriptor %edx 0x10)
7215
7216 (write _test-input-stream "fn foo {\n")
7217 (write _test-input-stream " copy-to\n")
7218 (write _test-input-stream "}\n")
7219
7220 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7221
7222
7223 89/<- %edx 4/r32/esp
7224 (flush _test-output-buffered-file)
7225 (flush _test-error-buffered-file)
7226 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7232
7233 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-inout: output should be empty")
7234 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-to' must have two inouts" "F - test-copy-to-with-no-inout: error message")
7235
7236 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-inout: exit status")
7237
7238 81 0/subop/add %esp 8/imm32
7239
7240 5d/pop-to-ebp
7241 c3/return
7242
7243 test-copy-to-with-no-input:
7244
7245 55/push-ebp
7246 89/<- %ebp 4/r32/esp
7247
7248 (clear-stream _test-input-stream)
7249 (clear-stream $_test-input-buffered-file->buffer)
7250 (clear-stream _test-output-stream)
7251 (clear-stream $_test-output-buffered-file->buffer)
7252 (clear-stream _test-error-stream)
7253 (clear-stream $_test-error-buffered-file->buffer)
7254
7255 68/push 0/imm32
7256 68/push 0/imm32
7257 89/<- %edx 4/r32/esp
7258 (tailor-exit-descriptor %edx 0x10)
7259
7260 (write _test-input-stream "fn foo {\n")
7261 (write _test-input-stream " var x: boolean\n")
7262 (write _test-input-stream " copy-to x\n")
7263 (write _test-input-stream "}\n")
7264
7265 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7266
7267
7268 89/<- %edx 4/r32/esp
7269 (flush _test-output-buffered-file)
7270 (flush _test-error-buffered-file)
7271 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7277
7278 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-input: output should be empty")
7279 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-to' must have two inouts" "F - test-copy-to-with-no-input: error message")
7280
7281 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-input: exit status")
7282
7283 81 0/subop/add %esp 8/imm32
7284
7285 5d/pop-to-ebp
7286 c3/return
7287
7288 test-copy-to-with-no-register:
7289
7290 55/push-ebp
7291 89/<- %ebp 4/r32/esp
7292
7293 (clear-stream _test-input-stream)
7294 (clear-stream $_test-input-buffered-file->buffer)
7295 (clear-stream _test-output-stream)
7296 (clear-stream $_test-output-buffered-file->buffer)
7297 (clear-stream _test-error-stream)
7298 (clear-stream $_test-error-buffered-file->buffer)
7299
7300 68/push 0/imm32
7301 68/push 0/imm32
7302 89/<- %edx 4/r32/esp
7303 (tailor-exit-descriptor %edx 0x10)
7304
7305 (write _test-input-stream "fn foo {\n")
7306 (write _test-input-stream " var x: boolean\n")
7307 (write _test-input-stream " copy-to x, x\n")
7308 (write _test-input-stream "}\n")
7309
7310 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7311
7312
7313 89/<- %edx 4/r32/esp
7314 (flush _test-output-buffered-file)
7315 (flush _test-error-buffered-file)
7316 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7322
7323 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-register: output should be empty")
7324 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-to: source (second inout) is in memory" "F - test-copy-to-with-no-register: error message")
7325
7326 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-register: exit status")
7327
7328 81 0/subop/add %esp 8/imm32
7329
7330 5d/pop-to-ebp
7331 c3/return
7332
7333 test-copy-to-with-too-many-inouts:
7334
7335 55/push-ebp
7336 89/<- %ebp 4/r32/esp
7337
7338 (clear-stream _test-input-stream)
7339 (clear-stream $_test-input-buffered-file->buffer)
7340 (clear-stream _test-output-stream)
7341 (clear-stream $_test-output-buffered-file->buffer)
7342 (clear-stream _test-error-stream)
7343 (clear-stream $_test-error-buffered-file->buffer)
7344
7345 68/push 0/imm32
7346 68/push 0/imm32
7347 89/<- %edx 4/r32/esp
7348 (tailor-exit-descriptor %edx 0x10)
7349
7350 (write _test-input-stream "fn foo {\n")
7351 (write _test-input-stream " var x: boolean\n")
7352 (write _test-input-stream " copy-to x, 0, 0\n")
7353 (write _test-input-stream "}\n")
7354
7355 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7356
7357
7358 89/<- %edx 4/r32/esp
7359 (flush _test-output-buffered-file)
7360 (flush _test-error-buffered-file)
7361 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7367
7368 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-too-many-inouts: output should be empty")
7369 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-to' must have two inouts" "F - test-copy-to-with-too-many-inouts: error message")
7370
7371 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-too-many-inouts: exit status")
7372
7373 81 0/subop/add %esp 8/imm32
7374
7375 5d/pop-to-ebp
7376 c3/return
7377
7378 test-copy-to-with-output:
7379
7380 55/push-ebp
7381 89/<- %ebp 4/r32/esp
7382
7383 (clear-stream _test-input-stream)
7384 (clear-stream $_test-input-buffered-file->buffer)
7385 (clear-stream _test-output-stream)
7386 (clear-stream $_test-output-buffered-file->buffer)
7387 (clear-stream _test-error-stream)
7388 (clear-stream $_test-error-buffered-file->buffer)
7389
7390 68/push 0/imm32
7391 68/push 0/imm32
7392 89/<- %edx 4/r32/esp
7393 (tailor-exit-descriptor %edx 0x10)
7394
7395 (write _test-input-stream "fn foo {\n")
7396 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
7397 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
7398 (write _test-input-stream " x <- copy-to y, 0\n")
7399 (write _test-input-stream "}\n")
7400
7401 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7402
7403
7404 89/<- %edx 4/r32/esp
7405 (flush _test-output-buffered-file)
7406 (flush _test-error-buffered-file)
7407 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7413
7414 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-output: output should be empty")
7415 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-to' must not have any outputs" "F - test-copy-to-with-output: error message")
7416
7417 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-output: exit status")
7418
7419 81 0/subop/add %esp 8/imm32
7420
7421 5d/pop-to-ebp
7422 c3/return
7423
7424 test-copy-to-invalid-value-to-address:
7425
7426 55/push-ebp
7427 89/<- %ebp 4/r32/esp
7428
7429 (clear-stream _test-input-stream)
7430 (clear-stream $_test-input-buffered-file->buffer)
7431 (clear-stream _test-output-stream)
7432 (clear-stream $_test-output-buffered-file->buffer)
7433 (clear-stream _test-error-stream)
7434 (clear-stream $_test-error-buffered-file->buffer)
7435
7436 68/push 0/imm32
7437 68/push 0/imm32
7438 89/<- %edx 4/r32/esp
7439 (tailor-exit-descriptor %edx 0x10)
7440
7441 (write _test-input-stream "fn foo {\n")
7442 (write _test-input-stream " var x/eax: int <- copy 0\n")
7443 (write _test-input-stream " var y: (addr int)\n")
7444 (write _test-input-stream " copy-to y, x\n")
7445 (write _test-input-stream "}\n")
7446
7447 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7448
7449
7450 89/<- %edx 4/r32/esp
7451 (flush _test-output-buffered-file)
7452 (flush _test-error-buffered-file)
7453 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7459
7460 (check-stream-equal _test-output-stream "" "F - test-copy-to-invalid-value-to-address: output should be empty")
7461 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-to: 'y' must be a non-addr non-offset scalar" "F - test-copy-to-invalid-value-to-address: error message")
7462
7463 (check-ints-equal *(edx+4) 2 "F - test-copy-to-invalid-value-to-address: exit status")
7464
7465 81 0/subop/add %esp 8/imm32
7466
7467 5d/pop-to-ebp
7468 c3/return
7469
7470 test-copy-to-deref-address:
7471
7472 55/push-ebp
7473 89/<- %ebp 4/r32/esp
7474
7475 (clear-stream _test-input-stream)
7476 (clear-stream $_test-input-buffered-file->buffer)
7477 (clear-stream _test-output-stream)
7478 (clear-stream $_test-output-buffered-file->buffer)
7479
7480 (write _test-input-stream "fn foo {\n")
7481 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
7482 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
7483 (write _test-input-stream " copy-to *y, x\n")
7484 (write _test-input-stream "}\n")
7485
7486 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7487 (flush _test-output-buffered-file)
7488 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7494
7495 (check-next-stream-line-equal _test-error-stream "" "F - test-copy-to-deref-address: error message")
7496
7497 5d/pop-to-ebp
7498 c3/return
7499
7500 test-copy-to-non-scalar:
7501
7502 55/push-ebp
7503 89/<- %ebp 4/r32/esp
7504
7505 (clear-stream _test-input-stream)
7506 (clear-stream $_test-input-buffered-file->buffer)
7507 (clear-stream _test-output-stream)
7508 (clear-stream $_test-output-buffered-file->buffer)
7509 (clear-stream _test-error-stream)
7510 (clear-stream $_test-error-buffered-file->buffer)
7511
7512 68/push 0/imm32
7513 68/push 0/imm32
7514 89/<- %edx 4/r32/esp
7515 (tailor-exit-descriptor %edx 0x10)
7516
7517 (write _test-input-stream "fn foo {\n")
7518 (write _test-input-stream " var x: (handle int)\n")
7519 (write _test-input-stream " var y: int\n")
7520 (write _test-input-stream " copy-to y, x\n")
7521 (write _test-input-stream "}\n")
7522
7523 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7524
7525
7526 89/<- %edx 4/r32/esp
7527 (flush _test-output-buffered-file)
7528 (flush _test-error-buffered-file)
7529 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7535
7536 (check-stream-equal _test-output-stream "" "F - test-copy-to-non-scalar: output should be empty")
7537
7538 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-to: source (second inout) is in memory" "F - test-copy-to-non-scalar: error message")
7539
7540 (check-ints-equal *(edx+4) 2 "F - test-copy-to-non-scalar: exit status")
7541
7542 81 0/subop/add %esp 8/imm32
7543
7544 5d/pop-to-ebp
7545 c3/return
7546
7547 test-compare-with-no-inout:
7548
7549 55/push-ebp
7550 89/<- %ebp 4/r32/esp
7551
7552 (clear-stream _test-input-stream)
7553 (clear-stream $_test-input-buffered-file->buffer)
7554 (clear-stream _test-output-stream)
7555 (clear-stream $_test-output-buffered-file->buffer)
7556 (clear-stream _test-error-stream)
7557 (clear-stream $_test-error-buffered-file->buffer)
7558
7559 68/push 0/imm32
7560 68/push 0/imm32
7561 89/<- %edx 4/r32/esp
7562 (tailor-exit-descriptor %edx 0x10)
7563
7564 (write _test-input-stream "fn foo {\n")
7565 (write _test-input-stream " var x: boolean\n")
7566 (write _test-input-stream " compare\n")
7567 (write _test-input-stream "}\n")
7568
7569 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7570
7571
7572 89/<- %edx 4/r32/esp
7573 (flush _test-output-buffered-file)
7574 (flush _test-error-buffered-file)
7575 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7581
7582 (check-stream-equal _test-output-stream "" "F - test-compare-with-no-inout: output should be empty")
7583 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-no-inout: error message")
7584
7585 (check-ints-equal *(edx+4) 2 "F - test-compare-with-no-inout: exit status")
7586
7587 81 0/subop/add %esp 8/imm32
7588
7589 5d/pop-to-ebp
7590 c3/return
7591
7592 test-compare-with-no-input:
7593
7594 55/push-ebp
7595 89/<- %ebp 4/r32/esp
7596
7597 (clear-stream _test-input-stream)
7598 (clear-stream $_test-input-buffered-file->buffer)
7599 (clear-stream _test-output-stream)
7600 (clear-stream $_test-output-buffered-file->buffer)
7601 (clear-stream _test-error-stream)
7602 (clear-stream $_test-error-buffered-file->buffer)
7603
7604 68/push 0/imm32
7605 68/push 0/imm32
7606 89/<- %edx 4/r32/esp
7607 (tailor-exit-descriptor %edx 0x10)
7608
7609 (write _test-input-stream "fn foo {\n")
7610 (write _test-input-stream " var x: boolean\n")
7611 (write _test-input-stream " compare x\n")
7612 (write _test-input-stream "}\n")
7613
7614 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7615
7616
7617 89/<- %edx 4/r32/esp
7618 (flush _test-output-buffered-file)
7619 (flush _test-error-buffered-file)
7620 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7626
7627 (check-stream-equal _test-output-stream "" "F - test-compare-with-no-input: output should be empty")
7628 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-no-input: error message")
7629
7630 (check-ints-equal *(edx+4) 2 "F - test-compare-with-no-input: exit status")
7631
7632 81 0/subop/add %esp 8/imm32
7633
7634 5d/pop-to-ebp
7635 c3/return
7636
7637 test-compare-with-too-many-inouts:
7638
7639 55/push-ebp
7640 89/<- %ebp 4/r32/esp
7641
7642 (clear-stream _test-input-stream)
7643 (clear-stream $_test-input-buffered-file->buffer)
7644 (clear-stream _test-output-stream)
7645 (clear-stream $_test-output-buffered-file->buffer)
7646 (clear-stream _test-error-stream)
7647 (clear-stream $_test-error-buffered-file->buffer)
7648
7649 68/push 0/imm32
7650 68/push 0/imm32
7651 89/<- %edx 4/r32/esp
7652 (tailor-exit-descriptor %edx 0x10)
7653
7654 (write _test-input-stream "fn foo {\n")
7655 (write _test-input-stream " var x: boolean\n")
7656 (write _test-input-stream " compare x, 0, 0\n")
7657 (write _test-input-stream "}\n")
7658
7659 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7660
7661
7662 89/<- %edx 4/r32/esp
7663 (flush _test-output-buffered-file)
7664 (flush _test-error-buffered-file)
7665 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7671
7672 (check-stream-equal _test-output-stream "" "F - test-compare-with-too-many-inouts: output should be empty")
7673 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-too-many-inouts: error message")
7674
7675 (check-ints-equal *(edx+4) 2 "F - test-compare-with-too-many-inouts: exit status")
7676
7677 81 0/subop/add %esp 8/imm32
7678
7679 5d/pop-to-ebp
7680 c3/return
7681
7682 test-compare-with-output:
7683
7684 55/push-ebp
7685 89/<- %ebp 4/r32/esp
7686
7687 (clear-stream _test-input-stream)
7688 (clear-stream $_test-input-buffered-file->buffer)
7689 (clear-stream _test-output-stream)
7690 (clear-stream $_test-output-buffered-file->buffer)
7691 (clear-stream _test-error-stream)
7692 (clear-stream $_test-error-buffered-file->buffer)
7693
7694 68/push 0/imm32
7695 68/push 0/imm32
7696 89/<- %edx 4/r32/esp
7697 (tailor-exit-descriptor %edx 0x10)
7698
7699 (write _test-input-stream "fn foo {\n")
7700 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
7701 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
7702 (write _test-input-stream " x <- compare y, 0\n")
7703 (write _test-input-stream "}\n")
7704
7705 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7706
7707
7708 89/<- %edx 4/r32/esp
7709 (flush _test-output-buffered-file)
7710 (flush _test-error-buffered-file)
7711 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7717
7718 (check-stream-equal _test-output-stream "" "F - test-compare-with-output: output should be empty")
7719 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must not have any outputs" "F - test-compare-with-output: error message")
7720
7721 (check-ints-equal *(edx+4) 2 "F - test-compare-with-output: exit status")
7722
7723 81 0/subop/add %esp 8/imm32
7724
7725 5d/pop-to-ebp
7726 c3/return
7727
7728 test-compare-invalid-value-to-address:
7729
7730 55/push-ebp
7731 89/<- %ebp 4/r32/esp
7732
7733 (clear-stream _test-input-stream)
7734 (clear-stream $_test-input-buffered-file->buffer)
7735 (clear-stream _test-output-stream)
7736 (clear-stream $_test-output-buffered-file->buffer)
7737 (clear-stream _test-error-stream)
7738 (clear-stream $_test-error-buffered-file->buffer)
7739
7740 68/push 0/imm32
7741 68/push 0/imm32
7742 89/<- %edx 4/r32/esp
7743 (tailor-exit-descriptor %edx 0x10)
7744
7745 (write _test-input-stream "fn foo {\n")
7746 (write _test-input-stream " var x/eax: int <- copy 0\n")
7747 (write _test-input-stream " var y: (addr int)\n")
7748 (write _test-input-stream " compare y, x\n")
7749 (write _test-input-stream "}\n")
7750
7751 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7752
7753
7754 89/<- %edx 4/r32/esp
7755 (flush _test-output-buffered-file)
7756 (flush _test-error-buffered-file)
7757 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7763
7764 (check-stream-equal _test-output-stream "" "F - test-compare-invalid-value-to-address: output should be empty")
7765 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: 'y' must be a non-addr non-offset scalar" "F - test-compare-invalid-value-to-address: error message")
7766
7767 (check-ints-equal *(edx+4) 2 "F - test-compare-invalid-value-to-address: exit status")
7768
7769 81 0/subop/add %esp 8/imm32
7770
7771 5d/pop-to-ebp
7772 c3/return
7773
7774 test-compare-address:
7775
7776 55/push-ebp
7777 89/<- %ebp 4/r32/esp
7778
7779 (clear-stream _test-input-stream)
7780 (clear-stream $_test-input-buffered-file->buffer)
7781 (clear-stream _test-output-stream)
7782 (clear-stream $_test-output-buffered-file->buffer)
7783
7784 (write _test-input-stream "fn foo {\n")
7785 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
7786 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
7787 (write _test-input-stream " compare y, x\n")
7788 (write _test-input-stream "}\n")
7789
7790 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7791 (flush _test-output-buffered-file)
7792 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7798
7799 (check-next-stream-line-equal _test-error-stream "" "F - test-compare-address: error message")
7800
7801 5d/pop-to-ebp
7802 c3/return
7803
7804 test-compare-deref-address:
7805
7806 55/push-ebp
7807 89/<- %ebp 4/r32/esp
7808
7809 (clear-stream _test-input-stream)
7810 (clear-stream $_test-input-buffered-file->buffer)
7811 (clear-stream _test-output-stream)
7812 (clear-stream $_test-output-buffered-file->buffer)
7813
7814 (write _test-input-stream "fn foo {\n")
7815 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
7816 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
7817 (write _test-input-stream " compare *y, x\n")
7818 (write _test-input-stream "}\n")
7819
7820 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7821 (flush _test-output-buffered-file)
7822 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7828
7829 (check-next-stream-line-equal _test-error-stream "" "F - test-compare-deref-address: error message")
7830
7831 5d/pop-to-ebp
7832 c3/return
7833
7834 test-compare-two-vars-in-memory:
7835
7836 55/push-ebp
7837 89/<- %ebp 4/r32/esp
7838
7839 (clear-stream _test-input-stream)
7840 (clear-stream $_test-input-buffered-file->buffer)
7841 (clear-stream _test-output-stream)
7842 (clear-stream $_test-output-buffered-file->buffer)
7843 (clear-stream _test-error-stream)
7844 (clear-stream $_test-error-buffered-file->buffer)
7845
7846 68/push 0/imm32
7847 68/push 0/imm32
7848 89/<- %edx 4/r32/esp
7849 (tailor-exit-descriptor %edx 0x10)
7850
7851 (write _test-input-stream "fn foo {\n")
7852 (write _test-input-stream " var x: boolean\n")
7853 (write _test-input-stream " compare x, x\n")
7854 (write _test-input-stream "}\n")
7855
7856 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7857
7858
7859 89/<- %edx 4/r32/esp
7860 (flush _test-output-buffered-file)
7861 (flush _test-error-buffered-file)
7862 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7868
7869 (check-stream-equal _test-output-stream "" "F - test-compare-two-vars-in-memory: output should be empty")
7870 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: both inouts are in memory" "F - test-compare-two-vars-in-memory: error message")
7871
7872 (check-ints-equal *(edx+4) 2 "F - test-compare-two-vars-in-memory: exit status")
7873
7874 81 0/subop/add %esp 8/imm32
7875
7876 5d/pop-to-ebp
7877 c3/return
7878
7879 test-compare-non-scalar:
7880
7881 55/push-ebp
7882 89/<- %ebp 4/r32/esp
7883
7884 (clear-stream _test-input-stream)
7885 (clear-stream $_test-input-buffered-file->buffer)
7886 (clear-stream _test-output-stream)
7887 (clear-stream $_test-output-buffered-file->buffer)
7888 (clear-stream _test-error-stream)
7889 (clear-stream $_test-error-buffered-file->buffer)
7890
7891 68/push 0/imm32
7892 68/push 0/imm32
7893 89/<- %edx 4/r32/esp
7894 (tailor-exit-descriptor %edx 0x10)
7895
7896 (write _test-input-stream "fn foo {\n")
7897 (write _test-input-stream " var x: (handle int)\n")
7898 (write _test-input-stream " var y: int\n")
7899 (write _test-input-stream " compare y, x\n")
7900 (write _test-input-stream "}\n")
7901
7902 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7903
7904
7905 89/<- %edx 4/r32/esp
7906 (flush _test-output-buffered-file)
7907 (flush _test-error-buffered-file)
7908 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7914
7915 (check-stream-equal _test-output-stream "" "F - test-compare-non-scalar: output should be empty")
7916
7917 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: both inouts are in memory" "F - test-compare-non-scalar: error message")
7918
7919 (check-ints-equal *(edx+4) 2 "F - test-compare-non-scalar: exit status")
7920
7921 81 0/subop/add %esp 8/imm32
7922
7923 5d/pop-to-ebp
7924 c3/return
7925
7926 test-address-with-no-inout:
7927
7928 55/push-ebp
7929 89/<- %ebp 4/r32/esp
7930
7931 (clear-stream _test-input-stream)
7932 (clear-stream $_test-input-buffered-file->buffer)
7933 (clear-stream _test-output-stream)
7934 (clear-stream $_test-output-buffered-file->buffer)
7935 (clear-stream _test-error-stream)
7936 (clear-stream $_test-error-buffered-file->buffer)
7937
7938 68/push 0/imm32
7939 68/push 0/imm32
7940 89/<- %edx 4/r32/esp
7941 (tailor-exit-descriptor %edx 0x10)
7942
7943 (write _test-input-stream "fn foo {\n")
7944 (write _test-input-stream " var x/eax: boolean <- address\n")
7945 (write _test-input-stream "}\n")
7946
7947 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7948
7949
7950 89/<- %edx 4/r32/esp
7951 (flush _test-output-buffered-file)
7952 (flush _test-error-buffered-file)
7953 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7959
7960 (check-stream-equal _test-output-stream "" "F - test-address-with-no-inout: output should be empty")
7961 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' expects an inout" "F - test-address-with-no-inout: error message")
7962
7963 (check-ints-equal *(edx+4) 2 "F - test-address-with-no-inout: exit status")
7964
7965 81 0/subop/add %esp 8/imm32
7966
7967 5d/pop-to-ebp
7968 c3/return
7969
7970 test-address-with-multiple-inouts:
7971
7972 55/push-ebp
7973 89/<- %ebp 4/r32/esp
7974
7975 (clear-stream _test-input-stream)
7976 (clear-stream $_test-input-buffered-file->buffer)
7977 (clear-stream _test-output-stream)
7978 (clear-stream $_test-output-buffered-file->buffer)
7979 (clear-stream _test-error-stream)
7980 (clear-stream $_test-error-buffered-file->buffer)
7981
7982 68/push 0/imm32
7983 68/push 0/imm32
7984 89/<- %edx 4/r32/esp
7985 (tailor-exit-descriptor %edx 0x10)
7986
7987 (write _test-input-stream "fn foo {\n")
7988 (write _test-input-stream " var x/eax: boolean <- address 0, 0\n")
7989 (write _test-input-stream "}\n")
7990
7991 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7992
7993
7994 89/<- %edx 4/r32/esp
7995 (flush _test-output-buffered-file)
7996 (flush _test-error-buffered-file)
7997 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8003
8004 (check-stream-equal _test-output-stream "" "F - test-address-with-multiple-inouts: output should be empty")
8005 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' must have just one inout" "F - test-address-with-multiple-inouts: error message")
8006
8007 (check-ints-equal *(edx+4) 2 "F - test-address-with-multiple-inouts: exit status")
8008
8009 81 0/subop/add %esp 8/imm32
8010
8011 5d/pop-to-ebp
8012 c3/return
8013
8014 test-address-with-no-output:
8015
8016 55/push-ebp
8017 89/<- %ebp 4/r32/esp
8018
8019 (clear-stream _test-input-stream)
8020 (clear-stream $_test-input-buffered-file->buffer)
8021 (clear-stream _test-output-stream)
8022 (clear-stream $_test-output-buffered-file->buffer)
8023 (clear-stream _test-error-stream)
8024 (clear-stream $_test-error-buffered-file->buffer)
8025
8026 68/push 0/imm32
8027 68/push 0/imm32
8028 89/<- %edx 4/r32/esp
8029 (tailor-exit-descriptor %edx 0x10)
8030
8031 (write _test-input-stream "fn foo {\n")
8032 (write _test-input-stream " address 0\n")
8033 (write _test-input-stream "}\n")
8034
8035 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8036
8037
8038 89/<- %edx 4/r32/esp
8039 (flush _test-output-buffered-file)
8040 (flush _test-error-buffered-file)
8041 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8047
8048 (check-stream-equal _test-output-stream "" "F - test-address-with-no-output: output should be empty")
8049 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' expects an output" "F - test-address-with-no-output: error message")
8050
8051 (check-ints-equal *(edx+4) 2 "F - test-address-with-no-output: exit status")
8052
8053 81 0/subop/add %esp 8/imm32
8054
8055 5d/pop-to-ebp
8056 c3/return
8057
8058 test-address-with-multiple-outputs:
8059
8060 55/push-ebp
8061 89/<- %ebp 4/r32/esp
8062
8063 (clear-stream _test-input-stream)
8064 (clear-stream $_test-input-buffered-file->buffer)
8065 (clear-stream _test-output-stream)
8066 (clear-stream $_test-output-buffered-file->buffer)
8067 (clear-stream _test-error-stream)
8068 (clear-stream $_test-error-buffered-file->buffer)
8069
8070 68/push 0/imm32
8071 68/push 0/imm32
8072 89/<- %edx 4/r32/esp
8073 (tailor-exit-descriptor %edx 0x10)
8074
8075 (write _test-input-stream "fn foo {\n")
8076 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
8077 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
8078 (write _test-input-stream " x, y <- address 0\n")
8079 (write _test-input-stream "}\n")
8080
8081 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8082
8083
8084 89/<- %edx 4/r32/esp
8085 (flush _test-output-buffered-file)
8086 (flush _test-error-buffered-file)
8087 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8093
8094 (check-stream-equal _test-output-stream "" "F - test-address-with-multiple-outputs: output should be empty")
8095 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' must have just one output" "F - test-address-with-multiple-outputs: error message")
8096
8097 (check-ints-equal *(edx+4) 2 "F - test-address-with-multiple-outputs: exit status")
8098
8099 81 0/subop/add %esp 8/imm32
8100
8101 5d/pop-to-ebp
8102 c3/return
8103
8104
8105 test-address-of-deref:
8106
8107 55/push-ebp
8108 89/<- %ebp 4/r32/esp
8109
8110 (clear-stream _test-input-stream)
8111 (clear-stream $_test-input-buffered-file->buffer)
8112 (clear-stream _test-output-stream)
8113 (clear-stream $_test-output-buffered-file->buffer)
8114
8115 (write _test-input-stream "fn foo {\n")
8116 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
8117 (write _test-input-stream " var y/ecx: (addr int) <- address *x\n")
8118 (write _test-input-stream "}\n")
8119
8120 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8121 (flush _test-output-buffered-file)
8122 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8128
8129 (check-next-stream-line-equal _test-error-stream "" "F - test-address-of-deref: error message")
8130
8131 5d/pop-to-ebp
8132 c3/return
8133
8134 test-address-to-non-register:
8135
8136 55/push-ebp
8137 89/<- %ebp 4/r32/esp
8138
8139 (clear-stream _test-input-stream)
8140 (clear-stream $_test-input-buffered-file->buffer)
8141 (clear-stream _test-output-stream)
8142 (clear-stream $_test-output-buffered-file->buffer)
8143 (clear-stream _test-error-stream)
8144 (clear-stream $_test-error-buffered-file->buffer)
8145
8146 68/push 0/imm32
8147 68/push 0/imm32
8148 89/<- %edx 4/r32/esp
8149 (tailor-exit-descriptor %edx 0x10)
8150
8151 (write _test-input-stream "fn foo {\n")
8152 (write _test-input-stream " var x: (addr int)\n")
8153 (write _test-input-stream " x <- address 0\n")
8154 (write _test-input-stream "}\n")
8155
8156 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8157
8158
8159 89/<- %edx 4/r32/esp
8160 (flush _test-output-buffered-file)
8161 (flush _test-error-buffered-file)
8162 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8168
8169 (check-stream-equal _test-output-stream "" "F - test-address-to-non-register: output should be empty")
8170 (check-next-stream-line-equal _test-error-stream "fn foo: stmt address: output 'x' not in a register" "F - test-address-to-non-register: error message")
8171
8172 (check-ints-equal *(edx+4) 2 "F - test-address-to-non-register: exit status")
8173
8174 81 0/subop/add %esp 8/imm32
8175
8176 5d/pop-to-ebp
8177 c3/return
8178
8179 test-address-with-wrong-type:
8180
8181 55/push-ebp
8182 89/<- %ebp 4/r32/esp
8183
8184 (clear-stream _test-input-stream)
8185 (clear-stream $_test-input-buffered-file->buffer)
8186 (clear-stream _test-output-stream)
8187 (clear-stream $_test-output-buffered-file->buffer)
8188 (clear-stream _test-error-stream)
8189 (clear-stream $_test-error-buffered-file->buffer)
8190
8191 68/push 0/imm32
8192 68/push 0/imm32
8193 89/<- %edx 4/r32/esp
8194 (tailor-exit-descriptor %edx 0x10)
8195
8196 (write _test-input-stream "fn foo {\n")
8197 (write _test-input-stream " var x: int\n")
8198 (write _test-input-stream " var y/eax: (addr boolean) <- address x\n")
8199 (write _test-input-stream "}\n")
8200
8201 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8202
8203
8204 89/<- %edx 4/r32/esp
8205 (flush _test-output-buffered-file)
8206 (flush _test-error-buffered-file)
8207 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8213
8214 (check-stream-equal _test-output-stream "" "F - test-address-with-wrong-type: output should be empty")
8215 (check-next-stream-line-equal _test-error-stream "fn foo: stmt address: output 'y' cannot hold address of 'x'" "F - test-address-with-wrong-type: error message")
8216
8217 (check-ints-equal *(edx+4) 2 "F - test-address-with-wrong-type: exit status")
8218
8219 81 0/subop/add %esp 8/imm32
8220
8221 5d/pop-to-ebp
8222 c3/return
8223
8224 test-address-with-right-type-for-array:
8225
8226 55/push-ebp
8227 89/<- %ebp 4/r32/esp
8228
8229 (clear-stream _test-input-stream)
8230 (clear-stream $_test-input-buffered-file->buffer)
8231 (clear-stream _test-output-stream)
8232 (clear-stream $_test-output-buffered-file->buffer)
8233
8234 (write _test-input-stream "fn foo {\n")
8235 (write _test-input-stream " var x: (array int 3)\n")
8236 (write _test-input-stream " var y/eax: (addr array int) <- address x\n")
8237 (write _test-input-stream "}\n")
8238
8239 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8240 (flush _test-output-buffered-file)
8241 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8247
8248 (check-next-stream-line-equal _test-error-stream "" "F - test-address-with-right-type-for-array: error message")
8249
8250
8251 89/<- %esp 5/r32/ebp
8252 5d/pop-to-ebp
8253 c3/return
8254
8255 test-address-with-right-type-for-stream:
8256
8257 55/push-ebp
8258 89/<- %ebp 4/r32/esp
8259
8260 (clear-stream _test-input-stream)
8261 (clear-stream $_test-input-buffered-file->buffer)
8262 (clear-stream _test-output-stream)
8263 (clear-stream $_test-output-buffered-file->buffer)
8264
8265 (write _test-input-stream "fn foo {\n")
8266 (write _test-input-stream " var x: (stream int 3)\n")
8267 (write _test-input-stream " var y/eax: (addr stream int) <- address x\n")
8268 (write _test-input-stream "}\n")
8269
8270 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8271 (flush _test-output-buffered-file)
8272 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8278
8279 (check-next-stream-line-equal _test-error-stream "" "F - test-address-with-right-type-for-stream: error message")
8280
8281
8282 89/<- %esp 5/r32/ebp
8283 5d/pop-to-ebp
8284 c3/return
8285
8286 test-get-with-wrong-field:
8287
8288 55/push-ebp
8289 89/<- %ebp 4/r32/esp
8290
8291 (clear-stream _test-input-stream)
8292 (clear-stream $_test-input-buffered-file->buffer)
8293 (clear-stream _test-output-stream)
8294 (clear-stream $_test-output-buffered-file->buffer)
8295 (clear-stream _test-error-stream)
8296 (clear-stream $_test-error-buffered-file->buffer)
8297
8298 68/push 0/imm32
8299 68/push 0/imm32
8300 89/<- %edx 4/r32/esp
8301 (tailor-exit-descriptor %edx 0x10)
8302
8303 (write _test-input-stream "fn foo {\n")
8304 (write _test-input-stream " var a: t\n")
8305 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
8306 (write _test-input-stream "}\n")
8307 (write _test-input-stream "type t {\n")
8308 (write _test-input-stream " x: int\n")
8309 (write _test-input-stream "}\n")
8310
8311 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8312
8313
8314 89/<- %edx 4/r32/esp
8315 (flush _test-output-buffered-file)
8316 (flush _test-error-buffered-file)
8317 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8323
8324 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-field: output should be empty")
8325 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: type 't' has no member called 'y'" "F - test-get-with-wrong-field: error message")
8326
8327 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-field: exit status")
8328
8329 81 0/subop/add %esp 8/imm32
8330
8331 5d/pop-to-ebp
8332 c3/return
8333
8334 test-get-with-wrong-base-type:
8335
8336 55/push-ebp
8337 89/<- %ebp 4/r32/esp
8338
8339 (clear-stream _test-input-stream)
8340 (clear-stream $_test-input-buffered-file->buffer)
8341 (clear-stream _test-output-stream)
8342 (clear-stream $_test-output-buffered-file->buffer)
8343 (clear-stream _test-error-stream)
8344 (clear-stream $_test-error-buffered-file->buffer)
8345
8346 68/push 0/imm32
8347 68/push 0/imm32
8348 89/<- %edx 4/r32/esp
8349 (tailor-exit-descriptor %edx 0x10)
8350
8351 (write _test-input-stream "fn foo {\n")
8352 (write _test-input-stream " var a: int\n")
8353 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
8354 (write _test-input-stream "}\n")
8355
8356 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8357
8358
8359 89/<- %edx 4/r32/esp
8360 (flush _test-output-buffered-file)
8361 (flush _test-error-buffered-file)
8362 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8368
8369 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type: output should be empty")
8370 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: var 'a' must have a 'type' definition" "F - test-get-with-wrong-base-type: error message")
8371
8372 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type: exit status")
8373
8374 81 0/subop/add %esp 8/imm32
8375
8376 5d/pop-to-ebp
8377 c3/return
8378
8379 test-get-with-wrong-base-type-2:
8380
8381 55/push-ebp
8382 89/<- %ebp 4/r32/esp
8383
8384 (clear-stream _test-input-stream)
8385 (clear-stream $_test-input-buffered-file->buffer)
8386 (clear-stream _test-output-stream)
8387 (clear-stream $_test-output-buffered-file->buffer)
8388 (clear-stream _test-error-stream)
8389 (clear-stream $_test-error-buffered-file->buffer)
8390
8391 68/push 0/imm32
8392 68/push 0/imm32
8393 89/<- %edx 4/r32/esp
8394 (tailor-exit-descriptor %edx 0x10)
8395
8396 (write _test-input-stream "fn foo {\n")
8397 (write _test-input-stream " var a: (addr t)\n")
8398 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
8399 (write _test-input-stream "}\n")
8400 (write _test-input-stream "type t {\n")
8401 (write _test-input-stream " x: int\n")
8402 (write _test-input-stream "}\n")
8403
8404 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8405
8406
8407 89/<- %edx 4/r32/esp
8408 (flush _test-output-buffered-file)
8409 (flush _test-error-buffered-file)
8410 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8416
8417 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-2: output should be empty")
8418 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: var 'a' is an 'addr' type, and so must live in a register" "F - test-get-with-wrong-base-type-2: error message")
8419
8420 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-2: exit status")
8421
8422 81 0/subop/add %esp 8/imm32
8423
8424 5d/pop-to-ebp
8425 c3/return
8426
8427 test-get-with-wrong-base-type-3:
8428
8429 55/push-ebp
8430 89/<- %ebp 4/r32/esp
8431
8432 (clear-stream _test-input-stream)
8433 (clear-stream $_test-input-buffered-file->buffer)
8434 (clear-stream _test-output-stream)
8435 (clear-stream $_test-output-buffered-file->buffer)
8436 (clear-stream _test-error-stream)
8437 (clear-stream $_test-error-buffered-file->buffer)
8438
8439 68/push 0/imm32
8440 68/push 0/imm32
8441 89/<- %edx 4/r32/esp
8442 (tailor-exit-descriptor %edx 0x10)
8443
8444 (write _test-input-stream "fn foo {\n")
8445 (write _test-input-stream " var a: (handle int)\n")
8446 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
8447 (write _test-input-stream "}\n")
8448
8449 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8450
8451
8452 89/<- %edx 4/r32/esp
8453 (flush _test-output-buffered-file)
8454 (flush _test-error-buffered-file)
8455 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8461
8462 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-3: output should be empty")
8463 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: var 'a' must have a 'type' definition" "F - test-get-with-wrong-base-type-3: error message")
8464
8465 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-3: exit status")
8466
8467 81 0/subop/add %esp 8/imm32
8468
8469 5d/pop-to-ebp
8470 c3/return
8471
8472 test-get-with-wrong-offset-type:
8473
8474 55/push-ebp
8475 89/<- %ebp 4/r32/esp
8476
8477 (clear-stream _test-input-stream)
8478 (clear-stream $_test-input-buffered-file->buffer)
8479 (clear-stream _test-output-stream)
8480 (clear-stream $_test-output-buffered-file->buffer)
8481 (clear-stream _test-error-stream)
8482 (clear-stream $_test-error-buffered-file->buffer)
8483
8484 68/push 0/imm32
8485 68/push 0/imm32
8486 89/<- %edx 4/r32/esp
8487 (tailor-exit-descriptor %edx 0x10)
8488
8489 (write _test-input-stream "fn foo {\n")
8490 (write _test-input-stream " var a: t\n")
8491 (write _test-input-stream " var b: int\n")
8492 (write _test-input-stream " var c/ecx: (addr int) <- get a, b\n")
8493 (write _test-input-stream "}\n")
8494 (write _test-input-stream "type t {\n")
8495 (write _test-input-stream " x: int\n")
8496 (write _test-input-stream "}\n")
8497
8498 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8499
8500
8501 89/<- %edx 4/r32/esp
8502 (flush _test-output-buffered-file)
8503 (flush _test-error-buffered-file)
8504 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8510
8511 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-offset-type: output should be empty")
8512 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: type 't' has no member called 'b'" "F - test-get-with-wrong-offset-type: error message")
8513
8514 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-offset-type: exit status")
8515
8516 81 0/subop/add %esp 8/imm32
8517
8518 5d/pop-to-ebp
8519 c3/return
8520
8521 test-get-with-wrong-output-type:
8522
8523 55/push-ebp
8524 89/<- %ebp 4/r32/esp
8525
8526 (clear-stream _test-input-stream)
8527 (clear-stream $_test-input-buffered-file->buffer)
8528 (clear-stream _test-output-stream)
8529 (clear-stream $_test-output-buffered-file->buffer)
8530 (clear-stream _test-error-stream)
8531 (clear-stream $_test-error-buffered-file->buffer)
8532
8533 68/push 0/imm32
8534 68/push 0/imm32
8535 89/<- %edx 4/r32/esp
8536 (tailor-exit-descriptor %edx 0x10)
8537
8538 (write _test-input-stream "fn foo {\n")
8539 (write _test-input-stream " var a: t\n")
8540 (write _test-input-stream " var c: (addr int)\n")
8541 (write _test-input-stream " c <- get a, x\n")
8542 (write _test-input-stream "}\n")
8543 (write _test-input-stream "type t {\n")
8544 (write _test-input-stream " x: int\n")
8545 (write _test-input-stream "}\n")
8546
8547 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8548
8549
8550 89/<- %edx 4/r32/esp
8551 (flush _test-output-buffered-file)
8552 (flush _test-error-buffered-file)
8553 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8559
8560 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type: output should be empty")
8561 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: output 'c' is not in a register" "F - test-get-with-wrong-output-type: error message")
8562
8563 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type: exit status")
8564
8565 81 0/subop/add %esp 8/imm32
8566
8567 5d/pop-to-ebp
8568 c3/return
8569
8570 test-get-with-wrong-output-type-2:
8571
8572 55/push-ebp
8573 89/<- %ebp 4/r32/esp
8574
8575 (clear-stream _test-input-stream)
8576 (clear-stream $_test-input-buffered-file->buffer)
8577 (clear-stream _test-output-stream)
8578 (clear-stream $_test-output-buffered-file->buffer)
8579 (clear-stream _test-error-stream)
8580 (clear-stream $_test-error-buffered-file->buffer)
8581
8582 68/push 0/imm32
8583 68/push 0/imm32
8584 89/<- %edx 4/r32/esp
8585 (tailor-exit-descriptor %edx 0x10)
8586
8587 (write _test-input-stream "fn foo {\n")
8588 (write _test-input-stream " var a: t\n")
8589 (write _test-input-stream " var c/ecx: int <- get a, x\n")
8590 (write _test-input-stream "}\n")
8591 (write _test-input-stream "type t {\n")
8592 (write _test-input-stream " x: int\n")
8593 (write _test-input-stream "}\n")
8594
8595 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8596
8597
8598 89/<- %edx 4/r32/esp
8599 (flush _test-output-buffered-file)
8600 (flush _test-error-buffered-file)
8601 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8607
8608 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-2: output should be empty")
8609 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: output must be an addr" "F - test-get-with-wrong-output-type-2: error message")
8610
8611 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-2: exit status")
8612
8613 81 0/subop/add %esp 8/imm32
8614
8615 5d/pop-to-ebp
8616 c3/return
8617
8618 test-get-with-wrong-output-type-3:
8619
8620 55/push-ebp
8621 89/<- %ebp 4/r32/esp
8622
8623 (clear-stream _test-input-stream)
8624 (clear-stream $_test-input-buffered-file->buffer)
8625 (clear-stream _test-output-stream)
8626 (clear-stream $_test-output-buffered-file->buffer)
8627 (clear-stream _test-error-stream)
8628 (clear-stream $_test-error-buffered-file->buffer)
8629
8630 68/push 0/imm32
8631 68/push 0/imm32
8632 89/<- %edx 4/r32/esp
8633 (tailor-exit-descriptor %edx 0x10)
8634
8635 (write _test-input-stream "fn foo {\n")
8636 (write _test-input-stream " var a: t\n")
8637 (write _test-input-stream " var c/ecx: (array int) <- get a, x\n")
8638 (write _test-input-stream "}\n")
8639 (write _test-input-stream "type t {\n")
8640 (write _test-input-stream " x: int\n")
8641 (write _test-input-stream "}\n")
8642
8643 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8644
8645
8646 89/<- %edx 4/r32/esp
8647 (flush _test-output-buffered-file)
8648 (flush _test-error-buffered-file)
8649 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8655
8656 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-3: output should be empty")
8657 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: output must be an addr" "F - test-get-with-wrong-output-type-3: error message")
8658
8659 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-3: exit status")
8660
8661 81 0/subop/add %esp 8/imm32
8662
8663 5d/pop-to-ebp
8664 c3/return
8665
8666 test-get-with-wrong-output-type-4:
8667
8668 55/push-ebp
8669 89/<- %ebp 4/r32/esp
8670
8671 (clear-stream _test-input-stream)
8672 (clear-stream $_test-input-buffered-file->buffer)
8673 (clear-stream _test-output-stream)
8674 (clear-stream $_test-output-buffered-file->buffer)
8675 (clear-stream _test-error-stream)
8676 (clear-stream $_test-error-buffered-file->buffer)
8677
8678 68/push 0/imm32
8679 68/push 0/imm32
8680 89/<- %edx 4/r32/esp
8681 (tailor-exit-descriptor %edx 0x10)
8682
8683 (write _test-input-stream "fn foo {\n")
8684 (write _test-input-stream " var a: t\n")
8685 (write _test-input-stream " var c/ecx: (addr boolean) <- get a, x\n")
8686 (write _test-input-stream "}\n")
8687 (write _test-input-stream "type t {\n")
8688 (write _test-input-stream " x: int\n")
8689 (write _test-input-stream "}\n")
8690
8691 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8692
8693
8694 89/<- %edx 4/r32/esp
8695 (flush _test-output-buffered-file)
8696 (flush _test-error-buffered-file)
8697 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8703
8704 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-4: output should be empty")
8705 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: wrong output type for member 'x' of type 't'" "F - test-get-with-wrong-output-type-4: error message")
8706
8707 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-4: exit status")
8708
8709 81 0/subop/add %esp 8/imm32
8710
8711 5d/pop-to-ebp
8712 c3/return
8713
8714 test-get-with-wrong-output-type-5:
8715
8716 55/push-ebp
8717 89/<- %ebp 4/r32/esp
8718
8719 (clear-stream _test-input-stream)
8720 (clear-stream $_test-input-buffered-file->buffer)
8721 (clear-stream _test-output-stream)
8722 (clear-stream $_test-output-buffered-file->buffer)
8723
8724 (write _test-input-stream "fn foo {\n")
8725 (write _test-input-stream " var a: t\n")
8726 (write _test-input-stream " var c/ecx: (addr handle int) <- get a, x\n")
8727 (write _test-input-stream "}\n")
8728 (write _test-input-stream "type t {\n")
8729 (write _test-input-stream " x: (handle int)\n")
8730 (write _test-input-stream "}\n")
8731
8732 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8733 (flush _test-output-buffered-file)
8734
8735
8736 89/<- %esp 5/r32/ebp
8737 5d/pop-to-ebp
8738 c3/return
8739
8740 test-get-with-too-few-inouts:
8741
8742 55/push-ebp
8743 89/<- %ebp 4/r32/esp
8744
8745 (clear-stream _test-input-stream)
8746 (clear-stream $_test-input-buffered-file->buffer)
8747 (clear-stream _test-output-stream)
8748 (clear-stream $_test-output-buffered-file->buffer)
8749 (clear-stream _test-error-stream)
8750 (clear-stream $_test-error-buffered-file->buffer)
8751
8752 68/push 0/imm32
8753 68/push 0/imm32
8754 89/<- %edx 4/r32/esp
8755 (tailor-exit-descriptor %edx 0x10)
8756
8757 (write _test-input-stream "fn foo {\n")
8758 (write _test-input-stream " var a: t\n")
8759 (write _test-input-stream " var c/ecx: (addr int) <- get a\n")
8760 (write _test-input-stream "}\n")
8761 (write _test-input-stream "type t {\n")
8762 (write _test-input-stream " x: int\n")
8763 (write _test-input-stream "}\n")
8764
8765 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8766
8767
8768 89/<- %edx 4/r32/esp
8769 (flush _test-output-buffered-file)
8770 (flush _test-error-buffered-file)
8771 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8777
8778 (check-stream-equal _test-output-stream "" "F - test-get-with-too-few-inouts: output should be empty")
8779 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: too few inouts (2 required)" "F - test-get-with-too-few-inouts: error message")
8780
8781 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-few-inouts: exit status")
8782
8783 81 0/subop/add %esp 8/imm32
8784
8785 5d/pop-to-ebp
8786 c3/return
8787
8788 test-get-with-too-many-inouts:
8789
8790 55/push-ebp
8791 89/<- %ebp 4/r32/esp
8792
8793 (clear-stream _test-input-stream)
8794 (clear-stream $_test-input-buffered-file->buffer)
8795 (clear-stream _test-output-stream)
8796 (clear-stream $_test-output-buffered-file->buffer)
8797 (clear-stream _test-error-stream)
8798 (clear-stream $_test-error-buffered-file->buffer)
8799
8800 68/push 0/imm32
8801 68/push 0/imm32
8802 89/<- %edx 4/r32/esp
8803 (tailor-exit-descriptor %edx 0x10)
8804
8805 (write _test-input-stream "fn foo {\n")
8806 (write _test-input-stream " var a: t\n")
8807 (write _test-input-stream " var c/ecx: (addr int) <- get a, x, 0\n")
8808 (write _test-input-stream "}\n")
8809 (write _test-input-stream "type t {\n")
8810 (write _test-input-stream " x: int\n")
8811 (write _test-input-stream "}\n")
8812
8813 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8814
8815
8816 89/<- %edx 4/r32/esp
8817 (flush _test-output-buffered-file)
8818 (flush _test-error-buffered-file)
8819 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8825
8826 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-inouts: output should be empty")
8827 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: too many inouts (2 required)" "F - test-get-with-too-many-inouts: error message")
8828
8829 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-inouts: exit status")
8830
8831 81 0/subop/add %esp 8/imm32
8832
8833 5d/pop-to-ebp
8834 c3/return
8835
8836 test-get-with-no-output:
8837
8838 55/push-ebp
8839 89/<- %ebp 4/r32/esp
8840
8841 (clear-stream _test-input-stream)
8842 (clear-stream $_test-input-buffered-file->buffer)
8843 (clear-stream _test-output-stream)
8844 (clear-stream $_test-output-buffered-file->buffer)
8845 (clear-stream _test-error-stream)
8846 (clear-stream $_test-error-buffered-file->buffer)
8847
8848 68/push 0/imm32
8849 68/push 0/imm32
8850 89/<- %edx 4/r32/esp
8851 (tailor-exit-descriptor %edx 0x10)
8852
8853 (write _test-input-stream "fn foo {\n")
8854 (write _test-input-stream " var a: t\n")
8855 (write _test-input-stream " get a, x\n")
8856 (write _test-input-stream "}\n")
8857 (write _test-input-stream "type t {\n")
8858 (write _test-input-stream " x: int\n")
8859 (write _test-input-stream "}\n")
8860
8861 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8862
8863
8864 89/<- %edx 4/r32/esp
8865 (flush _test-output-buffered-file)
8866 (flush _test-error-buffered-file)
8867 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8873
8874 (check-stream-equal _test-output-stream "" "F - test-get-with-no-output: output should be empty")
8875 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: must have an output" "F - test-get-with-no-output: error message")
8876
8877 (check-ints-equal *(edx+4) 2 "F - test-get-with-no-output: exit status")
8878
8879 81 0/subop/add %esp 8/imm32
8880
8881 5d/pop-to-ebp
8882 c3/return
8883
8884 test-get-with-too-many-outputs:
8885
8886 55/push-ebp
8887 89/<- %ebp 4/r32/esp
8888
8889 (clear-stream _test-input-stream)
8890 (clear-stream $_test-input-buffered-file->buffer)
8891 (clear-stream _test-output-stream)
8892 (clear-stream $_test-output-buffered-file->buffer)
8893 (clear-stream _test-error-stream)
8894 (clear-stream $_test-error-buffered-file->buffer)
8895
8896 68/push 0/imm32
8897 68/push 0/imm32
8898 89/<- %edx 4/r32/esp
8899 (tailor-exit-descriptor %edx 0x10)
8900
8901 (write _test-input-stream "fn foo {\n")
8902 (write _test-input-stream " var a: t\n")
8903 (write _test-input-stream " var b: int\n")
8904 (write _test-input-stream " var c/eax: (addr int) <- copy 0\n")
8905 (write _test-input-stream " c, b <- get a, x\n")
8906 (write _test-input-stream "}\n")
8907 (write _test-input-stream "type t {\n")
8908 (write _test-input-stream " x: int\n")
8909 (write _test-input-stream "}\n")
8910
8911 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8912
8913
8914 89/<- %edx 4/r32/esp
8915 (flush _test-output-buffered-file)
8916 (flush _test-error-buffered-file)
8917 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8923
8924 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-outputs: output should be empty")
8925 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: too many outputs (1 required)" "F - test-get-with-too-many-outputs: error message")
8926
8927 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-outputs: exit status")
8928
8929 81 0/subop/add %esp 8/imm32
8930
8931 5d/pop-to-ebp
8932 c3/return
8933
8934 test-convert-array-of-user-defined-types:
8935
8936 55/push-ebp
8937 89/<- %ebp 4/r32/esp
8938
8939 (clear-stream _test-input-stream)
8940 (clear-stream $_test-input-buffered-file->buffer)
8941 (clear-stream _test-output-stream)
8942 (clear-stream $_test-output-buffered-file->buffer)
8943
8944 (write _test-input-stream "type t {\n")
8945 (write _test-input-stream " x: int\n")
8946 (write _test-input-stream " y: int\n")
8947 (write _test-input-stream "}\n")
8948 (write _test-input-stream "fn foo {\n")
8949 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
8950 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
8951 (write _test-input-stream " var x/eax: (addr t) <- index arr, idx\n")
8952 (write _test-input-stream "}\n")
8953
8954 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8955 (flush _test-output-buffered-file)
8956 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
8962
8963 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-array-of-user-defined-types/0")
8964 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-array-of-user-defined-types/1")
8965 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-array-of-user-defined-types/2")
8966 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-array-of-user-defined-types/3")
8967 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-array-of-user-defined-types/4")
8968 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-array-of-user-defined-types/5")
8969 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-array-of-user-defined-types/6")
8970 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-array-of-user-defined-types/7")
8971 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-array-of-user-defined-types/8")
8972 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-array-of-user-defined-types/9")
8973 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000003 + 4) 0x00000000/r32" "F - test-convert-array-of-user-defined-types/11")
8974 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-array-of-user-defined-types/13")
8975 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-array-of-user-defined-types/14")
8976 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-array-of-user-defined-types/15")
8977 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-array-of-user-defined-types/16")
8978 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-array-of-user-defined-types/17")
8979 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-array-of-user-defined-types/18")
8980 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-array-of-user-defined-types/19")
8981 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-array-of-user-defined-types/20")
8982
8983 89/<- %esp 5/r32/ebp
8984 5d/pop-to-ebp
8985 c3/return
8986
8987 test-convert-length-of-array-of-user-defined-types-to-eax:
8988
8989 55/push-ebp
8990 89/<- %ebp 4/r32/esp
8991
8992 (clear-stream _test-input-stream)
8993 (clear-stream $_test-input-buffered-file->buffer)
8994 (clear-stream _test-output-stream)
8995 (clear-stream $_test-output-buffered-file->buffer)
8996
8997 (write _test-input-stream "type t {\n")
8998 (write _test-input-stream " x: int\n")
8999 (write _test-input-stream " y: int\n")
9000 (write _test-input-stream " z: int\n")
9001 (write _test-input-stream "}\n")
9002 (write _test-input-stream "fn foo {\n")
9003 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9004 (write _test-input-stream " var x/eax: int <- length arr\n")
9005 (write _test-input-stream "}\n")
9006
9007 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9008 (flush _test-output-buffered-file)
9009 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9015
9016 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/0")
9017 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/1")
9018 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/2")
9019 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/3")
9020 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-eax/4")
9021 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/5")
9022
9023 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types-to-eax/6")
9024 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-eax/7")
9025
9026 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/8")
9027 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/9")
9028 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types-to-eax/10")
9029 (check-next-stream-line-equal _test-output-stream " 31/xor %edx 2/r32/edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/11")
9030 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x0000000c/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-eax/12")
9031 (check-next-stream-line-equal _test-output-stream " f7 7/subop/idiv-eax-edx-by %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/13")
9032 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/14")
9033 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/15")
9034
9035 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types-to-eax/16")
9036
9037 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-eax/17")
9038 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/18")
9039 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/19")
9040 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/20")
9041 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/21")
9042 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-eax/22")
9043
9044 89/<- %esp 5/r32/ebp
9045 5d/pop-to-ebp
9046 c3/return
9047
9048 test-convert-length-of-array-of-user-defined-types-to-ecx:
9049
9050 55/push-ebp
9051 89/<- %ebp 4/r32/esp
9052
9053 (clear-stream _test-input-stream)
9054 (clear-stream $_test-input-buffered-file->buffer)
9055 (clear-stream _test-output-stream)
9056 (clear-stream $_test-output-buffered-file->buffer)
9057
9058 (write _test-input-stream "type t {\n")
9059 (write _test-input-stream " x: int\n")
9060 (write _test-input-stream " y: int\n")
9061 (write _test-input-stream " z: int\n")
9062 (write _test-input-stream "}\n")
9063 (write _test-input-stream "fn foo {\n")
9064 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9065 (write _test-input-stream " var x/ecx: int <- length arr\n")
9066 (write _test-input-stream "}\n")
9067
9068 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9069 (flush _test-output-buffered-file)
9070 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9076
9077 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/0")
9078 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/1")
9079 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/2")
9080 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/3")
9081 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/4")
9082 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/5")
9083
9084 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/6")
9085 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/7")
9086
9087 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/8")
9088
9089 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/9")
9090 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/10")
9091 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/11")
9092 (check-next-stream-line-equal _test-output-stream " 31/xor %edx 2/r32/edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/12")
9093 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x0000000c/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/13")
9094 (check-next-stream-line-equal _test-output-stream " f7 7/subop/idiv-eax-edx-by %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/14")
9095 (check-next-stream-line-equal _test-output-stream " 89/<- %ecx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/15")
9096 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/16")
9097 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/17")
9098
9099 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/18")
9100
9101 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/19")
9102
9103 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/20")
9104 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/21")
9105 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/22")
9106 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/23")
9107 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/24")
9108 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/25")
9109
9110 89/<- %esp 5/r32/ebp
9111 5d/pop-to-ebp
9112 c3/return
9113
9114 test-convert-length-of-array-of-user-defined-types-to-edx:
9115
9116 55/push-ebp
9117 89/<- %ebp 4/r32/esp
9118
9119 (clear-stream _test-input-stream)
9120 (clear-stream $_test-input-buffered-file->buffer)
9121 (clear-stream _test-output-stream)
9122 (clear-stream $_test-output-buffered-file->buffer)
9123
9124 (write _test-input-stream "type t {\n")
9125 (write _test-input-stream " x: int\n")
9126 (write _test-input-stream " y: int\n")
9127 (write _test-input-stream " z: int\n")
9128 (write _test-input-stream "}\n")
9129 (write _test-input-stream "fn foo {\n")
9130 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9131 (write _test-input-stream " var x/edx: int <- length arr\n")
9132 (write _test-input-stream "}\n")
9133
9134 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9135 (flush _test-output-buffered-file)
9136 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9142
9143 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/0")
9144 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/1")
9145 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/2")
9146 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/3")
9147 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-edx/4")
9148 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/5")
9149
9150 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/6")
9151 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-edx/7")
9152
9153 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/8")
9154
9155 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/9")
9156 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/10")
9157 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types-to-edx/11")
9158 (check-next-stream-line-equal _test-output-stream " 31/xor %edx 2/r32/edx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/12")
9159 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x0000000c/imm32" "F - test-convert-length-of-array-of-user-defined-types-to-edx/13")
9160 (check-next-stream-line-equal _test-output-stream " f7 7/subop/idiv-eax-edx-by %ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/14")
9161 (check-next-stream-line-equal _test-output-stream " 89/<- %edx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/15")
9162 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/16")
9163 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/17")
9164
9165 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/18")
9166
9167 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/19")
9168
9169 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-edx/20")
9170 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/21")
9171 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/22")
9172 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/23")
9173 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/24")
9174 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-edx/25")
9175
9176 89/<- %esp 5/r32/ebp
9177 5d/pop-to-ebp
9178 c3/return
9179
9180 test-convert-length-of-array-of-user-defined-types:
9181
9182 55/push-ebp
9183 89/<- %ebp 4/r32/esp
9184
9185 (clear-stream _test-input-stream)
9186 (clear-stream $_test-input-buffered-file->buffer)
9187 (clear-stream _test-output-stream)
9188 (clear-stream $_test-output-buffered-file->buffer)
9189
9190 (write _test-input-stream "type t {\n")
9191 (write _test-input-stream " x: int\n")
9192 (write _test-input-stream " y: int\n")
9193 (write _test-input-stream " z: int\n")
9194 (write _test-input-stream "}\n")
9195 (write _test-input-stream "fn foo {\n")
9196 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9197 (write _test-input-stream " var x/ebx: int <- length arr\n")
9198 (write _test-input-stream "}\n")
9199
9200 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9201 (flush _test-output-buffered-file)
9202 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9208
9209 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types/0")
9210 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types/1")
9211 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types/2")
9212 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types/3")
9213 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types/4")
9214 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types/5")
9215 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types/6")
9216 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-length-of-array-of-user-defined-types/7")
9217 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-length-of-array-of-user-defined-types/8")
9218 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types/9")
9219 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types/10")
9220 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types/11")
9221 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types/12")
9222 (check-next-stream-line-equal _test-output-stream " 31/xor %edx 2/r32/edx" "F - test-convert-length-of-array-of-user-defined-types/13")
9223 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x0000000c/imm32" "F - test-convert-length-of-array-of-user-defined-types/14")
9224 (check-next-stream-line-equal _test-output-stream " f7 7/subop/idiv-eax-edx-by %ecx" "F - test-convert-length-of-array-of-user-defined-types/15")
9225 (check-next-stream-line-equal _test-output-stream " 89/<- %ebx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types/16")
9226 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types/17")
9227 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types/18")
9228 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types/19")
9229 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ebx" "F - test-convert-length-of-array-of-user-defined-types/20")
9230 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types/21")
9231 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types/22")
9232 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types/23")
9233 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types/24")
9234 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types/25")
9235 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types/26")
9236 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types/27")
9237
9238 89/<- %esp 5/r32/ebp
9239 5d/pop-to-ebp
9240 c3/return
9241
9242 test-index-with-non-array-atom-base-type:
9243
9244 55/push-ebp
9245 89/<- %ebp 4/r32/esp
9246
9247 (clear-stream _test-input-stream)
9248 (clear-stream $_test-input-buffered-file->buffer)
9249 (clear-stream _test-output-stream)
9250 (clear-stream $_test-output-buffered-file->buffer)
9251 (clear-stream _test-error-stream)
9252 (clear-stream $_test-error-buffered-file->buffer)
9253
9254 68/push 0/imm32
9255 68/push 0/imm32
9256 89/<- %edx 4/r32/esp
9257 (tailor-exit-descriptor %edx 0x10)
9258
9259 (write _test-input-stream "fn foo {\n")
9260 (write _test-input-stream " var a: int\n")
9261 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9262 (write _test-input-stream "}\n")
9263
9264 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9265
9266
9267 89/<- %edx 4/r32/esp
9268 (flush _test-output-buffered-file)
9269 (flush _test-error-buffered-file)
9270 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9276
9277 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-atom-base-type: output should be empty")
9278 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is not an array" "F - test-index-with-non-array-atom-base-type: error message")
9279
9280 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-atom-base-type: exit status")
9281
9282 81 0/subop/add %esp 8/imm32
9283
9284 5d/pop-to-ebp
9285 c3/return
9286
9287 test-index-with-non-array-compound-base-type:
9288
9289 55/push-ebp
9290 89/<- %ebp 4/r32/esp
9291
9292 (clear-stream _test-input-stream)
9293 (clear-stream $_test-input-buffered-file->buffer)
9294 (clear-stream _test-output-stream)
9295 (clear-stream $_test-output-buffered-file->buffer)
9296 (clear-stream _test-error-stream)
9297 (clear-stream $_test-error-buffered-file->buffer)
9298
9299 68/push 0/imm32
9300 68/push 0/imm32
9301 89/<- %edx 4/r32/esp
9302 (tailor-exit-descriptor %edx 0x10)
9303
9304 (write _test-input-stream "fn foo {\n")
9305 (write _test-input-stream " var a: (handle int)\n")
9306 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9307 (write _test-input-stream "}\n")
9308
9309 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9310
9311
9312 89/<- %edx 4/r32/esp
9313 (flush _test-output-buffered-file)
9314 (flush _test-error-buffered-file)
9315 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9321
9322 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type: output should be empty")
9323 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is not an array" "F - test-index-with-non-array-compound-base-type: error message")
9324
9325 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type: exit status")
9326
9327 81 0/subop/add %esp 8/imm32
9328
9329 5d/pop-to-ebp
9330 c3/return
9331
9332 test-index-with-non-array-compound-base-type-2:
9333
9334 55/push-ebp
9335 89/<- %ebp 4/r32/esp
9336
9337 (clear-stream _test-input-stream)
9338 (clear-stream $_test-input-buffered-file->buffer)
9339 (clear-stream _test-output-stream)
9340 (clear-stream $_test-output-buffered-file->buffer)
9341 (clear-stream _test-error-stream)
9342 (clear-stream $_test-error-buffered-file->buffer)
9343
9344 68/push 0/imm32
9345 68/push 0/imm32
9346 89/<- %edx 4/r32/esp
9347 (tailor-exit-descriptor %edx 0x10)
9348
9349 (write _test-input-stream "fn foo {\n")
9350 (write _test-input-stream " var a: (addr int)\n")
9351 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9352 (write _test-input-stream "}\n")
9353
9354 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9355
9356
9357 89/<- %edx 4/r32/esp
9358 (flush _test-output-buffered-file)
9359 (flush _test-error-buffered-file)
9360 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9366
9367 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type-2: output should be empty")
9368 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is not an array" "F - test-index-with-non-array-compound-base-type-2: error message")
9369
9370 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type-2: exit status")
9371
9372 81 0/subop/add %esp 8/imm32
9373
9374 5d/pop-to-ebp
9375 c3/return
9376
9377 test-index-with-array-atom-base-type:
9378
9379 55/push-ebp
9380 89/<- %ebp 4/r32/esp
9381
9382 (clear-stream _test-input-stream)
9383 (clear-stream $_test-input-buffered-file->buffer)
9384 (clear-stream _test-output-stream)
9385 (clear-stream $_test-output-buffered-file->buffer)
9386 (clear-stream _test-error-stream)
9387 (clear-stream $_test-error-buffered-file->buffer)
9388
9389 68/push 0/imm32
9390 68/push 0/imm32
9391 89/<- %edx 4/r32/esp
9392 (tailor-exit-descriptor %edx 0x10)
9393
9394 (write _test-input-stream "fn foo {\n")
9395 (write _test-input-stream " var a: array\n")
9396 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9397 (write _test-input-stream "}\n")
9398
9399 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9400
9401
9402 89/<- %edx 4/r32/esp
9403 (flush _test-output-buffered-file)
9404 (flush _test-error-buffered-file)
9405 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9411
9412 (check-stream-equal _test-output-stream "" "F - test-index-with-array-atom-base-type: output should be empty")
9413 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: array 'a' must specify the type of its elements" "F - test-index-with-array-atom-base-type: error message")
9414
9415 (check-ints-equal *(edx+4) 2 "F - test-index-with-array-atom-base-type: exit status")
9416
9417 81 0/subop/add %esp 8/imm32
9418
9419 5d/pop-to-ebp
9420 c3/return
9421
9422 test-index-with-addr-base-on-stack:
9423
9424 55/push-ebp
9425 89/<- %ebp 4/r32/esp
9426
9427 (clear-stream _test-input-stream)
9428 (clear-stream $_test-input-buffered-file->buffer)
9429 (clear-stream _test-output-stream)
9430 (clear-stream $_test-output-buffered-file->buffer)
9431 (clear-stream _test-error-stream)
9432 (clear-stream $_test-error-buffered-file->buffer)
9433
9434 68/push 0/imm32
9435 68/push 0/imm32
9436 89/<- %edx 4/r32/esp
9437 (tailor-exit-descriptor %edx 0x10)
9438
9439 (write _test-input-stream "fn foo {\n")
9440 (write _test-input-stream " var a: (addr array int)\n")
9441 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9442 (write _test-input-stream "}\n")
9443
9444 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9445
9446
9447 89/<- %edx 4/r32/esp
9448 (flush _test-output-buffered-file)
9449 (flush _test-error-buffered-file)
9450 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9456
9457 (check-stream-equal _test-output-stream "" "F - test-index-with-addr-base-on-stack: output should be empty")
9458 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is an addr to an array, and so must live in a register" "F - test-index-with-addr-base-on-stack: error message")
9459
9460 (check-ints-equal *(edx+4) 2 "F - test-index-with-addr-base-on-stack: exit status")
9461
9462 81 0/subop/add %esp 8/imm32
9463
9464 5d/pop-to-ebp
9465 c3/return
9466
9467 test-index-with-wrong-index-type:
9468
9469 55/push-ebp
9470 89/<- %ebp 4/r32/esp
9471
9472 (clear-stream _test-input-stream)
9473 (clear-stream $_test-input-buffered-file->buffer)
9474 (clear-stream _test-output-stream)
9475 (clear-stream $_test-output-buffered-file->buffer)
9476 (clear-stream _test-error-stream)
9477 (clear-stream $_test-error-buffered-file->buffer)
9478
9479 68/push 0/imm32
9480 68/push 0/imm32
9481 89/<- %edx 4/r32/esp
9482 (tailor-exit-descriptor %edx 0x10)
9483
9484 (write _test-input-stream "fn foo {\n")
9485 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
9486 (write _test-input-stream " var b: boolean\n")
9487 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
9488 (write _test-input-stream "}\n")
9489
9490 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9491
9492
9493 89/<- %edx 4/r32/esp
9494 (flush _test-output-buffered-file)
9495 (flush _test-error-buffered-file)
9496 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9502
9503 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-index-type: output should be empty")
9504 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: second argument 'b' must be an int or offset" "F - test-index-with-wrong-index-type: error message")
9505
9506 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-index-type: exit status")
9507
9508 81 0/subop/add %esp 8/imm32
9509
9510 5d/pop-to-ebp
9511 c3/return
9512
9513 test-index-with-offset-atom-index-type:
9514
9515 55/push-ebp
9516 89/<- %ebp 4/r32/esp
9517
9518 (clear-stream _test-input-stream)
9519 (clear-stream $_test-input-buffered-file->buffer)
9520 (clear-stream _test-output-stream)
9521 (clear-stream $_test-output-buffered-file->buffer)
9522 (clear-stream _test-error-stream)
9523 (clear-stream $_test-error-buffered-file->buffer)
9524
9525 68/push 0/imm32
9526 68/push 0/imm32
9527 89/<- %edx 4/r32/esp
9528 (tailor-exit-descriptor %edx 0x10)
9529
9530 (write _test-input-stream "fn foo {\n")
9531 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
9532 (write _test-input-stream " var b: offset\n")
9533 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
9534 (write _test-input-stream "}\n")
9535
9536 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9537
9538
9539 89/<- %edx 4/r32/esp
9540 (flush _test-output-buffered-file)
9541 (flush _test-error-buffered-file)
9542 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9548
9549 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-atom-index-type: output should be empty")
9550 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: offset 'b' must specify the type of array elements" "F - test-index-with-offset-atom-index-type: error message")
9551
9552 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-atom-index-type: exit status")
9553
9554 81 0/subop/add %esp 8/imm32
9555
9556 5d/pop-to-ebp
9557 c3/return
9558
9559 test-index-with-offset-on-stack:
9560
9561 55/push-ebp
9562 89/<- %ebp 4/r32/esp
9563
9564 (clear-stream _test-input-stream)
9565 (clear-stream $_test-input-buffered-file->buffer)
9566 (clear-stream _test-output-stream)
9567 (clear-stream $_test-output-buffered-file->buffer)
9568 (clear-stream _test-error-stream)
9569 (clear-stream $_test-error-buffered-file->buffer)
9570
9571 68/push 0/imm32
9572 68/push 0/imm32
9573 89/<- %edx 4/r32/esp
9574 (tailor-exit-descriptor %edx 0x10)
9575
9576 (write _test-input-stream "fn foo {\n")
9577 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
9578 (write _test-input-stream " var b: int\n")
9579 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
9580 (write _test-input-stream "}\n")
9581
9582 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9583
9584
9585 89/<- %edx 4/r32/esp
9586 (flush _test-output-buffered-file)
9587 (flush _test-error-buffered-file)
9588 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9594
9595 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-on-stack: output should be empty")
9596 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: second argument 'b' must be in a register" "F - test-index-with-offset-on-stack: error message")
9597
9598 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-on-stack: exit status")
9599
9600 81 0/subop/add %esp 8/imm32
9601
9602 5d/pop-to-ebp
9603 c3/return
9604
9605 test-index-needs-offset-type:
9606
9607 55/push-ebp
9608 89/<- %ebp 4/r32/esp
9609
9610 (clear-stream _test-input-stream)
9611 (clear-stream $_test-input-buffered-file->buffer)
9612 (clear-stream _test-output-stream)
9613 (clear-stream $_test-output-buffered-file->buffer)
9614 (clear-stream _test-error-stream)
9615 (clear-stream $_test-error-buffered-file->buffer)
9616
9617 68/push 0/imm32
9618 68/push 0/imm32
9619 89/<- %edx 4/r32/esp
9620 (tailor-exit-descriptor %edx 0x10)
9621
9622 (write _test-input-stream "fn foo {\n")
9623 (write _test-input-stream " var a/eax: (addr array t) <- copy 0\n")
9624 (write _test-input-stream " var b/ebx: int <- copy 0\n")
9625 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
9626 (write _test-input-stream "}\n")
9627 (write _test-input-stream "type t {\n")
9628 (write _test-input-stream " x: int\n")
9629 (write _test-input-stream " y: int\n")
9630 (write _test-input-stream " z: int\n")
9631 (write _test-input-stream "}\n")
9632
9633 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9634
9635
9636 89/<- %edx 4/r32/esp
9637 (flush _test-output-buffered-file)
9638 (flush _test-error-buffered-file)
9639 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9645
9646 (check-stream-equal _test-output-stream "" "F - test-index-needs-offset-type: output should be empty")
9647 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: cannot take an int for array 'a'; create an offset instead. See mu.md for details." "F - test-index-needs-offset-type: error message")
9648
9649 (check-ints-equal *(edx+4) 2 "F - test-index-needs-offset-type: exit status")
9650
9651 81 0/subop/add %esp 8/imm32
9652
9653 5d/pop-to-ebp
9654 c3/return
9655
9656 test-index-with-output-not-address:
9657
9658 55/push-ebp
9659 89/<- %ebp 4/r32/esp
9660
9661 (clear-stream _test-input-stream)
9662 (clear-stream $_test-input-buffered-file->buffer)
9663 (clear-stream _test-output-stream)
9664 (clear-stream $_test-output-buffered-file->buffer)
9665 (clear-stream _test-error-stream)
9666 (clear-stream $_test-error-buffered-file->buffer)
9667
9668 68/push 0/imm32
9669 68/push 0/imm32
9670 89/<- %edx 4/r32/esp
9671 (tailor-exit-descriptor %edx 0x10)
9672
9673 (write _test-input-stream "fn foo {\n")
9674 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
9675 (write _test-input-stream " var o/edi: int <- index a, 0\n")
9676 (write _test-input-stream "}\n")
9677
9678 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9679
9680
9681 89/<- %edx 4/r32/esp
9682 (flush _test-output-buffered-file)
9683 (flush _test-error-buffered-file)
9684 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9690
9691 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address: output should be empty")
9692 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: output 'o' must be an addr" "F - test-index-with-output-not-address: error message")
9693
9694 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address: exit status")
9695
9696 81 0/subop/add %esp 8/imm32
9697
9698 5d/pop-to-ebp
9699 c3/return
9700
9701 test-index-with-output-not-address-2:
9702
9703 55/push-ebp
9704 89/<- %ebp 4/r32/esp
9705
9706 (clear-stream _test-input-stream)
9707 (clear-stream $_test-input-buffered-file->buffer)
9708 (clear-stream _test-output-stream)
9709 (clear-stream $_test-output-buffered-file->buffer)
9710 (clear-stream _test-error-stream)
9711 (clear-stream $_test-error-buffered-file->buffer)
9712
9713 68/push 0/imm32
9714 68/push 0/imm32
9715 89/<- %edx 4/r32/esp
9716 (tailor-exit-descriptor %edx 0x10)
9717
9718 (write _test-input-stream "fn foo {\n")
9719 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
9720 (write _test-input-stream " var o/edi: (int) <- index a, 0\n")
9721 (write _test-input-stream "}\n")
9722
9723 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9724
9725
9726 89/<- %edx 4/r32/esp
9727 (flush _test-output-buffered-file)
9728 (flush _test-error-buffered-file)
9729 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9735
9736 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address-2: output should be empty")
9737 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: output 'o' must be an addr" "F - test-index-with-output-not-address-2: error message")
9738
9739 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address-2: exit status")
9740
9741 81 0/subop/add %esp 8/imm32
9742
9743 5d/pop-to-ebp
9744 c3/return
9745
9746 test-index-with-wrong-output-type:
9747
9748 55/push-ebp
9749 89/<- %ebp 4/r32/esp
9750
9751 (clear-stream _test-input-stream)
9752 (clear-stream $_test-input-buffered-file->buffer)
9753 (clear-stream _test-output-stream)
9754 (clear-stream $_test-output-buffered-file->buffer)
9755 (clear-stream _test-error-stream)
9756 (clear-stream $_test-error-buffered-file->buffer)
9757
9758 68/push 0/imm32
9759 68/push 0/imm32
9760 89/<- %edx 4/r32/esp
9761 (tailor-exit-descriptor %edx 0x10)
9762
9763 (write _test-input-stream "fn foo {\n")
9764 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
9765 (write _test-input-stream " var o/edi: (addr int) <- index a, 0\n")
9766 (write _test-input-stream "}\n")
9767
9768 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9769
9770
9771 89/<- %edx 4/r32/esp
9772 (flush _test-output-buffered-file)
9773 (flush _test-error-buffered-file)
9774 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9780
9781 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-type: output should be empty")
9782 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: output 'o' does not have the right type" "F - test-index-with-wrong-output-type: error message")
9783
9784 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-type: exit status")
9785
9786 81 0/subop/add %esp 8/imm32
9787
9788 5d/pop-to-ebp
9789 c3/return
9790
9791 test-index-with-wrong-output-compound-type:
9792
9793 55/push-ebp
9794 89/<- %ebp 4/r32/esp
9795
9796 (clear-stream _test-input-stream)
9797 (clear-stream $_test-input-buffered-file->buffer)
9798 (clear-stream _test-output-stream)
9799 (clear-stream $_test-output-buffered-file->buffer)
9800 (clear-stream _test-error-stream)
9801 (clear-stream $_test-error-buffered-file->buffer)
9802
9803 68/push 0/imm32
9804 68/push 0/imm32
9805 89/<- %edx 4/r32/esp
9806 (tailor-exit-descriptor %edx 0x10)
9807
9808 (write _test-input-stream "fn foo {\n")
9809 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
9810 (write _test-input-stream " var o/edi: (addr handle int) <- index a, 0\n")
9811 (write _test-input-stream "}\n")
9812
9813 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9814
9815
9816 89/<- %edx 4/r32/esp
9817 (flush _test-output-buffered-file)
9818 (flush _test-error-buffered-file)
9819 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9825
9826 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-compound-type: output should be empty")
9827 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: output 'o' does not have the right type" "F - test-index-with-wrong-output-compound-type: error message")
9828
9829 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-compound-type: exit status")
9830
9831 81 0/subop/add %esp 8/imm32
9832
9833 5d/pop-to-ebp
9834 c3/return
9835
9836 test-index-with-no-inouts:
9837
9838 55/push-ebp
9839 89/<- %ebp 4/r32/esp
9840
9841 (clear-stream _test-input-stream)
9842 (clear-stream $_test-input-buffered-file->buffer)
9843 (clear-stream _test-output-stream)
9844 (clear-stream $_test-output-buffered-file->buffer)
9845 (clear-stream _test-error-stream)
9846 (clear-stream $_test-error-buffered-file->buffer)
9847
9848 68/push 0/imm32
9849 68/push 0/imm32
9850 89/<- %edx 4/r32/esp
9851 (tailor-exit-descriptor %edx 0x10)
9852
9853 (write _test-input-stream "fn foo {\n")
9854 (write _test-input-stream " var c/ecx: (addr int) <- index\n")
9855 (write _test-input-stream "}\n")
9856
9857 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9858
9859
9860 89/<- %edx 4/r32/esp
9861 (flush _test-output-buffered-file)
9862 (flush _test-error-buffered-file)
9863 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9869
9870 (check-stream-equal _test-output-stream "" "F - test-index-with-no-inouts: output should be empty")
9871 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: too few inouts (2 required)" "F - test-index-with-no-inouts: error message")
9872
9873 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-inouts: exit status")
9874
9875 81 0/subop/add %esp 8/imm32
9876
9877 5d/pop-to-ebp
9878 c3/return
9879
9880 test-index-with-too-few-inouts:
9881
9882 55/push-ebp
9883 89/<- %ebp 4/r32/esp
9884
9885 (clear-stream _test-input-stream)
9886 (clear-stream $_test-input-buffered-file->buffer)
9887 (clear-stream _test-output-stream)
9888 (clear-stream $_test-output-buffered-file->buffer)
9889 (clear-stream _test-error-stream)
9890 (clear-stream $_test-error-buffered-file->buffer)
9891
9892 68/push 0/imm32
9893 68/push 0/imm32
9894 89/<- %edx 4/r32/esp
9895 (tailor-exit-descriptor %edx 0x10)
9896
9897 (write _test-input-stream "fn foo {\n")
9898 (write _test-input-stream " var a: (array int 3)\n")
9899 (write _test-input-stream " var c/ecx: (addr int) <- index a\n")
9900 (write _test-input-stream "}\n")
9901
9902 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9903
9904
9905 89/<- %edx 4/r32/esp
9906 (flush _test-output-buffered-file)
9907 (flush _test-error-buffered-file)
9908 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9914
9915 (check-stream-equal _test-output-stream "" "F - test-index-with-too-few-inouts: output should be empty")
9916 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: too few inouts (2 required)" "F - test-index-with-too-few-inouts: error message")
9917
9918 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-few-inouts: exit status")
9919
9920 81 0/subop/add %esp 8/imm32
9921
9922 5d/pop-to-ebp
9923 c3/return
9924
9925 test-index-with-too-many-inouts:
9926
9927 55/push-ebp
9928 89/<- %ebp 4/r32/esp
9929
9930 (clear-stream _test-input-stream)
9931 (clear-stream $_test-input-buffered-file->buffer)
9932 (clear-stream _test-output-stream)
9933 (clear-stream $_test-output-buffered-file->buffer)
9934 (clear-stream _test-error-stream)
9935 (clear-stream $_test-error-buffered-file->buffer)
9936
9937 68/push 0/imm32
9938 68/push 0/imm32
9939 89/<- %edx 4/r32/esp
9940 (tailor-exit-descriptor %edx 0x10)
9941
9942 (write _test-input-stream "fn foo {\n")
9943 (write _test-input-stream " var a: (array int 3)\n")
9944 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0, 0\n")
9945 (write _test-input-stream "}\n")
9946
9947 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9948
9949
9950 89/<- %edx 4/r32/esp
9951 (flush _test-output-buffered-file)
9952 (flush _test-error-buffered-file)
9953 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9959
9960 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-inouts: output should be empty")
9961 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: too many inouts (2 required)" "F - test-index-with-too-many-inouts: error message")
9962
9963 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-inouts: exit status")
9964
9965 81 0/subop/add %esp 8/imm32
9966
9967 5d/pop-to-ebp
9968 c3/return
9969
9970 test-index-with-no-output:
9971
9972 55/push-ebp
9973 89/<- %ebp 4/r32/esp
9974
9975 (clear-stream _test-input-stream)
9976 (clear-stream $_test-input-buffered-file->buffer)
9977 (clear-stream _test-output-stream)
9978 (clear-stream $_test-output-buffered-file->buffer)
9979 (clear-stream _test-error-stream)
9980 (clear-stream $_test-error-buffered-file->buffer)
9981
9982 68/push 0/imm32
9983 68/push 0/imm32
9984 89/<- %edx 4/r32/esp
9985 (tailor-exit-descriptor %edx 0x10)
9986
9987 (write _test-input-stream "fn foo {\n")
9988 (write _test-input-stream " var a: (array int 3)\n")
9989 (write _test-input-stream " index a, 0\n")
9990 (write _test-input-stream "}\n")
9991
9992 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9993
9994
9995 89/<- %edx 4/r32/esp
9996 (flush _test-output-buffered-file)
9997 (flush _test-error-buffered-file)
9998 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10004
10005 (check-stream-equal _test-output-stream "" "F - test-index-with-no-output: output should be empty")
10006 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: must have an output" "F - test-index-with-no-output: error message")
10007
10008 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-output: exit status")
10009
10010 81 0/subop/add %esp 8/imm32
10011
10012 5d/pop-to-ebp
10013 c3/return
10014
10015 test-index-with-too-many-outputs:
10016
10017 55/push-ebp
10018 89/<- %ebp 4/r32/esp
10019
10020 (clear-stream _test-input-stream)
10021 (clear-stream $_test-input-buffered-file->buffer)
10022 (clear-stream _test-output-stream)
10023 (clear-stream $_test-output-buffered-file->buffer)
10024 (clear-stream _test-error-stream)
10025 (clear-stream $_test-error-buffered-file->buffer)
10026
10027 68/push 0/imm32
10028 68/push 0/imm32
10029 89/<- %edx 4/r32/esp
10030 (tailor-exit-descriptor %edx 0x10)
10031
10032 (write _test-input-stream "fn foo {\n")
10033 (write _test-input-stream " var a: (array int 3)\n")
10034 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
10035 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
10036 (write _test-input-stream " b, c <- index a, 0\n")
10037 (write _test-input-stream "}\n")
10038
10039 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10040
10041
10042 89/<- %edx 4/r32/esp
10043 (flush _test-output-buffered-file)
10044 (flush _test-error-buffered-file)
10045 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10051
10052 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-outputs: output should be empty")
10053 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: too many outputs (1 required)" "F - test-index-with-too-many-outputs: error message")
10054
10055 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-outputs: exit status")
10056
10057 81 0/subop/add %esp 8/imm32
10058
10059 5d/pop-to-ebp
10060 c3/return
10061
10062 test-compute-offset-with-non-array-atom-base-type:
10063
10064 55/push-ebp
10065 89/<- %ebp 4/r32/esp
10066
10067 (clear-stream _test-input-stream)
10068 (clear-stream $_test-input-buffered-file->buffer)
10069 (clear-stream _test-output-stream)
10070 (clear-stream $_test-output-buffered-file->buffer)
10071 (clear-stream _test-error-stream)
10072 (clear-stream $_test-error-buffered-file->buffer)
10073
10074 68/push 0/imm32
10075 68/push 0/imm32
10076 89/<- %edx 4/r32/esp
10077 (tailor-exit-descriptor %edx 0x10)
10078
10079 (write _test-input-stream "fn foo {\n")
10080 (write _test-input-stream " var a: int\n")
10081 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
10082 (write _test-input-stream "}\n")
10083
10084 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10085
10086
10087 89/<- %edx 4/r32/esp
10088 (flush _test-output-buffered-file)
10089 (flush _test-error-buffered-file)
10090 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10096
10097 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-atom-base-type: output should be empty")
10098 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: var 'a' is not an array" "F - test-compute-offset-with-non-array-atom-base-type: error message")
10099
10100 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-atom-base-type: exit status")
10101
10102 81 0/subop/add %esp 8/imm32
10103
10104 5d/pop-to-ebp
10105 c3/return
10106
10107 test-compute-offset-with-non-array-compound-base-type:
10108
10109 55/push-ebp
10110 89/<- %ebp 4/r32/esp
10111
10112 (clear-stream _test-input-stream)
10113 (clear-stream $_test-input-buffered-file->buffer)
10114 (clear-stream _test-output-stream)
10115 (clear-stream $_test-output-buffered-file->buffer)
10116 (clear-stream _test-error-stream)
10117 (clear-stream $_test-error-buffered-file->buffer)
10118
10119 68/push 0/imm32
10120 68/push 0/imm32
10121 89/<- %edx 4/r32/esp
10122 (tailor-exit-descriptor %edx 0x10)
10123
10124 (write _test-input-stream "fn foo {\n")
10125 (write _test-input-stream " var a: (handle int)\n")
10126 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
10127 (write _test-input-stream "}\n")
10128
10129 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10130
10131
10132 89/<- %edx 4/r32/esp
10133 (flush _test-output-buffered-file)
10134 (flush _test-error-buffered-file)
10135 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10141
10142 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-compound-base-type: output should be empty")
10143 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: var 'a' is not an array" "F - test-compute-offset-with-non-array-compound-base-type: error message")
10144
10145 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type: exit status")
10146
10147 81 0/subop/add %esp 8/imm32
10148
10149 5d/pop-to-ebp
10150 c3/return
10151
10152 test-compute-offset-with-non-array-compound-base-type-2:
10153
10154 55/push-ebp
10155 89/<- %ebp 4/r32/esp
10156
10157 (clear-stream _test-input-stream)
10158 (clear-stream $_test-input-buffered-file->buffer)
10159 (clear-stream _test-output-stream)
10160 (clear-stream $_test-output-buffered-file->buffer)
10161 (clear-stream _test-error-stream)
10162 (clear-stream $_test-error-buffered-file->buffer)
10163
10164 68/push 0/imm32
10165 68/push 0/imm32
10166 89/<- %edx 4/r32/esp
10167 (tailor-exit-descriptor %edx 0x10)
10168
10169 (write _test-input-stream "fn foo {\n")
10170 (write _test-input-stream " var a: (addr int)\n")
10171 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
10172 (write _test-input-stream "}\n")
10173
10174 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10175
10176
10177 89/<- %edx 4/r32/esp
10178 (flush _test-output-buffered-file)
10179 (flush _test-error-buffered-file)
10180 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10186
10187 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-compound-base-type-2: output should be empty")
10188 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: var 'a' is not an array" "F - test-compute-offset-with-non-array-compound-base-type-2: error message")
10189
10190 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type-2: exit status")
10191
10192 81 0/subop/add %esp 8/imm32
10193
10194 5d/pop-to-ebp
10195 c3/return
10196
10197 test-compute-offset-with-array-atom-base-type:
10198
10199 55/push-ebp
10200 89/<- %ebp 4/r32/esp
10201
10202 (clear-stream _test-input-stream)
10203 (clear-stream $_test-input-buffered-file->buffer)
10204 (clear-stream _test-output-stream)
10205 (clear-stream $_test-output-buffered-file->buffer)
10206 (clear-stream _test-error-stream)
10207 (clear-stream $_test-error-buffered-file->buffer)
10208
10209 68/push 0/imm32
10210 68/push 0/imm32
10211 89/<- %edx 4/r32/esp
10212 (tailor-exit-descriptor %edx 0x10)
10213
10214 (write _test-input-stream "fn foo {\n")
10215 (write _test-input-stream " var a: array\n")
10216 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
10217 (write _test-input-stream "}\n")
10218
10219 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10220
10221
10222 89/<- %edx 4/r32/esp
10223 (flush _test-output-buffered-file)
10224 (flush _test-error-buffered-file)
10225 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10231
10232 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-array-atom-base-type: output should be empty")
10233 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: array 'a' must specify the type of its elements" "F - test-compute-offset-with-array-atom-base-type: error message")
10234
10235 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-array-atom-base-type: exit status")
10236
10237 81 0/subop/add %esp 8/imm32
10238
10239 5d/pop-to-ebp
10240 c3/return
10241
10242 test-compute-offset-with-wrong-index-type:
10243
10244 55/push-ebp
10245 89/<- %ebp 4/r32/esp
10246
10247 (clear-stream _test-input-stream)
10248 (clear-stream $_test-input-buffered-file->buffer)
10249 (clear-stream _test-output-stream)
10250 (clear-stream $_test-output-buffered-file->buffer)
10251 (clear-stream _test-error-stream)
10252 (clear-stream $_test-error-buffered-file->buffer)
10253
10254 68/push 0/imm32
10255 68/push 0/imm32
10256 89/<- %edx 4/r32/esp
10257 (tailor-exit-descriptor %edx 0x10)
10258
10259 (write _test-input-stream "fn foo {\n")
10260 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
10261 (write _test-input-stream " var b: boolean\n")
10262 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, b\n")
10263 (write _test-input-stream "}\n")
10264
10265 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10266
10267
10268 89/<- %edx 4/r32/esp
10269 (flush _test-output-buffered-file)
10270 (flush _test-error-buffered-file)
10271 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10277
10278 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-index-type: output should be empty")
10279 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: second argument 'b' must be an int" "F - test-compute-offset-with-wrong-index-type: error message")
10280
10281 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-index-type: exit status")
10282
10283 81 0/subop/add %esp 8/imm32
10284
10285 5d/pop-to-ebp
10286 c3/return
10287
10288 test-compute-offset-with-output-not-offset:
10289
10290 55/push-ebp
10291 89/<- %ebp 4/r32/esp
10292
10293 (clear-stream _test-input-stream)
10294 (clear-stream $_test-input-buffered-file->buffer)
10295 (clear-stream _test-output-stream)
10296 (clear-stream $_test-output-buffered-file->buffer)
10297 (clear-stream _test-error-stream)
10298 (clear-stream $_test-error-buffered-file->buffer)
10299
10300 68/push 0/imm32
10301 68/push 0/imm32
10302 89/<- %edx 4/r32/esp
10303 (tailor-exit-descriptor %edx 0x10)
10304
10305 (write _test-input-stream "fn foo {\n")
10306 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10307 (write _test-input-stream " var o/edi: int <- compute-offset a, 0\n")
10308 (write _test-input-stream "}\n")
10309
10310 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10311
10312
10313 89/<- %edx 4/r32/esp
10314 (flush _test-output-buffered-file)
10315 (flush _test-error-buffered-file)
10316 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10322
10323 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-offset: output should be empty")
10324 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: output 'o' must be an offset" "F - test-compute-offset-with-output-not-offset: error message")
10325
10326 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-offset: exit status")
10327
10328 81 0/subop/add %esp 8/imm32
10329
10330 5d/pop-to-ebp
10331 c3/return
10332
10333 test-compute-offset-with-output-not-address-2:
10334
10335 55/push-ebp
10336 89/<- %ebp 4/r32/esp
10337
10338 (clear-stream _test-input-stream)
10339 (clear-stream $_test-input-buffered-file->buffer)
10340 (clear-stream _test-output-stream)
10341 (clear-stream $_test-output-buffered-file->buffer)
10342 (clear-stream _test-error-stream)
10343 (clear-stream $_test-error-buffered-file->buffer)
10344
10345 68/push 0/imm32
10346 68/push 0/imm32
10347 89/<- %edx 4/r32/esp
10348 (tailor-exit-descriptor %edx 0x10)
10349
10350 (write _test-input-stream "fn foo {\n")
10351 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10352 (write _test-input-stream " var o/edi: (int) <- compute-offset a, 0\n")
10353 (write _test-input-stream "}\n")
10354
10355 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10356
10357
10358 89/<- %edx 4/r32/esp
10359 (flush _test-output-buffered-file)
10360 (flush _test-error-buffered-file)
10361 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10367
10368 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-address-2: output should be empty")
10369 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: output 'o' must be an offset" "F - test-compute-offset-with-output-not-address-2: error message")
10370
10371 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-address-2: exit status")
10372
10373 81 0/subop/add %esp 8/imm32
10374
10375 5d/pop-to-ebp
10376 c3/return
10377
10378 test-compute-offset-with-wrong-output-type:
10379
10380 55/push-ebp
10381 89/<- %ebp 4/r32/esp
10382
10383 (clear-stream _test-input-stream)
10384 (clear-stream $_test-input-buffered-file->buffer)
10385 (clear-stream _test-output-stream)
10386 (clear-stream $_test-output-buffered-file->buffer)
10387 (clear-stream _test-error-stream)
10388 (clear-stream $_test-error-buffered-file->buffer)
10389
10390 68/push 0/imm32
10391 68/push 0/imm32
10392 89/<- %edx 4/r32/esp
10393 (tailor-exit-descriptor %edx 0x10)
10394
10395 (write _test-input-stream "fn foo {\n")
10396 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10397 (write _test-input-stream " var o/edi: (offset int) <- compute-offset a, 0\n")
10398 (write _test-input-stream "}\n")
10399
10400 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10401
10402
10403 89/<- %edx 4/r32/esp
10404 (flush _test-output-buffered-file)
10405 (flush _test-error-buffered-file)
10406 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10412
10413 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-type: output should be empty")
10414 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: output 'o' does not have the right type" "F - test-compute-offset-with-wrong-output-type: error message")
10415
10416 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-type: exit status")
10417
10418 81 0/subop/add %esp 8/imm32
10419
10420 5d/pop-to-ebp
10421 c3/return
10422
10423 test-compute-offset-with-wrong-output-compound-type:
10424
10425 55/push-ebp
10426 89/<- %ebp 4/r32/esp
10427
10428 (clear-stream _test-input-stream)
10429 (clear-stream $_test-input-buffered-file->buffer)
10430 (clear-stream _test-output-stream)
10431 (clear-stream $_test-output-buffered-file->buffer)
10432 (clear-stream _test-error-stream)
10433 (clear-stream $_test-error-buffered-file->buffer)
10434
10435 68/push 0/imm32
10436 68/push 0/imm32
10437 89/<- %edx 4/r32/esp
10438 (tailor-exit-descriptor %edx 0x10)
10439
10440 (write _test-input-stream "fn foo {\n")
10441 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
10442 (write _test-input-stream " var o/edi: (offset handle int) <- compute-offset a, 0\n")
10443 (write _test-input-stream "}\n")
10444
10445 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10446
10447
10448 89/<- %edx 4/r32/esp
10449 (flush _test-output-buffered-file)
10450 (flush _test-error-buffered-file)
10451 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10457
10458 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-compound-type: output should be empty")
10459 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: output 'o' does not have the right type" "F - test-compute-offset-with-wrong-output-compound-type: error message")
10460
10461 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-compound-type: exit status")
10462
10463 81 0/subop/add %esp 8/imm32
10464
10465 5d/pop-to-ebp
10466 c3/return
10467
10468 test-compute-offset-with-no-inouts:
10469
10470 55/push-ebp
10471 89/<- %ebp 4/r32/esp
10472
10473 (clear-stream _test-input-stream)
10474 (clear-stream $_test-input-buffered-file->buffer)
10475 (clear-stream _test-output-stream)
10476 (clear-stream $_test-output-buffered-file->buffer)
10477 (clear-stream _test-error-stream)
10478 (clear-stream $_test-error-buffered-file->buffer)
10479
10480 68/push 0/imm32
10481 68/push 0/imm32
10482 89/<- %edx 4/r32/esp
10483 (tailor-exit-descriptor %edx 0x10)
10484
10485 (write _test-input-stream "fn foo {\n")
10486 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset\n")
10487 (write _test-input-stream "}\n")
10488
10489 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10490
10491
10492 89/<- %edx 4/r32/esp
10493 (flush _test-output-buffered-file)
10494 (flush _test-error-buffered-file)
10495 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10501
10502 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-inouts: output should be empty")
10503 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: too few inouts (2 required)" "F - test-compute-offset-with-no-inouts: error message")
10504
10505 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-inouts: exit status")
10506
10507 81 0/subop/add %esp 8/imm32
10508
10509 5d/pop-to-ebp
10510 c3/return
10511
10512 test-compute-offset-with-too-few-inouts:
10513
10514 55/push-ebp
10515 89/<- %ebp 4/r32/esp
10516
10517 (clear-stream _test-input-stream)
10518 (clear-stream $_test-input-buffered-file->buffer)
10519 (clear-stream _test-output-stream)
10520 (clear-stream $_test-output-buffered-file->buffer)
10521 (clear-stream _test-error-stream)
10522 (clear-stream $_test-error-buffered-file->buffer)
10523
10524 68/push 0/imm32
10525 68/push 0/imm32
10526 89/<- %edx 4/r32/esp
10527 (tailor-exit-descriptor %edx 0x10)
10528
10529 (write _test-input-stream "fn foo {\n")
10530 (write _test-input-stream " var a: (array int 3)\n")
10531 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a\n")
10532 (write _test-input-stream "}\n")
10533
10534 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10535
10536
10537 89/<- %edx 4/r32/esp
10538 (flush _test-output-buffered-file)
10539 (flush _test-error-buffered-file)
10540 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10546
10547 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-few-inouts: output should be empty")
10548 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: too few inouts (2 required)" "F - test-compute-offset-with-too-few-inouts: error message")
10549
10550 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-few-inouts: exit status")
10551
10552 81 0/subop/add %esp 8/imm32
10553
10554 5d/pop-to-ebp
10555 c3/return
10556
10557 test-compute-offset-with-too-many-inouts:
10558
10559 55/push-ebp
10560 89/<- %ebp 4/r32/esp
10561
10562 (clear-stream _test-input-stream)
10563 (clear-stream $_test-input-buffered-file->buffer)
10564 (clear-stream _test-output-stream)
10565 (clear-stream $_test-output-buffered-file->buffer)
10566 (clear-stream _test-error-stream)
10567 (clear-stream $_test-error-buffered-file->buffer)
10568
10569 68/push 0/imm32
10570 68/push 0/imm32
10571 89/<- %edx 4/r32/esp
10572 (tailor-exit-descriptor %edx 0x10)
10573
10574 (write _test-input-stream "fn foo {\n")
10575 (write _test-input-stream " var a: (array int 3)\n")
10576 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0, 0\n")
10577 (write _test-input-stream "}\n")
10578
10579 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10580
10581
10582 89/<- %edx 4/r32/esp
10583 (flush _test-output-buffered-file)
10584 (flush _test-error-buffered-file)
10585 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10591
10592 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-inouts: output should be empty")
10593 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: too many inouts (2 required)" "F - test-compute-offset-with-too-many-inouts: error message")
10594
10595 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-inouts: exit status")
10596
10597 81 0/subop/add %esp 8/imm32
10598
10599 5d/pop-to-ebp
10600 c3/return
10601
10602 test-compute-offset-with-no-output:
10603
10604 55/push-ebp
10605 89/<- %ebp 4/r32/esp
10606
10607 (clear-stream _test-input-stream)
10608 (clear-stream $_test-input-buffered-file->buffer)
10609 (clear-stream _test-output-stream)
10610 (clear-stream $_test-output-buffered-file->buffer)
10611 (clear-stream _test-error-stream)
10612 (clear-stream $_test-error-buffered-file->buffer)
10613
10614 68/push 0/imm32
10615 68/push 0/imm32
10616 89/<- %edx 4/r32/esp
10617 (tailor-exit-descriptor %edx 0x10)
10618
10619 (write _test-input-stream "fn foo {\n")
10620 (write _test-input-stream " var a: (array int 3)\n")
10621 (write _test-input-stream " compute-offset a, 0\n")
10622 (write _test-input-stream "}\n")
10623
10624 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10625
10626
10627 89/<- %edx 4/r32/esp
10628 (flush _test-output-buffered-file)
10629 (flush _test-error-buffered-file)
10630 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10636
10637 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-output: output should be empty")
10638 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: must have an output" "F - test-compute-offset-with-no-output: error message")
10639
10640 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-output: exit status")
10641
10642 81 0/subop/add %esp 8/imm32
10643
10644 5d/pop-to-ebp
10645 c3/return
10646
10647 test-compute-offset-with-too-many-outputs:
10648
10649 55/push-ebp
10650 89/<- %ebp 4/r32/esp
10651
10652 (clear-stream _test-input-stream)
10653 (clear-stream $_test-input-buffered-file->buffer)
10654 (clear-stream _test-output-stream)
10655 (clear-stream $_test-output-buffered-file->buffer)
10656 (clear-stream _test-error-stream)
10657 (clear-stream $_test-error-buffered-file->buffer)
10658
10659 68/push 0/imm32
10660 68/push 0/imm32
10661 89/<- %edx 4/r32/esp
10662 (tailor-exit-descriptor %edx 0x10)
10663
10664 (write _test-input-stream "fn foo {\n")
10665 (write _test-input-stream " var a: (array int 3)\n")
10666 (write _test-input-stream " var b/eax: (offset int) <- compute-offset a, 0\n")
10667 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
10668 (write _test-input-stream " b, c <- compute-offset a, 0\n")
10669 (write _test-input-stream "}\n")
10670
10671 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10672
10673
10674 89/<- %edx 4/r32/esp
10675 (flush _test-output-buffered-file)
10676 (flush _test-error-buffered-file)
10677 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10683
10684 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-outputs: output should be empty")
10685 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: too many outputs (1 required)" "F - test-compute-offset-with-too-many-outputs: error message")
10686
10687 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-outputs: exit status")
10688
10689 81 0/subop/add %esp 8/imm32
10690
10691 5d/pop-to-ebp
10692 c3/return
10693
10694 test-convert-read-from-stream:
10695
10696 55/push-ebp
10697 89/<- %ebp 4/r32/esp
10698
10699 (clear-stream _test-input-stream)
10700 (clear-stream $_test-input-buffered-file->buffer)
10701 (clear-stream _test-output-stream)
10702 (clear-stream $_test-output-buffered-file->buffer)
10703
10704 (write _test-input-stream "fn foo {\n")
10705 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
10706 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
10707 (write _test-input-stream " read-from-stream s, o\n")
10708 (write _test-input-stream "}\n")
10709
10710 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10711
10712
10713 89/<- %edx 4/r32/esp
10714 (flush _test-output-buffered-file)
10715 (flush _test-error-buffered-file)
10716 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
10722
10723 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream/0")
10724 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream/1")
10725 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream/2")
10726 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream/3")
10727 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream/4")
10728 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream/5")
10729 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream/6")
10730 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-read-from-stream/7")
10731 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream/8")
10732 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-read-from-stream/9")
10733 (check-next-stream-line-equal _test-output-stream " (read-from-stream %esi %ecx 0x00000004)" "F - test-convert-read-from-stream/10")
10734 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream/11")
10735 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream/12")
10736 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream/13")
10737 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream/14")
10738 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream/15")
10739 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream/16")
10740 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream/17")
10741 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream/18")
10742
10743 89/<- %esp 5/r32/ebp
10744 5d/pop-to-ebp
10745 c3/return
10746
10747 test-convert-read-from-stream-with-correct-payload-size:
10748
10749 55/push-ebp
10750 89/<- %ebp 4/r32/esp
10751
10752 (clear-stream _test-input-stream)
10753 (clear-stream $_test-input-buffered-file->buffer)
10754 (clear-stream _test-output-stream)
10755 (clear-stream $_test-output-buffered-file->buffer)
10756
10757 (write _test-input-stream "fn foo {\n")
10758 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
10759 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
10760 (write _test-input-stream " read-from-stream s, o\n")
10761 (write _test-input-stream "}\n")
10762
10763 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10764
10765
10766 89/<- %edx 4/r32/esp
10767 (flush _test-output-buffered-file)
10768 (flush _test-error-buffered-file)
10769 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
10775
10776 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream-with-correct-payload-size/0")
10777 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream-with-correct-payload-size/1")
10778 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/2")
10779 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream-with-correct-payload-size/3")
10780 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream-with-correct-payload-size/4")
10781 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream-with-correct-payload-size/5")
10782 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream-with-correct-payload-size/6")
10783 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-read-from-stream-with-correct-payload-size/7")
10784 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/8")
10785 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-read-from-stream-with-correct-payload-size/9")
10786 (check-next-stream-line-equal _test-output-stream " (read-from-stream %esi %ecx 0x00000008)" "F - test-convert-read-from-stream-with-correct-payload-size/10")
10787 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/11")
10788 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream-with-correct-payload-size/12")
10789 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream-with-correct-payload-size/13")
10790 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream-with-correct-payload-size/14")
10791 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream-with-correct-payload-size/15")
10792 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream-with-correct-payload-size/16")
10793 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/17")
10794 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream-with-correct-payload-size/18")
10795
10796 89/<- %esp 5/r32/ebp
10797 5d/pop-to-ebp
10798 c3/return
10799
10800 test-read-from-stream-with-non-stream-atom-base-type:
10801
10802 55/push-ebp
10803 89/<- %ebp 4/r32/esp
10804
10805 (clear-stream _test-input-stream)
10806 (clear-stream $_test-input-buffered-file->buffer)
10807 (clear-stream _test-output-stream)
10808 (clear-stream $_test-output-buffered-file->buffer)
10809 (clear-stream _test-error-stream)
10810 (clear-stream $_test-error-buffered-file->buffer)
10811
10812 68/push 0/imm32
10813 68/push 0/imm32
10814 89/<- %edx 4/r32/esp
10815 (tailor-exit-descriptor %edx 0x10)
10816
10817 (write _test-input-stream "fn foo {\n")
10818 (write _test-input-stream " var a: int\n")
10819 (write _test-input-stream " read-from-stream a, 0\n")
10820 (write _test-input-stream "}\n")
10821
10822 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10823
10824
10825 89/<- %edx 4/r32/esp
10826 (flush _test-output-buffered-file)
10827 (flush _test-error-buffered-file)
10828 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10834
10835 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-atom-base-type: output should be empty")
10836 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: var 'a' must be an addr to a stream" "F - test-read-from-stream-with-non-stream-atom-base-type: error message")
10837
10838 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-atom-base-type: exit status")
10839
10840 81 0/subop/add %esp 8/imm32
10841
10842 5d/pop-to-ebp
10843 c3/return
10844
10845 test-read-from-stream-with-non-stream-compound-base-type:
10846
10847 55/push-ebp
10848 89/<- %ebp 4/r32/esp
10849
10850 (clear-stream _test-input-stream)
10851 (clear-stream $_test-input-buffered-file->buffer)
10852 (clear-stream _test-output-stream)
10853 (clear-stream $_test-output-buffered-file->buffer)
10854 (clear-stream _test-error-stream)
10855 (clear-stream $_test-error-buffered-file->buffer)
10856
10857 68/push 0/imm32
10858 68/push 0/imm32
10859 89/<- %edx 4/r32/esp
10860 (tailor-exit-descriptor %edx 0x10)
10861
10862 (write _test-input-stream "fn foo {\n")
10863 (write _test-input-stream " var a: (handle int)\n")
10864 (write _test-input-stream " read-from-stream a, 0\n")
10865 (write _test-input-stream "}\n")
10866
10867 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10868
10869
10870 89/<- %edx 4/r32/esp
10871 (flush _test-output-buffered-file)
10872 (flush _test-error-buffered-file)
10873 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10879
10880 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type: output should be empty")
10881 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: var 'a' must be an addr to a stream" "F - test-read-from-stream-with-non-stream-compound-base-type: error message")
10882
10883 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type: exit status")
10884
10885 81 0/subop/add %esp 8/imm32
10886
10887 5d/pop-to-ebp
10888 c3/return
10889
10890 test-read-from-stream-with-non-stream-compound-base-type-2:
10891
10892 55/push-ebp
10893 89/<- %ebp 4/r32/esp
10894
10895 (clear-stream _test-input-stream)
10896 (clear-stream $_test-input-buffered-file->buffer)
10897 (clear-stream _test-output-stream)
10898 (clear-stream $_test-output-buffered-file->buffer)
10899 (clear-stream _test-error-stream)
10900 (clear-stream $_test-error-buffered-file->buffer)
10901
10902 68/push 0/imm32
10903 68/push 0/imm32
10904 89/<- %edx 4/r32/esp
10905 (tailor-exit-descriptor %edx 0x10)
10906
10907 (write _test-input-stream "fn foo {\n")
10908 (write _test-input-stream " var a: (addr int)\n")
10909 (write _test-input-stream " read-from-stream a, 0\n")
10910 (write _test-input-stream "}\n")
10911
10912 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10913
10914
10915 89/<- %edx 4/r32/esp
10916 (flush _test-output-buffered-file)
10917 (flush _test-error-buffered-file)
10918 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10924
10925 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type-2: output should be empty")
10926 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: var 'a' must be an addr to a stream" "F - test-read-from-stream-with-non-stream-compound-base-type-2: error message")
10927
10928 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type-2: exit status")
10929
10930 81 0/subop/add %esp 8/imm32
10931
10932 5d/pop-to-ebp
10933 c3/return
10934
10935 test-read-from-stream-with-stream-atom-base-type:
10936
10937 55/push-ebp
10938 89/<- %ebp 4/r32/esp
10939
10940 (clear-stream _test-input-stream)
10941 (clear-stream $_test-input-buffered-file->buffer)
10942 (clear-stream _test-output-stream)
10943 (clear-stream $_test-output-buffered-file->buffer)
10944 (clear-stream _test-error-stream)
10945 (clear-stream $_test-error-buffered-file->buffer)
10946
10947 68/push 0/imm32
10948 68/push 0/imm32
10949 89/<- %edx 4/r32/esp
10950 (tailor-exit-descriptor %edx 0x10)
10951
10952 (write _test-input-stream "fn foo {\n")
10953 (write _test-input-stream " var a: stream\n")
10954 (write _test-input-stream " read-from-stream a, 0\n")
10955 (write _test-input-stream "}\n")
10956
10957 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10958
10959
10960 89/<- %edx 4/r32/esp
10961 (flush _test-output-buffered-file)
10962 (flush _test-error-buffered-file)
10963 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10969
10970 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-stream-atom-base-type: output should be empty")
10971 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: var 'a' must be an addr to a stream" "F - test-read-from-stream-with-stream-atom-base-type: error message")
10972
10973 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-stream-atom-base-type: exit status")
10974
10975 81 0/subop/add %esp 8/imm32
10976
10977 5d/pop-to-ebp
10978 c3/return
10979
10980 test-read-from-stream-with-wrong-index-type:
10981
10982 55/push-ebp
10983 89/<- %ebp 4/r32/esp
10984
10985 (clear-stream _test-input-stream)
10986 (clear-stream $_test-input-buffered-file->buffer)
10987 (clear-stream _test-output-stream)
10988 (clear-stream $_test-output-buffered-file->buffer)
10989 (clear-stream _test-error-stream)
10990 (clear-stream $_test-error-buffered-file->buffer)
10991
10992 68/push 0/imm32
10993 68/push 0/imm32
10994 89/<- %edx 4/r32/esp
10995 (tailor-exit-descriptor %edx 0x10)
10996
10997 (write _test-input-stream "fn foo {\n")
10998 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
10999 (write _test-input-stream " var b: boolean\n")
11000 (write _test-input-stream " read-from-stream a, b\n")
11001 (write _test-input-stream "}\n")
11002
11003 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11004
11005
11006 89/<- %edx 4/r32/esp
11007 (flush _test-output-buffered-file)
11008 (flush _test-error-buffered-file)
11009 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11015
11016 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-wrong-index-type: output should be empty")
11017 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: target 'b' must be an addr" "F - test-read-from-stream-with-wrong-index-type: error message")
11018
11019 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-wrong-index-type: exit status")
11020
11021 81 0/subop/add %esp 8/imm32
11022
11023 5d/pop-to-ebp
11024 c3/return
11025
11026 test-read-from-stream-with-no-inouts:
11027
11028 55/push-ebp
11029 89/<- %ebp 4/r32/esp
11030
11031 (clear-stream _test-input-stream)
11032 (clear-stream $_test-input-buffered-file->buffer)
11033 (clear-stream _test-output-stream)
11034 (clear-stream $_test-output-buffered-file->buffer)
11035 (clear-stream _test-error-stream)
11036 (clear-stream $_test-error-buffered-file->buffer)
11037
11038 68/push 0/imm32
11039 68/push 0/imm32
11040 89/<- %edx 4/r32/esp
11041 (tailor-exit-descriptor %edx 0x10)
11042
11043 (write _test-input-stream "fn foo {\n")
11044 (write _test-input-stream " read-from-stream\n")
11045 (write _test-input-stream "}\n")
11046
11047 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11048
11049
11050 89/<- %edx 4/r32/esp
11051 (flush _test-output-buffered-file)
11052 (flush _test-error-buffered-file)
11053 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11059
11060 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-no-inouts: output should be empty")
11061 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: too few inouts (2 required)" "F - test-read-from-stream-with-no-inouts: error message")
11062
11063 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-no-inouts: exit status")
11064
11065 81 0/subop/add %esp 8/imm32
11066
11067 5d/pop-to-ebp
11068 c3/return
11069
11070 test-read-from-stream-with-too-few-inouts:
11071
11072 55/push-ebp
11073 89/<- %ebp 4/r32/esp
11074
11075 (clear-stream _test-input-stream)
11076 (clear-stream $_test-input-buffered-file->buffer)
11077 (clear-stream _test-output-stream)
11078 (clear-stream $_test-output-buffered-file->buffer)
11079 (clear-stream _test-error-stream)
11080 (clear-stream $_test-error-buffered-file->buffer)
11081
11082 68/push 0/imm32
11083 68/push 0/imm32
11084 89/<- %edx 4/r32/esp
11085 (tailor-exit-descriptor %edx 0x10)
11086
11087 (write _test-input-stream "fn foo {\n")
11088 (write _test-input-stream " var a: (addr stream int)\n")
11089 (write _test-input-stream " read-from-stream a\n")
11090 (write _test-input-stream "}\n")
11091
11092 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11093
11094
11095 89/<- %edx 4/r32/esp
11096 (flush _test-output-buffered-file)
11097 (flush _test-error-buffered-file)
11098 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11104
11105 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-few-inouts: output should be empty")
11106 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: too few inouts (2 required)" "F - test-read-from-stream-with-too-few-inouts: error message")
11107
11108 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-few-inouts: exit status")
11109
11110 81 0/subop/add %esp 8/imm32
11111
11112 5d/pop-to-ebp
11113 c3/return
11114
11115 test-read-from-stream-with-too-many-inouts:
11116
11117 55/push-ebp
11118 89/<- %ebp 4/r32/esp
11119
11120 (clear-stream _test-input-stream)
11121 (clear-stream $_test-input-buffered-file->buffer)
11122 (clear-stream _test-output-stream)
11123 (clear-stream $_test-output-buffered-file->buffer)
11124 (clear-stream _test-error-stream)
11125 (clear-stream $_test-error-buffered-file->buffer)
11126
11127 68/push 0/imm32
11128 68/push 0/imm32
11129 89/<- %edx 4/r32/esp
11130 (tailor-exit-descriptor %edx 0x10)
11131
11132 (write _test-input-stream "fn foo {\n")
11133 (write _test-input-stream " var a: (addr stream int)\n")
11134 (write _test-input-stream " var b: (addr int)\n")
11135 (write _test-input-stream " read-from-stream a, b, 0\n")
11136 (write _test-input-stream "}\n")
11137
11138 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11139
11140
11141 89/<- %edx 4/r32/esp
11142 (flush _test-output-buffered-file)
11143 (flush _test-error-buffered-file)
11144 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11150
11151 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-many-inouts: output should be empty")
11152 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: too many inouts (2 required)" "F - test-read-from-stream-with-too-many-inouts: error message")
11153
11154 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-many-inouts: exit status")
11155
11156 81 0/subop/add %esp 8/imm32
11157
11158 5d/pop-to-ebp
11159 c3/return
11160
11161 test-read-from-stream-with-output:
11162
11163 55/push-ebp
11164 89/<- %ebp 4/r32/esp
11165
11166 (clear-stream _test-input-stream)
11167 (clear-stream $_test-input-buffered-file->buffer)
11168 (clear-stream _test-output-stream)
11169 (clear-stream $_test-output-buffered-file->buffer)
11170 (clear-stream _test-error-stream)
11171 (clear-stream $_test-error-buffered-file->buffer)
11172
11173 68/push 0/imm32
11174 68/push 0/imm32
11175 89/<- %edx 4/r32/esp
11176 (tailor-exit-descriptor %edx 0x10)
11177
11178 (write _test-input-stream "fn foo {\n")
11179 (write _test-input-stream " var a: (addr stream int)\n")
11180 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
11181 (write _test-input-stream " b <- read-from-stream a, b\n")
11182 (write _test-input-stream "}\n")
11183
11184 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11185
11186
11187 89/<- %edx 4/r32/esp
11188 (flush _test-output-buffered-file)
11189 (flush _test-error-buffered-file)
11190 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11196
11197 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-output: output should be empty")
11198 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: unexpected output" "F - test-read-from-stream-with-output: error message")
11199
11200 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-output: exit status")
11201
11202 81 0/subop/add %esp 8/imm32
11203
11204 5d/pop-to-ebp
11205 c3/return
11206
11207 test-convert-write-to-stream:
11208
11209 55/push-ebp
11210 89/<- %ebp 4/r32/esp
11211
11212 (clear-stream _test-input-stream)
11213 (clear-stream $_test-input-buffered-file->buffer)
11214 (clear-stream _test-output-stream)
11215 (clear-stream $_test-output-buffered-file->buffer)
11216
11217 (write _test-input-stream "fn foo {\n")
11218 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
11219 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
11220 (write _test-input-stream " write-to-stream s, o\n")
11221 (write _test-input-stream "}\n")
11222
11223 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
11224
11225
11226 89/<- %edx 4/r32/esp
11227 (flush _test-output-buffered-file)
11228 (flush _test-error-buffered-file)
11229 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
11235
11236 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream/0")
11237 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream/1")
11238 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream/2")
11239 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream/3")
11240 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream/4")
11241 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream/5")
11242 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream/6")
11243 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-write-to-stream/7")
11244 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream/8")
11245 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-write-to-stream/9")
11246 (check-next-stream-line-equal _test-output-stream " (write-to-stream %esi %ecx 0x00000004)" "F - test-convert-write-to-stream/10")
11247 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream/11")
11248 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream/12")
11249 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream/13")
11250 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream/14")
11251 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream/15")
11252 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream/16")
11253 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream/17")
11254 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream/18")
11255
11256 89/<- %esp 5/r32/ebp
11257 5d/pop-to-ebp
11258 c3/return
11259
11260 test-convert-write-to-stream-with-correct-payload-size:
11261
11262 55/push-ebp
11263 89/<- %ebp 4/r32/esp
11264
11265 (clear-stream _test-input-stream)
11266 (clear-stream $_test-input-buffered-file->buffer)
11267 (clear-stream _test-output-stream)
11268 (clear-stream $_test-output-buffered-file->buffer)
11269
11270 (write _test-input-stream "fn foo {\n")
11271 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
11272 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
11273 (write _test-input-stream " write-to-stream s, o\n")
11274 (write _test-input-stream "}\n")
11275
11276 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
11277
11278
11279 89/<- %edx 4/r32/esp
11280 (flush _test-output-buffered-file)
11281 (flush _test-error-buffered-file)
11282 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
11288
11289 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream-with-correct-payload-size/0")
11290 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream-with-correct-payload-size/1")
11291 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/2")
11292 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream-with-correct-payload-size/3")
11293 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream-with-correct-payload-size/4")
11294 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream-with-correct-payload-size/5")
11295 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream-with-correct-payload-size/6")
11296 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-write-to-stream-with-correct-payload-size/7")
11297 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/8")
11298 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-write-to-stream-with-correct-payload-size/9")
11299 (check-next-stream-line-equal _test-output-stream " (write-to-stream %esi %ecx 0x00000008)" "F - test-convert-write-to-stream-with-correct-payload-size/10")
11300 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/11")
11301 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream-with-correct-payload-size/12")
11302 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream-with-correct-payload-size/13")
11303 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream-with-correct-payload-size/14")
11304 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream-with-correct-payload-size/15")
11305 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream-with-correct-payload-size/16")
11306 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/17")
11307 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream-with-correct-payload-size/18")
11308
11309 89/<- %esp 5/r32/ebp
11310 5d/pop-to-ebp
11311 c3/return
11312
11313 test-write-to-stream-with-non-stream-atom-base-type:
11314
11315 55/push-ebp
11316 89/<- %ebp 4/r32/esp
11317
11318 (clear-stream _test-input-stream)
11319 (clear-stream $_test-input-buffered-file->buffer)
11320 (clear-stream _test-output-stream)
11321 (clear-stream $_test-output-buffered-file->buffer)
11322 (clear-stream _test-error-stream)
11323 (clear-stream $_test-error-buffered-file->buffer)
11324
11325 68/push 0/imm32
11326 68/push 0/imm32
11327 89/<- %edx 4/r32/esp
11328 (tailor-exit-descriptor %edx 0x10)
11329
11330 (write _test-input-stream "fn foo {\n")
11331 (write _test-input-stream " var a: int\n")
11332 (write _test-input-stream " write-to-stream a, 0\n")
11333 (write _test-input-stream "}\n")
11334
11335 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11336
11337
11338 89/<- %edx 4/r32/esp
11339 (flush _test-output-buffered-file)
11340 (flush _test-error-buffered-file)
11341 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11347
11348 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-atom-base-type: output should be empty")
11349 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: var 'a' must be an addr to a stream" "F - test-write-to-stream-with-non-stream-atom-base-type: error message")
11350
11351 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-atom-base-type: exit status")
11352
11353 81 0/subop/add %esp 8/imm32
11354
11355 5d/pop-to-ebp
11356 c3/return
11357
11358 test-write-to-stream-with-non-stream-compound-base-type:
11359
11360 55/push-ebp
11361 89/<- %ebp 4/r32/esp
11362
11363 (clear-stream _test-input-stream)
11364 (clear-stream $_test-input-buffered-file->buffer)
11365 (clear-stream _test-output-stream)
11366 (clear-stream $_test-output-buffered-file->buffer)
11367 (clear-stream _test-error-stream)
11368 (clear-stream $_test-error-buffered-file->buffer)
11369
11370 68/push 0/imm32
11371 68/push 0/imm32
11372 89/<- %edx 4/r32/esp
11373 (tailor-exit-descriptor %edx 0x10)
11374
11375 (write _test-input-stream "fn foo {\n")
11376 (write _test-input-stream " var a: (handle int)\n")
11377 (write _test-input-stream " write-to-stream a, 0\n")
11378 (write _test-input-stream "}\n")
11379
11380 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11381
11382
11383 89/<- %edx 4/r32/esp
11384 (flush _test-output-buffered-file)
11385 (flush _test-error-buffered-file)
11386 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11392
11393 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type: output should be empty")
11394 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: var 'a' must be an addr to a stream" "F - test-write-to-stream-with-non-stream-compound-base-type: error message")
11395
11396 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type: exit status")
11397
11398 81 0/subop/add %esp 8/imm32
11399
11400 5d/pop-to-ebp
11401 c3/return
11402
11403 test-write-to-stream-with-non-stream-compound-base-type-2:
11404
11405 55/push-ebp
11406 89/<- %ebp 4/r32/esp
11407
11408 (clear-stream _test-input-stream)
11409 (clear-stream $_test-input-buffered-file->buffer)
11410 (clear-stream _test-output-stream)
11411 (clear-stream $_test-output-buffered-file->buffer)
11412 (clear-stream _test-error-stream)
11413 (clear-stream $_test-error-buffered-file->buffer)
11414
11415 68/push 0/imm32
11416 68/push 0/imm32
11417 89/<- %edx 4/r32/esp
11418 (tailor-exit-descriptor %edx 0x10)
11419
11420 (write _test-input-stream "fn foo {\n")
11421 (write _test-input-stream " var a: (addr int)\n")
11422 (write _test-input-stream " write-to-stream a, 0\n")
11423 (write _test-input-stream "}\n")
11424
11425 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11426
11427
11428 89/<- %edx 4/r32/esp
11429 (flush _test-output-buffered-file)
11430 (flush _test-error-buffered-file)
11431 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11437
11438 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type-2: output should be empty")
11439 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: var 'a' must be an addr to a stream" "F - test-write-to-stream-with-non-stream-compound-base-type-2: error message")
11440
11441 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type-2: exit status")
11442
11443 81 0/subop/add %esp 8/imm32
11444
11445 5d/pop-to-ebp
11446 c3/return
11447
11448 test-write-to-stream-with-stream-atom-base-type:
11449
11450 55/push-ebp
11451 89/<- %ebp 4/r32/esp
11452
11453 (clear-stream _test-input-stream)
11454 (clear-stream $_test-input-buffered-file->buffer)
11455 (clear-stream _test-output-stream)
11456 (clear-stream $_test-output-buffered-file->buffer)
11457 (clear-stream _test-error-stream)
11458 (clear-stream $_test-error-buffered-file->buffer)
11459
11460 68/push 0/imm32
11461 68/push 0/imm32
11462 89/<- %edx 4/r32/esp
11463 (tailor-exit-descriptor %edx 0x10)
11464
11465 (write _test-input-stream "fn foo {\n")
11466 (write _test-input-stream " var a: stream\n")
11467 (write _test-input-stream " write-to-stream a, 0\n")
11468 (write _test-input-stream "}\n")
11469
11470 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11471
11472
11473 89/<- %edx 4/r32/esp
11474 (flush _test-output-buffered-file)
11475 (flush _test-error-buffered-file)
11476 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11482
11483 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-stream-atom-base-type: output should be empty")
11484 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: var 'a' must be an addr to a stream" "F - test-write-to-stream-with-stream-atom-base-type: error message")
11485
11486 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-stream-atom-base-type: exit status")
11487
11488 81 0/subop/add %esp 8/imm32
11489
11490 5d/pop-to-ebp
11491 c3/return
11492
11493 test-write-to-stream-with-wrong-index-type:
11494
11495 55/push-ebp
11496 89/<- %ebp 4/r32/esp
11497
11498 (clear-stream _test-input-stream)
11499 (clear-stream $_test-input-buffered-file->buffer)
11500 (clear-stream _test-output-stream)
11501 (clear-stream $_test-output-buffered-file->buffer)
11502 (clear-stream _test-error-stream)
11503 (clear-stream $_test-error-buffered-file->buffer)
11504
11505 68/push 0/imm32
11506 68/push 0/imm32
11507 89/<- %edx 4/r32/esp
11508 (tailor-exit-descriptor %edx 0x10)
11509
11510 (write _test-input-stream "fn foo {\n")
11511 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
11512 (write _test-input-stream " var b: boolean\n")
11513 (write _test-input-stream " write-to-stream a, b\n")
11514 (write _test-input-stream "}\n")
11515
11516 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11517
11518
11519 89/<- %edx 4/r32/esp
11520 (flush _test-output-buffered-file)
11521 (flush _test-error-buffered-file)
11522 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11528
11529 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-wrong-index-type: output should be empty")
11530 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: target 'b' must be an addr" "F - test-write-to-stream-with-wrong-index-type: error message")
11531
11532 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-wrong-index-type: exit status")
11533
11534 81 0/subop/add %esp 8/imm32
11535
11536 5d/pop-to-ebp
11537 c3/return
11538
11539 test-write-to-stream-with-no-inouts:
11540
11541 55/push-ebp
11542 89/<- %ebp 4/r32/esp
11543
11544 (clear-stream _test-input-stream)
11545 (clear-stream $_test-input-buffered-file->buffer)
11546 (clear-stream _test-output-stream)
11547 (clear-stream $_test-output-buffered-file->buffer)
11548 (clear-stream _test-error-stream)
11549 (clear-stream $_test-error-buffered-file->buffer)
11550
11551 68/push 0/imm32
11552 68/push 0/imm32
11553 89/<- %edx 4/r32/esp
11554 (tailor-exit-descriptor %edx 0x10)
11555
11556 (write _test-input-stream "fn foo {\n")
11557 (write _test-input-stream " write-to-stream\n")
11558 (write _test-input-stream "}\n")
11559
11560 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11561
11562
11563 89/<- %edx 4/r32/esp
11564 (flush _test-output-buffered-file)
11565 (flush _test-error-buffered-file)
11566 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11572
11573 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-no-inouts: output should be empty")
11574 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: too few inouts (2 required)" "F - test-write-to-stream-with-no-inouts: error message")
11575
11576 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-no-inouts: exit status")
11577
11578 81 0/subop/add %esp 8/imm32
11579
11580 5d/pop-to-ebp
11581 c3/return
11582
11583 test-write-to-stream-with-too-few-inouts:
11584
11585 55/push-ebp
11586 89/<- %ebp 4/r32/esp
11587
11588 (clear-stream _test-input-stream)
11589 (clear-stream $_test-input-buffered-file->buffer)
11590 (clear-stream _test-output-stream)
11591 (clear-stream $_test-output-buffered-file->buffer)
11592 (clear-stream _test-error-stream)
11593 (clear-stream $_test-error-buffered-file->buffer)
11594
11595 68/push 0/imm32
11596 68/push 0/imm32
11597 89/<- %edx 4/r32/esp
11598 (tailor-exit-descriptor %edx 0x10)
11599
11600 (write _test-input-stream "fn foo {\n")
11601 (write _test-input-stream " var a: (addr stream int)\n")
11602 (write _test-input-stream " write-to-stream a\n")
11603 (write _test-input-stream "}\n")
11604
11605 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11606
11607
11608 89/<- %edx 4/r32/esp
11609 (flush _test-output-buffered-file)
11610 (flush _test-error-buffered-file)
11611 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11617
11618 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-few-inouts: output should be empty")
11619 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: too few inouts (2 required)" "F - test-write-to-stream-with-too-few-inouts: error message")
11620
11621 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-few-inouts: exit status")
11622
11623 81 0/subop/add %esp 8/imm32
11624
11625 5d/pop-to-ebp
11626 c3/return
11627
11628 test-write-to-stream-with-too-many-inouts:
11629
11630 55/push-ebp
11631 89/<- %ebp 4/r32/esp
11632
11633 (clear-stream _test-input-stream)
11634 (clear-stream $_test-input-buffered-file->buffer)
11635 (clear-stream _test-output-stream)
11636 (clear-stream $_test-output-buffered-file->buffer)
11637 (clear-stream _test-error-stream)
11638 (clear-stream $_test-error-buffered-file->buffer)
11639
11640 68/push 0/imm32
11641 68/push 0/imm32
11642 89/<- %edx 4/r32/esp
11643 (tailor-exit-descriptor %edx 0x10)
11644
11645 (write _test-input-stream "fn foo {\n")
11646 (write _test-input-stream " var a: (addr stream int)\n")
11647 (write _test-input-stream " var b: (addr int)\n")
11648 (write _test-input-stream " write-to-stream a, b, 0\n")
11649 (write _test-input-stream "}\n")
11650
11651 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11652
11653
11654 89/<- %edx 4/r32/esp
11655 (flush _test-output-buffered-file)
11656 (flush _test-error-buffered-file)
11657 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11663
11664 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-many-inouts: output should be empty")
11665 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: too many inouts (2 required)" "F - test-write-to-stream-with-too-many-inouts: error message")
11666
11667 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-many-inouts: exit status")
11668
11669 81 0/subop/add %esp 8/imm32
11670
11671 5d/pop-to-ebp
11672 c3/return
11673
11674 test-write-to-stream-with-output:
11675
11676 55/push-ebp
11677 89/<- %ebp 4/r32/esp
11678
11679 (clear-stream _test-input-stream)
11680 (clear-stream $_test-input-buffered-file->buffer)
11681 (clear-stream _test-output-stream)
11682 (clear-stream $_test-output-buffered-file->buffer)
11683 (clear-stream _test-error-stream)
11684 (clear-stream $_test-error-buffered-file->buffer)
11685
11686 68/push 0/imm32
11687 68/push 0/imm32
11688 89/<- %edx 4/r32/esp
11689 (tailor-exit-descriptor %edx 0x10)
11690
11691 (write _test-input-stream "fn foo {\n")
11692 (write _test-input-stream " var a: (addr stream int)\n")
11693 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
11694 (write _test-input-stream " b <- write-to-stream a, b\n")
11695 (write _test-input-stream "}\n")
11696
11697 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11698
11699
11700 89/<- %edx 4/r32/esp
11701 (flush _test-output-buffered-file)
11702 (flush _test-error-buffered-file)
11703 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11709
11710 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-output: output should be empty")
11711 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: unexpected output" "F - test-write-to-stream-with-output: error message")
11712
11713 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-output: exit status")
11714
11715 81 0/subop/add %esp 8/imm32
11716
11717 5d/pop-to-ebp
11718 c3/return
11719
11720 test-length-with-non-array-atom-base-type:
11721
11722 55/push-ebp
11723 89/<- %ebp 4/r32/esp
11724
11725 (clear-stream _test-input-stream)
11726 (clear-stream $_test-input-buffered-file->buffer)
11727 (clear-stream _test-output-stream)
11728 (clear-stream $_test-output-buffered-file->buffer)
11729 (clear-stream _test-error-stream)
11730 (clear-stream $_test-error-buffered-file->buffer)
11731
11732 68/push 0/imm32
11733 68/push 0/imm32
11734 89/<- %edx 4/r32/esp
11735 (tailor-exit-descriptor %edx 0x10)
11736
11737 (write _test-input-stream "fn foo {\n")
11738 (write _test-input-stream " var a: int\n")
11739 (write _test-input-stream " var c/ecx: int <- length a\n")
11740 (write _test-input-stream "}\n")
11741
11742 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11743
11744
11745 89/<- %edx 4/r32/esp
11746 (flush _test-output-buffered-file)
11747 (flush _test-error-buffered-file)
11748 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11754
11755 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-atom-base-type: output should be empty")
11756 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is not an array" "F - test-length-with-non-array-atom-base-type: error message")
11757
11758 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-atom-base-type: exit status")
11759
11760 81 0/subop/add %esp 8/imm32
11761
11762 5d/pop-to-ebp
11763 c3/return
11764
11765 test-length-with-non-array-compound-base-type:
11766
11767 55/push-ebp
11768 89/<- %ebp 4/r32/esp
11769
11770 (clear-stream _test-input-stream)
11771 (clear-stream $_test-input-buffered-file->buffer)
11772 (clear-stream _test-output-stream)
11773 (clear-stream $_test-output-buffered-file->buffer)
11774 (clear-stream _test-error-stream)
11775 (clear-stream $_test-error-buffered-file->buffer)
11776
11777 68/push 0/imm32
11778 68/push 0/imm32
11779 89/<- %edx 4/r32/esp
11780 (tailor-exit-descriptor %edx 0x10)
11781
11782 (write _test-input-stream "fn foo {\n")
11783 (write _test-input-stream " var a: (handle int)\n")
11784 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
11785 (write _test-input-stream "}\n")
11786
11787 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11788
11789
11790 89/<- %edx 4/r32/esp
11791 (flush _test-output-buffered-file)
11792 (flush _test-error-buffered-file)
11793 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11799
11800 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type: output should be empty")
11801 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is not an array" "F - test-length-with-non-array-compound-base-type: error message")
11802
11803 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type: exit status")
11804
11805 81 0/subop/add %esp 8/imm32
11806
11807 5d/pop-to-ebp
11808 c3/return
11809
11810 test-length-with-non-array-compound-base-type-2:
11811
11812 55/push-ebp
11813 89/<- %ebp 4/r32/esp
11814
11815 (clear-stream _test-input-stream)
11816 (clear-stream $_test-input-buffered-file->buffer)
11817 (clear-stream _test-output-stream)
11818 (clear-stream $_test-output-buffered-file->buffer)
11819 (clear-stream _test-error-stream)
11820 (clear-stream $_test-error-buffered-file->buffer)
11821
11822 68/push 0/imm32
11823 68/push 0/imm32
11824 89/<- %edx 4/r32/esp
11825 (tailor-exit-descriptor %edx 0x10)
11826
11827 (write _test-input-stream "fn foo {\n")
11828 (write _test-input-stream " var a: (addr int)\n")
11829 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
11830 (write _test-input-stream "}\n")
11831
11832 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11833
11834
11835 89/<- %edx 4/r32/esp
11836 (flush _test-output-buffered-file)
11837 (flush _test-error-buffered-file)
11838 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11844
11845 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type-2: output should be empty")
11846 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is not an array" "F - test-length-with-non-array-compound-base-type-2: error message")
11847
11848 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type-2: exit status")
11849
11850 81 0/subop/add %esp 8/imm32
11851
11852 5d/pop-to-ebp
11853 c3/return
11854
11855 test-length-with-array-atom-base-type:
11856
11857 55/push-ebp
11858 89/<- %ebp 4/r32/esp
11859
11860 (clear-stream _test-input-stream)
11861 (clear-stream $_test-input-buffered-file->buffer)
11862 (clear-stream _test-output-stream)
11863 (clear-stream $_test-output-buffered-file->buffer)
11864 (clear-stream _test-error-stream)
11865 (clear-stream $_test-error-buffered-file->buffer)
11866
11867 68/push 0/imm32
11868 68/push 0/imm32
11869 89/<- %edx 4/r32/esp
11870 (tailor-exit-descriptor %edx 0x10)
11871
11872 (write _test-input-stream "fn foo {\n")
11873 (write _test-input-stream " var a: array\n")
11874 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
11875 (write _test-input-stream "}\n")
11876
11877 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11878
11879
11880 89/<- %edx 4/r32/esp
11881 (flush _test-output-buffered-file)
11882 (flush _test-error-buffered-file)
11883 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11889
11890 (check-stream-equal _test-output-stream "" "F - test-length-with-array-atom-base-type: output should be empty")
11891 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: array 'a' must specify the type of its elements" "F - test-length-with-array-atom-base-type: error message")
11892
11893 (check-ints-equal *(edx+4) 2 "F - test-length-with-array-atom-base-type: exit status")
11894
11895 81 0/subop/add %esp 8/imm32
11896
11897 5d/pop-to-ebp
11898 c3/return
11899
11900 test-length-with-addr-base-on-stack:
11901
11902 55/push-ebp
11903 89/<- %ebp 4/r32/esp
11904
11905 (clear-stream _test-input-stream)
11906 (clear-stream $_test-input-buffered-file->buffer)
11907 (clear-stream _test-output-stream)
11908 (clear-stream $_test-output-buffered-file->buffer)
11909 (clear-stream _test-error-stream)
11910 (clear-stream $_test-error-buffered-file->buffer)
11911
11912 68/push 0/imm32
11913 68/push 0/imm32
11914 89/<- %edx 4/r32/esp
11915 (tailor-exit-descriptor %edx 0x10)
11916
11917 (write _test-input-stream "fn foo {\n")
11918 (write _test-input-stream " var a: (addr array int)\n")
11919 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
11920 (write _test-input-stream "}\n")
11921
11922 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11923
11924
11925 89/<- %edx 4/r32/esp
11926 (flush _test-output-buffered-file)
11927 (flush _test-error-buffered-file)
11928 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11934
11935 (check-stream-equal _test-output-stream "" "F - test-length-with-addr-base-on-stack: output should be empty")
11936 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is an addr to an array, and so must live in a register" "F - test-length-with-addr-base-on-stack: error message")
11937
11938 (check-ints-equal *(edx+4) 2 "F - test-length-with-addr-base-on-stack: exit status")
11939
11940 81 0/subop/add %esp 8/imm32
11941
11942 5d/pop-to-ebp
11943 c3/return
11944
11945 test-length-with-wrong-output-type:
11946
11947 55/push-ebp
11948 89/<- %ebp 4/r32/esp
11949
11950 (clear-stream _test-input-stream)
11951 (clear-stream $_test-input-buffered-file->buffer)
11952 (clear-stream _test-output-stream)
11953 (clear-stream $_test-output-buffered-file->buffer)
11954 (clear-stream _test-error-stream)
11955 (clear-stream $_test-error-buffered-file->buffer)
11956
11957 68/push 0/imm32
11958 68/push 0/imm32
11959 89/<- %edx 4/r32/esp
11960 (tailor-exit-descriptor %edx 0x10)
11961
11962 (write _test-input-stream "fn foo {\n")
11963 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
11964 (write _test-input-stream " var o/edi: (addr int) <- length a\n")
11965 (write _test-input-stream "}\n")
11966
11967 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11968
11969
11970 89/<- %edx 4/r32/esp
11971 (flush _test-output-buffered-file)
11972 (flush _test-error-buffered-file)
11973 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11979
11980 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-type: output should be empty")
11981 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: output 'o' does not have the right type" "F - test-length-with-wrong-output-type: error message")
11982
11983 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-type: exit status")
11984
11985 81 0/subop/add %esp 8/imm32
11986
11987 5d/pop-to-ebp
11988 c3/return
11989
11990 test-length-with-wrong-output-compound-type:
11991
11992 55/push-ebp
11993 89/<- %ebp 4/r32/esp
11994
11995 (clear-stream _test-input-stream)
11996 (clear-stream $_test-input-buffered-file->buffer)
11997 (clear-stream _test-output-stream)
11998 (clear-stream $_test-output-buffered-file->buffer)
11999 (clear-stream _test-error-stream)
12000 (clear-stream $_test-error-buffered-file->buffer)
12001
12002 68/push 0/imm32
12003 68/push 0/imm32
12004 89/<- %edx 4/r32/esp
12005 (tailor-exit-descriptor %edx 0x10)
12006
12007 (write _test-input-stream "fn foo {\n")
12008 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
12009 (write _test-input-stream " var o/edi: (addr handle int) <- length a\n")
12010 (write _test-input-stream "}\n")
12011
12012 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12013
12014
12015 89/<- %edx 4/r32/esp
12016 (flush _test-output-buffered-file)
12017 (flush _test-error-buffered-file)
12018 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12024
12025 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-compound-type: output should be empty")
12026 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: output 'o' does not have the right type" "F - test-length-with-wrong-output-compound-type: error message")
12027
12028 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-compound-type: exit status")
12029
12030 81 0/subop/add %esp 8/imm32
12031
12032 5d/pop-to-ebp
12033 c3/return
12034
12035 test-length-with-no-inouts:
12036
12037 55/push-ebp
12038 89/<- %ebp 4/r32/esp
12039
12040 (clear-stream _test-input-stream)
12041 (clear-stream $_test-input-buffered-file->buffer)
12042 (clear-stream _test-output-stream)
12043 (clear-stream $_test-output-buffered-file->buffer)
12044 (clear-stream _test-error-stream)
12045 (clear-stream $_test-error-buffered-file->buffer)
12046
12047 68/push 0/imm32
12048 68/push 0/imm32
12049 89/<- %edx 4/r32/esp
12050 (tailor-exit-descriptor %edx 0x10)
12051
12052 (write _test-input-stream "fn foo {\n")
12053 (write _test-input-stream " var c/ecx: int <- length\n")
12054 (write _test-input-stream "}\n")
12055
12056 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12057
12058
12059 89/<- %edx 4/r32/esp
12060 (flush _test-output-buffered-file)
12061 (flush _test-error-buffered-file)
12062 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12068
12069 (check-stream-equal _test-output-stream "" "F - test-length-with-no-inouts: output should be empty")
12070 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: too few inouts (1 required)" "F - test-length-with-no-inouts: error message")
12071
12072 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-inouts: exit status")
12073
12074 81 0/subop/add %esp 8/imm32
12075
12076 5d/pop-to-ebp
12077 c3/return
12078
12079 test-length-with-too-many-inouts:
12080
12081 55/push-ebp
12082 89/<- %ebp 4/r32/esp
12083
12084 (clear-stream _test-input-stream)
12085 (clear-stream $_test-input-buffered-file->buffer)
12086 (clear-stream _test-output-stream)
12087 (clear-stream $_test-output-buffered-file->buffer)
12088 (clear-stream _test-error-stream)
12089 (clear-stream $_test-error-buffered-file->buffer)
12090
12091 68/push 0/imm32
12092 68/push 0/imm32
12093 89/<- %edx 4/r32/esp
12094 (tailor-exit-descriptor %edx 0x10)
12095
12096 (write _test-input-stream "fn foo {\n")
12097 (write _test-input-stream " var a: (array int 3)\n")
12098 (write _test-input-stream " var c/ecx: int <- length a, 0, 0\n")
12099 (write _test-input-stream "}\n")
12100
12101 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12102
12103
12104 89/<- %edx 4/r32/esp
12105 (flush _test-output-buffered-file)
12106 (flush _test-error-buffered-file)
12107 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12113
12114 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-inouts: output should be empty")
12115 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: too many inouts (1 required)" "F - test-length-with-too-many-inouts: error message")
12116
12117 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-inouts: exit status")
12118
12119 81 0/subop/add %esp 8/imm32
12120
12121 5d/pop-to-ebp
12122 c3/return
12123
12124 test-length-with-no-output:
12125
12126 55/push-ebp
12127 89/<- %ebp 4/r32/esp
12128
12129 (clear-stream _test-input-stream)
12130 (clear-stream $_test-input-buffered-file->buffer)
12131 (clear-stream _test-output-stream)
12132 (clear-stream $_test-output-buffered-file->buffer)
12133 (clear-stream _test-error-stream)
12134 (clear-stream $_test-error-buffered-file->buffer)
12135
12136 68/push 0/imm32
12137 68/push 0/imm32
12138 89/<- %edx 4/r32/esp
12139 (tailor-exit-descriptor %edx 0x10)
12140
12141 (write _test-input-stream "fn foo {\n")
12142 (write _test-input-stream " var a: (array int 3)\n")
12143 (write _test-input-stream " length a\n")
12144 (write _test-input-stream "}\n")
12145
12146 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12147
12148
12149 89/<- %edx 4/r32/esp
12150 (flush _test-output-buffered-file)
12151 (flush _test-error-buffered-file)
12152 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12158
12159 (check-stream-equal _test-output-stream "" "F - test-length-with-no-output: output should be empty")
12160 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: must have an output" "F - test-length-with-no-output: error message")
12161
12162 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-output: exit status")
12163
12164 81 0/subop/add %esp 8/imm32
12165
12166 5d/pop-to-ebp
12167 c3/return
12168
12169 test-length-with-too-many-outputs:
12170
12171 55/push-ebp
12172 89/<- %ebp 4/r32/esp
12173
12174 (clear-stream _test-input-stream)
12175 (clear-stream $_test-input-buffered-file->buffer)
12176 (clear-stream _test-output-stream)
12177 (clear-stream $_test-output-buffered-file->buffer)
12178 (clear-stream _test-error-stream)
12179 (clear-stream $_test-error-buffered-file->buffer)
12180
12181 68/push 0/imm32
12182 68/push 0/imm32
12183 89/<- %edx 4/r32/esp
12184 (tailor-exit-descriptor %edx 0x10)
12185
12186 (write _test-input-stream "fn foo {\n")
12187 (write _test-input-stream " var a: (array int 3)\n")
12188 (write _test-input-stream " var b/eax: int <- copy 0\n")
12189 (write _test-input-stream " var c/ecx: int <- copy 0\n")
12190 (write _test-input-stream " b, c <- length a\n")
12191 (write _test-input-stream "}\n")
12192
12193 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12194
12195
12196 89/<- %edx 4/r32/esp
12197 (flush _test-output-buffered-file)
12198 (flush _test-error-buffered-file)
12199 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12205
12206 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-outputs: output should be empty")
12207 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: too many outputs (1 required)" "F - test-length-with-too-many-outputs: error message")
12208
12209 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-outputs: exit status")
12210
12211 81 0/subop/add %esp 8/imm32
12212
12213 5d/pop-to-ebp
12214 c3/return
12215
12216 test-convert-function-with-return-register-and-local:
12217
12218 55/push-ebp
12219 89/<- %ebp 4/r32/esp
12220
12221 (clear-stream _test-input-stream)
12222 (clear-stream $_test-input-buffered-file->buffer)
12223 (clear-stream _test-output-stream)
12224 (clear-stream $_test-output-buffered-file->buffer)
12225
12226 (write _test-input-stream "fn foo -> _/eax: int {\n")
12227 (write _test-input-stream " var y/eax: int <- copy 3\n")
12228 (write _test-input-stream " var z/ecx: int <- copy 4\n")
12229 (write _test-input-stream " return y\n")
12230 (write _test-input-stream "}\n")
12231
12232 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12233 (flush _test-output-buffered-file)
12234 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
12240
12241 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local/0")
12242 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local/1")
12243 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local/2")
12244 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local/3")
12245 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local/4")
12246 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local/5")
12247 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local/6")
12248 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register-and-local/7")
12249 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local/8")
12250 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-return-register-and-local/9")
12251 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register-and-local/10")
12252 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local/11")
12253 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register-and-local/12")
12254 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register-and-local/13")
12255 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local/14")
12256 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local/15")
12257 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local/16")
12258 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local/17")
12259 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local/18")
12260 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local/19")
12261
12262 89/<- %esp 5/r32/ebp
12263 5d/pop-to-ebp
12264 c3/return
12265
12266 test-convert-function-with-return-register-and-local-2:
12267
12268 55/push-ebp
12269 89/<- %ebp 4/r32/esp
12270
12271 (clear-stream _test-input-stream)
12272 (clear-stream $_test-input-buffered-file->buffer)
12273 (clear-stream _test-output-stream)
12274 (clear-stream $_test-output-buffered-file->buffer)
12275
12276 (write _test-input-stream "fn foo -> _/eax: int {\n")
12277 (write _test-input-stream " var y/eax: int <- copy 3\n")
12278 (write _test-input-stream " var z/ecx: int <- copy 4\n")
12279 (write _test-input-stream " return z\n")
12280 (write _test-input-stream "}\n")
12281
12282 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12283 (flush _test-output-buffered-file)
12284 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
12290
12291 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local-2/0")
12292 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local-2/1")
12293 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local-2/2")
12294 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local-2/3")
12295 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local-2/4")
12296 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local-2/5")
12297 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local-2/6")
12298 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register-and-local-2/7")
12299 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local-2/8")
12300 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-return-register-and-local-2/9")
12301 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-function-with-return-register-and-local-2/10")
12302 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local-2/11")
12303 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register-and-local-2/12")
12304 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register-and-local-2/13")
12305 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local-2/14")
12306 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local-2/15")
12307 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local-2/16")
12308 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local-2/17")
12309 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local-2/18")
12310 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local-2/19")
12311
12312 89/<- %esp 5/r32/ebp
12313 5d/pop-to-ebp
12314 c3/return
12315
12316 test-convert-function-with-return-float-register-and-local:
12317
12318 55/push-ebp
12319 89/<- %ebp 4/r32/esp
12320
12321 (clear-stream _test-input-stream)
12322 (clear-stream $_test-input-buffered-file->buffer)
12323 (clear-stream _test-output-stream)
12324 (clear-stream $_test-output-buffered-file->buffer)
12325
12326 (write _test-input-stream "fn foo -> _/xmm1: float {\n")
12327 (write _test-input-stream " var y/eax: int <- copy 3\n")
12328 (write _test-input-stream " var g/xmm0: float <- convert y\n")
12329 (write _test-input-stream " var h/xmm1: float <- convert y\n")
12330 (write _test-input-stream " return g\n")
12331 (write _test-input-stream "}\n")
12332
12333 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12334 (flush _test-output-buffered-file)
12335 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
12341
12342 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-float-register-and-local/0")
12343 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-float-register-and-local/1")
12344 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-float-register-and-local/2")
12345 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-float-register-and-local/3")
12346 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-float-register-and-local/4")
12347 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-float-register-and-local/5")
12348 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-float-register-and-local/6")
12349 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-float-register-and-local/7")
12350 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-function-with-return-float-register-and-local/8")
12351 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 0/x32" "F - test-convert-function-with-return-float-register-and-local/9")
12352 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000000/x32" "F - test-convert-function-with-return-float-register-and-local/10")
12353 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-function-with-return-float-register-and-local/11")
12354 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-function-with-return-float-register-and-local/12")
12355 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-function-with-return-float-register-and-local/13")
12356 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> %xmm0 0x00000001/x32" "F - test-convert-function-with-return-float-register-and-local/14")
12357 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
12358 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 0/x32" "F - test-convert-floating-point-dereferenced/16")
12359 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/17")
12360 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-return-float-register-and-local/18")
12361 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-float-register-and-local/19")
12362 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-float-register-and-local/20")
12363 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-float-register-and-local/21")
12364 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-float-register-and-local/22")
12365 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-float-register-and-local/23")
12366 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-float-register-and-local/24")
12367 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-float-register-and-local/25")
12368
12369 89/<- %esp 5/r32/ebp
12370 5d/pop-to-ebp
12371 c3/return
12372
12373 test-convert-function-with-return-and-local-vars:
12374
12375 55/push-ebp
12376 89/<- %ebp 4/r32/esp
12377
12378 (clear-stream _test-input-stream)
12379 (clear-stream $_test-input-buffered-file->buffer)
12380 (clear-stream _test-output-stream)
12381 (clear-stream $_test-output-buffered-file->buffer)
12382
12383 (write _test-input-stream "fn foo -> _/eax: int {\n")
12384 (write _test-input-stream " {\n")
12385 (write _test-input-stream " var x: int\n")
12386 (write _test-input-stream " {\n")
12387 (write _test-input-stream " var y: int\n")
12388 (write _test-input-stream " return y\n")
12389 (write _test-input-stream " increment x\n")
12390 (write _test-input-stream " }\n")
12391 (write _test-input-stream " }\n")
12392 (write _test-input-stream " return 0\n")
12393 (write _test-input-stream "}\n")
12394
12395 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12396 (flush _test-output-buffered-file)
12397 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
12403
12404 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-and-local-vars/0")
12405 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-and-local-vars/1")
12406 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-and-local-vars/2")
12407 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-and-local-vars/3")
12408 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/4")
12409 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-and-local-vars/5")
12410 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/6")
12411 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-return-and-local-vars/7")
12412 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/8")
12413 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/9")
12414 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-return-and-local-vars/10")
12415 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/11")
12416 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-with-return-and-local-vars/12")
12417 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return-and-local-vars/13")
12418 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return-and-local-vars/14")
12419 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/15")
12420 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/16")
12421 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-return-and-local-vars/17")
12422 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return-and-local-vars/18")
12423 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/19")
12424 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-return-and-local-vars/20")
12425 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy %eax 0/imm32" "F - test-convert-function-with-return-and-local-vars/21")
12426 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/21")
12427 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/21")
12428 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-and-local-vars/22")
12429 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-and-local-vars/23")
12430 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-and-local-vars/24")
12431 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-and-local-vars/25")
12432 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-and-local-vars/26")
12433
12434 89/<- %esp 5/r32/ebp
12435 5d/pop-to-ebp
12436 c3/return
12437
12438 test-copy-object-with-no-inout:
12439
12440 55/push-ebp
12441 89/<- %ebp 4/r32/esp
12442
12443 (clear-stream _test-input-stream)
12444 (clear-stream $_test-input-buffered-file->buffer)
12445 (clear-stream _test-output-stream)
12446 (clear-stream $_test-output-buffered-file->buffer)
12447 (clear-stream _test-error-stream)
12448 (clear-stream $_test-error-buffered-file->buffer)
12449
12450 68/push 0/imm32
12451 68/push 0/imm32
12452 89/<- %edx 4/r32/esp
12453 (tailor-exit-descriptor %edx 0x10)
12454
12455 (write _test-input-stream "fn foo {\n")
12456 (write _test-input-stream " copy-object\n")
12457 (write _test-input-stream "}\n")
12458
12459 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12460
12461
12462 89/<- %edx 4/r32/esp
12463 (flush _test-output-buffered-file)
12464 (flush _test-error-buffered-file)
12465 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12471
12472 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-no-inout: output should be empty")
12473 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-object' must have two inouts" "F - test-copy-object-with-no-inout: error message")
12474
12475 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-no-inout: exit status")
12476
12477 81 0/subop/add %esp 8/imm32
12478
12479 5d/pop-to-ebp
12480 c3/return
12481
12482 test-copy-object-with-no-input:
12483
12484 55/push-ebp
12485 89/<- %ebp 4/r32/esp
12486
12487 (clear-stream _test-input-stream)
12488 (clear-stream $_test-input-buffered-file->buffer)
12489 (clear-stream _test-output-stream)
12490 (clear-stream $_test-output-buffered-file->buffer)
12491 (clear-stream _test-error-stream)
12492 (clear-stream $_test-error-buffered-file->buffer)
12493
12494 68/push 0/imm32
12495 68/push 0/imm32
12496 89/<- %edx 4/r32/esp
12497 (tailor-exit-descriptor %edx 0x10)
12498
12499 (write _test-input-stream "fn foo {\n")
12500 (write _test-input-stream " var x: (addr int)\n")
12501 (write _test-input-stream " copy-object x\n")
12502 (write _test-input-stream "}\n")
12503
12504 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12505
12506
12507 89/<- %edx 4/r32/esp
12508 (flush _test-output-buffered-file)
12509 (flush _test-error-buffered-file)
12510 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12516
12517 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-no-input: output should be empty")
12518 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-object' must have two inouts" "F - test-copy-object-with-no-input: error message")
12519
12520 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-no-input: exit status")
12521
12522 81 0/subop/add %esp 8/imm32
12523
12524 5d/pop-to-ebp
12525 c3/return
12526
12527 test-copy-object-with-too-many-inouts:
12528
12529 55/push-ebp
12530 89/<- %ebp 4/r32/esp
12531
12532 (clear-stream _test-input-stream)
12533 (clear-stream $_test-input-buffered-file->buffer)
12534 (clear-stream _test-output-stream)
12535 (clear-stream $_test-output-buffered-file->buffer)
12536 (clear-stream _test-error-stream)
12537 (clear-stream $_test-error-buffered-file->buffer)
12538
12539 68/push 0/imm32
12540 68/push 0/imm32
12541 89/<- %edx 4/r32/esp
12542 (tailor-exit-descriptor %edx 0x10)
12543
12544 (write _test-input-stream "fn foo {\n")
12545 (write _test-input-stream " var x: (addr boolean)\n")
12546 (write _test-input-stream " copy-object x, x, x\n")
12547 (write _test-input-stream "}\n")
12548
12549 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12550
12551
12552 89/<- %edx 4/r32/esp
12553 (flush _test-output-buffered-file)
12554 (flush _test-error-buffered-file)
12555 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12561
12562 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-too-many-inouts: output should be empty")
12563 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-object' must have two inouts" "F - test-copy-object-with-too-many-inouts: error message")
12564
12565 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-too-many-inouts: exit status")
12566
12567 81 0/subop/add %esp 8/imm32
12568
12569 5d/pop-to-ebp
12570 c3/return
12571
12572 test-copy-object-with-output:
12573
12574 55/push-ebp
12575 89/<- %ebp 4/r32/esp
12576
12577 (clear-stream _test-input-stream)
12578 (clear-stream $_test-input-buffered-file->buffer)
12579 (clear-stream _test-output-stream)
12580 (clear-stream $_test-output-buffered-file->buffer)
12581 (clear-stream _test-error-stream)
12582 (clear-stream $_test-error-buffered-file->buffer)
12583
12584 68/push 0/imm32
12585 68/push 0/imm32
12586 89/<- %edx 4/r32/esp
12587 (tailor-exit-descriptor %edx 0x10)
12588
12589 (write _test-input-stream "fn foo {\n")
12590 (write _test-input-stream " var x/eax: (addr boolean) <- copy 0\n")
12591 (write _test-input-stream " var y/ecx: (addr boolean) <- copy 0\n")
12592 (write _test-input-stream " x <- copy-object x, y\n")
12593 (write _test-input-stream "}\n")
12594
12595 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12596
12597
12598 89/<- %edx 4/r32/esp
12599 (flush _test-output-buffered-file)
12600 (flush _test-error-buffered-file)
12601 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12607
12608 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-output: output should be empty")
12609 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-object' must not have any outputs" "F - test-copy-object-with-output: error message")
12610
12611 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-output: exit status")
12612
12613 81 0/subop/add %esp 8/imm32
12614
12615 5d/pop-to-ebp
12616 c3/return
12617
12618 test-copy-object-deref-address:
12619
12620 55/push-ebp
12621 89/<- %ebp 4/r32/esp
12622
12623 (clear-stream _test-input-stream)
12624 (clear-stream $_test-input-buffered-file->buffer)
12625 (clear-stream _test-output-stream)
12626 (clear-stream $_test-output-buffered-file->buffer)
12627
12628 (write _test-input-stream "fn foo {\n")
12629 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
12630 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
12631 (write _test-input-stream " copy-object *y, x\n")
12632 (write _test-input-stream "}\n")
12633
12634 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12635 (flush _test-output-buffered-file)
12636 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12642
12643 (check-next-stream-line-equal _test-error-stream "" "F - test-copy-object-deref-address: error message")
12644
12645 5d/pop-to-ebp
12646 c3/return
12647
12648 test-copy-object-non-addr:
12649
12650 55/push-ebp
12651 89/<- %ebp 4/r32/esp
12652
12653 (clear-stream _test-input-stream)
12654 (clear-stream $_test-input-buffered-file->buffer)
12655 (clear-stream _test-output-stream)
12656 (clear-stream $_test-output-buffered-file->buffer)
12657 (clear-stream _test-error-stream)
12658 (clear-stream $_test-error-buffered-file->buffer)
12659
12660 68/push 0/imm32
12661 68/push 0/imm32
12662 89/<- %edx 4/r32/esp
12663 (tailor-exit-descriptor %edx 0x10)
12664
12665 (write _test-input-stream "fn foo {\n")
12666 (write _test-input-stream " var x: int\n")
12667 (write _test-input-stream " var y: int\n")
12668 (write _test-input-stream " copy-object y, x\n")
12669 (write _test-input-stream "}\n")
12670
12671 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12672
12673
12674 89/<- %edx 4/r32/esp
12675 (flush _test-output-buffered-file)
12676 (flush _test-error-buffered-file)
12677 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12683
12684 (check-stream-equal _test-output-stream "" "F - test-copy-object-non-addr: output should be empty")
12685 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-object: two inouts with identical addr types expected" "F - test-copy-object-non-addr: error message")
12686
12687 (check-ints-equal *(edx+4) 2 "F - test-copy-object-non-addr: exit status")
12688
12689 81 0/subop/add %esp 8/imm32
12690
12691 5d/pop-to-ebp
12692 c3/return
12693
12694 test-copy-object-non-equal:
12695
12696 55/push-ebp
12697 89/<- %ebp 4/r32/esp
12698
12699 (clear-stream _test-input-stream)
12700 (clear-stream $_test-input-buffered-file->buffer)
12701 (clear-stream _test-output-stream)
12702 (clear-stream $_test-output-buffered-file->buffer)
12703 (clear-stream _test-error-stream)
12704 (clear-stream $_test-error-buffered-file->buffer)
12705
12706 68/push 0/imm32
12707 68/push 0/imm32
12708 89/<- %edx 4/r32/esp
12709 (tailor-exit-descriptor %edx 0x10)
12710
12711 (write _test-input-stream "fn foo {\n")
12712 (write _test-input-stream " var x: (addr int)\n")
12713 (write _test-input-stream " var y: (addr boolean)\n")
12714 (write _test-input-stream " copy-object y, x\n")
12715 (write _test-input-stream "}\n")
12716
12717 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12718
12719
12720 89/<- %edx 4/r32/esp
12721 (flush _test-output-buffered-file)
12722 (flush _test-error-buffered-file)
12723 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12729
12730 (check-stream-equal _test-output-stream "" "F - test-copy-object-non-equal: output should be empty")
12731 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-object: two inouts with identical addr types expected" "F - test-copy-object-non-equal: error message")
12732
12733 (check-ints-equal *(edx+4) 2 "F - test-copy-object-non-equal: exit status")
12734
12735 81 0/subop/add %esp 8/imm32
12736
12737 5d/pop-to-ebp
12738 c3/return
12739
12740 test-allocate-with-no-inout:
12741
12742 55/push-ebp
12743 89/<- %ebp 4/r32/esp
12744
12745 (clear-stream _test-input-stream)
12746 (clear-stream $_test-input-buffered-file->buffer)
12747 (clear-stream _test-output-stream)
12748 (clear-stream $_test-output-buffered-file->buffer)
12749 (clear-stream _test-error-stream)
12750 (clear-stream $_test-error-buffered-file->buffer)
12751
12752 68/push 0/imm32
12753 68/push 0/imm32
12754 89/<- %edx 4/r32/esp
12755 (tailor-exit-descriptor %edx 0x10)
12756
12757 (write _test-input-stream "fn foo {\n")
12758 (write _test-input-stream " allocate\n")
12759 (write _test-input-stream "}\n")
12760
12761 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12762
12763
12764 89/<- %edx 4/r32/esp
12765 (flush _test-output-buffered-file)
12766 (flush _test-error-buffered-file)
12767 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12773
12774 (check-stream-equal _test-output-stream "" "F - test-allocate-with-no-inout: output should be empty")
12775 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'allocate' must have a single inout" "F - test-allocate-with-no-inout: error message")
12776
12777 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-no-inout: exit status")
12778
12779 81 0/subop/add %esp 8/imm32
12780
12781 5d/pop-to-ebp
12782 c3/return
12783
12784 test-allocate-with-too-many-inouts:
12785
12786 55/push-ebp
12787 89/<- %ebp 4/r32/esp
12788
12789 (clear-stream _test-input-stream)
12790 (clear-stream $_test-input-buffered-file->buffer)
12791 (clear-stream _test-output-stream)
12792 (clear-stream $_test-output-buffered-file->buffer)
12793 (clear-stream _test-error-stream)
12794 (clear-stream $_test-error-buffered-file->buffer)
12795
12796 68/push 0/imm32
12797 68/push 0/imm32
12798 89/<- %edx 4/r32/esp
12799 (tailor-exit-descriptor %edx 0x10)
12800
12801 (write _test-input-stream "fn foo {\n")
12802 (write _test-input-stream " var x: (addr handle int)\n")
12803 (write _test-input-stream " allocate x, 0\n")
12804 (write _test-input-stream "}\n")
12805
12806 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12807
12808
12809 89/<- %edx 4/r32/esp
12810 (flush _test-output-buffered-file)
12811 (flush _test-error-buffered-file)
12812 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12818
12819 (check-stream-equal _test-output-stream "" "F - test-allocate-with-too-many-inouts: output should be empty")
12820 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'allocate' must have a single inout" "F - test-allocate-with-too-many-inouts: error message")
12821
12822 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-too-many-inouts: exit status")
12823
12824 81 0/subop/add %esp 8/imm32
12825
12826 5d/pop-to-ebp
12827 c3/return
12828
12829 test-allocate-with-output:
12830
12831 55/push-ebp
12832 89/<- %ebp 4/r32/esp
12833
12834 (clear-stream _test-input-stream)
12835 (clear-stream $_test-input-buffered-file->buffer)
12836 (clear-stream _test-output-stream)
12837 (clear-stream $_test-output-buffered-file->buffer)
12838 (clear-stream _test-error-stream)
12839 (clear-stream $_test-error-buffered-file->buffer)
12840
12841 68/push 0/imm32
12842 68/push 0/imm32
12843 89/<- %edx 4/r32/esp
12844 (tailor-exit-descriptor %edx 0x10)
12845
12846 (write _test-input-stream "fn foo {\n")
12847 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
12848 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
12849 (write _test-input-stream " x <- allocate y\n")
12850 (write _test-input-stream "}\n")
12851
12852 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12853
12854
12855 89/<- %edx 4/r32/esp
12856 (flush _test-output-buffered-file)
12857 (flush _test-error-buffered-file)
12858 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12864
12865 (check-stream-equal _test-output-stream "" "F - test-allocate-with-output: output should be empty")
12866 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'allocate' must not have any outputs" "F - test-allocate-with-output: error message")
12867
12868 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-output: exit status")
12869
12870 81 0/subop/add %esp 8/imm32
12871
12872 5d/pop-to-ebp
12873 c3/return
12874
12875 test-allocate-non-addr:
12876
12877 55/push-ebp
12878 89/<- %ebp 4/r32/esp
12879
12880 (clear-stream _test-input-stream)
12881 (clear-stream $_test-input-buffered-file->buffer)
12882 (clear-stream _test-output-stream)
12883 (clear-stream $_test-output-buffered-file->buffer)
12884 (clear-stream _test-error-stream)
12885 (clear-stream $_test-error-buffered-file->buffer)
12886
12887 68/push 0/imm32
12888 68/push 0/imm32
12889 89/<- %edx 4/r32/esp
12890 (tailor-exit-descriptor %edx 0x10)
12891
12892 (write _test-input-stream "fn foo {\n")
12893 (write _test-input-stream " var y: (handle int)\n")
12894 (write _test-input-stream " allocate y\n")
12895 (write _test-input-stream "}\n")
12896
12897 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12898
12899
12900 89/<- %edx 4/r32/esp
12901 (flush _test-output-buffered-file)
12902 (flush _test-error-buffered-file)
12903 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12909
12910 (check-stream-equal _test-output-stream "" "F - test-allocate-non-addr: output must be empty")
12911 (check-next-stream-line-equal _test-error-stream "fn foo: stmt allocate: inout 'y' must have type (addr handle ...)" "F - test-allocate-non-addr: error message")
12912
12913 (check-ints-equal *(edx+4) 2 "F - test-allocate-non-addr: exit status")
12914
12915 81 0/subop/add %esp 8/imm32
12916
12917 5d/pop-to-ebp
12918 c3/return
12919
12920 test-allocate-non-addr-handle:
12921
12922 55/push-ebp
12923 89/<- %ebp 4/r32/esp
12924
12925 (clear-stream _test-input-stream)
12926 (clear-stream $_test-input-buffered-file->buffer)
12927 (clear-stream _test-output-stream)
12928 (clear-stream $_test-output-buffered-file->buffer)
12929 (clear-stream _test-error-stream)
12930 (clear-stream $_test-error-buffered-file->buffer)
12931
12932 68/push 0/imm32
12933 68/push 0/imm32
12934 89/<- %edx 4/r32/esp
12935 (tailor-exit-descriptor %edx 0x10)
12936
12937 (write _test-input-stream "fn foo {\n")
12938 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
12939 (write _test-input-stream " allocate y\n")
12940 (write _test-input-stream "}\n")
12941
12942 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12943
12944
12945 89/<- %edx 4/r32/esp
12946 (flush _test-output-buffered-file)
12947 (flush _test-error-buffered-file)
12948 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12954
12955 (check-stream-equal _test-output-stream "" "F - test-allocate-non-addr-handle: output should be empty")
12956 (check-next-stream-line-equal _test-error-stream "fn foo: stmt allocate: inout 'y' must have type (addr handle ...)" "F - test-allocate-non-addr-handle: error message")
12957
12958 (check-ints-equal *(edx+4) 2 "F - test-allocate-non-addr-handle: exit status")
12959
12960 81 0/subop/add %esp 8/imm32
12961
12962 5d/pop-to-ebp
12963 c3/return
12964
12965 test-allocate-deref-address:
12966
12967 55/push-ebp
12968 89/<- %ebp 4/r32/esp
12969
12970 (clear-stream _test-input-stream)
12971 (clear-stream $_test-input-buffered-file->buffer)
12972 (clear-stream _test-output-stream)
12973 (clear-stream $_test-output-buffered-file->buffer)
12974
12975 (write _test-input-stream "fn foo {\n")
12976 (write _test-input-stream " var y/ecx: (addr addr handle int) <- copy 0\n")
12977 (write _test-input-stream " allocate *y\n")
12978 (write _test-input-stream "}\n")
12979
12980 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12981 (flush _test-output-buffered-file)
12982 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12988
12989 (check-next-stream-line-equal _test-error-stream "" "F - test-allocate-deref-address: error message")
12990
12991 5d/pop-to-ebp
12992 c3/return
12993
12994 test-populate-with-no-inout:
12995
12996 55/push-ebp
12997 89/<- %ebp 4/r32/esp
12998
12999 (clear-stream _test-input-stream)
13000 (clear-stream $_test-input-buffered-file->buffer)
13001 (clear-stream _test-output-stream)
13002 (clear-stream $_test-output-buffered-file->buffer)
13003 (clear-stream _test-error-stream)
13004 (clear-stream $_test-error-buffered-file->buffer)
13005
13006 68/push 0/imm32
13007 68/push 0/imm32
13008 89/<- %edx 4/r32/esp
13009 (tailor-exit-descriptor %edx 0x10)
13010
13011 (write _test-input-stream "fn foo {\n")
13012 (write _test-input-stream " populate\n")
13013 (write _test-input-stream "}\n")
13014
13015 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13016
13017
13018 89/<- %edx 4/r32/esp
13019 (flush _test-output-buffered-file)
13020 (flush _test-error-buffered-file)
13021 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13027
13028 (check-stream-equal _test-output-stream "" "F - test-populate-with-no-inout: output should be empty")
13029 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must have two inouts" "F - test-populate-with-no-inout: error message")
13030
13031 (check-ints-equal *(edx+4) 2 "F - test-populate-with-no-inout: exit status")
13032
13033 81 0/subop/add %esp 8/imm32
13034
13035 5d/pop-to-ebp
13036 c3/return
13037
13038 test-populate-with-too-many-inouts:
13039
13040 55/push-ebp
13041 89/<- %ebp 4/r32/esp
13042
13043 (clear-stream _test-input-stream)
13044 (clear-stream $_test-input-buffered-file->buffer)
13045 (clear-stream _test-output-stream)
13046 (clear-stream $_test-output-buffered-file->buffer)
13047 (clear-stream _test-error-stream)
13048 (clear-stream $_test-error-buffered-file->buffer)
13049
13050 68/push 0/imm32
13051 68/push 0/imm32
13052 89/<- %edx 4/r32/esp
13053 (tailor-exit-descriptor %edx 0x10)
13054
13055 (write _test-input-stream "fn foo {\n")
13056 (write _test-input-stream " var x: (addr handle int)\n")
13057 (write _test-input-stream " populate x, 3, 0\n")
13058 (write _test-input-stream "}\n")
13059
13060 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13061
13062
13063 89/<- %edx 4/r32/esp
13064 (flush _test-output-buffered-file)
13065 (flush _test-error-buffered-file)
13066 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13072
13073 (check-stream-equal _test-output-stream "" "F - test-populate-with-too-many-inouts: output should be empty")
13074 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must have two inouts" "F - test-populate-with-too-many-inouts: error message")
13075
13076 (check-ints-equal *(edx+4) 2 "F - test-populate-with-too-many-inouts: exit status")
13077
13078 81 0/subop/add %esp 8/imm32
13079
13080 5d/pop-to-ebp
13081 c3/return
13082
13083 test-populate-with-output:
13084
13085 55/push-ebp
13086 89/<- %ebp 4/r32/esp
13087
13088 (clear-stream _test-input-stream)
13089 (clear-stream $_test-input-buffered-file->buffer)
13090 (clear-stream _test-output-stream)
13091 (clear-stream $_test-output-buffered-file->buffer)
13092 (clear-stream _test-error-stream)
13093 (clear-stream $_test-error-buffered-file->buffer)
13094
13095 68/push 0/imm32
13096 68/push 0/imm32
13097 89/<- %edx 4/r32/esp
13098 (tailor-exit-descriptor %edx 0x10)
13099
13100 (write _test-input-stream "fn foo {\n")
13101 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
13102 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
13103 (write _test-input-stream " x <- populate y\n")
13104 (write _test-input-stream "}\n")
13105
13106 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13107
13108
13109 89/<- %edx 4/r32/esp
13110 (flush _test-output-buffered-file)
13111 (flush _test-error-buffered-file)
13112 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13118
13119 (check-stream-equal _test-output-stream "" "F - test-populate-with-output: output should be empty")
13120 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must not have any outputs" "F - test-populate-with-output: error message")
13121
13122 (check-ints-equal *(edx+4) 2 "F - test-populate-with-output: exit status")
13123
13124 81 0/subop/add %esp 8/imm32
13125
13126 5d/pop-to-ebp
13127 c3/return
13128
13129 test-populate-non-addr:
13130
13131 55/push-ebp
13132 89/<- %ebp 4/r32/esp
13133
13134 (clear-stream _test-input-stream)
13135 (clear-stream $_test-input-buffered-file->buffer)
13136 (clear-stream _test-output-stream)
13137 (clear-stream $_test-output-buffered-file->buffer)
13138 (clear-stream _test-error-stream)
13139 (clear-stream $_test-error-buffered-file->buffer)
13140
13141 68/push 0/imm32
13142 68/push 0/imm32
13143 89/<- %edx 4/r32/esp
13144 (tailor-exit-descriptor %edx 0x10)
13145
13146 (write _test-input-stream "fn foo {\n")
13147 (write _test-input-stream " var y: (handle int)\n")
13148 (write _test-input-stream " populate y, 3\n")
13149 (write _test-input-stream "}\n")
13150
13151 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13152
13153
13154 89/<- %edx 4/r32/esp
13155 (flush _test-output-buffered-file)
13156 (flush _test-error-buffered-file)
13157 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13163
13164 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr: output must be empty")
13165 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate: first inout 'y' must have type (addr handle array ...)" "F - test-populate-non-addr: error message")
13166
13167 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr: exit status")
13168
13169 81 0/subop/add %esp 8/imm32
13170
13171 5d/pop-to-ebp
13172 c3/return
13173
13174 test-populate-non-addr-handle:
13175
13176 55/push-ebp
13177 89/<- %ebp 4/r32/esp
13178
13179 (clear-stream _test-input-stream)
13180 (clear-stream $_test-input-buffered-file->buffer)
13181 (clear-stream _test-output-stream)
13182 (clear-stream $_test-output-buffered-file->buffer)
13183 (clear-stream _test-error-stream)
13184 (clear-stream $_test-error-buffered-file->buffer)
13185
13186 68/push 0/imm32
13187 68/push 0/imm32
13188 89/<- %edx 4/r32/esp
13189 (tailor-exit-descriptor %edx 0x10)
13190
13191 (write _test-input-stream "fn foo {\n")
13192 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
13193 (write _test-input-stream " populate y, 3\n")
13194 (write _test-input-stream "}\n")
13195
13196 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13197
13198
13199 89/<- %edx 4/r32/esp
13200 (flush _test-output-buffered-file)
13201 (flush _test-error-buffered-file)
13202 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13208
13209 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr-handle: output should be empty")
13210 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate: first inout 'y' must have type (addr handle array ...)" "F - test-populate-non-addr-handle: error message")
13211
13212 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr-handle: exit status")
13213
13214 81 0/subop/add %esp 8/imm32
13215
13216 5d/pop-to-ebp
13217 c3/return
13218
13219 test-populate-non-addr-handle-array:
13220
13221 55/push-ebp
13222 89/<- %ebp 4/r32/esp
13223
13224 (clear-stream _test-input-stream)
13225 (clear-stream $_test-input-buffered-file->buffer)
13226 (clear-stream _test-output-stream)
13227 (clear-stream $_test-output-buffered-file->buffer)
13228 (clear-stream _test-error-stream)
13229 (clear-stream $_test-error-buffered-file->buffer)
13230
13231 68/push 0/imm32
13232 68/push 0/imm32
13233 89/<- %edx 4/r32/esp
13234 (tailor-exit-descriptor %edx 0x10)
13235
13236 (write _test-input-stream "fn foo {\n")
13237 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
13238 (write _test-input-stream " populate y, 3\n")
13239 (write _test-input-stream "}\n")
13240
13241 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13242
13243
13244 89/<- %edx 4/r32/esp
13245 (flush _test-output-buffered-file)
13246 (flush _test-error-buffered-file)
13247 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13253
13254 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr-handle-array: output should be empty")
13255 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate: first inout 'y' must have type (addr handle array ...)" "F - test-populate-non-addr-handle-array: error message")
13256
13257 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr-handle-array: exit status")
13258
13259 81 0/subop/add %esp 8/imm32
13260
13261 5d/pop-to-ebp
13262 c3/return
13263
13264 test-populate-deref-address:
13265
13266 55/push-ebp
13267 89/<- %ebp 4/r32/esp
13268
13269 (clear-stream _test-input-stream)
13270 (clear-stream $_test-input-buffered-file->buffer)
13271 (clear-stream _test-output-stream)
13272 (clear-stream $_test-output-buffered-file->buffer)
13273
13274 (write _test-input-stream "fn foo {\n")
13275 (write _test-input-stream " var y/ecx: (addr addr handle array int) <- copy 0\n")
13276 (write _test-input-stream " populate *y, 3\n")
13277 (write _test-input-stream "}\n")
13278
13279 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13280 (flush _test-output-buffered-file)
13281 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13287
13288 (check-next-stream-line-equal _test-error-stream "" "F - test-populate-deref-address: error message")
13289
13290 5d/pop-to-ebp
13291 c3/return
13292
13293 test-populate-stream-with-no-inout:
13294
13295 55/push-ebp
13296 89/<- %ebp 4/r32/esp
13297
13298 (clear-stream _test-input-stream)
13299 (clear-stream $_test-input-buffered-file->buffer)
13300 (clear-stream _test-output-stream)
13301 (clear-stream $_test-output-buffered-file->buffer)
13302 (clear-stream _test-error-stream)
13303 (clear-stream $_test-error-buffered-file->buffer)
13304
13305 68/push 0/imm32
13306 68/push 0/imm32
13307 89/<- %edx 4/r32/esp
13308 (tailor-exit-descriptor %edx 0x10)
13309
13310 (write _test-input-stream "fn foo {\n")
13311 (write _test-input-stream " populate-stream\n")
13312 (write _test-input-stream "}\n")
13313
13314 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13315
13316
13317 89/<- %edx 4/r32/esp
13318 (flush _test-output-buffered-file)
13319 (flush _test-error-buffered-file)
13320 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13326
13327 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-no-inout: output should be empty")
13328 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate-stream' must have two inouts" "F - test-populate-stream-with-no-inout: error message")
13329
13330 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-no-inout: exit status")
13331
13332 81 0/subop/add %esp 8/imm32
13333
13334 5d/pop-to-ebp
13335 c3/return
13336
13337 test-populate-stream-with-too-many-inouts:
13338
13339 55/push-ebp
13340 89/<- %ebp 4/r32/esp
13341
13342 (clear-stream _test-input-stream)
13343 (clear-stream $_test-input-buffered-file->buffer)
13344 (clear-stream _test-output-stream)
13345 (clear-stream $_test-output-buffered-file->buffer)
13346 (clear-stream _test-error-stream)
13347 (clear-stream $_test-error-buffered-file->buffer)
13348
13349 68/push 0/imm32
13350 68/push 0/imm32
13351 89/<- %edx 4/r32/esp
13352 (tailor-exit-descriptor %edx 0x10)
13353
13354 (write _test-input-stream "fn foo {\n")
13355 (write _test-input-stream " var x: (addr handle int)\n")
13356 (write _test-input-stream " populate-stream x, 3, 0\n")
13357 (write _test-input-stream "}\n")
13358
13359 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13360
13361
13362 89/<- %edx 4/r32/esp
13363 (flush _test-output-buffered-file)
13364 (flush _test-error-buffered-file)
13365 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13371
13372 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-too-many-inouts: output should be empty")
13373 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate-stream' must have two inouts" "F - test-populate-stream-with-too-many-inouts: error message")
13374
13375 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-too-many-inouts: exit status")
13376
13377 81 0/subop/add %esp 8/imm32
13378
13379 5d/pop-to-ebp
13380 c3/return
13381
13382 test-populate-stream-with-output:
13383
13384 55/push-ebp
13385 89/<- %ebp 4/r32/esp
13386
13387 (clear-stream _test-input-stream)
13388 (clear-stream $_test-input-buffered-file->buffer)
13389 (clear-stream _test-output-stream)
13390 (clear-stream $_test-output-buffered-file->buffer)
13391 (clear-stream _test-error-stream)
13392 (clear-stream $_test-error-buffered-file->buffer)
13393
13394 68/push 0/imm32
13395 68/push 0/imm32
13396 89/<- %edx 4/r32/esp
13397 (tailor-exit-descriptor %edx 0x10)
13398
13399 (write _test-input-stream "fn foo {\n")
13400 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
13401 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
13402 (write _test-input-stream " x <- populate-stream y\n")
13403 (write _test-input-stream "}\n")
13404
13405 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13406
13407
13408 89/<- %edx 4/r32/esp
13409 (flush _test-output-buffered-file)
13410 (flush _test-error-buffered-file)
13411 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13417
13418 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-output: output should be empty")
13419 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate-stream' must not have any outputs" "F - test-populate-stream-with-output: error message")
13420
13421 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-output: exit status")
13422
13423 81 0/subop/add %esp 8/imm32
13424
13425 5d/pop-to-ebp
13426 c3/return
13427
13428 test-populate-stream-non-addr:
13429
13430 55/push-ebp
13431 89/<- %ebp 4/r32/esp
13432
13433 (clear-stream _test-input-stream)
13434 (clear-stream $_test-input-buffered-file->buffer)
13435 (clear-stream _test-output-stream)
13436 (clear-stream $_test-output-buffered-file->buffer)
13437 (clear-stream _test-error-stream)
13438 (clear-stream $_test-error-buffered-file->buffer)
13439
13440 68/push 0/imm32
13441 68/push 0/imm32
13442 89/<- %edx 4/r32/esp
13443 (tailor-exit-descriptor %edx 0x10)
13444
13445 (write _test-input-stream "fn foo {\n")
13446 (write _test-input-stream " var y: (handle int)\n")
13447 (write _test-input-stream " populate-stream y, 3\n")
13448 (write _test-input-stream "}\n")
13449
13450 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13451
13452
13453 89/<- %edx 4/r32/esp
13454 (flush _test-output-buffered-file)
13455 (flush _test-error-buffered-file)
13456 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13462
13463 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr: output must be empty")
13464 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate-stream: first inout 'y' must have type (addr handle stream ...)" "F - test-populate-stream-non-addr: error message")
13465
13466 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr: exit status")
13467
13468 81 0/subop/add %esp 8/imm32
13469
13470 5d/pop-to-ebp
13471 c3/return
13472
13473 test-populate-stream-non-addr-handle:
13474
13475 55/push-ebp
13476 89/<- %ebp 4/r32/esp
13477
13478 (clear-stream _test-input-stream)
13479 (clear-stream $_test-input-buffered-file->buffer)
13480 (clear-stream _test-output-stream)
13481 (clear-stream $_test-output-buffered-file->buffer)
13482 (clear-stream _test-error-stream)
13483 (clear-stream $_test-error-buffered-file->buffer)
13484
13485 68/push 0/imm32
13486 68/push 0/imm32
13487 89/<- %edx 4/r32/esp
13488 (tailor-exit-descriptor %edx 0x10)
13489
13490 (write _test-input-stream "fn foo {\n")
13491 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
13492 (write _test-input-stream " populate-stream y, 3\n")
13493 (write _test-input-stream "}\n")
13494
13495 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13496
13497
13498 89/<- %edx 4/r32/esp
13499 (flush _test-output-buffered-file)
13500 (flush _test-error-buffered-file)
13501 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13507
13508 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr-handle: output should be empty")
13509 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate-stream: first inout 'y' must have type (addr handle stream ...)" "F - test-populate-stream-non-addr-handle: error message")
13510
13511 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr-handle: exit status")
13512
13513 81 0/subop/add %esp 8/imm32
13514
13515 5d/pop-to-ebp
13516 c3/return
13517
13518 test-populate-stream-non-addr-handle-stream:
13519
13520 55/push-ebp
13521 89/<- %ebp 4/r32/esp
13522
13523 (clear-stream _test-input-stream)
13524 (clear-stream $_test-input-buffered-file->buffer)
13525 (clear-stream _test-output-stream)
13526 (clear-stream $_test-output-buffered-file->buffer)
13527 (clear-stream _test-error-stream)
13528 (clear-stream $_test-error-buffered-file->buffer)
13529
13530 68/push 0/imm32
13531 68/push 0/imm32
13532 89/<- %edx 4/r32/esp
13533 (tailor-exit-descriptor %edx 0x10)
13534
13535 (write _test-input-stream "fn foo {\n")
13536 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
13537 (write _test-input-stream " populate-stream y, 3\n")
13538 (write _test-input-stream "}\n")
13539
13540 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13541
13542
13543 89/<- %edx 4/r32/esp
13544 (flush _test-output-buffered-file)
13545 (flush _test-error-buffered-file)
13546 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13552
13553 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr-handle-stream: output should be empty")
13554 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate-stream: first inout 'y' must have type (addr handle stream ...)" "F - test-populate-stream-non-addr-handle-stream: error message")
13555
13556 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr-handle-stream: exit status")
13557
13558 81 0/subop/add %esp 8/imm32
13559
13560 5d/pop-to-ebp
13561 c3/return
13562
13563 test-populate-stream-deref-address:
13564
13565 55/push-ebp
13566 89/<- %ebp 4/r32/esp
13567
13568 (clear-stream _test-input-stream)
13569 (clear-stream $_test-input-buffered-file->buffer)
13570 (clear-stream _test-output-stream)
13571 (clear-stream $_test-output-buffered-file->buffer)
13572
13573 (write _test-input-stream "fn foo {\n")
13574 (write _test-input-stream " var y/ecx: (addr addr handle stream int) <- copy 0\n")
13575 (write _test-input-stream " populate-stream *y, 3\n")
13576 (write _test-input-stream "}\n")
13577
13578 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13579 (flush _test-output-buffered-file)
13580 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13586
13587 (check-next-stream-line-equal _test-error-stream "" "F - test-populate-stream-deref-address: error message")
13588
13589 5d/pop-to-ebp
13590 c3/return
13591
13592
13593
13594
13595
13596 == data
13597
13598
13599 Next-block-index:
13600 1/imm32
13601
13602 Curr-block-depth:
13603 1/imm32
13604
13605 == code
13606
13607 parse-mu:
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646 55/push-ebp
13647 89/<- %ebp 4/r32/esp
13648
13649 68/push _Program-signatures/imm32
13650
13651 50/push-eax
13652 51/push-ecx
13653 52/push-edx
13654 53/push-ebx
13655 56/push-esi
13656 57/push-edi
13657
13658 81 5/subop/subtract %esp 0x200/imm32
13659 68/push 0x200/imm32/size
13660 68/push 0/imm32/read
13661 68/push 0/imm32/write
13662 89/<- %ecx 4/r32/esp
13663
13664 68/push 0/imm32/end
13665 68/push 0/imm32/start
13666 89/<- %edx 4/r32/esp
13667
13668 bf/copy-to-edi _Program-functions/imm32
13669
13670 81 5/subop/subtract %esp 0xc00/imm32
13671 68/push 0xc00/imm32/size
13672 68/push 0/imm32/top
13673 89/<- %ebx 4/r32/esp
13674 {
13675 $parse-mu:line-loop:
13676 (clear-stream %ecx)
13677 (read-line-buffered *(ebp+8) %ecx)
13678
13679 81 7/subop/compare *ecx 0/imm32
13680 0f 84/jump-if-= break/disp32
13681 +-- 6 lines: #? # dump line ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
13687 (next-mu-token %ecx %edx)
13688
13689 (slice-empty? %edx)
13690 3d/compare-eax-and 0/imm32/false
13691 0f 85/jump-if-!= loop/disp32
13692
13693
13694 8b/-> *edx 0/r32/eax
13695 8a/copy-byte *eax 0/r32/AL
13696 81 4/subop/and %eax 0xff/imm32
13697
13698 3d/compare-eax-and 0x23/imm32/hash
13699 0f 84/jump-if-= loop/disp32
13700
13701 {
13702 $parse-mu:fn:
13703 (slice-equal? %edx "fn")
13704 3d/compare-eax-and 0/imm32/false
13705 0f 84/jump-if-= break/disp32
13706
13707 68/push 0/imm32
13708 68/push 0/imm32
13709 89/<- %esi 4/r32/esp
13710
13711 (allocate Heap *Function-size %esi)
13712
13713 (lookup *esi *(esi+4))
13714
13715 (clear-stack %ebx)
13716
13717 (populate-mu-function-header %ecx %eax %ebx *(ebp+0xc) *(ebp+0x10))
13718 (populate-mu-function-body *(ebp+8) %eax %ebx *(ebp+0xc) *(ebp+0x10))
13719
13720 8b/-> *esi 0/r32/eax
13721 89/<- *edi 0/r32/eax
13722 8b/-> *(esi+4) 0/r32/eax
13723 89/<- *(edi+4) 0/r32/eax
13724
13725
13726 (lookup *esi *(esi+4))
13727
13728 8d/copy-address *(eax+0x20) 7/r32/edi
13729
13730 81 0/subop/add %esp 8/imm32
13731
13732 e9/jump $parse-mu:line-loop/disp32
13733 }
13734
13735
13736 {
13737 $parse-mu:sig:
13738 (slice-equal? %edx "sig")
13739 3d/compare-eax-and 0/imm32/false
13740 0f 84/jump-if-= break/disp32
13741
13742 57/push-edi
13743 8b/-> *(ebp-4) 7/r32/edi
13744
13745 68/push 0/imm32
13746 68/push 0/imm32
13747 89/<- %esi 4/r32/esp
13748
13749 (allocate Heap *Function-size %esi)
13750
13751 (lookup *esi *(esi+4))
13752
13753 (populate-mu-function-signature %ecx %eax *(ebp+0xc) *(ebp+0x10))
13754
13755 8b/-> *esi 0/r32/eax
13756 89/<- *edi 0/r32/eax
13757 8b/-> *(esi+4) 0/r32/eax
13758 89/<- *(edi+4) 0/r32/eax
13759
13760
13761 (lookup *esi *(esi+4))
13762
13763 8d/copy-address *(eax+0x20) 7/r32/edi
13764
13765 81 0/subop/add %esp 8/imm32
13766
13767 89/<- *(ebp-4) 7/r32/edi
13768
13769 5f/pop-to-edi
13770
13771 e9/jump $parse-mu:line-loop/disp32
13772 }
13773
13774 {
13775 $parse-mu:type:
13776 (slice-equal? %edx "type")
13777 3d/compare-eax-and 0/imm32
13778 0f 84/jump-if-= break/disp32
13779 (next-mu-token %ecx %edx)
13780
13781 (pos-or-insert-slice Type-id %edx)
13782
13783 51/push-ecx
13784
13785 68/push 0/imm32
13786 68/push 0/imm32
13787 89/<- %ecx 4/r32/esp
13788 (find-or-create-typeinfo %eax %ecx)
13789
13790 (lookup *ecx *(ecx+4))
13791
13792
13793 (populate-mu-type *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
13794
13795
13796 81 0/subop/add %esp 8/imm32
13797
13798 59/pop-to-ecx
13799 e9/jump $parse-mu:line-loop/disp32
13800 }
13801
13802 e9/jump $parse-mu:error1/disp32
13803 }
13804 $parse-mu:end:
13805
13806 81 0/subop/add %esp 0x20c/imm32
13807 81 0/subop/add %esp 0xc08/imm32
13808 81 0/subop/add %esp 8/imm32
13809
13810 5f/pop-to-edi
13811 5e/pop-to-esi
13812 5b/pop-to-ebx
13813 5a/pop-to-edx
13814 59/pop-to-ecx
13815 58/pop-to-eax
13816
13817 81 0/subop/add %esp 4/imm32
13818
13819 89/<- %esp 5/r32/ebp
13820 5d/pop-to-ebp
13821 c3/return
13822
13823 $parse-mu:error1:
13824
13825 (write-buffered *(ebp+0xc) "unexpected top-level command: ")
13826 (write-slice-buffered *(ebp+0xc) %edx)
13827 (write-buffered *(ebp+0xc) "\n")
13828 (flush *(ebp+0xc))
13829 (stop *(ebp+0x10) 1)
13830
13831
13832 $parse-mu:error2:
13833
13834 (write-int32-hex-buffered *(ebp+0xc) *ebx)
13835 (write-buffered *(ebp+0xc) " vars not reclaimed after fn '")
13836 (write-slice-buffered *(ebp+0xc) *eax)
13837 (write-buffered *(ebp+0xc) "'\n")
13838 (flush *(ebp+0xc))
13839 (stop *(ebp+0x10) 1)
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856 populate-mu-function-header:
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888 55/push-ebp
13889 89/<- %ebp 4/r32/esp
13890
13891 50/push-eax
13892 51/push-ecx
13893 52/push-edx
13894 53/push-ebx
13895 57/push-edi
13896
13897 8b/-> *(ebp+0xc) 7/r32/edi
13898
13899 68/push 0/imm32/end
13900 68/push 0/imm32/start
13901 89/<- %ecx 4/r32/esp
13902
13903 68/push 0/imm32
13904 68/push 0/imm32
13905 89/<- %ebx 4/r32/esp
13906
13907 (next-mu-token *(ebp+8) %ecx)
13908
13909
13910 (slice-empty? %ecx)
13911 3d/compare-eax-and 0/imm32/false
13912 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13913
13914 (slice-equal? %ecx "{")
13915 3d/compare-eax-and 0/imm32/false
13916 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13917
13918 (slice-equal? %ecx "->")
13919 3d/compare-eax-and 0/imm32/false
13920 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13921
13922 (slice-equal? %ecx "}")
13923 3d/compare-eax-and 0/imm32/false
13924 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13925
13926 (function-exists? %ecx)
13927 3d/compare-eax-and 0/imm32/false
13928 0f 85/jump-if-!= $populate-mu-function-header:error-duplicate/disp32
13929
13930 (slice-starts-with? %ecx "break")
13931 3d/compare-eax-and 0/imm32/false
13932 0f 85/jump-if-!= $populate-mu-function-header:error-break/disp32
13933 (slice-starts-with? %ecx "loop")
13934 3d/compare-eax-and 0/imm32/false
13935 0f 85/jump-if-!= $populate-mu-function-header:error-loop/disp32
13936
13937 (slice-to-string Heap %ecx %edi)
13938
13939 {
13940 $populate-mu-function-header:check-for-inout:
13941 (next-mu-token *(ebp+8) %ecx)
13942
13943 (slice-empty? %ecx)
13944 3d/compare-eax-and 0/imm32/false
13945 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13946
13947 (slice-equal? %ecx "{")
13948 3d/compare-eax-and 0/imm32/false
13949 0f 85/jump-if-!= $populate-mu-function-header:done/disp32
13950
13951 (slice-equal? %ecx "->")
13952 3d/compare-eax-and 0/imm32/false
13953 0f 85/jump-if-!= break/disp32
13954
13955 (slice-equal? %ecx "}")
13956 3d/compare-eax-and 0/imm32/false
13957 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13958
13959 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x14) *(ebp+0x18))
13960
13961
13962 (lookup *ebx *(ebx+4))
13963 81 7/subop/compare *(eax+0x18) 0/imm32
13964 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
13965
13966
13967
13968 8d/copy-address *(edi+8) 0/r32/eax
13969 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
13970
13971 (push *(ebp+0x10) *ebx)
13972 (push *(ebp+0x10) *(ebx+4))
13973 (push *(ebp+0x10) 0)
13974
13975 e9/jump loop/disp32
13976 }
13977
13978 {
13979 $populate-mu-function-header:check-for-out:
13980 (next-mu-token *(ebp+8) %ecx)
13981
13982 (slice-empty? %ecx)
13983 3d/compare-eax-and 0/imm32/false
13984 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13985
13986 (slice-equal? %ecx "{")
13987 3d/compare-eax-and 0/imm32/false
13988 0f 85/jump-if-!= break/disp32
13989
13990 (slice-equal? %ecx "->")
13991 3d/compare-eax-and 0/imm32/false
13992 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13993
13994 (slice-equal? %ecx "}")
13995 3d/compare-eax-and 0/imm32/false
13996 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
13997
13998 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x14) *(ebp+0x18))
13999
14000
14001 (lookup *ebx *(ebx+4))
14002 81 7/subop/compare *(eax+0x18) 0/imm32
14003 0f 84/jump-if-= $populate-mu-function-header:error3/disp32
14004
14005 (lookup *eax *(eax+4))
14006 (string-equal? %eax "_")
14007 3d/compare-eax-and 0/imm32/false
14008 0f 84/jump-if-= $populate-mu-function-header:error4/disp32
14009
14010 8d/copy-address *(edi+0x10) 0/r32/eax
14011 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
14012
14013 e9/jump loop/disp32
14014 }
14015 $populate-mu-function-header:done:
14016 (check-no-tokens-left *(ebp+8))
14017 $populate-mu-function-header:end:
14018
14019 81 0/subop/add %esp 0x10/imm32
14020
14021 5f/pop-to-edi
14022 5b/pop-to-ebx
14023 5a/pop-to-edx
14024 59/pop-to-ecx
14025 58/pop-to-eax
14026
14027 89/<- %esp 5/r32/ebp
14028 5d/pop-to-ebp
14029 c3/return
14030
14031 $populate-mu-function-header:error1:
14032
14033 (write-buffered *(ebp+0x14) "function header not in form 'fn <name> [inouts] [-> outputs] {' -- '")
14034 (flush *(ebp+0x14))
14035 (rewind-stream *(ebp+8))
14036 (write-stream-data *(ebp+0x14) *(ebp+8))
14037 (write-buffered *(ebp+0x14) "'\n")
14038 (flush *(ebp+0x14))
14039 (stop *(ebp+0x18) 1)
14040
14041
14042 $populate-mu-function-header:error2:
14043
14044 (write-buffered *(ebp+0x14) "fn ")
14045 50/push-eax
14046 (lookup *edi *(edi+4))
14047 (write-buffered *(ebp+0x14) %eax)
14048 58/pop-to-eax
14049 (write-buffered *(ebp+0x14) ": function inout '")
14050 (lookup *eax *(eax+4))
14051 (write-buffered *(ebp+0x14) %eax)
14052 (write-buffered *(ebp+0x14) "' cannot be in a register")
14053 (flush *(ebp+0x14))
14054 (stop *(ebp+0x18) 1)
14055
14056
14057 $populate-mu-function-header:error3:
14058
14059 (write-buffered *(ebp+0x14) "fn ")
14060 50/push-eax
14061 (lookup *edi *(edi+4))
14062 (write-buffered *(ebp+0x14) %eax)
14063 58/pop-to-eax
14064 (write-buffered *(ebp+0x14) ": function output '")
14065 (lookup *ebx *(ebx+4))
14066 (lookup *eax *(eax+4))
14067 (write-buffered *(ebp+0x14) %eax)
14068 (write-buffered *(ebp+0x14) "' must be in a register, in instruction '")
14069 (rewind-stream *(ebp+8))
14070 (write-stream-data *(ebp+0x14) *(ebp+8))
14071 (write-buffered *(ebp+0x14) "'\n")
14072 (flush *(ebp+0x14))
14073 (stop *(ebp+0x18) 1)
14074
14075
14076 $populate-mu-function-header:error4:
14077
14078 (write-buffered *(ebp+0x14) "fn ")
14079 50/push-eax
14080 (lookup *edi *(edi+4))
14081 (write-buffered *(ebp+0x14) %eax)
14082 58/pop-to-eax
14083 (write-buffered *(ebp+0x14) ": function outputs cannot be named; rename '")
14084 (lookup *ebx *(ebx+4))
14085 (lookup *eax *(eax+4))
14086 (write-buffered *(ebp+0x14) %eax)
14087 (write-buffered *(ebp+0x14) "' in the header to '_'\n")
14088 (flush *(ebp+0x14))
14089 (stop *(ebp+0x18) 1)
14090
14091
14092 $populate-mu-function-header:error-duplicate:
14093 (write-buffered *(ebp+0x14) "fn ")
14094 (write-slice-buffered *(ebp+0x14) %ecx)
14095 (write-buffered *(ebp+0x14) " defined more than once\n")
14096 (flush *(ebp+0x14))
14097 (stop *(ebp+0x18) 1)
14098
14099
14100 $populate-mu-function-header:error-break:
14101 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'break' for now. Please contact mu@akkartik.com.\n")
14102 (flush *(ebp+0x14))
14103 (stop *(ebp+0x18) 1)
14104
14105
14106 $populate-mu-function-header:error-loop:
14107 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'loop' for now. Please contact mu@akkartik.com.\n")
14108 (flush *(ebp+0x14))
14109 (stop *(ebp+0x18) 1)
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121 populate-mu-function-signature:
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147 55/push-ebp
14148 89/<- %ebp 4/r32/esp
14149
14150 50/push-eax
14151 51/push-ecx
14152 52/push-edx
14153 53/push-ebx
14154 57/push-edi
14155
14156 8b/-> *(ebp+0xc) 7/r32/edi
14157
14158 68/push 0/imm32/end
14159 68/push 0/imm32/start
14160 89/<- %ecx 4/r32/esp
14161
14162 68/push 0/imm32
14163 68/push 0/imm32
14164 89/<- %ebx 4/r32/esp
14165
14166 (next-mu-token *(ebp+8) %ecx)
14167
14168
14169 (slice-equal? %ecx "{")
14170 3d/compare-eax-and 0/imm32/false
14171 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14172
14173 (slice-equal? %ecx "->")
14174 3d/compare-eax-and 0/imm32/false
14175 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14176
14177 (slice-equal? %ecx "}")
14178 3d/compare-eax-and 0/imm32/false
14179 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14180
14181 (function-exists? %ecx)
14182 3d/compare-eax-and 0/imm32/false
14183 0f 85/jump-if-!= $populate-mu-function-signature:error-duplicate/disp32
14184
14185 (slice-starts-with? %ecx "break")
14186 3d/compare-eax-and 0/imm32/false
14187 0f 85/jump-if-!= $populate-mu-function-signature:error-break/disp32
14188 (slice-starts-with? %ecx "loop")
14189 3d/compare-eax-and 0/imm32/false
14190 0f 85/jump-if-!= $populate-mu-function-signature:error-loop/disp32
14191
14192 (slice-to-string Heap %ecx %edi)
14193
14194 {
14195 $populate-mu-function-signature:check-for-inout:
14196 (next-mu-token *(ebp+8) %ecx)
14197 (slice-empty? %ecx)
14198 3d/compare-eax-and 0/imm32/false
14199 0f 85/jump-if-!= break/disp32
14200
14201 (slice-equal? %ecx "->")
14202 3d/compare-eax-and 0/imm32/false
14203 0f 85/jump-if-!= break/disp32
14204
14205 (slice-equal? %ecx "{")
14206 3d/compare-eax-and 0/imm32/false
14207 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14208
14209 (slice-equal? %ecx "}")
14210 3d/compare-eax-and 0/imm32/false
14211 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14212
14213 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x10) *(ebp+0x14))
14214
14215
14216 (lookup *ebx *(ebx+4))
14217 81 7/subop/compare *(eax+0x18) 0/imm32
14218 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
14219
14220
14221
14222 8d/copy-address *(edi+8) 0/r32/eax
14223 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
14224
14225 e9/jump loop/disp32
14226 }
14227
14228 {
14229 $populate-mu-function-signature:check-for-out:
14230 (next-mu-token *(ebp+8) %ecx)
14231 (slice-empty? %ecx)
14232 3d/compare-eax-and 0/imm32/false
14233 0f 85/jump-if-!= break/disp32
14234
14235 (slice-equal? %ecx "{")
14236 3d/compare-eax-and 0/imm32/false
14237 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14238
14239 (slice-equal? %ecx "->")
14240 3d/compare-eax-and 0/imm32/false
14241 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14242
14243 (slice-equal? %ecx "}")
14244 3d/compare-eax-and 0/imm32/false
14245 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14246
14247 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x10) *(ebp+0x14))
14248
14249
14250 (lookup *ebx *(ebx+4))
14251 81 7/subop/compare *(eax+0x18) 0/imm32
14252 0f 84/jump-if-= $populate-mu-function-signature:error3/disp32
14253
14254 8d/copy-address *(edi+0x10) 0/r32/eax
14255 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
14256
14257 e9/jump loop/disp32
14258 }
14259 $populate-mu-function-signature:done:
14260 (check-no-tokens-left *(ebp+8))
14261 $populate-mu-function-signature:end:
14262
14263 81 0/subop/add %esp 0x10/imm32
14264
14265 5f/pop-to-edi
14266 5b/pop-to-ebx
14267 5a/pop-to-edx
14268 59/pop-to-ecx
14269 58/pop-to-eax
14270
14271 89/<- %esp 5/r32/ebp
14272 5d/pop-to-ebp
14273 c3/return
14274
14275 $populate-mu-function-signature:error1:
14276
14277 (write-buffered *(ebp+0x10) "function signature not in form 'fn <name> [inouts] [-> outputs] {' -- '")
14278 (flush *(ebp+0x10))
14279 (rewind-stream *(ebp+8))
14280 (write-stream-data *(ebp+0x10) *(ebp+8))
14281 (write-buffered *(ebp+0x10) "'\n")
14282 (flush *(ebp+0x10))
14283 (stop *(ebp+0x14) 1)
14284
14285
14286 $populate-mu-function-signature:error2:
14287
14288 (write-buffered *(ebp+0x10) "fn ")
14289 50/push-eax
14290 (lookup *edi *(edi+4))
14291 (write-buffered *(ebp+0x10) %eax)
14292 58/pop-to-eax
14293 (write-buffered *(ebp+0x10) ": function inout '")
14294 (lookup *eax *(eax+4))
14295 (write-buffered *(ebp+0x10) %eax)
14296 (write-buffered *(ebp+0x10) "' cannot be in a register")
14297 (flush *(ebp+0x10))
14298 (stop *(ebp+0x14) 1)
14299
14300
14301 $populate-mu-function-signature:error3:
14302
14303 (write-buffered *(ebp+0x10) "fn ")
14304 50/push-eax
14305 (lookup *edi *(edi+4))
14306 (write-buffered *(ebp+0x10) %eax)
14307 58/pop-to-eax
14308 (write-buffered *(ebp+0x10) ": function output '")
14309 (lookup *ebx *(ebx+4))
14310 (lookup *eax *(eax+4))
14311 (write-buffered *(ebp+0x10) %eax)
14312 (write-buffered *(ebp+0x10) "' must be in a register, in instruction '")
14313 (rewind-stream *(ebp+8))
14314 (write-stream-data *(ebp+0x10) *(ebp+8))
14315 (write-buffered *(ebp+0x10) "'\n")
14316 (flush *(ebp+0x10))
14317 (stop *(ebp+0x14) 1)
14318
14319
14320 $populate-mu-function-signature:error-duplicate:
14321 (write-buffered *(ebp+0x10) "fn ")
14322 (write-slice-buffered *(ebp+0x10) %ecx)
14323 (write-buffered *(ebp+0x10) " defined more than once\n")
14324 (flush *(ebp+0x10))
14325 (stop *(ebp+0x14) 1)
14326
14327
14328 $populate-mu-function-signature:error-break:
14329 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'break' for now. Please contact mu@akkartik.com.\n")
14330 (flush *(ebp+0x14))
14331 (stop *(ebp+0x18) 1)
14332
14333
14334 $populate-mu-function-signature:error-loop:
14335 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'loop' for now. Please contact mu@akkartik.com.\n")
14336 (flush *(ebp+0x14))
14337 (stop *(ebp+0x18) 1)
14338
14339
14340 function-exists?:
14341
14342 55/push-ebp
14343 89/<- %ebp 4/r32/esp
14344
14345 51/push-ecx
14346
14347 (lookup *_Program-functions *_Program-functions->payload)
14348 89/<- %ecx 0/r32/eax
14349 {
14350
14351 81 7/subop/compare %ecx 0/imm32
14352 74/jump-if-= break/disp8
14353
14354 {
14355 (lookup *ecx *(ecx+4))
14356 (slice-equal? *(ebp+8) %eax)
14357 3d/compare-eax-and 0/imm32/false
14358 74/jump-if-= break/disp8
14359 b8/copy-to-eax 1/imm32/true
14360 e9/jump $function-exists?:end/disp32
14361 }
14362
14363 (lookup *(ecx+0x20) *(ecx+0x24))
14364 89/<- %ecx 0/r32/eax
14365
14366 eb/jump loop/disp8
14367 }
14368
14369 (lookup *_Program-signatures *_Program-signatures->payload)
14370 89/<- %ecx 0/r32/eax
14371 {
14372
14373 81 7/subop/compare %ecx 0/imm32
14374 74/jump-if-= break/disp8
14375
14376 {
14377 (lookup *ecx *(ecx+4))
14378 (slice-equal? *(ebp+8) %eax)
14379 3d/compare-eax-and 0/imm32/false
14380 74/jump-if-= break/disp8
14381 b8/copy-to-eax 1/imm32/true
14382 eb/jump $function-exists?:end/disp8
14383 }
14384
14385 (lookup *(ecx+0x20) *(ecx+0x24))
14386 89/<- %ecx 0/r32/eax
14387
14388 eb/jump loop/disp8
14389 }
14390
14391 b8/copy-to-eax 0/imm32/false
14392 $function-exists?:end:
14393
14394 59/pop-to-ecx
14395
14396 89/<- %esp 5/r32/ebp
14397 5d/pop-to-ebp
14398 c3/return
14399
14400 test-function-header-with-arg:
14401
14402 55/push-ebp
14403 89/<- %ebp 4/r32/esp
14404
14405 8b/-> *Primitive-type-ids 0/r32/eax
14406 89/<- *Type-id 0/r32/eax
14407 c7 0/subop/copy *_Program-functions 0/imm32
14408 c7 0/subop/copy *_Program-functions->payload 0/imm32
14409 c7 0/subop/copy *_Program-types 0/imm32
14410 c7 0/subop/copy *_Program-types->payload 0/imm32
14411 c7 0/subop/copy *_Program-signatures 0/imm32
14412 c7 0/subop/copy *_Program-signatures->payload 0/imm32
14413 (clear-stream _test-input-stream)
14414 (write _test-input-stream "foo n: int {\n")
14415
14416 2b/subtract *Function-size 4/r32/esp
14417 89/<- %ecx 4/r32/esp
14418 (zero-out %ecx *Function-size)
14419
14420 81 5/subop/subtract %esp 0xc0/imm32
14421 68/push 0xc0/imm32/size
14422 68/push 0/imm32/top
14423 89/<- %ebx 4/r32/esp
14424
14425 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
14426
14427 (lookup *ecx *(ecx+4))
14428 (check-strings-equal %eax "foo" "F - test-function-header-with-arg/name")
14429
14430 (lookup *(ecx+8) *(ecx+0xc))
14431 (lookup *eax *(eax+4))
14432 89/<- %edx 0/r32/eax
14433
14434 (lookup *edx *(edx+4))
14435 (check-strings-equal %eax "n" "F - test-function-header-with-arg/inout:0")
14436
14437 (lookup *(edx+8) *(edx+0xc))
14438 (check-ints-equal *eax 1 "F - test-function-header-with-arg/inout:0/type:0")
14439 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-arg/inout:0/type:1")
14440 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-arg/inout:0/type:2")
14441
14442 89/<- %esp 5/r32/ebp
14443 5d/pop-to-ebp
14444 c3/return
14445
14446 test-function-header-with-multiple-args:
14447
14448 55/push-ebp
14449 89/<- %ebp 4/r32/esp
14450
14451 8b/-> *Primitive-type-ids 0/r32/eax
14452 89/<- *Type-id 0/r32/eax
14453 c7 0/subop/copy *_Program-functions 0/imm32
14454 c7 0/subop/copy *_Program-functions->payload 0/imm32
14455 c7 0/subop/copy *_Program-types 0/imm32
14456 c7 0/subop/copy *_Program-types->payload 0/imm32
14457 c7 0/subop/copy *_Program-signatures 0/imm32
14458 c7 0/subop/copy *_Program-signatures->payload 0/imm32
14459 (clear-stream _test-input-stream)
14460 (write _test-input-stream "foo a: int, b: int c: int {\n")
14461
14462 2b/subtract *Function-size 4/r32/esp
14463 89/<- %ecx 4/r32/esp
14464 (zero-out %ecx *Function-size)
14465
14466 81 5/subop/subtract %esp 0xc0/imm32
14467 68/push 0xc0/imm32/size
14468 68/push 0/imm32/top
14469 89/<- %ebx 4/r32/esp
14470
14471 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
14472
14473 (lookup *ecx *(ecx+4))
14474 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args/name")
14475
14476 (lookup *(ecx+8) *(ecx+0xc))
14477 89/<- %edx 0/r32/eax
14478 $test-function-header-with-multiple-args:inout0:
14479
14480 (lookup *edx *(edx+4))
14481 89/<- %ebx 0/r32/eax
14482
14483 (lookup *ebx *(ebx+4))
14484 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args/inout:0")
14485
14486 (lookup *(ebx+8) *(ebx+0xc))
14487 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:0/type:0")
14488 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:0/type:1")
14489 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:0/type:2")
14490 $test-function-header-with-multiple-args:inout1:
14491
14492 (lookup *(edx+8) *(edx+0xc))
14493 89/<- %edx 0/r32/eax
14494
14495 (lookup *edx *(edx+4))
14496 89/<- %ebx 0/r32/eax
14497
14498 (lookup *ebx *(ebx+4))
14499 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args/inout:1")
14500
14501 (lookup *(ebx+8) *(ebx+0xc))
14502 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:1/type:0")
14503 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:1/type:1")
14504 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:1/type:2")
14505 $test-function-header-with-multiple-args:inout2:
14506
14507 (lookup *(edx+8) *(edx+0xc))
14508 89/<- %edx 0/r32/eax
14509
14510 (lookup *edx *(edx+4))
14511 89/<- %ebx 0/r32/eax
14512
14513 (lookup *ebx *(ebx+4))
14514 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args/inout:2")
14515
14516 (lookup *(ebx+8) *(ebx+0xc))
14517 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:2/type:0")
14518 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:2/type:1")
14519 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:2/type:2")
14520
14521 89/<- %esp 5/r32/ebp
14522 5d/pop-to-ebp
14523 c3/return
14524
14525 test-function-header-with-multiple-args-and-outputs:
14526
14527 55/push-ebp
14528 89/<- %ebp 4/r32/esp
14529
14530 8b/-> *Primitive-type-ids 0/r32/eax
14531 89/<- *Type-id 0/r32/eax
14532 c7 0/subop/copy *_Program-functions 0/imm32
14533 c7 0/subop/copy *_Program-functions->payload 0/imm32
14534 c7 0/subop/copy *_Program-types 0/imm32
14535 c7 0/subop/copy *_Program-types->payload 0/imm32
14536 c7 0/subop/copy *_Program-signatures 0/imm32
14537 c7 0/subop/copy *_Program-signatures->payload 0/imm32
14538 (clear-stream _test-input-stream)
14539 (write _test-input-stream "foo a: int, b: int, c: int -> _/ecx: int _/edx: int {\n")
14540
14541 2b/subtract *Function-size 4/r32/esp
14542 89/<- %ecx 4/r32/esp
14543 (zero-out %ecx *Function-size)
14544
14545 81 5/subop/subtract %esp 0xc0/imm32
14546 68/push 0xc0/imm32/size
14547 68/push 0/imm32/top
14548 89/<- %ebx 4/r32/esp
14549
14550 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
14551
14552 (lookup *ecx *(ecx+4))
14553 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args-and-outputs/name")
14554
14555 (lookup *(ecx+8) *(ecx+0xc))
14556 89/<- %edx 0/r32/eax
14557 $test-function-header-with-multiple-args-and-outputs:inout0:
14558
14559 (lookup *edx *(edx+4))
14560 89/<- %ebx 0/r32/eax
14561
14562 (lookup *ebx *(ebx+4))
14563 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args-and-outputs/inout:0")
14564
14565 (lookup *(ebx+8) *(ebx+0xc))
14566 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:0")
14567 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:1")
14568 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:2")
14569 $test-function-header-with-multiple-args-and-outputs:inout1:
14570
14571 (lookup *(edx+8) *(edx+0xc))
14572 89/<- %edx 0/r32/eax
14573
14574 (lookup *edx *(edx+4))
14575 89/<- %ebx 0/r32/eax
14576
14577 (lookup *ebx *(ebx+4))
14578 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args-and-outputs/inout:1")
14579
14580 (lookup *(ebx+8) *(ebx+0xc))
14581 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:0")
14582 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:1")
14583 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:2")
14584 $test-function-header-with-multiple-args-and-outputs:inout2:
14585
14586 (lookup *(edx+8) *(edx+0xc))
14587 89/<- %edx 0/r32/eax
14588
14589 (lookup *edx *(edx+4))
14590 89/<- %ebx 0/r32/eax
14591
14592 (lookup *ebx *(ebx+4))
14593 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args-and-outputs/inout:2")
14594
14595 (lookup *(ebx+8) *(ebx+0xc))
14596 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:0")
14597 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:1")
14598 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:2")
14599 $test-function-header-with-multiple-args-and-outputs:out0:
14600
14601 (lookup *(ecx+0x10) *(ecx+0x14))
14602 89/<- %edx 0/r32/eax
14603
14604 (lookup *edx *(edx+4))
14605 89/<- %ebx 0/r32/eax
14606
14607 (lookup *ebx *(ebx+4))
14608 (check-strings-equal %eax "_" "F - test-function-header-with-multiple-args-and-outputs/output:0")
14609
14610 (lookup *(ebx+0x18) *(ebx+0x1c))
14611 (check-strings-equal %eax "ecx" "F - test-function-header-with-multiple-args-and-outputs/output:0/register")
14612
14613 (lookup *(ebx+8) *(ebx+0xc))
14614 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:0")
14615 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:1")
14616 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:2")
14617 $test-function-header-with-multiple-args-and-outputs:out1:
14618
14619 (lookup *(edx+8) *(edx+0xc))
14620 89/<- %edx 0/r32/eax
14621
14622 (lookup *edx *(edx+4))
14623 89/<- %ebx 0/r32/eax
14624
14625 (lookup *ebx *(ebx+4))
14626 (check-strings-equal %eax "_" "F - test-function-header-with-multiple-args-and-outputs/output:1")
14627
14628 (lookup *(ebx+0x18) *(ebx+0x1c))
14629 (check-strings-equal %eax "edx" "F - test-function-header-with-multiple-args-and-outputs/output:1/register")
14630
14631 (lookup *(ebx+8) *(ebx+0xc))
14632 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:0")
14633 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:1")
14634 (check-ints-equal *(eax+0c) 0 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:2")
14635
14636 89/<- %esp 5/r32/ebp
14637 5d/pop-to-ebp
14638 c3/return
14639
14640
14641
14642
14643
14644
14645
14646
14647 parse-var-with-type:
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664 55/push-ebp
14665 89/<- %ebp 4/r32/esp
14666
14667 50/push-eax
14668 51/push-ecx
14669 52/push-edx
14670 53/push-ebx
14671 56/push-esi
14672 57/push-edi
14673
14674 8b/-> *(ebp+8) 6/r32/esi
14675
14676 8b/-> *(esi+4) 1/r32/ecx
14677 49/decrement-ecx
14678 8a/copy-byte *ecx 1/r32/CL
14679 81 4/subop/and %ecx 0xff/imm32
14680 81 7/subop/compare %ecx 0x3a/imm32/colon
14681 0f 85/jump-if-!= $parse-var-with-type:abort/disp32
14682
14683 ff 1/subop/decrement *(esi+4)
14684
14685 68/push 0/imm32/end
14686 68/push 0/imm32/start
14687 89/<- %ecx 4/r32/esp
14688 $parse-var-with-type:parse-name:
14689 (next-token-from-slice *esi *(esi+4) 0x2f %ecx)
14690 $parse-var-with-type:create-var:
14691
14692 (new-var-from-slice Heap %ecx *(ebp+0x10))
14693
14694 $parse-var-with-type:save-register:
14695
14696 8b/-> *(ebp+0x10) 7/r32/edi
14697 (lookup *edi *(edi+4))
14698 89/<- %edi 0/r32/eax
14699
14700 (next-token-from-slice *(ecx+4) *(esi+4) 0x2f %ecx)
14701
14702 {
14703 $parse-var-with-type:write-register:
14704 (slice-empty? %ecx)
14705 3d/compare-eax-and 0/imm32/false
14706 75/jump-if-!= break/disp8
14707
14708 8d/copy-address *(edi+0x18) 0/r32/eax
14709 (slice-to-string Heap %ecx %eax)
14710 }
14711 $parse-var-with-type:save-type:
14712 8d/copy-address *(edi+8) 0/r32/eax
14713 (parse-type Heap *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
14714 $parse-var-with-type:end:
14715
14716 81 0/subop/add %esp 8/imm32
14717
14718 5f/pop-to-edi
14719 5e/pop-to-esi
14720 5b/pop-to-ebx
14721 5a/pop-to-edx
14722 59/pop-to-ecx
14723 58/pop-to-eax
14724
14725 89/<- %esp 5/r32/ebp
14726 5d/pop-to-ebp
14727 c3/return
14728
14729 $parse-var-with-type:abort:
14730
14731 (write-buffered *(ebp+0x14) "var should have form 'name: type' in '")
14732 (flush *(ebp+0x14))
14733 (rewind-stream *(ebp+0xc))
14734 (write-stream-data *(ebp+0x14) *(ebp+0xc))
14735 (write-buffered *(ebp+0x14) "'\n")
14736 (flush *(ebp+0x14))
14737 (stop *(ebp+0x18) 1)
14738
14739
14740 parse-type:
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763 55/push-ebp
14764 89/<- %ebp 4/r32/esp
14765
14766 50/push-eax
14767 51/push-ecx
14768 52/push-edx
14769
14770 (zero-out *(ebp+0x10) *Handle-size)
14771
14772 68/push 0/imm32
14773 68/push 0/imm32
14774 89/<- %ecx 4/r32/esp
14775
14776 (next-mu-token *(ebp+0xc) %ecx)
14777
14778
14779
14780
14781
14782 (slice-equal? %ecx "")
14783 3d/compare-eax-and 0/imm32/false
14784 0f 85/jump-if-!= $parse-type:abort/disp32
14785
14786 (slice-equal? %ecx "{")
14787 3d/compare-eax-and 0/imm32/false
14788 0f 85/jump-if-!= $parse-type:abort/disp32
14789
14790 (slice-equal? %ecx "}")
14791 3d/compare-eax-and 0/imm32/false
14792 0f 85/jump-if-!= $parse-type:abort/disp32
14793
14794 (slice-equal? %ecx "->")
14795 3d/compare-eax-and 0/imm32/false
14796 0f 85/jump-if-!= $parse-type:abort/disp32
14797
14798 (slice-equal? %ecx ")")
14799 3d/compare-eax-and 0/imm32/false
14800 0f 85/jump-if-!= $parse-type:end/disp32
14801
14802 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
14803
14804 8b/-> *(ebp+0x10) 2/r32/edx
14805 (lookup *edx *(edx+4))
14806 89/<- %edx 0/r32/eax
14807 {
14808
14809 (slice-equal? %ecx "(")
14810 3d/compare-eax-and 0/imm32/false
14811 0f 85/jump-if-!= break/disp32
14812
14813 {
14814 $parse-type:check-for-int:
14815
14816 8b/-> *ecx 0/r32/eax
14817 8a/copy-byte *eax 0/r32/AL
14818 81 4/subop/and %eax 0xff/imm32
14819
14820 (is-decimal-digit? %eax)
14821 3d/compare-eax-and 0/imm32/false
14822 74/jump-if-= break/disp8
14823
14824 (is-hex-int? %ecx)
14825 3d/compare-eax-and 0/imm32/false
14826 74/jump-if-= break/disp8
14827 $parse-type:int:
14828 (check-mu-hex-int %ecx *(ebp+0x14) *(ebp+0x18))
14829 (parse-hex-int-from-slice %ecx)
14830 c7 0/subop/copy *(edx+4) 9/imm32/type-id-array-capacity
14831 89/<- *(edx+8) 0/r32/eax
14832 e9/jump $parse-type:end/disp32
14833 }
14834 $parse-type:atom:
14835
14836 c7 0/subop/copy *edx 1/imm32/true
14837 {
14838 $parse-type:check-for-type-parameter:
14839
14840 8b/-> *ecx 0/r32/eax
14841 8a/copy-byte *eax 0/r32/AL
14842 81 4/subop/and %eax 0xff/imm32
14843
14844 3d/compare-eax-and 0x5f/imm32/_
14845 75/jump-if-!= break/disp8
14846 $parse-type:type-parameter:
14847
14848 c7 0/subop/copy *(edx+4) 0xa/imm32/type-parameter
14849
14850 8d/copy-address *(edx+8) 0/r32/eax
14851 (slice-to-string *(ebp+8) %ecx %eax)
14852 e9/jump $parse-type:end/disp32
14853 }
14854 $parse-type:non-type-parameter:
14855
14856 (pos-or-insert-slice Type-id %ecx)
14857 89/<- *(edx+4) 0/r32/eax
14858 e9/jump $parse-type:end/disp32
14859 }
14860 $parse-type:non-atom:
14861
14862
14863 8d/copy-address *(edx+4) 0/r32/eax
14864 (parse-type *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
14865
14866 8d/copy-address *(edx+0xc) 0/r32/eax
14867 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
14868 $parse-type:end:
14869
14870 81 0/subop/add %esp 8/imm32
14871
14872 5a/pop-to-edx
14873 59/pop-to-ecx
14874 58/pop-to-eax
14875
14876 89/<- %esp 5/r32/ebp
14877 5d/pop-to-ebp
14878 c3/return
14879
14880 $parse-type:abort:
14881
14882 (write-buffered *(ebp+0x14) "unexpected token when parsing type: '")
14883 (write-slice-buffered *(ebp+0x14) %ecx)
14884 (write-buffered *(ebp+0x14) "'\n")
14885 (flush *(ebp+0x14))
14886 (stop *(ebp+0x18) 1)
14887
14888
14889 parse-type-tree:
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899 55/push-ebp
14900 89/<- %ebp 4/r32/esp
14901
14902 50/push-eax
14903 51/push-ecx
14904 52/push-edx
14905
14906 (zero-out *(ebp+0x10) *Handle-size)
14907
14908 68/push 0/imm32
14909 68/push 0/imm32
14910 89/<- %ecx 4/r32/esp
14911
14912 (parse-type *(ebp+8) *(ebp+0xc) %ecx *(ebp+0x14) *(ebp+0x18))
14913
14914 81 7/subop/compare *ecx 0/imm32
14915 74/jump-if-= $parse-type-tree:end/disp8
14916
14917 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
14918
14919 8b/-> *(ebp+0x10) 2/r32/edx
14920 (lookup *edx *(edx+4))
14921 89/<- %edx 0/r32/eax
14922
14923 8b/-> *ecx 0/r32/eax
14924 89/<- *(edx+4) 0/r32/eax
14925 8b/-> *(ecx+4) 0/r32/eax
14926 89/<- *(edx+8) 0/r32/eax
14927
14928 8d/copy-address *(edx+0xc) 0/r32/eax
14929 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
14930 $parse-type-tree:end:
14931
14932 81 0/subop/add %esp 8/imm32
14933
14934 5a/pop-to-edx
14935 59/pop-to-ecx
14936 58/pop-to-eax
14937
14938 89/<- %esp 5/r32/ebp
14939 5d/pop-to-ebp
14940 c3/return
14941
14942 next-mu-token:
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987 55/push-ebp
14988 89/<- %ebp 4/r32/esp
14989
14990 50/push-eax
14991 51/push-ecx
14992 56/push-esi
14993 57/push-edi
14994
14995 8b/-> *(ebp+8) 6/r32/esi
14996
14997 8b/-> *(ebp+0xc) 7/r32/edi
14998 $next-mu-token:start:
14999 (skip-chars-matching-whitespace %esi)
15000 $next-mu-token:check0:
15001
15002
15003 8b/-> *(esi+4) 1/r32/ecx
15004
15005 3b/compare<- *esi 1/r32/ecx
15006 c7 0/subop/copy *edi 0/imm32
15007 c7 0/subop/copy *(edi+4) 0/imm32
15008 0f 8d/jump-if->= $next-mu-token:end/disp32
15009
15010 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
15011 89/<- *edi 0/r32/eax
15012
15013 31/xor-with %eax 0/r32/eax
15014 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
15015 {
15016 $next-mu-token:check-for-comma:
15017
15018 3d/compare-eax-and 0x2c/imm32/comma
15019 75/jump-if-!= break/disp8
15020
15021 ff 0/subop/increment *(esi+4)
15022
15023 e9/jump $next-mu-token:start/disp32
15024 }
15025 {
15026 $next-mu-token:check-for-comment:
15027
15028 3d/compare-eax-and 0x23/imm32/pound
15029 75/jump-if-!= break/disp8
15030
15031 e9/jump $next-mu-token:done/disp32
15032 }
15033 {
15034 $next-mu-token:check-for-string-literal:
15035
15036 3d/compare-eax-and 0x22/imm32/dquote
15037 75/jump-if-!= break/disp8
15038 (skip-string %esi)
15039
15040 e9/jump $next-mu-token:done/disp32
15041 }
15042 {
15043 $next-mu-token:check-for-open-paren:
15044
15045 3d/compare-eax-and 0x28/imm32/open-paren
15046 75/jump-if-!= break/disp8
15047
15048 ff 0/subop/increment *(esi+4)
15049
15050 e9/jump $next-mu-token:done/disp32
15051 }
15052 {
15053 $next-mu-token:check-for-close-paren:
15054
15055 3d/compare-eax-and 0x29/imm32/close-paren
15056 75/jump-if-!= break/disp8
15057
15058 ff 0/subop/increment *(esi+4)
15059
15060 e9/jump $next-mu-token:done/disp32
15061 }
15062 {
15063 $next-mu-token:regular-word-without-metadata:
15064
15065
15066 8b/-> *(esi+4) 1/r32/ecx
15067
15068 3b/compare<- *esi 1/r32/ecx
15069 7d/jump-if->= break/disp8
15070
15071 31/xor-with %eax 0/r32/eax
15072 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
15073
15074 3d/compare-eax-and 0x20/imm32/space
15075 74/jump-if-= break/disp8
15076
15077 3d/compare-eax-and 0xd/imm32/carriage-return
15078 74/jump-if-= break/disp8
15079
15080 3d/compare-eax-and 0xa/imm32/newline
15081 74/jump-if-= break/disp8
15082
15083 3d/compare-eax-and 0x28/imm32/open-paren
15084 0f 84/jump-if-= break/disp32
15085
15086 3d/compare-eax-and 0x29/imm32/close-paren
15087 0f 84/jump-if-= break/disp32
15088
15089 3d/compare-eax-and 0x2c/imm32/comma
15090 0f 84/jump-if-= break/disp32
15091
15092 ff 0/subop/increment *(esi+4)
15093
15094 e9/jump loop/disp32
15095 }
15096 $next-mu-token:done:
15097
15098 8b/-> *(esi+4) 1/r32/ecx
15099 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
15100 89/<- *(edi+4) 0/r32/eax
15101 $next-mu-token:end:
15102
15103 5f/pop-to-edi
15104 5e/pop-to-esi
15105 59/pop-to-ecx
15106 58/pop-to-eax
15107
15108 89/<- %esp 5/r32/ebp
15109 5d/pop-to-ebp
15110 c3/return
15111
15112 pos-or-insert-slice:
15113
15114 55/push-ebp
15115 89/<- %ebp 4/r32/esp
15116
15117 (pos-slice *(ebp+8) *(ebp+0xc))
15118 3d/compare-eax-and -1/imm32
15119 75/jump-if-!= $pos-or-insert-slice:end/disp8
15120 $pos-or-insert-slice:insert:
15121
15122 68/push 0/imm32
15123 68/push 0/imm32
15124 89/<- %eax 4/r32/esp
15125 (slice-to-string Heap *(ebp+0xc) %eax)
15126
15127 (lookup *eax *(eax+4))
15128 (write-int *(ebp+8) %eax)
15129 (pos-slice *(ebp+8) *(ebp+0xc))
15130 $pos-or-insert-slice:end:
15131
15132 81 0/subop/add %esp 8/imm32
15133
15134 89/<- %esp 5/r32/ebp
15135 5d/pop-to-ebp
15136 c3/return
15137
15138
15139
15140 pos-slice:
15141
15142 55/push-ebp
15143 89/<- %ebp 4/r32/esp
15144
15145 51/push-ecx
15146 52/push-edx
15147 53/push-ebx
15148 56/push-esi
15149
15150
15151
15152
15153
15154 8b/-> *(ebp+8) 6/r32/esi
15155
15156 b9/copy-to-ecx 0/imm32
15157
15158 8d/copy-address *(esi+0xc) 2/r32/edx
15159
15160 8b/-> *esi 3/r32/ebx
15161 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
15162 {
15163
15164
15165
15166
15167
15168 39/compare %edx 3/r32/ebx
15169 b8/copy-to-eax -1/imm32
15170 73/jump-if-addr>= $pos-slice:end/disp8
15171
15172 (slice-equal? *(ebp+0xc) *edx)
15173 3d/compare-eax-and 0/imm32/false
15174 75/jump-if-!= break/disp8
15175
15176 41/increment-ecx
15177
15178 81 0/subop/add %edx 4/imm32
15179
15180 eb/jump loop/disp8
15181 }
15182
15183 89/<- %eax 1/r32/ecx
15184 $pos-slice:end:
15185
15186
15187
15188
15189 5e/pop-to-esi
15190 5b/pop-to-ebx
15191 5a/pop-to-edx
15192 59/pop-to-ecx
15193
15194 89/<- %esp 5/r32/ebp
15195 5d/pop-to-ebp
15196 c3/return
15197
15198 test-parse-var-with-type:
15199
15200 55/push-ebp
15201 89/<- %ebp 4/r32/esp
15202
15203 8b/-> *Primitive-type-ids 0/r32/eax
15204 89/<- *Type-id 0/r32/eax
15205
15206 b8/copy-to-eax "x:"/imm32
15207 8b/-> *eax 1/r32/ecx
15208 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15209 05/add-to-eax 4/imm32
15210
15211 51/push-ecx
15212 50/push-eax
15213 89/<- %ecx 4/r32/esp
15214
15215 (clear-stream _test-input-stream)
15216 (write _test-input-stream "int")
15217
15218 68/push 0/imm32
15219 68/push 0/imm32
15220 89/<- %edx 4/r32/esp
15221
15222 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
15223
15224 (lookup *edx *(edx+4))
15225 89/<- %edx 0/r32/eax
15226
15227 (lookup *edx *(edx+4))
15228 (check-strings-equal %eax "x" "F - test-parse-var-with-type/name")
15229
15230 (lookup *(edx+8) *(edx+0xc))
15231 (check-ints-equal *eax 1 "F - test-parse-var-with-type/type:0")
15232 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type/type:1")
15233 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type/type:2")
15234
15235 89/<- %esp 5/r32/ebp
15236 5d/pop-to-ebp
15237 c3/return
15238
15239 test-parse-var-with-type-and-register:
15240
15241 55/push-ebp
15242 89/<- %ebp 4/r32/esp
15243
15244 8b/-> *Primitive-type-ids 0/r32/eax
15245 89/<- *Type-id 0/r32/eax
15246
15247 b8/copy-to-eax "x/eax:"/imm32
15248 8b/-> *eax 1/r32/ecx
15249 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15250 05/add-to-eax 4/imm32
15251
15252 51/push-ecx
15253 50/push-eax
15254 89/<- %ecx 4/r32/esp
15255
15256 (clear-stream _test-input-stream)
15257 (write _test-input-stream "int")
15258
15259 68/push 0/imm32
15260 68/push 0/imm32
15261 89/<- %edx 4/r32/esp
15262
15263 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
15264
15265 (lookup *edx *(edx+4))
15266 89/<- %edx 0/r32/eax
15267
15268 (lookup *edx *(edx+4))
15269 (check-strings-equal %eax "x" "F - test-parse-var-with-type-and-register/name")
15270
15271 (lookup *(edx+0x18) *(edx+0x1c))
15272 (check-strings-equal %eax "eax" "F - test-parse-var-with-type-and-register/register")
15273
15274 (lookup *(edx+8) *(edx+0xc))
15275 (check-ints-equal *eax 1 "F - test-parse-var-with-type-and-register/type:0")
15276 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type-and-register/type:1")
15277 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type-and-register/type:2")
15278
15279 89/<- %esp 5/r32/ebp
15280 5d/pop-to-ebp
15281 c3/return
15282
15283 test-parse-var-with-trailing-characters:
15284
15285 55/push-ebp
15286 89/<- %ebp 4/r32/esp
15287
15288 8b/-> *Primitive-type-ids 0/r32/eax
15289 89/<- *Type-id 0/r32/eax
15290
15291 b8/copy-to-eax "x:"/imm32
15292 8b/-> *eax 1/r32/ecx
15293 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15294 05/add-to-eax 4/imm32
15295
15296 51/push-ecx
15297 50/push-eax
15298 89/<- %ecx 4/r32/esp
15299
15300 (clear-stream _test-input-stream)
15301 (write _test-input-stream "int,")
15302
15303 68/push 0/imm32
15304 68/push 0/imm32
15305 89/<- %edx 4/r32/esp
15306
15307 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
15308
15309 (lookup *edx *(edx+4))
15310 89/<- %edx 0/r32/eax
15311
15312 (lookup *edx *(edx+4))
15313 (check-strings-equal %eax "x" "F - test-parse-var-with-trailing-characters/name")
15314
15315 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-trailing-characters/register")
15316
15317 (lookup *(edx+8) *(edx+0xc))
15318 (check-ints-equal *eax 1 "F - test-parse-var-with-trailing-characters/type:0")
15319 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-trailing-characters/type:1")
15320 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-trailing-characters/type:1")
15321
15322 89/<- %esp 5/r32/ebp
15323 5d/pop-to-ebp
15324 c3/return
15325
15326 test-parse-var-with-register-and-trailing-characters:
15327
15328 55/push-ebp
15329 89/<- %ebp 4/r32/esp
15330
15331 8b/-> *Primitive-type-ids 0/r32/eax
15332 89/<- *Type-id 0/r32/eax
15333
15334 b8/copy-to-eax "x/eax:"/imm32
15335 8b/-> *eax 1/r32/ecx
15336 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15337 05/add-to-eax 4/imm32
15338
15339 51/push-ecx
15340 50/push-eax
15341 89/<- %ecx 4/r32/esp
15342
15343 (clear-stream _test-input-stream)
15344 (write _test-input-stream "int,")
15345
15346 68/push 0/imm32
15347 68/push 0/imm32
15348 89/<- %edx 4/r32/esp
15349
15350 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
15351
15352 (lookup *edx *(edx+4))
15353 89/<- %edx 0/r32/eax
15354
15355 (lookup *edx *(edx+4))
15356 (check-strings-equal %eax "x" "F - test-parse-var-with-register-and-trailing-characters/name")
15357
15358 (lookup *(edx+0x18) *(edx+0x1c))
15359 (check-strings-equal %eax "eax" "F - test-parse-var-with-register-and-trailing-characters/register")
15360
15361 (lookup *(edx+8) *(edx+0xc))
15362 (check-ints-equal *eax 1 "F - test-parse-var-with-register-and-trailing-characters/type:0")
15363 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-register-and-trailing-characters/type:1")
15364 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-register-and-trailing-characters/type:2")
15365
15366 89/<- %esp 5/r32/ebp
15367 5d/pop-to-ebp
15368 c3/return
15369
15370 test-parse-var-with-compound-type:
15371
15372 55/push-ebp
15373 89/<- %ebp 4/r32/esp
15374
15375 8b/-> *Primitive-type-ids 0/r32/eax
15376 89/<- *Type-id 0/r32/eax
15377
15378 b8/copy-to-eax "x:"/imm32
15379 8b/-> *eax 1/r32/ecx
15380 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15381 05/add-to-eax 4/imm32
15382
15383 51/push-ecx
15384 50/push-eax
15385 89/<- %ecx 4/r32/esp
15386
15387 (clear-stream _test-input-stream)
15388 (write _test-input-stream "(addr int)")
15389
15390 68/push 0/imm32
15391 68/push 0/imm32
15392 89/<- %edx 4/r32/esp
15393
15394 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
15395
15396 (lookup *edx *(edx+4))
15397 89/<- %edx 0/r32/eax
15398
15399 (lookup *edx *(edx+4))
15400 (check-strings-equal %eax "x" "F - test-parse-var-with-compound-type/name")
15401
15402 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-compound-type/register")
15403
15404
15405 (lookup *(edx+8) *(edx+0xc))
15406 89/<- %edx 0/r32/eax
15407
15408 (check-ints-equal *edx 0 "F - test-parse-var-with-compound-type/type:0")
15409
15410 (lookup *(edx+4) *(edx+8))
15411 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:1")
15412 (check-ints-equal *(eax+4) 2 "F - test-parse-var-with-compound-type/type:2")
15413
15414 (lookup *(edx+0xc) *(edx+0x10))
15415 (lookup *(eax+4) *(eax+8))
15416 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:3")
15417 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-compound-type/type:4")
15418
15419 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-compound-type/type:5")
15420
15421 89/<- %esp 5/r32/ebp
15422 5d/pop-to-ebp
15423 c3/return
15424
15425
15426
15427
15428 is-identifier?:
15429
15430 55/push-ebp
15431 89/<- %ebp 4/r32/esp
15432
15433 (slice-empty? *(ebp+8))
15434 3d/compare-eax-and 0/imm32/false
15435 75/jump-if-!= $is-identifier?:false/disp8
15436
15437 8b/-> *(ebp+8) 0/r32/eax
15438 8b/-> *eax 0/r32/eax
15439 8a/copy-byte *eax 0/r32/AL
15440 81 4/subop/and %eax 0xff/imm32
15441
15442 3d/compare-eax-and 0x24/imm32/$
15443 74/jump-if-= $is-identifier?:true/disp8
15444
15445 3d/compare-eax-and 0x5f/imm32/_
15446 74/jump-if-= $is-identifier?:true/disp8
15447
15448 25/and-eax-with 0x5f/imm32
15449
15450 3d/compare-eax-and 0x41/imm32/A
15451 7c/jump-if-< $is-identifier?:false/disp8
15452
15453 3d/compare-eax-and 0x5a/imm32/Z
15454 7f/jump-if-> $is-identifier?:false/disp8
15455
15456 $is-identifier?:true:
15457 b8/copy-to-eax 1/imm32/true
15458 eb/jump $is-identifier?:end/disp8
15459 $is-identifier?:false:
15460 b8/copy-to-eax 0/imm32/false
15461 $is-identifier?:end:
15462
15463 89/<- %esp 5/r32/ebp
15464 5d/pop-to-ebp
15465 c3/return
15466
15467 test-is-identifier-dollar:
15468
15469 55/push-ebp
15470 89/<- %ebp 4/r32/esp
15471
15472 b8/copy-to-eax "$a"/imm32
15473 8b/-> *eax 1/r32/ecx
15474 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15475 05/add-to-eax 4/imm32
15476
15477 51/push-ecx
15478 50/push-eax
15479 89/<- %ecx 4/r32/esp
15480
15481 (is-identifier? %ecx)
15482 (check-ints-equal %eax 1 "F - test-is-identifier-dollar")
15483
15484 89/<- %esp 5/r32/ebp
15485 5d/pop-to-ebp
15486 c3/return
15487
15488 test-is-identifier-underscore:
15489
15490 55/push-ebp
15491 89/<- %ebp 4/r32/esp
15492
15493 b8/copy-to-eax "_a"/imm32
15494 8b/-> *eax 1/r32/ecx
15495 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15496 05/add-to-eax 4/imm32
15497
15498 51/push-ecx
15499 50/push-eax
15500 89/<- %ecx 4/r32/esp
15501
15502 (is-identifier? %ecx)
15503 (check-ints-equal %eax 1 "F - test-is-identifier-underscore")
15504
15505 89/<- %esp 5/r32/ebp
15506 5d/pop-to-ebp
15507 c3/return
15508
15509 test-is-identifier-a:
15510
15511 55/push-ebp
15512 89/<- %ebp 4/r32/esp
15513
15514 b8/copy-to-eax "a$"/imm32
15515 8b/-> *eax 1/r32/ecx
15516 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15517 05/add-to-eax 4/imm32
15518
15519 51/push-ecx
15520 50/push-eax
15521 89/<- %ecx 4/r32/esp
15522
15523 (is-identifier? %ecx)
15524 (check-ints-equal %eax 1 "F - test-is-identifier-a")
15525
15526 89/<- %esp 5/r32/ebp
15527 5d/pop-to-ebp
15528 c3/return
15529
15530 test-is-identifier-z:
15531
15532 55/push-ebp
15533 89/<- %ebp 4/r32/esp
15534
15535 b8/copy-to-eax "z$"/imm32
15536 8b/-> *eax 1/r32/ecx
15537 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15538 05/add-to-eax 4/imm32
15539
15540 51/push-ecx
15541 50/push-eax
15542 89/<- %ecx 4/r32/esp
15543
15544 (is-identifier? %ecx)
15545 (check-ints-equal %eax 1 "F - test-is-identifier-z")
15546
15547 89/<- %esp 5/r32/ebp
15548 5d/pop-to-ebp
15549 c3/return
15550
15551 test-is-identifier-A:
15552
15553 55/push-ebp
15554 89/<- %ebp 4/r32/esp
15555
15556 b8/copy-to-eax "A$"/imm32
15557 8b/-> *eax 1/r32/ecx
15558 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15559 05/add-to-eax 4/imm32
15560
15561 51/push-ecx
15562 50/push-eax
15563 89/<- %ecx 4/r32/esp
15564
15565 (is-identifier? %ecx)
15566 (check-ints-equal %eax 1 "F - test-is-identifier-A")
15567
15568 89/<- %esp 5/r32/ebp
15569 5d/pop-to-ebp
15570 c3/return
15571
15572 test-is-identifier-Z:
15573
15574 55/push-ebp
15575 89/<- %ebp 4/r32/esp
15576
15577 b8/copy-to-eax "Z$"/imm32
15578 8b/-> *eax 1/r32/ecx
15579 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15580 05/add-to-eax 4/imm32
15581
15582 51/push-ecx
15583 50/push-eax
15584 89/<- %ecx 4/r32/esp
15585
15586 (is-identifier? %ecx)
15587 (check-ints-equal %eax 1 "F - test-is-identifier-Z")
15588
15589 89/<- %esp 5/r32/ebp
15590 5d/pop-to-ebp
15591 c3/return
15592
15593 test-is-identifier-at:
15594
15595
15596 55/push-ebp
15597 89/<- %ebp 4/r32/esp
15598
15599 b8/copy-to-eax "@a"/imm32
15600 8b/-> *eax 1/r32/ecx
15601 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15602 05/add-to-eax 4/imm32
15603
15604 51/push-ecx
15605 50/push-eax
15606 89/<- %ecx 4/r32/esp
15607
15608 (is-identifier? %ecx)
15609 (check-ints-equal %eax 0 "F - test-is-identifier-@")
15610
15611 89/<- %esp 5/r32/ebp
15612 5d/pop-to-ebp
15613 c3/return
15614
15615 test-is-identifier-square-bracket:
15616
15617
15618 55/push-ebp
15619 89/<- %ebp 4/r32/esp
15620
15621 b8/copy-to-eax "[a"/imm32
15622 8b/-> *eax 1/r32/ecx
15623 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15624 05/add-to-eax 4/imm32
15625
15626 51/push-ecx
15627 50/push-eax
15628 89/<- %ecx 4/r32/esp
15629
15630 (is-identifier? %ecx)
15631 (check-ints-equal %eax 0 "F - test-is-identifier-@")
15632
15633 89/<- %esp 5/r32/ebp
15634 5d/pop-to-ebp
15635 c3/return
15636
15637 test-is-identifier-backtick:
15638
15639
15640 55/push-ebp
15641 89/<- %ebp 4/r32/esp
15642
15643 b8/copy-to-eax "`a"/imm32
15644 8b/-> *eax 1/r32/ecx
15645 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15646 05/add-to-eax 4/imm32
15647
15648 51/push-ecx
15649 50/push-eax
15650 89/<- %ecx 4/r32/esp
15651
15652 (is-identifier? %ecx)
15653 (check-ints-equal %eax 0 "F - test-is-identifier-backtick")
15654
15655 89/<- %esp 5/r32/ebp
15656 5d/pop-to-ebp
15657 c3/return
15658
15659 test-is-identifier-curly-brace-open:
15660
15661
15662 55/push-ebp
15663 89/<- %ebp 4/r32/esp
15664
15665 b8/copy-to-eax "{a"/imm32
15666 8b/-> *eax 1/r32/ecx
15667 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15668 05/add-to-eax 4/imm32
15669
15670 51/push-ecx
15671 50/push-eax
15672 89/<- %ecx 4/r32/esp
15673
15674 (is-identifier? %ecx)
15675 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-open")
15676
15677 89/<- %esp 5/r32/ebp
15678 5d/pop-to-ebp
15679 c3/return
15680
15681 test-is-identifier-curly-brace-close:
15682
15683 55/push-ebp
15684 89/<- %ebp 4/r32/esp
15685
15686 b8/copy-to-eax "}a"/imm32
15687 8b/-> *eax 1/r32/ecx
15688 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15689 05/add-to-eax 4/imm32
15690
15691 51/push-ecx
15692 50/push-eax
15693 89/<- %ecx 4/r32/esp
15694
15695 (is-identifier? %ecx)
15696 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-close")
15697
15698 89/<- %esp 5/r32/ebp
15699 5d/pop-to-ebp
15700 c3/return
15701
15702 test-is-identifier-hyphen:
15703
15704
15705 55/push-ebp
15706 89/<- %ebp 4/r32/esp
15707
15708 b8/copy-to-eax "-a"/imm32
15709 8b/-> *eax 1/r32/ecx
15710 8d/copy-address *(eax+ecx+4) 1/r32/ecx
15711 05/add-to-eax 4/imm32
15712
15713 51/push-ecx
15714 50/push-eax
15715 89/<- %ecx 4/r32/esp
15716
15717 (is-identifier? %ecx)
15718 (check-ints-equal %eax 0 "F - test-is-identifier-hyphen")
15719
15720 89/<- %esp 5/r32/ebp
15721 5d/pop-to-ebp
15722 c3/return
15723
15724 populate-mu-function-body:
15725
15726 55/push-ebp
15727 89/<- %ebp 4/r32/esp
15728
15729 50/push-eax
15730 56/push-esi
15731 57/push-edi
15732
15733 8b/-> *(ebp+8) 6/r32/esi
15734
15735 8b/-> *(ebp+0xc) 7/r32/edi
15736
15737 c7 0/subop/copy *Curr-block-depth 1/imm32
15738
15739 8d/copy-address *(edi+0x18) 0/r32/eax
15740 (parse-mu-block %esi *(ebp+0x10) %edi %eax *(ebp+0x14) *(ebp+0x18))
15741 $populate-mu-function-body:end:
15742
15743 5f/pop-to-edi
15744 5e/pop-to-esi
15745 58/pop-to-eax
15746
15747 89/<- %esp 5/r32/ebp
15748 5d/pop-to-ebp
15749 c3/return
15750
15751
15752 parse-mu-block:
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790 55/push-ebp
15791 89/<- %ebp 4/r32/esp
15792
15793 50/push-eax
15794 51/push-ecx
15795 52/push-edx
15796 53/push-ebx
15797 57/push-edi
15798
15799 81 5/subop/subtract %esp 0x200/imm32
15800 68/push 0x200/imm32/size
15801 68/push 0/imm32/read
15802 68/push 0/imm32/write
15803 89/<- %ecx 4/r32/esp
15804
15805 68/push 0/imm32/end
15806 68/push 0/imm32/start
15807 89/<- %edx 4/r32/esp
15808
15809 (allocate Heap *Stmt-size *(ebp+0x14))
15810
15811 8b/-> *(ebp+0x14) 7/r32/edi
15812 (lookup *edi *(edi+4))
15813 89/<- %edi 0/r32/eax
15814
15815
15816 8d/copy-address *(edi+0xc) 0/r32/eax
15817 (new-block-name *(ebp+0x10) %eax)
15818
15819 (push *(ebp+0xc) *(edi+0xc))
15820 (push *(ebp+0xc) *(edi+0x10))
15821 (push *(ebp+0xc) 0)
15822
15823 ff 0/subop/increment *Curr-block-depth
15824 {
15825 $parse-mu-block:line-loop:
15826
15827 (clear-stream %ecx)
15828 (read-line-buffered *(ebp+8) %ecx)
15829
15830
15831
15832
15833
15834
15835 81 7/subop/compare *ecx 0/imm32
15836 0f 84/jump-if-= break/disp32
15837
15838
15839
15840 (next-mu-token %ecx %edx)
15841
15842
15843
15844
15845
15846 (slice-empty? %edx)
15847 3d/compare-eax-and 0/imm32/false
15848 0f 85/jump-if-!= loop/disp32
15849
15850
15851 8b/-> *edx 0/r32/eax
15852 8a/copy-byte *eax 0/r32/AL
15853 81 4/subop/and %eax 0xff/imm32
15854
15855 3d/compare-eax-and 0x23/imm32/hash
15856 0f 84/jump-if-= loop/disp32
15857
15858 {
15859 $parse-mu-block:check-for-block:
15860 (slice-equal? %edx "{")
15861 3d/compare-eax-and 0/imm32/false
15862 74/jump-if-= break/disp8
15863 (check-no-tokens-left %ecx)
15864
15865
15866 68/push 0/imm32
15867 68/push 0/imm32
15868 89/<- %eax 4/r32/esp
15869
15870 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
15871 (append-to-block Heap %edi *eax *(eax+4))
15872
15873 81 0/subop/add %esp 8/imm32
15874
15875 e9/jump $parse-mu-block:line-loop/disp32
15876 }
15877
15878 $parse-mu-block:check-for-end:
15879 (slice-equal? %edx "}")
15880 3d/compare-eax-and 0/imm32/false
15881 0f 85/jump-if-!= break/disp32
15882
15883 {
15884 $parse-mu-block:check-for-named-block:
15885
15886 8b/-> *(edx+4) 0/r32/eax
15887 48/decrement-eax
15888 8a/copy-byte *eax 0/r32/AL
15889 81 4/subop/and %eax 0xff/imm32
15890
15891 3d/compare-eax-and 0x3a/imm32/colon
15892 0f 85/jump-if-!= break/disp32
15893
15894
15895
15896 ff 1/subop/decrement *(edx+4)
15897
15898 68/push 0/imm32
15899 68/push 0/imm32
15900 89/<- %eax 4/r32/esp
15901
15902 (parse-mu-named-block %edx *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
15903 (append-to-block Heap %edi *eax *(eax+4))
15904
15905 81 0/subop/add %esp 8/imm32
15906
15907 e9/jump $parse-mu-block:line-loop/disp32
15908 }
15909
15910 {
15911 $parse-mu-block:check-for-var:
15912 (slice-equal? %edx "var")
15913 3d/compare-eax-and 0/imm32/false
15914 74/jump-if-= break/disp8
15915
15916 68/push 0/imm32
15917 68/push 0/imm32
15918 89/<- %eax 4/r32/esp
15919
15920 (parse-mu-var-def %ecx *(ebp+0xc) %eax *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
15921 (append-to-block Heap %edi *eax *(eax+4))
15922
15923 81 0/subop/add %esp 8/imm32
15924
15925 e9/jump $parse-mu-block:line-loop/disp32
15926 }
15927 $parse-mu-block:regular-stmt:
15928
15929
15930 68/push 0/imm32
15931 68/push 0/imm32
15932 89/<- %eax 4/r32/esp
15933
15934 (parse-mu-stmt %ecx *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
15935 (append-to-block Heap %edi *eax *(eax+4))
15936
15937 81 0/subop/add %esp 8/imm32
15938
15939 e9/jump loop/disp32
15940 }
15941 (clean-up-blocks *(ebp+0xc) *Curr-block-depth *(ebp+0x10))
15942
15943 ff 1/subop/decrement *Curr-block-depth
15944
15945 (pop *(ebp+0xc))
15946 (pop *(ebp+0xc))
15947 (pop *(ebp+0xc))
15948 $parse-mu-block:end:
15949
15950 81 0/subop/add %esp 0x214/imm32
15951
15952 5f/pop-to-edi
15953 5b/pop-to-ebx
15954 5a/pop-to-edx
15955 59/pop-to-ecx
15956 58/pop-to-eax
15957
15958 89/<- %esp 5/r32/ebp
15959 5d/pop-to-ebp
15960 c3/return
15961
15962 $parse-mu-block:abort:
15963
15964 (write-buffered *(ebp+0x18) "'{' or '}' should be on its own line, but got '")
15965 (rewind-stream %ecx)
15966 (write-stream-data *(ebp+0x18) %ecx)
15967 (write-buffered *(ebp+0x18) "'\n")
15968 (flush *(ebp+0x18))
15969 (stop *(ebp+0x1c) 1)
15970
15971
15972 new-block-name:
15973
15974 55/push-ebp
15975 89/<- %ebp 4/r32/esp
15976
15977 50/push-eax
15978 51/push-ecx
15979 52/push-edx
15980
15981 8b/-> *(ebp+8) 0/r32/eax
15982 (lookup *eax *(eax+4))
15983 8b/-> *eax 0/r32/eax
15984 05/add-to-eax 0xd/imm32
15985 89/<- %ecx 0/r32/eax
15986
15987 29/subtract-from %esp 1/r32/ecx
15988 ff 6/subop/push %ecx
15989 68/push 0/imm32/read
15990 68/push 0/imm32/write
15991 89/<- %edx 4/r32/esp
15992 (clear-stream %edx)
15993
15994 8b/-> *(ebp+8) 0/r32/eax
15995 (lookup *eax *(eax+4))
15996
15997 (write %edx "$")
15998 (write %edx %eax)
15999 (write %edx ":")
16000 (write-int32-hex %edx *Next-block-index)
16001 ff 0/subop/increment *Next-block-index
16002
16003
16004 8b/-> *edx 0/r32/eax
16005
16006 8d/copy-address *(edx+0xc) 2/r32/edx
16007
16008 01/add-to %eax 2/r32/edx
16009
16010 ff 6/subop/push %eax
16011 ff 6/subop/push %edx
16012 89/<- %eax 4/r32/esp
16013
16014 (new-literal Heap %eax *(ebp+0xc))
16015
16016
16017
16018
16019
16020
16021
16022 $new-block-name:end:
16023
16024 81 0/subop/add %ecx 0xc/imm32
16025 81 0/subop/add %ecx 8/imm32
16026 01/add-to %esp 1/r32/ecx
16027
16028 5a/pop-to-edx
16029 59/pop-to-ecx
16030 58/pop-to-eax
16031
16032 89/<- %esp 5/r32/ebp
16033 5d/pop-to-ebp
16034 c3/return
16035
16036 check-no-tokens-left:
16037
16038 55/push-ebp
16039 89/<- %ebp 4/r32/esp
16040
16041 50/push-eax
16042 51/push-ecx
16043
16044 68/push 0/imm32/end
16045 68/push 0/imm32/start
16046 89/<- %ecx 4/r32/esp
16047
16048 (next-mu-token *(ebp+8) %ecx)
16049
16050 (slice-empty? %ecx)
16051 3d/compare-eax-and 0/imm32/false
16052 75/jump-if-!= $check-no-tokens-left:end/disp8
16053
16054
16055 8b/-> *edx 0/r32/eax
16056 8a/copy-byte *eax 0/r32/AL
16057 81 4/subop/and %eax 0xff/imm32
16058
16059 3d/compare-eax-and 0x23/imm32/hash
16060 74/jump-if-= $check-no-tokens-left:end/disp8
16061
16062 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
16063 (rewind-stream %ecx)
16064 (write-stream 2 %ecx)
16065 (write-buffered Stderr "'\n")
16066 (flush Stderr)
16067
16068 bb/copy-to-ebx 1/imm32
16069 e8/call syscall_exit/disp32
16070
16071 $check-no-tokens-left:end:
16072
16073 81 0/subop/add %esp 8/imm32
16074
16075 59/pop-to-ecx
16076 58/pop-to-eax
16077
16078 89/<- %esp 5/r32/ebp
16079 5d/pop-to-ebp
16080 c3/return
16081
16082 parse-mu-named-block:
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093 55/push-ebp
16094 89/<- %ebp 4/r32/esp
16095
16096 50/push-eax
16097 51/push-ecx
16098 57/push-edi
16099
16100 68/push 0/imm32
16101 68/push 0/imm32
16102 89/<- %ecx 4/r32/esp
16103
16104 (new-literal Heap *(ebp+8) %ecx)
16105
16106 (push *(ebp+0x10) *ecx)
16107 (push *(ebp+0x10) *(ecx+4))
16108 (push *(ebp+0x10) 0)
16109
16110 (parse-mu-block *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20))
16111
16112 (pop *(ebp+0x10))
16113 (pop *(ebp+0x10))
16114 (pop *(ebp+0x10))
16115
16116 8b/-> *(ebp+0x18) 7/r32/edi
16117 (lookup *edi *(edi+4))
16118 89/<- %edi 0/r32/eax
16119
16120 c7 0/subop/copy *edi 0/imm32/block
16121
16122 8b/-> *ecx 0/r32/eax
16123 89/<- *(edi+0xc) 0/r32/eax
16124 8b/-> *(ecx+4) 0/r32/eax
16125 89/<- *(edi+0x10) 0/r32/eax
16126 $parse-mu-named-block:end:
16127
16128 81 0/subop/add %esp 8/imm32
16129
16130 5f/pop-to-edi
16131 59/pop-to-ecx
16132 58/pop-to-eax
16133
16134 89/<- %esp 5/r32/ebp
16135 5d/pop-to-ebp
16136 c3/return
16137
16138 parse-mu-var-def:
16139
16140 55/push-ebp
16141 89/<- %ebp 4/r32/esp
16142
16143 50/push-eax
16144 51/push-ecx
16145 52/push-edx
16146 53/push-ebx
16147 57/push-edi
16148
16149 8b/-> *(ebp+0x10) 7/r32/edi
16150
16151 68/push 0/imm32/end
16152 68/push 0/imm32/start
16153 89/<- %ecx 4/r32/esp
16154
16155 68/push 0/imm32
16156 68/push 0/imm32
16157 89/<- %edx 4/r32/esp
16158
16159 (next-mu-token *(ebp+8) %ecx)
16160 (parse-var-with-type %ecx *(ebp+8) %edx *(ebp+0x18) *(ebp+0x1c))
16161
16162 (lookup *edx *(edx+4))
16163
16164 8b/-> *Curr-block-depth 3/r32/ebx
16165 89/<- *(eax+0x10) 3/r32/ebx
16166
16167 8b/-> *(eax+0x18) 0/r32/eax
16168 3d/compare-eax-and 0/imm32
16169 {
16170 75/jump-if-!= break/disp8
16171
16172
16173 (next-mu-token *(ebp+8) %ecx)
16174 (slice-empty? %ecx)
16175 3d/compare-eax-and 0/imm32/false
16176 0f 84/jump-if-= $parse-mu-var-def:error2/disp32
16177
16178 (new-var-def Heap *edx *(edx+4) %edi)
16179 e9/jump $parse-mu-var-def:update-vars/disp32
16180 }
16181
16182 {
16183 0f 84/jump-if-= break/disp32
16184
16185
16186
16187 (next-mu-token *(ebp+8) %ecx)
16188 (slice-equal? %ecx "<-")
16189 3d/compare-eax-and 0/imm32/false
16190 0f 84/jump-if-= $parse-mu-var-def:error1/disp32
16191
16192 (new-reg-var-def Heap *edx *(edx+4) %edi)
16193 (lookup *edi *(edi+4))
16194 (add-operation-and-inputs-to-stmt %eax *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
16195 }
16196 $parse-mu-var-def:update-vars:
16197
16198 (push *(ebp+0xc) *edx)
16199 (push *(ebp+0xc) *(edx+4))
16200 (push *(ebp+0xc) 0)
16201 $parse-mu-var-def:end:
16202
16203 81 0/subop/add %esp 0x10/imm32
16204
16205 5f/pop-to-edi
16206 5b/pop-to-ebx
16207 5a/pop-to-edx
16208 59/pop-to-ecx
16209 58/pop-to-eax
16210
16211 89/<- %esp 5/r32/ebp
16212 5d/pop-to-ebp
16213 c3/return
16214
16215 $parse-mu-var-def:error1:
16216 (rewind-stream *(ebp+8))
16217
16218 (write-buffered *(ebp+0x18) "register variable requires a valid instruction to initialize but got '")
16219 (flush *(ebp+0x18))
16220 (write-stream-data *(ebp+0x18) *(ebp+8))
16221 (write-buffered *(ebp+0x18) "'\n")
16222 (flush *(ebp+0x18))
16223 (stop *(ebp+0x1c) 1)
16224
16225
16226 $parse-mu-var-def:error2:
16227 (rewind-stream *(ebp+8))
16228
16229 (write-buffered *(ebp+0x18) "fn ")
16230 8b/-> *(ebp+0x14) 0/r32/eax
16231 (lookup *eax *(eax+4))
16232 (write-buffered *(ebp+0x18) %eax)
16233 (write-buffered *(ebp+0x18) ": var ")
16234
16235 (lookup *edx *(edx+4))
16236 (lookup *eax *(eax+4))
16237 (write-buffered *(ebp+0x18) %eax)
16238 (write-buffered *(ebp+0x18) ": variables on the stack can't take an initializer\n")
16239 (flush *(ebp+0x18))
16240 (stop *(ebp+0x1c) 1)
16241
16242
16243 test-parse-mu-var-def:
16244
16245
16246 55/push-ebp
16247 89/<- %ebp 4/r32/esp
16248
16249 8b/-> *Primitive-type-ids 0/r32/eax
16250 89/<- *Type-id 0/r32/eax
16251 (clear-stream _test-input-stream)
16252 (write _test-input-stream "n: int\n")
16253 c7 0/subop/copy *Curr-block-depth 1/imm32
16254
16255 68/push 0/imm32
16256 68/push 0/imm32
16257 89/<- %esi 4/r32/esp
16258
16259 81 5/subop/subtract %esp 0xc0/imm32
16260 68/push 0xc0/imm32/size
16261 68/push 0/imm32/top
16262 89/<- %ecx 4/r32/esp
16263 (clear-stack %ecx)
16264
16265 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
16266
16267 (lookup *esi *(esi+4))
16268 89/<- %esi 0/r32/eax
16269
16270 (check-ints-equal *esi 2 "F - test-parse-mu-var-def/tag")
16271
16272 (lookup *(esi+4) *(esi+8))
16273 89/<- %ecx 0/r32/eax
16274
16275 (lookup *ecx *(ecx+4))
16276 (check-strings-equal %eax "n" "F - test-parse-mu-var-def/var-name")
16277
16278 (check-ints-equal *(ecx+0x18) 0 "F - test-parse-mu-var-def/var-register")
16279
16280 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-var-def/output-block-depth")
16281
16282 (lookup *(ecx+8) *(ecx+0xc))
16283 (check-ints-equal *eax 1 "F - test-parse-mu-var-def/var-type:0")
16284 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-var-def/var-type:1")
16285 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-var-def/var-type:2")
16286
16287 89/<- %esp 5/r32/ebp
16288 5d/pop-to-ebp
16289 c3/return
16290
16291 test-parse-mu-reg-var-def:
16292
16293
16294 55/push-ebp
16295 89/<- %ebp 4/r32/esp
16296
16297 8b/-> *Primitive-type-ids 0/r32/eax
16298 89/<- *Type-id 0/r32/eax
16299 (clear-stream _test-input-stream)
16300 (write _test-input-stream "n/eax: int <- copy 0\n")
16301 c7 0/subop/copy *Curr-block-depth 1/imm32
16302
16303 68/push 0/imm32
16304 68/push 0/imm32
16305 89/<- %esi 4/r32/esp
16306
16307 81 5/subop/subtract %esp 0xc0/imm32
16308 68/push 0xc0/imm32/size
16309 68/push 0/imm32/top
16310 89/<- %ecx 4/r32/esp
16311 (clear-stack %ecx)
16312
16313 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
16314
16315 (lookup *esi *(esi+4))
16316 89/<- %esi 0/r32/eax
16317
16318 (check-ints-equal *esi 3 "F - test-parse-mu-reg-var-def/tag")
16319
16320
16321 (lookup *(esi+0x14) *(esi+0x18))
16322
16323 (check-ints-equal *(eax+8) 0 "F - test-parse-mu-reg-var-def/single-output")
16324
16325 (lookup *eax *(eax+4))
16326
16327 89/<- %ecx 0/r32/eax
16328
16329 (lookup *ecx *(ecx+4))
16330 (check-strings-equal %eax "n" "F - test-parse-mu-reg-var-def/output-name")
16331
16332 (lookup *(ecx+0x18) *(ecx+0x1c))
16333 (check-strings-equal %eax "eax" "F - test-parse-mu-reg-var-def/output-register")
16334
16335 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-reg-var-def/output-block-depth")
16336
16337 (lookup *(ecx+8) *(ecx+0xc))
16338 (check-ints-equal *eax 1 "F - test-parse-mu-reg-var-def/output-type:0")
16339 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-reg-var-def/output-type:1")
16340 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-reg-var-def/output-type:2")
16341
16342 89/<- %esp 5/r32/ebp
16343 5d/pop-to-ebp
16344 c3/return
16345
16346 parse-mu-stmt:
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362 55/push-ebp
16363 89/<- %ebp 4/r32/esp
16364
16365 50/push-eax
16366 51/push-ecx
16367 52/push-edx
16368 53/push-ebx
16369 57/push-edi
16370
16371 68/push 0/imm32/end
16372 68/push 0/imm32/start
16373 89/<- %ecx 4/r32/esp
16374
16375 ba/copy-to-edx 0/imm32/false
16376
16377 68/push 0/imm32
16378 68/push 0/imm32
16379 89/<- %ebx 4/r32/esp
16380
16381 (allocate Heap *Stmt-size *(ebp+0x14))
16382
16383 8b/-> *(ebp+0x14) 7/r32/edi
16384 (lookup *edi *(edi+4))
16385 89/<- %edi 0/r32/eax
16386
16387 c7 0/subop/copy *edi 1/imm32/stmt1
16388 {
16389 (stmt-has-outputs? *(ebp+8))
16390 3d/compare-eax-and 0/imm32/false
16391 0f 84/jump-if-= break/disp32
16392 {
16393 $parse-mu-stmt:read-outputs:
16394
16395 (next-mu-token *(ebp+8) %ecx)
16396
16397 (slice-empty? %ecx)
16398 3d/compare-eax-and 0/imm32/false
16399 0f 85/jump-if-!= break/disp32
16400
16401 (slice-equal? %ecx "<-")
16402 3d/compare-eax-and 0/imm32/false
16403 0f 85/jump-if-!= break/disp32
16404
16405 ba/copy-to-edx 0/imm32/false
16406
16407 8b/-> *ecx 0/r32/eax
16408 8a/copy-byte *eax 0/r32/AL
16409 81 4/subop/and %eax 0xff/imm32
16410 3d/compare-eax-and 0x2a/imm32/asterisk
16411 {
16412 75/jump-if-!= break/disp8
16413 ff 0/subop/increment *ecx
16414 ba/copy-to-edx 1/imm32/true
16415 }
16416
16417 (is-identifier? %ecx)
16418 3d/compare-eax-and 0/imm32/false
16419 0f 84/jump-if-= $parse-mu-stmt:abort/disp32
16420
16421 (lookup-var %ecx *(ebp+0xc) %ebx *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
16422 8d/copy-address *(edi+0x14) 0/r32/eax
16423 (append-stmt-var Heap *ebx *(ebx+4) *(edi+0x14) *(edi+0x18) %edx %eax)
16424
16425 e9/jump loop/disp32
16426 }
16427 }
16428 (add-operation-and-inputs-to-stmt %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
16429 $parse-mu-stmt:end:
16430
16431 81 0/subop/add %esp 0x10/imm32
16432
16433 5f/pop-to-edi
16434 5b/pop-to-ebx
16435 5a/pop-to-edx
16436 59/pop-to-ecx
16437 58/pop-to-eax
16438
16439 89/<- %esp 5/r32/ebp
16440 5d/pop-to-ebp
16441 c3/return
16442
16443 $parse-mu-stmt:abort:
16444
16445 (write-buffered *(ebp+0x18) "invalid identifier '")
16446 (write-slice-buffered *(ebp+0x18) %ecx)
16447 (write-buffered *(ebp+0x18) "'\n")
16448 (flush *(ebp+0x18))
16449 (stop *(ebp+0x1c) 1)
16450
16451
16452 add-operation-and-inputs-to-stmt:
16453
16454
16455
16456
16457
16458
16459
16460
16461 55/push-ebp
16462 89/<- %ebp 4/r32/esp
16463
16464 50/push-eax
16465 51/push-ecx
16466 52/push-edx
16467 53/push-ebx
16468 56/push-esi
16469 57/push-edi
16470
16471 8b/-> *(ebp+8) 7/r32/edi
16472
16473 68/push 0/imm32/end
16474 68/push 0/imm32/start
16475 89/<- %ecx 4/r32/esp
16476
16477 ba/copy-to-edx 0/imm32/false
16478
16479 68/push 0/imm32
16480 68/push 0/imm32
16481 89/<- %esi 4/r32/esp
16482 $add-operation-and-inputs-to-stmt:read-operation:
16483 (next-mu-token *(ebp+0xc) %ecx)
16484 8d/copy-address *(edi+4) 0/r32/eax
16485 (slice-to-string Heap %ecx %eax)
16486
16487 (slice-equal? %ecx "get")
16488 89/<- %ebx 0/r32/eax
16489 {
16490 $add-operation-and-inputs-to-stmt:read-inouts:
16491
16492 (next-mu-token *(ebp+0xc) %ecx)
16493
16494 (slice-empty? %ecx)
16495 3d/compare-eax-and 0/imm32/false
16496 0f 85/jump-if-!= break/disp32
16497
16498 (slice-equal? %ecx "<-")
16499 3d/compare-eax-and 0/imm32/false
16500 0f 85/jump-if-!= $add-operation-and-inputs-to-stmt:abort/disp32
16501
16502 {
16503 81 7/subop/compare %ebx 0/imm32/false
16504 74/jump-if-= break/disp8
16505 (lookup *(edi+0xc) *(edi+0x10))
16506 3d/compare-eax-and 0/imm32
16507 74/jump-if-= break/disp8
16508 (lookup-or-create-constant %eax %ecx %esi)
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519 e9/jump $add-operation-and-inputs-to-stmt:save-var/disp32
16520 }
16521
16522 ba/copy-to-edx 0/imm32/false
16523
16524 8b/-> *ecx 0/r32/eax
16525 8a/copy-byte *eax 0/r32/AL
16526 81 4/subop/and %eax 0xff/imm32
16527 3d/compare-eax-and 0x2a/imm32/asterisk
16528 {
16529 75/jump-if-!= break/disp8
16530 $add-operation-and-inputs-to-stmt:inout-is-deref:
16531 ff 0/subop/increment *ecx
16532 ba/copy-to-edx 1/imm32/true
16533 }
16534 (lookup-var-or-literal %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
16535
16536 81 7/subop/compare %edx 0/imm32/false
16537 {
16538 74/jump-if-= break/disp8
16539
16540 (lookup *esi *(esi+4))
16541 81 7/subop/compare *(eax+0x18) 0/imm32
16542 0f 84/jump-if-= $add-operation-and-inputs-to-stmt:error-deref-on-stack/disp32
16543
16544 (lookup *(eax+8) *(eax+0xc))
16545 (is-mu-addr-type? %eax)
16546 3d/compare-eax-and 0/imm32/false
16547 0f 84/jump-if-= $add-operation-and-inputs-to-stmt:error-deref-non-addr/disp32
16548 }
16549 $add-operation-and-inputs-to-stmt:save-var:
16550 8d/copy-address *(edi+0xc) 0/r32/eax
16551 (append-stmt-var Heap *esi *(esi+4) *(edi+0xc) *(edi+0x10) %edx %eax)
16552
16553 e9/jump loop/disp32
16554 }
16555 $add-operation-and-inputs-to-stmt:end:
16556
16557 81 0/subop/add %esp 0x10/imm32
16558
16559 5f/pop-to-edi
16560 5e/pop-to-esi
16561 5b/pop-to-ebx
16562 5a/pop-to-edx
16563 59/pop-to-ecx
16564 58/pop-to-eax
16565
16566 89/<- %esp 5/r32/ebp
16567 5d/pop-to-ebp
16568 c3/return
16569
16570 $add-operation-and-inputs-to-stmt:abort:
16571
16572 (write-buffered *(ebp+0x18) "fn ")
16573 8b/-> *(ebp+0x14) 0/r32/eax
16574 (lookup *eax *(eax+4))
16575 (write-buffered *(ebp+0x18) %eax)
16576 (rewind-stream *(ebp+0xc))
16577 (write-buffered *(ebp+0x18) ": invalid identifier in '")
16578 (write-stream-data *(ebp+0x18) *(ebp+0xc))
16579 (write-buffered *(ebp+0x18) "'\n")
16580 (flush *(ebp+0x18))
16581 (stop *(ebp+0x1c) 1)
16582
16583
16584 $add-operation-and-inputs-to-stmt:error-deref-on-stack:
16585
16586 (write-buffered *(ebp+0x18) "fn ")
16587 8b/-> *(ebp+0x14) 0/r32/eax
16588 (lookup *eax *(eax+4))
16589 (write-buffered *(ebp+0x18) %eax)
16590 (rewind-stream *(ebp+0xc))
16591 (write-buffered *(ebp+0x18) ": cannot dereference var '")
16592 (lookup *esi *(esi+4))
16593 (lookup *eax *(eax+4))
16594 (write-buffered *(ebp+0x18) %eax)
16595 (write-buffered *(ebp+0x18) "' on stack\n")
16596 (flush *(ebp+0x18))
16597 (stop *(ebp+0x1c) 1)
16598
16599
16600 $add-operation-and-inputs-to-stmt:error-deref-non-addr:
16601
16602 (write-buffered *(ebp+0x18) "fn ")
16603 8b/-> *(ebp+0x14) 0/r32/eax
16604 (lookup *eax *(eax+4))
16605 (write-buffered *(ebp+0x18) %eax)
16606 (rewind-stream *(ebp+0xc))
16607 (write-buffered *(ebp+0x18) ": cannot dereference non-addr var '")
16608 (lookup *esi *(esi+4))
16609 (lookup *eax *(eax+4))
16610 (write-buffered *(ebp+0x18) %eax)
16611 (write-buffered *(ebp+0x18) "'\n")
16612 (flush *(ebp+0x18))
16613 (stop *(ebp+0x1c) 1)
16614
16615
16616 stmt-has-outputs?:
16617
16618 55/push-ebp
16619 89/<- %ebp 4/r32/esp
16620
16621 51/push-ecx
16622
16623 68/push 0/imm32/end
16624 68/push 0/imm32/start
16625 89/<- %ecx 4/r32/esp
16626
16627 b8/copy-to-eax 0/imm32/false
16628 (rewind-stream *(ebp+8))
16629 {
16630 (next-mu-token *(ebp+8) %ecx)
16631
16632 (slice-empty? %ecx)
16633 3d/compare-eax-and 0/imm32/false
16634 b8/copy-to-eax 0/imm32/false/result
16635 0f 85/jump-if-!= break/disp32
16636
16637
16638 8b/-> *ecx 0/r32/eax
16639 8a/copy-byte *eax 0/r32/AL
16640 81 4/subop/and %eax 0xff/imm32
16641
16642 3d/compare-eax-and 0x23/imm32/hash
16643 b8/copy-to-eax 0/imm32/false/result
16644 0f 84/jump-if-= break/disp32
16645
16646 (slice-equal? %ecx "<-")
16647 3d/compare-eax-and 0/imm32/false
16648 74/jump-if-= loop/disp8
16649 b8/copy-to-eax 1/imm32/true
16650 }
16651 $stmt-has-outputs:end:
16652 (rewind-stream *(ebp+8))
16653
16654 81 0/subop/add %esp 8/imm32
16655
16656 59/pop-to-ecx
16657
16658 89/<- %esp 5/r32/ebp
16659 5d/pop-to-ebp
16660 c3/return
16661
16662
16663
16664 lookup-var-or-literal:
16665
16666 55/push-ebp
16667 89/<- %ebp 4/r32/esp
16668
16669 50/push-eax
16670 51/push-ecx
16671 56/push-esi
16672
16673 8b/-> *(ebp+8) 6/r32/esi
16674
16675 (slice-empty? %esi)
16676 3d/compare-eax-and 0/imm32/false
16677 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
16678
16679 8b/-> *esi 1/r32/ecx
16680 8a/copy-byte *ecx 1/r32/CL
16681 81 4/subop/and %ecx 0xff/imm32
16682
16683 {
16684 81 7/subop/compare %ecx 0x2d/imm32/dash
16685 74/jump-if-= $lookup-var-or-literal:literal/disp8
16686 (is-decimal-digit? %ecx)
16687 3d/compare-eax-and 0/imm32/false
16688 74/jump-if-= break/disp8
16689 $lookup-var-or-literal:literal:
16690 (new-literal-integer Heap %esi *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
16691 eb/jump $lookup-var-or-literal:end/disp8
16692 }
16693
16694 {
16695 81 7/subop/compare %ecx 0x22/imm32/dquote
16696 75/jump-if-!= break/disp8
16697 $lookup-var-or-literal:literal-string:
16698 (new-literal-string Heap %esi *(ebp+0x10))
16699 eb/jump $lookup-var-or-literal:end/disp8
16700 }
16701
16702 {
16703 $lookup-var-or-literal:var:
16704 (lookup-var %esi *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
16705 }
16706 $lookup-var-or-literal:end:
16707
16708 5e/pop-to-esi
16709 59/pop-to-ecx
16710 58/pop-to-eax
16711
16712 89/<- %esp 5/r32/ebp
16713 5d/pop-to-ebp
16714 c3/return
16715
16716 $lookup-var-or-literal:abort:
16717 (write-buffered *(ebp+0x18) "fn ")
16718 8b/-> *(ebp+0x14) 0/r32/eax
16719 (lookup *eax *(eax+4))
16720 (write-buffered *(ebp+0x18) %eax)
16721 (write-buffered *(ebp+0x18) ": empty variable!")
16722 (flush *(ebp+0x18))
16723 (stop *(ebp+0x1c) 1)
16724
16725
16726
16727 lookup-var:
16728
16729 55/push-ebp
16730 89/<- %ebp 4/r32/esp
16731
16732 50/push-eax
16733
16734 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
16735
16736 8b/-> *(ebp+0x10) 0/r32/eax
16737 81 7/subop/compare *eax 0/imm32
16738 74/jump-if-= $lookup-var:abort/disp8
16739 $lookup-var:end:
16740
16741 58/pop-to-eax
16742
16743 89/<- %esp 5/r32/ebp
16744 5d/pop-to-ebp
16745 c3/return
16746
16747 $lookup-var:abort:
16748 (write-buffered *(ebp+0x18) "fn ")
16749 8b/-> *(ebp+0x14) 0/r32/eax
16750 (lookup *eax *(eax+4))
16751 (write-buffered *(ebp+0x18) %eax)
16752 (write-buffered *(ebp+0x18) ": unknown variable '")
16753 (write-slice-buffered *(ebp+0x18) *(ebp+8))
16754 (write-buffered *(ebp+0x18) "'\n")
16755 (flush *(ebp+0x18))
16756 (stop *(ebp+0x1c) 1)
16757
16758
16759
16760
16761 lookup-var-helper:
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772 55/push-ebp
16773 89/<- %ebp 4/r32/esp
16774
16775 50/push-eax
16776 51/push-ecx
16777 52/push-edx
16778 53/push-ebx
16779 56/push-esi
16780 57/push-edi
16781
16782 (zero-out *(ebp+0x10) *Handle-size)
16783
16784 8b/-> *(ebp+0xc) 6/r32/esi
16785
16786 8b/-> *esi 3/r32/ebx
16787
16788 3b/compare<- *(esi+4) 0/r32/eax
16789 0f 8f/jump-if-> $lookup-var-helper:error1/disp32
16790
16791 8d/copy-address *(esi+8) 2/r32/edx
16792
16793 8d/copy-address *(esi+ebx-4) 3/r32/ebx
16794
16795 68/push 0/imm32
16796 68/push 0/imm32
16797 68/push 0/imm32
16798 68/push 0/imm32
16799 68/push 0/imm32
16800 68/push 0/imm32
16801 68/push 0/imm32
16802 68/push 0/imm32
16803 68/push 0/imm32
16804 68/push 0/imm32
16805 68/push 0/imm32
16806 68/push 0/imm32
16807 68/push 0/imm32
16808 68/push 0/imm32
16809 68/push 0/imm32
16810 68/push 0/imm32
16811 89/<- %edi 4/r32/esp
16812 {
16813 $lookup-var-helper:loop:
16814
16815 39/compare %ebx 2/r32/edx
16816 0f 82/jump-if-addr< break/disp32
16817
16818 (lookup *ebx *(ebx+4))
16819 89/<- %ecx 0/r32/eax
16820
16821 (lookup *ecx *(ecx+4))
16822
16823 (slice-equal? *(ebp+8) %eax)
16824 3d/compare-eax-and 0/imm32/false
16825 {
16826 74/jump-if-= break/disp8
16827 $lookup-var-helper:found:
16828
16829 (lookup *(ecx+0x18) *(ecx+0x1c))
16830 3d/compare-eax-and 0/imm32
16831 {
16832 74/jump-if-= break/disp8
16833 $lookup-var-helper:found-register:
16834
16835 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
16836 8b/-> *eax 0/r32/eax
16837
16838 8b/-> *(edi+eax<<2) 0/r32/eax
16839 3d/compare-eax-and 0/imm32
16840 0f 85/jump-if-!= $lookup-var-helper:error2/disp32
16841 }
16842 $lookup-var-helper:return:
16843
16844 8b/-> *(ebp+0x10) 6/r32/esi
16845
16846 8b/-> *ebx 0/r32/eax
16847 89/<- *esi 0/r32/eax
16848 8b/-> *(ebx+4) 0/r32/eax
16849 89/<- *(esi+4) 0/r32/eax
16850
16851 eb/jump $lookup-var-helper:end/disp8
16852 }
16853
16854
16855 (lookup *(ecx+0x18) *(ecx+0x1c))
16856
16857 3d/compare-eax-and 0/imm32
16858 74/jump-if-= $lookup-var-helper:continue/disp8
16859
16860 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
16861 8b/-> *eax 0/r32/eax
16862
16863 89/<- *(edi+eax<<2) 1/r32/ecx
16864 $lookup-var-helper:continue:
16865
16866 81 5/subop/subtract %ebx 0xc/imm32
16867 e9/jump loop/disp32
16868 }
16869 $lookup-var-helper:end:
16870
16871 81 0/subop/add %esp 0x40/imm32
16872
16873 5f/pop-to-edi
16874 5e/pop-to-esi
16875 5b/pop-to-ebx
16876 5a/pop-to-edx
16877 59/pop-to-ecx
16878 58/pop-to-eax
16879
16880 89/<- %esp 5/r32/ebp
16881 5d/pop-to-ebp
16882 c3/return
16883
16884 $lookup-var-helper:error1:
16885 (write-buffered *(ebp+0x18) "fn ")
16886 8b/-> *(ebp+0x14) 0/r32/eax
16887 (lookup *eax *(eax+4))
16888 (write-buffered *(ebp+0x18) %eax)
16889 (write-buffered *(ebp+0x18) ": malformed stack when looking up '")
16890 (write-slice-buffered *(ebp+0x18) *(ebp+8))
16891 (write-buffered *(ebp+0x18) "'\n")
16892 (flush *(ebp+0x18))
16893 (stop *(ebp+0x1c) 1)
16894
16895
16896 $lookup-var-helper:error2:
16897
16898 (write-buffered *(ebp+0x18) "fn ")
16899 50/push-eax
16900 8b/-> *(ebp+0x14) 0/r32/eax
16901 (lookup *eax *(eax+4))
16902 (write-buffered *(ebp+0x18) %eax)
16903 58/pop-eax
16904 (write-buffered *(ebp+0x18) ": register ")
16905 50/push-eax
16906 (lookup *(eax+0x18) *(eax+0x1c))
16907 (write-buffered *(ebp+0x18) %eax)
16908 58/pop-to-eax
16909 (write-buffered *(ebp+0x18) " reads var '")
16910 (write-slice-buffered *(ebp+0x18) *(ebp+8))
16911 (write-buffered *(ebp+0x18) "' after writing var '")
16912 (lookup *eax *(eax+4))
16913 (write-buffered *(ebp+0x18) %eax)
16914 (write-buffered *(ebp+0x18) "'\n")
16915 (flush *(ebp+0x18))
16916 (stop *(ebp+0x1c) 1)
16917
16918
16919 dump-vars:
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929 55/push-ebp
16930 89/<- %ebp 4/r32/esp
16931
16932 52/push-edx
16933 53/push-ebx
16934 56/push-esi
16935
16936 8b/-> *(ebp+8) 6/r32/esi
16937
16938 8b/-> *esi 3/r32/ebx
16939
16940 8d/copy-address *(esi+8) 2/r32/edx
16941
16942 8d/copy-address *(esi+ebx-4) 3/r32/ebx
16943 {
16944 $dump-vars:loop:
16945
16946 39/compare %ebx 2/r32/edx
16947 0f 82/jump-if-addr< break/disp32
16948
16949 (write-buffered Stderr " var@")
16950 (dump-var 2 %ebx)
16951
16952 81 5/subop/subtract %ebx 0xc/imm32
16953 e9/jump loop/disp32
16954 }
16955 $dump-vars:end:
16956
16957 5e/pop-to-esi
16958 5b/pop-to-ebx
16959 5a/pop-to-edx
16960
16961 89/<- %esp 5/r32/ebp
16962 5d/pop-to-ebp
16963 c3/return
16964
16965 == data
16966
16967 Mu-registers:
16968
16969 0xa8/imm32/write
16970 0/imm32/read
16971 0xa8/imm32/length
16972
16973
16974
16975 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
16976 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
16977 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
16978 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
16979 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
16980 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
16981
16982 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 0/imm32
16983 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 1/imm32
16984 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 2/imm32
16985 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 3/imm32
16986 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 4/imm32
16987 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 5/imm32
16988 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 6/imm32
16989 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 7/imm32
16990
16991
16992
16993
16994 Mu-registers-unique:
16995
16996 0xa8/imm32/write
16997 0/imm32/read
16998 0xa8/imm32/length
16999
17000
17001 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
17002 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
17003 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
17004 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
17005 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
17006 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
17007
17008 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 8/imm32
17009 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 9/imm32
17010 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 0xa/imm32
17011 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 0xb/imm32
17012 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 0xc/imm32
17013 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 0xd/imm32
17014 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 0xe/imm32
17015 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 0xf/imm32
17016
17017 $Mu-register-eax:
17018 0x11/imm32/alloc-id
17019 3/imm32/size
17020 0x65/e 0x61/a 0x78/x
17021
17022 $Mu-register-ecx:
17023 0x11/imm32/alloc-id
17024 3/imm32/size
17025 0x65/e 0x63/c 0x78/x
17026
17027 $Mu-register-edx:
17028 0x11/imm32/alloc-id
17029 3/imm32/size
17030 0x65/e 0x64/d 0x78/x
17031
17032 $Mu-register-ebx:
17033 0x11/imm32/alloc-id
17034 3/imm32/size
17035 0x65/e 0x62/b 0x78/x
17036
17037 $Mu-register-esi:
17038 0x11/imm32/alloc-id
17039 3/imm32/size
17040 0x65/e 0x73/s 0x69/i
17041
17042 $Mu-register-edi:
17043 0x11/imm32/alloc-id
17044 3/imm32/size
17045 0x65/e 0x64/d 0x69/i
17046
17047 $Mu-register-xmm0:
17048 0x11/imm32/alloc-id:fake:payload
17049
17050 0x4/imm32/size
17051 0x78/x 0x6d/m 0x6d/m 0x30/0
17052
17053 $Mu-register-xmm1:
17054 0x11/imm32/alloc-id:fake:payload
17055
17056 0x4/imm32/size
17057 0x78/x 0x6d/m 0x6d/m 0x31/1
17058
17059 $Mu-register-xmm2:
17060 0x11/imm32/alloc-id:fake:payload
17061
17062 0x4/imm32/size
17063 0x78/x 0x6d/m 0x6d/m 0x32/2
17064
17065 $Mu-register-xmm3:
17066 0x11/imm32/alloc-id:fake:payload
17067
17068 0x4/imm32/size
17069 0x78/x 0x6d/m 0x6d/m 0x33/3
17070
17071 $Mu-register-xmm4:
17072 0x11/imm32/alloc-id:fake:payload
17073
17074 0x4/imm32/size
17075 0x78/x 0x6d/m 0x6d/m 0x34/4
17076
17077 $Mu-register-xmm5:
17078 0x11/imm32/alloc-id:fake:payload
17079
17080 0x4/imm32/size
17081 0x78/x 0x6d/m 0x6d/m 0x35/5
17082
17083 $Mu-register-xmm6:
17084 0x11/imm32/alloc-id:fake:payload
17085
17086 0x4/imm32/size
17087 0x78/x 0x6d/m 0x6d/m 0x36/6
17088
17089 $Mu-register-xmm7:
17090 0x11/imm32/alloc-id:fake:payload
17091
17092 0x4/imm32/size
17093 0x78/x 0x6d/m 0x6d/m 0x37/7
17094
17095 == code
17096
17097
17098 maybe-define-var:
17099
17100 55/push-ebp
17101 89/<- %ebp 4/r32/esp
17102
17103 50/push-eax
17104
17105 (lookup *(ebp+8) *(ebp+0xc))
17106
17107 (binding-exists? %eax *(ebp+0x10))
17108 3d/compare-eax-and 0/imm32/false
17109 75/jump-if-!= $maybe-define-var:end/disp8
17110
17111 (push *(ebp+0x10) *(ebp+8))
17112 (push *(ebp+0x10) *(ebp+0xc))
17113 (push *(ebp+0x10) 0)
17114 $maybe-define-var:end:
17115
17116 58/pop-to-eax
17117
17118 89/<- %esp 5/r32/ebp
17119 5d/pop-to-ebp
17120 c3/return
17121
17122
17123 binding-exists?:
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135 55/push-ebp
17136 89/<- %ebp 4/r32/esp
17137
17138 51/push-ecx
17139 52/push-edx
17140 56/push-esi
17141
17142 8b/-> *(ebp+8) 0/r32/eax
17143 (lookup *eax *(eax+4))
17144 89/<- %ecx 0/r32/eax
17145
17146 8b/-> *(ebp+0xc) 6/r32/esi
17147
17148 8b/-> *esi 0/r32/eax
17149
17150 8d/copy-address *(esi+8) 2/r32/edx
17151
17152 8d/copy-address *(esi+eax-4) 6/r32/esi
17153 {
17154 $binding-exists?:loop:
17155
17156 39/compare %esi 2/r32/edx
17157 0f 82/jump-if-addr< break/disp32
17158
17159 (lookup *esi *(esi+4))
17160
17161 (lookup *eax *(eax+4))
17162
17163 (string-equal? %ecx %eax)
17164 3d/compare-eax-and 0/imm32/false
17165 75/jump-if-!= $binding-exists?:end/disp8
17166
17167 81 5/subop/subtract %esi 0xc/imm32
17168 e9/jump loop/disp32
17169 }
17170 b8/copy-to-eax 0/imm32/false
17171 $binding-exists?:end:
17172
17173 5e/pop-to-esi
17174 5a/pop-to-edx
17175 59/pop-to-ecx
17176
17177 89/<- %esp 5/r32/ebp
17178 5d/pop-to-ebp
17179 c3/return
17180
17181 test-parse-mu-stmt:
17182
17183 55/push-ebp
17184 89/<- %ebp 4/r32/esp
17185
17186 8b/-> *Primitive-type-ids 0/r32/eax
17187 89/<- *Type-id 0/r32/eax
17188 (clear-stream _test-input-stream)
17189 (write _test-input-stream "increment n\n")
17190
17191 81 5/subop/subtract %esp 0xc0/imm32
17192 68/push 0xc0/imm32/size
17193 68/push 0/imm32/top
17194 89/<- %ecx 4/r32/esp
17195 (clear-stack %ecx)
17196
17197 68/push 0/imm32
17198 68/push 0/imm32
17199 89/<- %edx 4/r32/esp
17200
17201 68/push 0/imm32
17202 68/push 0/imm32
17203 89/<- %eax 4/r32/esp
17204
17205 (copy-array Heap "n" %eax)
17206 (new-var Heap *eax *(eax+4) %edx)
17207
17208 (push %ecx *edx)
17209 (push %ecx *(edx+4))
17210 (push %ecx 0)
17211
17212 68/push 0/imm32
17213 68/push 0/imm32
17214 89/<- %eax 4/r32/esp
17215
17216 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
17217
17218 (lookup *eax *(eax+4))
17219 89/<- %edx 0/r32/eax
17220
17221 (check-ints-equal *edx 1 "F - test-parse-mu-stmt/tag")
17222
17223 (lookup *(edx+4) *(edx+8))
17224 (check-strings-equal %eax "increment" "F - test-parse-mu-stmt/name")
17225
17226
17227 (lookup *(edx+0xc) *(edx+0x10))
17228
17229 (lookup *eax *(eax+4))
17230
17231 (lookup *eax *(eax+4))
17232
17233 (check-strings-equal %eax "n" "F - test-parse-mu-stmt/inout:0")
17234
17235 89/<- %esp 5/r32/ebp
17236 5d/pop-to-ebp
17237 c3/return
17238
17239 test-parse-mu-stmt-with-comma:
17240
17241 55/push-ebp
17242 89/<- %ebp 4/r32/esp
17243
17244 8b/-> *Primitive-type-ids 0/r32/eax
17245 89/<- *Type-id 0/r32/eax
17246 (clear-stream _test-input-stream)
17247 (write _test-input-stream "copy-to n, 3\n")
17248
17249 81 5/subop/subtract %esp 0xc0/imm32
17250 68/push 0xc0/imm32/size
17251 68/push 0/imm32/top
17252 89/<- %ecx 4/r32/esp
17253 (clear-stack %ecx)
17254
17255 68/push 0/imm32
17256 68/push 0/imm32
17257 89/<- %edx 4/r32/esp
17258
17259 68/push 0/imm32
17260 68/push 0/imm32
17261 89/<- %eax 4/r32/esp
17262
17263 (copy-array Heap "n" %eax)
17264 (new-var Heap *eax *(eax+4) %edx)
17265
17266 (push %ecx *edx)
17267 (push %ecx *(edx+4))
17268 (push %ecx 0)
17269
17270 68/push 0/imm32
17271 68/push 0/imm32
17272 89/<- %eax 4/r32/esp
17273
17274 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
17275
17276 (lookup *eax *(eax+4))
17277 89/<- %edx 0/r32/eax
17278
17279 (check-ints-equal *edx 1 "F - test-parse-mu-stmt-with-comma/tag")
17280
17281 (lookup *(edx+4) *(edx+8))
17282 (check-strings-equal %eax "copy-to" "F - test-parse-mu-stmt-with-comma/name")
17283
17284
17285 (lookup *(edx+0xc) *(edx+0x10))
17286
17287 (lookup *eax *(eax+4))
17288
17289 (lookup *eax *(eax+4))
17290
17291 (check-strings-equal %eax "n" "F - test-parse-mu-stmt-with-comma/inout:0")
17292
17293 89/<- %esp 5/r32/ebp
17294 5d/pop-to-ebp
17295 c3/return
17296
17297 new-var:
17298
17299 55/push-ebp
17300 89/<- %ebp 4/r32/esp
17301
17302 50/push-eax
17303 51/push-ecx
17304
17305 8b/-> *(ebp+0x14) 1/r32/ecx
17306
17307 (allocate *(ebp+8) *Var-size %ecx)
17308
17309 (lookup *ecx *(ecx+4))
17310
17311 8b/-> *(ebp+0xc) 1/r32/ecx
17312 89/<- *eax 1/r32/ecx
17313 8b/-> *(ebp+0x10) 1/r32/ecx
17314 89/<- *(eax+4) 1/r32/ecx
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324 $new-var:end:
17325
17326 59/pop-to-ecx
17327 58/pop-to-eax
17328
17329 89/<- %esp 5/r32/ebp
17330 5d/pop-to-ebp
17331 c3/return
17332
17333 new-literal-integer:
17334
17335 55/push-ebp
17336 89/<- %ebp 4/r32/esp
17337
17338 50/push-eax
17339 51/push-ecx
17340
17341 (is-hex-int? *(ebp+0xc))
17342 3d/compare-eax-and 0/imm32/false
17343 0f 84/jump-if-= $new-literal-integer:abort/disp32
17344
17345 (check-mu-hex-int *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
17346
17347 (new-var-from-slice *(ebp+8) *(ebp+0xc) *(ebp+0x10))
17348
17349 8b/-> *(ebp+0x10) 0/r32/eax
17350 (lookup *eax *(eax+4))
17351 89/<- %ecx 0/r32/eax
17352
17353 8b/-> *Curr-block-depth 0/r32/eax
17354 89/<- *(ecx+0x10) 0/r32/eax
17355
17356 8d/copy-address *(ecx+8) 0/r32/eax
17357 (allocate *(ebp+8) *Type-tree-size %eax)
17358 (lookup *(ecx+8) *(ecx+0xc))
17359 c7 0/subop/copy *eax 1/imm32/true
17360
17361 $new-literal-integer:end:
17362
17363 81 0/subop/add %esp 8/imm32
17364
17365 59/pop-to-ecx
17366 58/pop-to-eax
17367
17368 89/<- %esp 5/r32/ebp
17369 5d/pop-to-ebp
17370 c3/return
17371
17372 $new-literal-integer:abort:
17373 (write-buffered *(ebp+0x18) "fn ")
17374 8b/-> *(ebp+0x14) 0/r32/eax
17375 (lookup *eax *(eax+4))
17376 (write-buffered *(ebp+0x18) %eax)
17377 (write-buffered *(ebp+0x18) ": variable '")
17378 (write-slice-buffered *(ebp+0x18) *(ebp+0xc))
17379 (write-buffered *(ebp+0x18) "' cannot begin with a digit (or do you have a typo in a number?)\n")
17380 (flush *(ebp+0x18))
17381 (stop *(ebp+0x1c) 1)
17382
17383
17384
17385 check-mu-hex-int:
17386
17387 55/push-ebp
17388 89/<- %ebp 4/r32/esp
17389
17390 50/push-eax
17391 51/push-ecx
17392 52/push-edx
17393
17394 8b/-> *(ebp+8) 1/r32/ecx
17395
17396 8b/-> *ecx 2/r32/edx
17397
17398 b8/copy-to-eax 0/imm32
17399 8a/copy-byte *edx 0/r32/AL
17400 3d/compare-eax-and 0x2d/imm32/dash
17401 {
17402 75/jump-if-!= break/disp8
17403 42/increment-edx
17404 }
17405
17406 8b/-> *(ecx+4) 1/r32/ecx
17407
17408 89/<- %eax 1/r32/ecx
17409 29/subtract-from %eax 2/r32/edx
17410
17411 3d/compare-eax-with 1/imm32
17412 0f 8e/jump-if-<= $check-mu-hex-int:end/disp32
17413 $check-mu-hex-int:length->-1:
17414
17415
17416 51/push-ecx
17417 52/push-edx
17418 89/<- %eax 4/r32/esp
17419
17420 (slice-starts-with? %eax "0x")
17421
17422 81 0/subop/add %esp 8/imm32
17423
17424 3d/compare-eax-with 0/imm32/false
17425 75/jump-if-!= $check-mu-hex-int:end/disp8
17426 $check-mu-hex-int:abort:
17427
17428 (write-buffered *(ebp+0xc) "literal integers are always hex in Mu; start '")
17429 (write-slice-buffered *(ebp+0xc) *(ebp+8))
17430 (write-buffered *(ebp+0xc) "' with a '0x' to be unambiguous, converting it to hexadecimal as necessary.\n")
17431 (flush *(ebp+0xc))
17432 (stop *(ebp+0x10) 1)
17433 $check-mu-hex-int:end:
17434
17435 5a/pop-to-edx
17436 59/pop-to-ecx
17437 58/pop-to-eax
17438
17439 89/<- %esp 5/r32/ebp
17440 5d/pop-to-ebp
17441 c3/return
17442
17443 new-literal:
17444
17445 55/push-ebp
17446 89/<- %ebp 4/r32/esp
17447
17448 50/push-eax
17449 51/push-ecx
17450
17451 68/push 0/imm32
17452 68/push 0/imm32
17453 89/<- %ecx 4/r32/esp
17454
17455 (slice-to-string Heap *(ebp+0xc) %ecx)
17456
17457 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
17458
17459 8b/-> *(ebp+0x10) 1/r32/ecx
17460 (lookup *ecx *(ecx+4))
17461 89/<- %ecx 0/r32/eax
17462
17463 8b/-> *Curr-block-depth 0/r32/eax
17464 89/<- *(ecx+0x10) 0/r32/eax
17465
17466 8d/copy-address *(ecx+8) 0/r32/eax
17467 (allocate *(ebp+8) *Type-tree-size %eax)
17468 (lookup *(ecx+8) *(ecx+0xc))
17469
17470 c7 0/subop/copy *eax 1/imm32/true
17471 $new-literal:end:
17472
17473 81 0/subop/add %esp 8/imm32
17474
17475 59/pop-to-ecx
17476 58/pop-to-eax
17477
17478 89/<- %esp 5/r32/ebp
17479 5d/pop-to-ebp
17480 c3/return
17481
17482 new-literal-string:
17483
17484 55/push-ebp
17485 89/<- %ebp 4/r32/esp
17486
17487 50/push-eax
17488 51/push-ecx
17489
17490 68/push 0/imm32
17491 68/push 0/imm32
17492 89/<- %ecx 4/r32/esp
17493
17494 (slice-to-string Heap *(ebp+0xc) %ecx)
17495
17496 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
17497
17498 8b/-> *(ebp+0x10) 1/r32/ecx
17499 (lookup *ecx *(ecx+4))
17500 89/<- %ecx 0/r32/eax
17501
17502 8b/-> *Curr-block-depth 0/r32/eax
17503 89/<- *(ecx+0x10) 0/r32/eax
17504
17505 8d/copy-address *(ecx+8) 0/r32/eax
17506 (allocate *(ebp+8) *Type-tree-size %eax)
17507 (lookup *(ecx+8) *(ecx+0xc))
17508
17509 c7 0/subop/copy *(eax+4) 0x10/imm32/type-id-string-literal
17510
17511 c7 0/subop/copy *eax 1/imm32/true
17512 $new-literal-string:end:
17513
17514 81 0/subop/add %esp 8/imm32
17515
17516 59/pop-to-ecx
17517 58/pop-to-eax
17518
17519 89/<- %esp 5/r32/ebp
17520 5d/pop-to-ebp
17521 c3/return
17522
17523 new-var-from-slice:
17524
17525 55/push-ebp
17526 89/<- %ebp 4/r32/esp
17527
17528 51/push-ecx
17529
17530 68/push 0/imm32
17531 68/push 0/imm32
17532 89/<- %ecx 4/r32/esp
17533
17534 (slice-to-string Heap *(ebp+0xc) %ecx)
17535
17536 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
17537 $new-var-from-slice:end:
17538
17539 81 0/subop/add %esp 8/imm32
17540
17541 59/pop-to-ecx
17542
17543 89/<- %esp 5/r32/ebp
17544 5d/pop-to-ebp
17545 c3/return
17546
17547 new-var-def:
17548
17549 55/push-ebp
17550 89/<- %ebp 4/r32/esp
17551
17552 50/push-eax
17553 51/push-ecx
17554
17555 (allocate *(ebp+8) *Stmt-size *(ebp+0x14))
17556
17557 8b/-> *(ebp+0x14) 0/r32/eax
17558 (lookup *eax *(eax+4))
17559
17560 c7 0/subop/copy *eax 2/imm32/tag/var-on-stack
17561
17562 8b/-> *(ebp+0xc) 1/r32/ecx
17563 89/<- *(eax+4) 1/r32/ecx
17564 8b/-> *(ebp+0x10) 1/r32/ecx
17565 89/<- *(eax+8) 1/r32/ecx
17566 $new-var-def:end:
17567
17568 59/pop-to-ecx
17569 58/pop-to-eax
17570
17571 89/<- %esp 5/r32/ebp
17572 5d/pop-to-ebp
17573 c3/return
17574
17575 new-reg-var-def:
17576
17577 55/push-ebp
17578 89/<- %ebp 4/r32/esp
17579
17580 50/push-eax
17581
17582 8b/-> *(ebp+0x14) 0/r32/eax
17583
17584 (allocate *(ebp+8) *Stmt-size %eax)
17585
17586 (lookup *eax *(eax+4))
17587
17588 c7 0/subop/copy *eax 3/imm32/tag/var-in-register
17589
17590 8d/copy-address *(eax+0x14) 0/r32/eax
17591 (append-stmt-var Heap *(ebp+0xc) *(ebp+0x10) 0 0 0 %eax)
17592 $new-reg-var-def:end:
17593
17594 58/pop-to-eax
17595
17596 89/<- %esp 5/r32/ebp
17597 5d/pop-to-ebp
17598 c3/return
17599
17600 append-list:
17601
17602 55/push-ebp
17603 89/<- %ebp 4/r32/esp
17604
17605 50/push-eax
17606 51/push-ecx
17607 57/push-edi
17608
17609 8b/-> *(ebp+0x1c) 7/r32/edi
17610
17611 (allocate *(ebp+8) *List-size %edi)
17612
17613 (lookup *edi *(edi+4))
17614 89/<- %edi 0/r32/eax
17615
17616 8b/-> *(ebp+0xc) 0/r32/eax
17617 89/<- *edi 0/r32/eax
17618 8b/-> *(ebp+0x10) 0/r32/eax
17619 89/<- *(edi+4) 0/r32/eax
17620
17621 81 7/subop/compare *(ebp+0x14) 0/imm32
17622 74/jump-if-= $append-list:end/disp8
17623
17624 $append-list:non-empty-list:
17625
17626 (lookup *(ebp+0x14) *(ebp+0x18))
17627
17628 {
17629 81 7/subop/compare *(eax+8) 0/imm32
17630 74/jump-if-= break/disp8
17631
17632 (lookup *(eax+8) *(eax+0xc))
17633
17634 eb/jump loop/disp8
17635 }
17636
17637 8b/-> *(ebp+0x1c) 7/r32/edi
17638
17639 8b/-> *edi 1/r32/ecx
17640 89/<- *(eax+8) 1/r32/ecx
17641 8b/-> *(edi+4) 1/r32/ecx
17642 89/<- *(eax+0xc) 1/r32/ecx
17643
17644 8b/-> *(ebp+0x14) 1/r32/ecx
17645 89/<- *edi 1/r32/ecx
17646 8b/-> *(ebp+0x18) 1/r32/ecx
17647 89/<- *(edi+4) 1/r32/ecx
17648 $append-list:end:
17649
17650 5f/pop-to-edi
17651 59/pop-to-ecx
17652 58/pop-to-eax
17653
17654 89/<- %esp 5/r32/ebp
17655 5d/pop-to-ebp
17656 c3/return
17657
17658 append-stmt-var:
17659
17660 55/push-ebp
17661 89/<- %ebp 4/r32/esp
17662
17663 50/push-eax
17664 51/push-ecx
17665 57/push-edi
17666
17667 8b/-> *(ebp+0x20) 7/r32/edi
17668
17669 (allocate *(ebp+8) *Stmt-var-size %edi)
17670
17671 (lookup *edi *(edi+4))
17672 89/<- %ecx 0/r32/eax
17673
17674 8b/-> *(ebp+0xc) 0/r32/eax
17675 89/<- *ecx 0/r32/eax
17676 8b/-> *(ebp+0x10) 0/r32/eax
17677 89/<- *(ecx+4) 0/r32/eax
17678
17679 8b/-> *(ebp+0x1c) 0/r32/eax
17680 89/<- *(ecx+0x10) 0/r32/eax
17681
17682 81 7/subop/compare *(ebp+0x14) 0/imm32/null
17683 74/jump-if-= $append-stmt-var:end/disp8
17684
17685
17686 (lookup *(ebp+0x14) *(ebp+0x18))
17687
17688 {
17689 81 7/subop/compare *(eax+8) 0/imm32
17690 74/jump-if-= break/disp8
17691
17692 (lookup *(eax+8) *(eax+0xc))
17693
17694 eb/jump loop/disp8
17695 }
17696
17697 8b/-> *edi 1/r32/ecx
17698 89/<- *(eax+8) 1/r32/ecx
17699 8b/-> *(edi+4) 1/r32/ecx
17700 89/<- *(eax+0xc) 1/r32/ecx
17701
17702 8b/-> *(ebp+0x14) 1/r32/ecx
17703 89/<- *edi 1/r32/ecx
17704 8b/-> *(ebp+0x18) 1/r32/ecx
17705 89/<- *(edi+4) 1/r32/ecx
17706 $append-stmt-var:end:
17707
17708 5f/pop-to-edi
17709 59/pop-to-ecx
17710 58/pop-to-eax
17711
17712 89/<- %esp 5/r32/ebp
17713 5d/pop-to-ebp
17714 c3/return
17715
17716 append-to-block:
17717
17718 55/push-ebp
17719 89/<- %ebp 4/r32/esp
17720
17721 50/push-eax
17722 56/push-esi
17723
17724 8b/-> *(ebp+0xc) 6/r32/esi
17725
17726 8d/copy-address *(esi+4) 0/r32/eax
17727 (append-list *(ebp+8) *(ebp+0x10) *(ebp+0x14) *(esi+4) *(esi+8) %eax)
17728 $append-to-block:end:
17729
17730 5e/pop-to-esi
17731 58/pop-to-eax
17732
17733 89/<- %esp 5/r32/ebp
17734 5d/pop-to-ebp
17735 c3/return
17736
17737
17738
17739
17740
17741
17742
17743 lookup-or-create-constant:
17744
17745 55/push-ebp
17746 89/<- %ebp 4/r32/esp
17747
17748 50/push-eax
17749 56/push-esi
17750
17751 (container-type *(ebp+8))
17752 89/<- %esi 0/r32/eax
17753
17754 68/push 0/imm32
17755 68/push 0/imm32
17756 89/<- %eax 4/r32/esp
17757 (find-or-create-typeinfo %esi %eax)
17758
17759 (lookup *eax *(eax+4))
17760
17761
17762
17763
17764
17765 (find-or-create-typeinfo-output-var %eax *(ebp+0xc) *(ebp+0x10))
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779 $lookup-or-create-constant:end:
17780
17781 81 0/subop/add %esp 8/imm32
17782
17783 5e/pop-to-esi
17784 58/pop-to-eax
17785
17786 89/<- %esp 5/r32/ebp
17787 5d/pop-to-ebp
17788 c3/return
17789
17790
17791
17792
17793
17794 container-type:
17795
17796 55/push-ebp
17797 89/<- %ebp 4/r32/esp
17798
17799 8b/-> *(ebp+8) 0/r32/eax
17800 (lookup *eax *(eax+4))
17801 (lookup *(eax+8) *(eax+0xc))
17802 {
17803 81 7/subop/compare *(eax+8) 0/imm32
17804 74/jump-if-= break/disp8
17805 (lookup *(eax+0xc) *(eax+0x10))
17806 (lookup *(eax+4) *(eax+8))
17807 }
17808 8b/-> *(eax+4) 0/r32/eax
17809 $container-type:end:
17810
17811 89/<- %esp 5/r32/ebp
17812 5d/pop-to-ebp
17813 c3/return
17814
17815 is-container?:
17816
17817 55/push-ebp
17818 89/<- %ebp 4/r32/esp
17819
17820 8b/-> *(ebp+8) 0/r32/eax
17821 c1/shift 4/subop/left %eax 2/imm8
17822 3b/compare 0/r32/eax *Primitive-type-ids
17823 0f 9d/set-if->= %al
17824 81 4/subop/and %eax 0xff/imm32
17825 $is-container?:end:
17826
17827 89/<- %esp 5/r32/ebp
17828 5d/pop-to-ebp
17829 c3/return
17830
17831 find-or-create-typeinfo:
17832
17833 55/push-ebp
17834 89/<- %ebp 4/r32/esp
17835
17836 50/push-eax
17837 51/push-ecx
17838 52/push-edx
17839 57/push-edi
17840
17841 8b/-> *(ebp+0xc) 7/r32/edi
17842
17843 68/push 0/imm32
17844 68/push 0/imm32
17845 89/<- %ecx 4/r32/esp
17846
17847 (find-typeinfo *(ebp+8) %edi)
17848 {
17849
17850 81 7/subop/compare *edi 0/imm32
17851 0f 85/jump-if-!= break/disp32
17852 $find-or-create-typeinfo:create:
17853
17854 (allocate Heap *Typeinfo-size %edi)
17855
17856 (lookup *edi *(edi+4))
17857
17858
17859
17860
17861
17862
17863
17864 8b/-> *(ebp+8) 2/r32/edx
17865 89/<- *eax 2/r32/edx
17866
17867
17868 (new-stream Heap 0x40 *Typeinfo-fields-row-size %ecx)
17869
17870 8b/-> *ecx 2/r32/edx
17871 89/<- *(eax+4) 2/r32/edx
17872 8b/-> *(ecx+4) 2/r32/edx
17873 89/<- *(eax+8) 2/r32/edx
17874
17875 8b/-> *_Program-types 1/r32/ecx
17876 89/<- *(eax+0x10) 1/r32/ecx
17877 8b/-> *_Program-types->payload 1/r32/ecx
17878 89/<- *(eax+0x14) 1/r32/ecx
17879
17880 8b/-> *edi 1/r32/ecx
17881 89/<- *_Program-types 1/r32/ecx
17882 8b/-> *(edi+4) 1/r32/ecx
17883 89/<- *_Program-types->payload 1/r32/ecx
17884 }
17885 $find-or-create-typeinfo:end:
17886
17887 81 0/subop/add %esp 8/imm32
17888
17889 5f/pop-to-edi
17890 5a/pop-to-edx
17891 59/pop-to-ecx
17892 58/pop-to-eax
17893
17894 89/<- %esp 5/r32/ebp
17895 5d/pop-to-ebp
17896 c3/return
17897
17898 find-typeinfo:
17899
17900 55/push-ebp
17901 89/<- %ebp 4/r32/esp
17902
17903 50/push-eax
17904 51/push-ecx
17905 52/push-edx
17906 57/push-edi
17907
17908 8b/-> *(ebp+8) 1/r32/ecx
17909
17910 8b/-> *(ebp+0xc) 7/r32/edi
17911
17912 8b/-> *_Program-types 0/r32/eax
17913 89/<- *edi 0/r32/eax
17914 8b/-> *_Program-types->payload 0/r32/eax
17915 89/<- *(edi+4) 0/r32/eax
17916 {
17917 $find-typeinfo:loop:
17918
17919 81 7/subop/compare *edi 0/imm32
17920 74/jump-if-= break/disp8
17921 $find-typeinfo:check:
17922
17923 (lookup *edi *(edi+4))
17924
17925 39/compare *eax 1/r32/ecx
17926 74/jump-if-= break/disp8
17927 $find-typeinfo:continue:
17928
17929 8b/-> *(eax+0x10) 2/r32/edx
17930 89/<- *edi 2/r32/edx
17931 8b/-> *(eax+0x14) 2/r32/edx
17932 89/<- *(edi+4) 2/r32/edx
17933
17934 eb/jump loop/disp8
17935 }
17936 $find-typeinfo:end:
17937
17938 5f/pop-to-edi
17939 5a/pop-to-edx
17940 59/pop-to-ecx
17941 58/pop-to-eax
17942
17943 89/<- %esp 5/r32/ebp
17944 5d/pop-to-ebp
17945 c3/return
17946
17947 find-or-create-typeinfo-output-var:
17948
17949 55/push-ebp
17950 89/<- %ebp 4/r32/esp
17951
17952 50/push-eax
17953 52/push-edx
17954 57/push-edi
17955
17956 68/push 0/imm32
17957 68/push 0/imm32
17958 89/<- %edi 4/r32/esp
17959
17960 (find-or-create-typeinfo-fields *(ebp+8) *(ebp+0xc) %edi)
17961
17962 (lookup *edi *(edi+4))
17963 89/<- %edi 0/r32/eax
17964
17965 {
17966 81 7/subop/compare *(edi+0xc) 0/imm32
17967 0f 85/jump-if-!= break/disp32
17968
17969
17970 68/push 0/imm32
17971 68/push 0/imm32
17972 89/<- %eax 4/r32/esp
17973 (slice-to-string Heap *(ebp+0xc) %eax)
17974
17975 8d/copy-address *(edi+0xc) 2/r32/edx
17976 (new-var Heap *eax *(eax+4) %edx)
17977
17978 81 0/subop/add %esp 8/imm32
17979
17980 (lookup *(edi+0xc) *(edi+0x10))
17981 89/<- %edx 0/r32/eax
17982
17983 8d/copy-address *(edx+8) 0/r32/eax
17984 (allocate Heap *Type-tree-size %eax)
17985 (lookup *(edx+8) *(edx+0xc))
17986 c7 0/subop/copy *eax 1/imm32/true
17987 c7 0/subop/copy *(eax+4) 6/imm32/constant
17988 c7 0/subop/copy *(eax+8) 0/imm32
17989 c7 0/subop/copy *(eax+0xc) 0/imm32
17990 c7 0/subop/copy *(eax+0x10) 0/imm32
17991
17992 c7 0/subop/copy *(edx+0x14) -1/imm32/uninitialized
17993 }
17994
17995 8b/-> *(ebp+0x10) 2/r32/edx
17996 8b/-> *(edi+0xc) 0/r32/eax
17997 89/<- *edx 0/r32/eax
17998 8b/-> *(edi+0x10) 0/r32/eax
17999 89/<- *(edx+4) 0/r32/eax
18000 $find-or-create-typeinfo-output-var:end:
18001
18002 81 0/subop/add %esp 8/imm32
18003
18004 5f/pop-to-edi
18005 5a/pop-to-edx
18006 58/pop-to-eax
18007
18008 89/<- %esp 5/r32/ebp
18009 5d/pop-to-ebp
18010 c3/return
18011
18012 find-or-create-typeinfo-fields:
18013
18014 55/push-ebp
18015 89/<- %ebp 4/r32/esp
18016
18017 50/push-eax
18018 56/push-esi
18019 57/push-edi
18020
18021 8b/-> *(ebp+8) 0/r32/eax
18022 (lookup *(eax+4) *(eax+8))
18023
18024 8b/-> *(ebp+0x10) 7/r32/edi
18025
18026 (get-or-insert-slice %eax *(ebp+0xc) *Typeinfo-fields-row-size Heap)
18027 89/<- %esi 0/r32/eax
18028
18029 {
18030 81 7/subop/compare *esi 0/imm32
18031 75/jump-if-!= break/disp8
18032 (allocate Heap *Typeinfo-entry-size %esi)
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048 }
18049
18050
18051 8b/-> *esi 0/r32/eax
18052 89/<- *edi 0/r32/eax
18053 8b/-> *(esi+4) 0/r32/eax
18054 89/<- *(edi+4) 0/r32/eax
18055 $find-or-create-typeinfo-fields:end:
18056
18057 5f/pop-to-edi
18058 5e/pop-to-esi
18059 58/pop-to-eax
18060
18061 89/<- %esp 5/r32/ebp
18062 5d/pop-to-ebp
18063 c3/return
18064
18065 populate-mu-type:
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091 55/push-ebp
18092 89/<- %ebp 4/r32/esp
18093
18094 68/push 0/imm32
18095
18096 50/push-eax
18097 51/push-ecx
18098 52/push-edx
18099 53/push-ebx
18100 56/push-esi
18101 57/push-edi
18102
18103 8b/-> *(ebp+0xc) 7/r32/edi
18104
18105 81 5/subop/subtract %esp 0x200/imm32
18106 68/push 0x200/imm32/size
18107 68/push 0/imm32/read
18108 68/push 0/imm32/write
18109 89/<- %ecx 4/r32/esp
18110
18111 68/push 0/imm32/end
18112 68/push 0/imm32/start
18113 89/<- %edx 4/r32/esp
18114
18115 68/push 0/imm32
18116 68/push 0/imm32
18117 89/<- %esi 4/r32/esp
18118
18119 68/push 0/imm32
18120 68/push 0/imm32
18121 89/<- %ebx 4/r32/esp
18122 {
18123 $populate-mu-type:line-loop:
18124 (clear-stream %ecx)
18125 (read-line-buffered *(ebp+8) %ecx)
18126
18127 81 7/subop/compare *ecx 0/imm32
18128 0f 84/jump-if-= $populate-mu-type:error1/disp32
18129 +-- 6 lines: #? # dump line ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18135 (next-mu-token %ecx %edx)
18136
18137 (slice-empty? %edx)
18138 3d/compare-eax-and 0/imm32
18139 0f 85/jump-if-!= loop/disp32
18140
18141 (slice-equal? %edx "}")
18142 3d/compare-eax-and 0/imm32
18143 0f 85/jump-if-!= break/disp32
18144 $populate-mu-type:parse-element:
18145
18146
18147
18148
18149 (parse-var-with-type %edx %ecx %esi *(ebp+0x10) *(ebp+0x14))
18150
18151 (lookup *esi *(esi+4))
18152 (lookup *(eax+8) *(eax+0xc))
18153 (is-mu-addr-type? %eax)
18154 3d/compare-eax-and 0/imm32/false
18155 0f 85/jump-if-!= $populate-mu-type:error2/disp32
18156
18157 (lookup *esi *(esi+4))
18158 (lookup *(eax+8) *(eax+0xc))
18159 (is-mu-array-type? %eax)
18160 3d/compare-eax-and 0/imm32/false
18161 0f 85/jump-if-!= $populate-mu-type:error3/disp32
18162
18163 (lookup *esi *(esi+4))
18164 (lookup *(eax+8) *(eax+0xc))
18165 (is-simple-mu-type? %eax 8)
18166 3d/compare-eax-and 0/imm32/false
18167 0f 85/jump-if-!= $populate-mu-type:error4/disp32
18168
18169 (lookup *esi *(esi+4))
18170 (lookup *(eax+8) *(eax+0xc))
18171 (is-simple-mu-type? %eax 0xc)
18172 3d/compare-eax-and 0/imm32/false
18173 0f 85/jump-if-!= $populate-mu-type:error5/disp32
18174
18175 (lookup *esi *(esi+4))
18176 (lookup *(eax+8) *(eax+0xc))
18177 (is-mu-stream-type? %eax)
18178 3d/compare-eax-and 0/imm32/false
18179 0f 85/jump-if-!= $populate-mu-type:error6/disp32
18180
18181 51/push-ecx
18182 $populate-mu-type:create-typeinfo-fields:
18183
18184 (find-or-create-typeinfo-fields %edi %edx %ebx)
18185
18186 (lookup *ebx *(ebx+4))
18187 8b/-> *(ebp-4) 1/r32/ecx
18188
18189
18190
18191
18192
18193
18194 89/<- *(eax+8) 1/r32/ecx
18195
18196 ff 0/subop/increment *(ebp-4)
18197 $populate-mu-type:set-input-type:
18198
18199 8b/-> *esi 1/r32/ecx
18200 89/<- *eax 1/r32/ecx
18201 8b/-> *(esi+4) 1/r32/ecx
18202 89/<- *(eax+4) 1/r32/ecx
18203
18204 59/pop-to-ecx
18205 {
18206 $populate-mu-type:create-output-type:
18207
18208 81 7/subop/compare *(eax+0xc) 0/imm32
18209 75/jump-if-!= break/disp8
18210 8d/copy-address *(eax+0xc) 0/r32/eax
18211 (new-literal Heap %edx %eax)
18212 }
18213 e9/jump loop/disp32
18214 }
18215 $populate-mu-type:invalidate-total-size-in-bytes:
18216
18217
18218
18219 c7 0/subop/copy *(edi+0xc) -2/imm32/uninitialized
18220 $populate-mu-type:end:
18221
18222 81 0/subop/add %esp 0x224/imm32
18223
18224 5f/pop-to-edi
18225 5e/pop-to-esi
18226 5b/pop-to-ebx
18227 5a/pop-to-edx
18228 59/pop-to-ecx
18229 58/pop-to-eax
18230
18231 81 0/subop/add %esp 4/imm32
18232
18233 89/<- %esp 5/r32/ebp
18234 5d/pop-to-ebp
18235 c3/return
18236
18237 $populate-mu-type:error1:
18238
18239 (write-buffered *(ebp+0x10) "incomplete type definition '")
18240 (type-name *edi)
18241 (write-buffered *(ebp+0x10) %eax)
18242 (write-buffered *(ebp+0x10) "\n")
18243 (flush *(ebp+0x10))
18244 (stop *(ebp+0x14) 1)
18245
18246
18247 $populate-mu-type:error2:
18248 (write-buffered *(ebp+0x10) "type ")
18249 (type-name *edi)
18250 (write-buffered *(ebp+0x10) %eax)
18251 (write-buffered *(ebp+0x10) ": 'addr' elements not allowed\n")
18252 (flush *(ebp+0x10))
18253 (stop *(ebp+0x14) 1)
18254
18255
18256 $populate-mu-type:error3:
18257 (write-buffered *(ebp+0x10) "type ")
18258 (type-name *edi)
18259 (write-buffered *(ebp+0x10) %eax)
18260 (write-buffered *(ebp+0x10) ": 'array' elements not allowed for now\n")
18261 (flush *(ebp+0x10))
18262 (stop *(ebp+0x14) 1)
18263
18264
18265 $populate-mu-type:error4:
18266 (write-buffered *(ebp+0x10) "type ")
18267 (type-name *edi)
18268 (write-buffered *(ebp+0x10) %eax)
18269 (write-buffered *(ebp+0x10) ": 'byte' elements not allowed\n")
18270 (flush *(ebp+0x10))
18271 (stop *(ebp+0x14) 1)
18272
18273
18274 $populate-mu-type:error5:
18275 (write-buffered *(ebp+0x10) "type ")
18276 (type-name *edi)
18277 (write-buffered *(ebp+0x10) %eax)
18278 (write-buffered *(ebp+0x10) ": 'slice' elements not allowed\n")
18279 (flush *(ebp+0x10))
18280 (stop *(ebp+0x14) 1)
18281
18282
18283 $populate-mu-type:error6:
18284 (write-buffered *(ebp+0x10) "type ")
18285 (type-name *edi)
18286 (write-buffered *(ebp+0x10) %eax)
18287 (write-buffered *(ebp+0x10) ": 'stream' elements not allowed for now\n")
18288 (flush *(ebp+0x10))
18289 (stop *(ebp+0x14) 1)
18290
18291
18292 type-name:
18293
18294 55/push-ebp
18295 89/<- %ebp 4/r32/esp
18296
18297 (index Type-id *(ebp+8))
18298 $type-name:end:
18299
18300 89/<- %esp 5/r32/ebp
18301 5d/pop-to-ebp
18302 c3/return
18303
18304 index:
18305
18306 55/push-ebp
18307 89/<- %ebp 4/r32/esp
18308
18309 56/push-esi
18310
18311
18312 8b/-> *(ebp+8) 6/r32/esi
18313
18314 8b/-> *(ebp+0xc) 0/r32/eax
18315
18316 8b/-> *(esi+eax<<2+0xc) 0/r32/eax
18317 $index:end:
18318
18319 5e/pop-to-esi
18320
18321 89/<- %esp 5/r32/ebp
18322 5d/pop-to-ebp
18323 c3/return
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334 populate-mu-type-sizes:
18335
18336 55/push-ebp
18337 89/<- %ebp 4/r32/esp
18338 $populate-mu-type-sizes:total-sizes:
18339
18340 (lookup *_Program-types *_Program-types->payload)
18341 {
18342
18343 3d/compare-eax-and 0/imm32/null
18344 74/jump-if-= break/disp8
18345 (populate-mu-type-sizes-in-type %eax *(ebp+8) *(ebp+0xc))
18346
18347 (lookup *(eax+0x10) *(eax+0x14))
18348 eb/jump loop/disp8
18349 }
18350 $populate-mu-type-sizes:offsets:
18351
18352 (lookup *_Program-types *_Program-types->payload)
18353 {
18354
18355 3d/compare-eax-and 0/imm32/null
18356 74/jump-if-= break/disp8
18357 (populate-mu-type-offsets %eax *(ebp+8) *(ebp+0xc))
18358
18359 (lookup *(eax+0x10) *(eax+0x14))
18360 eb/jump loop/disp8
18361 }
18362 $populate-mu-type-sizes:end:
18363
18364 89/<- %esp 5/r32/ebp
18365 5d/pop-to-ebp
18366 c3/return
18367
18368
18369
18370
18371 populate-mu-type-sizes-in-type:
18372
18373 55/push-ebp
18374 89/<- %ebp 4/r32/esp
18375
18376 50/push-eax
18377 51/push-ecx
18378 52/push-edx
18379 56/push-esi
18380 57/push-edi
18381
18382 8b/-> *(ebp+8) 6/r32/esi
18383
18384 81 7/subop/compare *(esi+0xc) 0/imm32
18385 0f 8d/jump-if->= $populate-mu-type-sizes-in-type:end/disp32
18386
18387 81 7/subop/compare *(esi+0xc) -1/imm32/being-computed
18388 0f 84/jump-if-= $populate-mu-type-sizes-in-type:abort/disp32
18389
18390 c7 0/subop/copy *(esi+0xc) -1/imm32/being-computed
18391
18392 bf/copy-to-edi 0/imm32
18393
18394
18395 (lookup *(esi+4) *(esi+8))
18396 89/<- %ecx 0/r32/eax
18397
18398 8b/-> *ecx 2/r32/edx
18399
18400 8d/copy-address *(ecx+0xc) 1/r32/ecx
18401
18402 8d/copy-address *(ecx+edx) 2/r32/edx
18403 {
18404 $populate-mu-type-sizes-in-type:loop:
18405
18406 39/compare %ecx 2/r32/edx
18407 73/jump-if-addr>= break/disp8
18408
18409 (lookup *(ecx+8) *(ecx+0xc))
18410
18411 81 7/subop/compare *eax 0/imm32
18412 74/jump-if-= $populate-mu-type-sizes-in-type:end/disp8
18413
18414 (lookup *eax *(eax+4))
18415 (compute-size-of-var %eax *(ebp+0xc) *(ebp+0x10))
18416
18417 01/add-to %edi 0/r32/eax
18418
18419 81 0/subop/add %ecx 0x10/imm32
18420
18421 eb/jump loop/disp8
18422 }
18423
18424 89/<- *(esi+0xc) 7/r32/edi
18425 $populate-mu-type-sizes-in-type:end:
18426
18427 5f/pop-to-edi
18428 5e/pop-to-esi
18429 5a/pop-to-edx
18430 59/pop-to-ecx
18431 58/pop-to-eax
18432
18433 89/<- %esp 5/r32/ebp
18434 5d/pop-to-ebp
18435 c3/return
18436
18437 $populate-mu-type-sizes-in-type:abort:
18438 (write-buffered *(ebp+0xc) "cycle in type definitions\n")
18439 (flush *(ebp+0xc))
18440 (stop *(ebp+0x10) 1)
18441
18442
18443
18444
18445 compute-size-of-var:
18446
18447 55/push-ebp
18448 89/<- %ebp 4/r32/esp
18449
18450 51/push-ecx
18451
18452 8b/-> *(ebp+8) 1/r32/ecx
18453 (lookup *(ecx+8) *(ecx+0xc))
18454 89/<- %ecx 0/r32/eax
18455
18456 {
18457 81 7/subop/compare *ecx 0/imm32/false
18458 75/jump-if-!= break/disp8
18459 (lookup *(ecx+4) *(ecx+8))
18460 89/<- %ecx 0/r32/eax
18461 }
18462
18463 (compute-size-of-type-id *(ecx+4) *(ebp+0xc) *(ebp+0x10))
18464 $compute-size-of-var:end:
18465
18466 59/pop-to-ecx
18467
18468 89/<- %esp 5/r32/ebp
18469 5d/pop-to-ebp
18470 c3/return
18471
18472 compute-size-of-type-id:
18473
18474 55/push-ebp
18475 89/<- %ebp 4/r32/esp
18476
18477 51/push-ecx
18478
18479 68/push 0/imm32
18480 68/push 0/imm32
18481 89/<- %ecx 4/r32/esp
18482
18483 8b/-> *(ebp+8) 0/r32/eax
18484
18485 3d/compare-eax-and 0/imm32/literal
18486 0f 84/jump-if-= $compute-size-of-type-id:end/disp32
18487
18488 3d/compare-eax-and 8/imm32/byte
18489 {
18490 75/jump-if-!= break/disp8
18491 b8/copy-to-eax 4/imm32
18492 eb/jump $compute-size-of-type-id:end/disp8
18493 }
18494
18495 3d/compare-eax-and 4/imm32/handle
18496 {
18497 75/jump-if-!= break/disp8
18498 b8/copy-to-eax 8/imm32
18499 eb/jump $compute-size-of-type-id:end/disp8
18500 }
18501
18502 3d/compare-eax-and 0xc/imm32/slice
18503 {
18504 75/jump-if-!= break/disp8
18505 b8/copy-to-eax 8/imm32
18506 eb/jump $compute-size-of-type-id:end/disp8
18507 }
18508
18509
18510 (find-typeinfo %eax %ecx)
18511 {
18512 81 7/subop/compare *ecx 0/imm32
18513 74/jump-if-= break/disp8
18514 $compute-size-of-type-id:user-defined:
18515 (lookup *ecx *(ecx+4))
18516 (populate-mu-type-sizes-in-type %eax *(ebp+0xc) *(ebp+0x10))
18517 8b/-> *(eax+0xc) 0/r32/eax
18518 eb/jump $compute-size-of-type-id:end/disp8
18519 }
18520
18521 b8/copy-to-eax 4/imm32
18522 $compute-size-of-type-id:end:
18523
18524 81 0/subop/add %esp 8/imm32
18525
18526 59/pop-to-ecx
18527
18528 89/<- %esp 5/r32/ebp
18529 5d/pop-to-ebp
18530 c3/return
18531
18532
18533
18534
18535 populate-mu-type-offsets:
18536
18537 55/push-ebp
18538 89/<- %ebp 4/r32/esp
18539
18540 50/push-eax
18541 51/push-ecx
18542 52/push-edx
18543 53/push-ebx
18544 56/push-esi
18545 57/push-edi
18546
18547
18548 bf/copy-to-edi 0/imm32
18549
18550 8b/-> *(ebp+8) 1/r32/ecx
18551 (lookup *(ecx+4) *(ecx+8))
18552 89/<- %ecx 0/r32/eax
18553
18554 8b/-> *ecx 2/r32/edx
18555 c1 5/subop/shift-right-logical %edx 4/imm8
18556
18557 bb/copy-to-ebx 0/imm32
18558 {
18559 $populate-mu-type-offsets:loop:
18560 39/compare %ebx 2/r32/edx
18561 0f 8d/jump-if->= break/disp32
18562
18563
18564
18565
18566
18567
18568
18569 (locate-typeinfo-entry-with-index %ecx %ebx *(ebp+0xc) *(ebp+0x10))
18570 89/<- %esi 0/r32/eax
18571
18572 81 7/subop/compare %esi 0/imm32
18573 74/jump-if-= $populate-mu-type-offsets:end/disp8
18574
18575 81 7/subop/compare *esi 0/imm32
18576 74/jump-if-= $populate-mu-type-offsets:end/disp8
18577
18578
18579 (lookup *(esi+0xc) *(esi+0x10))
18580 89/<- *(eax+0x14) 7/r32/edi
18581
18582 (lookup *esi *(esi+4))
18583 (size-of %eax)
18584 01/add-to %edi 0/r32/eax
18585
18586 43/increment-ebx
18587 e9/jump loop/disp32
18588 }
18589 $populate-mu-type-offsets:end:
18590
18591 5f/pop-to-edi
18592 5e/pop-to-esi
18593 5b/pop-to-ebx
18594 5a/pop-to-edx
18595 59/pop-to-ecx
18596 58/pop-to-eax
18597
18598 89/<- %esp 5/r32/ebp
18599 5d/pop-to-ebp
18600 c3/return
18601
18602 locate-typeinfo-entry-with-index:
18603
18604 55/push-ebp
18605 89/<- %ebp 4/r32/esp
18606
18607 51/push-ecx
18608 52/push-edx
18609 53/push-ebx
18610 56/push-esi
18611 57/push-edi
18612
18613 8b/-> *(ebp+8) 6/r32/esi
18614
18615 8d/copy-address *(esi+0xc) 1/r32/ecx
18616
18617 8b/-> *esi 2/r32/edx
18618 8d/copy-address *(ecx+edx) 2/r32/edx
18619 {
18620 $locate-typeinfo-entry-with-index:loop:
18621 39/compare %ecx 2/r32/edx
18622 73/jump-if-addr>= break/disp8
18623
18624 (lookup *(ecx+8) *(ecx+0xc))
18625
18626 8b/-> *(eax+8) 3/r32/ebx
18627
18628
18629
18630
18631
18632
18633 39/compare *(ebp+0xc) 3/r32/ebx
18634 74/jump-if-= $locate-typeinfo-entry-with-index:end/disp8
18635
18636 81 0/subop/add %ecx 0x10/imm32
18637
18638 eb/jump loop/disp8
18639 }
18640
18641 b8/copy-to-eax 0/imm32
18642 $locate-typeinfo-entry-with-index:end:
18643
18644
18645
18646
18647
18648 5f/pop-to-edi
18649 5e/pop-to-esi
18650 5b/pop-to-ebx
18651 5a/pop-to-edx
18652 59/pop-to-ecx
18653
18654 89/<- %esp 5/r32/ebp
18655 5d/pop-to-ebp
18656 c3/return
18657
18658 dump-typeinfos:
18659
18660 55/push-ebp
18661 89/<- %ebp 4/r32/esp
18662
18663 50/push-eax
18664
18665 (write-buffered Stderr *(ebp+8))
18666 (flush Stderr)
18667
18668 (lookup *_Program-types *_Program-types->payload)
18669 {
18670
18671 3d/compare-eax-and 0/imm32
18672 74/jump-if-= break/disp8
18673 (write-buffered Stderr "---\n")
18674 (flush Stderr)
18675 (dump-typeinfo %eax)
18676
18677 (lookup *(eax+0x10) *(eax+0x14))
18678 eb/jump loop/disp8
18679 }
18680 $dump-typeinfos:end:
18681
18682 58/pop-to-eax
18683
18684 89/<- %esp 5/r32/ebp
18685 5d/pop-to-ebp
18686 c3/return
18687
18688 dump-typeinfo:
18689
18690 55/push-ebp
18691 89/<- %ebp 4/r32/esp
18692
18693 50/push-eax
18694 51/push-ecx
18695 52/push-edx
18696 53/push-ebx
18697 56/push-esi
18698 57/push-edi
18699
18700 8b/-> *(ebp+8) 6/r32/esi
18701
18702 (lookup *(esi+4) *(esi+8))
18703 89/<- %ecx 0/r32/eax
18704 (write-buffered Stderr "id:")
18705 (write-int32-hex-buffered Stderr *esi)
18706 (write-buffered Stderr "\n")
18707 (write-buffered Stderr "fields @ ")
18708 (write-int32-hex-buffered Stderr %ecx)
18709 (write-buffered Stderr Newline)
18710 (flush Stderr)
18711 (write-buffered Stderr " write: ")
18712 (write-int32-hex-buffered Stderr *ecx)
18713 (write-buffered Stderr Newline)
18714 (flush Stderr)
18715 (write-buffered Stderr " read: ")
18716 (write-int32-hex-buffered Stderr *(ecx+4))
18717 (write-buffered Stderr Newline)
18718 (flush Stderr)
18719 (write-buffered Stderr " size: ")
18720 (write-int32-hex-buffered Stderr *(ecx+8))
18721 (write-buffered Stderr Newline)
18722 (flush Stderr)
18723
18724 8b/-> *ecx 2/r32/edx
18725
18726 8d/copy-address *(ecx+0xc) 1/r32/ecx
18727
18728 8d/copy-address *(ecx+edx) 2/r32/edx
18729 {
18730 $dump-typeinfo:loop:
18731
18732 39/compare %ecx 2/r32/edx
18733 0f 83/jump-if-addr>= break/disp32
18734 (write-buffered Stderr " row:\n")
18735 (write-buffered Stderr " key: ")
18736 (write-int32-hex-buffered Stderr *ecx)
18737 (write-buffered Stderr ",")
18738 (write-int32-hex-buffered Stderr *(ecx+4))
18739 (write-buffered Stderr " = '")
18740 (lookup *ecx *(ecx+4))
18741 (write-buffered Stderr %eax)
18742 (write-buffered Stderr "' @ ")
18743 (write-int32-hex-buffered Stderr %eax)
18744 (write-buffered Stderr Newline)
18745 (flush Stderr)
18746 (write-buffered Stderr " value: ")
18747 (write-int32-hex-buffered Stderr *(ecx+8))
18748 (write-buffered Stderr ",")
18749 (write-int32-hex-buffered Stderr *(ecx+0xc))
18750 (write-buffered Stderr " = typeinfo-entry@")
18751 (lookup *(ecx+8) *(ecx+0xc))
18752 (write-int32-hex-buffered Stderr %eax)
18753 (write-buffered Stderr Newline)
18754 (flush Stderr)
18755 (write-buffered Stderr " input var@")
18756 (dump-var 5 %eax)
18757 (lookup *(ecx+8) *(ecx+0xc))
18758 (write-buffered Stderr " index: ")
18759 (write-int32-hex-buffered Stderr *(eax+8))
18760 (write-buffered Stderr Newline)
18761 (flush Stderr)
18762 (write-buffered Stderr " output var@")
18763 8d/copy-address *(eax+0xc) 0/r32/eax
18764 (dump-var 5 %eax)
18765 (flush Stderr)
18766
18767 81 0/subop/add %ecx 0x10/imm32
18768
18769 e9/jump loop/disp32
18770 }
18771 $dump-typeinfo:end:
18772
18773 5f/pop-to-edi
18774 5e/pop-to-esi
18775 5b/pop-to-ebx
18776 5a/pop-to-edx
18777 59/pop-to-ecx
18778 58/pop-to-eax
18779
18780 89/<- %esp 5/r32/ebp
18781 5d/pop-to-ebp
18782 c3/return
18783
18784 dump-var:
18785
18786 55/push-ebp
18787 89/<- %ebp 4/r32/esp
18788
18789 50/push-eax
18790 53/push-ebx
18791
18792 8b/-> *(ebp+0xc) 0/r32/eax
18793
18794 (write-int32-hex-buffered Stderr *eax)
18795 (write-buffered Stderr ",")
18796 (write-int32-hex-buffered Stderr *(eax+4))
18797 (write-buffered Stderr "->")
18798 (lookup *eax *(eax+4))
18799 (write-int32-hex-buffered Stderr %eax)
18800 (write-buffered Stderr Newline)
18801 (flush Stderr)
18802 {
18803 3d/compare-eax-and 0/imm32
18804 0f 84/jump-if-= break/disp32
18805 (emit-indent Stderr *(ebp+8))
18806 (write-buffered Stderr "name: ")
18807 89/<- %ebx 0/r32/eax
18808 (write-int32-hex-buffered Stderr *ebx)
18809 (write-buffered Stderr ",")
18810 (write-int32-hex-buffered Stderr *(ebx+4))
18811 (write-buffered Stderr "->")
18812 (lookup *ebx *(ebx+4))
18813 (write-int32-hex-buffered Stderr %eax)
18814 {
18815 3d/compare-eax-and 0/imm32
18816 74/jump-if-= break/disp8
18817 (write-buffered Stderr Space)
18818 (write-buffered Stderr %eax)
18819 }
18820 (write-buffered Stderr Newline)
18821 (flush Stderr)
18822 (emit-indent Stderr *(ebp+8))
18823 (write-buffered Stderr "block depth: ")
18824 (write-int32-hex-buffered Stderr *(ebx+0x10))
18825 (write-buffered Stderr Newline)
18826 (flush Stderr)
18827 (emit-indent Stderr *(ebp+8))
18828 (write-buffered Stderr "stack offset: ")
18829 (write-int32-hex-buffered Stderr *(ebx+0x14))
18830 (write-buffered Stderr Newline)
18831 (flush Stderr)
18832 (emit-indent Stderr *(ebp+8))
18833 (write-buffered Stderr "reg: ")
18834 (write-int32-hex-buffered Stderr *(ebx+0x18))
18835 (write-buffered Stderr ",")
18836 (write-int32-hex-buffered Stderr *(ebx+0x1c))
18837 (write-buffered Stderr "->")
18838 (flush Stderr)
18839 (lookup *(ebx+0x18) *(ebx+0x1c))
18840 (write-int32-hex-buffered Stderr %eax)
18841 {
18842 3d/compare-eax-and 0/imm32
18843 74/jump-if-= break/disp8
18844 (write-buffered Stderr Space)
18845 (write-buffered Stderr %eax)
18846 }
18847 (write-buffered Stderr Newline)
18848 (flush Stderr)
18849 }
18850 $dump-var:end:
18851
18852 5b/pop-to-ebx
18853 58/pop-to-eax
18854
18855 89/<- %esp 5/r32/ebp
18856 5d/pop-to-ebp
18857 c3/return
18858
18859
18860
18861
18862
18863 check-mu-types:
18864
18865 55/push-ebp
18866 89/<- %ebp 4/r32/esp
18867
18868 50/push-eax
18869
18870 (lookup *_Program-functions *_Program-functions->payload)
18871 {
18872 $check-mu-types:loop:
18873
18874 3d/compare-eax-and 0/imm32
18875 0f 84/jump-if-= break/disp32
18876 +-- 8 lines: #? # dump curr->name ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18884 (check-mu-function %eax *(ebp+8) *(ebp+0xc))
18885
18886 (lookup *(eax+0x20) *(eax+0x24))
18887 e9/jump loop/disp32
18888 }
18889 $check-mu-types:end:
18890
18891 58/pop-to-eax
18892
18893 89/<- %esp 5/r32/ebp
18894 5d/pop-to-ebp
18895 c3/return
18896
18897 check-mu-function:
18898
18899 55/push-ebp
18900 89/<- %ebp 4/r32/esp
18901
18902 50/push-eax
18903 56/push-esi
18904
18905 8b/-> *(ebp+8) 6/r32/esi
18906
18907 (lookup *(esi+0x10) *(esi+0x14))
18908 (check-all-unique-registers %eax %esi *(ebp+0xc) *(ebp+0x10))
18909
18910 (lookup *(esi+0x18) *(esi+0x1c))
18911 (check-mu-block %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10))
18912
18913 81 7/subop/compare *(esi+0x10) 0/imm32
18914 74/jump-if-= $check-mu-function:end/disp8
18915
18916 (check-final-stmt-is-return %eax %esi *(ebp+0xc) *(ebp+0x10))
18917 (check-no-breaks %eax %esi *(ebp+0xc) *(ebp+0x10))
18918 $check-mu-function:end:
18919
18920 5e/pop-to-esi
18921 58/pop-to-eax
18922
18923 89/<- %esp 5/r32/ebp
18924 5d/pop-to-ebp
18925 c3/return
18926
18927 check-mu-block:
18928
18929 55/push-ebp
18930 89/<- %ebp 4/r32/esp
18931
18932 50/push-eax
18933
18934 8b/-> *(ebp+8) 0/r32/eax
18935
18936 (lookup *(eax+4) *(eax+8))
18937
18938 {
18939 $check-mu-block:check-empty:
18940 3d/compare-eax-and 0/imm32
18941 0f 84/jump-if-= break/disp32
18942
18943 (check-mu-stmt-list %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
18944 }
18945 $check-mu-block:end:
18946
18947 58/pop-to-eax
18948
18949 89/<- %esp 5/r32/ebp
18950 5d/pop-to-ebp
18951 c3/return
18952
18953 check-mu-stmt-list:
18954
18955 55/push-ebp
18956 89/<- %ebp 4/r32/esp
18957
18958 50/push-eax
18959 56/push-esi
18960
18961 8b/-> *(ebp+8) 6/r32/esi
18962 {
18963 $check-mu-stmt-list:loop:
18964 81 7/subop/compare %esi 0/imm32
18965 0f 84/jump-if-= break/disp32
18966
18967 (lookup *esi *(esi+4))
18968 {
18969 $check-mu-stmt-list:check-for-block:
18970 81 7/subop/compare *eax 0/imm32/block
18971 75/jump-if-!= break/disp8
18972 $check-mu-stmt-list:block:
18973 (check-mu-block %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
18974 eb/jump $check-mu-stmt-list:continue/disp8
18975 }
18976 {
18977 $check-mu-stmt-list:check-for-stmt1:
18978 81 7/subop/compare *eax 1/imm32/stmt1
18979 0f 85/jump-if-!= break/disp32
18980 $check-mu-stmt-list:stmt1:
18981 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
18982 eb/jump $check-mu-stmt-list:continue/disp8
18983 }
18984 {
18985 $check-mu-stmt-list:check-for-reg-var-def:
18986 81 7/subop/compare *eax 3/imm32/reg-var-def
18987 0f 85/jump-if-!= break/disp32
18988 $check-mu-stmt-list:reg-var-def:
18989 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
18990 eb/jump $check-mu-stmt-list:continue/disp8
18991 }
18992 $check-mu-stmt-list:continue:
18993
18994 (lookup *(esi+8) *(esi+0xc))
18995 89/<- %esi 0/r32/eax
18996 e9/jump loop/disp32
18997 }
18998 $check-mu-stmt-list:end:
18999
19000 5e/pop-to-esi
19001 58/pop-to-eax
19002
19003 89/<- %esp 5/r32/ebp
19004 5d/pop-to-ebp
19005 c3/return
19006
19007 check-mu-stmt:
19008
19009 55/push-ebp
19010 89/<- %ebp 4/r32/esp
19011
19012 50/push-eax
19013
19014 (has-primitive-name? *(ebp+8))
19015 3d/compare-eax-and 0/imm32/false
19016 {
19017 74/jump-if-= break/disp8
19018 (check-mu-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19019 e9/jump $check-mu-stmt:end/disp32
19020 }
19021
19022
19023 (lookup *_Program-functions *_Program-functions->payload)
19024 (find-matching-function %eax *(ebp+8))
19025 3d/compare-eax-and 0/imm32
19026 {
19027 74/jump-if-= break/disp8
19028 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19029 eb/jump $check-mu-stmt:end/disp8
19030 }
19031
19032 (lookup *_Program-signatures *_Program-signatures->payload)
19033 (find-matching-function %eax *(ebp+8))
19034 3d/compare-eax-and 0/imm32
19035 {
19036 74/jump-if-= break/disp8
19037 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19038 eb/jump $check-mu-stmt:end/disp8
19039 }
19040
19041 e9/jump $check-mu-stmt:unknown-call/disp32
19042 $check-mu-stmt:end:
19043
19044 58/pop-to-eax
19045
19046 89/<- %esp 5/r32/ebp
19047 5d/pop-to-ebp
19048 c3/return
19049
19050 $check-mu-stmt:unknown-call:
19051 (write-buffered *(ebp+0x10) "unknown function '")
19052 8b/-> *(ebp+8) 0/r32/eax
19053 (lookup *(eax+4) *(eax+8))
19054 (write-buffered *(ebp+0x10) %eax)
19055 (write-buffered *(ebp+0x10) "'\n")
19056 (flush *(ebp+0x10))
19057 (stop *(ebp+0x14) 1)
19058
19059
19060 has-primitive-name?:
19061
19062 55/push-ebp
19063 89/<- %ebp 4/r32/esp
19064
19065 51/push-ecx
19066 56/push-esi
19067
19068 8b/-> *(ebp+8) 6/r32/esi
19069 (lookup *(esi+4) *(esi+8))
19070 89/<- %esi 0/r32/eax
19071
19072 (string-equal? %esi "return")
19073 3d/compare-eax-and 0/imm32/false
19074 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19075
19076 (string-equal? %esi "get")
19077 3d/compare-eax-and 0/imm32/false
19078 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19079
19080 (string-equal? %esi "index")
19081 3d/compare-eax-and 0/imm32/false
19082 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19083
19084 (string-equal? %esi "length")
19085 3d/compare-eax-and 0/imm32/false
19086 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19087
19088 (string-equal? %esi "compute-offset")
19089 3d/compare-eax-and 0/imm32/false
19090 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19091
19092 (string-equal? %esi "copy-object")
19093 3d/compare-eax-and 0/imm32/false
19094 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19095
19096 (string-equal? %esi "allocate")
19097 3d/compare-eax-and 0/imm32/false
19098 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19099
19100 (string-equal? %esi "populate")
19101 3d/compare-eax-and 0/imm32/false
19102 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19103
19104 (string-equal? %esi "populate-stream")
19105 3d/compare-eax-and 0/imm32/false
19106 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19107
19108 (string-equal? %esi "read-from-stream")
19109 3d/compare-eax-and 0/imm32/false
19110 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19111
19112 (string-equal? %esi "write-to-stream")
19113 3d/compare-eax-and 0/imm32/false
19114 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19115
19116 b9/copy-to-ecx Primitives/imm32
19117 {
19118 $has-primitive-name?:loop:
19119
19120 81 7/subop/compare %ecx 0/imm32
19121 74/jump-if-= break/disp8
19122
19123 (lookup *ecx *(ecx+4))
19124
19125
19126
19127 (string-equal? %esi %eax)
19128 3d/compare-eax-and 0/imm32/false
19129 75/jump-if-!= $has-primitive-name?:end/disp8
19130 $has-primitive-name?:next-primitive:
19131
19132 (lookup *(ecx+0x3c) *(ecx+0x40))
19133 89/<- %ecx 0/r32/eax
19134
19135 e9/jump loop/disp32
19136 }
19137
19138 b8/copy-to-eax 0/imm32
19139 $has-primitive-name?:end:
19140
19141 5e/pop-to-esi
19142 59/pop-to-ecx
19143
19144 89/<- %esp 5/r32/ebp
19145 5d/pop-to-ebp
19146 c3/return
19147
19148 check-mu-primitive:
19149
19150 55/push-ebp
19151 89/<- %ebp 4/r32/esp
19152
19153 50/push-eax
19154 51/push-ecx
19155
19156 8b/-> *(ebp+8) 0/r32/eax
19157 (lookup *(eax+4) *(eax+8))
19158 89/<- %ecx 0/r32/eax
19159
19160 {
19161 (string-equal? %ecx "copy")
19162 3d/compare-eax-and 0/imm32/false
19163 74/jump-if-= break/disp8
19164 (check-mu-copy-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19165 e9/jump $check-mu-primitive:end/disp32
19166 }
19167
19168 {
19169 (string-equal? %ecx "copy-to")
19170 3d/compare-eax-and 0/imm32/false
19171 74/jump-if-= break/disp8
19172 (check-mu-copy-to-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19173 e9/jump $check-mu-primitive:end/disp32
19174 }
19175
19176 {
19177 (string-equal? %ecx "compare")
19178 3d/compare-eax-and 0/imm32/false
19179 74/jump-if-= break/disp8
19180 (check-mu-compare-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19181 e9/jump $check-mu-primitive:end/disp32
19182 }
19183
19184 {
19185 (string-equal? %ecx "address")
19186 3d/compare-eax-and 0/imm32/false
19187 74/jump-if-= break/disp8
19188 (check-mu-address-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19189 e9/jump $check-mu-primitive:end/disp32
19190 }
19191
19192 {
19193 (string-equal? %ecx "return")
19194 3d/compare-eax-and 0/imm32/false
19195 74/jump-if-= break/disp8
19196 (check-mu-return-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19197 e9/jump $check-mu-primitive:end/disp32
19198 }
19199
19200 {
19201 (string-equal? %ecx "get")
19202 3d/compare-eax-and 0/imm32/false
19203 74/jump-if-= break/disp8
19204 (check-mu-get-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19205 e9/jump $check-mu-primitive:end/disp32
19206 }
19207
19208 {
19209 (string-equal? %ecx "index")
19210 3d/compare-eax-and 0/imm32/false
19211 74/jump-if-= break/disp8
19212 (check-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19213 e9/jump $check-mu-primitive:end/disp32
19214 }
19215
19216 {
19217 (string-equal? %ecx "length")
19218 3d/compare-eax-and 0/imm32/false
19219 74/jump-if-= break/disp8
19220 (check-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19221 e9/jump $check-mu-primitive:end/disp32
19222 }
19223
19224 {
19225 (string-equal? %ecx "compute-offset")
19226 3d/compare-eax-and 0/imm32/false
19227 74/jump-if-= break/disp8
19228 (check-mu-compute-offset-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19229 e9/jump $check-mu-primitive:end/disp32
19230 }
19231
19232 {
19233 (string-equal? %ecx "copy-object")
19234 3d/compare-eax-and 0/imm32/false
19235 74/jump-if-= break/disp8
19236 (check-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19237 e9/jump $check-mu-primitive:end/disp32
19238 }
19239
19240 {
19241 (string-equal? %ecx "allocate")
19242 3d/compare-eax-and 0/imm32/false
19243 74/jump-if-= break/disp8
19244 (check-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19245 e9/jump $check-mu-primitive:end/disp32
19246 }
19247
19248 {
19249 (string-equal? %ecx "populate")
19250 3d/compare-eax-and 0/imm32/false
19251 74/jump-if-= break/disp8
19252 (check-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19253 e9/jump $check-mu-primitive:end/disp32
19254 }
19255
19256 {
19257 (string-equal? %ecx "populate-stream")
19258 3d/compare-eax-and 0/imm32/false
19259 74/jump-if-= break/disp8
19260 (check-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19261 e9/jump $check-mu-primitive:end/disp32
19262 }
19263
19264 {
19265 (string-equal? %ecx "read-from-stream")
19266 3d/compare-eax-and 0/imm32/false
19267 74/jump-if-= break/disp8
19268 (check-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19269 e9/jump $check-mu-primitive:end/disp32
19270 }
19271
19272 {
19273 (string-equal? %ecx "write-to-stream")
19274 3d/compare-eax-and 0/imm32/false
19275 74/jump-if-= break/disp8
19276 (check-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19277 e9/jump $check-mu-primitive:end/disp32
19278 }
19279
19280 {
19281 (string-equal? %ecx "convert")
19282 3d/compare-eax-and 0/imm32/false
19283 74/jump-if-= break/disp8
19284 (check-mu-convert-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19285 e9/jump $check-mu-primitive:end/disp32
19286 }
19287
19288 (check-mu-numberlike-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19289 $check-mu-primitive:end:
19290
19291 59/pop-to-ecx
19292 58/pop-to-eax
19293
19294 89/<- %esp 5/r32/ebp
19295 5d/pop-to-ebp
19296 c3/return
19297
19298
19299 check-mu-numberlike-primitive:
19300
19301 55/push-ebp
19302 89/<- %ebp 4/r32/esp
19303
19304 50/push-eax
19305 51/push-ecx
19306 56/push-esi
19307
19308 8b/-> *(ebp+8) 6/r32/esi
19309
19310 b9/copy-to-ecx 2/imm32
19311
19312
19313 (lookup *(esi+0x14) *(esi+0x18))
19314 {
19315 3d/compare-eax-and 0/imm32
19316 74/jump-if-= break/disp8
19317 $check-mu-numberlike-primitive:output:
19318 (check-mu-numberlike-output %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19319 (lookup *(eax+8) *(eax+0xc))
19320 3d/compare-eax-and 0/imm32
19321 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-outputs/disp32
19322
19323
19324 49/decrement-ecx
19325 }
19326
19327 (lookup *(esi+0xc) *(esi+0x10))
19328 {
19329 3d/compare-eax-and 0/imm32
19330 0f 84/jump-if-= $check-mu-numberlike-primitive:end/disp32
19331 $check-mu-numberlike-primitive:first-inout:
19332 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19333
19334 49/decrement-ecx
19335 }
19336
19337 (lookup *(eax+8) *(eax+0xc))
19338 {
19339 3d/compare-eax-and 0/imm32
19340 74/jump-if-= $check-mu-numberlike-primitive:end/disp8
19341 $check-mu-numberlike-primitive:second-inout:
19342
19343 81 7/subop/compare %ecx 0/imm32
19344 0f 84/jump-if-= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
19345 $check-mu-numberlike-primitive:second-inout-permitted:
19346 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19347 }
19348 $check-mu-numberlike-primitive:third-inout:
19349
19350 81 7/subop/compare *(eax+8) 0/imm32
19351 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
19352 $check-mu-numberlike-primitive:end:
19353
19354 5e/pop-to-esi
19355 59/pop-to-ecx
19356 58/pop-to-eax
19357
19358 89/<- %esp 5/r32/ebp
19359 5d/pop-to-ebp
19360 c3/return
19361
19362 $check-mu-numberlike-primitive:error-too-many-inouts:
19363 (write-buffered *(ebp+0x10) "fn ")
19364 8b/-> *(ebp+0xc) 0/r32/eax
19365 (lookup *eax *(eax+4))
19366 (write-buffered *(ebp+0x10) %eax)
19367 (write-buffered *(ebp+0x10) ": stmt ")
19368 (lookup *(esi+4) *(esi+8))
19369 (write-buffered *(ebp+0x10) %eax)
19370 (write-buffered *(ebp+0x10) ": too many inouts; most primitives support at most two arguments, across inouts and outputs\n")
19371 (flush *(ebp+0x10))
19372 (stop *(ebp+0x14) 1)
19373
19374
19375 $check-mu-numberlike-primitive:error-too-many-outputs:
19376 (write-buffered *(ebp+0x10) "fn ")
19377 8b/-> *(ebp+0xc) 0/r32/eax
19378 (lookup *eax *(eax+4))
19379 (write-buffered *(ebp+0x10) %eax)
19380 (write-buffered *(ebp+0x10) ": stmt ")
19381 (lookup *(esi+4) *(esi+8))
19382 (write-buffered *(ebp+0x10) %eax)
19383 (write-buffered *(ebp+0x10) ": too many outputs; most primitives support at most one output\n")
19384 (flush *(ebp+0x10))
19385 (stop *(ebp+0x14) 1)
19386
19387
19388 check-mu-numberlike-arg:
19389
19390 55/push-ebp
19391 89/<- %ebp 4/r32/esp
19392
19393 50/push-eax
19394 56/push-esi
19395
19396 8b/-> *(ebp+8) 0/r32/eax
19397 (lookup *eax *(eax+4))
19398 (lookup *(eax+8) *(eax+0xc))
19399 89/<- %esi 0/r32/eax
19400 $check-mu-numberlike-arg:check-literal:
19401
19402 (is-simple-mu-type? %esi 0)
19403 3d/compare-eax-and 0/imm32/false
19404 0f 85/jump-if-!= $check-mu-numberlike-arg:end/disp32
19405 $check-mu-numberlike-arg:check-addr:
19406
19407 {
19408 (is-mu-addr-type? %esi)
19409 3d/compare-eax-and 0/imm32/false
19410 74/jump-if-= break/disp8
19411 8b/-> *(ebp+8) 0/r32/eax
19412 8b/-> *(eax+0x10) 0/r32/eax
19413 3d/compare-eax-and 0/imm32/false
19414 {
19415 74/jump-if-= break/disp8
19416 (lookup *(esi+0xc) *(esi+0x10))
19417
19418 81 7/subop/compare *(eax+0xc) 0/imm32
19419 {
19420 75/jump-if-!= break/disp8
19421 (lookup *(eax+4) *(eax+8))
19422 }
19423 (is-mu-addr-type? %eax)
19424 3d/compare-eax-and 0/imm32/false
19425 74/jump-if-= $check-mu-numberlike-arg:end/disp8
19426 }
19427 }
19428 $check-mu-numberlike-arg:output-checks:
19429 (check-mu-numberlike-output *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
19430 $check-mu-numberlike-arg:end:
19431
19432 5e/pop-to-esi
19433 58/pop-to-eax
19434
19435 89/<- %esp 5/r32/ebp
19436 5d/pop-to-ebp
19437 c3/return
19438
19439 check-mu-numberlike-output:
19440
19441 55/push-ebp
19442 89/<- %ebp 4/r32/esp
19443
19444 50/push-eax
19445
19446 (is-mu-numberlike-output-var? *(ebp+8))
19447 3d/compare-eax-and 0/imm32/false
19448 0f 84/jump-if-= $check-mu-numberlike-output:fail/disp32
19449 $check-mu-numberlike-output:end:
19450
19451 58/pop-to-eax
19452
19453 89/<- %esp 5/r32/ebp
19454 5d/pop-to-ebp
19455 c3/return
19456
19457 $check-mu-numberlike-output:fail:
19458
19459 (write-buffered *(ebp+0x14) "fn ")
19460 8b/-> *(ebp+0x10) 0/r32/eax
19461 (lookup *eax *(eax+4))
19462 (write-buffered *(ebp+0x14) %eax)
19463 (write-buffered *(ebp+0x14) ": stmt ")
19464 8b/-> *(ebp+0xc) 0/r32/eax
19465 (lookup *(eax+4) *(eax+8))
19466 (write-buffered *(ebp+0x14) %eax)
19467 (write-buffered *(ebp+0x14) ": '")
19468 8b/-> *(ebp+8) 0/r32/eax
19469 (lookup *eax *(eax+4))
19470 (lookup *eax *(eax+4))
19471 (write-buffered *(ebp+0x14) %eax)
19472 (write-buffered *(ebp+0x14) "' must be a non-addr non-offset scalar\n")
19473 (flush *(ebp+0x14))
19474 (stop *(ebp+0x18) 1)
19475
19476
19477 is-mu-numberlike-output-var?:
19478
19479 55/push-ebp
19480 89/<- %ebp 4/r32/esp
19481
19482 8b/-> *(ebp+8) 0/r32/eax
19483 (lookup *eax *(eax+4))
19484 (lookup *(eax+8) *(eax+0xc))
19485 (is-mu-numberlike-output? %eax)
19486 $is-mu-numberlike-output-var?:end:
19487
19488 89/<- %esp 5/r32/ebp
19489 5d/pop-to-ebp
19490 c3/return
19491
19492 is-mu-numberlike-output?:
19493
19494 55/push-ebp
19495 89/<- %ebp 4/r32/esp
19496
19497 56/push-esi
19498
19499 8b/-> *(ebp+8) 6/r32/esi
19500 $is-mu-numberlike-output?:check-int:
19501
19502 (is-simple-mu-type? %esi 1)
19503 3d/compare-eax-and 0/imm32/false
19504 0f 85/jump-if-!= $is-mu-numberlike-output?:return-true/disp32
19505 $is-mu-numberlike-output?:check-float:
19506
19507 (is-simple-mu-type? %esi 0xf)
19508 3d/compare-eax-and 0/imm32/false
19509 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
19510 $is-mu-numberlike-output?:check-boolean:
19511
19512 (is-simple-mu-type? %esi 5)
19513 3d/compare-eax-and 0/imm32/false
19514 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
19515 $is-mu-numberlike-output?:check-byte:
19516
19517 (is-simple-mu-type? %esi 8)
19518 3d/compare-eax-and 0/imm32/false
19519 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
19520 $is-mu-numberlike-output?:check-code-point:
19521
19522 (is-simple-mu-type? %esi 0xd)
19523 3d/compare-eax-and 0/imm32/false
19524 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
19525 $is-mu-numberlike-output?:check-grapheme:
19526
19527 (is-simple-mu-type? %esi 0xe)
19528 3d/compare-eax-and 0/imm32/false
19529 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
19530 $is-mu-numberlike-output?:return-false:
19531 b8/copy-to-eax 0/imm32/false
19532 eb/jump $is-mu-numberlike-output?:end/disp8
19533 $is-mu-numberlike-output?:return-true:
19534 b8/copy-to-eax 1/imm32/true
19535 $is-mu-numberlike-output?:end:
19536
19537 5e/pop-to-esi
19538
19539 89/<- %esp 5/r32/ebp
19540 5d/pop-to-ebp
19541 c3/return
19542
19543 check-mu-copy-stmt:
19544
19545 55/push-ebp
19546 89/<- %ebp 4/r32/esp
19547
19548 50/push-eax
19549 51/push-ecx
19550 52/push-edx
19551 56/push-esi
19552 57/push-edi
19553
19554 81 5/subop/subtract %esp 0x60/imm32
19555 68/push 0x60/imm32/size
19556 68/push 0/imm32/read
19557 68/push 0/imm32/write
19558 89/<- %edx 4/r32/esp
19559 $check-mu-copy-stmt:get-output:
19560
19561 8b/-> *(ebp+8) 6/r32/esi
19562
19563 (lookup *(esi+0x14) *(esi+0x18))
19564 89/<- %edi 0/r32/eax
19565
19566 3d/compare-eax-and 0/imm32
19567 0f 84/jump-if-= $check-mu-copy-stmt:error-no-output/disp32
19568
19569 (lookup *(edi+8) *(edi+0xc))
19570 3d/compare-eax-and 0/imm32
19571 0f 85/jump-if-!= $check-mu-copy-stmt:error-too-many-outputs/disp32
19572 $check-mu-copy-stmt:get-inout:
19573
19574 (lookup *(esi+0xc) *(esi+0x10))
19575 89/<- %esi 0/r32/eax
19576
19577 3d/compare-eax-and 0/imm32
19578 0f 84/jump-if-= $check-mu-copy-stmt:error-no-inout/disp32
19579
19580 (lookup *(esi+8) *(esi+0xc))
19581 3d/compare-eax-and 0/imm32
19582 0f 85/jump-if-!= $check-mu-copy-stmt:error-too-many-inouts/disp32
19583 $check-mu-copy-stmt:types:
19584
19585 (lookup *esi *(esi+4))
19586 (lookup *(eax+8) *(eax+0xc))
19587 89/<- %ecx 0/r32/eax
19588
19589 8b/-> *(esi+0x10) 0/r32/eax
19590 3d/compare-eax-and 0/imm32/false
19591 {
19592 74/jump-if-= break/disp8
19593 (lookup *(ecx+0xc) *(ecx+0x10))
19594
19595 81 7/subop/compare *(eax+0xc) 0/imm32
19596 {
19597 75/jump-if-!= break/disp8
19598 (lookup *(eax+4) *(eax+8))
19599 }
19600 89/<- %ecx 0/r32/eax
19601 }
19602
19603 (lookup *edi *(edi+4))
19604 (lookup *(eax+0x18) *(eax+0x1c))
19605 3d/compare-eax-and 0/imm32
19606 0f 84/jump-if-= $check-mu-copy-stmt:error-output-not-in-register/disp32
19607
19608 (lookup *esi *(esi+4))
19609 (size-of %eax)
19610 3d/compare-eax-and 4/imm32
19611 0f 8f/jump-if-> $check-mu-copy-stmt:error-inout-too-large/disp32
19612
19613 (lookup *edi *(edi+4))
19614 (lookup *(eax+8) *(eax+0xc))
19615
19616 (type-match? %eax %ecx %edx)
19617 3d/compare-eax-and 0/imm32
19618 0f 85/jump-if-!= $check-mu-copy-stmt:end/disp32
19619
19620 {
19621 (lookup *edi *(edi+4))
19622 (lookup *(eax+8) *(eax+0xc))
19623 (is-mu-addr-type? %eax)
19624 3d/compare-eax-and 0/imm32/false
19625 74/jump-if-= break/disp8
19626 (lookup *esi *(esi+4))
19627 (lookup *eax *(eax+4))
19628 (string-equal? %eax "0")
19629 3d/compare-eax-and 0/imm32/false
19630 74/jump-if-= break/disp8
19631 e9/jump $check-mu-copy-stmt:end/disp32
19632 }
19633
19634 {
19635 (lookup *edi *(edi+4))
19636 (lookup *(eax+8) *(eax+0xc))
19637 81 7/subop/compare *eax 0/imm32/false
19638 75/jump-if-!= break/disp8
19639 (lookup *(eax+4) *(eax+8))
19640 (is-simple-mu-type? %eax 7)
19641 3d/compare-eax-and 0/imm32/false
19642 74/jump-if-= break/disp8
19643 (lookup *esi *(esi+4))
19644 (lookup *eax *(eax+4))
19645 (string-equal? %eax "0")
19646 3d/compare-eax-and 0/imm32/false
19647 74/jump-if-= break/disp8
19648 eb/jump $check-mu-copy-stmt:end/disp8
19649 }
19650
19651 (check-mu-numberlike-output %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19652 $check-mu-copy-stmt:end:
19653
19654 81 0/subop/add %esp 0x6c/imm32
19655
19656 5f/pop-to-edi
19657 5e/pop-to-esi
19658 5a/pop-to-edx
19659 59/pop-to-ecx
19660 58/pop-to-eax
19661
19662 89/<- %esp 5/r32/ebp
19663 5d/pop-to-ebp
19664 c3/return
19665
19666 $check-mu-copy-stmt:error-no-inout:
19667 (write-buffered *(ebp+0x10) "fn ")
19668 8b/-> *(ebp+0xc) 0/r32/eax
19669 (lookup *eax *(eax+4))
19670 (write-buffered *(ebp+0x10) %eax)
19671 (write-buffered *(ebp+0x10) ": stmt 'copy' expects an inout\n")
19672 (flush *(ebp+0x10))
19673 (stop *(ebp+0x14) 1)
19674
19675
19676 $check-mu-copy-stmt:error-too-many-inouts:
19677 (write-buffered *(ebp+0x10) "fn ")
19678 8b/-> *(ebp+0xc) 0/r32/eax
19679 (lookup *eax *(eax+4))
19680 (write-buffered *(ebp+0x10) %eax)
19681 (write-buffered *(ebp+0x10) ": stmt 'copy' must have just one inout\n")
19682 (flush *(ebp+0x10))
19683 (stop *(ebp+0x14) 1)
19684
19685
19686 $check-mu-copy-stmt:error-no-output:
19687 (write-buffered *(ebp+0x10) "fn ")
19688 8b/-> *(ebp+0xc) 0/r32/eax
19689 (lookup *eax *(eax+4))
19690 (write-buffered *(ebp+0x10) %eax)
19691 (write-buffered *(ebp+0x10) ": stmt 'copy' expects an output\n")
19692 (flush *(ebp+0x10))
19693 (stop *(ebp+0x14) 1)
19694
19695
19696 $check-mu-copy-stmt:error-output-not-in-register:
19697 (write-buffered *(ebp+0x10) "fn ")
19698 8b/-> *(ebp+0xc) 0/r32/eax
19699 (lookup *eax *(eax+4))
19700 (write-buffered *(ebp+0x10) %eax)
19701 (write-buffered *(ebp+0x10) ": stmt copy: output '")
19702 (lookup *edi *(edi+4))
19703 (lookup *eax *(eax+4))
19704 (write-buffered *(ebp+0x10) %eax)
19705 (write-buffered *(ebp+0x10) "' not in a register\n")
19706 (flush *(ebp+0x10))
19707 (stop *(ebp+0x14) 1)
19708
19709
19710 $check-mu-copy-stmt:error-too-many-outputs:
19711 (write-buffered *(ebp+0x10) "fn ")
19712 8b/-> *(ebp+0xc) 0/r32/eax
19713 (lookup *eax *(eax+4))
19714 (write-buffered *(ebp+0x10) %eax)
19715 (write-buffered *(ebp+0x10) ": stmt 'copy' must have just one output\n")
19716 (flush *(ebp+0x10))
19717 (stop *(ebp+0x14) 1)
19718
19719
19720 $check-mu-copy-stmt:error-inout-too-large:
19721 (write-buffered *(ebp+0x10) "fn ")
19722 8b/-> *(ebp+0xc) 0/r32/eax
19723 (lookup *eax *(eax+4))
19724 (write-buffered *(ebp+0x10) %eax)
19725 (write-buffered *(ebp+0x10) ": stmt copy: '")
19726 (lookup *esi *(esi+4))
19727 (lookup *eax *(eax+4))
19728 (write-buffered *(ebp+0x10) %eax)
19729 (write-buffered *(ebp+0x10) "' is too large to fit in a register\n")
19730 (flush *(ebp+0x10))
19731 (stop *(ebp+0x14) 1)
19732
19733
19734 check-mu-copy-to-stmt:
19735
19736 55/push-ebp
19737 89/<- %ebp 4/r32/esp
19738
19739 50/push-eax
19740 51/push-ecx
19741 52/push-edx
19742 53/push-ebx
19743 56/push-esi
19744 57/push-edi
19745
19746 81 5/subop/subtract %esp 0x60/imm32
19747 68/push 0x60/imm32/size
19748 68/push 0/imm32/read
19749 68/push 0/imm32/write
19750 89/<- %edx 4/r32/esp
19751
19752 8b/-> *(ebp+8) 6/r32/esi
19753 $check-mu-copy-to-stmt:check-for-output:
19754
19755 (lookup *(esi+0x14) *(esi+0x18))
19756 3d/compare-eax-and 0/imm32
19757 0f 85/jump-if-!= $check-mu-copy-to-stmt:error-too-many-outputs/disp32
19758 $check-mu-copy-to-stmt:get-dest:
19759
19760 (lookup *(esi+0xc) *(esi+0x10))
19761 89/<- %edi 0/r32/eax
19762
19763 3d/compare-eax-and 0/imm32
19764 0f 84/jump-if-= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
19765 $check-mu-copy-to-stmt:get-src:
19766
19767 (lookup *(edi+8) *(edi+0xc))
19768 89/<- %esi 0/r32/eax
19769
19770 3d/compare-eax-and 0/imm32
19771 0f 84/jump-if-= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
19772
19773 (lookup *(esi+8) *(esi+0xc))
19774 3d/compare-eax-and 0/imm32
19775 0f 85/jump-if-!= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
19776 $check-mu-copy-to-stmt:types:
19777
19778 (lookup *esi *(esi+4))
19779 (lookup *(eax+8) *(eax+0xc))
19780 89/<- %ecx 0/r32/eax
19781
19782
19783 {
19784 (lookup *esi *(esi+4))
19785 (lookup *(eax+0x8) *(eax+0xc))
19786 (is-simple-mu-type? %eax 0)
19787 3d/compare-eax-and 0/imm32
19788 75/jump-if-!= break/disp8
19789 (lookup *esi *(esi+4))
19790 (lookup *(eax+0x18) *(eax+0x1c))
19791 3d/compare-eax-and 0/imm32
19792 75/jump-if-!= break/disp8
19793 e9/jump $check-mu-copy-to-stmt:error-src-not-literal-or-in-register/disp32
19794 }
19795
19796 (lookup *esi *(esi+4))
19797 (size-of %eax)
19798 3d/compare-eax-and 4/imm32
19799 0f 8f/jump-if-> $check-mu-copy-to-stmt:error-src-too-large/disp32
19800
19801 (lookup *edi *(edi+4))
19802 (lookup *(eax+8) *(eax+0xc))
19803 89/<- %ebx 0/r32/eax
19804
19805 8b/-> *(edi+0x10) 0/r32/eax
19806 3d/compare-eax-and 0/imm32/false
19807 {
19808 74/jump-if-= break/disp8
19809 (lookup *(ebx+0xc) *(ebx+0x10))
19810
19811 81 7/subop/compare *(eax+0xc) 0/imm32
19812 {
19813 75/jump-if-!= break/disp8
19814 (lookup *(eax+4) *(eax+8))
19815 }
19816 89/<- %ebx 0/r32/eax
19817 }
19818
19819 (type-match? %ebx %ecx %edx)
19820 3d/compare-eax-and 0/imm32
19821 0f 85/jump-if-!= $check-mu-copy-to-stmt:end/disp32
19822
19823 {
19824 (lookup *edi *(edi+4))
19825 (lookup *(eax+8) *(eax+0xc))
19826 (is-mu-addr-type? %eax)
19827 3d/compare-eax-and 0/imm32/false
19828 74/jump-if-= break/disp8
19829 (lookup *esi *(esi+4))
19830 (lookup *eax *(eax+4))
19831 (string-equal? %eax "0")
19832 3d/compare-eax-and 0/imm32/false
19833 74/jump-if-= break/disp8
19834 eb/jump $check-mu-copy-to-stmt:end/disp8
19835 }
19836
19837 (check-mu-numberlike-arg %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19838 $check-mu-copy-to-stmt:end:
19839
19840 81 0/subop/add %esp 0x6c/imm32
19841
19842 5f/pop-to-edi
19843 5e/pop-to-esi
19844 5b/pop-to-ebx
19845 5a/pop-to-edx
19846 59/pop-to-ecx
19847 58/pop-to-eax
19848
19849 89/<- %esp 5/r32/ebp
19850 5d/pop-to-ebp
19851 c3/return
19852
19853 $check-mu-copy-to-stmt:error-incorrect-inouts:
19854 (write-buffered *(ebp+0x10) "fn ")
19855 8b/-> *(ebp+0xc) 0/r32/eax
19856 (lookup *eax *(eax+4))
19857 (write-buffered *(ebp+0x10) %eax)
19858 (write-buffered *(ebp+0x10) ": stmt 'copy-to' must have two inouts\n")
19859 (flush *(ebp+0x10))
19860 (stop *(ebp+0x14) 1)
19861
19862
19863 $check-mu-copy-to-stmt:error-too-many-outputs:
19864 (write-buffered *(ebp+0x10) "fn ")
19865 8b/-> *(ebp+0xc) 0/r32/eax
19866 (lookup *eax *(eax+4))
19867 (write-buffered *(ebp+0x10) %eax)
19868 (write-buffered *(ebp+0x10) ": stmt 'copy-to' must not have any outputs\n")
19869 (flush *(ebp+0x10))
19870 (stop *(ebp+0x14) 1)
19871
19872
19873 $check-mu-copy-to-stmt:error-src-not-literal-or-in-register:
19874 (write-buffered *(ebp+0x10) "fn ")
19875 8b/-> *(ebp+0xc) 0/r32/eax
19876 (lookup *eax *(eax+4))
19877 (write-buffered *(ebp+0x10) %eax)
19878 (write-buffered *(ebp+0x10) ": stmt copy-to: source (second inout) is in memory\n")
19879 (flush *(ebp+0x10))
19880 (stop *(ebp+0x14) 1)
19881
19882
19883 $check-mu-copy-to-stmt:error-src-too-large:
19884 (write-buffered *(ebp+0x10) "fn ")
19885 8b/-> *(ebp+0xc) 0/r32/eax
19886 (lookup *eax *(eax+4))
19887 (write-buffered *(ebp+0x10) %eax)
19888 (write-buffered *(ebp+0x10) ": stmt copy-to: '")
19889 (lookup *esi *(esi+4))
19890 (lookup *eax *(eax+4))
19891 (write-buffered *(ebp+0x10) %eax)
19892 (write-buffered *(ebp+0x10) "' is too large to copy\n")
19893 (flush *(ebp+0x10))
19894 (stop *(ebp+0x14) 1)
19895
19896
19897 check-mu-compare-stmt:
19898
19899 55/push-ebp
19900 89/<- %ebp 4/r32/esp
19901
19902 50/push-eax
19903 51/push-ecx
19904 52/push-edx
19905 53/push-ebx
19906 56/push-esi
19907 57/push-edi
19908
19909 81 5/subop/subtract %esp 0x60/imm32
19910 68/push 0x60/imm32/size
19911 68/push 0/imm32/read
19912 68/push 0/imm32/write
19913 89/<- %edx 4/r32/esp
19914
19915 8b/-> *(ebp+8) 6/r32/esi
19916 $check-mu-compare-stmt:check-for-output:
19917
19918 (lookup *(esi+0x14) *(esi+0x18))
19919 3d/compare-eax-and 0/imm32
19920 0f 85/jump-if-!= $check-mu-compare-stmt:error-too-many-outputs/disp32
19921 $check-mu-compare-stmt:get-left:
19922
19923 (lookup *(esi+0xc) *(esi+0x10))
19924 89/<- %edi 0/r32/eax
19925
19926 3d/compare-eax-and 0/imm32
19927 0f 84/jump-if-= $check-mu-compare-stmt:error-incorrect-inouts/disp32
19928 $check-mu-compare-stmt:get-right:
19929
19930 (lookup *(edi+8) *(edi+0xc))
19931 89/<- %esi 0/r32/eax
19932
19933 3d/compare-eax-and 0/imm32
19934 0f 84/jump-if-= $check-mu-compare-stmt:error-incorrect-inouts/disp32
19935
19936 (lookup *(esi+8) *(esi+0xc))
19937 3d/compare-eax-and 0/imm32
19938 0f 85/jump-if-!= $check-mu-compare-stmt:error-incorrect-inouts/disp32
19939
19940 {
19941 $check-mu-compare-stmt:both-in-mem:
19942 (lookup *esi *(esi+4))
19943 (lookup *(eax+0x8) *(eax+0xc))
19944 (is-simple-mu-type? %eax 0)
19945 3d/compare-eax-and 0/imm32
19946 0f 85/jump-if-!= break/disp32
19947 (lookup *esi *(esi+4))
19948 (lookup *(eax+0x18) *(eax+0x1c))
19949 3d/compare-eax-and 0/imm32
19950 75/jump-if-!= break/disp8
19951 (lookup *edi *(edi+4))
19952 (lookup *(eax+0x8) *(eax+0xc))
19953 (is-simple-mu-type? %eax 0)
19954 3d/compare-eax-and 0/imm32
19955 75/jump-if-!= break/disp8
19956 (lookup *edi *(edi+4))
19957 (lookup *(eax+0x18) *(eax+0x1c))
19958 3d/compare-eax-and 0/imm32
19959 75/jump-if-!= break/disp8
19960 e9/jump $check-mu-compare-stmt:error-both-in-memory/disp32
19961 }
19962 $check-mu-compare-stmt:types:
19963
19964 (lookup *esi *(esi+4))
19965 (lookup *(eax+8) *(eax+0xc))
19966 89/<- %ecx 0/r32/eax
19967
19968 8b/-> *(esi+0x10) 0/r32/eax
19969 3d/compare-eax-and 0/imm32/false
19970 {
19971 74/jump-if-= break/disp8
19972 (lookup *(ecx+0xc) *(ecx+0x10))
19973
19974 81 7/subop/compare *(eax+0xc) 0/imm32
19975 {
19976 75/jump-if-!= break/disp8
19977 (lookup *(eax+4) *(eax+8))
19978 }
19979 89/<- %ecx 0/r32/eax
19980 }
19981
19982 (lookup *esi *(esi+4))
19983 (size-of %eax)
19984 3d/compare-eax-and 4/imm32
19985 0f 8f/jump-if-> $check-mu-compare-stmt:error-right-too-large/disp32
19986
19987 (lookup *edi *(edi+4))
19988 (size-of %eax)
19989 3d/compare-eax-and 4/imm32
19990 0f 8f/jump-if-> $check-mu-compare-stmt:error-left-too-large/disp32
19991
19992 (lookup *edi *(edi+4))
19993 (lookup *(eax+8) *(eax+0xc))
19994 89/<- %ebx 0/r32/eax
19995
19996 8b/-> *(edi+0x10) 0/r32/eax
19997 3d/compare-eax-and 0/imm32/false
19998 {
19999 74/jump-if-= break/disp8
20000 (lookup *(ebx+0xc) *(ebx+0x10))
20001
20002 81 7/subop/compare *(eax+0xc) 0/imm32
20003 {
20004 75/jump-if-!= break/disp8
20005 (lookup *(eax+4) *(eax+8))
20006 }
20007 89/<- %ebx 0/r32/eax
20008 }
20009
20010 (type-match? %ebx %ecx %edx)
20011 3d/compare-eax-and 0/imm32
20012 0f 85/jump-if-!= $check-mu-compare-stmt:end/disp32
20013
20014 {
20015 (lookup *edi *(edi+4))
20016 (lookup *(eax+8) *(eax+0xc))
20017 (is-mu-addr-type? %eax)
20018 3d/compare-eax-and 0/imm32/false
20019 74/jump-if-= break/disp8
20020 (lookup *esi *(esi+4))
20021 (lookup *eax *(eax+4))
20022 (string-equal? %eax "0")
20023 3d/compare-eax-and 0/imm32/false
20024 74/jump-if-= break/disp8
20025 eb/jump $check-mu-compare-stmt:end/disp8
20026 }
20027
20028 (check-mu-numberlike-arg %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20029 $check-mu-compare-stmt:end:
20030
20031 81 0/subop/add %esp 0x6c/imm32
20032
20033 5f/pop-to-edi
20034 5e/pop-to-esi
20035 5b/pop-to-ebx
20036 5a/pop-to-edx
20037 59/pop-to-ecx
20038 58/pop-to-eax
20039
20040 89/<- %esp 5/r32/ebp
20041 5d/pop-to-ebp
20042 c3/return
20043
20044 $check-mu-compare-stmt:error-incorrect-inouts:
20045 (write-buffered *(ebp+0x10) "fn ")
20046 8b/-> *(ebp+0xc) 0/r32/eax
20047 (lookup *eax *(eax+4))
20048 (write-buffered *(ebp+0x10) %eax)
20049 (write-buffered *(ebp+0x10) ": stmt 'compare' must have two inouts\n")
20050 (flush *(ebp+0x10))
20051 (stop *(ebp+0x14) 1)
20052
20053
20054 $check-mu-compare-stmt:error-too-many-outputs:
20055 (write-buffered *(ebp+0x10) "fn ")
20056 8b/-> *(ebp+0xc) 0/r32/eax
20057 (lookup *eax *(eax+4))
20058 (write-buffered *(ebp+0x10) %eax)
20059 (write-buffered *(ebp+0x10) ": stmt 'compare' must not have any outputs\n")
20060 (flush *(ebp+0x10))
20061 (stop *(ebp+0x14) 1)
20062
20063
20064 $check-mu-compare-stmt:error-both-in-memory:
20065 (write-buffered *(ebp+0x10) "fn ")
20066 8b/-> *(ebp+0xc) 0/r32/eax
20067 (lookup *eax *(eax+4))
20068 (write-buffered *(ebp+0x10) %eax)
20069 (write-buffered *(ebp+0x10) ": stmt compare: both inouts are in memory\n")
20070 (flush *(ebp+0x10))
20071 (stop *(ebp+0x14) 1)
20072
20073
20074 $check-mu-compare-stmt:error-left-too-large:
20075 (write-buffered *(ebp+0x10) "fn ")
20076 8b/-> *(ebp+0xc) 0/r32/eax
20077 (lookup *eax *(eax+4))
20078 (write-buffered *(ebp+0x10) %eax)
20079 (write-buffered *(ebp+0x10) ": stmt compare: '")
20080 (lookup *edi *(edi+4))
20081 (lookup *eax *(eax+4))
20082 (write-buffered *(ebp+0x10) %eax)
20083 (write-buffered *(ebp+0x10) "' is too large to compare\n")
20084 (flush *(ebp+0x10))
20085 (stop *(ebp+0x14) 1)
20086
20087
20088 $check-mu-compare-stmt:error-right-too-large:
20089 (write-buffered *(ebp+0x10) "fn ")
20090 8b/-> *(ebp+0xc) 0/r32/eax
20091 (lookup *eax *(eax+4))
20092 (write-buffered *(ebp+0x10) %eax)
20093 (write-buffered *(ebp+0x10) ": stmt compare: '")
20094 (lookup *esi *(esi+4))
20095 (lookup *eax *(eax+4))
20096 (write-buffered *(ebp+0x10) %eax)
20097 (write-buffered *(ebp+0x10) "' is too large to compare\n")
20098 (flush *(ebp+0x10))
20099 (stop *(ebp+0x14) 1)
20100
20101
20102 check-mu-address-stmt:
20103
20104 55/push-ebp
20105 89/<- %ebp 4/r32/esp
20106
20107 50/push-eax
20108 51/push-ecx
20109 52/push-edx
20110 56/push-esi
20111 57/push-edi
20112 $check-mu-address-stmt:get-output:
20113
20114 8b/-> *(ebp+8) 6/r32/esi
20115
20116 (lookup *(esi+0x14) *(esi+0x18))
20117 89/<- %edi 0/r32/eax
20118
20119 3d/compare-eax-and 0/imm32
20120 0f 84/jump-if-= $check-mu-address-stmt:error-no-output/disp32
20121
20122 (lookup *(edi+8) *(edi+0xc))
20123 3d/compare-eax-and 0/imm32
20124 0f 85/jump-if-!= $check-mu-address-stmt:error-too-many-outputs/disp32
20125 $check-mu-address-stmt:get-inout:
20126
20127 (lookup *(esi+0xc) *(esi+0x10))
20128 89/<- %esi 0/r32/eax
20129
20130 3d/compare-eax-and 0/imm32
20131 0f 84/jump-if-= $check-mu-address-stmt:error-no-inout/disp32
20132
20133 (lookup *(esi+8) *(esi+0xc))
20134 3d/compare-eax-and 0/imm32
20135 0f 85/jump-if-!= $check-mu-address-stmt:error-too-many-inouts/disp32
20136 $check-mu-address-stmt:types:
20137
20138 (lookup *edi *(edi+4))
20139 (lookup *(eax+0x18) *(eax+0x1c))
20140 3d/compare-eax-and 0/imm32
20141 0f 84/jump-if-= $check-mu-address-stmt:error-output-not-in-register/disp32
20142
20143 (lookup *edi *(edi+4))
20144 (lookup *(eax+8) *(eax+0xc))
20145 89/<- %edx 0/r32/eax
20146
20147 (is-mu-addr-type? %edx)
20148 3d/compare-eax-and 0/imm32/false
20149 0f 84/jump-if-= $check-mu-address-stmt:error-output-not-address/disp32
20150
20151 (lookup *(edx+0xc) *(edx+0x10))
20152
20153 81 7/subop/compare *(eax+0xc) 0/imm32
20154 {
20155 75/jump-if-!= break/disp8
20156 (lookup *(eax+4) *(eax+8))
20157 }
20158 89/<- %edx 0/r32/eax
20159
20160 (lookup *esi *(esi+4))
20161 (lookup *(eax+8) *(eax+0xc))
20162 89/<- %ecx 0/r32/eax
20163
20164 8b/-> *(esi+0x10) 0/r32/eax
20165 3d/compare-eax-and 0/imm32/false
20166 {
20167 74/jump-if-= break/disp8
20168 (lookup *(ecx+0xc) *(ecx+0x10))
20169
20170 81 7/subop/compare *(eax+0xc) 0/imm32
20171 {
20172 75/jump-if-!= break/disp8
20173 (lookup *(eax+4) *(eax+8))
20174 }
20175 89/<- %ecx 0/r32/eax
20176 }
20177
20178 (type-equal-ignoring-capacity? %edx %ecx)
20179 3d/compare-eax-and 0/imm32
20180 0f 84/jump-if-= $check-mu-address-stmt:error-type-mismatch/disp32
20181 $check-mu-address-stmt:end:
20182
20183 5f/pop-to-edi
20184 5e/pop-to-esi
20185 5a/pop-to-edx
20186 59/pop-to-ecx
20187 58/pop-to-eax
20188
20189 89/<- %esp 5/r32/ebp
20190 5d/pop-to-ebp
20191 c3/return
20192
20193 $check-mu-address-stmt:error-no-inout:
20194 (write-buffered *(ebp+0x10) "fn ")
20195 8b/-> *(ebp+0xc) 0/r32/eax
20196 (lookup *eax *(eax+4))
20197 (write-buffered *(ebp+0x10) %eax)
20198 (write-buffered *(ebp+0x10) ": stmt 'address' expects an inout\n")
20199 (flush *(ebp+0x10))
20200 (stop *(ebp+0x14) 1)
20201
20202
20203 $check-mu-address-stmt:error-too-many-inouts:
20204 (write-buffered *(ebp+0x10) "fn ")
20205 8b/-> *(ebp+0xc) 0/r32/eax
20206 (lookup *eax *(eax+4))
20207 (write-buffered *(ebp+0x10) %eax)
20208 (write-buffered *(ebp+0x10) ": stmt 'address' must have just one inout\n")
20209 (flush *(ebp+0x10))
20210 (stop *(ebp+0x14) 1)
20211
20212
20213 $check-mu-address-stmt:error-no-output:
20214 (write-buffered *(ebp+0x10) "fn ")
20215 8b/-> *(ebp+0xc) 0/r32/eax
20216 (lookup *eax *(eax+4))
20217 (write-buffered *(ebp+0x10) %eax)
20218 (write-buffered *(ebp+0x10) ": stmt 'address' expects an output\n")
20219 (flush *(ebp+0x10))
20220 (stop *(ebp+0x14) 1)
20221
20222
20223 $check-mu-address-stmt:error-output-not-in-register:
20224 (write-buffered *(ebp+0x10) "fn ")
20225 8b/-> *(ebp+0xc) 0/r32/eax
20226 (lookup *eax *(eax+4))
20227 (write-buffered *(ebp+0x10) %eax)
20228 (write-buffered *(ebp+0x10) ": stmt address: output '")
20229 (lookup *edi *(edi+4))
20230 (lookup *eax *(eax+4))
20231 (write-buffered *(ebp+0x10) %eax)
20232 (write-buffered *(ebp+0x10) "' not in a register\n")
20233 (flush *(ebp+0x10))
20234 (stop *(ebp+0x14) 1)
20235
20236
20237 $check-mu-address-stmt:error-too-many-outputs:
20238 (write-buffered *(ebp+0x10) "fn ")
20239 8b/-> *(ebp+0xc) 0/r32/eax
20240 (lookup *eax *(eax+4))
20241 (write-buffered *(ebp+0x10) %eax)
20242 (write-buffered *(ebp+0x10) ": stmt 'address' must have just one output\n")
20243 (flush *(ebp+0x10))
20244 (stop *(ebp+0x14) 1)
20245
20246
20247 $check-mu-address-stmt:error-output-not-address:
20248 (write-buffered *(ebp+0x10) "fn ")
20249 8b/-> *(ebp+0xc) 0/r32/eax
20250 (lookup *eax *(eax+4))
20251 (write-buffered *(ebp+0x10) %eax)
20252 (write-buffered *(ebp+0x10) ": stmt address: output '")
20253 (lookup *edi *(edi+4))
20254 (lookup *eax *(eax+4))
20255 (write-buffered *(ebp+0x10) %eax)
20256 (write-buffered *(ebp+0x10) "' is not an addr\n")
20257 (flush *(ebp+0x10))
20258 (stop *(ebp+0x14) 1)
20259
20260
20261 $check-mu-address-stmt:error-type-mismatch:
20262 (write-buffered *(ebp+0x10) "fn ")
20263 8b/-> *(ebp+0xc) 0/r32/eax
20264 (lookup *eax *(eax+4))
20265 (write-buffered *(ebp+0x10) %eax)
20266 (write-buffered *(ebp+0x10) ": stmt address: output '")
20267 (lookup *edi *(edi+4))
20268 (lookup *eax *(eax+4))
20269 (write-buffered *(ebp+0x10) %eax)
20270 (write-buffered *(ebp+0x10) "' cannot hold address of '")
20271 (lookup *esi *(esi+4))
20272 (lookup *eax *(eax+4))
20273 (write-buffered *(ebp+0x10) %eax)
20274 (write-buffered *(ebp+0x10) "'\n")
20275 (flush *(ebp+0x10))
20276 (stop *(ebp+0x14) 1)
20277
20278
20279 type-equal-ignoring-capacity?:
20280
20281 55/push-ebp
20282 89/<- %ebp 4/r32/esp
20283
20284 51/push-ecx
20285 52/push-edx
20286 53/push-ebx
20287
20288 8b/-> *(ebp+8) 1/r32/ecx
20289
20290 8b/-> *(ebp+0xc) 3/r32/ebx
20291
20292 81 7/subop/compare *ecx 0/imm32/false
20293 0f 85/jump-if-!= $type-equal-ignoring-capacity?:base-case/disp32
20294
20295 (lookup *(ecx+4) *(ecx+8))
20296 89/<- %edx 0/r32/eax
20297 (lookup *(ebx+4) *(ebx+8))
20298 (type-equal? %edx %eax)
20299 3d/compare-eax-and 0/imm32/false
20300 0f 84/jump-if-= $type-equal-ignoring-capacity?:end/disp32
20301
20302 {
20303 (is-mu-array? %edx)
20304 3d/compare-eax-and 0/imm32/false
20305 75/jump-if-!= break/disp8
20306 $type-equal-ignoring-capacity?:array:
20307
20308 (lookup *(ecx+0xc) *(ecx+0x10))
20309 (lookup *(eax+4) *(eax+8))
20310 89/<- %ecx 0/r32/eax
20311
20312 (lookup *(ebx+0xc) *(ebx+0x10))
20313 (lookup *(eax+4) *(eax+8))
20314 89/<- %ebx 0/r32/eax
20315 eb/jump $type-equal-ignoring-capacity?:base-case/disp8
20316 }
20317
20318 {
20319 (is-mu-stream? %edx)
20320 3d/compare-eax-and 0/imm32/false
20321 75/jump-if-!= break/disp8
20322 $type-equal-ignoring-capacity?:stream:
20323
20324 (lookup *(ecx+0xc) *(ecx+0x10))
20325 (lookup *(eax+4) *(eax+8))
20326 89/<- %ecx 0/r32/eax
20327
20328 (lookup *(ebx+0xc) *(ebx+0x10))
20329 (lookup *(eax+4) *(eax+8))
20330 89/<- %ebx 0/r32/eax
20331 eb/jump $type-equal-ignoring-capacity?:base-case/disp8
20332 }
20333 $type-equal-ignoring-capacity?:base-case:
20334
20335 (type-equal? %ecx %ebx)
20336 $type-equal-ignoring-capacity?:end:
20337
20338 5b/pop-to-ebx
20339 5a/pop-to-edx
20340 59/pop-to-ecx
20341
20342 89/<- %esp 5/r32/ebp
20343 5d/pop-to-ebp
20344 c3/return
20345
20346 check-mu-return-stmt:
20347
20348 55/push-ebp
20349 89/<- %ebp 4/r32/esp
20350
20351 50/push-eax
20352 51/push-ecx
20353 52/push-edx
20354 53/push-ebx
20355 56/push-esi
20356 57/push-edi
20357
20358 81 5/subop/subtract %esp 0x60/imm32
20359 68/push 0x60/imm32/size
20360 68/push 0/imm32/read
20361 68/push 0/imm32/write
20362 89/<- %edx 4/r32/esp
20363
20364 8b/-> *(ebp+0xc) 0/r32/eax
20365 (lookup *(eax+0x10) *(eax+0x14))
20366 89/<- %esi 0/r32/eax
20367
20368 89/<- %ebx 0/r32/eax
20369
20370 8b/-> *(ebp+8) 0/r32/eax
20371 (lookup *(eax+0xc) *(eax+0x10))
20372 89/<- %edi 0/r32/eax
20373 {
20374
20375 81 7/subop/compare %ebx 0/imm32
20376 0f 84/jump-if-= break/disp32
20377
20378 81 7/subop/compare %edi 0/imm32
20379 0f 84/jump-if-= $check-mu-return-stmt:error-too-few-inouts/disp32
20380
20381 (lookup *ebx *(ebx+4))
20382 (lookup *(eax+8) *(eax+0xc))
20383 89/<- %ecx 0/r32/eax
20384
20385 (lookup *edi *(edi+4))
20386 (lookup *(eax+8) *(eax+0xc))
20387
20388 81 7/subop/compare *(edi+0x10) 0/imm32/false
20389 {
20390 74/jump-if-= break/disp8
20391 (lookup *(eax+0xc) *(eax+0x10))
20392
20393 81 7/subop/compare *(eax+0xc) 0/imm32
20394 75/jump-if-!= break/disp8
20395 (lookup *(eax+4) *(eax+8))
20396 }
20397
20398 (type-match? %ecx %eax %edx)
20399 3d/compare-eax-and 0/imm32/false
20400 0f 84/jump-if-= $check-mu-return-stmt:error1/disp32
20401
20402 (register-within-list-with-conflict? %edi %esi %ebx *(ebp+8))
20403 3d/compare-eax-and 0/imm32/false
20404 0f 85/jump-if-!= $check-mu-return-stmt:error2/disp32
20405
20406 (lookup *(ebx+8) *(ebx+0xc))
20407 89/<- %ebx 0/r32/eax
20408
20409 (lookup *(edi+8) *(edi+0xc))
20410 89/<- %edi 0/r32/eax
20411
20412 e9/jump loop/disp32
20413 }
20414
20415 81 7/subop/compare %edi 0/imm32
20416 0f 85/jump-if-!= $check-mu-return-stmt:error-too-many-inouts/disp32
20417 $check-mu-return-stmt:end:
20418
20419 81 0/subop/add %esp 0x6c/imm32
20420
20421 5f/pop-to-edi
20422 5e/pop-to-esi
20423 5b/pop-to-ebx
20424 5a/pop-to-edx
20425 59/pop-to-ecx
20426 58/pop-to-eax
20427
20428 89/<- %esp 5/r32/ebp
20429 5d/pop-to-ebp
20430 c3/return
20431
20432 $check-mu-return-stmt:error1:
20433 (write-buffered *(ebp+0x10) "fn ")
20434 8b/-> *(ebp+0xc) 0/r32/eax
20435 (lookup *eax *(eax+4))
20436 (write-buffered *(ebp+0x10) %eax)
20437 (write-buffered *(ebp+0x10) ": return: '")
20438 (lookup *edi *(edi+4))
20439 (lookup *eax *(eax+4))
20440 (write-buffered *(ebp+0x10) %eax)
20441 (write-buffered *(ebp+0x10) "' has the wrong type\n")
20442 (flush *(ebp+0x10))
20443 (stop *(ebp+0x14) 1)
20444
20445
20446 $check-mu-return-stmt:error2:
20447 (write-buffered *(ebp+0x10) "fn ")
20448 8b/-> *(ebp+0xc) 0/r32/eax
20449 (lookup *eax *(eax+4))
20450 (write-buffered *(ebp+0x10) %eax)
20451 (write-buffered *(ebp+0x10) ": return: '")
20452 (lookup *edi *(edi+4))
20453 (lookup *eax *(eax+4))
20454 (write-buffered *(ebp+0x10) %eax)
20455 (write-buffered *(ebp+0x10) "' is no longer available\n")
20456 (flush *(ebp+0x10))
20457 (stop *(ebp+0x14) 1)
20458
20459
20460 $check-mu-return-stmt:error-too-few-inouts:
20461 (write-buffered *(ebp+0x10) "fn ")
20462 8b/-> *(ebp+0xc) 0/r32/eax
20463 (lookup *eax *(eax+4))
20464 (write-buffered *(ebp+0x10) %eax)
20465 (write-buffered *(ebp+0x10) ": return: too few inouts\n")
20466 (flush *(ebp+0x10))
20467 (stop *(ebp+0x14) 1)
20468
20469
20470 $check-mu-return-stmt:error-too-many-inouts:
20471 (write-buffered *(ebp+0x10) "fn ")
20472 8b/-> *(ebp+0xc) 0/r32/eax
20473 (lookup *eax *(eax+4))
20474 (write-buffered *(ebp+0x10) %eax)
20475 (write-buffered *(ebp+0x10) ": return: too many inouts\n")
20476 (flush *(ebp+0x10))
20477 (stop *(ebp+0x14) 1)
20478
20479
20480 check-all-unique-registers:
20481
20482 55/push-ebp
20483 89/<- %ebp 4/r32/esp
20484
20485 50/push-eax
20486 51/push-ecx
20487 56/push-esi
20488
20489 81 5/subop/subtract %esp 0x60/imm32
20490 68/push 0x60/imm32/size
20491 68/push 0/imm32/read
20492 68/push 0/imm32/write
20493 89/<- %esi 4/r32/esp
20494
20495 8b/-> *(ebp+8) 1/r32/ecx
20496 {
20497
20498 81 7/subop/compare %ecx 0/imm32
20499 0f 84/jump-if-= break/disp32
20500
20501 (lookup *ecx *(ecx+4))
20502 (lookup *(eax+0x18) *(eax+0x1c))
20503
20504 (maybe-get %esi %eax 0xc)
20505 3d/compare-eax-and 0/imm32
20506 0f 85/jump-if-!= $check-all-unique-registers:abort/disp32
20507
20508 (lookup *ecx *(ecx+4))
20509 (lookup *(eax+0x18) *(eax+0x1c))
20510 (get-or-insert %esi %eax 0xc Heap)
20511
20512 (lookup *(ecx+8) *(ecx+0xc))
20513 89/<- %ecx 0/r32/eax
20514 e9/jump loop/disp32
20515 }
20516 $check-all-unique-registers:end:
20517
20518 81 0/subop/add %esp 0x6c/imm32
20519
20520 5e/pop-to-esi
20521 59/pop-to-ecx
20522 58/pop-to-eax
20523
20524 89/<- %esp 5/r32/ebp
20525 5d/pop-to-ebp
20526 c3/return
20527
20528 $check-all-unique-registers:abort:
20529 (write-buffered *(ebp+0x10) "fn ")
20530 8b/-> *(ebp+0xc) 0/r32/eax
20531 (lookup *eax *(eax+4))
20532 (write-buffered *(ebp+0x10) %eax)
20533 (write-buffered *(ebp+0x10) ": outputs must be in unique registers\n")
20534 (flush *(ebp+0x10))
20535 (stop *(ebp+0x14) 1)
20536
20537
20538
20539
20540
20541 register-within-list-with-conflict?:
20542
20543 55/push-ebp
20544 89/<- %ebp 4/r32/esp
20545
20546 51/push-ecx
20547 52/push-edx
20548 53/push-ebx
20549 56/push-esi
20550 57/push-edi
20551
20552 8b/-> *(ebp+8) 0/r32/eax
20553 (lookup *eax *(eax+4))
20554 (lookup *(eax+0x18) *(eax+0x1c))
20555
20556
20557
20558
20559
20560 3d/compare-eax-and 0/imm32
20561 0f 84/jump-if-= $register-within-list-with-conflict?:end/disp32
20562 89/<- %ebx 0/r32/eax
20563
20564 8b/-> *(ebp+0xc) 1/r32/ecx
20565
20566 8b/-> *(ebp+0x10) 2/r32/edx
20567 {
20568
20569 81 7/subop/compare %edi 0/imm32
20570 0f 84/jump-if-= break/disp32
20571
20572 39/compare %ecx 2/r32/edx
20573 0f 84/jump-if-= break/disp32
20574
20575 (lookup *ecx *(ecx+4))
20576 (lookup *(eax+0x18) *(eax+0x1c))
20577
20578 3d/compare-eax-and 0/imm32
20579 74/jump-if-= $register-within-list-with-conflict?:continue/disp8
20580
20581 (string-equal? %eax %ebx)
20582 3d/compare-eax-and 0/imm32/false
20583 {
20584 74/jump-if-= break/disp8
20585
20586
20587
20588 8b/-> *(ebp+0x14) 0/r32/eax
20589 (lookup *(eax+0xc) *(eax+0x10))
20590 (register-conflict? %ebx %eax *(ebp+0xc))
20591 eb/jump $register-within-list-with-conflict?:end/disp8
20592 }
20593 $register-within-list-with-conflict?:continue:
20594
20595 (lookup *(ecx+8) *(ecx+0xc))
20596 89/<- %ecx 0/r32/eax
20597 e9/jump loop/disp32
20598 }
20599
20600 b8/copy-to-eax 0/imm32/false
20601 $register-within-list-with-conflict?:end:
20602
20603 5f/pop-to-edi
20604 5e/pop-to-esi
20605 5b/pop-to-ebx
20606 5a/pop-to-edx
20607 59/pop-to-ecx
20608
20609 89/<- %esp 5/r32/ebp
20610 5d/pop-to-ebp
20611 c3/return
20612
20613
20614
20615
20616
20617 register-conflict?:
20618
20619 55/push-ebp
20620 89/<- %ebp 4/r32/esp
20621
20622 51/push-ecx
20623 52/push-edx
20624 53/push-ebx
20625 56/push-esi
20626 57/push-edi
20627
20628
20629
20630
20631
20632 8b/-> *(ebp+0x10) 7/r32/edi
20633
20634 8b/-> *(ebp+0xc) 6/r32/esi
20635 {
20636
20637 81 7/subop/compare %edi 0/imm32
20638 0f 84/jump-if-= break/disp32
20639
20640 (lookup *edi *(edi+4))
20641 (lookup *(eax+0x18) *(eax+0x1c))
20642 (string-equal? %eax *(ebp+8))
20643 3d/compare-eax-and 0/imm32/false
20644 0f 84/jump-if= $register-conflict?:continue/disp32
20645
20646
20647
20648 (lookup *esi *(esi+4))
20649 (lookup *(eax+0x18) *(eax+0x1c))
20650
20651 3d/compare-eax-and 0/imm32
20652 {
20653 75/jump-if-!= break/disp8
20654
20655
20656 b8/copy-to-eax 1/imm32/true
20657 e9/jump $register-conflict?:end/disp32
20658 }
20659
20660 (string-equal? %eax *(ebp+8))
20661 3d/compare-eax-and 0/imm32/false
20662 0f 94/set-if-= %al
20663
20664
20665
20666
20667 eb/jump $register-conflict?:end/disp8
20668 $register-conflict?:continue:
20669
20670 (lookup *(edi+8) *(edi+0xc))
20671 89/<- %edi 0/r32/eax
20672
20673 (lookup *(esi+8) *(esi+0xc))
20674 89/<- %esi 0/r32/eax
20675 e9/jump loop/disp32
20676 }
20677
20678 (write-buffered Stderr "register-conflict? misused\n")
20679 (flush Stderr)
20680 e8/call syscall_exit/disp32
20681 $register-conflict?:end:
20682
20683 5f/pop-to-edi
20684 5e/pop-to-esi
20685 5b/pop-to-ebx
20686 5a/pop-to-edx
20687 59/pop-to-ecx
20688
20689 89/<- %esp 5/r32/ebp
20690 5d/pop-to-ebp
20691 c3/return
20692
20693 check-final-stmt-is-return:
20694
20695 55/push-ebp
20696 89/<- %ebp 4/r32/esp
20697
20698 50/push-eax
20699 51/push-ecx
20700
20701 8b/-> *(ebp+8) 0/r32/eax
20702 (lookup *(eax+4) *(eax+8))
20703 3d/compare-eax-and 0/imm32
20704 74/jump-if-= $check-final-stmt-is-return:end/disp8
20705 89/<- %ecx 0/r32/eax
20706 {
20707
20708 (lookup *(ecx+8) *(ecx+0xc))
20709 3d/compare-eax-and 0/imm32
20710 74/jump-if-= break/disp8
20711
20712 89/<- %ecx 0/r32/eax
20713 e9/jump loop/disp32
20714 }
20715 $check-final-stmt-is-return:check-tag:
20716
20717 (lookup *ecx *(ecx+4))
20718 81 7/subop/compare *eax 1/imm32/stmt1
20719 75/jump-if-!= $check-final-stmt-is-return:error/disp8
20720 $check-final-stmt-is-return:check-operation:
20721
20722 (lookup *(eax+4) *(eax+8))
20723 (string-equal? %eax "return")
20724 3d/compare-eax-and 0/imm32/false
20725 74/jump-if-= $check-final-stmt-is-return:error/disp8
20726 $check-final-stmt-is-return:end:
20727
20728 59/pop-to-ecx
20729 58/pop-to-eax
20730
20731 89/<- %esp 5/r32/ebp
20732 5d/pop-to-ebp
20733 c3/return
20734
20735 $check-final-stmt-is-return:error:
20736 (write-buffered *(ebp+0x10) "fn ")
20737 8b/-> *(ebp+0xc) 0/r32/eax
20738 (lookup *eax *(eax+4))
20739 (write-buffered *(ebp+0x10) %eax)
20740 (write-buffered *(ebp+0x10) ": final statement should be a 'return'\n")
20741 (flush *(ebp+0x10))
20742 (stop *(ebp+0x14) 1)
20743
20744
20745 check-no-breaks:
20746
20747 55/push-ebp
20748 89/<- %ebp 4/r32/esp
20749
20750 50/push-eax
20751 51/push-ecx
20752
20753 8b/-> *(ebp+8) 0/r32/eax
20754 (lookup *(eax+4) *(eax+8))
20755 3d/compare-eax-and 0/imm32
20756 0f 84/jump-if-= $check-no-breaks:end/disp32
20757 89/<- %ecx 0/r32/eax
20758 {
20759
20760 (lookup *(ecx+8) *(ecx+0xc))
20761 3d/compare-eax-and 0/imm32
20762 74/jump-if-= break/disp8
20763
20764 (lookup *ecx *(ecx+4))
20765 81 7/subop/compare *eax 1/imm32/stmt1
20766 75/jump-if-!= $check-no-breaks:continue/disp8
20767
20768 (lookup *(eax+4) *(eax+8))
20769 (string-starts-with? %eax "break")
20770 3d/compare-eax-and 0/imm32/false
20771 75/jump-if-!= $check-no-breaks:error/disp8
20772 $check-no-breaks:continue:
20773
20774 (lookup *(ecx+8) *(ecx+0xc))
20775 89/<- %ecx 0/r32/eax
20776 e9/jump loop/disp32
20777 }
20778 $check-no-breaks:end:
20779
20780 59/pop-to-ecx
20781 58/pop-to-eax
20782
20783 89/<- %esp 5/r32/ebp
20784 5d/pop-to-ebp
20785 c3/return
20786
20787 $check-no-breaks:error:
20788 (write-buffered *(ebp+0x10) "fn ")
20789 8b/-> *(ebp+0xc) 0/r32/eax
20790 (lookup *eax *(eax+4))
20791 (write-buffered *(ebp+0x10) %eax)
20792 (write-buffered *(ebp+0x10) " has outputs, so you cannot 'break' out of the outermost block. Use 'return'.\n")
20793 (flush *(ebp+0x10))
20794 (stop *(ebp+0x14) 1)
20795
20796
20797 check-mu-get-stmt:
20798
20799 55/push-ebp
20800 89/<- %ebp 4/r32/esp
20801
20802 50/push-eax
20803 51/push-ecx
20804 52/push-edx
20805 53/push-ebx
20806 56/push-esi
20807 57/push-edi
20808
20809 8b/-> *(ebp+8) 6/r32/esi
20810
20811
20812 (lookup *(esi+0xc) *(esi+0x10))
20813 3d/compare-eax-and 0/imm32/false
20814 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
20815 (lookup *eax *(eax+4))
20816 89/<- %ecx 0/r32/eax
20817 $check-mu-get-stmt:check-base:
20818
20819
20820
20821 (lookup *(ecx+8) *(ecx+0xc))
20822 89/<- %ebx 0/r32/eax
20823 {
20824 81 7/subop/compare *ebx 0/imm32/false
20825 0f 85/jump-if-!= break/disp32
20826 $check-mu-get-stmt:base-is-compound:
20827
20828 (lookup *(ebx+4) *(ebx+8))
20829 (is-simple-mu-type? %eax 2)
20830 3d/compare-eax-and 0/imm32/false
20831 74/jump-if-= break/disp8
20832 $check-mu-get-stmt:base-is-addr:
20833
20834 81 7/subop/compare *(ecx+0x18) 0/imm32
20835 0f 84/jump-if-= $check-mu-get-stmt:error-base-type-addr-but-not-register/disp32
20836 $check-mu-get-stmt:base-is-addr-in-register:
20837
20838 (lookup *(ebx+0xc) *(ebx+0x10))
20839 81 7/subop/compare *(eax+0xc) 0/imm32
20840 0f 85/jump-if-!= $check-mu-get-stmt:error-bad-base/disp32
20841 $check-mu-get-stmt:base-is-addr-to-atom-in-register:
20842 (lookup *(eax+4) *(eax+8))
20843 89/<- %ebx 0/r32/eax
20844 }
20845 $check-mu-get-stmt:check-base-typeinfo:
20846
20847 81 7/subop/compare *ebx 0/imm32/false
20848 {
20849 75/jump-if-!= break/disp8
20850 (lookup *(ebx+4) *(ebx+8))
20851 89/<- %ebx 0/r32/eax
20852 }
20853
20854 8b/-> *(ebx+4) 3/r32/ebx
20855 (is-container? %ebx)
20856 3d/compare-eax-and 0/imm32/false
20857 0f 84/jump-if-= $check-mu-get-stmt:error-bad-base/disp32
20858
20859
20860 68/push 0/imm32
20861 68/push 0/imm32
20862 89/<- %ecx 4/r32/esp
20863
20864 (find-typeinfo %ebx %ecx)
20865 (lookup *ecx *(ecx+4))
20866
20867 81 0/subop/add %esp 8/imm32
20868
20869 89/<- %edx 0/r32/eax
20870
20871 (lookup *(esi+0xc) *(esi+0x10))
20872 (lookup *(eax+8) *(eax+0xc))
20873 89/<- %ecx 0/r32/eax
20874
20875 3d/compare-eax-and 0/imm32/false
20876 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
20877
20878 (lookup *ecx *(ecx+4))
20879 89/<- %ecx 0/r32/eax
20880
20881 81 7/subop/compare *(ecx+0x14) -1/imm32/uninitialized
20882 0f 84/jump-if-= $check-mu-get-stmt:error-bad-field/disp32
20883
20884 (lookup *(esi+0xc) *(esi+0x10))
20885 (lookup *(eax+8) *(eax+0xc))
20886 (lookup *(eax+8) *(eax+0xc))
20887 3d/compare-eax-and 0/imm32/false
20888 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-inouts/disp32
20889
20890 (lookup *(esi+0x14) *(esi+0x18))
20891
20892 3d/compare-eax-and 0/imm32/false
20893 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-outputs/disp32
20894 (lookup *eax *(eax+4))
20895 89/<- %edi 0/r32/eax
20896 $check-mu-get-stmt:check-output-type:
20897
20898
20899 (lookup *(edi+0x18) *(edi+0x1c))
20900 3d/compare-eax-and 0/imm32
20901 0f 84/jump-if-= $check-mu-get-stmt:error-output-not-in-register/disp32
20902
20903 (lookup *(edi+8) *(edi+0xc))
20904 81 7/subop/compare *eax 0/imm32/false
20905 0f 85/jump-if-!= $check-mu-get-stmt:error-output-type-not-address/disp32
20906
20907 (lookup *(eax+4) *(eax+8))
20908 (is-simple-mu-type? %eax 2)
20909 3d/compare-eax-and 0/imm32/false
20910 0f 84/jump-if-= $check-mu-get-stmt:error-output-type-not-address/disp32
20911 $check-mu-get-stmt:check-output-type-match:
20912
20913 (lookup *(edi+8) *(edi+0xc))
20914 (lookup *(eax+0xc) *(eax+0x10))
20915
20916 81 7/subop/compare *(eax+0xc) 0/imm32/null
20917 {
20918 75/jump-if-!= break/disp8
20919 (lookup *(eax+4) *(eax+8))
20920 }
20921 89/<- %edi 0/r32/eax
20922
20923 (lookup *ecx *(ecx+4))
20924 89/<- %ecx 0/r32/eax
20925
20926 (lookup *(edx+4) *(edx+8))
20927 (get %eax %ecx 0x10)
20928
20929 (lookup *eax *(eax+4))
20930 (lookup *eax *(eax+4))
20931 (lookup *(eax+8) *(eax+0xc))
20932
20933 (type-equal? %edi %eax)
20934 3d/compare-eax-and 0/imm32/false
20935 0f 84/jump-if-= $check-mu-get-stmt:error-bad-output-type/disp32
20936
20937 (lookup *(esi+0x14) *(esi+0x18))
20938 (lookup *(eax+8) *(eax+0xc))
20939 3d/compare-eax-and 0/imm32/false
20940 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-outputs/disp32
20941 $check-mu-get-stmt:end:
20942
20943 5f/pop-to-edi
20944 5e/pop-to-esi
20945 5b/pop-to-ebx
20946 5a/pop-to-edx
20947 59/pop-to-ecx
20948 58/pop-to-eax
20949
20950 89/<- %esp 5/r32/ebp
20951 5d/pop-to-ebp
20952 c3/return
20953
20954 $check-mu-get-stmt:error-too-few-inouts:
20955 (write-buffered *(ebp+0x10) "fn ")
20956 8b/-> *(ebp+0xc) 0/r32/eax
20957 (lookup *eax *(eax+4))
20958 (write-buffered *(ebp+0x10) %eax)
20959 (write-buffered *(ebp+0x10) ": stmt get: too few inouts (2 required)\n")
20960 (flush *(ebp+0x10))
20961 (stop *(ebp+0x14) 1)
20962
20963
20964 $check-mu-get-stmt:error-too-many-inouts:
20965 (write-buffered *(ebp+0x10) "fn ")
20966 8b/-> *(ebp+0xc) 0/r32/eax
20967 (lookup *eax *(eax+4))
20968 (write-buffered *(ebp+0x10) %eax)
20969 (write-buffered *(ebp+0x10) ": stmt get: too many inouts (2 required)\n")
20970 (flush *(ebp+0x10))
20971 (stop *(ebp+0x14) 1)
20972
20973
20974 $check-mu-get-stmt:error-too-few-outputs:
20975 (write-buffered *(ebp+0x10) "fn ")
20976 8b/-> *(ebp+0xc) 0/r32/eax
20977 (lookup *eax *(eax+4))
20978 (write-buffered *(ebp+0x10) %eax)
20979 (write-buffered *(ebp+0x10) ": stmt get: must have an output\n")
20980 (flush *(ebp+0x10))
20981 (stop *(ebp+0x14) 1)
20982
20983
20984 $check-mu-get-stmt:error-too-many-outputs:
20985 (write-buffered *(ebp+0x10) "fn ")
20986 8b/-> *(ebp+0xc) 0/r32/eax
20987 (lookup *eax *(eax+4))
20988 (write-buffered *(ebp+0x10) %eax)
20989 (write-buffered *(ebp+0x10) ": stmt get: too many outputs (1 required)\n")
20990 (flush *(ebp+0x10))
20991 (stop *(ebp+0x14) 1)
20992
20993
20994 $check-mu-get-stmt:error-bad-base:
20995
20996 (write-buffered *(ebp+0x10) "fn ")
20997 8b/-> *(ebp+0xc) 0/r32/eax
20998 (lookup *eax *(eax+4))
20999 (write-buffered *(ebp+0x10) %eax)
21000 (write-buffered *(ebp+0x10) ": stmt get: var '")
21001 (lookup *(esi+0xc) *(esi+0x10))
21002 (lookup *eax *(eax+4))
21003 (lookup *eax *(eax+4))
21004 (write-buffered *(ebp+0x10) %eax)
21005 (write-buffered *(ebp+0x10) "' must have a 'type' definition\n")
21006 (flush *(ebp+0x10))
21007 (stop *(ebp+0x14) 1)
21008
21009
21010 $check-mu-get-stmt:error-base-type-addr-but-not-register:
21011 (write-buffered *(ebp+0x10) "fn ")
21012 8b/-> *(ebp+0xc) 0/r32/eax
21013 (lookup *eax *(eax+4))
21014 (write-buffered *(ebp+0x10) %eax)
21015 (write-buffered *(ebp+0x10) ": stmt get: var '")
21016 (lookup *(esi+0xc) *(esi+0x10))
21017 (lookup *eax *(eax+4))
21018 (lookup *eax *(eax+4))
21019 (write-buffered *(ebp+0x10) %eax)
21020 (write-buffered *(ebp+0x10) "' is an 'addr' type, and so must live in a register\n")
21021 (flush *(ebp+0x10))
21022 (stop *(ebp+0x14) 1)
21023
21024
21025 $check-mu-get-stmt:error-bad-field:
21026
21027 (write-buffered *(ebp+0x10) "fn ")
21028 8b/-> *(ebp+0xc) 0/r32/eax
21029 (lookup *eax *(eax+4))
21030 (write-buffered *(ebp+0x10) %eax)
21031 (write-buffered *(ebp+0x10) ": stmt get: type '")
21032
21033 bf/copy-to-edi Type-id/imm32
21034 8b/-> *(edi+ebx<<2+0xc) 6/r32/esi
21035 {
21036 81 7/subop/compare %esi 0/imm32
21037 74/jump-if-= break/disp8
21038 (write-buffered *(ebp+0x10) %esi)
21039 }
21040
21041 (write-buffered *(ebp+0x10) "' has no member called '")
21042 (lookup *ecx *(ecx+4))
21043 (write-buffered *(ebp+0x10) %eax)
21044 (write-buffered *(ebp+0x10) "'\n")
21045 (flush *(ebp+0x10))
21046 (stop *(ebp+0x14) 1)
21047
21048
21049 $check-mu-get-stmt:error-output-not-in-register:
21050 (write-buffered *(ebp+0x10) "fn ")
21051 8b/-> *(ebp+0xc) 0/r32/eax
21052 (lookup *eax *(eax+4))
21053 (write-buffered *(ebp+0x10) %eax)
21054 (write-buffered *(ebp+0x10) ": stmt get: output '")
21055 (lookup *edi *(edi+4))
21056 (write-buffered *(ebp+0x10) %eax)
21057 (write-buffered *(ebp+0x10) "' is not in a register\n")
21058 (flush *(ebp+0x10))
21059 (stop *(ebp+0x14) 1)
21060
21061
21062 $check-mu-get-stmt:error-output-type-not-address:
21063 (write-buffered *(ebp+0x10) "fn ")
21064 8b/-> *(ebp+0xc) 0/r32/eax
21065 (lookup *eax *(eax+4))
21066 (write-buffered *(ebp+0x10) %eax)
21067 (write-buffered *(ebp+0x10) ": stmt get: output must be an addr\n")
21068 (flush *(ebp+0x10))
21069 (stop *(ebp+0x14) 1)
21070
21071
21072 $check-mu-get-stmt:error-bad-output-type:
21073 (write-buffered *(ebp+0x10) "fn ")
21074 8b/-> *(ebp+0xc) 0/r32/eax
21075 (lookup *eax *(eax+4))
21076 (write-buffered *(ebp+0x10) %eax)
21077 (write-buffered *(ebp+0x10) ": stmt get: wrong output type for member '")
21078 (write-buffered *(ebp+0x10) %ecx)
21079 (write-buffered *(ebp+0x10) "' of type '")
21080 bf/copy-to-edi Type-id/imm32
21081 8b/-> *(edi+ebx<<2+0xc) 6/r32/esi
21082 {
21083 81 7/subop/compare %esi 0/imm32
21084 74/jump-if-= break/disp8
21085 (write-buffered *(ebp+0x10) %esi)
21086 }
21087 (write-buffered *(ebp+0x10) "'\n")
21088 (flush *(ebp+0x10))
21089 (stop *(ebp+0x14) 1)
21090
21091
21092 check-mu-index-stmt:
21093
21094 55/push-ebp
21095 89/<- %ebp 4/r32/esp
21096
21097 50/push-eax
21098 51/push-ecx
21099 52/push-edx
21100 53/push-ebx
21101 56/push-esi
21102 57/push-edi
21103
21104 8b/-> *(ebp+8) 6/r32/esi
21105
21106
21107 (lookup *(esi+0xc) *(esi+0x10))
21108 $check-mu-index-stmt:check-no-inouts:
21109 3d/compare-eax-and 0/imm32
21110 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
21111 (lookup *eax *(eax+4))
21112 89/<- %ecx 0/r32/eax
21113
21114
21115 (lookup *(ecx+8) *(ecx+0xc))
21116 89/<- %ebx 0/r32/eax
21117
21118 81 7/subop/compare *ebx 0/imm32/false
21119 {
21120 74/jump-if-= break/disp8
21121 (is-simple-mu-type? %ebx 3)
21122 3d/compare-eax-and 0/imm32/false
21123 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-atom-type/disp32
21124 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
21125 }
21126 $check-mu-index-stmt:base-is-compound:
21127
21128 {
21129 (lookup *(ebx+4) *(ebx+8))
21130 (is-simple-mu-type? %eax 2)
21131 3d/compare-eax-and 0/imm32/false
21132 75/jump-if-!= break/disp8
21133 (lookup *(ebx+4) *(ebx+8))
21134 (is-simple-mu-type? %eax 3)
21135 3d/compare-eax-and 0/imm32/false
21136 75/jump-if-!= break/disp8
21137 e9/jump $check-mu-index-stmt:error-base-non-array-type/disp32
21138 }
21139
21140 {
21141 (lookup *(ebx+4) *(ebx+8))
21142 (is-simple-mu-type? %eax 2)
21143 3d/compare-eax-and 0/imm32/false
21144 74/jump-if-= break/disp8
21145 $check-mu-index-stmt:base-is-addr:
21146 (lookup *(ebx+0xc) *(ebx+0x10))
21147 (lookup *(eax+4) *(eax+8))
21148 (is-simple-mu-type? %eax 3)
21149 3d/compare-eax-and 0/imm32/false
21150 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
21151 $check-mu-index-stmt:check-base-addr-is-register:
21152 81 7/subop/compare *(ecx+0x18) 0/imm32
21153 0f 84/jump-if-= $check-mu-index-stmt:error-base-address-array-type-on-stack/disp32
21154 }
21155
21156 {
21157 (lookup *(ebx+4) *(ebx+8))
21158 (is-simple-mu-type? %eax 3)
21159 3d/compare-eax-and 0/imm32/false
21160 74/jump-if-= break/disp8
21161 $check-mu-index-stmt:base-is-array:
21162 81 7/subop/compare *(ecx+0x18) 0/imm32
21163 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-type-in-register/disp32
21164 }
21165
21166 {
21167 (lookup *(ebx+4) *(ebx+8))
21168 (is-simple-mu-type? %eax 2)
21169 3d/compare-eax-and 0/imm32/false
21170 74/jump-if-= break/disp8
21171 (lookup *(ebx+0xc) *(ebx+0x10))
21172 89/<- %ebx 0/r32/eax
21173 }
21174
21175
21176 (lookup *(esi+0xc) *(esi+0x10))
21177 (lookup *(eax+8) *(eax+0xc))
21178 $check-mu-index-stmt:check-single-inout:
21179 3d/compare-eax-and 0/imm32
21180 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
21181 (lookup *eax *(eax+4))
21182 89/<- %ecx 0/r32/eax
21183
21184
21185 (lookup *(ecx+8) *(ecx+0xc))
21186 89/<- %edx 0/r32/eax
21187
21188 81 7/subop/compare *edx 0/imm32/false
21189 {
21190 74/jump-if-= break/disp8
21191 $check-mu-index-stmt:index-type-is-atom:
21192 (is-simple-mu-type? %edx 0)
21193 3d/compare-eax-and 0/imm32/false
21194 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
21195 (is-simple-mu-type? %edx 1)
21196 3d/compare-eax-and 0/imm32/false
21197 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
21198 (is-simple-mu-type? %edx 7)
21199 3d/compare-eax-and 0/imm32/false
21200 0f 85/jump-if-!= $check-mu-index-stmt:error-index-offset-atom-type/disp32
21201 e9/jump $check-mu-index-stmt:error-invalid-index-type/disp32
21202 }
21203
21204 {
21205 75/jump-if-!= break/disp8
21206 $check-mu-index-stmt:index-type-is-non-atom:
21207 (lookup *(edx+4) *(edx+8))
21208 (is-simple-mu-type? %eax 7)
21209 3d/compare-eax-and 0/imm32/false
21210 0f 84/jump-if-= $check-mu-index-stmt:error-invalid-index-type/disp32
21211 }
21212 $check-mu-index-stmt:index-type-done:
21213
21214 {
21215 (is-simple-mu-type? %edx 0)
21216 3d/compare-eax-and 0/imm32/false
21217 75/jump-if-!= break/disp8
21218 $check-mu-index-stmt:check-index-in-register:
21219 81 7/subop/compare *(ecx+0x18) 0/imm32
21220 0f 84/jump-if-= $check-mu-index-stmt:error-index-on-stack/disp32
21221 }
21222
21223 {
21224 (is-simple-mu-type? %edx 1)
21225 3d/compare-eax-and 0/imm32/false
21226 74/jump-if-= break/disp8
21227 $check-mu-index-stmt:check-index-can-be-int:
21228 (lookup *(esi+0xc) *(esi+0x10))
21229 (lookup *eax *(eax+4))
21230 (array-element-size %eax)
21231 3d/compare-eax-and 1/imm32
21232 74/jump-if-= break/disp8
21233 3d/compare-eax-and 2/imm32
21234 74/jump-if-= break/disp8
21235 3d/compare-eax-and 4/imm32
21236 74/jump-if-= break/disp8
21237 3d/compare-eax-and 8/imm32
21238 74/jump-if-= break/disp8
21239 e9/jump $check-mu-index-stmt:error-index-needs-offset/disp32
21240 }
21241
21242 (lookup *(esi+0xc) *(esi+0x10))
21243 (lookup *(eax+8) *(eax+0xc))
21244 (lookup *(eax+8) *(eax+0xc))
21245 3d/compare-eax-and 0/imm32/false
21246 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-inouts/disp32
21247
21248
21249 (lookup *(esi+0x14) *(esi+0x18))
21250 3d/compare-eax-and 0/imm32/false
21251 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-outputs/disp32
21252 (lookup *eax *(eax+4))
21253 89/<- %edi 0/r32/eax
21254
21255
21256 (lookup *(edi+8) *(edi+0xc))
21257 89/<- %edx 0/r32/eax
21258 81 7/subop/compare *edx 0/imm32/false
21259 0f 85/jump-if-!= $check-mu-index-stmt:error-output-type-not-address/disp32
21260
21261 (lookup *(edx+4) *(edx+8))
21262 (is-simple-mu-type? %eax 2)
21263 3d/compare-eax-and 0/imm32/false
21264 0f 84/jump-if-= $check-mu-index-stmt:error-output-type-not-address/disp32
21265
21266 (type-tail %ebx)
21267 89/<- %ebx 0/r32/eax
21268 (type-tail %edx)
21269 (type-equal? %ebx %eax)
21270 3d/compare-eax-and 0/imm32/false
21271 0f 84/jump-if-= $check-mu-index-stmt:error-bad-output-type/disp32
21272
21273 (lookup *(esi+0x14) *(esi+0x18))
21274 (lookup *(eax+8) *(eax+0xc))
21275 3d/compare-eax-and 0/imm32/false
21276 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-outputs/disp32
21277 $check-mu-index-stmt:end:
21278
21279 5f/pop-to-edi
21280 5e/pop-to-esi
21281 5b/pop-to-ebx
21282 5a/pop-to-edx
21283 59/pop-to-ecx
21284 58/pop-to-eax
21285
21286 89/<- %esp 5/r32/ebp
21287 5d/pop-to-ebp
21288 c3/return
21289
21290 $check-mu-index-stmt:error-base-non-array-type:
21291 (write-buffered *(ebp+0x10) "fn ")
21292 8b/-> *(ebp+0xc) 0/r32/eax
21293 (lookup *eax *(eax+4))
21294 (write-buffered *(ebp+0x10) %eax)
21295 (write-buffered *(ebp+0x10) ": stmt index: var '")
21296 (lookup *ecx *(ecx+4))
21297 (write-buffered *(ebp+0x10) %eax)
21298 (write-buffered *(ebp+0x10) "' is not an array\n")
21299 (flush *(ebp+0x10))
21300 (stop *(ebp+0x14) 1)
21301
21302
21303 $check-mu-index-stmt:error-base-array-atom-type:
21304 (write-buffered *(ebp+0x10) "fn ")
21305 8b/-> *(ebp+0xc) 0/r32/eax
21306 (lookup *eax *(eax+4))
21307 (write-buffered *(ebp+0x10) %eax)
21308 (write-buffered *(ebp+0x10) ": stmt index: array '")
21309 (lookup *ecx *(ecx+4))
21310 (write-buffered *(ebp+0x10) %eax)
21311 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
21312 (flush *(ebp+0x10))
21313 (stop *(ebp+0x14) 1)
21314
21315
21316 $check-mu-index-stmt:error-base-address-array-type-on-stack:
21317 (write-buffered *(ebp+0x10) "fn ")
21318 8b/-> *(ebp+0xc) 0/r32/eax
21319 (lookup *eax *(eax+4))
21320 (write-buffered *(ebp+0x10) %eax)
21321 (write-buffered *(ebp+0x10) ": stmt index: var '")
21322 (lookup *ecx *(ecx+4))
21323 (write-buffered *(ebp+0x10) %eax)
21324 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
21325 (flush *(ebp+0x10))
21326 (stop *(ebp+0x14) 1)
21327
21328
21329 $check-mu-index-stmt:error-base-array-type-in-register:
21330 (write-buffered *(ebp+0x10) "fn ")
21331 8b/-> *(ebp+0xc) 0/r32/eax
21332 (lookup *eax *(eax+4))
21333 (write-buffered *(ebp+0x10) %eax)
21334 (write-buffered *(ebp+0x10) ": stmt index: var '")
21335 (lookup *ecx *(ecx+4))
21336 (write-buffered *(ebp+0x10) %eax)
21337 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
21338 (flush *(ebp+0x10))
21339 (stop *(ebp+0x14) 1)
21340
21341
21342 $check-mu-index-stmt:error-too-few-inouts:
21343 (write-buffered *(ebp+0x10) "fn ")
21344 8b/-> *(ebp+0xc) 0/r32/eax
21345 (lookup *eax *(eax+4))
21346 (write-buffered *(ebp+0x10) %eax)
21347 (write-buffered *(ebp+0x10) ": stmt index: too few inouts (2 required)\n")
21348 (flush *(ebp+0x10))
21349 (stop *(ebp+0x14) 1)
21350
21351
21352 $check-mu-index-stmt:error-invalid-index-type:
21353 (write-buffered *(ebp+0x10) "fn ")
21354 8b/-> *(ebp+0xc) 0/r32/eax
21355 (lookup *eax *(eax+4))
21356 (write-buffered *(ebp+0x10) %eax)
21357 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
21358 (lookup *ecx *(ecx+4))
21359 (write-buffered *(ebp+0x10) %eax)
21360 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
21361 (flush *(ebp+0x10))
21362 (stop *(ebp+0x14) 1)
21363
21364
21365 $check-mu-index-stmt:error-index-offset-atom-type:
21366 (write-buffered *(ebp+0x10) "fn ")
21367 8b/-> *(ebp+0xc) 0/r32/eax
21368 (lookup *eax *(eax+4))
21369 (write-buffered *(ebp+0x10) %eax)
21370 (write-buffered *(ebp+0x10) ": stmt index: offset '")
21371 (lookup *ecx *(ecx+4))
21372 (write-buffered *(ebp+0x10) %eax)
21373 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
21374 (flush *(ebp+0x10))
21375 (stop *(ebp+0x14) 1)
21376
21377
21378 $check-mu-index-stmt:error-index-on-stack:
21379 (write-buffered *(ebp+0x10) "fn ")
21380 8b/-> *(ebp+0xc) 0/r32/eax
21381 (lookup *eax *(eax+4))
21382 (write-buffered *(ebp+0x10) %eax)
21383 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
21384 (lookup *ecx *(ecx+4))
21385 (write-buffered *(ebp+0x10) %eax)
21386 (write-buffered *(ebp+0x10) "' must be in a register\n")
21387 (flush *(ebp+0x10))
21388 (stop *(ebp+0x14) 1)
21389
21390
21391 $check-mu-index-stmt:error-index-needs-offset:
21392 (write-buffered *(ebp+0x10) "fn ")
21393 8b/-> *(ebp+0xc) 0/r32/eax
21394 (lookup *eax *(eax+4))
21395 (write-buffered *(ebp+0x10) %eax)
21396 (write-buffered *(ebp+0x10) ": stmt index: cannot take an int for array '")
21397 (lookup *(esi+0xc) *(esi+0x10))
21398 (lookup *eax *(eax+4))
21399 (lookup *eax *(eax+4))
21400 (write-buffered *(ebp+0x10) %eax)
21401 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
21402 (flush *(ebp+0x10))
21403 (stop *(ebp+0x14) 1)
21404
21405
21406 $check-mu-index-stmt:error-too-many-inouts:
21407 (write-buffered *(ebp+0x10) "fn ")
21408 8b/-> *(ebp+0xc) 0/r32/eax
21409 (lookup *eax *(eax+4))
21410 (write-buffered *(ebp+0x10) %eax)
21411 (write-buffered *(ebp+0x10) ": stmt index: too many inouts (2 required)\n")
21412 (flush *(ebp+0x10))
21413 (stop *(ebp+0x14) 1)
21414
21415
21416 $check-mu-index-stmt:error-too-few-outputs:
21417 (write-buffered *(ebp+0x10) "fn ")
21418 8b/-> *(ebp+0xc) 0/r32/eax
21419 (lookup *eax *(eax+4))
21420 (write-buffered *(ebp+0x10) %eax)
21421 (write-buffered *(ebp+0x10) ": stmt index: must have an output\n")
21422 (flush *(ebp+0x10))
21423 (stop *(ebp+0x14) 1)
21424
21425
21426 $check-mu-index-stmt:error-too-many-outputs:
21427 (write-buffered *(ebp+0x10) "fn ")
21428 8b/-> *(ebp+0xc) 0/r32/eax
21429 (lookup *eax *(eax+4))
21430 (write-buffered *(ebp+0x10) %eax)
21431 (write-buffered *(ebp+0x10) ": stmt index: too many outputs (1 required)\n")
21432 (flush *(ebp+0x10))
21433 (stop *(ebp+0x14) 1)
21434
21435
21436 $check-mu-index-stmt:error-output-not-in-register:
21437 (write-buffered *(ebp+0x10) "fn ")
21438 8b/-> *(ebp+0xc) 0/r32/eax
21439 (lookup *eax *(eax+4))
21440 (write-buffered *(ebp+0x10) %eax)
21441 (write-buffered *(ebp+0x10) ": stmt index: output '")
21442 (lookup *edi *(edi+4))
21443 (write-buffered *(ebp+0x10) %eax)
21444 (write-buffered *(ebp+0x10) "' is not in a register\n")
21445 (flush *(ebp+0x10))
21446 (stop *(ebp+0x14) 1)
21447
21448
21449 $check-mu-index-stmt:error-output-type-not-address:
21450 (write-buffered *(ebp+0x10) "fn ")
21451 8b/-> *(ebp+0xc) 0/r32/eax
21452 (lookup *eax *(eax+4))
21453 (write-buffered *(ebp+0x10) %eax)
21454 (write-buffered *(ebp+0x10) ": stmt index: output '")
21455 (lookup *edi *(edi+4))
21456 (write-buffered *(ebp+0x10) %eax)
21457 (write-buffered *(ebp+0x10) "' must be an addr\n")
21458 (flush *(ebp+0x10))
21459 (stop *(ebp+0x14) 1)
21460
21461
21462 $check-mu-index-stmt:error-bad-output-type:
21463 (write-buffered *(ebp+0x10) "fn ")
21464 8b/-> *(ebp+0xc) 0/r32/eax
21465 (lookup *eax *(eax+4))
21466 (write-buffered *(ebp+0x10) %eax)
21467 (write-buffered *(ebp+0x10) ": stmt index: output '")
21468 (lookup *edi *(edi+4))
21469 (write-buffered *(ebp+0x10) %eax)
21470 (write-buffered *(ebp+0x10) "' does not have the right type\n")
21471 (flush *(ebp+0x10))
21472 (stop *(ebp+0x14) 1)
21473
21474
21475 check-mu-length-stmt:
21476
21477 55/push-ebp
21478 89/<- %ebp 4/r32/esp
21479
21480 50/push-eax
21481 51/push-ecx
21482 52/push-edx
21483 53/push-ebx
21484 56/push-esi
21485 57/push-edi
21486
21487 8b/-> *(ebp+8) 6/r32/esi
21488
21489
21490 (lookup *(esi+0xc) *(esi+0x10))
21491 $check-mu-length-stmt:check-no-inouts:
21492 3d/compare-eax-and 0/imm32
21493 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-inouts/disp32
21494 (lookup *eax *(eax+4))
21495 89/<- %ecx 0/r32/eax
21496
21497
21498 (lookup *(ecx+8) *(ecx+0xc))
21499 89/<- %ebx 0/r32/eax
21500
21501 81 7/subop/compare *ebx 0/imm32/false
21502 {
21503 74/jump-if-= break/disp8
21504 (is-simple-mu-type? %ebx 3)
21505 3d/compare-eax-and 0/imm32/false
21506 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-atom-type/disp32
21507 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
21508 }
21509 $check-mu-length-stmt:base-is-compound:
21510
21511 {
21512 (lookup *(ebx+4) *(ebx+8))
21513 (is-simple-mu-type? %eax 2)
21514 3d/compare-eax-and 0/imm32/false
21515 75/jump-if-!= break/disp8
21516 (lookup *(ebx+4) *(ebx+8))
21517 (is-simple-mu-type? %eax 3)
21518 3d/compare-eax-and 0/imm32/false
21519 75/jump-if-!= break/disp8
21520 e9/jump $check-mu-length-stmt:error-base-non-array-type/disp32
21521 }
21522
21523 {
21524 (lookup *(ebx+4) *(ebx+8))
21525 (is-simple-mu-type? %eax 2)
21526 3d/compare-eax-and 0/imm32/false
21527 74/jump-if-= break/disp8
21528 $check-mu-length-stmt:base-is-addr:
21529 (lookup *(ebx+0xc) *(ebx+0x10))
21530 (lookup *(eax+4) *(eax+8))
21531 (is-simple-mu-type? %eax 3)
21532 3d/compare-eax-and 0/imm32/false
21533 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
21534 $check-mu-length-stmt:check-base-addr-is-register:
21535 81 7/subop/compare *(ecx+0x18) 0/imm32
21536 0f 84/jump-if-= $check-mu-length-stmt:error-base-address-array-type-on-stack/disp32
21537 }
21538
21539 {
21540 (lookup *(ebx+4) *(ebx+8))
21541 (is-simple-mu-type? %eax 3)
21542 3d/compare-eax-and 0/imm32/false
21543 74/jump-if-= break/disp8
21544 $check-mu-length-stmt:base-is-array:
21545 81 7/subop/compare *(ecx+0x18) 0/imm32
21546 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-type-in-register/disp32
21547 }
21548
21549 {
21550 (lookup *(ebx+4) *(ebx+8))
21551 (is-simple-mu-type? %eax 2)
21552 3d/compare-eax-and 0/imm32/false
21553 74/jump-if-= break/disp8
21554 (lookup *(ebx+0xc) *(ebx+0x10))
21555 89/<- %ebx 0/r32/eax
21556 }
21557
21558 (lookup *(esi+0xc) *(esi+0x10))
21559 (lookup *(eax+8) *(eax+0xc))
21560 3d/compare-eax-and 0/imm32/false
21561 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-inouts/disp32
21562
21563
21564 (lookup *(esi+0x14) *(esi+0x18))
21565 3d/compare-eax-and 0/imm32/false
21566 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-outputs/disp32
21567 (lookup *eax *(eax+4))
21568 89/<- %edi 0/r32/eax
21569
21570
21571 (lookup *(edi+8) *(edi+0xc))
21572 (is-simple-mu-type? %eax 1)
21573 3d/compare-eax-and 0/imm32/false
21574 0f 84/jump-if-= $check-mu-length-stmt:error-invalid-output-type/disp32
21575
21576 (lookup *(esi+0x14) *(esi+0x18))
21577 (lookup *(eax+8) *(eax+0xc))
21578 3d/compare-eax-and 0/imm32/false
21579 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-outputs/disp32
21580 $check-mu-length-stmt:end:
21581
21582 5f/pop-to-edi
21583 5e/pop-to-esi
21584 5b/pop-to-ebx
21585 5a/pop-to-edx
21586 59/pop-to-ecx
21587 58/pop-to-eax
21588
21589 89/<- %esp 5/r32/ebp
21590 5d/pop-to-ebp
21591 c3/return
21592
21593 $check-mu-length-stmt:error-base-non-array-type:
21594 (write-buffered *(ebp+0x10) "fn ")
21595 8b/-> *(ebp+0xc) 0/r32/eax
21596 (lookup *eax *(eax+4))
21597 (write-buffered *(ebp+0x10) %eax)
21598 (write-buffered *(ebp+0x10) ": stmt length: var '")
21599 (lookup *ecx *(ecx+4))
21600 (write-buffered *(ebp+0x10) %eax)
21601 (write-buffered *(ebp+0x10) "' is not an array\n")
21602 (flush *(ebp+0x10))
21603 (stop *(ebp+0x14) 1)
21604
21605
21606 $check-mu-length-stmt:error-base-array-atom-type:
21607 (write-buffered *(ebp+0x10) "fn ")
21608 8b/-> *(ebp+0xc) 0/r32/eax
21609 (lookup *eax *(eax+4))
21610 (write-buffered *(ebp+0x10) %eax)
21611 (write-buffered *(ebp+0x10) ": stmt length: array '")
21612 (lookup *ecx *(ecx+4))
21613 (write-buffered *(ebp+0x10) %eax)
21614 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
21615 (flush *(ebp+0x10))
21616 (stop *(ebp+0x14) 1)
21617
21618
21619 $check-mu-length-stmt:error-base-address-array-type-on-stack:
21620 (write-buffered *(ebp+0x10) "fn ")
21621 8b/-> *(ebp+0xc) 0/r32/eax
21622 (lookup *eax *(eax+4))
21623 (write-buffered *(ebp+0x10) %eax)
21624 (write-buffered *(ebp+0x10) ": stmt length: var '")
21625 (lookup *ecx *(ecx+4))
21626 (write-buffered *(ebp+0x10) %eax)
21627 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
21628 (flush *(ebp+0x10))
21629 (stop *(ebp+0x14) 1)
21630
21631
21632 $check-mu-length-stmt:error-base-array-type-in-register:
21633 (write-buffered *(ebp+0x10) "fn ")
21634 8b/-> *(ebp+0xc) 0/r32/eax
21635 (lookup *eax *(eax+4))
21636 (write-buffered *(ebp+0x10) %eax)
21637 (write-buffered *(ebp+0x10) ": stmt length: var '")
21638 (lookup *ecx *(ecx+4))
21639 (write-buffered *(ebp+0x10) %eax)
21640 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
21641 (flush *(ebp+0x10))
21642 (stop *(ebp+0x14) 1)
21643
21644
21645 $check-mu-length-stmt:error-too-few-inouts:
21646 (write-buffered *(ebp+0x10) "fn ")
21647 8b/-> *(ebp+0xc) 0/r32/eax
21648 (lookup *eax *(eax+4))
21649 (write-buffered *(ebp+0x10) %eax)
21650 (write-buffered *(ebp+0x10) ": stmt length: too few inouts (1 required)\n")
21651 (flush *(ebp+0x10))
21652 (stop *(ebp+0x14) 1)
21653
21654
21655 $check-mu-length-stmt:error-invalid-index-type:
21656 (write-buffered *(ebp+0x10) "fn ")
21657 8b/-> *(ebp+0xc) 0/r32/eax
21658 (lookup *eax *(eax+4))
21659 (write-buffered *(ebp+0x10) %eax)
21660 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
21661 (lookup *ecx *(ecx+4))
21662 (write-buffered *(ebp+0x10) %eax)
21663 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
21664 (flush *(ebp+0x10))
21665 (stop *(ebp+0x14) 1)
21666
21667
21668 $check-mu-length-stmt:error-index-offset-atom-type:
21669 (write-buffered *(ebp+0x10) "fn ")
21670 8b/-> *(ebp+0xc) 0/r32/eax
21671 (lookup *eax *(eax+4))
21672 (write-buffered *(ebp+0x10) %eax)
21673 (write-buffered *(ebp+0x10) ": stmt length: offset '")
21674 (lookup *ecx *(ecx+4))
21675 (write-buffered *(ebp+0x10) %eax)
21676 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
21677 (flush *(ebp+0x10))
21678 (stop *(ebp+0x14) 1)
21679
21680
21681 $check-mu-length-stmt:error-index-on-stack:
21682 (write-buffered *(ebp+0x10) "fn ")
21683 8b/-> *(ebp+0xc) 0/r32/eax
21684 (lookup *eax *(eax+4))
21685 (write-buffered *(ebp+0x10) %eax)
21686 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
21687 (lookup *ecx *(ecx+4))
21688 (write-buffered *(ebp+0x10) %eax)
21689 (write-buffered *(ebp+0x10) "' must be in a register\n")
21690 (flush *(ebp+0x10))
21691 (stop *(ebp+0x14) 1)
21692
21693
21694 $check-mu-length-stmt:error-index-needs-offset:
21695 (write-buffered *(ebp+0x10) "fn ")
21696 8b/-> *(ebp+0xc) 0/r32/eax
21697 (lookup *eax *(eax+4))
21698 (write-buffered *(ebp+0x10) %eax)
21699 (write-buffered *(ebp+0x10) ": stmt length: cannot take an int for array '")
21700 (lookup *(esi+0xc) *(esi+0x10))
21701 (lookup *eax *(eax+4))
21702 (lookup *eax *(eax+4))
21703 (write-buffered *(ebp+0x10) %eax)
21704 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
21705 (flush *(ebp+0x10))
21706 (stop *(ebp+0x14) 1)
21707
21708
21709 $check-mu-length-stmt:error-too-many-inouts:
21710 (write-buffered *(ebp+0x10) "fn ")
21711 8b/-> *(ebp+0xc) 0/r32/eax
21712 (lookup *eax *(eax+4))
21713 (write-buffered *(ebp+0x10) %eax)
21714 (write-buffered *(ebp+0x10) ": stmt length: too many inouts (1 required)\n")
21715 (flush *(ebp+0x10))
21716 (stop *(ebp+0x14) 1)
21717
21718
21719 $check-mu-length-stmt:error-too-few-outputs:
21720 (write-buffered *(ebp+0x10) "fn ")
21721 8b/-> *(ebp+0xc) 0/r32/eax
21722 (lookup *eax *(eax+4))
21723 (write-buffered *(ebp+0x10) %eax)
21724 (write-buffered *(ebp+0x10) ": stmt length: must have an output\n")
21725 (flush *(ebp+0x10))
21726 (stop *(ebp+0x14) 1)
21727
21728
21729 $check-mu-length-stmt:error-too-many-outputs:
21730 (write-buffered *(ebp+0x10) "fn ")
21731 8b/-> *(ebp+0xc) 0/r32/eax
21732 (lookup *eax *(eax+4))
21733 (write-buffered *(ebp+0x10) %eax)
21734 (write-buffered *(ebp+0x10) ": stmt length: too many outputs (1 required)\n")
21735 (flush *(ebp+0x10))
21736 (stop *(ebp+0x14) 1)
21737
21738
21739 $check-mu-length-stmt:error-output-not-in-register:
21740 (write-buffered *(ebp+0x10) "fn ")
21741 8b/-> *(ebp+0xc) 0/r32/eax
21742 (lookup *eax *(eax+4))
21743 (write-buffered *(ebp+0x10) %eax)
21744 (write-buffered *(ebp+0x10) ": stmt length: output '")
21745 (lookup *edi *(edi+4))
21746 (write-buffered *(ebp+0x10) %eax)
21747 (write-buffered *(ebp+0x10) "' is not in a register\n")
21748 (flush *(ebp+0x10))
21749 (stop *(ebp+0x14) 1)
21750
21751
21752 $check-mu-length-stmt:error-invalid-output-type:
21753 (write-buffered *(ebp+0x10) "fn ")
21754 8b/-> *(ebp+0xc) 0/r32/eax
21755 (lookup *eax *(eax+4))
21756 (write-buffered *(ebp+0x10) %eax)
21757 (write-buffered *(ebp+0x10) ": stmt length: output '")
21758 (lookup *edi *(edi+4))
21759 (write-buffered *(ebp+0x10) %eax)
21760 (write-buffered *(ebp+0x10) "' does not have the right type\n")
21761 (flush *(ebp+0x10))
21762 (stop *(ebp+0x14) 1)
21763
21764
21765 check-mu-compute-offset-stmt:
21766
21767 55/push-ebp
21768 89/<- %ebp 4/r32/esp
21769
21770 50/push-eax
21771 51/push-ecx
21772 52/push-edx
21773 53/push-ebx
21774 56/push-esi
21775 57/push-edi
21776
21777 8b/-> *(ebp+8) 6/r32/esi
21778
21779
21780 (lookup *(esi+0xc) *(esi+0x10))
21781 $check-mu-compute-offset-stmt:check-no-inouts:
21782 3d/compare-eax-and 0/imm32
21783 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
21784 (lookup *eax *(eax+4))
21785 89/<- %ecx 0/r32/eax
21786
21787
21788 (lookup *(ecx+8) *(ecx+0xc))
21789 89/<- %ebx 0/r32/eax
21790
21791 81 7/subop/compare *ebx 0/imm32/false
21792 {
21793 74/jump-if-= break/disp8
21794 (is-simple-mu-type? %ebx 3)
21795 3d/compare-eax-and 0/imm32/false
21796 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-base-array-atom-type/disp32
21797 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
21798 }
21799 $check-mu-compute-offset-stmt:base-is-compound:
21800
21801 {
21802 (lookup *(ebx+4) *(ebx+8))
21803 (is-simple-mu-type? %eax 2)
21804 3d/compare-eax-and 0/imm32/false
21805 75/jump-if-!= break/disp8
21806 (lookup *(ebx+4) *(ebx+8))
21807 (is-simple-mu-type? %eax 3)
21808 3d/compare-eax-and 0/imm32/false
21809 75/jump-if-!= break/disp8
21810 e9/jump $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
21811 }
21812
21813 {
21814 (lookup *(ebx+4) *(ebx+8))
21815 (is-simple-mu-type? %eax 2)
21816 3d/compare-eax-and 0/imm32/false
21817 74/jump-if-= break/disp8
21818 $check-mu-compute-offset-stmt:base-is-addr:
21819 (lookup *(ebx+0xc) *(ebx+0x10))
21820 (lookup *(eax+4) *(eax+8))
21821 (is-simple-mu-type? %eax 3)
21822 3d/compare-eax-and 0/imm32/false
21823 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
21824 }
21825
21826 {
21827 (lookup *(ebx+4) *(ebx+8))
21828 (is-simple-mu-type? %eax 2)
21829 3d/compare-eax-and 0/imm32/false
21830 74/jump-if-= break/disp8
21831 (lookup *(ebx+0xc) *(ebx+0x10))
21832 89/<- %ebx 0/r32/eax
21833 }
21834
21835
21836 (lookup *(esi+0xc) *(esi+0x10))
21837 (lookup *(eax+8) *(eax+0xc))
21838 $check-mu-compute-offset-stmt:check-single-inout:
21839 3d/compare-eax-and 0/imm32
21840 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
21841 (lookup *eax *(eax+4))
21842 89/<- %ecx 0/r32/eax
21843
21844
21845 (lookup *(ecx+8) *(ecx+0xc))
21846 89/<- %edx 0/r32/eax
21847
21848 81 7/subop/compare *edx 0/imm32/false
21849 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
21850 {
21851 $check-mu-compute-offset-stmt:index-type-is-atom:
21852 (is-simple-mu-type? %edx 0)
21853 3d/compare-eax-and 0/imm32/false
21854 75/jump-if-!= break/disp8
21855 (is-simple-mu-type? %edx 1)
21856 3d/compare-eax-and 0/imm32/false
21857 75/jump-if-!= break/disp8
21858 e9/jump $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
21859 }
21860
21861 (lookup *(esi+0xc) *(esi+0x10))
21862 (lookup *(eax+8) *(eax+0xc))
21863 (lookup *(eax+8) *(eax+0xc))
21864 3d/compare-eax-and 0/imm32/false
21865 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-inouts/disp32
21866
21867
21868 (lookup *(esi+0x14) *(esi+0x18))
21869 3d/compare-eax-and 0/imm32/false
21870 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-outputs/disp32
21871 (lookup *eax *(eax+4))
21872 89/<- %edi 0/r32/eax
21873
21874
21875 (lookup *(edi+8) *(edi+0xc))
21876 89/<- %edx 0/r32/eax
21877 81 7/subop/compare *edx 0/imm32/false
21878 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
21879
21880 (lookup *(edx+4) *(edx+8))
21881 (is-simple-mu-type? %eax 7)
21882 3d/compare-eax-and 0/imm32/false
21883 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
21884
21885 (type-tail %ebx)
21886 89/<- %ebx 0/r32/eax
21887 (type-tail %edx)
21888 (type-equal? %ebx %eax)
21889 3d/compare-eax-and 0/imm32/false
21890 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-bad-output-type/disp32
21891
21892 (lookup *(esi+0x14) *(esi+0x18))
21893 (lookup *(eax+8) *(eax+0xc))
21894 3d/compare-eax-and 0/imm32/false
21895 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-outputs/disp32
21896 $check-mu-compute-offset-stmt:end:
21897
21898 5f/pop-to-edi
21899 5e/pop-to-esi
21900 5b/pop-to-ebx
21901 5a/pop-to-edx
21902 59/pop-to-ecx
21903 58/pop-to-eax
21904
21905 89/<- %esp 5/r32/ebp
21906 5d/pop-to-ebp
21907 c3/return
21908
21909 $check-mu-compute-offset-stmt:error-base-non-array-type:
21910 (write-buffered *(ebp+0x10) "fn ")
21911 8b/-> *(ebp+0xc) 0/r32/eax
21912 (lookup *eax *(eax+4))
21913 (write-buffered *(ebp+0x10) %eax)
21914 (write-buffered *(ebp+0x10) ": stmt compute-offset: var '")
21915 (lookup *ecx *(ecx+4))
21916 (write-buffered *(ebp+0x10) %eax)
21917 (write-buffered *(ebp+0x10) "' is not an array\n")
21918 (flush *(ebp+0x10))
21919 (stop *(ebp+0x14) 1)
21920
21921
21922 $check-mu-compute-offset-stmt:error-base-array-atom-type:
21923 (write-buffered *(ebp+0x10) "fn ")
21924 8b/-> *(ebp+0xc) 0/r32/eax
21925 (lookup *eax *(eax+4))
21926 (write-buffered *(ebp+0x10) %eax)
21927 (write-buffered *(ebp+0x10) ": stmt compute-offset: array '")
21928 (lookup *ecx *(ecx+4))
21929 (write-buffered *(ebp+0x10) %eax)
21930 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
21931 (flush *(ebp+0x10))
21932 (stop *(ebp+0x14) 1)
21933
21934
21935 $check-mu-compute-offset-stmt:error-too-few-inouts:
21936 (write-buffered *(ebp+0x10) "fn ")
21937 8b/-> *(ebp+0xc) 0/r32/eax
21938 (lookup *eax *(eax+4))
21939 (write-buffered *(ebp+0x10) %eax)
21940 (write-buffered *(ebp+0x10) ": stmt compute-offset: too few inouts (2 required)\n")
21941 (flush *(ebp+0x10))
21942 (stop *(ebp+0x14) 1)
21943
21944
21945 $check-mu-compute-offset-stmt:error-invalid-index-type:
21946 (write-buffered *(ebp+0x10) "fn ")
21947 8b/-> *(ebp+0xc) 0/r32/eax
21948 (lookup *eax *(eax+4))
21949 (write-buffered *(ebp+0x10) %eax)
21950 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
21951 (lookup *ecx *(ecx+4))
21952 (write-buffered *(ebp+0x10) %eax)
21953 (write-buffered *(ebp+0x10) "' must be an int\n")
21954 (flush *(ebp+0x10))
21955 (stop *(ebp+0x14) 1)
21956
21957
21958 $check-mu-compute-offset-stmt:error-index-offset-atom-type:
21959 (write-buffered *(ebp+0x10) "fn ")
21960 8b/-> *(ebp+0xc) 0/r32/eax
21961 (lookup *eax *(eax+4))
21962 (write-buffered *(ebp+0x10) %eax)
21963 (write-buffered *(ebp+0x10) ": stmt compute-offset: offset '")
21964 (lookup *ecx *(ecx+4))
21965 (write-buffered *(ebp+0x10) %eax)
21966 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
21967 (flush *(ebp+0x10))
21968 (stop *(ebp+0x14) 1)
21969
21970
21971 $check-mu-compute-offset-stmt:error-index-on-stack:
21972 (write-buffered *(ebp+0x10) "fn ")
21973 8b/-> *(ebp+0xc) 0/r32/eax
21974 (lookup *eax *(eax+4))
21975 (write-buffered *(ebp+0x10) %eax)
21976 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
21977 (lookup *ecx *(ecx+4))
21978 (write-buffered *(ebp+0x10) %eax)
21979 (write-buffered *(ebp+0x10) "' must be in a register\n")
21980 (flush *(ebp+0x10))
21981 (stop *(ebp+0x14) 1)
21982
21983
21984 $check-mu-compute-offset-stmt:error-too-many-inouts:
21985 (write-buffered *(ebp+0x10) "fn ")
21986 8b/-> *(ebp+0xc) 0/r32/eax
21987 (lookup *eax *(eax+4))
21988 (write-buffered *(ebp+0x10) %eax)
21989 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many inouts (2 required)\n")
21990 (flush *(ebp+0x10))
21991 (stop *(ebp+0x14) 1)
21992
21993
21994 $check-mu-compute-offset-stmt:error-too-few-outputs:
21995 (write-buffered *(ebp+0x10) "fn ")
21996 8b/-> *(ebp+0xc) 0/r32/eax
21997 (lookup *eax *(eax+4))
21998 (write-buffered *(ebp+0x10) %eax)
21999 (write-buffered *(ebp+0x10) ": stmt compute-offset: must have an output\n")
22000 (flush *(ebp+0x10))
22001 (stop *(ebp+0x14) 1)
22002
22003
22004 $check-mu-compute-offset-stmt:error-too-many-outputs:
22005 (write-buffered *(ebp+0x10) "fn ")
22006 8b/-> *(ebp+0xc) 0/r32/eax
22007 (lookup *eax *(eax+4))
22008 (write-buffered *(ebp+0x10) %eax)
22009 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many outputs (1 required)\n")
22010 (flush *(ebp+0x10))
22011 (stop *(ebp+0x14) 1)
22012
22013
22014 $check-mu-compute-offset-stmt:error-output-not-in-register:
22015 (write-buffered *(ebp+0x10) "fn ")
22016 8b/-> *(ebp+0xc) 0/r32/eax
22017 (lookup *eax *(eax+4))
22018 (write-buffered *(ebp+0x10) %eax)
22019 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
22020 (lookup *edi *(edi+4))
22021 (write-buffered *(ebp+0x10) %eax)
22022 (write-buffered *(ebp+0x10) "' is not in a register\n")
22023 (flush *(ebp+0x10))
22024 (stop *(ebp+0x14) 1)
22025
22026
22027 $check-mu-compute-offset-stmt:error-output-type-not-offset:
22028 (write-buffered *(ebp+0x10) "fn ")
22029 8b/-> *(ebp+0xc) 0/r32/eax
22030 (lookup *eax *(eax+4))
22031 (write-buffered *(ebp+0x10) %eax)
22032 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
22033 (lookup *edi *(edi+4))
22034 (write-buffered *(ebp+0x10) %eax)
22035 (write-buffered *(ebp+0x10) "' must be an offset\n")
22036 (flush *(ebp+0x10))
22037 (stop *(ebp+0x14) 1)
22038
22039
22040 $check-mu-compute-offset-stmt:error-bad-output-type:
22041 (write-buffered *(ebp+0x10) "fn ")
22042 8b/-> *(ebp+0xc) 0/r32/eax
22043 (lookup *eax *(eax+4))
22044 (write-buffered *(ebp+0x10) %eax)
22045 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
22046 (lookup *edi *(edi+4))
22047 (write-buffered *(ebp+0x10) %eax)
22048 (write-buffered *(ebp+0x10) "' does not have the right type\n")
22049 (flush *(ebp+0x10))
22050 (stop *(ebp+0x14) 1)
22051
22052
22053 check-mu-copy-object-stmt:
22054
22055 55/push-ebp
22056 89/<- %ebp 4/r32/esp
22057
22058 50/push-eax
22059 51/push-ecx
22060 53/push-ebx
22061 56/push-esi
22062 57/push-edi
22063
22064 8b/-> *(ebp+8) 6/r32/esi
22065 $check-mu-copy-object-stmt:check-for-output:
22066
22067 (lookup *(esi+0x14) *(esi+0x18))
22068 3d/compare-eax-and 0/imm32
22069 0f 85/jump-if-!= $check-mu-copy-object-stmt:error-too-many-outputs/disp32
22070 $check-mu-copy-object-stmt:get-left:
22071
22072 (lookup *(esi+0xc) *(esi+0x10))
22073 89/<- %edi 0/r32/eax
22074
22075 3d/compare-eax-and 0/imm32
22076 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
22077 $check-mu-copy-object-stmt:get-src:
22078
22079 (lookup *(edi+8) *(edi+0xc))
22080 89/<- %esi 0/r32/eax
22081
22082 3d/compare-eax-and 0/imm32
22083 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
22084
22085 (lookup *(esi+8) *(esi+0xc))
22086 3d/compare-eax-and 0/imm32
22087 0f 85/jump-if-!= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
22088 $check-mu-copy-object-stmt:types:
22089
22090 (lookup *esi *(esi+4))
22091 (lookup *(eax+8) *(eax+0xc))
22092 89/<- %ecx 0/r32/eax
22093
22094 8b/-> *(esi+0x10) 0/r32/eax
22095 3d/compare-eax-and 0/imm32/false
22096 {
22097 74/jump-if-= break/disp8
22098 (lookup *(ecx+0xc) *(ecx+0x10))
22099
22100 81 7/subop/compare *(eax+0xc) 0/imm32
22101 {
22102 75/jump-if-!= break/disp8
22103 (lookup *(eax+4) *(eax+8))
22104 }
22105 89/<- %ecx 0/r32/eax
22106 }
22107
22108 (is-mu-addr-type? %ecx)
22109 3d/compare-eax-and 0/imm32/false
22110 0f 84/jump-if-= $check-mu-copy-object-stmt:error-invalid-types/disp32
22111
22112 (lookup *edi *(edi+4))
22113 (lookup *(eax+8) *(eax+0xc))
22114 89/<- %ebx 0/r32/eax
22115
22116 8b/-> *(edi+0x10) 0/r32/eax
22117 3d/compare-eax-and 0/imm32/false
22118 {
22119 74/jump-if-= break/disp8
22120 (lookup *(ebx+0xc) *(ebx+0x10))
22121
22122 81 7/subop/compare *(eax+0xc) 0/imm32
22123 {
22124 75/jump-if-!= break/disp8
22125 (lookup *(eax+4) *(eax+8))
22126 }
22127 89/<- %ebx 0/r32/eax
22128 }
22129
22130 (type-equal? %ecx %ebx)
22131 3d/compare-eax-and 0/imm32
22132 0f 84/jump-if-= $check-mu-copy-object-stmt:error-invalid-types/disp32
22133 $check-mu-copy-object-stmt:end:
22134
22135 5f/pop-to-edi
22136 5e/pop-to-esi
22137 5b/pop-to-ebx
22138 59/pop-to-ecx
22139 58/pop-to-eax
22140
22141 89/<- %esp 5/r32/ebp
22142 5d/pop-to-ebp
22143 c3/return
22144
22145 $check-mu-copy-object-stmt:error-incorrect-inouts:
22146 (write-buffered *(ebp+0x10) "fn ")
22147 8b/-> *(ebp+0xc) 0/r32/eax
22148 (lookup *eax *(eax+4))
22149 (write-buffered *(ebp+0x10) %eax)
22150 (write-buffered *(ebp+0x10) ": stmt 'copy-object' must have two inouts\n")
22151 (flush *(ebp+0x10))
22152 (stop *(ebp+0x14) 1)
22153
22154
22155 $check-mu-copy-object-stmt:error-too-many-outputs:
22156 (write-buffered *(ebp+0x10) "fn ")
22157 8b/-> *(ebp+0xc) 0/r32/eax
22158 (lookup *eax *(eax+4))
22159 (write-buffered *(ebp+0x10) %eax)
22160 (write-buffered *(ebp+0x10) ": stmt 'copy-object' must not have any outputs\n")
22161 (flush *(ebp+0x10))
22162 (stop *(ebp+0x14) 1)
22163
22164
22165 $check-mu-copy-object-stmt:error-invalid-types:
22166 (write-buffered *(ebp+0x10) "fn ")
22167 8b/-> *(ebp+0xc) 0/r32/eax
22168 (lookup *eax *(eax+4))
22169 (write-buffered *(ebp+0x10) %eax)
22170 (write-buffered *(ebp+0x10) ": stmt copy-object: two inouts with identical addr types expected\n")
22171 (flush *(ebp+0x10))
22172 (stop *(ebp+0x14) 1)
22173
22174
22175 check-mu-allocate-stmt:
22176
22177 55/push-ebp
22178 89/<- %ebp 4/r32/esp
22179
22180 50/push-eax
22181 53/push-ebx
22182 56/push-esi
22183 57/push-edi
22184
22185 8b/-> *(ebp+8) 6/r32/esi
22186 $check-mu-allocate-stmt:check-for-output:
22187
22188 (lookup *(esi+0x14) *(esi+0x18))
22189 3d/compare-eax-and 0/imm32
22190 0f 85/jump-if-!= $check-mu-allocate-stmt:error-too-many-outputs/disp32
22191 $check-mu-allocate-stmt:get-target:
22192
22193 (lookup *(esi+0xc) *(esi+0x10))
22194 89/<- %edi 0/r32/eax
22195
22196 3d/compare-eax-and 0/imm32
22197 0f 84/jump-if-= $check-mu-allocate-stmt:error-incorrect-inouts/disp32
22198
22199 (lookup *(edi+8) *(edi+0xc))
22200 3d/compare-eax-and 0/imm32
22201 0f 85/jump-if-!= $check-mu-allocate-stmt:error-incorrect-inouts/disp32
22202 $check-mu-allocate-stmt:check-type:
22203
22204 (lookup *edi *(edi+4))
22205 (lookup *(eax+8) *(eax+0xc))
22206 89/<- %ebx 0/r32/eax
22207
22208 8b/-> *(edi+0x10) 0/r32/eax
22209 3d/compare-eax-and 0/imm32/false
22210 {
22211 74/jump-if-= break/disp8
22212 (lookup *(ebx+0xc) *(ebx+0x10))
22213
22214 81 7/subop/compare *(eax+0xc) 0/imm32
22215 {
22216 75/jump-if-!= break/disp8
22217 (lookup *(eax+4) *(eax+8))
22218 }
22219 89/<- %ebx 0/r32/eax
22220 }
22221
22222 (is-mu-addr-type? %ebx)
22223 3d/compare-eax-and 0/imm32/false
22224 0f 84/jump-if-= $check-mu-allocate-stmt:error-invalid-type/disp32
22225
22226 (lookup *(ebx+0xc) *(ebx+0x10))
22227 81 7/subop/compare *eax 0/imm32/false
22228 0f 85/jump-if-!= $check-mu-allocate-stmt:error-invalid-type/disp32
22229
22230 (lookup *(eax+4) *(eax+8))
22231 (is-simple-mu-type? %eax 4)
22232 3d/compare-eax-and 0/imm32/false
22233 0f 84/jump-if-= $check-mu-allocate-stmt:error-invalid-type/disp32
22234 $check-mu-allocate-stmt:end:
22235
22236 5f/pop-to-edi
22237 5e/pop-to-esi
22238 5b/pop-to-ebx
22239 58/pop-to-eax
22240
22241 89/<- %esp 5/r32/ebp
22242 5d/pop-to-ebp
22243 c3/return
22244
22245 $check-mu-allocate-stmt:error-incorrect-inouts:
22246 (write-buffered *(ebp+0x10) "fn ")
22247 8b/-> *(ebp+0xc) 0/r32/eax
22248 (lookup *eax *(eax+4))
22249 (write-buffered *(ebp+0x10) %eax)
22250 (write-buffered *(ebp+0x10) ": stmt 'allocate' must have a single inout\n")
22251 (flush *(ebp+0x10))
22252 (stop *(ebp+0x14) 1)
22253
22254
22255 $check-mu-allocate-stmt:error-too-many-outputs:
22256 (write-buffered *(ebp+0x10) "fn ")
22257 8b/-> *(ebp+0xc) 0/r32/eax
22258 (lookup *eax *(eax+4))
22259 (write-buffered *(ebp+0x10) %eax)
22260 (write-buffered *(ebp+0x10) ": stmt 'allocate' must not have any outputs\n")
22261 (flush *(ebp+0x10))
22262 (stop *(ebp+0x14) 1)
22263
22264
22265 $check-mu-allocate-stmt:error-invalid-type:
22266 (write-buffered *(ebp+0x10) "fn ")
22267 8b/-> *(ebp+0xc) 0/r32/eax
22268 (lookup *eax *(eax+4))
22269 (write-buffered *(ebp+0x10) %eax)
22270 (write-buffered *(ebp+0x10) ": stmt allocate: inout '")
22271 (lookup *edi *(edi+4))
22272 (lookup *eax *(eax+4))
22273 (write-buffered *(ebp+0x10) %eax)
22274 (write-buffered *(ebp+0x10) "' must have type (addr handle ...)\n")
22275 (flush *(ebp+0x10))
22276 (stop *(ebp+0x14) 1)
22277
22278
22279 check-mu-populate-stmt:
22280
22281 55/push-ebp
22282 89/<- %ebp 4/r32/esp
22283
22284 50/push-eax
22285 53/push-ebx
22286 56/push-esi
22287 57/push-edi
22288
22289 8b/-> *(ebp+8) 6/r32/esi
22290 $check-mu-populate-stmt:check-for-output:
22291
22292 (lookup *(esi+0x14) *(esi+0x18))
22293 3d/compare-eax-and 0/imm32
22294 0f 85/jump-if-!= $check-mu-populate-stmt:error-too-many-outputs/disp32
22295 $check-mu-populate-stmt:get-target:
22296
22297 (lookup *(esi+0xc) *(esi+0x10))
22298 89/<- %edi 0/r32/eax
22299
22300 3d/compare-eax-and 0/imm32
22301 0f 84/jump-if-= $check-mu-populate-stmt:error-incorrect-inouts/disp32
22302 $check-mu-populate-stmt:get-length:
22303
22304 (lookup *(edi+8) *(edi+0xc))
22305 89/<- %esi 0/r32/eax
22306
22307 3d/compare-eax-and 0/imm32
22308 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
22309
22310 (lookup *(esi+8) *(esi+0xc))
22311 3d/compare-eax-and 0/imm32
22312 0f 85/jump-if-!= $check-mu-populate-stmt:error-incorrect-inouts/disp32
22313 $check-mu-populate-stmt:check-target-type:
22314
22315 (lookup *edi *(edi+4))
22316 (lookup *(eax+8) *(eax+0xc))
22317 89/<- %ebx 0/r32/eax
22318 $check-mu-populate-stmt:check-target-type-deref:
22319
22320 8b/-> *(edi+0x10) 0/r32/eax
22321 3d/compare-eax-and 0/imm32/false
22322 {
22323 74/jump-if-= break/disp8
22324 (lookup *(ebx+0xc) *(ebx+0x10))
22325
22326 81 7/subop/compare *(eax+0xc) 0/imm32
22327 {
22328 75/jump-if-!= break/disp8
22329 (lookup *(eax+4) *(eax+8))
22330 }
22331 89/<- %ebx 0/r32/eax
22332 }
22333 $check-mu-populate-stmt:check-target-type-addr:
22334
22335 (is-mu-addr-type? %ebx)
22336 3d/compare-eax-and 0/imm32/false
22337 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
22338
22339 (lookup *(ebx+0xc) *(ebx+0x10))
22340 89/<- %ebx 0/r32/eax
22341 81 7/subop/compare *ebx 0/imm32/false
22342 0f 85/jump-if-!= $check-mu-populate-stmt:error-invalid-target-type/disp32
22343 $check-mu-populate-stmt:check-target-type-handle:
22344
22345 (lookup *(ebx+4) *(ebx+8))
22346 (is-simple-mu-type? %eax 4)
22347 3d/compare-eax-and 0/imm32/false
22348 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
22349
22350 (lookup *(ebx+0xc) *(ebx+0x10))
22351 89/<- %ebx 0/r32/eax
22352 81 7/subop/compare *ebx 0/imm32/false
22353 0f 85/jump-if-!= $check-mu-populate-stmt:error-invalid-target-type/disp32
22354 $check-mu-populate-stmt:check-target-type-array:
22355
22356 (lookup *(ebx+4) *(ebx+8))
22357 (is-simple-mu-type? %eax 3)
22358 3d/compare-eax-and 0/imm32/false
22359 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
22360 $check-mu-populate-stmt:check-length-type:
22361 (lookup *esi *(esi+4))
22362 (lookup *(eax+8) *(eax+0xc))
22363 89/<- %ebx 0/r32/eax
22364 (is-simple-mu-type? %ebx 0)
22365 3d/compare-eax-and 0/imm32/false
22366 75/jump-if-!= $check-mu-populate-stmt:end/disp8
22367 (is-simple-mu-type? %ebx 1)
22368 3d/compare-eax-and 0/imm32/false
22369 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-length-type/disp32
22370 $check-mu-populate-stmt:end:
22371
22372 5f/pop-to-edi
22373 5e/pop-to-esi
22374 5b/pop-to-ebx
22375 58/pop-to-eax
22376
22377 89/<- %esp 5/r32/ebp
22378 5d/pop-to-ebp
22379 c3/return
22380
22381 $check-mu-populate-stmt:error-incorrect-inouts:
22382 (write-buffered *(ebp+0x10) "fn ")
22383 8b/-> *(ebp+0xc) 0/r32/eax
22384 (lookup *eax *(eax+4))
22385 (write-buffered *(ebp+0x10) %eax)
22386 (write-buffered *(ebp+0x10) ": stmt 'populate' must have two inouts\n")
22387 (flush *(ebp+0x10))
22388 (stop *(ebp+0x14) 1)
22389
22390
22391 $check-mu-populate-stmt:error-too-many-outputs:
22392 (write-buffered *(ebp+0x10) "fn ")
22393 8b/-> *(ebp+0xc) 0/r32/eax
22394 (lookup *eax *(eax+4))
22395 (write-buffered *(ebp+0x10) %eax)
22396 (write-buffered *(ebp+0x10) ": stmt 'populate' must not have any outputs\n")
22397 (flush *(ebp+0x10))
22398 (stop *(ebp+0x14) 1)
22399
22400
22401 $check-mu-populate-stmt:error-invalid-target-type:
22402 (write-buffered *(ebp+0x10) "fn ")
22403 8b/-> *(ebp+0xc) 0/r32/eax
22404 (lookup *eax *(eax+4))
22405 (write-buffered *(ebp+0x10) %eax)
22406 (write-buffered *(ebp+0x10) ": stmt populate: first inout '")
22407 (lookup *edi *(edi+4))
22408 (lookup *eax *(eax+4))
22409 (write-buffered *(ebp+0x10) %eax)
22410 (write-buffered *(ebp+0x10) "' must have type (addr handle array ...)\n")
22411 (flush *(ebp+0x10))
22412 (stop *(ebp+0x14) 1)
22413
22414
22415 $check-mu-populate-stmt:error-invalid-length-type:
22416 (write-buffered *(ebp+0x10) "fn ")
22417 8b/-> *(ebp+0xc) 0/r32/eax
22418 (lookup *eax *(eax+4))
22419 (write-buffered *(ebp+0x10) %eax)
22420 (write-buffered *(ebp+0x10) ": stmt populate: second inout '")
22421 (lookup *esi *(esi+4))
22422 (lookup *eax *(eax+4))
22423 (write-buffered *(ebp+0x10) %eax)
22424 (write-buffered *(ebp+0x10) "' must be an int\n")
22425 (flush *(ebp+0x10))
22426 (stop *(ebp+0x14) 1)
22427
22428
22429 check-mu-populate-stream-stmt:
22430
22431 55/push-ebp
22432 89/<- %ebp 4/r32/esp
22433
22434 50/push-eax
22435 53/push-ebx
22436 56/push-esi
22437 57/push-edi
22438
22439 8b/-> *(ebp+8) 6/r32/esi
22440 $check-mu-populate-stream-stmt:check-for-output:
22441
22442 (lookup *(esi+0x14) *(esi+0x18))
22443 3d/compare-eax-and 0/imm32
22444 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-too-many-outputs/disp32
22445 $check-mu-populate-stream-stmt:get-target:
22446
22447 (lookup *(esi+0xc) *(esi+0x10))
22448 89/<- %edi 0/r32/eax
22449
22450 3d/compare-eax-and 0/imm32
22451 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
22452 $check-mu-populate-stream-stmt:get-length:
22453
22454 (lookup *(edi+8) *(edi+0xc))
22455 89/<- %esi 0/r32/eax
22456
22457 3d/compare-eax-and 0/imm32
22458 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
22459
22460 (lookup *(esi+8) *(esi+0xc))
22461 3d/compare-eax-and 0/imm32
22462 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
22463 $check-mu-populate-stream-stmt:check-target-type:
22464
22465 (lookup *edi *(edi+4))
22466 (lookup *(eax+8) *(eax+0xc))
22467 89/<- %ebx 0/r32/eax
22468 $check-mu-populate-stream-stmt:check-target-type-deref:
22469
22470 8b/-> *(edi+0x10) 0/r32/eax
22471 3d/compare-eax-and 0/imm32/false
22472 {
22473 74/jump-if-= break/disp8
22474 (lookup *(ebx+0xc) *(ebx+0x10))
22475
22476 81 7/subop/compare *(eax+0xc) 0/imm32
22477 {
22478 75/jump-if-!= break/disp8
22479 (lookup *(eax+4) *(eax+8))
22480 }
22481 89/<- %ebx 0/r32/eax
22482 }
22483 $check-mu-populate-stream-stmt:check-target-type-addr:
22484
22485 (is-mu-addr-type? %ebx)
22486 3d/compare-eax-and 0/imm32/false
22487 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
22488
22489 (lookup *(ebx+0xc) *(ebx+0x10))
22490 89/<- %ebx 0/r32/eax
22491 81 7/subop/compare *ebx 0/imm32/false
22492 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
22493 $check-mu-populate-stream-stmt:check-target-type-handle:
22494
22495 (lookup *(ebx+4) *(ebx+8))
22496 (is-simple-mu-type? %eax 4)
22497 3d/compare-eax-and 0/imm32/false
22498 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
22499
22500 (lookup *(ebx+0xc) *(ebx+0x10))
22501 89/<- %ebx 0/r32/eax
22502 81 7/subop/compare *ebx 0/imm32/false
22503 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
22504 $check-mu-populate-stream-stmt:check-target-type-stream:
22505
22506 (lookup *(ebx+4) *(ebx+8))
22507 (is-simple-mu-type? %eax 0xb)
22508 3d/compare-eax-and 0/imm32/false
22509 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
22510 $check-mu-populate-stream-stmt:check-length-type:
22511 (lookup *esi *(esi+4))
22512 (lookup *(eax+8) *(eax+0xc))
22513 89/<- %ebx 0/r32/eax
22514 (is-simple-mu-type? %ebx 0)
22515 3d/compare-eax-and 0/imm32/false
22516 75/jump-if-!= $check-mu-populate-stream-stmt:end/disp8
22517 (is-simple-mu-type? %ebx 1)
22518 3d/compare-eax-and 0/imm32/false
22519 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-length-type/disp32
22520 $check-mu-populate-stream-stmt:end:
22521
22522 5f/pop-to-edi
22523 5e/pop-to-esi
22524 5b/pop-to-ebx
22525 58/pop-to-eax
22526
22527 89/<- %esp 5/r32/ebp
22528 5d/pop-to-ebp
22529 c3/return
22530
22531 $check-mu-populate-stream-stmt:error-incorrect-inouts:
22532 (write-buffered *(ebp+0x10) "fn ")
22533 8b/-> *(ebp+0xc) 0/r32/eax
22534 (lookup *eax *(eax+4))
22535 (write-buffered *(ebp+0x10) %eax)
22536 (write-buffered *(ebp+0x10) ": stmt 'populate-stream' must have two inouts\n")
22537 (flush *(ebp+0x10))
22538 (stop *(ebp+0x14) 1)
22539
22540
22541 $check-mu-populate-stream-stmt:error-too-many-outputs:
22542 (write-buffered *(ebp+0x10) "fn ")
22543 8b/-> *(ebp+0xc) 0/r32/eax
22544 (lookup *eax *(eax+4))
22545 (write-buffered *(ebp+0x10) %eax)
22546 (write-buffered *(ebp+0x10) ": stmt 'populate-stream' must not have any outputs\n")
22547 (flush *(ebp+0x10))
22548 (stop *(ebp+0x14) 1)
22549
22550
22551 $check-mu-populate-stream-stmt:error-invalid-target-type:
22552 (write-buffered *(ebp+0x10) "fn ")
22553 8b/-> *(ebp+0xc) 0/r32/eax
22554 (lookup *eax *(eax+4))
22555 (write-buffered *(ebp+0x10) %eax)
22556 (write-buffered *(ebp+0x10) ": stmt populate-stream: first inout '")
22557 (lookup *edi *(edi+4))
22558 (lookup *eax *(eax+4))
22559 (write-buffered *(ebp+0x10) %eax)
22560 (write-buffered *(ebp+0x10) "' must have type (addr handle stream ...)\n")
22561 (flush *(ebp+0x10))
22562 (stop *(ebp+0x14) 1)
22563
22564
22565 $check-mu-populate-stream-stmt:error-invalid-length-type:
22566 (write-buffered *(ebp+0x10) "fn ")
22567 8b/-> *(ebp+0xc) 0/r32/eax
22568 (lookup *eax *(eax+4))
22569 (write-buffered *(ebp+0x10) %eax)
22570 (write-buffered *(ebp+0x10) ": stmt populate-stream: second inout '")
22571 (lookup *esi *(esi+4))
22572 (lookup *eax *(eax+4))
22573 (write-buffered *(ebp+0x10) %eax)
22574 (write-buffered *(ebp+0x10) "' must be an int\n")
22575 (flush *(ebp+0x10))
22576 (stop *(ebp+0x14) 1)
22577
22578
22579 check-mu-read-from-stream-stmt:
22580
22581 55/push-ebp
22582 89/<- %ebp 4/r32/esp
22583
22584 50/push-eax
22585 51/push-ecx
22586 52/push-edx
22587 53/push-ebx
22588 56/push-esi
22589 57/push-edi
22590
22591 8b/-> *(ebp+8) 6/r32/esi
22592
22593
22594 (lookup *(esi+0xc) *(esi+0x10))
22595 $check-mu-read-from-stream-stmt:check-no-inouts:
22596 3d/compare-eax-and 0/imm32
22597 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
22598 (lookup *eax *(eax+4))
22599 89/<- %ecx 0/r32/eax
22600
22601
22602 (lookup *(ecx+8) *(ecx+0xc))
22603 89/<- %ebx 0/r32/eax
22604 $check-mu-read-from-stream-stmt:check-base-is-compound:
22605
22606 81 7/subop/compare *ebx 0/imm32/false
22607 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
22608 $check-mu-read-from-stream-stmt:check-base-is-addr:
22609
22610 (lookup *(ebx+4) *(ebx+8))
22611 (is-simple-mu-type? %eax 2)
22612 3d/compare-eax-and 0/imm32/false
22613 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
22614 $check-mu-read-from-stream-stmt:check-base-is-addr-to-stream:
22615
22616 (lookup *(ebx+0xc) *(ebx+0x10))
22617 89/<- %ebx 0/r32/eax
22618
22619 (lookup *(eax+4) *(eax+8))
22620 (is-simple-mu-type? %eax 0xb)
22621 3d/compare-eax-and 0/imm32/false
22622 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
22623
22624
22625 (lookup *(esi+0xc) *(esi+0x10))
22626 (lookup *(eax+8) *(eax+0xc))
22627 $check-mu-read-from-stream-stmt:check-single-inout:
22628 3d/compare-eax-and 0/imm32
22629 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
22630 (lookup *eax *(eax+4))
22631 89/<- %ecx 0/r32/eax
22632
22633 (lookup *(ecx+8) *(ecx+0xc))
22634 89/<- %edx 0/r32/eax
22635
22636 $check-mu-read-from-stream-stmt:check-target-is-compound:
22637 81 7/subop/compare *edx 0/imm32/false
22638 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
22639 $check-mu-read-from-stream-stmt:check-target-type:
22640
22641 (lookup *(edx+4) *(edx+8))
22642 (is-simple-mu-type? %eax 2)
22643 3d/compare-eax-and 0/imm32/false
22644 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
22645
22646 (type-tail %ebx)
22647 89/<- %ebx 0/r32/eax
22648 (type-tail %edx)
22649 (type-equal? %ebx %eax)
22650 3d/compare-eax-and 0/imm32/false
22651 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-target-type/disp32
22652 $check-mu-read-from-stream-stmt:check-too-many-inouts:
22653
22654 (lookup *(esi+0xc) *(esi+0x10))
22655 (lookup *(eax+8) *(eax+0xc))
22656 (lookup *(eax+8) *(eax+0xc))
22657 3d/compare-eax-and 0/imm32/false
22658 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-too-many-inouts/disp32
22659 $check-mu-read-from-stream-stmt:check-unexpected-output:
22660
22661 (lookup *(esi+0x14) *(esi+0x18))
22662 3d/compare-eax-and 0/imm32/false
22663 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-unexpected-output/disp32
22664 $check-mu-read-from-stream-stmt:end:
22665
22666 5f/pop-to-edi
22667 5e/pop-to-esi
22668 5b/pop-to-ebx
22669 5a/pop-to-edx
22670 59/pop-to-ecx
22671 58/pop-to-eax
22672
22673 89/<- %esp 5/r32/ebp
22674 5d/pop-to-ebp
22675 c3/return
22676
22677 $check-mu-read-from-stream-stmt:error-invalid-base-type:
22678 (write-buffered *(ebp+0x10) "fn ")
22679 8b/-> *(ebp+0xc) 0/r32/eax
22680 (lookup *eax *(eax+4))
22681 (write-buffered *(ebp+0x10) %eax)
22682 (write-buffered *(ebp+0x10) ": stmt read-from-stream: var '")
22683 (lookup *ecx *(ecx+4))
22684 (write-buffered *(ebp+0x10) %eax)
22685 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
22686 (flush *(ebp+0x10))
22687 (stop *(ebp+0x14) 1)
22688
22689
22690 $check-mu-read-from-stream-stmt:error-too-few-inouts:
22691 (write-buffered *(ebp+0x10) "fn ")
22692 8b/-> *(ebp+0xc) 0/r32/eax
22693 (lookup *eax *(eax+4))
22694 (write-buffered *(ebp+0x10) %eax)
22695 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too few inouts (2 required)\n")
22696 (flush *(ebp+0x10))
22697 (stop *(ebp+0x14) 1)
22698
22699
22700 $check-mu-read-from-stream-stmt:error-target-type-not-address:
22701 (write-buffered *(ebp+0x10) "fn ")
22702 8b/-> *(ebp+0xc) 0/r32/eax
22703 (lookup *eax *(eax+4))
22704 (write-buffered *(ebp+0x10) %eax)
22705 (write-buffered *(ebp+0x10) ": stmt read-from-stream: target '")
22706 (lookup *ecx *(ecx+4))
22707 (write-buffered *(ebp+0x10) %eax)
22708 (write-buffered *(ebp+0x10) "' must be an addr\n")
22709 (flush *(ebp+0x10))
22710 (stop *(ebp+0x14) 1)
22711
22712
22713 $check-mu-read-from-stream-stmt:error-invalid-target-type:
22714 (write-buffered *(ebp+0x10) "fn ")
22715 8b/-> *(ebp+0xc) 0/r32/eax
22716 (lookup *eax *(eax+4))
22717 (write-buffered *(ebp+0x10) %eax)
22718 (write-buffered *(ebp+0x10) ": stmt read-from-stream: second inout '")
22719 (lookup *ecx *(ecx+4))
22720 (write-buffered *(ebp+0x10) %eax)
22721 (write-buffered *(ebp+0x10) "' does not have the right type\n")
22722 (flush *(ebp+0x10))
22723 (stop *(ebp+0x14) 1)
22724
22725
22726 $check-mu-read-from-stream-stmt:error-too-many-inouts:
22727 (write-buffered *(ebp+0x10) "fn ")
22728 8b/-> *(ebp+0xc) 0/r32/eax
22729 (lookup *eax *(eax+4))
22730 (write-buffered *(ebp+0x10) %eax)
22731 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too many inouts (2 required)\n")
22732 (flush *(ebp+0x10))
22733 (stop *(ebp+0x14) 1)
22734
22735
22736 $check-mu-read-from-stream-stmt:error-unexpected-output:
22737 (write-buffered *(ebp+0x10) "fn ")
22738 8b/-> *(ebp+0xc) 0/r32/eax
22739 (lookup *eax *(eax+4))
22740 (write-buffered *(ebp+0x10) %eax)
22741 (write-buffered *(ebp+0x10) ": stmt read-from-stream: unexpected output\n")
22742 (flush *(ebp+0x10))
22743 (stop *(ebp+0x14) 1)
22744
22745
22746 check-mu-write-to-stream-stmt:
22747
22748 55/push-ebp
22749 89/<- %ebp 4/r32/esp
22750
22751 50/push-eax
22752 51/push-ecx
22753 52/push-edx
22754 53/push-ebx
22755 56/push-esi
22756 57/push-edi
22757
22758 8b/-> *(ebp+8) 6/r32/esi
22759
22760
22761 (lookup *(esi+0xc) *(esi+0x10))
22762 $check-mu-write-to-stream-stmt:check-no-inouts:
22763 3d/compare-eax-and 0/imm32
22764 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
22765 (lookup *eax *(eax+4))
22766 89/<- %ecx 0/r32/eax
22767
22768
22769 (lookup *(ecx+8) *(ecx+0xc))
22770 89/<- %ebx 0/r32/eax
22771 $check-mu-write-to-stream-stmt:check-base-is-compound:
22772
22773 81 7/subop/compare *ebx 0/imm32/false
22774 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
22775 $check-mu-write-to-stream-stmt:check-base-is-addr:
22776
22777 (lookup *(ebx+4) *(ebx+8))
22778 (is-simple-mu-type? %eax 2)
22779 3d/compare-eax-and 0/imm32/false
22780 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
22781 $check-mu-write-to-stream-stmt:check-base-is-addr-to-stream:
22782
22783 (lookup *(ebx+0xc) *(ebx+0x10))
22784 89/<- %ebx 0/r32/eax
22785
22786 (lookup *(eax+4) *(eax+8))
22787 (is-simple-mu-type? %eax 0xb)
22788 3d/compare-eax-and 0/imm32/false
22789 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
22790
22791
22792 (lookup *(esi+0xc) *(esi+0x10))
22793 (lookup *(eax+8) *(eax+0xc))
22794 $check-mu-write-to-stream-stmt:check-single-inout:
22795 3d/compare-eax-and 0/imm32
22796 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
22797 (lookup *eax *(eax+4))
22798 89/<- %ecx 0/r32/eax
22799
22800 (lookup *(ecx+8) *(ecx+0xc))
22801 89/<- %edx 0/r32/eax
22802
22803 $check-mu-write-to-stream-stmt:check-target-is-compound:
22804 81 7/subop/compare *edx 0/imm32/false
22805 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
22806 $check-mu-write-to-stream-stmt:check-target-type:
22807
22808 (lookup *(edx+4) *(edx+8))
22809 (is-simple-mu-type? %eax 2)
22810 3d/compare-eax-and 0/imm32/false
22811 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
22812
22813 (type-tail %ebx)
22814 89/<- %ebx 0/r32/eax
22815 (type-tail %edx)
22816 (type-equal? %ebx %eax)
22817 3d/compare-eax-and 0/imm32/false
22818 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-target-type/disp32
22819 $check-mu-write-to-stream-stmt:check-too-many-inouts:
22820
22821 (lookup *(esi+0xc) *(esi+0x10))
22822 (lookup *(eax+8) *(eax+0xc))
22823 (lookup *(eax+8) *(eax+0xc))
22824 3d/compare-eax-and 0/imm32/false
22825 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-too-many-inouts/disp32
22826 $check-mu-write-to-stream-stmt:check-unexpected-output:
22827
22828 (lookup *(esi+0x14) *(esi+0x18))
22829 3d/compare-eax-and 0/imm32/false
22830 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-unexpected-output/disp32
22831 $check-mu-write-to-stream-stmt:end:
22832
22833 5f/pop-to-edi
22834 5e/pop-to-esi
22835 5b/pop-to-ebx
22836 5a/pop-to-edx
22837 59/pop-to-ecx
22838 58/pop-to-eax
22839
22840 89/<- %esp 5/r32/ebp
22841 5d/pop-to-ebp
22842 c3/return
22843
22844 $check-mu-write-to-stream-stmt:error-invalid-base-type:
22845 (write-buffered *(ebp+0x10) "fn ")
22846 8b/-> *(ebp+0xc) 0/r32/eax
22847 (lookup *eax *(eax+4))
22848 (write-buffered *(ebp+0x10) %eax)
22849 (write-buffered *(ebp+0x10) ": stmt write-to-stream: var '")
22850 (lookup *ecx *(ecx+4))
22851 (write-buffered *(ebp+0x10) %eax)
22852 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
22853 (flush *(ebp+0x10))
22854 (stop *(ebp+0x14) 1)
22855
22856
22857 $check-mu-write-to-stream-stmt:error-too-few-inouts:
22858 (write-buffered *(ebp+0x10) "fn ")
22859 8b/-> *(ebp+0xc) 0/r32/eax
22860 (lookup *eax *(eax+4))
22861 (write-buffered *(ebp+0x10) %eax)
22862 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too few inouts (2 required)\n")
22863 (flush *(ebp+0x10))
22864 (stop *(ebp+0x14) 1)
22865
22866
22867 $check-mu-write-to-stream-stmt:error-target-type-not-address:
22868 (write-buffered *(ebp+0x10) "fn ")
22869 8b/-> *(ebp+0xc) 0/r32/eax
22870 (lookup *eax *(eax+4))
22871 (write-buffered *(ebp+0x10) %eax)
22872 (write-buffered *(ebp+0x10) ": stmt write-to-stream: target '")
22873 (lookup *ecx *(ecx+4))
22874 (write-buffered *(ebp+0x10) %eax)
22875 (write-buffered *(ebp+0x10) "' must be an addr\n")
22876 (flush *(ebp+0x10))
22877 (stop *(ebp+0x14) 1)
22878
22879
22880 $check-mu-write-to-stream-stmt:error-invalid-target-type:
22881 (write-buffered *(ebp+0x10) "fn ")
22882 8b/-> *(ebp+0xc) 0/r32/eax
22883 (lookup *eax *(eax+4))
22884 (write-buffered *(ebp+0x10) %eax)
22885 (write-buffered *(ebp+0x10) ": stmt write-to-stream: second inout '")
22886 (lookup *ecx *(ecx+4))
22887 (write-buffered *(ebp+0x10) %eax)
22888 (write-buffered *(ebp+0x10) "' does not have the right type\n")
22889 (flush *(ebp+0x10))
22890 (stop *(ebp+0x14) 1)
22891
22892
22893 $check-mu-write-to-stream-stmt:error-too-many-inouts:
22894 (write-buffered *(ebp+0x10) "fn ")
22895 8b/-> *(ebp+0xc) 0/r32/eax
22896 (lookup *eax *(eax+4))
22897 (write-buffered *(ebp+0x10) %eax)
22898 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too many inouts (2 required)\n")
22899 (flush *(ebp+0x10))
22900 (stop *(ebp+0x14) 1)
22901
22902
22903 $check-mu-write-to-stream-stmt:error-unexpected-output:
22904 (write-buffered *(ebp+0x10) "fn ")
22905 8b/-> *(ebp+0xc) 0/r32/eax
22906 (lookup *eax *(eax+4))
22907 (write-buffered *(ebp+0x10) %eax)
22908 (write-buffered *(ebp+0x10) ": stmt write-to-stream: unexpected output\n")
22909 (flush *(ebp+0x10))
22910 (stop *(ebp+0x14) 1)
22911
22912
22913 check-mu-convert-stmt:
22914
22915 55/push-ebp
22916 89/<- %ebp 4/r32/esp
22917
22918 $check-mu-convert-stmt:end:
22919
22920
22921 89/<- %esp 5/r32/ebp
22922 5d/pop-to-ebp
22923 c3/return
22924
22925 check-mu-call:
22926
22927 55/push-ebp
22928 89/<- %ebp 4/r32/esp
22929
22930 68/push 0/imm32
22931
22932 81 5/subop/subtract %esp 0x60/imm32
22933 68/push 0x60/imm32/size
22934 68/push 0/imm32/read
22935 68/push 0/imm32/write
22936
22937 89/<- *(ebp-4) 4/r32/esp
22938 (clear-stream *(ebp-4))
22939
22940 50/push-eax
22941 51/push-ecx
22942 52/push-edx
22943 53/push-ebx
22944 56/push-esi
22945 57/push-edi
22946
22947 8b/-> *(ebp+8) 6/r32/esi
22948
22949 8b/-> *(ebp+0xc) 7/r32/edi
22950
22951 (lookup *(esi+0xc) *(esi+0x10))
22952 89/<- %ecx 0/r32/eax
22953
22954 (lookup *(edi+8) *(edi+0xc))
22955 89/<- %edx 0/r32/eax
22956 {
22957 $check-mu-call:check-for-inouts:
22958
22959 81 7/subop/compare %ecx 0/imm32
22960 0f 84/jump-if-= break/disp32
22961
22962 81 7/subop/compare %edx 0/imm32
22963 0f 84/jump-if-= break/disp32
22964 $check-mu-call:check-null-addr:
22965
22966 (lookup *ecx *(ecx+4))
22967 (lookup *eax *(eax+4))
22968 (string-equal? %eax "0")
22969 3d/compare-eax-and 0/imm32/false
22970 0f 85/jump-if-!= $check-mu-call:continue-to-next-inout/disp32
22971 $check-mu-call:check-inout-type:
22972
22973 (lookup *ecx *(ecx+4))
22974 (lookup *(eax+8) *(eax+0xc))
22975 89/<- %ebx 0/r32/eax
22976
22977 81 7/subop/compare *(ecx+0x10) 0/imm32/false
22978 {
22979 74/jump-if-= break/disp8
22980 (lookup *(ebx+0xc) *(ebx+0x10))
22981 89/<- %ebx 0/r32/eax
22982
22983 81 7/subop/compare *(ebx+0xc) 0/imm32
22984 75/jump-if-!= break/disp8
22985 (lookup *(ebx+4) *(ebx+8))
22986 89/<- %ebx 0/r32/eax
22987 }
22988
22989 (lookup *edx *(edx+4))
22990
22991 (lookup *(eax+8) *(eax+0xc))
22992
22993 (type-match? %eax %ebx *(ebp-4))
22994 3d/compare-eax-and 0/imm32/false
22995 {
22996 0f 85/jump-if-!= break/disp32
22997 (write-buffered *(ebp+0x14) "fn ")
22998 8b/-> *(ebp+0x10) 0/r32/eax
22999 (lookup *eax *(eax+4))
23000 (write-buffered *(ebp+0x14) %eax)
23001 (write-buffered *(ebp+0x14) ": call ")
23002 (lookup *edi *(edi+4))
23003 (write-buffered *(ebp+0x14) %eax)
23004 (write-buffered *(ebp+0x14) ": type for inout '")
23005 (lookup *ecx *(ecx+4))
23006 (lookup *eax *(eax+4))
23007 (write-buffered *(ebp+0x14) %eax)
23008 (write-buffered *(ebp+0x14) "' is not right\n")
23009 (flush *(ebp+0x14))
23010 (stop *(ebp+0x18) 1)
23011 }
23012 $check-mu-call:continue-to-next-inout:
23013
23014 (lookup *(ecx+8) *(ecx+0xc))
23015 89/<- %ecx 0/r32/eax
23016
23017 (lookup *(edx+8) *(edx+0xc))
23018 89/<- %edx 0/r32/eax
23019
23020 e9/jump loop/disp32
23021 }
23022 $check-mu-call:check-inout-count:
23023
23024 39/compare %ecx 2/r32/edx
23025 {
23026 0f 84/jump-if-= break/disp32
23027
23028
23029 {
23030 81 7/subop/compare %ecx 0/imm32
23031 0f 84/jump-if-= break/disp32
23032 (write-buffered *(ebp+0x14) "fn ")
23033 8b/-> *(ebp+0x10) 0/r32/eax
23034 (lookup *eax *(eax+4))
23035 (write-buffered *(ebp+0x14) %eax)
23036 (write-buffered *(ebp+0x14) ": call ")
23037 (lookup *edi *(edi+4))
23038 (write-buffered *(ebp+0x14) %eax)
23039 (write-buffered *(ebp+0x14) ": too many inouts\n")
23040 (flush *(ebp+0x14))
23041 (stop *(ebp+0x18) 1)
23042 }
23043
23044 {
23045 81 7/subop/compare %edx 0/imm32
23046 0f 84/jump-if-= break/disp32
23047 (write-buffered *(ebp+0x14) "fn ")
23048 8b/-> *(ebp+0x10) 0/r32/eax
23049 (lookup *eax *(eax+4))
23050 (write-buffered *(ebp+0x14) %eax)
23051 (write-buffered *(ebp+0x14) ": call ")
23052 (lookup *edi *(edi+4))
23053 (write-buffered *(ebp+0x14) %eax)
23054 (write-buffered *(ebp+0x14) ": too few inouts\n")
23055 (flush *(ebp+0x14))
23056 (stop *(ebp+0x18) 1)
23057 }
23058 }
23059 $check-mu-call:check-outputs:
23060
23061 (lookup *(esi+0x14) *(esi+0x18))
23062 89/<- %ecx 0/r32/eax
23063
23064 (lookup *(edi+0x10) *(edi+0x14))
23065 89/<- %edx 0/r32/eax
23066 {
23067 $check-mu-call:check-for-outputs:
23068
23069 81 7/subop/compare %ecx 0/imm32
23070 0f 84/jump-if-= break/disp32
23071
23072 81 7/subop/compare %edx 0/imm32
23073 0f 84/jump-if-= break/disp32
23074 $check-mu-call:check-output-type:
23075
23076 (lookup *ecx *(ecx+4))
23077
23078 (lookup *(eax+8) *(eax+0xc))
23079 89/<- %ebx 0/r32/eax
23080
23081 81 7/subop/compare *(ecx+0x10) 0/imm32/false
23082 {
23083 74/jump-if-= break/disp8
23084 (lookup *(ebx+0xc) *(ebx+0x10))
23085 89/<- %ebx 0/r32/eax
23086 }
23087
23088 (lookup *edx *(edx+4))
23089
23090 (lookup *(eax+8) *(eax+0xc))
23091
23092 (type-match? %eax %ebx *(ebp-4))
23093 3d/compare-eax-and 0/imm32/false
23094 {
23095 0f 85/jump-if-!= break/disp32
23096 (write-buffered *(ebp+0x14) "fn ")
23097 8b/-> *(ebp+0x10) 0/r32/eax
23098 (lookup *eax *(eax+4))
23099 (write-buffered *(ebp+0x14) %eax)
23100 (write-buffered *(ebp+0x14) ": call ")
23101 (lookup *edi *(edi+4))
23102 (write-buffered *(ebp+0x14) %eax)
23103 (write-buffered *(ebp+0x14) ": type for output '")
23104 (lookup *ecx *(ecx+4))
23105 (lookup *eax *(eax+4))
23106 (write-buffered *(ebp+0x14) %eax)
23107 (write-buffered *(ebp+0x14) "' is not right\n")
23108 (flush *(ebp+0x14))
23109 (stop *(ebp+0x18) 1)
23110 }
23111 $check-mu-call:check-output-register:
23112
23113 (lookup *ecx *(ecx+4))
23114
23115 (lookup *(eax+18) *(eax+0x1c))
23116 89/<- %ebx 0/r32/eax
23117
23118 3d/compare-eax-and 0/imm32
23119 {
23120 0f 85/jump-if-!= break/disp32
23121 (write-buffered *(ebp+0x14) "fn ")
23122 8b/-> *(ebp+0x10) 0/r32/eax
23123 (lookup *eax *(eax+4))
23124 (write-buffered *(ebp+0x14) %eax)
23125 (write-buffered *(ebp+0x14) ": call ")
23126 (lookup *edi *(edi+4))
23127 (write-buffered *(ebp+0x14) %eax)
23128 (write-buffered *(ebp+0x14) ": output '")
23129 (lookup *ecx *(ecx+4))
23130 (lookup *eax *(eax+4))
23131 (write-buffered *(ebp+0x14) %eax)
23132 (write-buffered *(ebp+0x14) "' is not in a register\n")
23133 (flush *(ebp+0x14))
23134 (stop *(ebp+0x18) 1)
23135 }
23136
23137 (lookup *edx *(edx+4))
23138
23139 (lookup *(eax+18) *(eax+0x1c))
23140
23141 (string-equal? %eax %ebx)
23142 3d/compare-eax-and 0/imm32/false
23143 {
23144 0f 85/jump-if-!= break/disp32
23145 (write-buffered *(ebp+0x14) "fn ")
23146 8b/-> *(ebp+0x10) 0/r32/eax
23147 (lookup *eax *(eax+4))
23148 (write-buffered *(ebp+0x14) %eax)
23149 (write-buffered *(ebp+0x14) ": call ")
23150 (lookup *edi *(edi+4))
23151 (write-buffered *(ebp+0x14) %eax)
23152 (write-buffered *(ebp+0x14) ": register for output '")
23153 (lookup *ecx *(ecx+4))
23154 (lookup *eax *(eax+4))
23155 (write-buffered *(ebp+0x14) %eax)
23156 (write-buffered *(ebp+0x14) "' is not right\n")
23157 (flush *(ebp+0x14))
23158 (stop *(ebp+0x18) 1)
23159 }
23160 $check-mu-call:continue-to-next-output:
23161
23162 (lookup *(ecx+8) *(ecx+0xc))
23163 89/<- %ecx 0/r32/eax
23164
23165 (lookup *(edx+8) *(edx+0xc))
23166 89/<- %edx 0/r32/eax
23167
23168 e9/jump loop/disp32
23169 }
23170 $check-mu-call:check-output-count:
23171
23172 39/compare %ecx 2/r32/edx
23173 {
23174 0f 84/jump-if-= break/disp32
23175
23176
23177 {
23178 81 7/subop/compare %ecx 0/imm32
23179 0f 84/jump-if-= break/disp32
23180 (write-buffered *(ebp+0x14) "fn ")
23181 8b/-> *(ebp+0x10) 0/r32/eax
23182 (lookup *eax *(eax+4))
23183 (write-buffered *(ebp+0x14) %eax)
23184 (write-buffered *(ebp+0x14) ": call ")
23185 (lookup *edi *(edi+4))
23186 (write-buffered *(ebp+0x14) %eax)
23187 (write-buffered *(ebp+0x14) ": too many outputs\n")
23188 (flush *(ebp+0x14))
23189 (stop *(ebp+0x18) 1)
23190 }
23191
23192 {
23193 81 7/subop/compare %edx 0/imm32
23194 0f 84/jump-if-= break/disp32
23195 (write-buffered *(ebp+0x14) "fn ")
23196 8b/-> *(ebp+0x10) 0/r32/eax
23197 (lookup *eax *(eax+4))
23198 (write-buffered *(ebp+0x14) %eax)
23199 (write-buffered *(ebp+0x14) ": call ")
23200 (lookup *edi *(edi+4))
23201 (write-buffered *(ebp+0x14) %eax)
23202 (write-buffered *(ebp+0x14) ": too few outputs\n")
23203 (flush *(ebp+0x14))
23204 (stop *(ebp+0x18) 1)
23205 }
23206 }
23207 $check-mu-call:end:
23208
23209 5f/pop-to-edi
23210 5e/pop-to-esi
23211 5b/pop-to-ebx
23212 5a/pop-to-edx
23213 59/pop-to-ecx
23214 58/pop-to-eax
23215
23216 81 0/subop/add %esp 0x70/imm32
23217
23218 89/<- %esp 5/r32/ebp
23219 5d/pop-to-ebp
23220 c3/return
23221
23222
23223 type-match?:
23224
23225 55/push-ebp
23226 89/<- %ebp 4/r32/esp
23227
23228 {
23229 $type-match?:check-literal-int:
23230 (is-simple-mu-type? *(ebp+0xc) 0)
23231 3d/compare-eax-and 0/imm32/false
23232 74/jump-if-= break/disp8
23233 (is-mu-numberlike-output? *(ebp+8))
23234 3d/compare-eax-and 0/imm32/false
23235 74/jump-if-= break/disp8
23236 b8/copy-to-eax 1/imm32/true
23237 e9/jump $type-match?:end/disp32
23238 }
23239
23240 {
23241 $type-match?:check-literal-string:
23242 (is-simple-mu-type? *(ebp+0xc) 0x10)
23243 3d/compare-eax-and 0/imm32/false
23244 74/jump-if-= break/disp8
23245 (is-mu-string-type? *(ebp+8))
23246 3d/compare-eax-and 0/imm32/false
23247 74/jump-if-= break/disp8
23248 b8/copy-to-eax 1/imm32/true
23249 e9/jump $type-match?:end/disp32
23250 }
23251 $type-match?:baseline:
23252
23253 (type-component-match? *(ebp+8) *(ebp+0xc) *(ebp+0x10))
23254 $type-match?:end:
23255
23256 89/<- %esp 5/r32/ebp
23257 5d/pop-to-ebp
23258 c3/return
23259
23260 type-component-match?:
23261
23262 55/push-ebp
23263 89/<- %ebp 4/r32/esp
23264
23265 51/push-ecx
23266 52/push-edx
23267 53/push-ebx
23268
23269 8b/-> *(ebp+8) 1/r32/ecx
23270
23271 8b/-> *(ebp+0xc) 2/r32/edx
23272 $type-component-match?:compare-addr:
23273
23274 8b/-> %ecx 0/r32/eax
23275 39/compare %edx 0/r32/eax
23276 b8/copy-to-eax 1/imm32/true
23277 0f 84/jump-if-= $type-component-match?:end/disp32
23278
23279 b8/copy-to-eax 0/imm32/false
23280 81 7/subop/compare %ecx 0/imm32
23281 0f 84/jump-if-= $type-component-match?:end/disp32
23282
23283 81 7/subop/compare %edx 0/imm32
23284 0f 84/jump-if-= $type-component-match?:end/disp32
23285
23286 {
23287 $type-component-match?:check-type-parameter:
23288 81 7/subop/compare *ecx 0/imm32/false
23289 74/jump-if-= break/disp8
23290 81 7/subop/compare *(ecx+4) 0xa/imm32/type-parameter
23291 75/jump-if-!= break/disp8
23292 $type-component-match?:type-parameter:
23293 (type-parameter-match? *(ecx+8) *(ecx+0xc) %edx *(ebp+0x10))
23294 e9/jump $type-component-match?:end/disp32
23295 }
23296
23297 {
23298 $type-component-match?:check-list-type-parameter:
23299
23300 81 7/subop/compare *ecx 0/imm32/false
23301 75/jump-if-!= break/disp8
23302
23303 81 7/subop/compare *(ecx+0xc) 0/imm32
23304 75/jump-if-!= break/disp8
23305
23306 (lookup *(ecx+4) *(ecx+8))
23307 81 7/subop/compare *eax 0/imm32/false
23308 74/jump-if-= break/disp8
23309 81 7/subop/compare *(eax+4) 0xa/imm32/type-parameter
23310 75/jump-if-!= break/disp8
23311 $type-component-match?:list-type-parameter:
23312 (type-parameter-match? *(eax+8) *(eax+0xc) %edx *(ebp+0x10))
23313 e9/jump $type-component-match?:end/disp32
23314 }
23315 $type-component-match?:compare-atom-state:
23316
23317 8b/-> *ecx 3/r32/ebx
23318 39/compare *edx 3/r32/ebx
23319 b8/copy-to-eax 0/imm32/false
23320 0f 85/jump-if-!= $type-component-match?:end/disp32
23321
23322 {
23323 $type-component-match?:check-atom:
23324 81 7/subop/compare %ebx 0/imm32/false
23325 74/jump-if-= break/disp8
23326 $type-component-match?:is-atom:
23327 8b/-> *(ecx+4) 0/r32/eax
23328 39/compare *(edx+4) 0/r32/eax
23329 0f 94/set-if-= %al
23330 81 4/subop/and %eax 0xff/imm32
23331 e9/jump $type-component-match?:end/disp32
23332 }
23333 $type-component-match?:check-left:
23334
23335 (lookup *(ecx+4) *(ecx+8))
23336 89/<- %ebx 0/r32/eax
23337 (lookup *(edx+4) *(edx+8))
23338 (type-component-match? %ebx %eax *(ebp+0x10))
23339 3d/compare-eax-and 0/imm32/false
23340 74/jump-if-= $type-component-match?:end/disp8
23341 $type-component-match?:check-right:
23342
23343 (lookup *(ecx+0xc) *(ecx+0x10))
23344 89/<- %ebx 0/r32/eax
23345 (lookup *(edx+0xc) *(edx+0x10))
23346 (type-component-match? %ebx %eax *(ebp+0x10))
23347 $type-component-match?:end:
23348
23349 5b/pop-to-ebx
23350 5a/pop-to-edx
23351 59/pop-to-ecx
23352
23353 89/<- %esp 5/r32/ebp
23354 5d/pop-to-ebp
23355 c3/return
23356
23357 type-parameter-match?:
23358
23359 55/push-ebp
23360 89/<- %ebp 4/r32/esp
23361
23362 51/push-ecx
23363
23364 (get-or-insert-handle *(ebp+0x14) *(ebp+8) *(ebp+0xc) 0xc)
23365
23366 {
23367 81 7/subop/compare *eax 0/imm32
23368 75/jump-if-!= break/disp8
23369 8b/-> *(ebp+0x10) 1/r32/ecx
23370 89/<- *eax 1/r32/ecx
23371 }
23372
23373 (type-equal? *(ebp+0x10) *eax)
23374 $type-parameter-match?:end:
23375
23376 59/pop-to-ecx
23377
23378 89/<- %esp 5/r32/ebp
23379 5d/pop-to-ebp
23380 c3/return
23381
23382 size-of:
23383
23384 55/push-ebp
23385 89/<- %ebp 4/r32/esp
23386
23387 51/push-ecx
23388
23389 8b/-> *(ebp+8) 1/r32/ecx
23390
23391
23392
23393
23394
23395
23396
23397 (lookup *(ecx+8) *(ecx+0xc))
23398 89/<- %ecx 0/r32/eax
23399
23400 {
23401 (is-mu-array? %ecx)
23402 3d/compare-eax-and 0/imm32/false
23403 74/jump-if-= break/disp8
23404 (size-of-array %ecx)
23405 eb/jump $size-of:end/disp8
23406 }
23407
23408 {
23409 (is-mu-stream? %ecx)
23410 3d/compare-eax-and 0/imm32/false
23411 74/jump-if-= break/disp8
23412 (size-of-stream %ecx)
23413 eb/jump $size-of:end/disp8
23414 }
23415
23416 {
23417 81 7/subop/compare *ecx 0/imm32/false
23418 75/jump-if-!= break/disp8
23419 (lookup *(ecx+4) *(ecx+8))
23420 89/<- %ecx 0/r32/eax
23421 }
23422
23423 (size-of-type-id *(ecx+4))
23424 $size-of:end:
23425
23426 59/pop-to-ecx
23427
23428 89/<- %esp 5/r32/ebp
23429 5d/pop-to-ebp
23430 c3/return
23431
23432 size-of-deref:
23433
23434 55/push-ebp
23435 89/<- %ebp 4/r32/esp
23436
23437 51/push-ecx
23438
23439 8b/-> *(ebp+8) 1/r32/ecx
23440 (lookup *(ecx+8) *(ecx+0xc))
23441 89/<- %ecx 0/r32/eax
23442
23443
23444 (lookup *(ecx+0xc) *(ecx+0x10))
23445 89/<- %ecx 0/r32/eax
23446
23447 {
23448 (is-mu-array? %ecx)
23449 3d/compare-eax-and 0/imm32/false
23450 74/jump-if-= break/disp8
23451 (size-of-array %ecx)
23452 eb/jump $size-of-deref:end/disp8
23453 }
23454
23455 {
23456 (is-mu-stream? %ecx)
23457 3d/compare-eax-and 0/imm32/false
23458 74/jump-if-= break/disp8
23459 (size-of-stream %ecx)
23460 eb/jump $size-of-deref:end/disp8
23461 }
23462
23463 {
23464 81 7/subop/compare *ecx 0/imm32/false
23465 75/jump-if-!= break/disp8
23466 (lookup *(ecx+4) *(ecx+8))
23467 89/<- %ecx 0/r32/eax
23468 }
23469
23470 (size-of-type-id *(ecx+4))
23471 $size-of-deref:end:
23472
23473 59/pop-to-ecx
23474
23475 89/<- %esp 5/r32/ebp
23476 5d/pop-to-ebp
23477 c3/return
23478
23479 is-mu-array?:
23480
23481 55/push-ebp
23482 89/<- %ebp 4/r32/esp
23483
23484 51/push-ecx
23485
23486 8b/-> *(ebp+8) 1/r32/ecx
23487
23488 81 7/subop/compare *ecx 0/imm32/false
23489 75/jump-if-!= $is-mu-array?:return-false/disp8
23490
23491 (lookup *(ecx+4) *(ecx+8))
23492 81 7/subop/compare *eax 0/imm32/false
23493 74/jump-if-= $is-mu-array?:return-false/disp8
23494
23495 81 7/subop/compare *(eax+4) 3/imm32/array-type-id
23496 0f 94/set-if-= %al
23497 81 4/subop/and %eax 0xff/imm32
23498 eb/jump $is-mu-array?:end/disp8
23499 $is-mu-array?:return-false:
23500 b8/copy-to-eax 0/imm32/false
23501 $is-mu-array?:end:
23502
23503 59/pop-to-ecx
23504
23505 89/<- %esp 5/r32/ebp
23506 5d/pop-to-ebp
23507 c3/return
23508
23509
23510 size-of-array:
23511
23512 55/push-ebp
23513 89/<- %ebp 4/r32/esp
23514
23515 51/push-ecx
23516 52/push-edx
23517
23518 8b/-> *(ebp+8) 1/r32/ecx
23519
23520 (lookup *(ecx+0xc) *(ecx+0x10))
23521 89/<- %ecx 0/r32/eax
23522
23523 (lookup *(ecx+4) *(ecx+8))
23524 8b/-> *(eax+4) 2/r32/edx
23525
23526
23527 (lookup *(ecx+0xc) *(ecx+0x10))
23528 (lookup *(eax+4) *(eax+8))
23529 8b/-> *(eax+8) 1/r32/ecx
23530
23531 (size-of-type-id-as-array-element %edx)
23532 f7 4/subop/multiply-into-edx-eax %ecx
23533 05/add-to-eax 4/imm32
23534
23535 $size-of-array:end:
23536
23537 5a/pop-to-edx
23538 59/pop-to-ecx
23539
23540 89/<- %esp 5/r32/ebp
23541 5d/pop-to-ebp
23542 c3/return
23543
23544 is-mu-stream?:
23545
23546 55/push-ebp
23547 89/<- %ebp 4/r32/esp
23548
23549 51/push-ecx
23550
23551 8b/-> *(ebp+8) 1/r32/ecx
23552
23553 81 7/subop/compare *ecx 0/imm32/false
23554 75/jump-if-!= $is-mu-stream?:return-false/disp8
23555
23556 (lookup *(ecx+4) *(ecx+8))
23557 81 7/subop/compare *eax 0/imm32/false
23558 74/jump-if-= $is-mu-stream?:return-false/disp8
23559
23560 81 7/subop/compare *(eax+4) 0xb/imm32/stream-type-id
23561 0f 94/set-if-= %al
23562 81 4/subop/and %eax 0xff/imm32
23563 eb/jump $is-mu-stream?:end/disp8
23564 $is-mu-stream?:return-false:
23565 b8/copy-to-eax 0/imm32/false
23566 $is-mu-stream?:end:
23567
23568 59/pop-to-ecx
23569
23570 89/<- %esp 5/r32/ebp
23571 5d/pop-to-ebp
23572 c3/return
23573
23574
23575 size-of-stream:
23576
23577 55/push-ebp
23578 89/<- %ebp 4/r32/esp
23579
23580 (size-of-array *(ebp+8))
23581 05/add-to-eax 8/imm32
23582 $size-of-stream:end:
23583
23584 89/<- %esp 5/r32/ebp
23585 5d/pop-to-ebp
23586 c3/return
23587
23588 size-of-type-id:
23589
23590 55/push-ebp
23591 89/<- %ebp 4/r32/esp
23592
23593 51/push-ecx
23594
23595 68/push 0/imm32
23596 68/push 0/imm32
23597 89/<- %ecx 4/r32/esp
23598
23599 8b/-> *(ebp+8) 0/r32/eax
23600
23601 3d/compare-eax-and 0/imm32
23602 0f 84/jump-if-= $size-of-type-id:end/disp32
23603
23604 3d/compare-eax-and 8/imm32/byte
23605 {
23606 75/jump-if-!= break/disp8
23607 b8/copy-to-eax 4/imm32
23608 eb/jump $size-of-type-id:end/disp8
23609 }
23610
23611 3d/compare-eax-and 4/imm32/handle
23612 {
23613 75/jump-if-!= break/disp8
23614 b8/copy-to-eax 8/imm32
23615 eb/jump $size-of-type-id:end/disp8
23616 }
23617
23618 3d/compare-eax-and 0xc/imm32/slice
23619 {
23620 75/jump-if-!= break/disp8
23621 b8/copy-to-eax 8/imm32
23622 eb/jump $size-of-type-id:end/disp8
23623 }
23624
23625
23626 (find-typeinfo %eax %ecx)
23627 {
23628 81 7/subop/compare *ecx 0/imm32
23629 74/jump-if-= break/disp8
23630 $size-of-type-id:user-defined:
23631 (lookup *ecx *(ecx+4))
23632 8b/-> *(eax+0xc) 0/r32/eax
23633 eb/jump $size-of-type-id:end/disp8
23634 }
23635
23636 b8/copy-to-eax 4/imm32
23637 $size-of-type-id:end:
23638
23639 81 0/subop/add %esp 8/imm32
23640
23641 59/pop-to-ecx
23642
23643 89/<- %esp 5/r32/ebp
23644 5d/pop-to-ebp
23645 c3/return
23646
23647
23648
23649
23650 type-tail:
23651
23652 55/push-ebp
23653 89/<- %ebp 4/r32/esp
23654
23655 51/push-ecx
23656
23657 b8/copy-to-eax 0/imm32
23658
23659 8b/-> *(ebp+8) 1/r32/ecx
23660 $type-tail:check-atom:
23661
23662 81 7/subop/compare *ecx 0/imm32/false
23663 0f 85/jump-if-!= $type-tail:end/disp32
23664
23665 (lookup *(ecx+0xc) *(ecx+0x10))
23666 89/<- %ecx 0/r32/eax
23667 $type-tail:check-singleton:
23668
23669 {
23670 81 7/subop/compare *(ecx+0xc) 0/imm32
23671 75/jump-if-!= break/disp8
23672 (lookup *(ecx+4) *(ecx+8))
23673 e9/jump $type-tail:end/disp32
23674 }
23675
23676 {
23677 $type-tail:check-array-capacity:
23678 (lookup *(ecx+0xc) *(ecx+0x10))
23679 81 7/subop/compare *eax 0/imm32/false
23680 75/jump-if-!= break/disp8
23681 $type-tail:check-array-capacity-1:
23682 (lookup *(eax+4) *(eax+8))
23683 3d/compare-eax-and 0/imm32
23684 74/jump-if-= break/disp8
23685 $type-tail:check-array-capacity-2:
23686 (is-simple-mu-type? %eax 9)
23687 3d/compare-eax-and 0/imm32/false
23688 74/jump-if-= break/disp8
23689 $type-tail:array-capacity:
23690 (lookup *(ecx+4) *(ecx+8))
23691 eb/jump $type-tail:end/disp8
23692 }
23693 $type-tail:check-compound-left:
23694
23695 (lookup *(ecx+4) *(ecx+8))
23696 81 7/subop/compare *eax 0/imm32/false
23697 74/jump-if-= $type-tail:end/disp8
23698 $type-tail:return-tail:
23699
23700 89/<- %eax 1/r32/ecx
23701 $type-tail:end:
23702
23703 59/pop-to-ecx
23704
23705 89/<- %esp 5/r32/ebp
23706 5d/pop-to-ebp
23707 c3/return
23708
23709 type-equal?:
23710
23711 55/push-ebp
23712 89/<- %ebp 4/r32/esp
23713
23714 51/push-ecx
23715 52/push-edx
23716 53/push-ebx
23717
23718 8b/-> *(ebp+8) 1/r32/ecx
23719
23720 8b/-> *(ebp+0xc) 2/r32/edx
23721 $type-equal?:compare-addr:
23722
23723 8b/-> %ecx 0/r32/eax
23724 39/compare %edx 0/r32/eax
23725 b8/copy-to-eax 1/imm32/true
23726 0f 84/jump-if-= $type-equal?:end/disp32
23727 $type-equal?:compare-null-a:
23728
23729 b8/copy-to-eax 0/imm32/false
23730 81 7/subop/compare %ecx 0/imm32
23731 0f 84/jump-if-= $type-equal?:end/disp32
23732 $type-equal?:compare-null-b:
23733
23734 81 7/subop/compare %edx 0/imm32
23735 0f 84/jump-if-= $type-equal?:end/disp32
23736 $type-equal?:compare-atom-state:
23737
23738 8b/-> *ecx 3/r32/ebx
23739 39/compare *edx 3/r32/ebx
23740 b8/copy-to-eax 0/imm32/false
23741 0f 85/jump-if-!= $type-equal?:end/disp32
23742
23743 {
23744 $type-equal?:check-atom:
23745 81 7/subop/compare %ebx 0/imm32/false
23746 74/jump-if-= break/disp8
23747 $type-equal?:is-atom:
23748 8b/-> *(ecx+4) 0/r32/eax
23749 39/compare *(edx+4) 0/r32/eax
23750 0f 94/set-if-= %al
23751 81 4/subop/and %eax 0xff/imm32
23752 e9/jump $type-equal?:end/disp32
23753 }
23754 $type-equal?:check-left:
23755
23756 (lookup *(ecx+4) *(ecx+8))
23757 89/<- %ebx 0/r32/eax
23758 (lookup *(edx+4) *(edx+8))
23759 (type-equal? %eax %ebx)
23760 3d/compare-eax-and 0/imm32/false
23761 74/jump-if-= $type-equal?:end/disp8
23762 $type-equal?:check-right:
23763
23764 (lookup *(ecx+0xc) *(ecx+0x10))
23765 89/<- %ebx 0/r32/eax
23766 (lookup *(edx+0xc) *(edx+0x10))
23767 (type-equal? %eax %ebx)
23768 $type-equal?:end:
23769
23770 5b/pop-to-ebx
23771 5a/pop-to-edx
23772 59/pop-to-ecx
23773
23774 89/<- %esp 5/r32/ebp
23775 5d/pop-to-ebp
23776 c3/return
23777
23778
23779
23780
23781
23782 == data
23783
23784
23785 Curr-local-stack-offset:
23786 0/imm32
23787
23788 == code
23789
23790 emit-subx:
23791
23792 55/push-ebp
23793 89/<- %ebp 4/r32/esp
23794
23795 50/push-eax
23796
23797 (lookup *_Program-functions *_Program-functions->payload)
23798 {
23799
23800 3d/compare-eax-and 0/imm32
23801 0f 84/jump-if-= break/disp32
23802 (emit-subx-function *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
23803
23804 (lookup *(eax+0x20) *(eax+0x24))
23805 e9/jump loop/disp32
23806 }
23807 $emit-subx:end:
23808
23809 58/pop-to-eax
23810
23811 89/<- %esp 5/r32/ebp
23812 5d/pop-to-ebp
23813 c3/return
23814
23815 emit-subx-function:
23816
23817 55/push-ebp
23818 89/<- %ebp 4/r32/esp
23819
23820 (populate-mu-type-offsets-in-inouts *(ebp+0xc))
23821
23822 50/push-eax
23823 51/push-ecx
23824 52/push-edx
23825
23826 c7 0/subop/copy *Curr-block-depth 1/imm32
23827 c7 0/subop/copy *Curr-local-stack-offset 0/imm32
23828
23829 8b/-> *(ebp+0xc) 1/r32/ecx
23830
23831 81 5/subop/subtract %esp 0xc00/imm32
23832 68/push 0xc00/imm32/size
23833 68/push 0/imm32/top
23834 89/<- %edx 4/r32/esp
23835
23836 (lookup *ecx *(ecx+4))
23837
23838 (write-buffered *(ebp+8) %eax)
23839 (write-buffered *(ebp+8) ":\n")
23840 (emit-subx-prologue *(ebp+8))
23841
23842 (lookup *(ecx+0x18) *(ecx+0x1c))
23843
23844 (emit-subx-block *(ebp+8) %eax %edx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
23845 (emit-subx-epilogue *(ebp+8))
23846
23847
23848 $emit-subx-function:end:
23849
23850 81 0/subop/add %esp 0xc08/imm32
23851
23852 5a/pop-to-edx
23853 59/pop-to-ecx
23854 58/pop-to-eax
23855
23856 89/<- %esp 5/r32/ebp
23857 5d/pop-to-ebp
23858 c3/return
23859
23860 populate-mu-type-offsets-in-inouts:
23861
23862 55/push-ebp
23863 89/<- %ebp 4/r32/esp
23864
23865 50/push-eax
23866 51/push-ecx
23867 52/push-edx
23868 53/push-ebx
23869 57/push-edi
23870
23871 ba/copy-to-edx 8/imm32
23872
23873 8b/-> *(ebp+8) 1/r32/ecx
23874 (lookup *(ecx+8) *(ecx+0xc))
23875 89/<- %ecx 0/r32/eax
23876 {
23877 $populate-mu-type-offsets-in-inouts:loop:
23878 81 7/subop/compare %ecx 0/imm32
23879 74/jump-if-= break/disp8
23880
23881 (lookup *ecx *(ecx+4))
23882 89/<- %ebx 0/r32/eax
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893 89/<- *(ebx+0x14) 2/r32/edx
23894
23895 (size-of %ebx)
23896 01/add-to %edx 0/r32/eax
23897
23898 (lookup *(ecx+8) *(ecx+0xc))
23899 89/<- %ecx 0/r32/eax
23900
23901 eb/jump loop/disp8
23902 }
23903 $populate-mu-type-offsets-in-inouts:end:
23904
23905 5f/pop-to-edi
23906 5b/pop-to-ebx
23907 5a/pop-to-edx
23908 59/pop-to-ecx
23909 58/pop-to-eax
23910
23911 89/<- %esp 5/r32/ebp
23912 5d/pop-to-ebp
23913 c3/return
23914
23915 emit-subx-stmt-list:
23916
23917 55/push-ebp
23918 89/<- %ebp 4/r32/esp
23919
23920 50/push-eax
23921 51/push-ecx
23922 53/push-ebx
23923 56/push-esi
23924
23925 8b/-> *(ebp+0xc) 6/r32/esi
23926
23927 {
23928 $emit-subx-stmt-list:loop:
23929 81 7/subop/compare %esi 0/imm32
23930 0f 84/jump-if-= break/disp32
23931
23932 (lookup *esi *(esi+4))
23933 89/<- %ecx 0/r32/eax
23934 {
23935 $emit-subx-stmt-list:check-for-block:
23936 81 7/subop/compare *ecx 0/imm32/block
23937 75/jump-if-!= break/disp8
23938 $emit-subx-stmt-list:block:
23939 (emit-subx-block *(ebp+8) %ecx *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
23940 }
23941 {
23942 $emit-subx-stmt-list:check-for-stmt:
23943 81 7/subop/compare *ecx 1/imm32/stmt1
23944 0f 85/jump-if-!= break/disp32
23945 $emit-subx-stmt-list:stmt1:
23946 {
23947 (is-mu-branch? %ecx)
23948 3d/compare-eax-and 0/imm32/false
23949 0f 84/jump-if-= break/disp32
23950 $emit-subx-stmt-list:branch-stmt:
23951 +-- 25 lines: # unconditional return -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
23976 +-- 27 lines: # unconditional loops --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
24003 +-- 16 lines: # unconditional breaks -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
24019 +-- 38 lines: # simple conditional branches without a target -------------------------------------------------------------------------------------------------------------------------------------------------------
24057 +-- 19 lines: # conditional branches with an explicit target -------------------------------------------------------------------------------------------------------------------------------------------------------
24076 }
24077 $emit-subx-stmt-list:1-to-1:
24078 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
24079 e9/jump $emit-subx-stmt-list:continue/disp32
24080 }
24081 {
24082 $emit-subx-stmt-list:check-for-var-def:
24083 81 7/subop/compare *ecx 2/imm32/var-def
24084 75/jump-if-!= break/disp8
24085 $emit-subx-stmt-list:var-def:
24086 (emit-subx-var-def *(ebp+8) %ecx)
24087 (push *(ebp+0x10) *(ecx+4))
24088 (push *(ebp+0x10) *(ecx+8))
24089 (push *(ebp+0x10) 0)
24090
24091 eb/jump $emit-subx-stmt-list:continue/disp8
24092 }
24093 {
24094 $emit-subx-stmt-list:check-for-reg-var-def:
24095 81 7/subop/compare *ecx 3/imm32/reg-var-def
24096 0f 85/jump-if-!= break/disp32
24097 $emit-subx-stmt-list:reg-var-def:
24098
24099 (push-output-and-maybe-emit-spill *(ebp+8) %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
24100
24101 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
24102
24103 eb/jump $emit-subx-stmt-list:continue/disp8
24104 }
24105 $emit-subx-stmt-list:continue:
24106
24107 (lookup *(esi+8) *(esi+0xc))
24108 89/<- %esi 0/r32/eax
24109 e9/jump loop/disp32
24110 }
24111 $emit-subx-stmt-list:emit-cleanup:
24112 (emit-cleanup-code-until-depth *(ebp+8) *(ebp+0x10) *Curr-block-depth)
24113 $emit-subx-stmt-list:clean-up:
24114 (clean-up-stack-offset-state *(ebp+0x10) *Curr-block-depth)
24115 (clean-up-blocks *(ebp+0x10) *Curr-block-depth *(ebp+0x14))
24116 $emit-subx-stmt-list:end:
24117
24118 5e/pop-to-esi
24119 5b/pop-to-ebx
24120 59/pop-to-ecx
24121 58/pop-to-eax
24122
24123 89/<- %esp 5/r32/ebp
24124 5d/pop-to-ebp
24125 c3/return
24126
24127
24128 push-output-and-maybe-emit-spill:
24129
24130 55/push-ebp
24131 89/<- %ebp 4/r32/esp
24132
24133 50/push-eax
24134 51/push-ecx
24135 52/push-edx
24136
24137 8b/-> *(ebp+0xc) 1/r32/ecx
24138
24139 (lookup *(ecx+0x14) *(ecx+0x18))
24140
24141
24142 (lookup *eax *(eax+4))
24143 89/<- %ecx 0/r32/eax
24144
24145 8b/-> *Curr-block-depth 0/r32/eax
24146 89/<- *(ecx+0x10) 0/r32/eax
24147
24148
24149
24150
24151
24152
24153
24154
24155 81 7/subop/compare *(ecx+0x18) 0/imm32
24156 0f 84/jump-if-= $push-output-and-maybe-emit-spill:abort/disp32
24157
24158 (not-yet-spilled-this-block? %ecx *(ebp+0x10))
24159 89/<- %edx 0/r32/eax
24160 3d/compare-eax-and 0/imm32/false
24161 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
24162 (will-not-write-some-register? %ecx *(ebp+0x14) *(ebp+0x18))
24163 89/<- %edx 0/r32/eax
24164
24165 3d/compare-eax-and 0/imm32/false
24166 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
24167
24168
24169 81 5/subop/subtract *Curr-local-stack-offset 4/imm32
24170
24171 (lookup *(ecx+0x18) *(ecx+0x1c))
24172 (emit-push-register *(ebp+8) %eax)
24173 $push-output-and-maybe-emit-spill:push:
24174 8b/-> *(ebp+0xc) 1/r32/ecx
24175 (lookup *(ecx+0x14) *(ecx+0x18))
24176
24177 (push *(ebp+0x10) *eax)
24178 (push *(ebp+0x10) *(eax+4))
24179 (push *(ebp+0x10) %edx)
24180 $push-output-and-maybe-emit-spill:end:
24181
24182 5a/pop-to-edx
24183 59/pop-to-ecx
24184 58/pop-to-eax
24185
24186 89/<- %esp 5/r32/ebp
24187 5d/pop-to-ebp
24188 c3/return
24189
24190 $push-output-and-maybe-emit-spill:abort:
24191
24192 (write-buffered *(ebp+0x1c) "var '")
24193 (write-buffered *(ebp+0x1c) *eax)
24194 (write-buffered *(ebp+0x1c) "' initialized from an instruction must live in a register\n")
24195 (flush *(ebp+0x1c))
24196 (stop *(ebp+0x20) 1)
24197
24198
24199 emit-subx-cleanup-and-unconditional-nonlocal-branch:
24200
24201 55/push-ebp
24202 89/<- %ebp 4/r32/esp
24203
24204 50/push-eax
24205 51/push-ecx
24206
24207 8b/-> *(ebp+0xc) 1/r32/ecx
24208
24209 (lookup *(ecx+0xc) *(ecx+0x10))
24210 (lookup *eax *(eax+4))
24211 (lookup *eax *(eax+4))
24212
24213 (emit-cleanup-code-until-target *(ebp+8) *(ebp+0x10) %eax)
24214
24215 (emit-indent *(ebp+8) *Curr-block-depth)
24216 (write-buffered *(ebp+8) "e9/jump ")
24217 (write-buffered *(ebp+8) %eax)
24218 (lookup *(ecx+4) *(ecx+8))
24219 (string-starts-with? %eax "break")
24220 3d/compare-eax-and 0/imm32/false
24221 {
24222 74/jump-if-= break/disp8
24223 (write-buffered *(ebp+8) ":break/disp32\n")
24224 eb/jump $emit-subx-cleanup-and-unconditional-nonlocal-branch:end/disp8
24225 }
24226 (write-buffered *(ebp+8) ":loop/disp32\n")
24227 $emit-subx-cleanup-and-unconditional-nonlocal-branch:end:
24228
24229 59/pop-to-ecx
24230 58/pop-to-eax
24231
24232 89/<- %esp 5/r32/ebp
24233 5d/pop-to-ebp
24234 c3/return
24235
24236 emit-outputs:
24237
24238
24239
24240
24241
24242
24243
24244
24245 55/push-ebp
24246 89/<- %ebp 4/r32/esp
24247
24248 50/push-eax
24249 51/push-ecx
24250 56/push-esi
24251 57/push-edi
24252
24253 8b/-> *(ebp+0xc) 0/r32/eax
24254 (lookup *(eax+0xc) *(eax+0x10))
24255 89/<- %esi 0/r32/eax
24256
24257 8b/-> *(ebp+0x10) 0/r32/eax
24258 (lookup *(eax+0x10) *(eax+0x14))
24259 89/<- %edi 0/r32/eax
24260 {
24261 $emit-outputs:loop:
24262 81 7/subop/compare %esi 0/imm32
24263 0f 84/jump-if-= break/disp32
24264
24265
24266 (lookup *esi *(esi+4))
24267 89/<- %ecx 0/r32/eax
24268
24269 (lookup *(ecx+8) *(ecx+0xc))
24270 (is-simple-mu-type? %eax 0)
24271 {
24272 3d/compare-eax-and 0/imm32/false
24273 0f 84/jump-if-= break/disp32
24274 (emit-indent *(ebp+8) *Curr-block-depth)
24275 (write-buffered *(ebp+8) "c7 0/subop/copy %")
24276 (lookup *edi *(edi+4))
24277 (lookup *(eax+0x18) *(eax+0x1c))
24278 (write-buffered *(ebp+8) %eax)
24279 (write-buffered *(ebp+8) " ")
24280 (lookup *ecx *(ecx+4))
24281 (write-buffered *(ebp+8) %eax)
24282 (write-buffered *(ebp+8) "/imm32\n")
24283 e9/jump $emit-outputs:continue/disp32
24284 }
24285
24286 (lookup *(ecx+0x18) *(ecx+0x1c))
24287 {
24288 3d/compare-eax-and 0/imm32
24289 0f 84/jump-if-= break/disp32
24290 8a/copy-byte *(eax+4) 0/r32/AL
24291 81 4/subop/and %eax 0xff/imm32
24292 3d/compare-eax-and 0x78/imm32/x
24293 0f 85/jump-if-!= break/disp32
24294 (emit-indent *(ebp+8) *Curr-block-depth)
24295 (write-buffered *(ebp+8) "f3 0f 10/->")
24296 (emit-subx-var-as-rm32 *(ebp+8) %esi)
24297 (write-buffered *(ebp+8) " ")
24298 (lookup *edi *(edi+4))
24299 (lookup *(eax+0x18) *(eax+0x1c))
24300 (get Mu-registers %eax 0xc "Mu-registers")
24301 (write-int32-hex-buffered *(ebp+8) *eax)
24302 (write-buffered *(ebp+8) "/x32\n")
24303 e9/jump $emit-outputs:continue/disp32
24304 }
24305
24306 (emit-indent *(ebp+8) *Curr-block-depth)
24307 (write-buffered *(ebp+8) "8b/->")
24308 (emit-subx-var-as-rm32 *(ebp+8) %esi)
24309 (write-buffered *(ebp+8) " ")
24310 (lookup *edi *(edi+4))
24311 (lookup *(eax+0x18) *(eax+0x1c))
24312 (get Mu-registers %eax 0xc "Mu-registers")
24313 (write-int32-hex-buffered *(ebp+8) *eax)
24314 (write-buffered *(ebp+8) "/r32\n")
24315 $emit-outputs:continue:
24316
24317 (lookup *(esi+8) *(esi+0xc))
24318 89/<- %esi 0/r32/eax
24319
24320 (lookup *(edi+8) *(edi+0xc))
24321 89/<- %edi 0/r32/eax
24322
24323 e9/jump loop/disp32
24324 }
24325 $emit-outputs:end:
24326
24327 5f/pop-to-edi
24328 5e/pop-to-esi
24329 59/pop-to-ecx
24330 58/pop-to-eax
24331
24332 89/<- %esp 5/r32/ebp
24333 5d/pop-to-ebp
24334 c3/return
24335
24336 is-mu-branch?:
24337
24338 55/push-ebp
24339 89/<- %ebp 4/r32/esp
24340
24341 51/push-ecx
24342
24343 8b/-> *(ebp+8) 1/r32/ecx
24344 (lookup *(ecx+4) *(ecx+8))
24345 89/<- %ecx 0/r32/eax
24346
24347 (string-starts-with? %ecx "loop")
24348 3d/compare-eax-and 0/imm32/false
24349 75/jump-if-not-equal $is-mu-branch?:end/disp8
24350
24351 (string-starts-with? %ecx "break")
24352 3d/compare-eax-and 0/imm32/false
24353 75/jump-if-not-equal $is-mu-branch?:end/disp8
24354
24355 (string-starts-with? %ecx "return")
24356 $is-mu-branch?:end:
24357
24358 59/pop-to-ecx
24359
24360 89/<- %esp 5/r32/ebp
24361 5d/pop-to-ebp
24362 c3/return
24363
24364 emit-reverse-break:
24365
24366 55/push-ebp
24367 89/<- %ebp 4/r32/esp
24368
24369 50/push-eax
24370
24371 8b/-> *(ebp+0xc) 0/r32/eax
24372
24373 (lookup *(eax+4) *(eax+8))
24374 (get Reverse-branch %eax 0x10 "reverse-branch: ")
24375 (emit-indent *(ebp+8) *Curr-block-depth)
24376 (lookup *eax *(eax+4))
24377 (write-buffered *(ebp+8) %eax)
24378 (write-buffered *(ebp+8) " break/disp32\n")
24379 $emit-reverse-break:end:
24380
24381 58/pop-to-eax
24382
24383 89/<- %esp 5/r32/ebp
24384 5d/pop-to-ebp
24385 c3/return
24386
24387 == data
24388
24389
24390 Reverse-branch:
24391
24392 0x1c0/imm32/write
24393 0/imm32/read
24394 0x1c0/imm32/size
24395
24396 0x11/imm32/alloc-id _string-break-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
24397 0x11/imm32/alloc-id _string-loop-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
24398 0x11/imm32/alloc-id _string-break-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
24399 0x11/imm32/alloc-id _string-loop-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
24400 0x11/imm32/alloc-id _string-break-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
24401 0x11/imm32/alloc-id _string-loop-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
24402 0x11/imm32/alloc-id _string-break-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
24403 0x11/imm32/alloc-id _string-loop-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
24404 0x11/imm32/alloc-id _string-break-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
24405 0x11/imm32/alloc-id _string-loop-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
24406 0x11/imm32/alloc-id _string-break-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
24407 0x11/imm32/alloc-id _string-loop-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
24408 0x11/imm32/alloc-id _string-break-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
24409 0x11/imm32/alloc-id _string-loop-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
24410 0x11/imm32/alloc-id _string-break-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
24411 0x11/imm32/alloc-id _string-loop-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
24412 0x11/imm32/alloc-id _string-break-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
24413 0x11/imm32/alloc-id _string-loop-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
24414 0x11/imm32/alloc-id _string-break-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
24415 0x11/imm32/alloc-id _string-loop-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
24416 0x11/imm32/alloc-id _string-break-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
24417 0x11/imm32/alloc-id _string-loop-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
24418 0x11/imm32/alloc-id _string-break-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
24419 0x11/imm32/alloc-id _string-loop-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
24420 0x11/imm32/alloc-id _string-break-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
24421 0x11/imm32/alloc-id _string-loop-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
24422 0x11/imm32/alloc-id _string-break-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
24423 0x11/imm32/alloc-id _string-loop-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
24424
24425 == code
24426
24427 emit-unconditional-jump-to-depth:
24428
24429 55/push-ebp
24430 89/<- %ebp 4/r32/esp
24431
24432 50/push-eax
24433 51/push-ecx
24434 52/push-edx
24435 53/push-ebx
24436 56/push-esi
24437
24438 8b/-> *(ebp+0xc) 1/r32/ecx
24439
24440 8b/-> *ecx 0/r32/eax
24441
24442 8d/copy-address *(ecx+eax-4) 6/r32/esi
24443
24444 8d/copy-address *(ecx+8) 1/r32/ecx
24445
24446 8b/-> *(ebp+0x10) 2/r32/edx
24447 {
24448 $emit-unconditional-jump-to-depth:loop:
24449
24450 39/compare %esi 1/r32/ecx
24451 0f 82/jump-if-addr< break/disp32
24452
24453 (lookup *esi *(esi+4))
24454 89/<- %ebx 0/r32/eax
24455
24456 39/compare *(ebx+0x10) 2/r32/edx
24457 0f 8c/jump-if-< break/disp32
24458 {
24459 $emit-unconditional-jump-to-depth:check:
24460
24461 39/compare *(ebx+0x10) 2/r32/edx
24462 0f 85/jump-if-!= break/disp32
24463 $emit-unconditional-jump-to-depth:depth-found:
24464
24465 (size-of %ebx)
24466 3d/compare-eax-and 0/imm32
24467 0f 85/jump-if-!= break/disp32
24468 $emit-unconditional-jump-to-depth:label-found:
24469
24470 (emit-indent *(ebp+8) *Curr-block-depth)
24471 (write-buffered *(ebp+8) "e9/jump ")
24472 (lookup *ebx *(ebx+4))
24473 (write-buffered *(ebp+8) %eax)
24474 (write-buffered *(ebp+8) ":")
24475 (write-buffered *(ebp+8) *(ebp+0x14))
24476 (write-buffered *(ebp+8) "/disp32\n")
24477 eb/jump $emit-unconditional-jump-to-depth:end/disp8
24478 }
24479
24480 81 5/subop/subtract %esi 0xc/imm32
24481 e9/jump loop/disp32
24482 }
24483
24484 $emit-unconditional-jump-to-depth:end:
24485
24486 5e/pop-to-esi
24487 5b/pop-to-ebx
24488 5a/pop-to-edx
24489 59/pop-to-ecx
24490 58/pop-to-eax
24491
24492 89/<- %esp 5/r32/ebp
24493 5d/pop-to-ebp
24494 c3/return
24495
24496
24497
24498 emit-cleanup-code-until-depth:
24499
24500 55/push-ebp
24501 89/<- %ebp 4/r32/esp
24502
24503 50/push-eax
24504 51/push-ecx
24505 52/push-edx
24506 53/push-ebx
24507 56/push-esi
24508
24509
24510
24511 8b/-> *(ebp+0xc) 1/r32/ecx
24512
24513 8b/-> *ecx 6/r32/esi
24514
24515 8d/copy-address *(ecx+esi-4) 6/r32/esi
24516
24517 81 0/subop/add %ecx 8/imm32
24518
24519 8b/-> *(ebp+0x10) 2/r32/edx
24520 {
24521 $emit-cleanup-code-until-depth:loop:
24522
24523 39/compare %esi 1/r32/ecx
24524 0f 82/jump-if-addr< break/disp32
24525
24526 (lookup *esi *(esi+4))
24527 89/<- %ebx 0/r32/eax
24528
24529
24530
24531
24532
24533
24534 39/compare *(ebx+0x10) 2/r32/edx
24535 0f 8c/jump-if-< break/disp32
24536
24537 81 7/subop/compare *(ebx+0x18) 0/imm32
24538 {
24539 0f 84/jump-if-= break/disp32
24540 {
24541 $emit-cleanup-code-until-depth:check-for-previous-spill:
24542 8b/-> *(esi+8) 0/r32/eax
24543 3d/compare-eax-and 0/imm32/false
24544 74/jump-if-= break/disp8
24545 $emit-cleanup-code-until-depth:reclaim-var-in-register:
24546 (lookup *(ebx+0x18) *(ebx+0x1c))
24547 (emit-pop-register *(ebp+8) %eax)
24548 }
24549 eb/jump $emit-cleanup-code-until-depth:continue/disp8
24550 }
24551
24552 {
24553 75/jump-if-!= break/disp8
24554 $emit-cleanup-code-until-depth:var-on-stack:
24555 (size-of %ebx)
24556
24557 3d/compare-eax-and 0/imm32
24558 74/jump-if-= break/disp8
24559 $emit-cleanup-code-until-depth:reclaim-var-on-stack:
24560 (emit-indent *(ebp+8) *Curr-block-depth)
24561 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
24562 (write-int32-hex-buffered *(ebp+8) %eax)
24563 (write-buffered *(ebp+8) "/imm32\n")
24564 }
24565 $emit-cleanup-code-until-depth:continue:
24566
24567 81 5/subop/subtract %esi 0xc/imm32
24568 e9/jump loop/disp32
24569 }
24570 $emit-cleanup-code-until-depth:end:
24571
24572 5e/pop-to-esi
24573 5b/pop-to-ebx
24574 5a/pop-to-edx
24575 59/pop-to-ecx
24576 58/pop-to-eax
24577
24578 89/<- %esp 5/r32/ebp
24579 5d/pop-to-ebp
24580 c3/return
24581
24582
24583
24584 emit-cleanup-code-for-non-outputs:
24585
24586 55/push-ebp
24587 89/<- %ebp 4/r32/esp
24588
24589 50/push-eax
24590 51/push-ecx
24591 52/push-edx
24592 53/push-ebx
24593 56/push-esi
24594 57/push-edi
24595
24596 8b/-> *(ebp+0xc) 1/r32/ecx
24597
24598 8b/-> *ecx 6/r32/esi
24599
24600 8d/copy-address *(ecx+esi-4) 6/r32/esi
24601
24602 81 0/subop/add %ecx 8/imm32
24603 {
24604 $emit-cleanup-code-for-non-outputs:loop:
24605
24606 39/compare %esi 1/r32/ecx
24607 0f 82/jump-if-addr< break/disp32
24608
24609 (lookup *esi *(esi+4))
24610 89/<- %ebx 0/r32/eax
24611
24612 81 7/subop/compare *(ebx+0x18) 0/imm32
24613 {
24614 0f 84/jump-if-= break/disp32
24615 {
24616 $emit-cleanup-code-for-non-outputs:check-for-previous-spill:
24617 8b/-> *(esi+8) 0/r32/eax
24618 3d/compare-eax-and 0/imm32/false
24619 0f 84/jump-if-= break/disp32
24620 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register:
24621
24622 (lookup *(ebx+0x18) *(ebx+0x1c))
24623 89/<- %edi 0/r32/eax
24624
24625 (reg-in-function-outputs? *(ebp+0x10) %edi)
24626 3d/compare-eax-and 0/imm32/false
24627 {
24628 75/jump-if-!= break/disp8
24629 (emit-pop-register *(ebp+8) %edi)
24630 eb/jump $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done/disp8
24631 }
24632
24633 (emit-indent *(ebp+8) *Curr-block-depth)
24634 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
24635 }
24636 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done:
24637 eb/jump $emit-cleanup-code-for-non-outputs:continue/disp8
24638 }
24639
24640 {
24641 75/jump-if-!= break/disp8
24642 $emit-cleanup-code-for-non-outputs:var-on-stack:
24643 (size-of %ebx)
24644
24645 3d/compare-eax-and 0/imm32
24646 74/jump-if-= break/disp8
24647 $emit-cleanup-code-for-non-outputs:reclaim-var-on-stack:
24648 (emit-indent *(ebp+8) *Curr-block-depth)
24649 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
24650 (write-int32-hex-buffered *(ebp+8) %eax)
24651 (write-buffered *(ebp+8) "/imm32\n")
24652 }
24653 $emit-cleanup-code-for-non-outputs:continue:
24654
24655 81 5/subop/subtract %esi 0xc/imm32
24656 e9/jump loop/disp32
24657 }
24658 $emit-cleanup-code-for-non-outputs:end:
24659
24660 5f/pop-to-edi
24661 5e/pop-to-esi
24662 5b/pop-to-ebx
24663 5a/pop-to-edx
24664 59/pop-to-ecx
24665 58/pop-to-eax
24666
24667 89/<- %esp 5/r32/ebp
24668 5d/pop-to-ebp
24669 c3/return
24670
24671 emit-push-register:
24672
24673 55/push-ebp
24674 89/<- %ebp 4/r32/esp
24675
24676 8b/-> *(ebp+0xc) 0/r32/eax
24677
24678 8a/copy-byte *(eax+4) 0/r32/AL
24679 81 4/subop/and %eax 0xff/imm32
24680
24681 {
24682 3d/compare-eax-and 0x78/imm32/x
24683 0f 85/jump-if-!= break/disp32
24684
24685 (emit-indent *(ebp+8) *Curr-block-depth)
24686 (write-buffered *(ebp+8) "81 5/subop/subtract %esp 4/imm32\n")
24687 (emit-indent *(ebp+8) *Curr-block-depth)
24688 (write-buffered *(ebp+8) "f3 0f 11/<- *esp ")
24689
24690 8b/-> *(ebp+0xc) 0/r32/eax
24691 8a/copy-byte *(eax+7) 0/r32/AL
24692 81 4/subop/and %eax 0xff/imm32
24693 (write-byte-buffered *(ebp+8) %eax)
24694 (write-buffered *(ebp+8) "/x32\n")
24695 e9/jump $emit-push-register:end/disp32
24696 }
24697
24698 (emit-indent *(ebp+8) *Curr-block-depth)
24699 (write-buffered *(ebp+8) "ff 6/subop/push %")
24700 (write-buffered *(ebp+8) *(ebp+0xc))
24701 (write-buffered *(ebp+8) Newline)
24702 $emit-push-register:end:
24703
24704 89/<- %esp 5/r32/ebp
24705 5d/pop-to-ebp
24706 c3/return
24707
24708 emit-pop-register:
24709
24710 55/push-ebp
24711 89/<- %ebp 4/r32/esp
24712
24713 50/push-eax
24714
24715 8b/-> *(ebp+0xc) 0/r32/eax
24716
24717 8a/copy-byte *(eax+4) 0/r32/AL
24718 81 4/subop/and %eax 0xff/imm32
24719
24720 {
24721 3d/compare-eax-and 0x78/imm32/x
24722 0f 85/jump-if-!= break/disp32
24723
24724 (emit-indent *(ebp+8) *Curr-block-depth)
24725 (write-buffered *(ebp+8) "f3 0f 10/-> *esp ")
24726
24727 8b/-> *(ebp+0xc) 0/r32/eax
24728 8a/copy-byte *(eax+7) 0/r32/AL
24729 81 4/subop/and %eax 0xff/imm32
24730 (write-byte-buffered *(ebp+8) %eax)
24731 (write-buffered *(ebp+8) "/x32\n")
24732 (emit-indent *(ebp+8) *Curr-block-depth)
24733 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
24734 e9/jump $emit-pop-register:end/disp32
24735 }
24736
24737 (emit-indent *(ebp+8) *Curr-block-depth)
24738 (write-buffered *(ebp+8) "8f 0/subop/pop %")
24739 (write-buffered *(ebp+8) *(ebp+0xc))
24740 (write-buffered *(ebp+8) Newline)
24741 $emit-pop-register:end:
24742
24743 58/pop-to-eax
24744
24745 89/<- %esp 5/r32/ebp
24746 5d/pop-to-ebp
24747 c3/return
24748
24749
24750
24751 emit-cleanup-code-until-target:
24752
24753 55/push-ebp
24754 89/<- %ebp 4/r32/esp
24755
24756 50/push-eax
24757 51/push-ecx
24758 52/push-edx
24759 53/push-ebx
24760
24761 8b/-> *(ebp+0xc) 1/r32/ecx
24762
24763 8b/-> *ecx 0/r32/eax
24764
24765 8d/copy-address *(ecx+eax-4) 2/r32/edx
24766
24767 81 0/subop/add %ecx 8/imm32
24768 {
24769 $emit-cleanup-code-until-target:loop:
24770
24771 39/compare %edx 1/r32/ecx
24772 0f 82/jump-if-addr< break/disp32
24773
24774 (lookup *edx *(edx+4))
24775 89/<- %ebx 0/r32/eax
24776
24777 (lookup *ebx *(ebx+4))
24778 (string-equal? %eax *(ebp+0x10))
24779 3d/compare-eax-and 0/imm32/false
24780 0f 85/jump-if-!= break/disp32
24781
24782 81 7/subop/compare *(ebx+0x18) 0/imm32
24783 {
24784 0f 84/jump-if-= break/disp32
24785 {
24786 $emit-cleanup-code-until-target:check-for-previous-spill:
24787 8b/-> *(edx+8) 0/r32/eax
24788 3d/compare-eax-and 0/imm32/false
24789 74/jump-if-= break/disp8
24790 $emit-cleanup-code-until-target:reclaim-var-in-register:
24791 (lookup *(ebx+0x18) *(ebx+0x1c))
24792 (emit-pop-register *(ebp+8) %eax)
24793 }
24794 eb/jump $emit-cleanup-code-until-target:continue/disp8
24795 }
24796
24797 {
24798 75/jump-if-!= break/disp8
24799 $emit-cleanup-code-until-target:reclaim-var-on-stack:
24800 (size-of %ebx)
24801
24802 3d/compare-eax-and 0/imm32
24803 74/jump-if-= break/disp8
24804
24805 (emit-indent *(ebp+8) *Curr-block-depth)
24806 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
24807 (write-int32-hex-buffered *(ebp+8) %eax)
24808 (write-buffered *(ebp+8) "/imm32\n")
24809 }
24810 $emit-cleanup-code-until-target:continue:
24811
24812 81 5/subop/subtract %edx 0xc/imm32
24813 e9/jump loop/disp32
24814 }
24815 $emit-cleanup-code-until-target:end:
24816
24817 5b/pop-to-ebx
24818 5a/pop-to-edx
24819 59/pop-to-ecx
24820 58/pop-to-eax
24821
24822 89/<- %esp 5/r32/ebp
24823 5d/pop-to-ebp
24824 c3/return
24825
24826
24827
24828 clean-up-stack-offset-state:
24829
24830 55/push-ebp
24831 89/<- %ebp 4/r32/esp
24832
24833 50/push-eax
24834 51/push-ecx
24835 52/push-edx
24836 53/push-ebx
24837 56/push-esi
24838
24839 8b/-> *(ebp+8) 1/r32/ecx
24840
24841 8b/-> *ecx 6/r32/esi
24842
24843 8d/copy-address *(ecx+esi-4) 6/r32/esi
24844
24845 81 0/subop/add %ecx 8/imm32
24846
24847 8b/-> *(ebp+0xc) 2/r32/edx
24848 {
24849 $clean-up-stack-offset-state:loop:
24850
24851 39/compare %esi 1/r32/ecx
24852 0f 82/jump-if-addr< break/disp32
24853
24854 (lookup *esi *(esi+4))
24855 89/<- %ebx 0/r32/eax
24856
24857 39/compare *(ebx+0x10) 2/r32/edx
24858 0f 8c/jump-if-< break/disp32
24859
24860 81 7/subop/compare *(ebx+0x18) 0/imm32
24861 {
24862 0f 84/jump-if-= break/disp32
24863 {
24864 $clean-up-stack-offset-state:check-for-previous-spill:
24865 8b/-> *(esi+8) 0/r32/eax
24866 3d/compare-eax-and 0/imm32/false
24867 74/jump-if-= break/disp8
24868 $clean-up-stack-offset-state:reclaim-var-in-register:
24869 81 0/subop/add *Curr-local-stack-offset 4/imm32
24870 }
24871 eb/jump $clean-up-stack-offset-state:continue/disp8
24872 }
24873
24874 {
24875 75/jump-if-!= break/disp8
24876 $clean-up-stack-offset-state:var-on-stack:
24877 (size-of %ebx)
24878 01/add-to *Curr-local-stack-offset 0/r32/eax
24879 }
24880 $clean-up-stack-offset-state:continue:
24881
24882 81 5/subop/subtract %esi 0xc/imm32
24883 e9/jump loop/disp32
24884 }
24885 $clean-up-stack-offset-state:end:
24886
24887 5e/pop-to-esi
24888 5b/pop-to-ebx
24889 5a/pop-to-edx
24890 59/pop-to-ecx
24891 58/pop-to-eax
24892
24893 89/<- %esp 5/r32/ebp
24894 5d/pop-to-ebp
24895 c3/return
24896
24897
24898
24899
24900 not-yet-spilled-this-block?:
24901
24902 55/push-ebp
24903 89/<- %ebp 4/r32/esp
24904
24905 51/push-ecx
24906 52/push-edx
24907 53/push-ebx
24908 56/push-esi
24909 57/push-edi
24910
24911 8b/-> *(ebp+0xc) 1/r32/ecx
24912
24913 8b/-> *ecx 0/r32/eax
24914
24915 8d/copy-address *(ecx+eax-4) 2/r32/edx
24916
24917 8d/copy-address *(ecx+8) 1/r32/ecx
24918
24919 8b/-> *(ebp+8) 3/r32/ebx
24920 8b/-> *(ebx+0x10) 3/r32/ebx
24921
24922 8b/-> *(ebp+8) 6/r32/esi
24923 (lookup *(esi+0x18) *(esi+0x1c))
24924 89/<- %esi 0/r32/eax
24925 {
24926 $not-yet-spilled-this-block?:loop:
24927
24928 39/compare %edx 1/r32/ecx
24929 0f 82/jump-if-addr< break/disp32
24930
24931 (lookup *edx *(edx+4))
24932 89/<- %edi 0/r32/eax
24933
24934 39/compare *(edi+0x10) 3/r32/ebx
24935 0f 8c/jump-if-< break/disp32
24936
24937 (lookup *(edi+0x18) *(edi+0x1c))
24938 89/<- %edi 0/r32/eax
24939
24940 {
24941 $not-yet-spilled-this-block?:check-reg:
24942 81 7/subop/compare %edi 0/imm32
24943 0f 84/jump-if-= break/disp32
24944
24945 (string-equal? %esi %edi)
24946 3d/compare-eax-and 0/imm32/false
24947 74/jump-if-= break/disp8
24948 $not-yet-spilled-this-block?:return-false:
24949 b8/copy-to-eax 0/imm32/false
24950 eb/jump $not-yet-spilled-this-block?:end/disp8
24951 }
24952 $not-yet-spilled-this-block?:continue:
24953
24954 81 5/subop/subtract %edx 0xc/imm32
24955 e9/jump loop/disp32
24956 }
24957 $not-yet-spilled-this-block?:return-true:
24958
24959 b8/copy-to-eax 1/imm32/true
24960 $not-yet-spilled-this-block?:end:
24961
24962 5f/pop-to-edi
24963 5e/pop-to-esi
24964 5b/pop-to-ebx
24965 5a/pop-to-edx
24966 59/pop-to-ecx
24967
24968 89/<- %esp 5/r32/ebp
24969 5d/pop-to-ebp
24970 c3/return
24971
24972
24973 will-not-write-some-register?:
24974
24975 55/push-ebp
24976 89/<- %ebp 4/r32/esp
24977
24978 8b/-> *(ebp+8) 0/r32/eax
24979
24980 (lookup *(eax+0x18) *(eax+0x1c))
24981
24982 (find-register *(ebp+0x10) %eax)
24983
24984 {
24985 3d/compare-eax-and 0/imm32
24986 75/jump-if-!= break/disp8
24987 b8/copy-to-eax 1/imm32/true
24988 eb/jump $will-not-write-some-register?:end/disp8
24989 }
24990
24991 (assigns-in-stmts? *(ebp+0xc) %eax)
24992 3d/compare-eax-and 0/imm32/false
24993
24994 0f 94/set-if-= %al
24995 $will-not-write-some-register?:end:
24996
24997 89/<- %esp 5/r32/ebp
24998 5d/pop-to-ebp
24999 c3/return
25000
25001
25002
25003 find-register:
25004
25005 55/push-ebp
25006 89/<- %ebp 4/r32/esp
25007
25008 51/push-ecx
25009
25010 8b/-> *(ebp+8) 1/r32/ecx
25011 (lookup *(ecx+0x10) *(ecx+0x14))
25012 89/<- %ecx 0/r32/eax
25013 {
25014 $find-register:loop:
25015
25016 81 7/subop/compare %ecx 0/imm32
25017 74/jump-if-= break/disp8
25018
25019 (lookup *ecx *(ecx+4))
25020 (lookup *(eax+0x18) *(eax+0x1c))
25021
25022 $find-register:compare:
25023 (string-equal? *(ebp+0xc) %eax)
25024 {
25025 3d/compare-eax-and 0/imm32/false
25026 74/jump-if-= break/disp8
25027 $find-register:found:
25028 (lookup *ecx *(ecx+4))
25029 eb/jump $find-register:end/disp8
25030 }
25031
25032 (lookup *(ecx+8) *(ecx+0xc))
25033 89/<- %ecx 0/r32/eax
25034
25035 eb/jump loop/disp8
25036 }
25037 $find-register:end:
25038
25039 59/pop-to-ecx
25040
25041 89/<- %esp 5/r32/ebp
25042 5d/pop-to-ebp
25043 c3/return
25044
25045 assigns-in-stmts?:
25046
25047 55/push-ebp
25048 89/<- %ebp 4/r32/esp
25049
25050 51/push-ecx
25051
25052 8b/-> *(ebp+8) 1/r32/ecx
25053 {
25054
25055 81 7/subop/compare %ecx 0/imm32
25056 74/jump-if-= break/disp8
25057
25058 (lookup *ecx *(ecx+4))
25059 (assigns-in-stmt? %eax *(ebp+0xc))
25060 3d/compare-eax-and 0/imm32/false
25061 75/jump-if-!= break/disp8
25062
25063 (lookup *(ecx+8) *(ecx+0xc))
25064 89/<- %ecx 0/r32/eax
25065
25066 eb/jump loop/disp8
25067 }
25068 $assigns-in-stmts?:end:
25069
25070 59/pop-to-ecx
25071
25072 89/<- %esp 5/r32/ebp
25073 5d/pop-to-ebp
25074 c3/return
25075
25076 assigns-in-stmt?:
25077
25078 55/push-ebp
25079 89/<- %ebp 4/r32/esp
25080
25081 51/push-ecx
25082
25083 8b/-> *(ebp+8) 1/r32/ecx
25084
25085 {
25086 81 7/subop/compare *ecx 1/imm32/stmt1
25087 75/jump-if-!= break/disp8
25088 (lookup *(ecx+0x14) *(ecx+0x18))
25089 (assigns-in-stmt-vars? %eax *(ebp+0xc))
25090 eb/jump $assigns-in-stmt?:end/disp8
25091 }
25092
25093 {
25094 81 7/subop/compare *ecx 0/imm32/block
25095 75/jump-if-!= break/disp8
25096 (lookup *(ecx+4) *(ecx+8))
25097 (assigns-in-stmts? %eax *(ebp+0xc))
25098 eb/jump $assigns-in-stmt?:end/disp8
25099 }
25100
25101 b8/copy 0/imm32/false
25102 $assigns-in-stmt?:end:
25103
25104 59/pop-to-ecx
25105
25106 89/<- %esp 5/r32/ebp
25107 5d/pop-to-ebp
25108 c3/return
25109
25110 assigns-in-stmt-vars?:
25111
25112 55/push-ebp
25113 89/<- %ebp 4/r32/esp
25114
25115 51/push-ecx
25116
25117 8b/-> *(ebp+8) 1/r32/ecx
25118 {
25119
25120 81 7/subop/compare %ecx 0/imm32
25121 74/jump-if-= break/disp8
25122
25123 (lookup *ecx *(ecx+4))
25124
25125 {
25126 39/compare *(ebp+0xc) 0/r32/eax
25127 75/jump-if-!= break/disp8
25128 81 7/subop/compare *(ecx+0x10) 0/imm32/false
25129 75/jump-if-!= break/disp8
25130 b8/copy-to-eax 1/imm32/true
25131 eb/jump $assigns-in-stmt-vars?:end/disp8
25132 }
25133
25134 (lookup *(ecx+8) *(ecx+0xc))
25135 89/<- %ecx 0/r32/eax
25136
25137 eb/jump loop/disp8
25138 }
25139 $assigns-in-stmt-vars?:end:
25140
25141 59/pop-to-ecx
25142
25143 89/<- %esp 5/r32/ebp
25144 5d/pop-to-ebp
25145 c3/return
25146
25147
25148
25149
25150
25151 same-register-spilled-before?:
25152
25153 55/push-ebp
25154 89/<- %ebp 4/r32/esp
25155
25156 51/push-ecx
25157 52/push-edx
25158 53/push-ebx
25159 56/push-esi
25160 57/push-edi
25161
25162 8b/-> *(ebp+8) 1/r32/ecx
25163
25164 (lookup *(ecx+0x18) *(ecx+0x1c))
25165 89/<- %edx 0/r32/eax
25166
25167 8b/-> *(ecx+0x10) 3/r32/ebx
25168
25169 8b/-> *(ebp+0xc) 1/r32/ecx
25170 81 0/subop/add %ecx 8/imm32
25171
25172
25173
25174 8b/-> *(ebp+0x10) 6/r32/esi
25175
25176 81 5/subop/subtract %esi 8/imm32
25177 {
25178 $same-register-spilled-before?:loop:
25179
25180 39/compare %esi 1/r32/ecx
25181 0f 82/jump-if-addr< break/disp32
25182
25183 (lookup *esi *(esi+4))
25184
25185 39/compare *(eax+0x10) 3/r32/ebx
25186 0f 8c/jump-if-< break/disp32
25187
25188 81 7/subop/compare *(eax+0x18) 0/imm32
25189 74/jump-if-= $same-register-spilled-before?:continue/disp8
25190
25191 (lookup *(eax+0x18) *(eax+0x1c))
25192 (string-equal? %eax %edx)
25193 3d/compare-eax-and 0/imm32/false
25194 b8/copy-to-eax 1/imm32/true
25195 75/jump-if-!= $same-register-spilled-before?:end/disp8
25196 $same-register-spilled-before?:continue:
25197
25198 81 5/subop/subtract %esi 8/imm32
25199 e9/jump loop/disp32
25200 }
25201 $same-register-spilled-before?:false:
25202 b8/copy-to-eax 0/imm32/false
25203 $same-register-spilled-before?:end:
25204
25205 5f/pop-to-edi
25206 5e/pop-to-esi
25207 5b/pop-to-ebx
25208 5a/pop-to-edx
25209 59/pop-to-ecx
25210
25211 89/<- %esp 5/r32/ebp
25212 5d/pop-to-ebp
25213 c3/return
25214
25215
25216 clean-up-blocks:
25217
25218 55/push-ebp
25219 89/<- %ebp 4/r32/esp
25220
25221 50/push-eax
25222 51/push-ecx
25223 56/push-esi
25224
25225 8b/-> *(ebp+8) 6/r32/esi
25226
25227 8b/-> *(ebp+0xc) 1/r32/ecx
25228 {
25229 $clean-up-blocks:reclaim-loop:
25230
25231 8b/-> *esi 0/r32/eax
25232 3d/compare-eax-and 0/imm32
25233 0f 8e/jump-if-<= break/disp32
25234
25235 (lookup *(esi+eax-4) *(esi+eax))
25236
25237 39/compare *(eax+0x10) 1/r32/ecx
25238 0f 8c/jump-if-< break/disp32
25239 (pop %esi)
25240 (pop %esi)
25241 (pop %esi)
25242 e9/jump loop/disp32
25243 }
25244 $clean-up-blocks:end:
25245
25246 5e/pop-to-esi
25247 59/pop-to-ecx
25248 58/pop-to-eax
25249
25250 89/<- %esp 5/r32/ebp
25251 5d/pop-to-ebp
25252 c3/return
25253
25254 reg-in-function-outputs?:
25255
25256 55/push-ebp
25257 89/<- %ebp 4/r32/esp
25258
25259 51/push-ecx
25260
25261 8b/-> *(ebp+8) 0/r32/eax
25262 (lookup *(eax+0x10) *(eax+0x14))
25263 89/<- %ecx 0/r32/eax
25264
25265 {
25266 81 7/subop/compare %ecx 0/imm32
25267 74/jump-if-= break/disp8
25268
25269 (lookup *ecx *(ecx+4))
25270
25271 (lookup *(eax+0x18) *(eax+0x1c))
25272
25273 (string-equal? %eax *(ebp+0xc))
25274 3d/compare-eax-and 0/imm32/false
25275 75/jump-if-!= $reg-in-function-outputs?:end/disp8
25276
25277 (lookup *(ecx+8) *(ecx+0xc))
25278 89/<- %ecx 0/r32/eax
25279
25280 eb/jump loop/disp8
25281 }
25282
25283 b8/copy-to-eax 0/imm32
25284 $reg-in-function-outputs?:end:
25285
25286 59/pop-to-ecx
25287
25288 89/<- %esp 5/r32/ebp
25289 5d/pop-to-ebp
25290 c3/return
25291
25292 emit-subx-var-def:
25293
25294 55/push-ebp
25295 89/<- %ebp 4/r32/esp
25296
25297 50/push-eax
25298 51/push-ecx
25299 52/push-edx
25300
25301 8b/-> *(ebp+0xc) 0/r32/eax
25302
25303 (lookup *(eax+4) *(eax+8))
25304 89/<- %ecx 0/r32/eax
25305
25306 8b/-> *Curr-block-depth 0/r32/eax
25307 89/<- *(ecx+0x10) 0/r32/eax
25308
25309 (size-of %ecx)
25310 89/<- %edx 0/r32/eax
25311
25312 29/subtract-from *Curr-local-stack-offset 2/r32/edx
25313
25314 8b/-> *Curr-local-stack-offset 0/r32/eax
25315 89/<- *(ecx+0x14) 0/r32/eax
25316
25317 {
25318 (lookup *(ecx+8) *(ecx+0xc))
25319 (is-mu-array? %eax)
25320 3d/compare-eax-and 0/imm32/false
25321 0f 84/jump-if-= break/disp32
25322
25323 81 5/subop/subtract %edx 4/imm32
25324
25325 (emit-array-data-initialization *(ebp+8) %edx)
25326 e9/jump $emit-subx-var-def:end/disp32
25327 }
25328
25329
25330 {
25331 (lookup *(ecx+8) *(ecx+0xc))
25332 (is-mu-stream? %eax)
25333 3d/compare-eax-and 0/imm32/false
25334 0f 84/jump-if-= break/disp32
25335
25336 81 5/subop/subtract %edx 0xc/imm32
25337 (emit-array-data-initialization *(ebp+8) %edx)
25338
25339 (emit-indent *(ebp+8) *Curr-block-depth)
25340 (write-buffered *(ebp+8) "68/push 0/imm32\n")
25341 (emit-indent *(ebp+8) *Curr-block-depth)
25342 (write-buffered *(ebp+8) "68/push 0/imm32\n")
25343
25344 eb/jump $emit-subx-var-def:end/disp8
25345 }
25346
25347 {
25348 81 7/subop/compare %edx 0/imm32
25349 7e/jump-if-<= break/disp8
25350 (emit-indent *(ebp+8) *Curr-block-depth)
25351 (write-buffered *(ebp+8) "68/push 0/imm32\n")
25352
25353 81 5/subop/subtract %edx 4/imm32
25354
25355 eb/jump loop/disp8
25356 }
25357 $emit-subx-var-def:end:
25358
25359 5a/pop-to-edx
25360 59/pop-to-ecx
25361 58/pop-to-eax
25362
25363 89/<- %esp 5/r32/ebp
25364 5d/pop-to-ebp
25365 c3/return
25366
25367 emit-array-data-initialization:
25368
25369 55/push-ebp
25370 89/<- %ebp 4/r32/esp
25371
25372 (emit-indent *(ebp+8) *Curr-block-depth)
25373 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
25374 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
25375 (write-buffered *(ebp+8) ")\n")
25376 (emit-indent *(ebp+8) *Curr-block-depth)
25377 (write-buffered *(ebp+8) "68/push ")
25378 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
25379 (write-buffered *(ebp+8) "/imm32\n")
25380 $emit-array-data-initialization:end:
25381
25382 89/<- %esp 5/r32/ebp
25383 5d/pop-to-ebp
25384 c3/return
25385
25386 emit-subx-stmt:
25387
25388 55/push-ebp
25389 89/<- %ebp 4/r32/esp
25390
25391 50/push-eax
25392 51/push-ecx
25393
25394
25395 8b/-> *(ebp+0xc) 1/r32/ecx
25396 (lookup *(ecx+4) *(ecx+8))
25397 89/<- %ecx 0/r32/eax
25398
25399 {
25400
25401 (string-equal? %ecx "length")
25402 3d/compare-eax-and 0/imm32
25403 0f 84/jump-if-= break/disp32
25404 (translate-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25405 e9/jump $emit-subx-stmt:end/disp32
25406 }
25407
25408 {
25409
25410 (string-equal? %ecx "index")
25411 3d/compare-eax-and 0/imm32
25412 0f 84/jump-if-= break/disp32
25413 (translate-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25414 e9/jump $emit-subx-stmt:end/disp32
25415 }
25416
25417 {
25418
25419 (string-equal? %ecx "compute-offset")
25420 3d/compare-eax-and 0/imm32
25421 0f 84/jump-if-= break/disp32
25422 (translate-mu-compute-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25423 e9/jump $emit-subx-stmt:end/disp32
25424 }
25425
25426 {
25427
25428 (string-equal? %ecx "get")
25429 3d/compare-eax-and 0/imm32
25430 0f 84/jump-if-= break/disp32
25431 (translate-mu-get-stmt *(ebp+8) *(ebp+0xc))
25432 e9/jump $emit-subx-stmt:end/disp32
25433 }
25434
25435 {
25436
25437 (string-equal? %ecx "allocate")
25438 3d/compare-eax-and 0/imm32
25439 0f 84/jump-if-= break/disp32
25440 (translate-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25441 e9/jump $emit-subx-stmt:end/disp32
25442 }
25443
25444 {
25445
25446 (string-equal? %ecx "copy-object")
25447 3d/compare-eax-and 0/imm32
25448 0f 84/jump-if-= break/disp32
25449 (translate-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25450 e9/jump $emit-subx-stmt:end/disp32
25451 }
25452
25453 {
25454
25455 (string-equal? %ecx "populate")
25456 3d/compare-eax-and 0/imm32
25457 0f 84/jump-if-= break/disp32
25458 (translate-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25459 e9/jump $emit-subx-stmt:end/disp32
25460 }
25461
25462 {
25463
25464 (string-equal? %ecx "populate-stream")
25465 3d/compare-eax-and 0/imm32
25466 0f 84/jump-if-= break/disp32
25467 (translate-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25468 e9/jump $emit-subx-stmt:end/disp32
25469 }
25470
25471 {
25472
25473 (string-equal? %ecx "read-from-stream")
25474 3d/compare-eax-and 0/imm32
25475 0f 84/jump-if-= break/disp32
25476 (translate-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25477 e9/jump $emit-subx-stmt:end/disp32
25478 }
25479
25480 {
25481
25482 (string-equal? %ecx "write-to-stream")
25483 3d/compare-eax-and 0/imm32
25484 0f 84/jump-if-= break/disp32
25485 (translate-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25486 e9/jump $emit-subx-stmt:end/disp32
25487 }
25488
25489 {
25490 $emit-subx-stmt:check-for-primitive:
25491
25492 (find-matching-primitive *(ebp+0x10) *(ebp+0xc))
25493 3d/compare-eax-and 0/imm32
25494 74/jump-if-= break/disp8
25495 $emit-subx-stmt:primitive:
25496 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax)
25497 e9/jump $emit-subx-stmt:end/disp32
25498 }
25499
25500
25501 $emit-subx-stmt:call:
25502 (emit-call *(ebp+8) *(ebp+0xc))
25503 $emit-subx-stmt:end:
25504
25505 59/pop-to-ecx
25506 58/pop-to-eax
25507
25508 89/<- %esp 5/r32/ebp
25509 5d/pop-to-ebp
25510 c3/return
25511
25512 translate-mu-length-stmt:
25513
25514 55/push-ebp
25515 89/<- %ebp 4/r32/esp
25516
25517 50/push-eax
25518 51/push-ecx
25519 52/push-edx
25520 53/push-ebx
25521 56/push-esi
25522
25523 8b/-> *(ebp+0xc) 6/r32/esi
25524
25525 (lookup *(esi+0xc) *(esi+0x10))
25526 (lookup *eax *(eax+4))
25527 89/<- %ebx 0/r32/eax
25528
25529 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
25530 89/<- %ecx 0/r32/eax
25531
25532 (lookup *(esi+0x14) *(esi+0x18))
25533 (lookup *eax *(eax+4))
25534 (lookup *(eax+0x18) *(eax+0x1c))
25535 89/<- %edx 0/r32/eax
25536
25537 {
25538 81 7/subop/compare %ecx 1/imm32
25539 75/jump-if-!= break/disp8
25540 $translate-mu-length-stmt:size-1:
25541 (emit-save-size-to *(ebp+8) %ebx %edx)
25542 e9/jump $translate-mu-length-stmt:end/disp32
25543 }
25544
25545 {
25546 (power-of-2? %ecx *(ebp+0x10) *(ebp+0x14))
25547 3d/compare-eax-and 0/imm32/false
25548 74/jump-if-= break/disp8
25549 81 7/subop/compare %ecx 0xff/imm32
25550 7f/jump-if-> break/disp8
25551 $translate-mu-length-stmt:size-power-of-2:
25552 (emit-save-size-to *(ebp+8) %ebx %edx)
25553 (emit-divide-by-shift-right *(ebp+8) %edx %ecx)
25554 e9/jump $translate-mu-length-stmt:end/disp32
25555 }
25556
25557
25558 {
25559 $translate-mu-length-stmt:complex:
25560 (string-equal? %edx "eax")
25561 3d/compare-eax-and 0/imm32/false
25562 75/break-if-!= break/disp8
25563 (emit-indent *(ebp+8) *Curr-block-depth)
25564 (write-buffered *(ebp+8) "50/push-eax\n")
25565 }
25566 {
25567 (string-equal? %edx "ecx")
25568 3d/compare-eax-and 0/imm32/false
25569 75/break-if-!= break/disp8
25570 (emit-indent *(ebp+8) *Curr-block-depth)
25571 (write-buffered *(ebp+8) "51/push-ecx\n")
25572 }
25573 {
25574 (string-equal? %edx "edx")
25575 3d/compare-eax-and 0/imm32/false
25576 75/break-if-!= break/disp8
25577 (emit-indent *(ebp+8) *Curr-block-depth)
25578 (write-buffered *(ebp+8) "52/push-edx\n")
25579 }
25580
25581 (emit-save-size-to *(ebp+8) %ebx "eax")
25582 (emit-indent *(ebp+8) *Curr-block-depth)
25583 (write-buffered *(ebp+8) "31/xor %edx 2/r32/edx\n")
25584 (emit-indent *(ebp+8) *Curr-block-depth)
25585 (write-buffered *(ebp+8) "b9/copy-to-ecx ")
25586 (write-int32-hex-buffered *(ebp+8) %ecx)
25587 (write-buffered *(ebp+8) "/imm32\n")
25588 (emit-indent *(ebp+8) *Curr-block-depth)
25589 (write-buffered *(ebp+8) "f7 7/subop/idiv-eax-edx-by %ecx\n")
25590 {
25591 (string-equal? %edx "eax")
25592 3d/compare-eax-and 0/imm32/false
25593 75/break-if-!= break/disp8
25594 (emit-indent *(ebp+8) *Curr-block-depth)
25595 (write-buffered *(ebp+8) "89/<- %")
25596 (write-buffered *(ebp+8) %edx)
25597 (write-buffered *(ebp+8) " 0/r32/eax\n")
25598 }
25599
25600 {
25601 (string-equal? %edx "edx")
25602 3d/compare-eax-and 0/imm32/false
25603 75/break-if-!= break/disp8
25604 (emit-indent *(ebp+8) *Curr-block-depth)
25605 (write-buffered *(ebp+8) "5a/pop-to-edx\n")
25606 }
25607 {
25608 (string-equal? %edx "ecx")
25609 3d/compare-eax-and 0/imm32/false
25610 75/break-if-!= break/disp8
25611 (emit-indent *(ebp+8) *Curr-block-depth)
25612 (write-buffered *(ebp+8) "59/pop-to-ecx\n")
25613 }
25614 {
25615 (string-equal? %edx "eax")
25616 3d/compare-eax-and 0/imm32/false
25617 75/break-if-!= break/disp8
25618 (emit-indent *(ebp+8) *Curr-block-depth)
25619 (write-buffered *(ebp+8) "58/pop-to-eax\n")
25620 }
25621 $translate-mu-length-stmt:end:
25622
25623 5e/pop-to-esi
25624 5b/pop-to-ebx
25625 5a/pop-to-edx
25626 59/pop-to-ecx
25627 58/pop-to-eax
25628
25629 89/<- %esp 5/r32/ebp
25630 5d/pop-to-ebp
25631 c3/return
25632
25633 array-element-size:
25634
25635 55/push-ebp
25636 89/<- %ebp 4/r32/esp
25637
25638 (array-element-type-id *(ebp+8) *(ebp+0xc) *(ebp+0x10))
25639 (size-of-type-id-as-array-element %eax)
25640 $array-element-size:end:
25641
25642 89/<- %esp 5/r32/ebp
25643 5d/pop-to-ebp
25644 c3/return
25645
25646 array-element-type-id:
25647
25648
25649 55/push-ebp
25650 89/<- %ebp 4/r32/esp
25651
25652 8b/-> *(ebp+8) 0/r32/eax
25653
25654 (lookup *(eax+8) *(eax+0xc))
25655
25656 3d/compare-eax-with 0/imm32
25657 0f 84/jump-if-== $array-element-type-id:error0/disp32
25658
25659 81 7/subop/compare *eax 0/imm32/false
25660 0f 85/jump-if-!= $array-element-type-id:error1/disp32
25661
25662 {
25663 50/push-eax
25664 (lookup *(eax+4) *(eax+8))
25665 (is-simple-mu-type? %eax 2)
25666 3d/compare-eax-with 0/imm32/false
25667 58/pop-to-eax
25668 74/jump-if-= break/disp8
25669 $array-element-type-id:skip-addr:
25670 (lookup *(eax+0xc) *(eax+0x10))
25671 }
25672
25673 3d/compare-eax-with 0/imm32
25674 0f 84/jump-if-= $array-element-type-id:error2/disp32
25675
25676 81 7/subop/compare *eax 0/imm32/false
25677 0f 85/jump-if-!= $array-element-type-id:error2/disp32
25678
25679 {
25680 50/push-eax
25681 (lookup *(eax+4) *(eax+8))
25682 (is-simple-mu-type? %eax 3)
25683 3d/compare-eax-with 0/imm32/false
25684 58/pop-to-eax
25685 $array-element-type-id:no-array:
25686 0f 84/jump-if-= $array-element-type-id:error2/disp32
25687 }
25688 $array-element-type-id:skip-array:
25689
25690 (lookup *(eax+0xc) *(eax+0x10))
25691
25692 3d/compare-eax-with 0/imm32
25693 0f 84/jump-if-= $array-element-type-id:error2/disp32
25694
25695 81 7/subop/compare *eax 0/imm32/false
25696 0f 85/jump-if-!= $array-element-type-id:error2/disp32
25697
25698 (lookup *(eax+4) *(eax+8))
25699
25700
25701 {
25702 81 7/subop/compare *eax 0/imm32/false
25703 75/jump-if-!= break/disp8
25704 (lookup *(eax+4) *(eax+8))
25705 }
25706
25707 8b/-> *(eax+4) 0/r32/eax
25708 $array-element-type-id:end:
25709
25710 89/<- %esp 5/r32/ebp
25711 5d/pop-to-ebp
25712 c3/return
25713
25714 $array-element-type-id:error0:
25715 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
25716 50/push-eax
25717 8b/-> *(ebp+8) 0/r32/eax
25718 (lookup *eax *(eax+4))
25719 (write-buffered *(ebp+0xc) %eax)
25720 58/pop-to-eax
25721 (write-buffered *(ebp+0xc) "' has no type\n")
25722 (flush *(ebp+0xc))
25723 (stop *(ebp+0x10) 1)
25724
25725
25726 $array-element-type-id:error1:
25727 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
25728 50/push-eax
25729 8b/-> *(ebp+8) 0/r32/eax
25730 (lookup *eax *(eax+4))
25731 (write-buffered *(ebp+0xc) %eax)
25732 58/pop-to-eax
25733 (write-buffered *(ebp+0xc) "' has atomic type ")
25734 (write-int32-hex-buffered *(ebp+0xc) *(eax+4))
25735 (write-buffered *(ebp+0xc) Newline)
25736 (flush *(ebp+0xc))
25737 (stop *(ebp+0x10) 1)
25738
25739
25740 $array-element-type-id:error2:
25741 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
25742 50/push-eax
25743 8b/-> *(ebp+8) 0/r32/eax
25744 (lookup *eax *(eax+4))
25745 (write-buffered *(ebp+0xc) %eax)
25746 58/pop-to-eax
25747 (write-buffered *(ebp+0xc) "' has non-array type\n")
25748 (flush *(ebp+0xc))
25749 (stop *(ebp+0x10) 1)
25750
25751
25752 size-of-type-id-as-array-element:
25753
25754 55/push-ebp
25755 89/<- %ebp 4/r32/esp
25756
25757 8b/-> *(ebp+8) 0/r32/eax
25758
25759 3d/compare-eax-and 8/imm32/byte
25760 {
25761 75/jump-if-!= break/disp8
25762 b8/copy-to-eax 1/imm32
25763 eb/jump $size-of-type-id-as-array-element:end/disp8
25764 }
25765
25766 (size-of-type-id %eax)
25767 $size-of-type-id-as-array-element:end:
25768
25769 89/<- %esp 5/r32/ebp
25770 5d/pop-to-ebp
25771 c3/return
25772
25773 emit-save-size-to:
25774
25775 55/push-ebp
25776 89/<- %ebp 4/r32/esp
25777
25778 50/push-eax
25779 53/push-ebx
25780
25781 8b/-> *(ebp+0xc) 3/r32/ebx
25782 (emit-indent *(ebp+8) *Curr-block-depth)
25783 (write-buffered *(ebp+8) "8b/-> *")
25784
25785 {
25786 81 7/subop/compare *(ebx+0x18)) 0/imm32
25787 74/jump-if-= break/disp8
25788 $emit-save-size-to:emit-base-from-register:
25789 (lookup *(ebx+0x18) *(ebx+0x1c))
25790 (write-buffered *(ebp+8) %eax)
25791 eb/jump $emit-save-size-to:emit-output/disp8
25792 }
25793
25794 {
25795 81 7/subop/compare *(ebx+0x14)) 0/imm32
25796 74/jump-if-= break/disp8
25797 $emit-save-size-to:emit-base-from-stack:
25798 (write-buffered *(ebp+8) "(ebp+")
25799 (write-int32-hex-buffered *(ebp+8) *(ebx+0x14))
25800 (write-buffered *(ebp+8) ")")
25801 }
25802 $emit-save-size-to:emit-output:
25803 (write-buffered *(ebp+8) " ")
25804 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
25805 (write-int32-hex-buffered *(ebp+8) *eax)
25806 (write-buffered *(ebp+8) "/r32\n")
25807 $emit-save-size-to:end:
25808
25809 5b/pop-to-ebx
25810 58/pop-to-eax
25811
25812 89/<- %esp 5/r32/ebp
25813 5d/pop-to-ebp
25814 c3/return
25815
25816 emit-divide-by-shift-right:
25817
25818 55/push-ebp
25819 89/<- %ebp 4/r32/esp
25820
25821 50/push-eax
25822
25823 (emit-indent *(ebp+8) *Curr-block-depth)
25824 (write-buffered *(ebp+8) "c1/shift 5/subop/>> %")
25825 (write-buffered *(ebp+8) *(ebp+0xc))
25826 (write-buffered *(ebp+8) Space)
25827 (num-shift-rights *(ebp+0x10))
25828 (write-int32-hex-buffered *(ebp+8) %eax)
25829 (write-buffered *(ebp+8) "/imm8\n")
25830 $emit-divide-by-shift-right:end:
25831
25832 58/pop-to-eax
25833
25834 89/<- %esp 5/r32/ebp
25835 5d/pop-to-ebp
25836 c3/return
25837
25838 translate-mu-index-stmt:
25839
25840 55/push-ebp
25841 89/<- %ebp 4/r32/esp
25842
25843 51/push-ecx
25844
25845 8b/-> *(ebp+0xc) 1/r32/ecx
25846
25847 (lookup *(ecx+0xc) *(ecx+0x10))
25848 (lookup *eax *(eax+4))
25849 89/<- %ecx 0/r32/eax
25850
25851 {
25852 81 7/subop/compare *(ecx+0x18) 0/imm32
25853 74/jump-if-= break/disp8
25854
25855 (translate-mu-index-stmt-with-array-in-register *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
25856 eb/jump $translate-mu-index-stmt:end/disp8
25857 }
25858
25859 {
25860 81 7/subop/compare *(ecx+0x14) 0/imm32
25861 74/jump-if-= break/disp8
25862
25863 (translate-mu-index-stmt-with-array-on-stack *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
25864 eb/jump $translate-mu-index-stmt:end/disp8
25865 }
25866 $translate-mu-index-stmt:end:
25867
25868 59/pop-to-ecx
25869
25870 89/<- %esp 5/r32/ebp
25871 5d/pop-to-ebp
25872 c3/return
25873
25874 $translate-mu-index-stmt-with-array:error1:
25875 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input must either lie in a register or be a literal\n")
25876 (flush *(ebp+0x10))
25877 (stop *(ebp+0x14) 1)
25878
25879
25880 $translate-mu-index-stmt-with-array:error2:
25881 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input when in a register must be an int or offset\n")
25882 (flush *(ebp+0x10))
25883 (stop *(ebp+0x14) 1)
25884
25885
25886 translate-mu-index-stmt-with-array-in-register:
25887
25888 55/push-ebp
25889 89/<- %ebp 4/r32/esp
25890
25891 50/push-eax
25892 51/push-ecx
25893 52/push-edx
25894 53/push-ebx
25895
25896 (emit-indent *(ebp+8) *Curr-block-depth)
25897 (write-buffered *(ebp+8) "8d/copy-address *(")
25898
25899 $translate-mu-index-stmt-with-array-in-register:emit-base:
25900
25901 8b/-> *(ebp+0xc) 1/r32/ecx
25902
25903 (lookup *(ecx+0xc) *(ecx+0x10))
25904 (lookup *eax *(eax+4))
25905 89/<- %ebx 0/r32/eax
25906
25907 (lookup *(ebx+0x18) *(ebx+0x1c))
25908 (write-buffered *(ebp+8) %eax)
25909 (write-buffered *(ebp+8) " + ")
25910
25911 (lookup *(ecx+0xc) *(ecx+0x10))
25912 (lookup *(eax+8) *(eax+0xc))
25913 (lookup *eax *(eax+4))
25914 89/<- %edx 0/r32/eax
25915
25916 81 7/subop/compare *(edx+0x18) 0/imm32
25917 {
25918 0f 84/jump-if-= break/disp32
25919 $translate-mu-index-stmt-with-array-in-register:emit-register-index:
25920
25921 (lookup *(edx+8) *(edx+0xc))
25922 (is-simple-mu-type? %eax 1)
25923 3d/compare-eax-and 0/imm32/false
25924 {
25925 0f 84/jump-if-= break/disp32
25926 $translate-mu-index-stmt-with-array-in-register:emit-int-register-index:
25927
25928
25929 (lookup *(edx+0x18) *(edx+0x1c))
25930 (write-buffered *(ebp+8) %eax)
25931 (write-buffered *(ebp+8) "<<")
25932
25933
25934 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
25935 (num-shift-rights %eax)
25936 (write-int32-hex-buffered *(ebp+8) %eax)
25937 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
25938 }
25939
25940 (lookup *(edx+8) *(edx+0xc))
25941 81 7/subop/compare *eax 0/imm32/false
25942 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
25943
25944 (lookup *(eax+4) *(eax+8))
25945 (is-simple-mu-type? %eax 7)
25946 3d/compare-eax-and 0/imm32/false
25947 {
25948 0f 84/jump-if-= break/disp32
25949
25950 $translate-mu-index-stmt-with-array-in-register:emit-offset-register-index:
25951 (lookup *(edx+0x18) *(edx+0x1c))
25952 (write-buffered *(ebp+8) %eax)
25953 }
25954 $translate-mu-index-stmt-with-array-in-register:emit-register-index-done:
25955 (write-buffered *(ebp+8) " + 4) ")
25956 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
25957 }
25958
25959 (lookup *(edx+8) *(edx+0xc))
25960 (is-simple-mu-type? %eax 0)
25961 3d/compare-eax-and 0/imm32/false
25962 {
25963 0f 84/jump-if-= break/disp32
25964 $translate-mu-index-stmt-with-array-in-register:emit-literal-index:
25965
25966 (lookup *edx *(edx+4))
25967 (parse-hex-int %eax)
25968 89/<- %edx 0/r32/eax
25969
25970 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
25971 f7 4/subop/multiply-into-edx-eax %edx
25972
25973 05/add-to-eax 4/imm32
25974
25975
25976 (write-int32-hex-buffered *(ebp+8) %eax)
25977 (write-buffered *(ebp+8) ") ")
25978 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
25979 }
25980
25981 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
25982 $translate-mu-index-stmt-with-array-in-register:emit-output:
25983
25984 8b/-> *(ebp+0xc) 1/r32/ecx
25985 (lookup *(ecx+0x14) *(ecx+0x18))
25986 (lookup *eax *(eax+4))
25987 (lookup *(eax+0x18) *(eax+0x1c))
25988 (get Mu-registers %eax 0xc "Mu-registers")
25989 (write-int32-hex-buffered *(ebp+8) *eax)
25990 (write-buffered *(ebp+8) "/r32\n")
25991 $translate-mu-index-stmt-with-array-in-register:end:
25992
25993 5b/pop-to-ebx
25994 5a/pop-to-edx
25995 59/pop-to-ecx
25996 58/pop-to-eax
25997
25998 89/<- %esp 5/r32/ebp
25999 5d/pop-to-ebp
26000 c3/return
26001
26002 translate-mu-index-stmt-with-array-on-stack:
26003
26004 55/push-ebp
26005 89/<- %ebp 4/r32/esp
26006
26007 50/push-eax
26008 51/push-ecx
26009 52/push-edx
26010 53/push-ebx
26011
26012 (emit-indent *(ebp+8) *Curr-block-depth)
26013 (write-buffered *(ebp+8) "8d/copy-address *(ebp + ")
26014
26015 8b/-> *(ebp+0xc) 0/r32/eax
26016 (lookup *(eax+0xc) *(eax+0x10))
26017 89/<- %edx 0/r32/eax
26018
26019 (lookup *eax *(eax+4))
26020 89/<- %ecx 0/r32/eax
26021
26022 (lookup *(edx+8) *(edx+0xc))
26023
26024 (lookup *eax *(eax+4))
26025 89/<- %edx 0/r32/eax
26026
26027 81 7/subop/compare *(edx+0x18) 0/imm32
26028 {
26029 0f 84/jump-if-= break/disp32
26030 $translate-mu-index-stmt-with-array-on-stack:emit-register-index:
26031
26032 (lookup *(edx+8) *(edx+0xc))
26033 (is-simple-mu-type? %eax 1)
26034 3d/compare-eax-and 0/imm32/false
26035 {
26036 0f 84/jump-if-= break/disp32
26037 $translate-mu-index-stmt-with-array-on-stack:emit-int-register-index:
26038
26039
26040 (lookup *(edx+0x18) *(edx+0x1c))
26041 (write-buffered *(ebp+8) %eax)
26042 (write-buffered *(ebp+8) "<<")
26043
26044
26045 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
26046 (num-shift-rights %eax)
26047 (write-int32-hex-buffered *(ebp+8) %eax)
26048
26049 (write-buffered *(ebp+8) " + ")
26050
26051 8b/-> *(ecx+0x14) 0/r32/eax
26052 05/add-to-eax 4/imm32
26053 (write-int32-hex-buffered *(ebp+8) %eax)
26054 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
26055 }
26056
26057 (lookup *(edx+8) *(edx+0xc))
26058 81 7/subop/compare *eax 0/imm32/false
26059 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
26060
26061 (lookup *(eax+4) *(eax+8))
26062 (is-simple-mu-type? %eax 7)
26063 3d/compare-eax-and 0/imm32/false
26064 {
26065 0f 84/jump-if-= break/disp32
26066
26067 $translate-mu-index-stmt-with-array-on-stack:emit-offset-register-index:
26068 (lookup *(edx+0x18) *(edx+0x1c))
26069 (write-buffered *(ebp+8) %eax)
26070 }
26071 $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done:
26072 (write-buffered *(ebp+8) ") ")
26073 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
26074 }
26075
26076 (lookup *(edx+8) *(edx+0xc))
26077 (is-simple-mu-type? %eax 0)
26078 3d/compare-eax-and 0/imm32/false
26079 {
26080 0f 84/jump-if-= break/disp32
26081 $translate-mu-index-stmt-with-array-on-stack:emit-literal-index:
26082
26083 (lookup *edx *(edx+4))
26084 (parse-hex-int %eax)
26085 89/<- %edx 0/r32/eax
26086
26087 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
26088 f7 4/subop/multiply-into-edx-eax %edx
26089
26090 03/add *(ecx+0x14) 0/r32/eax
26091
26092 05/add-to-eax 4/imm32
26093
26094
26095 (write-int32-hex-buffered *(ebp+8) %eax)
26096 (write-buffered *(ebp+8) ") ")
26097 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
26098 }
26099
26100 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
26101 $translate-mu-index-stmt-with-array-on-stack:emit-output:
26102
26103 8b/-> *(ebp+0xc) 0/r32/eax
26104 (lookup *(eax+0x14) *(eax+0x18))
26105 (lookup *eax *(eax+4))
26106 (lookup *(eax+0x18) *(eax+0x1c))
26107 (get Mu-registers %eax 0xc "Mu-registers")
26108 (write-int32-hex-buffered *(ebp+8) *eax)
26109 (write-buffered *(ebp+8) "/r32\n")
26110 $translate-mu-index-stmt-with-array-on-stack:end:
26111
26112 5b/pop-to-ebx
26113 5a/pop-to-edx
26114 59/pop-to-ecx
26115 58/pop-to-eax
26116
26117 89/<- %esp 5/r32/ebp
26118 5d/pop-to-ebp
26119 c3/return
26120
26121 translate-mu-compute-index-stmt:
26122
26123 55/push-ebp
26124 89/<- %ebp 4/r32/esp
26125
26126 50/push-eax
26127 51/push-ecx
26128 52/push-edx
26129 53/push-ebx
26130
26131 (emit-indent *(ebp+8) *Curr-block-depth)
26132 (write-buffered *(ebp+8) "69/multiply")
26133
26134 8b/-> *(ebp+0xc) 1/r32/ecx
26135
26136 (lookup *(ecx+0xc) *(ecx+0x10))
26137 89/<- %ebx 0/r32/eax
26138 $translate-mu-compute-index-stmt:emit-index:
26139 (lookup *(ebx+8) *(ebx+0xc))
26140 (emit-subx-var-as-rm32 *(ebp+8) %eax)
26141 (write-buffered *(ebp+8) Space)
26142 $translate-mu-compute-index-stmt:emit-elem-size:
26143
26144 (lookup *ebx *(ebx+4))
26145 89/<- %ebx 0/r32/eax
26146
26147 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
26148 (write-int32-hex-buffered *(ebp+8) %eax)
26149 (write-buffered *(ebp+8) "/imm32 ")
26150 $translate-mu-compute-index-stmt:emit-output:
26151
26152 (lookup *(ecx+0x14) *(ecx+0x18))
26153 (lookup *eax *(eax+4))
26154 (lookup *(eax+0x18) *(eax+0x1c))
26155 (get Mu-registers %eax 0xc "Mu-registers")
26156 (write-int32-hex-buffered *(ebp+8) *eax)
26157 (write-buffered *(ebp+8) "/r32\n")
26158 $translate-mu-compute-index-stmt:end:
26159
26160 5b/pop-to-ebx
26161 5a/pop-to-edx
26162 59/pop-to-ecx
26163 58/pop-to-eax
26164
26165 89/<- %esp 5/r32/ebp
26166 5d/pop-to-ebp
26167 c3/return
26168
26169 translate-mu-get-stmt:
26170
26171 55/push-ebp
26172 89/<- %ebp 4/r32/esp
26173
26174 50/push-eax
26175 51/push-ecx
26176 52/push-edx
26177
26178 (emit-indent *(ebp+8) *Curr-block-depth)
26179 (write-buffered *(ebp+8) "8d/copy-address ")
26180
26181 8b/-> *(ebp+0xc) 1/r32/ecx
26182
26183 (mu-get-offset %ecx)
26184 89/<- %edx 0/r32/eax
26185
26186 (lookup *(ecx+0xc) *(ecx+0x10))
26187 (lookup *eax *(eax+4))
26188
26189 81 7/subop/compare *(eax+0x18) 0/imm32
26190 {
26191 0f 84/jump-if-= break/disp32
26192 $translate-mu-get-stmt:emit-register-input:
26193
26194 (write-buffered *(ebp+8) "*(")
26195 (lookup *(eax+0x18) *(eax+0x1c))
26196 (write-buffered *(ebp+8) %eax)
26197 (write-buffered *(ebp+8) " + ")
26198 (write-int32-hex-buffered *(ebp+8) %edx)
26199 (write-buffered *(ebp+8) ") ")
26200 e9/jump $translate-mu-get-stmt:emit-output/disp32
26201 }
26202
26203 {
26204 $translate-mu-get-stmt:emit-stack-input:
26205
26206 (write-buffered *(ebp+8) "*(ebp+")
26207 03/add *(eax+0x14) 2/r32/edx
26208 (write-int32-hex-buffered *(ebp+8) %edx)
26209 (write-buffered *(ebp+8) ") ")
26210 eb/jump $translate-mu-get-stmt:emit-output/disp8
26211 }
26212 $translate-mu-get-stmt:emit-output:
26213
26214 (lookup *(ecx+0x14) *(ecx+0x18))
26215 (lookup *eax *(eax+4))
26216
26217 (lookup *(eax+0x18) *(eax+0x1c))
26218 (get Mu-registers %eax 0xc "Mu-registers")
26219 (write-int32-hex-buffered *(ebp+8) *eax)
26220 (write-buffered *(ebp+8) "/r32\n")
26221 $translate-mu-get-stmt:end:
26222
26223 5a/pop-to-edx
26224 59/pop-to-ecx
26225 58/pop-to-eax
26226
26227 89/<- %esp 5/r32/ebp
26228 5d/pop-to-ebp
26229 c3/return
26230
26231 translate-mu-copy-object-stmt:
26232
26233 55/push-ebp
26234 89/<- %ebp 4/r32/esp
26235
26236 50/push-eax
26237
26238 (emit-indent *(ebp+8) *Curr-block-depth)
26239 (write-buffered *(ebp+8) "(copy-bytes")
26240
26241 8b/-> *(ebp+0xc) 0/r32/eax
26242
26243 (lookup *(eax+0xc) *(eax+0x10))
26244 (emit-subx-call-operand *(ebp+8) %eax)
26245 (lookup *(eax+8) *(eax+0xc))
26246 (emit-subx-call-operand *(ebp+8) %eax)
26247 (write-buffered *(ebp+8) Space)
26248 (addr-payload-size %eax *(ebp+0x10) *(ebp+0x14))
26249 (write-int32-hex-buffered *(ebp+8) %eax)
26250 (write-buffered *(ebp+8) ")\n")
26251 $translate-mu-copy-object-stmt:end:
26252
26253 58/pop-to-eax
26254
26255 89/<- %esp 5/r32/ebp
26256 5d/pop-to-ebp
26257 c3/return
26258
26259 translate-mu-allocate-stmt:
26260
26261 55/push-ebp
26262 89/<- %ebp 4/r32/esp
26263
26264 50/push-eax
26265 56/push-esi
26266 57/push-edi
26267
26268 8b/-> *(ebp+0xc) 6/r32/esi
26269
26270 (lookup *(esi+0xc) *(esi+0x10))
26271 89/<- %edi 0/r32/eax
26272
26273 (emit-indent *(ebp+8) *Curr-block-depth)
26274 (write-buffered *(ebp+8) "(allocate Heap ")
26275 (addr-handle-payload-size %edi *(ebp+0x10) *(ebp+0x14))
26276 (write-int32-hex-buffered *(ebp+8) %eax)
26277 (emit-subx-call-operand *(ebp+8) %edi)
26278 (write-buffered *(ebp+8) ")\n")
26279 $translate-mu-allocate-stmt:end:
26280
26281 5f/pop-to-edi
26282 5e/pop-to-esi
26283 58/pop-to-eax
26284
26285 89/<- %esp 5/r32/ebp
26286 5d/pop-to-ebp
26287 c3/return
26288
26289 addr-handle-payload-size:
26290
26291 55/push-ebp
26292 89/<- %ebp 4/r32/esp
26293
26294 8b/-> *(ebp+8) 0/r32/eax
26295 (lookup *eax *(eax+4))
26296 (lookup *(eax+8) *(eax+0xc))
26297
26298
26299
26300
26301 $addr-handle-payload-size:skip-addr:
26302 (lookup *(eax+0xc) *(eax+0x10))
26303
26304
26305
26306
26307 $addr-handle-payload-size:skip-handle:
26308 (lookup *(eax+0xc) *(eax+0x10))
26309
26310
26311 81 7/subop/compare *eax 0/imm32/false
26312 {
26313 75/jump-if-!= break/disp8
26314 (lookup *(eax+4) *(eax+8))
26315 }
26316
26317
26318 (size-of-type-id *(eax+4))
26319 $addr-handle-payload-size:end:
26320
26321 89/<- %esp 5/r32/ebp
26322 5d/pop-to-ebp
26323 c3/return
26324
26325 addr-payload-size:
26326
26327 55/push-ebp
26328 89/<- %ebp 4/r32/esp
26329
26330 8b/-> *(ebp+8) 0/r32/eax
26331 (lookup *eax *(eax+4))
26332 (lookup *(eax+8) *(eax+0xc))
26333
26334
26335
26336
26337 $addr-payload-size:skip-addr:
26338 (lookup *(eax+0xc) *(eax+0x10))
26339
26340
26341 81 7/subop/compare *eax 0/imm32/false
26342 {
26343 75/jump-if-!= break/disp8
26344 (lookup *(eax+4) *(eax+8))
26345 }
26346
26347
26348 (size-of-type-id *(eax+4))
26349 $addr-payload-size:end:
26350
26351 89/<- %esp 5/r32/ebp
26352 5d/pop-to-ebp
26353 c3/return
26354
26355 translate-mu-populate-stmt:
26356
26357 55/push-ebp
26358 89/<- %ebp 4/r32/esp
26359
26360 50/push-eax
26361 51/push-ecx
26362 56/push-esi
26363 57/push-edi
26364
26365 8b/-> *(ebp+0xc) 6/r32/esi
26366
26367 (lookup *(esi+0xc) *(esi+0x10))
26368 89/<- %edi 0/r32/eax
26369
26370 (lookup *(edi+8) *(edi+0xc))
26371 89/<- %ecx 0/r32/eax
26372
26373 (emit-indent *(ebp+8) *Curr-block-depth)
26374 (write-buffered *(ebp+8) "(allocate-array2 Heap ")
26375 (addr-handle-array-payload-size %edi *(ebp+0x10) *(ebp+0x14))
26376 (write-int32-hex-buffered *(ebp+8) %eax)
26377 (emit-subx-call-operand *(ebp+8) %ecx)
26378 (emit-subx-call-operand *(ebp+8) %edi)
26379 (write-buffered *(ebp+8) ")\n")
26380 $translate-mu-populate-stmt:end:
26381
26382 5f/pop-to-edi
26383 5e/pop-to-esi
26384 59/pop-to-ecx
26385 58/pop-to-eax
26386
26387 89/<- %esp 5/r32/ebp
26388 5d/pop-to-ebp
26389 c3/return
26390
26391 translate-mu-populate-stream-stmt:
26392
26393 55/push-ebp
26394 89/<- %ebp 4/r32/esp
26395
26396 50/push-eax
26397 51/push-ecx
26398 56/push-esi
26399 57/push-edi
26400
26401 8b/-> *(ebp+0xc) 6/r32/esi
26402
26403 (lookup *(esi+0xc) *(esi+0x10))
26404 89/<- %edi 0/r32/eax
26405
26406 (lookup *(edi+8) *(edi+0xc))
26407 89/<- %ecx 0/r32/eax
26408
26409 (emit-indent *(ebp+8) *Curr-block-depth)
26410 (write-buffered *(ebp+8) "(new-stream Heap ")
26411 (addr-handle-stream-payload-size %edi *(ebp+0x10) *(ebp+0x14))
26412 (write-int32-hex-buffered *(ebp+8) %eax)
26413 (emit-subx-call-operand *(ebp+8) %ecx)
26414 (emit-subx-call-operand *(ebp+8) %edi)
26415 (write-buffered *(ebp+8) ")\n")
26416 $translate-mu-populate-stream-stmt:end:
26417
26418 5f/pop-to-edi
26419 5e/pop-to-esi
26420 59/pop-to-ecx
26421 58/pop-to-eax
26422
26423 89/<- %esp 5/r32/ebp
26424 5d/pop-to-ebp
26425 c3/return
26426
26427 translate-mu-read-from-stream-stmt:
26428
26429 55/push-ebp
26430 89/<- %ebp 4/r32/esp
26431
26432 50/push-eax
26433 51/push-ecx
26434 56/push-esi
26435 57/push-edi
26436
26437 8b/-> *(ebp+0xc) 6/r32/esi
26438
26439 (lookup *(esi+0xc) *(esi+0x10))
26440 89/<- %ecx 0/r32/eax
26441
26442 (lookup *(ecx+8) *(ecx+0xc))
26443 89/<- %edi 0/r32/eax
26444
26445 (emit-indent *(ebp+8) *Curr-block-depth)
26446 (write-buffered *(ebp+8) "(read-from-stream")
26447 (emit-subx-call-operand *(ebp+8) %ecx)
26448 (emit-subx-call-operand *(ebp+8) %edi)
26449 (write-buffered *(ebp+8) Space)
26450 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
26451 (write-int32-hex-buffered *(ebp+8) %eax)
26452 (write-buffered *(ebp+8) ")\n")
26453 $translate-mu-read-from-stream-stmt:end:
26454
26455 5f/pop-to-edi
26456 5e/pop-to-esi
26457 59/pop-to-ecx
26458 58/pop-to-eax
26459
26460 89/<- %esp 5/r32/ebp
26461 5d/pop-to-ebp
26462 c3/return
26463
26464 translate-mu-write-to-stream-stmt:
26465
26466 55/push-ebp
26467 89/<- %ebp 4/r32/esp
26468
26469 50/push-eax
26470 51/push-ecx
26471 56/push-esi
26472 57/push-edi
26473
26474 8b/-> *(ebp+0xc) 6/r32/esi
26475
26476 (lookup *(esi+0xc) *(esi+0x10))
26477 89/<- %ecx 0/r32/eax
26478
26479 (lookup *(ecx+8) *(ecx+0xc))
26480 89/<- %edi 0/r32/eax
26481
26482 (emit-indent *(ebp+8) *Curr-block-depth)
26483 (write-buffered *(ebp+8) "(write-to-stream")
26484 (emit-subx-call-operand *(ebp+8) %ecx)
26485 (flush *(ebp+8))
26486 (emit-subx-call-operand *(ebp+8) %edi)
26487 (flush *(ebp+8))
26488 (write-buffered *(ebp+8) Space)
26489 (flush *(ebp+8))
26490 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
26491 (write-int32-hex-buffered *(ebp+8) %eax)
26492 (write-buffered *(ebp+8) ")\n")
26493 $translate-mu-write-to-stream-stmt:end:
26494
26495 5f/pop-to-edi
26496 5e/pop-to-esi
26497 59/pop-to-ecx
26498 58/pop-to-eax
26499
26500 89/<- %esp 5/r32/ebp
26501 5d/pop-to-ebp
26502 c3/return
26503
26504 addr-handle-array-payload-size:
26505
26506 55/push-ebp
26507 89/<- %ebp 4/r32/esp
26508
26509 8b/-> *(ebp+8) 0/r32/eax
26510 (lookup *eax *(eax+4))
26511 (lookup *(eax+8) *(eax+0xc))
26512
26513
26514
26515
26516 $addr-handle-array-payload-size:skip-addr:
26517 (lookup *(eax+0xc) *(eax+0x10))
26518
26519
26520
26521
26522 $addr-handle-array-payload-size:skip-handle:
26523 (lookup *(eax+0xc) *(eax+0x10))
26524
26525
26526
26527
26528 $addr-handle-array-payload-size:skip-array:
26529 (lookup *(eax+0xc) *(eax+0x10))
26530
26531
26532 81 7/subop/compare *eax 0/imm32/false
26533 {
26534 75/jump-if-!= break/disp8
26535 (lookup *(eax+4) *(eax+8))
26536 }
26537 $addr-handle-array-payload-size:compute-size:
26538
26539
26540 (size-of-type-id-as-array-element *(eax+4))
26541 $addr-handle-array-payload-size:end:
26542
26543 89/<- %esp 5/r32/ebp
26544 5d/pop-to-ebp
26545 c3/return
26546
26547 addr-handle-stream-payload-size:
26548
26549 55/push-ebp
26550 89/<- %ebp 4/r32/esp
26551
26552 8b/-> *(ebp+8) 0/r32/eax
26553 (lookup *eax *(eax+4))
26554 (lookup *(eax+8) *(eax+0xc))
26555
26556
26557
26558
26559 $addr-handle-stream-payload-size:skip-addr:
26560 (lookup *(eax+0xc) *(eax+0x10))
26561
26562
26563
26564
26565 $addr-handle-stream-payload-size:skip-handle:
26566 (lookup *(eax+0xc) *(eax+0x10))
26567
26568
26569
26570
26571 $addr-handle-stream-payload-size:skip-stream:
26572 (lookup *(eax+0xc) *(eax+0x10))
26573
26574
26575 81 7/subop/compare *eax 0/imm32/false
26576 {
26577 75/jump-if-!= break/disp8
26578 (lookup *(eax+4) *(eax+8))
26579 }
26580 $addr-handle-stream-payload-size:compute-size:
26581
26582
26583 (size-of-type-id-as-array-element *(eax+4))
26584 $addr-handle-stream-payload-size:end:
26585
26586 89/<- %esp 5/r32/ebp
26587 5d/pop-to-ebp
26588 c3/return
26589
26590 power-of-2?:
26591
26592
26593 55/push-ebp
26594 89/<- %ebp 4/r32/esp
26595
26596 8b/-> *(ebp+8) 0/r32/eax
26597
26598 3d/compare-eax-with 0/imm32
26599 0f 8c/jump-if-< $power-of-2?:abort/disp32
26600
26601 48/decrement-eax
26602
26603 23/and-> *(ebp+8) 0/r32/eax
26604
26605 3d/compare-eax-and 0/imm32
26606 0f 94/set-byte-if-= %al
26607 81 4/subop/and %eax 0xff/imm32
26608 $power-of-2?:end:
26609
26610 89/<- %esp 5/r32/ebp
26611 5d/pop-to-ebp
26612 c3/return
26613
26614 $power-of-2?:abort:
26615 (write-buffered *(ebp+0xc) "power-of-2?: negative number\n")
26616 (flush *(ebp+0xc))
26617 (stop *(ebp+0x10) 1)
26618
26619
26620 num-shift-rights:
26621
26622
26623 55/push-ebp
26624 89/<- %ebp 4/r32/esp
26625
26626 51/push-ecx
26627
26628 8b/-> *(ebp+8) 1/r32/ecx
26629
26630 b8/copy-to-eax 0/imm32
26631 {
26632
26633 81 7/subop/compare %ecx 1/imm32
26634 7e/jump-if-<= break/disp8
26635 40/increment-eax
26636 c1/shift 5/subop/arithmetic-right %ecx 1/imm8
26637 eb/jump loop/disp8
26638 }
26639 $num-shift-rights:end:
26640
26641 59/pop-to-ecx
26642
26643 89/<- %esp 5/r32/ebp
26644 5d/pop-to-ebp
26645 c3/return
26646
26647 mu-get-offset:
26648
26649 55/push-ebp
26650 89/<- %ebp 4/r32/esp
26651
26652 8b/-> *(ebp+8) 0/r32/eax
26653 (lookup *(eax+0xc) *(eax+0x10))
26654 (lookup *(eax+8) *(eax+0xc))
26655
26656 (lookup *eax *(eax+4))
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667 8b/-> *(eax+0x14) 0/r32/eax
26668
26669
26670
26671
26672 $emit-get-offset:end:
26673
26674 89/<- %esp 5/r32/ebp
26675 5d/pop-to-ebp
26676 c3/return
26677
26678 emit-subx-block:
26679
26680 55/push-ebp
26681 89/<- %ebp 4/r32/esp
26682
26683 50/push-eax
26684 51/push-ecx
26685 56/push-esi
26686
26687 8b/-> *(ebp+0xc) 6/r32/esi
26688
26689 (lookup *(esi+0xc) *(esi+0x10))
26690 8b/-> *Curr-block-depth 1/r32/ecx
26691 89/<- *(eax+0x10) 1/r32/ecx
26692
26693 (lookup *(esi+4) *(esi+8))
26694
26695 {
26696 $emit-subx-block:check-empty:
26697 3d/compare-eax-and 0/imm32
26698 0f 84/jump-if-= break/disp32
26699 (emit-indent *(ebp+8) *Curr-block-depth)
26700 (write-buffered *(ebp+8) "{\n")
26701
26702 (lookup *(esi+0xc) *(esi+0x10))
26703 89/<- %ecx 0/r32/eax
26704
26705 (lookup *ecx *(ecx+4))
26706 (write-buffered *(ebp+8) %eax)
26707 (write-buffered *(ebp+8) ":loop:\n")
26708 ff 0/subop/increment *Curr-block-depth
26709 (push *(ebp+0x10) *(esi+0xc))
26710 (push *(ebp+0x10) *(esi+0x10))
26711 (push *(ebp+0x10) 0)
26712
26713 (lookup *(esi+4) *(esi+8))
26714 (emit-subx-stmt-list *(ebp+8) %eax *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
26715 (pop *(ebp+0x10))
26716 (pop *(ebp+0x10))
26717 (pop *(ebp+0x10))
26718 ff 1/subop/decrement *Curr-block-depth
26719 (emit-indent *(ebp+8) *Curr-block-depth)
26720 (write-buffered *(ebp+8) "}\n")
26721 (lookup *ecx *(ecx+4))
26722 (write-buffered *(ebp+8) %eax)
26723 (write-buffered *(ebp+8) ":break:\n")
26724 }
26725 $emit-subx-block:end:
26726
26727 5e/pop-to-esi
26728 59/pop-to-ecx
26729 58/pop-to-eax
26730
26731 89/<- %esp 5/r32/ebp
26732 5d/pop-to-ebp
26733 c3/return
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784 == data
26785 Primitives:
26786
26787 _Primitive-increment-eax:
26788
26789 0x11/imm32/alloc-id:fake
26790 _string-increment/imm32/name
26791 0/imm32/no-inouts
26792 0/imm32/no-inouts
26793 0x11/imm32/alloc-id:fake
26794 Single-int-var-in-eax/imm32/outputs
26795 0x11/imm32/alloc-id:fake
26796 _string_40_increment_eax/imm32/subx-name
26797 0/imm32/no-rm32
26798 0/imm32/no-r32
26799 0/imm32/no-imm32
26800 0/imm32/no-imm8
26801 0/imm32/no-disp32
26802 0/imm32/no-xm32
26803 0/imm32/no-x32
26804 0x11/imm32/alloc-id:fake
26805 _Primitive-increment-ecx/imm32/next
26806 _Primitive-increment-ecx:
26807 0x11/imm32/alloc-id:fake:payload
26808
26809 0x11/imm32/alloc-id:fake
26810 _string-increment/imm32/name
26811 0/imm32/no-inouts
26812 0/imm32/no-inouts
26813 0x11/imm32/alloc-id:fake
26814 Single-int-var-in-ecx/imm32/outputs
26815 0x11/imm32/alloc-id:fake
26816 _string_41_increment_ecx/imm32/subx-name
26817 0/imm32/no-rm32
26818 0/imm32/no-r32
26819 0/imm32/no-imm32
26820 0/imm32/no-imm8
26821 0/imm32/no-disp32
26822 0/imm32/no-xm32
26823 0/imm32/no-x32
26824 0x11/imm32/alloc-id:fake
26825 _Primitive-increment-edx/imm32/next
26826 _Primitive-increment-edx:
26827 0x11/imm32/alloc-id:fake:payload
26828
26829 0x11/imm32/alloc-id:fake
26830 _string-increment/imm32/name
26831 0/imm32/no-inouts
26832 0/imm32/no-inouts
26833 0x11/imm32/alloc-id:fake
26834 Single-int-var-in-edx/imm32/outputs
26835 0x11/imm32/alloc-id:fake
26836 _string_42_increment_edx/imm32/subx-name
26837 0/imm32/no-rm32
26838 0/imm32/no-r32
26839 0/imm32/no-imm32
26840 0/imm32/no-imm8
26841 0/imm32/no-disp32
26842 0/imm32/no-xm32
26843 0/imm32/no-x32
26844 0x11/imm32/alloc-id:fake
26845 _Primitive-increment-ebx/imm32/next
26846 _Primitive-increment-ebx:
26847 0x11/imm32/alloc-id:fake:payload
26848
26849 0x11/imm32/alloc-id:fake
26850 _string-increment/imm32/name
26851 0/imm32/no-inouts
26852 0/imm32/no-inouts
26853 0x11/imm32/alloc-id:fake
26854 Single-int-var-in-ebx/imm32/outputs
26855 0x11/imm32/alloc-id:fake
26856 _string_43_increment_ebx/imm32/subx-name
26857 0/imm32/no-rm32
26858 0/imm32/no-r32
26859 0/imm32/no-imm32
26860 0/imm32/no-imm8
26861 0/imm32/no-disp32
26862 0/imm32/no-xm32
26863 0/imm32/no-x32
26864 0x11/imm32/alloc-id:fake
26865 _Primitive-increment-esi/imm32/next
26866 _Primitive-increment-esi:
26867 0x11/imm32/alloc-id:fake:payload
26868
26869 0x11/imm32/alloc-id:fake
26870 _string-increment/imm32/name
26871 0/imm32/no-inouts
26872 0/imm32/no-inouts
26873 0x11/imm32/alloc-id:fake
26874 Single-int-var-in-esi/imm32/outputs
26875 0x11/imm32/alloc-id:fake
26876 _string_46_increment_esi/imm32/subx-name
26877 0/imm32/no-rm32
26878 0/imm32/no-r32
26879 0/imm32/no-imm32
26880 0/imm32/no-imm8
26881 0/imm32/no-disp32
26882 0/imm32/no-xm32
26883 0/imm32/no-x32
26884 0x11/imm32/alloc-id:fake
26885 _Primitive-increment-edi/imm32/next
26886 _Primitive-increment-edi:
26887 0x11/imm32/alloc-id:fake:payload
26888
26889 0x11/imm32/alloc-id:fake
26890 _string-increment/imm32/name
26891 0/imm32/no-inouts
26892 0/imm32/no-inouts
26893 0x11/imm32/alloc-id:fake
26894 Single-int-var-in-edi/imm32/outputs
26895 0x11/imm32/alloc-id:fake
26896 _string_47_increment_edi/imm32/subx-name
26897 0/imm32/no-rm32
26898 0/imm32/no-r32
26899 0/imm32/no-imm32
26900 0/imm32/no-imm8
26901 0/imm32/no-disp32
26902 0/imm32/no-xm32
26903 0/imm32/no-x32
26904 0x11/imm32/alloc-id:fake
26905 _Primitive-decrement-eax/imm32/next
26906 _Primitive-decrement-eax:
26907 0x11/imm32/alloc-id:fake:payload
26908
26909 0x11/imm32/alloc-id:fake
26910 _string-decrement/imm32/name
26911 0/imm32/no-inouts
26912 0/imm32/no-inouts
26913 0x11/imm32/alloc-id:fake
26914 Single-int-var-in-eax/imm32/outputs
26915 0x11/imm32/alloc-id:fake
26916 _string_48_decrement_eax/imm32/subx-name
26917 0/imm32/no-rm32
26918 0/imm32/no-r32
26919 0/imm32/no-imm32
26920 0/imm32/no-imm8
26921 0/imm32/no-disp32
26922 0/imm32/no-xm32
26923 0/imm32/no-x32
26924 0x11/imm32/alloc-id:fake
26925 _Primitive-decrement-ecx/imm32/next
26926 _Primitive-decrement-ecx:
26927 0x11/imm32/alloc-id:fake:payload
26928
26929 0x11/imm32/alloc-id:fake
26930 _string-decrement/imm32/name
26931 0/imm32/no-inouts
26932 0/imm32/no-inouts
26933 0x11/imm32/alloc-id:fake
26934 Single-int-var-in-ecx/imm32/outputs
26935 0x11/imm32/alloc-id:fake
26936 _string_49_decrement_ecx/imm32/subx-name
26937 0/imm32/no-rm32
26938 0/imm32/no-r32
26939 0/imm32/no-imm32
26940 0/imm32/no-imm8
26941 0/imm32/no-disp32
26942 0/imm32/no-xm32
26943 0/imm32/no-x32
26944 0x11/imm32/alloc-id:fake
26945 _Primitive-decrement-edx/imm32/next
26946 _Primitive-decrement-edx:
26947 0x11/imm32/alloc-id:fake:payload
26948
26949 0x11/imm32/alloc-id:fake
26950 _string-decrement/imm32/name
26951 0/imm32/no-inouts
26952 0/imm32/no-inouts
26953 0x11/imm32/alloc-id:fake
26954 Single-int-var-in-edx/imm32/outputs
26955 0x11/imm32/alloc-id:fake
26956 _string_4a_decrement_edx/imm32/subx-name
26957 0/imm32/no-rm32
26958 0/imm32/no-r32
26959 0/imm32/no-imm32
26960 0/imm32/no-imm8
26961 0/imm32/no-disp32
26962 0/imm32/no-xm32
26963 0/imm32/no-x32
26964 0x11/imm32/alloc-id:fake
26965 _Primitive-decrement-ebx/imm32/next
26966 _Primitive-decrement-ebx:
26967 0x11/imm32/alloc-id:fake:payload
26968
26969 0x11/imm32/alloc-id:fake
26970 _string-decrement/imm32/name
26971 0/imm32/no-inouts
26972 0/imm32/no-inouts
26973 0x11/imm32/alloc-id:fake
26974 Single-int-var-in-ebx/imm32/outputs
26975 0x11/imm32/alloc-id:fake
26976 _string_4b_decrement_ebx/imm32/subx-name
26977 0/imm32/no-rm32
26978 0/imm32/no-r32
26979 0/imm32/no-imm32
26980 0/imm32/no-imm8
26981 0/imm32/no-disp32
26982 0/imm32/no-xm32
26983 0/imm32/no-x32
26984 0x11/imm32/alloc-id:fake
26985 _Primitive-decrement-esi/imm32/next
26986 _Primitive-decrement-esi:
26987 0x11/imm32/alloc-id:fake:payload
26988
26989 0x11/imm32/alloc-id:fake
26990 _string-decrement/imm32/name
26991 0/imm32/no-inouts
26992 0/imm32/no-inouts
26993 0x11/imm32/alloc-id:fake
26994 Single-int-var-in-esi/imm32/outputs
26995 0x11/imm32/alloc-id:fake
26996 _string_4e_decrement_esi/imm32/subx-name
26997 0/imm32/no-rm32
26998 0/imm32/no-r32
26999 0/imm32/no-imm32
27000 0/imm32/no-imm8
27001 0/imm32/no-disp32
27002 0/imm32/no-xm32
27003 0/imm32/no-x32
27004 0x11/imm32/alloc-id:fake
27005 _Primitive-decrement-edi/imm32/next
27006 _Primitive-decrement-edi:
27007 0x11/imm32/alloc-id:fake:payload
27008
27009 0x11/imm32/alloc-id:fake
27010 _string-decrement/imm32/name
27011 0/imm32/no-inouts
27012 0/imm32/no-inouts
27013 0x11/imm32/alloc-id:fake
27014 Single-int-var-in-edi/imm32/outputs
27015 0x11/imm32/alloc-id:fake
27016 _string_4f_decrement_edi/imm32/subx-name
27017 0/imm32/no-rm32
27018 0/imm32/no-r32
27019 0/imm32/no-imm32
27020 0/imm32/no-imm8
27021 0/imm32/no-disp32
27022 0/imm32/no-xm32
27023 0/imm32/no-x32
27024 0x11/imm32/alloc-id:fake
27025 _Primitive-increment-mem/imm32/next
27026 _Primitive-increment-mem:
27027 0x11/imm32/alloc-id:fake:payload
27028
27029 0x11/imm32/alloc-id:fake
27030 _string-increment/imm32/name
27031 0x11/imm32/alloc-id:fake
27032 Single-int-var-in-mem/imm32/inouts
27033 0/imm32/no-outputs
27034 0/imm32/no-outputs
27035 0x11/imm32/alloc-id:fake
27036 _string_ff_subop_increment/imm32/subx-name
27037 1/imm32/rm32-is-first-inout
27038 0/imm32/no-r32
27039 0/imm32/no-imm32
27040 0/imm32/no-imm8
27041 0/imm32/no-disp32
27042 0/imm32/no-xm32
27043 0/imm32/no-x32
27044 0x11/imm32/alloc-id:fake
27045 _Primitive-increment-reg/imm32/next
27046 _Primitive-increment-reg:
27047 0x11/imm32/alloc-id:fake:payload
27048
27049 0x11/imm32/alloc-id:fake
27050 _string-increment/imm32/name
27051 0/imm32/no-inouts
27052 0/imm32/no-inouts
27053 0x11/imm32/alloc-id:fake
27054 Single-int-var-in-some-register/imm32/outputs
27055 0x11/imm32/alloc-id:fake
27056 _string_ff_subop_increment/imm32/subx-name
27057 3/imm32/rm32-is-first-output
27058 0/imm32/no-r32
27059 0/imm32/no-imm32
27060 0/imm32/no-imm8
27061 0/imm32/no-disp32
27062 0/imm32/no-xm32
27063 0/imm32/no-x32
27064 0x11/imm32/alloc-id:fake
27065 _Primitive-decrement-mem/imm32/next
27066 _Primitive-decrement-mem:
27067 0x11/imm32/alloc-id:fake:payload
27068
27069 0x11/imm32/alloc-id:fake
27070 _string-decrement/imm32/name
27071 0x11/imm32/alloc-id:fake
27072 Single-int-var-in-mem/imm32/inouts
27073 0/imm32/no-outputs
27074 0/imm32/no-outputs
27075 0x11/imm32/alloc-id:fake
27076 _string_ff_subop_decrement/imm32/subx-name
27077 1/imm32/rm32-is-first-inout
27078 0/imm32/no-r32
27079 0/imm32/no-imm32
27080 0/imm32/no-imm8
27081 0/imm32/no-disp32
27082 0/imm32/no-xm32
27083 0/imm32/no-x32
27084 0x11/imm32/alloc-id:fake
27085 _Primitive-decrement-reg/imm32/next
27086 _Primitive-decrement-reg:
27087 0x11/imm32/alloc-id:fake:payload
27088
27089 0x11/imm32/alloc-id:fake
27090 _string-decrement/imm32/name
27091 0/imm32/no-inouts
27092 0/imm32/no-inouts
27093 0x11/imm32/alloc-id:fake
27094 Single-int-var-in-some-register/imm32/outputs
27095 0x11/imm32/alloc-id:fake
27096 _string_ff_subop_decrement/imm32/subx-name
27097 3/imm32/rm32-is-first-output
27098 0/imm32/no-r32
27099 0/imm32/no-imm32
27100 0/imm32/no-imm8
27101 0/imm32/no-disp32
27102 0/imm32/no-xm32
27103 0/imm32/no-x32
27104 0x11/imm32/alloc-id:fake
27105 _Primitive-add-to-eax/imm32/next
27106
27107 _Primitive-add-to-eax:
27108 0x11/imm32/alloc-id:fake:payload
27109
27110 0x11/imm32/alloc-id:fake
27111 _string-add/imm32/name
27112 0x11/imm32/alloc-id:fake
27113 Single-lit-var/imm32/inouts
27114 0x11/imm32/alloc-id:fake
27115 Single-int-var-in-eax/imm32/outputs
27116 0x11/imm32/alloc-id:fake
27117 _string_05_add_to_eax/imm32/subx-name
27118 0/imm32/no-rm32
27119 0/imm32/no-r32
27120 1/imm32/imm32-is-first-inout
27121 0/imm32/no-imm8
27122 0/imm32/no-disp32
27123 0/imm32/no-xm32
27124 0/imm32/no-x32
27125 0x11/imm32/alloc-id:fake
27126 _Primitive-add-reg-to-reg/imm32/next
27127 _Primitive-add-reg-to-reg:
27128 0x11/imm32/alloc-id:fake:payload
27129
27130 0x11/imm32/alloc-id:fake
27131 _string-add/imm32/name
27132 0x11/imm32/alloc-id:fake
27133 Single-int-var-in-some-register/imm32/inouts
27134 0x11/imm32/alloc-id:fake
27135 Single-int-var-in-some-register/imm32/outputs
27136 0x11/imm32/alloc-id:fake
27137 _string_01_add_to/imm32/subx-name
27138 3/imm32/rm32-is-first-output
27139 1/imm32/r32-is-first-inout
27140 0/imm32/no-imm32
27141 0/imm32/no-imm8
27142 0/imm32/no-disp32
27143 0/imm32/no-xm32
27144 0/imm32/no-x32
27145 0x11/imm32/alloc-id:fake
27146 _Primitive-add-reg-to-mem/imm32/next
27147 _Primitive-add-reg-to-mem:
27148 0x11/imm32/alloc-id:fake:payload
27149
27150 0x11/imm32/alloc-id:fake
27151 _string-add-to/imm32/name
27152 0x11/imm32/alloc-id:fake
27153 Two-args-int-stack-int-reg/imm32/inouts
27154 0/imm32/no-outputs
27155 0/imm32/no-outputs
27156 0x11/imm32/alloc-id:fake
27157 _string_01_add_to/imm32/subx-name
27158 1/imm32/rm32-is-first-inout
27159 2/imm32/r32-is-second-inout
27160 0/imm32/no-imm32
27161 0/imm32/no-imm8
27162 0/imm32/no-disp32
27163 0/imm32/no-xm32
27164 0/imm32/no-x32
27165 0x11/imm32/alloc-id:fake
27166 _Primitive-add-mem-to-reg/imm32/next
27167 _Primitive-add-mem-to-reg:
27168 0x11/imm32/alloc-id:fake:payload
27169
27170 0x11/imm32/alloc-id:fake
27171 _string-add/imm32/name
27172 0x11/imm32/alloc-id:fake
27173 Single-int-var-in-mem/imm32/inouts
27174 0x11/imm32/alloc-id:fake
27175 Single-int-var-in-some-register/imm32/outputs
27176 0x11/imm32/alloc-id:fake
27177 _string_03_add/imm32/subx-name
27178 1/imm32/rm32-is-first-inout
27179 3/imm32/r32-is-first-output
27180 0/imm32/no-imm32
27181 0/imm32/no-imm8
27182 0/imm32/no-disp32
27183 0/imm32/no-xm32
27184 0/imm32/no-x32
27185 0x11/imm32/alloc-id:fake
27186 _Primitive-add-lit-to-reg/imm32/next
27187 _Primitive-add-lit-to-reg:
27188 0x11/imm32/alloc-id:fake:payload
27189
27190 0x11/imm32/alloc-id:fake
27191 _string-add/imm32/name
27192 0x11/imm32/alloc-id:fake
27193 Single-lit-var/imm32/inouts
27194 0x11/imm32/alloc-id:fake
27195 Single-int-var-in-some-register/imm32/outputs
27196 0x11/imm32/alloc-id:fake
27197 _string_81_subop_add/imm32/subx-name
27198 3/imm32/rm32-is-first-output
27199 0/imm32/no-r32
27200 1/imm32/imm32-is-first-inout
27201 0/imm32/no-imm8
27202 0/imm32/no-disp32
27203 0/imm32/no-xm32
27204 0/imm32/no-x32
27205 0x11/imm32/alloc-id:fake
27206 _Primitive-add-lit-to-mem/imm32/next
27207 _Primitive-add-lit-to-mem:
27208 0x11/imm32/alloc-id:fake:payload
27209
27210 0x11/imm32/alloc-id:fake
27211 _string-add-to/imm32/name
27212 0x11/imm32/alloc-id:fake
27213 Int-var-and-literal/imm32/inouts
27214 0/imm32/no-outputs
27215 0/imm32/no-outputs
27216 0x11/imm32/alloc-id:fake
27217 _string_81_subop_add/imm32/subx-name
27218 1/imm32/rm32-is-first-inout
27219 0/imm32/no-r32
27220 2/imm32/imm32-is-second-inout
27221 0/imm32/no-imm8
27222 0/imm32/no-disp32
27223 0/imm32/no-xm32
27224 0/imm32/no-x32
27225 0x11/imm32/alloc-id:fake
27226 _Primitive-subtract-from-eax/imm32/next
27227
27228 _Primitive-subtract-from-eax:
27229 0x11/imm32/alloc-id:fake:payload
27230
27231 0x11/imm32/alloc-id:fake
27232 _string-subtract/imm32/name
27233 0x11/imm32/alloc-id:fake
27234 Single-lit-var/imm32/inouts
27235 0x11/imm32/alloc-id:fake
27236 Single-int-var-in-eax/imm32/outputs
27237 0x11/imm32/alloc-id:fake
27238 _string_2d_subtract_from_eax/imm32/subx-name
27239 0/imm32/no-rm32
27240 0/imm32/no-r32
27241 1/imm32/imm32-is-first-inout
27242 0/imm32/no-imm8
27243 0/imm32/no-disp32
27244 0/imm32/no-xm32
27245 0/imm32/no-x32
27246 0x11/imm32/alloc-id:fake
27247 _Primitive-subtract-reg-from-reg/imm32/next
27248 _Primitive-subtract-reg-from-reg:
27249 0x11/imm32/alloc-id:fake:payload
27250
27251 0x11/imm32/alloc-id:fake
27252 _string-subtract/imm32/name
27253 0x11/imm32/alloc-id:fake
27254 Single-int-var-in-some-register/imm32/inouts
27255 0x11/imm32/alloc-id:fake
27256 Single-int-var-in-some-register/imm32/outputs
27257 0x11/imm32/alloc-id:fake
27258 _string_29_subtract_from/imm32/subx-name
27259 3/imm32/rm32-is-first-output
27260 1/imm32/r32-is-first-inout
27261 0/imm32/no-imm32
27262 0/imm32/no-imm8
27263 0/imm32/no-disp32
27264 0/imm32/no-xm32
27265 0/imm32/no-x32
27266 0x11/imm32/alloc-id:fake
27267 _Primitive-subtract-reg-from-mem/imm32/next
27268 _Primitive-subtract-reg-from-mem:
27269 0x11/imm32/alloc-id:fake:payload
27270
27271 0x11/imm32/alloc-id:fake
27272 _string-subtract-from/imm32/name
27273 0x11/imm32/alloc-id:fake
27274 Two-args-int-stack-int-reg/imm32/inouts
27275 0/imm32/no-outputs
27276 0/imm32/no-outputs
27277 0x11/imm32/alloc-id:fake
27278 _string_29_subtract_from/imm32/subx-name
27279 1/imm32/rm32-is-first-inout
27280 2/imm32/r32-is-second-inout
27281 0/imm32/no-imm32
27282 0/imm32/no-imm8
27283 0/imm32/no-disp32
27284 0/imm32/no-xm32
27285 0/imm32/no-x32
27286 0x11/imm32/alloc-id:fake
27287 _Primitive-subtract-mem-from-reg/imm32/next
27288 _Primitive-subtract-mem-from-reg:
27289 0x11/imm32/alloc-id:fake:payload
27290
27291 0x11/imm32/alloc-id:fake
27292 _string-subtract/imm32/name
27293 0x11/imm32/alloc-id:fake
27294 Single-int-var-in-mem/imm32/inouts
27295 0x11/imm32/alloc-id:fake
27296 Single-int-var-in-some-register/imm32/outputs
27297 0x11/imm32/alloc-id:fake
27298 _string_2b_subtract/imm32/subx-name
27299 1/imm32/rm32-is-first-inout
27300 3/imm32/r32-is-first-output
27301 0/imm32/no-imm32
27302 0/imm32/no-imm8
27303 0/imm32/no-disp32
27304 0/imm32/no-xm32
27305 0/imm32/no-x32
27306 0x11/imm32/alloc-id:fake
27307 _Primitive-subtract-lit-from-reg/imm32/next
27308 _Primitive-subtract-lit-from-reg:
27309 0x11/imm32/alloc-id:fake:payload
27310
27311 0x11/imm32/alloc-id:fake
27312 _string-subtract/imm32/name
27313 0x11/imm32/alloc-id:fake
27314 Single-lit-var/imm32/inouts
27315 0x11/imm32/alloc-id:fake
27316 Single-int-var-in-some-register/imm32/outputs
27317 0x11/imm32/alloc-id:fake
27318 _string_81_subop_subtract/imm32/subx-name
27319 3/imm32/rm32-is-first-output
27320 0/imm32/no-r32
27321 1/imm32/imm32-is-first-inout
27322 0/imm32/no-imm8
27323 0/imm32/no-disp32
27324 0/imm32/no-xm32
27325 0/imm32/no-x32
27326 0x11/imm32/alloc-id:fake
27327 _Primitive-subtract-lit-from-mem/imm32/next
27328 _Primitive-subtract-lit-from-mem:
27329 0x11/imm32/alloc-id:fake:payload
27330
27331 0x11/imm32/alloc-id:fake
27332 _string-subtract-from/imm32/name
27333 0x11/imm32/alloc-id:fake
27334 Int-var-and-literal/imm32/inouts
27335 0/imm32/no-outputs
27336 0/imm32/no-outputs
27337 0x11/imm32/alloc-id:fake
27338 _string_81_subop_subtract/imm32/subx-name
27339 1/imm32/rm32-is-first-inout
27340 0/imm32/no-r32
27341 2/imm32/imm32-is-second-inout
27342 0/imm32/no-imm8
27343 0/imm32/no-disp32
27344 0/imm32/no-xm32
27345 0/imm32/no-x32
27346 0x11/imm32/alloc-id:fake
27347 _Primitive-and-with-eax/imm32/next
27348
27349 _Primitive-and-with-eax:
27350 0x11/imm32/alloc-id:fake:payload
27351
27352 0x11/imm32/alloc-id:fake
27353 _string-and/imm32/name
27354 0x11/imm32/alloc-id:fake
27355 Single-lit-var/imm32/inouts
27356 0x11/imm32/alloc-id:fake
27357 Single-int-var-in-eax/imm32/outputs
27358 0x11/imm32/alloc-id:fake
27359 _string_25_and_with_eax/imm32/subx-name
27360 0/imm32/no-rm32
27361 0/imm32/no-r32
27362 1/imm32/imm32-is-first-inout
27363 0/imm32/no-imm8
27364 0/imm32/no-disp32
27365 0/imm32/no-xm32
27366 0/imm32/no-x32
27367 0x11/imm32/alloc-id:fake
27368 _Primitive-and-reg-with-reg/imm32/next
27369 _Primitive-and-reg-with-reg:
27370 0x11/imm32/alloc-id:fake:payload
27371
27372 0x11/imm32/alloc-id:fake
27373 _string-and/imm32/name
27374 0x11/imm32/alloc-id:fake
27375 Single-int-var-in-some-register/imm32/inouts
27376 0x11/imm32/alloc-id:fake
27377 Single-int-var-in-some-register/imm32/outputs
27378 0x11/imm32/alloc-id:fake
27379 _string_21_and_with/imm32/subx-name
27380 3/imm32/rm32-is-first-output
27381 1/imm32/r32-is-first-inout
27382 0/imm32/no-imm32
27383 0/imm32/no-imm8
27384 0/imm32/no-disp32
27385 0/imm32/no-xm32
27386 0/imm32/no-x32
27387 0x11/imm32/alloc-id:fake
27388 _Primitive-and-reg-with-mem/imm32/next
27389 _Primitive-and-reg-with-mem:
27390 0x11/imm32/alloc-id:fake:payload
27391
27392 0x11/imm32/alloc-id:fake
27393 _string-and-with/imm32/name
27394 0x11/imm32/alloc-id:fake
27395 Two-args-int-stack-int-reg/imm32/inouts
27396 0/imm32/no-outputs
27397 0/imm32/no-outputs
27398 0x11/imm32/alloc-id:fake
27399 _string_21_and_with/imm32/subx-name
27400 1/imm32/rm32-is-first-inout
27401 2/imm32/r32-is-second-inout
27402 0/imm32/no-imm32
27403 0/imm32/no-imm8
27404 0/imm32/no-disp32
27405 0/imm32/no-xm32
27406 0/imm32/no-x32
27407 0x11/imm32/alloc-id:fake
27408 _Primitive-and-mem-with-reg/imm32/next
27409 _Primitive-and-mem-with-reg:
27410 0x11/imm32/alloc-id:fake:payload
27411
27412 0x11/imm32/alloc-id:fake
27413 _string-and/imm32/name
27414 0x11/imm32/alloc-id:fake
27415 Single-int-var-in-mem/imm32/inouts
27416 0x11/imm32/alloc-id:fake
27417 Single-int-var-in-some-register/imm32/outputs
27418 0x11/imm32/alloc-id:fake
27419 _string_23_and/imm32/subx-name
27420 1/imm32/rm32-is-first-inout
27421 3/imm32/r32-is-first-output
27422 0/imm32/no-imm32
27423 0/imm32/no-imm8
27424 0/imm32/no-disp32
27425 0/imm32/no-xm32
27426 0/imm32/no-x32
27427 0x11/imm32/alloc-id:fake
27428 _Primitive-and-lit-with-reg/imm32/next
27429 _Primitive-and-lit-with-reg:
27430 0x11/imm32/alloc-id:fake:payload
27431
27432 0x11/imm32/alloc-id:fake
27433 _string-and/imm32/name
27434 0x11/imm32/alloc-id:fake
27435 Single-lit-var/imm32/inouts
27436 0x11/imm32/alloc-id:fake
27437 Single-int-var-in-some-register/imm32/outputs
27438 0x11/imm32/alloc-id:fake
27439 _string_81_subop_and/imm32/subx-name
27440 3/imm32/rm32-is-first-output
27441 0/imm32/no-r32
27442 1/imm32/imm32-is-first-inout
27443 0/imm32/no-imm8
27444 0/imm32/no-disp32
27445 0/imm32/no-xm32
27446 0/imm32/no-x32
27447 0x11/imm32/alloc-id:fake
27448 _Primitive-and-lit-with-mem/imm32/next
27449 _Primitive-and-lit-with-mem:
27450 0x11/imm32/alloc-id:fake:payload
27451
27452 0x11/imm32/alloc-id:fake
27453 _string-and-with/imm32/name
27454 0x11/imm32/alloc-id:fake
27455 Int-var-and-literal/imm32/inouts
27456 0/imm32/no-outputs
27457 0/imm32/no-outputs
27458 0x11/imm32/alloc-id:fake
27459 _string_81_subop_and/imm32/subx-name
27460 1/imm32/rm32-is-first-inout
27461 0/imm32/no-r32
27462 2/imm32/imm32-is-second-inout
27463 0/imm32/no-imm8
27464 0/imm32/no-disp32
27465 0/imm32/no-xm32
27466 0/imm32/no-x32
27467 0x11/imm32/alloc-id:fake
27468 _Primitive-or-with-eax/imm32/next
27469
27470 _Primitive-or-with-eax:
27471 0x11/imm32/alloc-id:fake:payload
27472
27473 0x11/imm32/alloc-id:fake
27474 _string-or/imm32/name
27475 0x11/imm32/alloc-id:fake
27476 Single-lit-var/imm32/inouts
27477 0x11/imm32/alloc-id:fake
27478 Single-int-var-in-eax/imm32/outputs
27479 0x11/imm32/alloc-id:fake
27480 _string_0d_or_with_eax/imm32/subx-name
27481 0/imm32/no-rm32
27482 0/imm32/no-r32
27483 1/imm32/imm32-is-first-inout
27484 0/imm32/no-imm8
27485 0/imm32/no-disp32
27486 0/imm32/no-xm32
27487 0/imm32/no-x32
27488 0x11/imm32/alloc-id:fake
27489 _Primitive-or-reg-with-reg/imm32/next
27490 _Primitive-or-reg-with-reg:
27491 0x11/imm32/alloc-id:fake:payload
27492
27493 0x11/imm32/alloc-id:fake
27494 _string-or/imm32/name
27495 0x11/imm32/alloc-id:fake
27496 Single-int-var-in-some-register/imm32/inouts
27497 0x11/imm32/alloc-id:fake
27498 Single-int-var-in-some-register/imm32/outputs
27499 0x11/imm32/alloc-id:fake
27500 _string_09_or_with/imm32/subx-name
27501 3/imm32/rm32-is-first-output
27502 1/imm32/r32-is-first-inout
27503 0/imm32/no-imm32
27504 0/imm32/no-imm8
27505 0/imm32/no-disp32
27506 0/imm32/no-xm32
27507 0/imm32/no-x32
27508 0x11/imm32/alloc-id:fake
27509 _Primitive-or-reg-with-mem/imm32/next
27510 _Primitive-or-reg-with-mem:
27511 0x11/imm32/alloc-id:fake:payload
27512
27513 0x11/imm32/alloc-id:fake
27514 _string-or-with/imm32/name
27515 0x11/imm32/alloc-id:fake
27516 Two-args-int-stack-int-reg/imm32/inouts
27517 0/imm32/no-outputs
27518 0/imm32/no-outputs
27519 0x11/imm32/alloc-id:fake
27520 _string_09_or_with/imm32/subx-name
27521 1/imm32/rm32-is-first-inout
27522 2/imm32/r32-is-second-inout
27523 0/imm32/no-imm32
27524 0/imm32/no-imm8
27525 0/imm32/no-disp32
27526 0/imm32/no-xm32
27527 0/imm32/no-x32
27528 0x11/imm32/alloc-id:fake
27529 _Primitive-or-mem-with-reg/imm32/next
27530 _Primitive-or-mem-with-reg:
27531 0x11/imm32/alloc-id:fake:payload
27532
27533 0x11/imm32/alloc-id:fake
27534 _string-or/imm32/name
27535 0x11/imm32/alloc-id:fake
27536 Single-int-var-in-mem/imm32/inouts
27537 0x11/imm32/alloc-id:fake
27538 Single-int-var-in-some-register/imm32/outputs
27539 0x11/imm32/alloc-id:fake
27540 _string_0b_or/imm32/subx-name
27541 1/imm32/rm32-is-first-inout
27542 3/imm32/r32-is-first-output
27543 0/imm32/no-imm32
27544 0/imm32/no-imm8
27545 0/imm32/no-disp32
27546 0/imm32/no-xm32
27547 0/imm32/no-x32
27548 0x11/imm32/alloc-id:fake
27549 _Primitive-or-lit-with-reg/imm32/next
27550 _Primitive-or-lit-with-reg:
27551 0x11/imm32/alloc-id:fake:payload
27552
27553 0x11/imm32/alloc-id:fake
27554 _string-or/imm32/name
27555 0x11/imm32/alloc-id:fake
27556 Single-lit-var/imm32/inouts
27557 0x11/imm32/alloc-id:fake
27558 Single-int-var-in-some-register/imm32/outputs
27559 0x11/imm32/alloc-id:fake
27560 _string_81_subop_or/imm32/subx-name
27561 3/imm32/rm32-is-first-output
27562 0/imm32/no-r32
27563 1/imm32/imm32-is-first-inout
27564 0/imm32/no-imm8
27565 0/imm32/no-disp32
27566 0/imm32/no-xm32
27567 0/imm32/no-x32
27568 0x11/imm32/alloc-id:fake
27569 _Primitive-or-lit-with-mem/imm32/next
27570 _Primitive-or-lit-with-mem:
27571 0x11/imm32/alloc-id:fake:payload
27572
27573 0x11/imm32/alloc-id:fake
27574 _string-or-with/imm32/name
27575 0x11/imm32/alloc-id:fake
27576 Int-var-and-literal/imm32/inouts
27577 0/imm32/no-outputs
27578 0/imm32/no-outputs
27579 0x11/imm32/alloc-id:fake
27580 _string_81_subop_or/imm32/subx-name
27581 1/imm32/rm32-is-first-inout
27582 0/imm32/no-r32
27583 2/imm32/imm32-is-second-inout
27584 0/imm32/no-imm8
27585 0/imm32/no-disp32
27586 0/imm32/no-xm32
27587 0/imm32/no-x32
27588 0x11/imm32/alloc-id:fake
27589 _Primitive-xor-with-eax/imm32/next
27590
27591 _Primitive-xor-with-eax:
27592 0x11/imm32/alloc-id:fake:payload
27593
27594 0x11/imm32/alloc-id:fake
27595 _string-xor/imm32/name
27596 0x11/imm32/alloc-id:fake
27597 Single-lit-var/imm32/inouts
27598 0x11/imm32/alloc-id:fake
27599 Single-int-var-in-eax/imm32/outputs
27600 0x11/imm32/alloc-id:fake
27601 _string_35_xor_with_eax/imm32/subx-name
27602 0/imm32/no-rm32
27603 0/imm32/no-r32
27604 1/imm32/imm32-is-first-inout
27605 0/imm32/no-imm8
27606 0/imm32/no-disp32
27607 0/imm32/no-xm32
27608 0/imm32/no-x32
27609 0x11/imm32/alloc-id:fake
27610 _Primitive-xor-reg-with-reg/imm32/next
27611 _Primitive-xor-reg-with-reg:
27612 0x11/imm32/alloc-id:fake:payload
27613
27614 0x11/imm32/alloc-id:fake
27615 _string-xor/imm32/name
27616 0x11/imm32/alloc-id:fake
27617 Single-int-var-in-some-register/imm32/inouts
27618 0x11/imm32/alloc-id:fake
27619 Single-int-var-in-some-register/imm32/outputs
27620 0x11/imm32/alloc-id:fake
27621 _string_31_xor_with/imm32/subx-name
27622 3/imm32/rm32-is-first-output
27623 1/imm32/r32-is-first-inout
27624 0/imm32/no-imm32
27625 0/imm32/no-imm8
27626 0/imm32/no-disp32
27627 0/imm32/no-xm32
27628 0/imm32/no-x32
27629 0x11/imm32/alloc-id:fake
27630 _Primitive-xor-reg-with-mem/imm32/next
27631 _Primitive-xor-reg-with-mem:
27632 0x11/imm32/alloc-id:fake:payload
27633
27634 0x11/imm32/alloc-id:fake
27635 _string-xor-with/imm32/name
27636 0x11/imm32/alloc-id:fake
27637 Two-args-int-stack-int-reg/imm32/inouts
27638 0/imm32/no-outputs
27639 0/imm32/no-outputs
27640 0x11/imm32/alloc-id:fake
27641 _string_31_xor_with/imm32/subx-name
27642 1/imm32/rm32-is-first-inout
27643 2/imm32/r32-is-second-inout
27644 0/imm32/no-imm32
27645 0/imm32/no-imm8
27646 0/imm32/no-disp32
27647 0/imm32/no-xm32
27648 0/imm32/no-x32
27649 0x11/imm32/alloc-id:fake
27650 _Primitive-xor-mem-with-reg/imm32/next
27651 _Primitive-xor-mem-with-reg:
27652 0x11/imm32/alloc-id:fake:payload
27653
27654 0x11/imm32/alloc-id:fake
27655 _string-xor/imm32/name
27656 0x11/imm32/alloc-id:fake
27657 Single-int-var-in-mem/imm32/inouts
27658 0x11/imm32/alloc-id:fake
27659 Single-int-var-in-some-register/imm32/outputs
27660 0x11/imm32/alloc-id:fake
27661 _string_33_xor/imm32/subx-name
27662 1/imm32/rm32-is-first-inout
27663 3/imm32/r32-is-first-output
27664 0/imm32/no-imm32
27665 0/imm32/no-imm8
27666 0/imm32/no-disp32
27667 0/imm32/no-xm32
27668 0/imm32/no-x32
27669 0x11/imm32/alloc-id:fake
27670 _Primitive-xor-lit-with-reg/imm32/next
27671 _Primitive-xor-lit-with-reg:
27672 0x11/imm32/alloc-id:fake:payload
27673
27674 0x11/imm32/alloc-id:fake
27675 _string-xor/imm32/name
27676 0x11/imm32/alloc-id:fake
27677 Single-lit-var/imm32/inouts
27678 0x11/imm32/alloc-id:fake
27679 Single-int-var-in-some-register/imm32/outputs
27680 0x11/imm32/alloc-id:fake
27681 _string_81_subop_xor/imm32/subx-name
27682 3/imm32/rm32-is-first-output
27683 0/imm32/no-r32
27684 1/imm32/imm32-is-first-inout
27685 0/imm32/no-imm8
27686 0/imm32/no-disp32
27687 0/imm32/no-xm32
27688 0/imm32/no-x32
27689 0x11/imm32/alloc-id:fake
27690 _Primitive-xor-lit-with-mem/imm32/next
27691 _Primitive-xor-lit-with-mem:
27692 0x11/imm32/alloc-id:fake:payload
27693
27694 0x11/imm32/alloc-id:fake
27695 _string-xor-with/imm32/name
27696 0x11/imm32/alloc-id:fake
27697 Int-var-and-literal/imm32/inouts
27698 0/imm32/no-outputs
27699 0/imm32/no-outputs
27700 0x11/imm32/alloc-id:fake
27701 _string_81_subop_xor/imm32/subx-name
27702 1/imm32/rm32-is-first-inout
27703 0/imm32/no-r32
27704 2/imm32/imm32-is-second-inout
27705 0/imm32/no-imm8
27706 0/imm32/no-disp32
27707 0/imm32/no-xm32
27708 0/imm32/no-x32
27709 0x11/imm32/alloc-id:fake
27710 _Primitive-shift-reg-left-by-lit/imm32/next
27711 _Primitive-shift-reg-left-by-lit:
27712 0x11/imm32/alloc-id:fake:payload
27713
27714 0x11/imm32/alloc-id:fake
27715 _string-shift-left/imm32/name
27716 0x11/imm32/alloc-id:fake
27717 Single-lit-var/imm32/inouts
27718 0x11/imm32/alloc-id:fake
27719 Single-int-var-in-some-register/imm32/outputs
27720 0x11/imm32/alloc-id:fake
27721 _string_c1_subop_shift_left/imm32/subx-name
27722 3/imm32/rm32-is-first-output
27723 0/imm32/no-r32
27724 0/imm32/no-imm32
27725 1/imm32/imm8-is-first-inout
27726 0/imm32/no-disp32
27727 0/imm32/no-xm32
27728 0/imm32/no-x32
27729 0x11/imm32/alloc-id:fake
27730 _Primitive-shift-reg-right-by-lit/imm32/next
27731 _Primitive-shift-reg-right-by-lit:
27732 0x11/imm32/alloc-id:fake:payload
27733
27734 0x11/imm32/alloc-id:fake
27735 _string-shift-right/imm32/name
27736 0x11/imm32/alloc-id:fake
27737 Single-lit-var/imm32/inouts
27738 0x11/imm32/alloc-id:fake
27739 Single-int-var-in-some-register/imm32/outputs
27740 0x11/imm32/alloc-id:fake
27741 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
27742 3/imm32/rm32-is-first-output
27743 0/imm32/no-r32
27744 0/imm32/no-imm32
27745 1/imm32/imm8-is-first-inout
27746 0/imm32/no-disp32
27747 0/imm32/no-xm32
27748 0/imm32/no-x32
27749 0x11/imm32/alloc-id:fake
27750 _Primitive-shift-reg-right-signed-by-lit/imm32/next
27751 _Primitive-shift-reg-right-signed-by-lit:
27752 0x11/imm32/alloc-id:fake:payload
27753
27754 0x11/imm32/alloc-id:fake
27755 _string-shift-right-signed/imm32/name
27756 0x11/imm32/alloc-id:fake
27757 Single-lit-var/imm32/inouts
27758 0x11/imm32/alloc-id:fake
27759 Single-int-var-in-some-register/imm32/outputs
27760 0x11/imm32/alloc-id:fake
27761 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
27762 3/imm32/rm32-is-first-output
27763 0/imm32/no-r32
27764 0/imm32/no-imm32
27765 1/imm32/imm8-is-first-inout
27766 0/imm32/no-disp32
27767 0/imm32/no-xm32
27768 0/imm32/no-x32
27769 0x11/imm32/alloc-id:fake
27770 _Primitive-shift-mem-left-by-lit/imm32/next
27771 _Primitive-shift-mem-left-by-lit:
27772 0x11/imm32/alloc-id:fake:payload
27773
27774 0x11/imm32/alloc-id:fake
27775 _string-shift-left/imm32/name
27776 0x11/imm32/alloc-id:fake
27777 Int-var-and-literal/imm32/inouts
27778 0/imm32/no-outputs
27779 0/imm32/no-outputs
27780 0x11/imm32/alloc-id:fake
27781 _string_c1_subop_shift_left/imm32/subx-name
27782 1/imm32/rm32-is-first-inout
27783 0/imm32/no-r32
27784 0/imm32/no-imm32
27785 2/imm32/imm8-is-second-inout
27786 0/imm32/no-disp32
27787 0/imm32/no-xm32
27788 0/imm32/no-x32
27789 0x11/imm32/alloc-id:fake
27790 _Primitive-shift-mem-right-by-lit/imm32/next
27791 _Primitive-shift-mem-right-by-lit:
27792 0x11/imm32/alloc-id:fake:payload
27793
27794 0x11/imm32/alloc-id:fake
27795 _string-shift-right/imm32/name
27796 0x11/imm32/alloc-id:fake
27797 Int-var-and-literal/imm32/inouts
27798 0/imm32/no-outputs
27799 0/imm32/no-outputs
27800 0x11/imm32/alloc-id:fake
27801 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
27802 1/imm32/rm32-is-first-inout
27803 0/imm32/no-r32
27804 0/imm32/no-imm32
27805 2/imm32/imm8-is-second-inout
27806 0/imm32/no-disp32
27807 0/imm32/no-xm32
27808 0/imm32/no-x32
27809 0x11/imm32/alloc-id:fake
27810 _Primitive-shift-mem-right-signed-by-lit/imm32/next
27811 _Primitive-shift-mem-right-signed-by-lit:
27812 0x11/imm32/alloc-id:fake:payload
27813
27814 0x11/imm32/alloc-id:fake
27815 _string-shift-right-signed/imm32/name
27816 0x11/imm32/alloc-id:fake
27817 Int-var-and-literal/imm32/inouts
27818 0/imm32/no-outputs
27819 0/imm32/no-outputs
27820 0x11/imm32/alloc-id:fake
27821 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
27822 1/imm32/rm32-is-first-inout
27823 0/imm32/no-r32
27824 0/imm32/no-imm32
27825 2/imm32/imm8-is-second-inout
27826 0/imm32/no-disp32
27827 0/imm32/no-xm32
27828 0/imm32/no-x32
27829 0x11/imm32/alloc-id:fake
27830 _Primitive-copy-to-eax/imm32/next
27831
27832 _Primitive-copy-to-eax:
27833 0x11/imm32/alloc-id:fake:payload
27834
27835 0x11/imm32/alloc-id:fake
27836 _string-copy/imm32/name
27837 0x11/imm32/alloc-id:fake
27838 Single-lit-var/imm32/inouts
27839 0x11/imm32/alloc-id:fake
27840 Single-int-var-in-eax/imm32/outputs
27841 0x11/imm32/alloc-id:fake
27842 _string_b8_copy_to_eax/imm32/subx-name
27843 0/imm32/no-rm32
27844 0/imm32/no-r32
27845 1/imm32/imm32-is-first-inout
27846 0/imm32/no-imm8
27847 0/imm32/no-disp32
27848 0/imm32/no-xm32
27849 0/imm32/no-x32
27850 0x11/imm32/alloc-id:fake
27851 _Primitive-copy-to-ecx/imm32/next
27852 _Primitive-copy-to-ecx:
27853 0x11/imm32/alloc-id:fake:payload
27854
27855 0x11/imm32/alloc-id:fake
27856 _string-copy/imm32/name
27857 0x11/imm32/alloc-id:fake
27858 Single-lit-var/imm32/inouts
27859 0x11/imm32/alloc-id:fake
27860 Single-int-var-in-ecx/imm32/outputs
27861 0x11/imm32/alloc-id:fake
27862 _string_b9_copy_to_ecx/imm32/subx-name
27863 0/imm32/no-rm32
27864 0/imm32/no-r32
27865 1/imm32/imm32-is-first-inout
27866 0/imm32/no-imm8
27867 0/imm32/no-disp32
27868 0/imm32/no-xm32
27869 0/imm32/no-x32
27870 0x11/imm32/alloc-id:fake
27871 _Primitive-copy-to-edx/imm32/next
27872 _Primitive-copy-to-edx:
27873 0x11/imm32/alloc-id:fake:payload
27874
27875 0x11/imm32/alloc-id:fake
27876 _string-copy/imm32/name
27877 0x11/imm32/alloc-id:fake
27878 Single-lit-var/imm32/inouts
27879 0x11/imm32/alloc-id:fake
27880 Single-int-var-in-edx/imm32/outputs
27881 0x11/imm32/alloc-id:fake
27882 _string_ba_copy_to_edx/imm32/subx-name
27883 0/imm32/no-rm32
27884 0/imm32/no-r32
27885 1/imm32/imm32-is-first-inout
27886 0/imm32/no-imm8
27887 0/imm32/no-disp32
27888 0/imm32/no-xm32
27889 0/imm32/no-x32
27890 0x11/imm32/alloc-id:fake
27891 _Primitive-copy-to-ebx/imm32/next
27892 _Primitive-copy-to-ebx:
27893 0x11/imm32/alloc-id:fake:payload
27894
27895 0x11/imm32/alloc-id:fake
27896 _string-copy/imm32/name
27897 0x11/imm32/alloc-id:fake
27898 Single-lit-var/imm32/inouts
27899 0x11/imm32/alloc-id:fake
27900 Single-int-var-in-ebx/imm32/outputs
27901 0x11/imm32/alloc-id:fake
27902 _string_bb_copy_to_ebx/imm32/subx-name
27903 0/imm32/no-rm32
27904 0/imm32/no-r32
27905 1/imm32/imm32-is-first-inout
27906 0/imm32/no-imm8
27907 0/imm32/no-disp32
27908 0/imm32/no-xm32
27909 0/imm32/no-x32
27910 0x11/imm32/alloc-id:fake
27911 _Primitive-copy-to-esi/imm32/next
27912 _Primitive-copy-to-esi:
27913 0x11/imm32/alloc-id:fake:payload
27914
27915 0x11/imm32/alloc-id:fake
27916 _string-copy/imm32/name
27917 0x11/imm32/alloc-id:fake
27918 Single-lit-var/imm32/inouts
27919 0x11/imm32/alloc-id:fake
27920 Single-int-var-in-esi/imm32/outputs
27921 0x11/imm32/alloc-id:fake
27922 _string_be_copy_to_esi/imm32/subx-name
27923 0/imm32/no-rm32
27924 0/imm32/no-r32
27925 1/imm32/imm32-is-first-inout
27926 0/imm32/no-imm8
27927 0/imm32/no-disp32
27928 0/imm32/no-xm32
27929 0/imm32/no-x32
27930 0x11/imm32/alloc-id:fake
27931 _Primitive-copy-to-edi/imm32/next
27932 _Primitive-copy-to-edi:
27933 0x11/imm32/alloc-id:fake:payload
27934
27935 0x11/imm32/alloc-id:fake
27936 _string-copy/imm32/name
27937 0x11/imm32/alloc-id:fake
27938 Single-lit-var/imm32/inouts
27939 0x11/imm32/alloc-id:fake
27940 Single-int-var-in-edi/imm32/outputs
27941 0x11/imm32/alloc-id:fake
27942 _string_bf_copy_to_edi/imm32/subx-name
27943 0/imm32/no-rm32
27944 0/imm32/no-r32
27945 1/imm32/imm32-is-first-inout
27946 0/imm32/no-imm8
27947 0/imm32/no-disp32
27948 0/imm32/no-xm32
27949 0/imm32/no-x32
27950 0x11/imm32/alloc-id:fake
27951 _Primitive-copy-reg-to-reg/imm32/next
27952 _Primitive-copy-reg-to-reg:
27953 0x11/imm32/alloc-id:fake:payload
27954
27955 0x11/imm32/alloc-id:fake
27956 _string-copy/imm32/name
27957 0x11/imm32/alloc-id:fake
27958 Single-int-var-in-some-register/imm32/inouts
27959 0x11/imm32/alloc-id:fake
27960 Single-int-var-in-some-register/imm32/outputs
27961 0x11/imm32/alloc-id:fake
27962 _string_89_<-/imm32/subx-name
27963 3/imm32/rm32-is-first-output
27964 1/imm32/r32-is-first-inout
27965 0/imm32/no-imm32
27966 0/imm32/no-imm8
27967 0/imm32/no-disp32
27968 0/imm32/no-xm32
27969 0/imm32/no-x32
27970 0x11/imm32/alloc-id:fake
27971 _Primitive-copy-reg-to-mem/imm32/next
27972 _Primitive-copy-reg-to-mem:
27973 0x11/imm32/alloc-id:fake:payload
27974
27975 0x11/imm32/alloc-id:fake
27976 _string-copy-to/imm32/name
27977 0x11/imm32/alloc-id:fake
27978 Two-args-int-stack-int-reg/imm32/inouts
27979 0/imm32/no-outputs
27980 0/imm32/no-outputs
27981 0x11/imm32/alloc-id:fake
27982 _string_89_<-/imm32/subx-name
27983 1/imm32/rm32-is-first-inout
27984 2/imm32/r32-is-second-inout
27985 0/imm32/no-imm32
27986 0/imm32/no-imm8
27987 0/imm32/no-disp32
27988 0/imm32/no-xm32
27989 0/imm32/no-x32
27990 0x11/imm32/alloc-id:fake
27991 _Primitive-copy-mem-to-reg/imm32/next
27992 _Primitive-copy-mem-to-reg:
27993 0x11/imm32/alloc-id:fake:payload
27994
27995 0x11/imm32/alloc-id:fake
27996 _string-copy/imm32/name
27997 0x11/imm32/alloc-id:fake
27998 Single-int-var-in-mem/imm32/inouts
27999 0x11/imm32/alloc-id:fake
28000 Single-int-var-in-some-register/imm32/outputs
28001 0x11/imm32/alloc-id:fake
28002 _string_8b_->/imm32/subx-name
28003 1/imm32/rm32-is-first-inout
28004 3/imm32/r32-is-first-output
28005 0/imm32/no-imm32
28006 0/imm32/no-imm8
28007 0/imm32/no-disp32
28008 0/imm32/no-xm32
28009 0/imm32/no-x32
28010 0x11/imm32/alloc-id:fake
28011 _Primitive-copy-lit-to-reg/imm32/next
28012 _Primitive-copy-lit-to-reg:
28013 0x11/imm32/alloc-id:fake:payload
28014
28015 0x11/imm32/alloc-id:fake
28016 _string-copy/imm32/name
28017 0x11/imm32/alloc-id:fake
28018 Single-lit-var/imm32/inouts
28019 0x11/imm32/alloc-id:fake
28020 Single-int-var-in-some-register/imm32/outputs
28021 0x11/imm32/alloc-id:fake
28022 _string_c7_subop_copy/imm32/subx-name
28023 3/imm32/rm32-is-first-output
28024 0/imm32/no-r32
28025 1/imm32/imm32-is-first-inout
28026 0/imm32/no-imm8
28027 0/imm32/no-disp32
28028 0/imm32/no-xm32
28029 0/imm32/no-x32
28030 0x11/imm32/alloc-id:fake
28031 _Primitive-copy-lit-to-mem/imm32/next
28032 _Primitive-copy-lit-to-mem:
28033 0x11/imm32/alloc-id:fake:payload
28034
28035 0x11/imm32/alloc-id:fake
28036 _string-copy-to/imm32/name
28037 0x11/imm32/alloc-id:fake
28038 Int-var-and-literal/imm32/inouts
28039 0/imm32/no-outputs
28040 0/imm32/no-outputs
28041 0x11/imm32/alloc-id:fake
28042 _string_c7_subop_copy/imm32/subx-name
28043 1/imm32/rm32-is-first-inout
28044 0/imm32/no-r32
28045 2/imm32/imm32-is-second-inout
28046 0/imm32/no-imm8
28047 0/imm32/no-disp32
28048 0/imm32/no-xm32
28049 0/imm32/no-x32
28050 0x11/imm32/alloc-id:fake
28051 _Primitive-copy-byte-from-reg/imm32/next
28052
28053 _Primitive-copy-byte-from-reg:
28054 0x11/imm32/alloc-id:fake:payload
28055
28056 0x11/imm32/alloc-id:fake
28057 _string-copy-byte/imm32/name
28058 0x11/imm32/alloc-id:fake
28059 Single-byte-var-in-some-register/imm32/inouts
28060 0x11/imm32/alloc-id:fake
28061 Single-byte-var-in-some-register/imm32/outputs
28062 0x11/imm32/alloc-id:fake
28063 _string_8a_copy_byte/imm32/subx-name
28064 1/imm32/rm32-is-first-inout
28065 3/imm32/r32-is-first-output
28066 0/imm32/no-imm32
28067 0/imm32/no-imm8
28068 0/imm32/no-disp32
28069 0/imm32/no-xm32
28070 0/imm32/no-x32
28071 0x11/imm32/alloc-id:fake
28072 _Primitive-copy-byte-from-mem/imm32/next
28073 _Primitive-copy-byte-from-mem:
28074 0x11/imm32/alloc-id:fake:payload
28075
28076 0x11/imm32/alloc-id:fake
28077 _string-copy-byte/imm32/name
28078 0x11/imm32/alloc-id:fake
28079 Single-byte-var-in-mem/imm32/inouts
28080 0x11/imm32/alloc-id:fake
28081 Single-byte-var-in-some-register/imm32/outputs
28082 0x11/imm32/alloc-id:fake
28083 _string_8a_copy_byte/imm32/subx-name
28084 1/imm32/rm32-is-first-inout
28085 3/imm32/r32-is-first-output
28086 0/imm32/no-imm32
28087 0/imm32/no-imm8
28088 0/imm32/no-disp32
28089 0/imm32/no-xm32
28090 0/imm32/no-x32
28091 0x11/imm32/alloc-id:fake
28092 _Primitive-copy-byte-to-mem/imm32/next
28093 _Primitive-copy-byte-to-mem:
28094 0x11/imm32/alloc-id:fake:payload
28095
28096 0x11/imm32/alloc-id:fake
28097 _string-copy-byte-to/imm32/name
28098 0x11/imm32/alloc-id:fake
28099 Two-args-byte-stack-byte-reg/imm32/inouts
28100 0/imm32/no-outputs
28101 0/imm32/no-outputs
28102 0x11/imm32/alloc-id:fake
28103 _string_88_copy_byte/imm32/subx-name
28104 1/imm32/rm32-is-first-inout
28105 2/imm32/r32-is-second-inout
28106 0/imm32/no-imm32
28107 0/imm32/no-imm8
28108 0/imm32/no-disp32
28109 0/imm32/no-xm32
28110 0/imm32/no-x32
28111 0x11/imm32/alloc-id:fake
28112 _Primitive-address/imm32/next
28113
28114 _Primitive-address:
28115 0x11/imm32/alloc-id:fake:payload
28116
28117 0x11/imm32/alloc-id:fake
28118 _string-address/imm32/name
28119 0x11/imm32/alloc-id:fake
28120 Single-int-var-in-mem/imm32/inouts
28121 0x11/imm32/alloc-id:fake
28122 Single-addr-var-in-some-register/imm32/outputs
28123 0x11/imm32/alloc-id:fake
28124 _string_8d_copy_address/imm32/subx-name
28125 1/imm32/rm32-is-first-inout
28126 3/imm32/r32-is-first-output
28127 0/imm32/no-imm32
28128 0/imm32/no-imm8
28129 0/imm32/no-disp32
28130 0/imm32/no-xm32
28131 0/imm32/no-x32
28132 0x11/imm32/alloc-id:fake
28133 _Primitive-compare-reg-with-reg/imm32/next
28134
28135 _Primitive-compare-reg-with-reg:
28136 0x11/imm32/alloc-id:fake:payload
28137
28138 0x11/imm32/alloc-id:fake
28139 _string-compare/imm32/name
28140 0x11/imm32/alloc-id:fake
28141 Two-int-args-in-regs/imm32/inouts
28142 0/imm32/no-outputs
28143 0/imm32/no-outputs
28144 0x11/imm32/alloc-id:fake
28145 _string_39_compare->/imm32/subx-name
28146 1/imm32/rm32-is-first-inout
28147 2/imm32/r32-is-second-inout
28148 0/imm32/no-imm32
28149 0/imm32/no-imm8
28150 0/imm32/no-disp32
28151 0/imm32/no-xm32
28152 0/imm32/no-x32
28153 0x11/imm32/alloc-id:fake
28154 _Primitive-compare-mem-with-reg/imm32/next
28155 _Primitive-compare-mem-with-reg:
28156 0x11/imm32/alloc-id:fake:payload
28157
28158 0x11/imm32/alloc-id:fake
28159 _string-compare/imm32/name
28160 0x11/imm32/alloc-id:fake
28161 Two-args-int-stack-int-reg/imm32/inouts
28162 0/imm32/no-outputs
28163 0/imm32/no-outputs
28164 0x11/imm32/alloc-id:fake
28165 _string_39_compare->/imm32/subx-name
28166 1/imm32/rm32-is-first-inout
28167 2/imm32/r32-is-second-inout
28168 0/imm32/no-imm32
28169 0/imm32/no-imm8
28170 0/imm32/no-disp32
28171 0/imm32/no-xm32
28172 0/imm32/no-x32
28173 0x11/imm32/alloc-id:fake
28174 _Primitive-compare-reg-with-mem/imm32/next
28175 _Primitive-compare-reg-with-mem:
28176 0x11/imm32/alloc-id:fake:payload
28177
28178 0x11/imm32/alloc-id:fake
28179 _string-compare/imm32/name
28180 0x11/imm32/alloc-id:fake
28181 Two-args-int-reg-int-stack/imm32/inouts
28182 0/imm32/no-outputs
28183 0/imm32/no-outputs
28184 0x11/imm32/alloc-id:fake
28185 _string_3b_compare<-/imm32/subx-name
28186 2/imm32/rm32-is-second-inout
28187 1/imm32/r32-is-first-inout
28188 0/imm32/no-imm32
28189 0/imm32/no-imm8
28190 0/imm32/no-disp32
28191 0/imm32/no-xm32
28192 0/imm32/no-x32
28193 0x11/imm32/alloc-id:fake
28194 _Primitive-compare-eax-with-literal/imm32/next
28195 _Primitive-compare-eax-with-literal:
28196 0x11/imm32/alloc-id:fake:payload
28197
28198 0x11/imm32/alloc-id:fake
28199 _string-compare/imm32/name
28200 0x11/imm32/alloc-id:fake
28201 Two-args-int-eax-int-literal/imm32/inouts
28202 0/imm32/no-outputs
28203 0/imm32/no-outputs
28204 0x11/imm32/alloc-id:fake
28205 _string_3d_compare_eax_with/imm32/subx-name
28206 0/imm32/no-rm32
28207 0/imm32/no-r32
28208 2/imm32/imm32-is-second-inout
28209 0/imm32/no-imm8
28210 0/imm32/no-disp32
28211 0/imm32/no-xm32
28212 0/imm32/no-x32
28213 0x11/imm32/alloc-id:fake
28214 _Primitive-compare-reg-with-literal/imm32/next
28215 _Primitive-compare-reg-with-literal:
28216 0x11/imm32/alloc-id:fake:payload
28217
28218 0x11/imm32/alloc-id:fake
28219 _string-compare/imm32/name
28220 0x11/imm32/alloc-id:fake
28221 Int-var-in-register-and-literal/imm32/inouts
28222 0/imm32/no-outputs
28223 0/imm32/no-outputs
28224 0x11/imm32/alloc-id:fake
28225 _string_81_subop_compare/imm32/subx-name
28226 1/imm32/rm32-is-first-inout
28227 0/imm32/no-r32
28228 2/imm32/imm32-is-second-inout
28229 0/imm32/no-imm8
28230 0/imm32/no-disp32
28231 0/imm32/no-xm32
28232 0/imm32/no-x32
28233 0x11/imm32/alloc-id:fake
28234 _Primitive-compare-mem-with-literal/imm32/next
28235 _Primitive-compare-mem-with-literal:
28236 0x11/imm32/alloc-id:fake:payload
28237
28238 0x11/imm32/alloc-id:fake
28239 _string-compare/imm32/name
28240 0x11/imm32/alloc-id:fake
28241 Int-var-and-literal/imm32/inouts
28242 0/imm32/no-outputs
28243 0/imm32/no-outputs
28244 0x11/imm32/alloc-id:fake
28245 _string_81_subop_compare/imm32/subx-name
28246 1/imm32/rm32-is-first-inout
28247 0/imm32/no-r32
28248 2/imm32/imm32-is-second-inout
28249 0/imm32/no-imm8
28250 0/imm32/no-disp32
28251 0/imm32/no-xm32
28252 0/imm32/no-x32
28253 0x11/imm32/alloc-id:fake
28254 _Primitive-negate-reg/imm32/next
28255
28256 _Primitive-negate-reg:
28257 0x11/imm32/alloc-id:fake:payload
28258
28259 0x11/imm32/alloc-id:fake
28260 _string-negate/imm32/name
28261 0/imm32/no-inouts
28262 0/imm32/no-inouts
28263 0x11/imm32/alloc-id:fake
28264 Single-int-var-in-some-register/imm32/outputs
28265 0x11/imm32/alloc-id:fake
28266 _string_f7_subop_negate/imm32/subx-name
28267 3/imm32/rm32-is-first-output
28268 0/imm32/no-r32
28269 0/imm32/no-imm32
28270 0/imm32/no-imm8
28271 0/imm32/no-disp32
28272 0/imm32/no-xm32
28273 0/imm32/no-x32
28274 0x11/imm32/alloc-id:fake
28275 _Primitive-negate-mem/imm32/next
28276 _Primitive-negate-mem:
28277 0x11/imm32/alloc-id:fake:payload
28278
28279 0x11/imm32/alloc-id:fake
28280 _string-negate/imm32/name
28281 0x11/imm32/alloc-id:fake
28282 Single-int-var-in-mem/imm32/inouts
28283 0/imm32/no-outputs
28284 0/imm32/no-outputs
28285 0x11/imm32/alloc-id:fake
28286 _string_f7_subop_negate/imm32/subx-name
28287 1/imm32/rm32-is-first-inout
28288 0/imm32/no-r32
28289 0/imm32/no-imm32
28290 0/imm32/no-imm8
28291 0/imm32/no-disp32
28292 0/imm32/no-xm32
28293 0/imm32/no-x32
28294 0x11/imm32/alloc-id:fake
28295 _Primitive-multiply-reg-by-reg/imm32/next
28296
28297 _Primitive-multiply-reg-by-reg:
28298 0x11/imm32/alloc-id:fake:payload
28299
28300 0x11/imm32/alloc-id:fake
28301 _string-multiply/imm32/name
28302 0x11/imm32/alloc-id:fake
28303 Single-int-var-in-some-register/imm32/inouts
28304 0x11/imm32/alloc-id:fake
28305 Single-int-var-in-some-register/imm32/outputs
28306 0x11/imm32/alloc-id:fake
28307 _string_0f_af_multiply/imm32/subx-name
28308 1/imm32/rm32-is-first-inout
28309 3/imm32/r32-is-first-output
28310 0/imm32/no-imm32
28311 0/imm32/no-imm8
28312 0/imm32/no-disp32
28313 0/imm32/no-xm32
28314 0/imm32/no-x32
28315 0x11/imm32/alloc-id:fake
28316 _Primitive-multiply-reg-by-mem/imm32/next
28317 _Primitive-multiply-reg-by-mem:
28318 0x11/imm32/alloc-id:fake:payload
28319
28320 0x11/imm32/alloc-id:fake
28321 _string-multiply/imm32/name
28322 0x11/imm32/alloc-id:fake
28323 Single-int-var-in-mem/imm32/inouts
28324 0x11/imm32/alloc-id:fake
28325 Single-int-var-in-some-register/imm32/outputs
28326 0x11/imm32/alloc-id:fake
28327 _string_0f_af_multiply/imm32/subx-name
28328 1/imm32/rm32-is-first-inout
28329 3/imm32/r32-is-first-output
28330 0/imm32/no-imm32
28331 0/imm32/no-imm8
28332 0/imm32/no-disp32
28333 0/imm32/no-xm32
28334 0/imm32/no-x32
28335 0x11/imm32/alloc-id:fake
28336 _Primitive-convert-mem-to-xreg/imm32/next
28337
28338 _Primitive-convert-mem-to-xreg:
28339 0x11/imm32/alloc-id:fake:payload
28340
28341 0x11/imm32/alloc-id:fake
28342 _string-convert/imm32/name
28343 0x11/imm32/alloc-id:fake
28344 Single-int-var-in-mem/imm32/inouts
28345 0x11/imm32/alloc-id:fake
28346 Single-float-var-in-some-register/imm32/outputs
28347 0x11/imm32/alloc-id:fake
28348 _string_f3_0f_2a_convert_to_float/imm32/subx-name
28349 1/imm32/rm32-is-first-inout
28350 0/imm32/no-r32
28351 0/imm32/no-imm32
28352 0/imm32/no-imm8
28353 0/imm32/no-disp32
28354 0/imm32/no-xm32
28355 3/imm32/x32-is-first-output
28356 0x11/imm32/alloc-id:fake
28357 _Primitive-convert-reg-to-xreg/imm32/next
28358 _Primitive-convert-reg-to-xreg:
28359 0x11/imm32/alloc-id:fake:payload
28360
28361 0x11/imm32/alloc-id:fake
28362 _string-convert/imm32/name
28363 0x11/imm32/alloc-id:fake
28364 Single-int-var-in-some-register/imm32/inouts
28365 0x11/imm32/alloc-id:fake
28366 Single-float-var-in-some-register/imm32/outputs
28367 0x11/imm32/alloc-id:fake
28368 _string_f3_0f_2a_convert_to_float/imm32/subx-name
28369 1/imm32/rm32-is-first-inout
28370 0/imm32/no-r32
28371 0/imm32/no-imm32
28372 0/imm32/no-imm8
28373 0/imm32/no-disp32
28374 0/imm32/no-xm32
28375 3/imm32/x32-is-first-output
28376 0x11/imm32/alloc-id:fake
28377 _Primitive-convert-xmem-to-reg/imm32/next
28378
28379 _Primitive-convert-xmem-to-reg:
28380 0x11/imm32/alloc-id:fake:payload
28381
28382 0x11/imm32/alloc-id:fake
28383 _string-convert/imm32/name
28384 0x11/imm32/alloc-id:fake
28385 Single-float-var-in-mem/imm32/inouts
28386 0x11/imm32/alloc-id:fake
28387 Single-int-var-in-some-register/imm32/outputs
28388 0x11/imm32/alloc-id:fake
28389 _string_f3_0f_2d_convert_to_int/imm32/subx-name
28390 0/imm32/no-rm32
28391 3/imm32/r32-is-first-output
28392 0/imm32/no-imm32
28393 0/imm32/no-imm8
28394 0/imm32/no-disp32
28395 1/imm32/xm32-is-first-inout
28396 0/imm32/no-x32
28397 0x11/imm32/alloc-id:fake
28398 _Primitive-convert-xreg-to-reg/imm32/next
28399 _Primitive-convert-xreg-to-reg:
28400 0x11/imm32/alloc-id:fake:payload
28401
28402 0x11/imm32/alloc-id:fake
28403 _string-convert/imm32/name
28404 0x11/imm32/alloc-id:fake
28405 Single-float-var-in-some-register/imm32/inouts
28406 0x11/imm32/alloc-id:fake
28407 Single-int-var-in-some-register/imm32/outputs
28408 0x11/imm32/alloc-id:fake
28409 _string_f3_0f_2d_convert_to_int/imm32/subx-name
28410 0/imm32/no-rm32
28411 3/imm32/r32-is-first-output
28412 0/imm32/no-imm32
28413 0/imm32/no-imm8
28414 0/imm32/no-disp32
28415 1/imm32/xm32-is-first-inout
28416 0/imm32/no-x32
28417 0x11/imm32/alloc-id:fake
28418 _Primitive-truncate-xmem-to-reg/imm32/next
28419 _Primitive-truncate-xmem-to-reg:
28420 0x11/imm32/alloc-id:fake:payload
28421
28422 0x11/imm32/alloc-id:fake
28423 _string-truncate/imm32/name
28424 0x11/imm32/alloc-id:fake
28425 Single-float-var-in-mem/imm32/inouts
28426 0x11/imm32/alloc-id:fake
28427 Single-int-var-in-some-register/imm32/outputs
28428 0x11/imm32/alloc-id:fake
28429 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
28430 0/imm32/no-rm32
28431 3/imm32/r32-is-first-output
28432 0/imm32/no-imm32
28433 0/imm32/no-imm8
28434 0/imm32/no-disp32
28435 1/imm32/xm32-is-first-inout
28436 0/imm32/no-x32
28437 0x11/imm32/alloc-id:fake
28438 _Primitive-truncate-xreg-to-reg/imm32/next
28439 _Primitive-truncate-xreg-to-reg:
28440 0x11/imm32/alloc-id:fake:payload
28441
28442 0x11/imm32/alloc-id:fake
28443 _string-truncate/imm32/name
28444 0x11/imm32/alloc-id:fake
28445 Single-float-var-in-some-register/imm32/inouts
28446 0x11/imm32/alloc-id:fake
28447 Single-int-var-in-some-register/imm32/outputs
28448 0x11/imm32/alloc-id:fake
28449 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
28450 0/imm32/no-rm32
28451 3/imm32/r32-is-first-output
28452 0/imm32/no-imm32
28453 0/imm32/no-imm8
28454 0/imm32/no-disp32
28455 1/imm32/xm32-is-first-inout
28456 0/imm32/no-x32
28457 0x11/imm32/alloc-id:fake
28458 _Primitive-reinterpret-xmem-as-reg/imm32/next
28459
28460 _Primitive-reinterpret-xmem-as-reg:
28461 0x11/imm32/alloc-id:fake:payload
28462
28463 0x11/imm32/alloc-id:fake
28464 _string-reinterpret/imm32/name
28465 0x11/imm32/alloc-id:fake
28466 Single-float-var-in-mem/imm32/inouts
28467 0x11/imm32/alloc-id:fake
28468 Single-int-var-in-some-register/imm32/outputs
28469 0x11/imm32/alloc-id:fake
28470 _string_8b_->/imm32/subx-name
28471 0/imm32/no-rm32
28472 3/imm32/r32-is-first-output
28473 0/imm32/no-imm32
28474 0/imm32/no-imm8
28475 0/imm32/no-disp32
28476 1/imm32/xm32-is-first-inout
28477 0/imm32/no-x32
28478 0x11/imm32/alloc-id:fake
28479 _Primitive-reinterpret-mem-as-xreg/imm32/next
28480 _Primitive-reinterpret-mem-as-xreg:
28481 0x11/imm32/alloc-id:fake:payload
28482
28483 0x11/imm32/alloc-id:fake
28484 _string-reinterpret/imm32/name
28485 0x11/imm32/alloc-id:fake
28486 Single-int-var-in-mem/imm32/inouts
28487 0x11/imm32/alloc-id:fake
28488 Single-float-var-in-some-register/imm32/outputs
28489 0x11/imm32/alloc-id:fake
28490 _string_f3_0f_10_copy/imm32/subx-name
28491 1/imm32/rm32-is-first-inout
28492 0/imm32/no-r32
28493 0/imm32/no-imm32
28494 0/imm32/no-imm8
28495 0/imm32/no-disp32
28496 0/imm32/no-xm32
28497 3/imm32/x32-is-first-output
28498 0x11/imm32/alloc-id:fake
28499 _Primitive-copy-xreg-to-xreg/imm32/next
28500
28501 _Primitive-copy-xreg-to-xreg:
28502 0x11/imm32/alloc-id:fake:payload
28503
28504 0x11/imm32/alloc-id:fake
28505 _string-copy/imm32/name
28506 0x11/imm32/alloc-id:fake
28507 Single-float-var-in-some-register/imm32/inouts
28508 0x11/imm32/alloc-id:fake
28509 Single-float-var-in-some-register/imm32/outputs
28510 0x11/imm32/alloc-id:fake
28511 _string_f3_0f_11_copy/imm32/subx-name
28512 0/imm32/no-rm32
28513 0/imm32/no-r32
28514 0/imm32/no-imm32
28515 0/imm32/no-imm8
28516 0/imm32/no-disp32
28517 3/imm32/xm32-is-first-output
28518 1/imm32/x32-is-first-inout
28519 0x11/imm32/alloc-id:fake
28520 _Primitive-copy-xreg-to-mem/imm32/next
28521 _Primitive-copy-xreg-to-mem:
28522 0x11/imm32/alloc-id:fake:payload
28523
28524 0x11/imm32/alloc-id:fake
28525 _string-copy-to/imm32/name
28526 0x11/imm32/alloc-id:fake
28527 Two-args-float-stack-float-reg/imm32/inouts
28528 0/imm32/no-outputs
28529 0/imm32/no-outputs
28530 0x11/imm32/alloc-id:fake
28531 _string_f3_0f_11_copy/imm32/subx-name
28532 0/imm32/no-rm32
28533 0/imm32/no-r32
28534 0/imm32/no-imm32
28535 0/imm32/no-imm8
28536 0/imm32/no-disp32
28537 1/imm32/xm32-is-first-inout
28538 2/imm32/x32-is-second-inout
28539 0x11/imm32/alloc-id:fake
28540 _Primitive-copy-mem-to-xreg/imm32/next
28541 _Primitive-copy-mem-to-xreg:
28542 0x11/imm32/alloc-id:fake:payload
28543
28544 0x11/imm32/alloc-id:fake
28545 _string-copy/imm32/name
28546 0x11/imm32/alloc-id:fake
28547 Single-float-var-in-mem/imm32/inouts
28548 0x11/imm32/alloc-id:fake
28549 Single-float-var-in-some-register/imm32/outputs
28550 0x11/imm32/alloc-id:fake
28551 _string_f3_0f_10_copy/imm32/subx-name
28552 0/imm32/no-rm32
28553 0/imm32/no-r32
28554 0/imm32/no-imm32
28555 0/imm32/no-imm8
28556 0/imm32/no-disp32
28557 1/imm32/xm32-is-first-inout
28558 3/imm32/x32-is-first-output
28559 0x11/imm32/alloc-id:fake
28560 _Primitive-address-of-xmem/imm32/next
28561
28562 _Primitive-address-of-xmem:
28563 0x11/imm32/alloc-id:fake:payload
28564
28565 0x11/imm32/alloc-id:fake
28566 _string-address/imm32/name
28567 0x11/imm32/alloc-id:fake
28568 Single-float-var-in-mem/imm32/inouts
28569 0x11/imm32/alloc-id:fake
28570 Single-addr-var-in-some-register/imm32/outputs
28571 0x11/imm32/alloc-id:fake
28572 _string_8d_copy_address/imm32/subx-name
28573 1/imm32/rm32-is-first-inout
28574 3/imm32/r32-is-first-output
28575 0/imm32/no-imm32
28576 0/imm32/no-imm8
28577 0/imm32/no-disp32
28578 0/imm32/no-xm32
28579 0/imm32/no-x32
28580 0x11/imm32/alloc-id:fake
28581 _Primitive-add-xreg-to-xreg/imm32/next
28582
28583 _Primitive-add-xreg-to-xreg:
28584 0x11/imm32/alloc-id:fake:payload
28585
28586 0x11/imm32/alloc-id:fake
28587 _string-add/imm32/name
28588 0x11/imm32/alloc-id:fake
28589 Single-float-var-in-some-register/imm32/inouts
28590 0x11/imm32/alloc-id:fake
28591 Single-float-var-in-some-register/imm32/outputs
28592 0x11/imm32/alloc-id:fake
28593 _string_f3_0f_58_add/imm32/subx-name
28594 0/imm32/no-rm32
28595 0/imm32/no-r32
28596 0/imm32/no-imm32
28597 0/imm32/no-imm8
28598 0/imm32/no-disp32
28599 1/imm32/xm32-is-first-inout
28600 3/imm32/x32-is-first-output
28601 0x11/imm32/alloc-id:fake
28602 _Primitive-add-mem-to-xreg/imm32/next
28603 _Primitive-add-mem-to-xreg:
28604 0x11/imm32/alloc-id:fake:payload
28605
28606 0x11/imm32/alloc-id:fake
28607 _string-add/imm32/name
28608 0x11/imm32/alloc-id:fake
28609 Single-float-var-in-mem/imm32/inouts
28610 0x11/imm32/alloc-id:fake
28611 Single-float-var-in-some-register/imm32/outputs
28612 0x11/imm32/alloc-id:fake
28613 _string_f3_0f_58_add/imm32/subx-name
28614 0/imm32/no-rm32
28615 0/imm32/no-r32
28616 0/imm32/no-imm32
28617 0/imm32/no-imm8
28618 0/imm32/no-disp32
28619 1/imm32/xm32-is-first-inout
28620 3/imm32/x32-is-first-output
28621 0x11/imm32/alloc-id:fake
28622 _Primitive-subtract-xreg-from-xreg/imm32/next
28623
28624 _Primitive-subtract-xreg-from-xreg:
28625 0x11/imm32/alloc-id:fake:payload
28626
28627 0x11/imm32/alloc-id:fake
28628 _string-subtract/imm32/name
28629 0x11/imm32/alloc-id:fake
28630 Single-float-var-in-some-register/imm32/inouts
28631 0x11/imm32/alloc-id:fake
28632 Single-float-var-in-some-register/imm32/outputs
28633 0x11/imm32/alloc-id:fake
28634 _string_f3_0f_5c_subtract/imm32/subx-name
28635 0/imm32/no-rm32
28636 0/imm32/no-r32
28637 0/imm32/no-imm32
28638 0/imm32/no-imm8
28639 0/imm32/no-disp32
28640 1/imm32/xm32-is-first-inout
28641 3/imm32/x32-is-first-output
28642 0x11/imm32/alloc-id:fake
28643 _Primitive-subtract-mem-from-xreg/imm32/next
28644 _Primitive-subtract-mem-from-xreg:
28645 0x11/imm32/alloc-id:fake:payload
28646
28647 0x11/imm32/alloc-id:fake
28648 _string-subtract/imm32/name
28649 0x11/imm32/alloc-id:fake
28650 Single-float-var-in-mem/imm32/inouts
28651 0x11/imm32/alloc-id:fake
28652 Single-float-var-in-some-register/imm32/outputs
28653 0x11/imm32/alloc-id:fake
28654 _string_f3_0f_5c_subtract/imm32/subx-name
28655 0/imm32/no-rm32
28656 0/imm32/no-r32
28657 0/imm32/no-imm32
28658 0/imm32/no-imm8
28659 0/imm32/no-disp32
28660 1/imm32/xm32-is-first-inout
28661 3/imm32/x32-is-first-output
28662 0x11/imm32/alloc-id:fake
28663 _Primitive-multiply-xreg-by-xreg/imm32/next
28664
28665 _Primitive-multiply-xreg-by-xreg:
28666 0x11/imm32/alloc-id:fake:payload
28667
28668 0x11/imm32/alloc-id:fake
28669 _string-multiply/imm32/name
28670 0x11/imm32/alloc-id:fake
28671 Single-float-var-in-some-register/imm32/inouts
28672 0x11/imm32/alloc-id:fake
28673 Single-float-var-in-some-register/imm32/outputs
28674 0x11/imm32/alloc-id:fake
28675 _string_f3_0f_59_multiply/imm32/subx-name
28676 0/imm32/no-rm32
28677 0/imm32/no-r32
28678 0/imm32/no-imm32
28679 0/imm32/no-imm8
28680 0/imm32/no-disp32
28681 1/imm32/xm32-is-first-inout
28682 3/imm32/x32-is-first-output
28683 0x11/imm32/alloc-id:fake
28684 _Primitive-multiply-xreg-by-mem/imm32/next
28685 _Primitive-multiply-xreg-by-mem:
28686 0x11/imm32/alloc-id:fake:payload
28687
28688 0x11/imm32/alloc-id:fake
28689 _string-multiply/imm32/name
28690 0x11/imm32/alloc-id:fake
28691 Single-float-var-in-mem/imm32/inouts
28692 0x11/imm32/alloc-id:fake
28693 Single-float-var-in-some-register/imm32/outputs
28694 0x11/imm32/alloc-id:fake
28695 _string_f3_0f_59_multiply/imm32/subx-name
28696 0/imm32/no-rm32
28697 0/imm32/no-r32
28698 0/imm32/no-imm32
28699 0/imm32/no-imm8
28700 0/imm32/no-disp32
28701 1/imm32/xm32-is-first-inout
28702 3/imm32/x32-is-first-output
28703 0x11/imm32/alloc-id:fake
28704 _Primitive-divide-xreg-by-xreg/imm32/next
28705
28706 _Primitive-divide-xreg-by-xreg:
28707 0x11/imm32/alloc-id:fake:payload
28708
28709 0x11/imm32/alloc-id:fake
28710 _string-divide/imm32/name
28711 0x11/imm32/alloc-id:fake
28712 Single-float-var-in-some-register/imm32/inouts
28713 0x11/imm32/alloc-id:fake
28714 Single-float-var-in-some-register/imm32/outputs
28715 0x11/imm32/alloc-id:fake
28716 _string_f3_0f_5e_divide/imm32/subx-name
28717 0/imm32/no-rm32
28718 0/imm32/no-r32
28719 0/imm32/no-imm32
28720 0/imm32/no-imm8
28721 0/imm32/no-disp32
28722 1/imm32/xm32-is-first-inout
28723 3/imm32/x32-is-first-output
28724 0x11/imm32/alloc-id:fake
28725 _Primitive-divide-xreg-by-mem/imm32/next
28726 _Primitive-divide-xreg-by-mem:
28727 0x11/imm32/alloc-id:fake:payload
28728
28729 0x11/imm32/alloc-id:fake
28730 _string-divide/imm32/name
28731 0x11/imm32/alloc-id:fake
28732 Single-float-var-in-mem/imm32/inouts
28733 0x11/imm32/alloc-id:fake
28734 Single-float-var-in-some-register/imm32/outputs
28735 0x11/imm32/alloc-id:fake
28736 _string_f3_0f_5e_divide/imm32/subx-name
28737 0/imm32/no-rm32
28738 0/imm32/no-r32
28739 0/imm32/no-imm32
28740 0/imm32/no-imm8
28741 0/imm32/no-disp32
28742 1/imm32/xm32-is-first-inout
28743 3/imm32/x32-is-first-output
28744 0x11/imm32/alloc-id:fake
28745 _Primitive-max-xreg-with-xreg/imm32/next
28746
28747 _Primitive-max-xreg-with-xreg:
28748 0x11/imm32/alloc-id:fake:payload
28749
28750 0x11/imm32/alloc-id:fake
28751 _string-max/imm32/name
28752 0x11/imm32/alloc-id:fake
28753 Single-float-var-in-some-register/imm32/inouts
28754 0x11/imm32/alloc-id:fake
28755 Single-float-var-in-some-register/imm32/outputs
28756 0x11/imm32/alloc-id:fake
28757 _string_f3_0f_5f_max/imm32/subx-name
28758 0/imm32/no-rm32
28759 0/imm32/no-r32
28760 0/imm32/no-imm32
28761 0/imm32/no-imm8
28762 0/imm32/no-disp32
28763 1/imm32/xm32-is-first-inout
28764 3/imm32/x32-is-first-output
28765 0x11/imm32/alloc-id:fake
28766 _Primitive-max-xreg-with-mem/imm32/next
28767 _Primitive-max-xreg-with-mem:
28768 0x11/imm32/alloc-id:fake:payload
28769
28770 0x11/imm32/alloc-id:fake
28771 _string-max/imm32/name
28772 0x11/imm32/alloc-id:fake
28773 Single-float-var-in-mem/imm32/inouts
28774 0x11/imm32/alloc-id:fake
28775 Single-float-var-in-some-register/imm32/outputs
28776 0x11/imm32/alloc-id:fake
28777 _string_f3_0f_5f_max/imm32/subx-name
28778 0/imm32/no-rm32
28779 0/imm32/no-r32
28780 0/imm32/no-imm32
28781 0/imm32/no-imm8
28782 0/imm32/no-disp32
28783 1/imm32/xm32-is-first-inout
28784 3/imm32/x32-is-first-output
28785 0x11/imm32/alloc-id:fake
28786 _Primitive-min-xreg-with-xreg/imm32/next
28787
28788 _Primitive-min-xreg-with-xreg:
28789 0x11/imm32/alloc-id:fake:payload
28790
28791 0x11/imm32/alloc-id:fake
28792 _string-min/imm32/name
28793 0x11/imm32/alloc-id:fake
28794 Single-float-var-in-some-register/imm32/inouts
28795 0x11/imm32/alloc-id:fake
28796 Single-float-var-in-some-register/imm32/outputs
28797 0x11/imm32/alloc-id:fake
28798 _string_f3_0f_5d_min/imm32/subx-name
28799 0/imm32/no-rm32
28800 0/imm32/no-r32
28801 0/imm32/no-imm32
28802 0/imm32/no-imm8
28803 0/imm32/no-disp32
28804 1/imm32/xm32-is-first-inout
28805 3/imm32/x32-is-first-output
28806 0x11/imm32/alloc-id:fake
28807 _Primitive-min-xreg-with-mem/imm32/next
28808 _Primitive-min-xreg-with-mem:
28809 0x11/imm32/alloc-id:fake:payload
28810
28811 0x11/imm32/alloc-id:fake
28812 _string-min/imm32/name
28813 0x11/imm32/alloc-id:fake
28814 Single-float-var-in-mem/imm32/inouts
28815 0x11/imm32/alloc-id:fake
28816 Single-float-var-in-some-register/imm32/outputs
28817 0x11/imm32/alloc-id:fake
28818 _string_f3_0f_5d_min/imm32/subx-name
28819 0/imm32/no-rm32
28820 0/imm32/no-r32
28821 0/imm32/no-imm32
28822 0/imm32/no-imm8
28823 0/imm32/no-disp32
28824 1/imm32/xm32-is-first-inout
28825 3/imm32/x32-is-first-output
28826 0x11/imm32/alloc-id:fake
28827 _Primitive-reciprocal-xreg-to-xreg/imm32/next
28828
28829 _Primitive-reciprocal-xreg-to-xreg:
28830 0x11/imm32/alloc-id:fake:payload
28831
28832 0x11/imm32/alloc-id:fake
28833 _string-reciprocal/imm32/name
28834 0x11/imm32/alloc-id:fake
28835 Single-float-var-in-some-register/imm32/inouts
28836 0x11/imm32/alloc-id:fake
28837 Single-float-var-in-some-register/imm32/outputs
28838 0x11/imm32/alloc-id:fake
28839 _string_f3_0f_53_reciprocal/imm32/subx-name
28840 0/imm32/no-rm32
28841 0/imm32/no-r32
28842 0/imm32/no-imm32
28843 0/imm32/no-imm8
28844 0/imm32/no-disp32
28845 1/imm32/xm32-is-first-inout
28846 3/imm32/x32-is-first-output
28847 0x11/imm32/alloc-id:fake
28848 _Primitive-reciprocal-mem-to-xreg/imm32/next
28849 _Primitive-reciprocal-mem-to-xreg:
28850 0x11/imm32/alloc-id:fake:payload
28851
28852 0x11/imm32/alloc-id:fake
28853 _string-reciprocal/imm32/name
28854 0x11/imm32/alloc-id:fake
28855 Single-float-var-in-mem/imm32/inouts
28856 0x11/imm32/alloc-id:fake
28857 Single-float-var-in-some-register/imm32/outputs
28858 0x11/imm32/alloc-id:fake
28859 _string_f3_0f_53_reciprocal/imm32/subx-name
28860 0/imm32/no-rm32
28861 0/imm32/no-r32
28862 0/imm32/no-imm32
28863 0/imm32/no-imm8
28864 0/imm32/no-disp32
28865 1/imm32/xm32-is-first-inout
28866 3/imm32/x32-is-first-output
28867 0x11/imm32/alloc-id:fake
28868 _Primitive-square-root-xreg-to-xreg/imm32/next
28869
28870 _Primitive-square-root-xreg-to-xreg:
28871 0x11/imm32/alloc-id:fake:payload
28872
28873 0x11/imm32/alloc-id:fake
28874 _string-square-root/imm32/name
28875 0x11/imm32/alloc-id:fake
28876 Single-float-var-in-some-register/imm32/inouts
28877 0x11/imm32/alloc-id:fake
28878 Single-float-var-in-some-register/imm32/outputs
28879 0x11/imm32/alloc-id:fake
28880 _string_f3_0f_51_square_root/imm32/subx-name
28881 0/imm32/no-rm32
28882 0/imm32/no-r32
28883 0/imm32/no-imm32
28884 0/imm32/no-imm8
28885 0/imm32/no-disp32
28886 1/imm32/xm32-is-first-inout
28887 3/imm32/x32-is-first-output
28888 0x11/imm32/alloc-id:fake
28889 _Primitive-square-root-mem-to-xreg/imm32/next
28890 _Primitive-square-root-mem-to-xreg:
28891 0x11/imm32/alloc-id:fake:payload
28892
28893 0x11/imm32/alloc-id:fake
28894 _string-square-root/imm32/name
28895 0x11/imm32/alloc-id:fake
28896 Single-float-var-in-mem/imm32/inouts
28897 0x11/imm32/alloc-id:fake
28898 Single-float-var-in-some-register/imm32/outputs
28899 0x11/imm32/alloc-id:fake
28900 _string_f3_0f_51_square_root/imm32/subx-name
28901 0/imm32/no-rm32
28902 0/imm32/no-r32
28903 0/imm32/no-imm32
28904 0/imm32/no-imm8
28905 0/imm32/no-disp32
28906 1/imm32/xm32-is-first-inout
28907 3/imm32/x32-is-first-output
28908 0x11/imm32/alloc-id:fake
28909 _Primitive-inverse-square-root-xreg-to-xreg/imm32/next
28910
28911 _Primitive-inverse-square-root-xreg-to-xreg:
28912 0x11/imm32/alloc-id:fake:payload
28913
28914 0x11/imm32/alloc-id:fake
28915 _string-inverse-square-root/imm32/name
28916 0x11/imm32/alloc-id:fake
28917 Single-float-var-in-some-register/imm32/inouts
28918 0x11/imm32/alloc-id:fake
28919 Single-float-var-in-some-register/imm32/outputs
28920 0x11/imm32/alloc-id:fake
28921 _string_f3_0f_52_inverse_square_root/imm32/subx-name
28922 0/imm32/no-rm32
28923 0/imm32/no-r32
28924 0/imm32/no-imm32
28925 0/imm32/no-imm8
28926 0/imm32/no-disp32
28927 1/imm32/xm32-is-first-inout
28928 3/imm32/x32-is-first-output
28929 0x11/imm32/alloc-id:fake
28930 _Primitive-inverse-square-root-mem-to-xreg/imm32/next
28931 _Primitive-inverse-square-root-mem-to-xreg:
28932 0x11/imm32/alloc-id:fake:payload
28933
28934 0x11/imm32/alloc-id:fake
28935 _string-inverse-square-root/imm32/name
28936 0x11/imm32/alloc-id:fake
28937 Single-float-var-in-mem/imm32/inouts
28938 0x11/imm32/alloc-id:fake
28939 Single-float-var-in-some-register/imm32/outputs
28940 0x11/imm32/alloc-id:fake
28941 _string_f3_0f_52_inverse_square_root/imm32/subx-name
28942 0/imm32/no-rm32
28943 0/imm32/no-r32
28944 0/imm32/no-imm32
28945 0/imm32/no-imm8
28946 0/imm32/no-disp32
28947 1/imm32/xm32-is-first-inout
28948 3/imm32/x32-is-first-output
28949 0x11/imm32/alloc-id:fake
28950 _Primitive-compare-xreg-with-xreg/imm32/next
28951
28952 _Primitive-compare-xreg-with-xreg:
28953 0x11/imm32/alloc-id:fake:payload
28954
28955 0x11/imm32/alloc-id:fake
28956 _string-compare/imm32/name
28957 0x11/imm32/alloc-id:fake
28958 Two-float-args-in-regs/imm32/inouts
28959 0/imm32/no-outputs
28960 0/imm32/no-outputs
28961 0x11/imm32/alloc-id:fake
28962 _string_0f_2f_compare/imm32/subx-name
28963 0/imm32/no-rm32
28964 0/imm32/no-r32
28965 0/imm32/no-imm32
28966 0/imm32/no-imm8
28967 0/imm32/no-disp32
28968 1/imm32/xm32-is-first-inout
28969 2/imm32/x32-is-second-inout
28970 0x11/imm32/alloc-id:fake
28971 _Primitive-compare-xreg-with-mem/imm32/next
28972 _Primitive-compare-xreg-with-mem:
28973 0x11/imm32/alloc-id:fake:payload
28974
28975 0x11/imm32/alloc-id:fake
28976 _string-compare/imm32/name
28977 0x11/imm32/alloc-id:fake
28978 Two-args-float-reg-float-stack/imm32/inouts
28979 0/imm32/no-outputs
28980 0/imm32/no-outputs
28981 0x11/imm32/alloc-id:fake
28982 _string_0f_2f_compare/imm32/subx-name
28983 0/imm32/no-rm32
28984 0/imm32/no-r32
28985 0/imm32/no-imm32
28986 0/imm32/no-imm8
28987 0/imm32/no-disp32
28988 2/imm32/xm32-is-second-inout
28989 1/imm32/x32-is-first-inout
28990 0x11/imm32/alloc-id:fake
28991 _Primitive-break-if-addr</imm32/next
28992
28993 _Primitive-break-if-addr<:
28994 0x11/imm32/alloc-id:fake:payload
28995 0x11/imm32/alloc-id:fake
28996 _string-break-if-addr</imm32/name
28997 0/imm32/no-inouts
28998 0/imm32/no-inouts
28999 0/imm32/no-outputs
29000 0/imm32/no-outputs
29001 0x11/imm32/alloc-id:fake
29002 _string_0f_82_jump_break/imm32/subx-name
29003 0/imm32/no-rm32
29004 0/imm32/no-r32
29005 0/imm32/no-imm32
29006 0/imm32/no-imm8
29007 0/imm32/no-disp32
29008 0/imm32/no-xm32
29009 0/imm32/no-x32
29010 0x11/imm32/alloc-id:fake
29011 _Primitive-break-if-addr>=/imm32/next
29012 _Primitive-break-if-addr>=:
29013 0x11/imm32/alloc-id:fake:payload
29014 0x11/imm32/alloc-id:fake
29015 _string-break-if-addr>=/imm32/name
29016 0/imm32/no-inouts
29017 0/imm32/no-inouts
29018 0/imm32/no-outputs
29019 0/imm32/no-outputs
29020 0x11/imm32/alloc-id:fake
29021 _string_0f_83_jump_break/imm32/subx-name
29022 0/imm32/no-rm32
29023 0/imm32/no-r32
29024 0/imm32/no-imm32
29025 0/imm32/no-imm8
29026 0/imm32/no-disp32
29027 0/imm32/no-xm32
29028 0/imm32/no-x32
29029 0x11/imm32/alloc-id:fake
29030 _Primitive-break-if-=/imm32/next
29031 _Primitive-break-if-=:
29032 0x11/imm32/alloc-id:fake:payload
29033 0x11/imm32/alloc-id:fake
29034 _string-break-if-=/imm32/name
29035 0/imm32/no-inouts
29036 0/imm32/no-inouts
29037 0/imm32/no-outputs
29038 0/imm32/no-outputs
29039 0x11/imm32/alloc-id:fake
29040 _string_0f_84_jump_break/imm32/subx-name
29041 0/imm32/no-rm32
29042 0/imm32/no-r32
29043 0/imm32/no-imm32
29044 0/imm32/no-imm8
29045 0/imm32/no-disp32
29046 0/imm32/no-xm32
29047 0/imm32/no-x32
29048 0x11/imm32/alloc-id:fake
29049 _Primitive-break-if-!=/imm32/next
29050 _Primitive-break-if-!=:
29051 0x11/imm32/alloc-id:fake:payload
29052 0x11/imm32/alloc-id:fake
29053 _string-break-if-!=/imm32/name
29054 0/imm32/no-inouts
29055 0/imm32/no-inouts
29056 0/imm32/no-outputs
29057 0/imm32/no-outputs
29058 0x11/imm32/alloc-id:fake
29059 _string_0f_85_jump_break/imm32/subx-name
29060 0/imm32/no-rm32
29061 0/imm32/no-r32
29062 0/imm32/no-imm32
29063 0/imm32/no-imm8
29064 0/imm32/no-disp32
29065 0/imm32/no-xm32
29066 0/imm32/no-x32
29067 0x11/imm32/alloc-id:fake
29068 _Primitive-break-if-addr<=/imm32/next
29069 _Primitive-break-if-addr<=:
29070 0x11/imm32/alloc-id:fake:payload
29071 0x11/imm32/alloc-id:fake
29072 _string-break-if-addr<=/imm32/name
29073 0/imm32/no-inouts
29074 0/imm32/no-inouts
29075 0/imm32/no-outputs
29076 0/imm32/no-outputs
29077 0x11/imm32/alloc-id:fake
29078 _string_0f_86_jump_break/imm32/subx-name
29079 0/imm32/no-rm32
29080 0/imm32/no-r32
29081 0/imm32/no-imm32
29082 0/imm32/no-imm8
29083 0/imm32/no-disp32
29084 0/imm32/no-xm32
29085 0/imm32/no-x32
29086 0x11/imm32/alloc-id:fake
29087 _Primitive-break-if-addr>/imm32/next
29088 _Primitive-break-if-addr>:
29089 0x11/imm32/alloc-id:fake:payload
29090 0x11/imm32/alloc-id:fake
29091 _string-break-if-addr>/imm32/name
29092 0/imm32/no-inouts
29093 0/imm32/no-inouts
29094 0/imm32/no-outputs
29095 0/imm32/no-outputs
29096 0x11/imm32/alloc-id:fake
29097 _string_0f_87_jump_break/imm32/subx-name
29098 0/imm32/no-rm32
29099 0/imm32/no-r32
29100 0/imm32/no-imm32
29101 0/imm32/no-imm8
29102 0/imm32/no-disp32
29103 0/imm32/no-xm32
29104 0/imm32/no-x32
29105 0x11/imm32/alloc-id:fake
29106 _Primitive-break-if-</imm32/next
29107 _Primitive-break-if-<:
29108 0x11/imm32/alloc-id:fake:payload
29109 0x11/imm32/alloc-id:fake
29110 _string-break-if-</imm32/name
29111 0/imm32/no-inouts
29112 0/imm32/no-inouts
29113 0/imm32/no-outputs
29114 0/imm32/no-outputs
29115 0x11/imm32/alloc-id:fake
29116 _string_0f_8c_jump_break/imm32/subx-name
29117 0/imm32/no-rm32
29118 0/imm32/no-r32
29119 0/imm32/no-imm32
29120 0/imm32/no-imm8
29121 0/imm32/no-disp32
29122 0/imm32/no-xm32
29123 0/imm32/no-x32
29124 0x11/imm32/alloc-id:fake
29125 _Primitive-break-if->=/imm32/next
29126 _Primitive-break-if->=:
29127 0x11/imm32/alloc-id:fake:payload
29128 0x11/imm32/alloc-id:fake
29129 _string-break-if->=/imm32/name
29130 0/imm32/no-inouts
29131 0/imm32/no-inouts
29132 0/imm32/no-outputs
29133 0/imm32/no-outputs
29134 0x11/imm32/alloc-id:fake
29135 _string_0f_8d_jump_break/imm32/subx-name
29136 0/imm32/no-rm32
29137 0/imm32/no-r32
29138 0/imm32/no-imm32
29139 0/imm32/no-imm8
29140 0/imm32/no-disp32
29141 0/imm32/no-xm32
29142 0/imm32/no-x32
29143 0x11/imm32/alloc-id:fake
29144 _Primitive-break-if-<=/imm32/next
29145 _Primitive-break-if-<=:
29146 0x11/imm32/alloc-id:fake:payload
29147 0x11/imm32/alloc-id:fake
29148 _string-break-if-<=/imm32/name
29149 0/imm32/no-inouts
29150 0/imm32/no-inouts
29151 0/imm32/no-outputs
29152 0/imm32/no-outputs
29153 0x11/imm32/alloc-id:fake
29154 _string_0f_8e_jump_break/imm32/subx-name
29155 0/imm32/no-rm32
29156 0/imm32/no-r32
29157 0/imm32/no-imm32
29158 0/imm32/no-imm8
29159 0/imm32/no-disp32
29160 0/imm32/no-xm32
29161 0/imm32/no-x32
29162 0x11/imm32/alloc-id:fake
29163 _Primitive-break-if->/imm32/next
29164 _Primitive-break-if->:
29165 0x11/imm32/alloc-id:fake:payload
29166 0x11/imm32/alloc-id:fake
29167 _string-break-if->/imm32/name
29168 0/imm32/no-inouts
29169 0/imm32/no-inouts
29170 0/imm32/no-outputs
29171 0/imm32/no-outputs
29172 0x11/imm32/alloc-id:fake
29173 _string_0f_8f_jump_break/imm32/subx-name
29174 0/imm32/no-rm32
29175 0/imm32/no-r32
29176 0/imm32/no-imm32
29177 0/imm32/no-imm8
29178 0/imm32/no-disp32
29179 0/imm32/no-xm32
29180 0/imm32/no-x32
29181 0x11/imm32/alloc-id:fake
29182 _Primitive-break/imm32/next
29183 _Primitive-break:
29184 0x11/imm32/alloc-id:fake:payload
29185 0x11/imm32/alloc-id:fake
29186 _string-break/imm32/name
29187 0/imm32/no-inouts
29188 0/imm32/no-inouts
29189 0/imm32/no-outputs
29190 0/imm32/no-outputs
29191 0x11/imm32/alloc-id:fake
29192 _string_e9_jump_break/imm32/subx-name
29193 0/imm32/no-rm32
29194 0/imm32/no-r32
29195 0/imm32/no-imm32
29196 0/imm32/no-imm8
29197 0/imm32/no-disp32
29198 0/imm32/no-xm32
29199 0/imm32/no-x32
29200 0x11/imm32/alloc-id:fake
29201 _Primitive-loop-if-addr</imm32/next
29202 _Primitive-loop-if-addr<:
29203 0x11/imm32/alloc-id:fake:payload
29204 0x11/imm32/alloc-id:fake
29205 _string-loop-if-addr</imm32/name
29206 0/imm32/no-inouts
29207 0/imm32/no-inouts
29208 0/imm32/no-outputs
29209 0/imm32/no-outputs
29210 0x11/imm32/alloc-id:fake
29211 _string_0f_82_jump_loop/imm32/subx-name
29212 0/imm32/no-rm32
29213 0/imm32/no-r32
29214 0/imm32/no-imm32
29215 0/imm32/no-imm8
29216 0/imm32/no-disp32
29217 0/imm32/no-xm32
29218 0/imm32/no-x32
29219 0x11/imm32/alloc-id:fake
29220 _Primitive-loop-if-addr>=/imm32/next
29221 _Primitive-loop-if-addr>=:
29222 0x11/imm32/alloc-id:fake:payload
29223 0x11/imm32/alloc-id:fake
29224 _string-loop-if-addr>=/imm32/name
29225 0/imm32/no-inouts
29226 0/imm32/no-inouts
29227 0/imm32/no-outputs
29228 0/imm32/no-outputs
29229 0x11/imm32/alloc-id:fake
29230 _string_0f_83_jump_loop/imm32/subx-name
29231 0/imm32/no-rm32
29232 0/imm32/no-r32
29233 0/imm32/no-imm32
29234 0/imm32/no-imm8
29235 0/imm32/no-disp32
29236 0/imm32/no-xm32
29237 0/imm32/no-x32
29238 0x11/imm32/alloc-id:fake
29239 _Primitive-loop-if-=/imm32/next
29240 _Primitive-loop-if-=:
29241 0x11/imm32/alloc-id:fake:payload
29242 0x11/imm32/alloc-id:fake
29243 _string-loop-if-=/imm32/name
29244 0/imm32/no-inouts
29245 0/imm32/no-inouts
29246 0/imm32/no-outputs
29247 0/imm32/no-outputs
29248 0x11/imm32/alloc-id:fake
29249 _string_0f_84_jump_loop/imm32/subx-name
29250 0/imm32/no-rm32
29251 0/imm32/no-r32
29252 0/imm32/no-imm32
29253 0/imm32/no-imm8
29254 0/imm32/no-disp32
29255 0/imm32/no-xm32
29256 0/imm32/no-x32
29257 0x11/imm32/alloc-id:fake
29258 _Primitive-loop-if-!=/imm32/next
29259 _Primitive-loop-if-!=:
29260 0x11/imm32/alloc-id:fake:payload
29261 0x11/imm32/alloc-id:fake
29262 _string-loop-if-!=/imm32/name
29263 0/imm32/no-inouts
29264 0/imm32/no-inouts
29265 0/imm32/no-outputs
29266 0/imm32/no-outputs
29267 0x11/imm32/alloc-id:fake
29268 _string_0f_85_jump_loop/imm32/subx-name
29269 0/imm32/no-rm32
29270 0/imm32/no-r32
29271 0/imm32/no-imm32
29272 0/imm32/no-imm8
29273 0/imm32/no-disp32
29274 0/imm32/no-xm32
29275 0/imm32/no-x32
29276 0x11/imm32/alloc-id:fake
29277 _Primitive-loop-if-addr<=/imm32/next
29278 _Primitive-loop-if-addr<=:
29279 0x11/imm32/alloc-id:fake:payload
29280 0x11/imm32/alloc-id:fake
29281 _string-loop-if-addr<=/imm32/name
29282 0/imm32/no-inouts
29283 0/imm32/no-inouts
29284 0/imm32/no-outputs
29285 0/imm32/no-outputs
29286 0x11/imm32/alloc-id:fake
29287 _string_0f_86_jump_loop/imm32/subx-name
29288 0/imm32/no-rm32
29289 0/imm32/no-r32
29290 0/imm32/no-imm32
29291 0/imm32/no-imm8
29292 0/imm32/no-disp32
29293 0/imm32/no-xm32
29294 0/imm32/no-x32
29295 0x11/imm32/alloc-id:fake
29296 _Primitive-loop-if-addr>/imm32/next
29297 _Primitive-loop-if-addr>:
29298 0x11/imm32/alloc-id:fake:payload
29299 0x11/imm32/alloc-id:fake
29300 _string-loop-if-addr>/imm32/name
29301 0/imm32/no-inouts
29302 0/imm32/no-inouts
29303 0/imm32/no-outputs
29304 0/imm32/no-outputs
29305 0x11/imm32/alloc-id:fake
29306 _string_0f_87_jump_loop/imm32/subx-name
29307 0/imm32/no-rm32
29308 0/imm32/no-r32
29309 0/imm32/no-imm32
29310 0/imm32/no-imm8
29311 0/imm32/no-disp32
29312 0/imm32/no-xm32
29313 0/imm32/no-x32
29314 0x11/imm32/alloc-id:fake
29315 _Primitive-loop-if-</imm32/next
29316 _Primitive-loop-if-<:
29317 0x11/imm32/alloc-id:fake:payload
29318 0x11/imm32/alloc-id:fake
29319 _string-loop-if-</imm32/name
29320 0/imm32/no-inouts
29321 0/imm32/no-inouts
29322 0/imm32/no-outputs
29323 0/imm32/no-outputs
29324 0x11/imm32/alloc-id:fake
29325 _string_0f_8c_jump_loop/imm32/subx-name
29326 0/imm32/no-rm32
29327 0/imm32/no-r32
29328 0/imm32/no-imm32
29329 0/imm32/no-imm8
29330 0/imm32/no-disp32
29331 0/imm32/no-xm32
29332 0/imm32/no-x32
29333 0x11/imm32/alloc-id:fake
29334 _Primitive-loop-if->=/imm32/next
29335 _Primitive-loop-if->=:
29336 0x11/imm32/alloc-id:fake:payload
29337 0x11/imm32/alloc-id:fake
29338 _string-loop-if->=/imm32/name
29339 0/imm32/no-inouts
29340 0/imm32/no-inouts
29341 0/imm32/no-outputs
29342 0/imm32/no-outputs
29343 0x11/imm32/alloc-id:fake
29344 _string_0f_8d_jump_loop/imm32/subx-name
29345 0/imm32/no-rm32
29346 0/imm32/no-r32
29347 0/imm32/no-imm32
29348 0/imm32/no-imm8
29349 0/imm32/no-disp32
29350 0/imm32/no-xm32
29351 0/imm32/no-x32
29352 0x11/imm32/alloc-id:fake
29353 _Primitive-loop-if-<=/imm32/next
29354 _Primitive-loop-if-<=:
29355 0x11/imm32/alloc-id:fake:payload
29356 0x11/imm32/alloc-id:fake
29357 _string-loop-if-<=/imm32/name
29358 0/imm32/no-inouts
29359 0/imm32/no-inouts
29360 0/imm32/no-outputs
29361 0/imm32/no-outputs
29362 0x11/imm32/alloc-id:fake
29363 _string_0f_8e_jump_loop/imm32/subx-name
29364 0/imm32/no-rm32
29365 0/imm32/no-r32
29366 0/imm32/no-imm32
29367 0/imm32/no-imm8
29368 0/imm32/no-disp32
29369 0/imm32/no-xm32
29370 0/imm32/no-x32
29371 0x11/imm32/alloc-id:fake
29372 _Primitive-loop-if->/imm32/next
29373 _Primitive-loop-if->:
29374 0x11/imm32/alloc-id:fake:payload
29375 0x11/imm32/alloc-id:fake
29376 _string-loop-if->/imm32/name
29377 0/imm32/no-inouts
29378 0/imm32/no-inouts
29379 0/imm32/no-outputs
29380 0/imm32/no-outputs
29381 0x11/imm32/alloc-id:fake
29382 _string_0f_8f_jump_loop/imm32/subx-name
29383 0/imm32/no-rm32
29384 0/imm32/no-r32
29385 0/imm32/no-imm32
29386 0/imm32/no-imm8
29387 0/imm32/no-disp32
29388 0/imm32/no-xm32
29389 0/imm32/no-x32
29390 0x11/imm32/alloc-id:fake
29391 _Primitive-loop/imm32/next
29392 _Primitive-loop:
29393 0x11/imm32/alloc-id:fake:payload
29394 0x11/imm32/alloc-id:fake
29395 _string-loop/imm32/name
29396 0/imm32/no-inouts
29397 0/imm32/no-inouts
29398 0/imm32/no-outputs
29399 0/imm32/no-outputs
29400 0x11/imm32/alloc-id:fake
29401 _string_e9_jump_loop/imm32/subx-name
29402 0/imm32/no-rm32
29403 0/imm32/no-r32
29404 0/imm32/no-imm32
29405 0/imm32/no-imm8
29406 0/imm32/no-disp32
29407 0/imm32/no-xm32
29408 0/imm32/no-x32
29409 0x11/imm32/alloc-id:fake
29410 _Primitive-break-if-addr<-named/imm32/next
29411
29412 _Primitive-break-if-addr<-named:
29413 0x11/imm32/alloc-id:fake:payload
29414 0x11/imm32/alloc-id:fake
29415 _string-break-if-addr</imm32/name
29416 0x11/imm32/alloc-id:fake
29417 Single-lit-var/imm32/inouts
29418 0/imm32/no-outputs
29419 0/imm32/no-outputs
29420 0x11/imm32/alloc-id:fake
29421 _string_0f_82_jump_label/imm32/subx-name
29422 0/imm32/no-rm32
29423 0/imm32/no-r32
29424 0/imm32/no-imm32
29425 0/imm32/no-imm8
29426 1/imm32/disp32-is-first-inout
29427 0/imm32/no-xm32
29428 0/imm32/no-x32
29429 0x11/imm32/alloc-id:fake
29430 _Primitive-break-if-addr>=-named/imm32/next
29431 _Primitive-break-if-addr>=-named:
29432 0x11/imm32/alloc-id:fake:payload
29433 0x11/imm32/alloc-id:fake
29434 _string-break-if-addr>=/imm32/name
29435 0x11/imm32/alloc-id:fake
29436 Single-lit-var/imm32/inouts
29437 0/imm32/no-outputs
29438 0/imm32/no-outputs
29439 0x11/imm32/alloc-id:fake
29440 _string_0f_83_jump_label/imm32/subx-name
29441 0/imm32/no-rm32
29442 0/imm32/no-r32
29443 0/imm32/no-imm32
29444 0/imm32/no-imm8
29445 1/imm32/disp32-is-first-inout
29446 0/imm32/no-xm32
29447 0/imm32/no-x32
29448 0x11/imm32/alloc-id:fake
29449 _Primitive-break-if-=-named/imm32/next
29450 _Primitive-break-if-=-named:
29451 0x11/imm32/alloc-id:fake:payload
29452 0x11/imm32/alloc-id:fake
29453 _string-break-if-=/imm32/name
29454 0x11/imm32/alloc-id:fake
29455 Single-lit-var/imm32/inouts
29456 0/imm32/no-outputs
29457 0/imm32/no-outputs
29458 0x11/imm32/alloc-id:fake
29459 _string_0f_84_jump_label/imm32/subx-name
29460 0/imm32/no-rm32
29461 0/imm32/no-r32
29462 0/imm32/no-imm32
29463 0/imm32/no-imm8
29464 1/imm32/disp32-is-first-inout
29465 0/imm32/no-xm32
29466 0/imm32/no-x32
29467 0x11/imm32/alloc-id:fake
29468 _Primitive-break-if-!=-named/imm32/next
29469 _Primitive-break-if-!=-named:
29470 0x11/imm32/alloc-id:fake:payload
29471 0x11/imm32/alloc-id:fake
29472 _string-break-if-!=/imm32/name
29473 0x11/imm32/alloc-id:fake
29474 Single-lit-var/imm32/inouts
29475 0/imm32/no-outputs
29476 0/imm32/no-outputs
29477 0x11/imm32/alloc-id:fake
29478 _string_0f_85_jump_label/imm32/subx-name
29479 0/imm32/no-rm32
29480 0/imm32/no-r32
29481 0/imm32/no-imm32
29482 0/imm32/no-imm8
29483 1/imm32/disp32-is-first-inout
29484 0/imm32/no-xm32
29485 0/imm32/no-x32
29486 0x11/imm32/alloc-id:fake
29487 _Primitive-break-if-addr<=-named/imm32/next
29488 _Primitive-break-if-addr<=-named:
29489 0x11/imm32/alloc-id:fake:payload
29490 0x11/imm32/alloc-id:fake
29491 _string-break-if-addr<=/imm32/name
29492 0x11/imm32/alloc-id:fake
29493 Single-lit-var/imm32/inouts
29494 0/imm32/no-outputs
29495 0/imm32/no-outputs
29496 0x11/imm32/alloc-id:fake
29497 _string_0f_86_jump_label/imm32/subx-name
29498 0/imm32/no-rm32
29499 0/imm32/no-r32
29500 0/imm32/no-imm32
29501 0/imm32/no-imm8
29502 1/imm32/disp32-is-first-inout
29503 0/imm32/no-xm32
29504 0/imm32/no-x32
29505 0x11/imm32/alloc-id:fake
29506 _Primitive-break-if-addr>-named/imm32/next
29507 _Primitive-break-if-addr>-named:
29508 0x11/imm32/alloc-id:fake:payload
29509 0x11/imm32/alloc-id:fake
29510 _string-break-if-addr>/imm32/name
29511 0x11/imm32/alloc-id:fake
29512 Single-lit-var/imm32/inouts
29513 0/imm32/no-outputs
29514 0/imm32/no-outputs
29515 0x11/imm32/alloc-id:fake
29516 _string_0f_87_jump_label/imm32/subx-name
29517 0/imm32/no-rm32
29518 0/imm32/no-r32
29519 0/imm32/no-imm32
29520 0/imm32/no-imm8
29521 1/imm32/disp32-is-first-inout
29522 0/imm32/no-xm32
29523 0/imm32/no-x32
29524 0x11/imm32/alloc-id:fake
29525 _Primitive-break-if-<-named/imm32/next
29526 _Primitive-break-if-<-named:
29527 0x11/imm32/alloc-id:fake:payload
29528 0x11/imm32/alloc-id:fake
29529 _string-break-if-</imm32/name
29530 0x11/imm32/alloc-id:fake
29531 Single-lit-var/imm32/inouts
29532 0/imm32/no-outputs
29533 0/imm32/no-outputs
29534 0x11/imm32/alloc-id:fake
29535 _string_0f_8c_jump_label/imm32/subx-name
29536 0/imm32/no-rm32
29537 0/imm32/no-r32
29538 0/imm32/no-imm32
29539 0/imm32/no-imm8
29540 1/imm32/disp32-is-first-inout
29541 0/imm32/no-xm32
29542 0/imm32/no-x32
29543 0x11/imm32/alloc-id:fake
29544 _Primitive-break-if->=-named/imm32/next
29545 _Primitive-break-if->=-named:
29546 0x11/imm32/alloc-id:fake:payload
29547 0x11/imm32/alloc-id:fake
29548 _string-break-if->=/imm32/name
29549 0x11/imm32/alloc-id:fake
29550 Single-lit-var/imm32/inouts
29551 0/imm32/no-outputs
29552 0/imm32/no-outputs
29553 0x11/imm32/alloc-id:fake
29554 _string_0f_8d_jump_label/imm32/subx-name
29555 0/imm32/no-rm32
29556 0/imm32/no-r32
29557 0/imm32/no-imm32
29558 0/imm32/no-imm8
29559 1/imm32/disp32-is-first-inout
29560 0/imm32/no-xm32
29561 0/imm32/no-x32
29562 0x11/imm32/alloc-id:fake
29563 _Primitive-break-if-<=-named/imm32/next
29564 _Primitive-break-if-<=-named:
29565 0x11/imm32/alloc-id:fake:payload
29566 0x11/imm32/alloc-id:fake
29567 _string-break-if-<=/imm32/name
29568 0x11/imm32/alloc-id:fake
29569 Single-lit-var/imm32/inouts
29570 0/imm32/no-outputs
29571 0/imm32/no-outputs
29572 0x11/imm32/alloc-id:fake
29573 _string_0f_8e_jump_label/imm32/subx-name
29574 0/imm32/no-rm32
29575 0/imm32/no-r32
29576 0/imm32/no-imm32
29577 0/imm32/no-imm8
29578 1/imm32/disp32-is-first-inout
29579 0/imm32/no-xm32
29580 0/imm32/no-x32
29581 0x11/imm32/alloc-id:fake
29582 _Primitive-break-if->-named/imm32/next
29583 _Primitive-break-if->-named:
29584 0x11/imm32/alloc-id:fake:payload
29585 0x11/imm32/alloc-id:fake
29586 _string-break-if->/imm32/name
29587 0x11/imm32/alloc-id:fake
29588 Single-lit-var/imm32/inouts
29589 0/imm32/no-outputs
29590 0/imm32/no-outputs
29591 0x11/imm32/alloc-id:fake
29592 _string_0f_8f_jump_label/imm32/subx-name
29593 0/imm32/no-rm32
29594 0/imm32/no-r32
29595 0/imm32/no-imm32
29596 0/imm32/no-imm8
29597 1/imm32/disp32-is-first-inout
29598 0/imm32/no-xm32
29599 0/imm32/no-x32
29600 0x11/imm32/alloc-id:fake
29601 _Primitive-break-named/imm32/next
29602 _Primitive-break-named:
29603 0x11/imm32/alloc-id:fake:payload
29604 0x11/imm32/alloc-id:fake
29605 _string-break/imm32/name
29606 0x11/imm32/alloc-id:fake
29607 Single-lit-var/imm32/inouts
29608 0/imm32/no-outputs
29609 0/imm32/no-outputs
29610 0x11/imm32/alloc-id:fake
29611 _string_e9_jump_label/imm32/subx-name
29612 0/imm32/no-rm32
29613 0/imm32/no-r32
29614 0/imm32/no-imm32
29615 0/imm32/no-imm8
29616 1/imm32/disp32-is-first-inout
29617 0/imm32/no-xm32
29618 0/imm32/no-x32
29619 0x11/imm32/alloc-id:fake
29620 _Primitive-loop-if-addr<-named/imm32/next
29621 _Primitive-loop-if-addr<-named:
29622 0x11/imm32/alloc-id:fake:payload
29623 0x11/imm32/alloc-id:fake
29624 _string-loop-if-addr</imm32/name
29625 0x11/imm32/alloc-id:fake
29626 Single-lit-var/imm32/inouts
29627 0/imm32/no-outputs
29628 0/imm32/no-outputs
29629 0x11/imm32/alloc-id:fake
29630 _string_0f_82_jump_label/imm32/subx-name
29631 0/imm32/no-rm32
29632 0/imm32/no-r32
29633 0/imm32/no-imm32
29634 0/imm32/no-imm8
29635 1/imm32/disp32-is-first-inout
29636 0/imm32/no-xm32
29637 0/imm32/no-x32
29638 0x11/imm32/alloc-id:fake
29639 _Primitive-loop-if-addr>=-named/imm32/next
29640 _Primitive-loop-if-addr>=-named:
29641 0x11/imm32/alloc-id:fake:payload
29642 0x11/imm32/alloc-id:fake
29643 _string-loop-if-addr>=/imm32/name
29644 0x11/imm32/alloc-id:fake
29645 Single-lit-var/imm32/inouts
29646 0/imm32/no-outputs
29647 0/imm32/no-outputs
29648 0x11/imm32/alloc-id:fake
29649 _string_0f_83_jump_label/imm32/subx-name
29650 0/imm32/no-rm32
29651 0/imm32/no-r32
29652 0/imm32/no-imm32
29653 0/imm32/no-imm8
29654 1/imm32/disp32-is-first-inout
29655 0/imm32/no-xm32
29656 0/imm32/no-x32
29657 0x11/imm32/alloc-id:fake
29658 _Primitive-loop-if-=-named/imm32/next
29659 _Primitive-loop-if-=-named:
29660 0x11/imm32/alloc-id:fake:payload
29661 0x11/imm32/alloc-id:fake
29662 _string-loop-if-=/imm32/name
29663 0x11/imm32/alloc-id:fake
29664 Single-lit-var/imm32/inouts
29665 0/imm32/no-outputs
29666 0/imm32/no-outputs
29667 0x11/imm32/alloc-id:fake
29668 _string_0f_84_jump_label/imm32/subx-name
29669 0/imm32/no-rm32
29670 0/imm32/no-r32
29671 0/imm32/no-imm32
29672 0/imm32/no-imm8
29673 1/imm32/disp32-is-first-inout
29674 0/imm32/no-xm32
29675 0/imm32/no-x32
29676 0x11/imm32/alloc-id:fake
29677 _Primitive-loop-if-!=-named/imm32/next
29678 _Primitive-loop-if-!=-named:
29679 0x11/imm32/alloc-id:fake:payload
29680 0x11/imm32/alloc-id:fake
29681 _string-loop-if-!=/imm32/name
29682 0x11/imm32/alloc-id:fake
29683 Single-lit-var/imm32/inouts
29684 0/imm32/no-outputs
29685 0/imm32/no-outputs
29686 0x11/imm32/alloc-id:fake
29687 _string_0f_85_jump_label/imm32/subx-name
29688 0/imm32/no-rm32
29689 0/imm32/no-r32
29690 0/imm32/no-imm32
29691 0/imm32/no-imm8
29692 1/imm32/disp32-is-first-inout
29693 0/imm32/no-xm32
29694 0/imm32/no-x32
29695 0x11/imm32/alloc-id:fake
29696 _Primitive-loop-if-addr<=-named/imm32/next
29697 _Primitive-loop-if-addr<=-named:
29698 0x11/imm32/alloc-id:fake:payload
29699 0x11/imm32/alloc-id:fake
29700 _string-loop-if-addr<=/imm32/name
29701 0x11/imm32/alloc-id:fake
29702 Single-lit-var/imm32/inouts
29703 0/imm32/no-outputs
29704 0/imm32/no-outputs
29705 0x11/imm32/alloc-id:fake
29706 _string_0f_86_jump_label/imm32/subx-name
29707 0/imm32/no-rm32
29708 0/imm32/no-r32
29709 0/imm32/no-imm32
29710 0/imm32/no-imm8
29711 1/imm32/disp32-is-first-inout
29712 0/imm32/no-xm32
29713 0/imm32/no-x32
29714 0x11/imm32/alloc-id:fake
29715 _Primitive-loop-if-addr>-named/imm32/next
29716 _Primitive-loop-if-addr>-named:
29717 0x11/imm32/alloc-id:fake:payload
29718 0x11/imm32/alloc-id:fake
29719 _string-loop-if-addr>/imm32/name
29720 0x11/imm32/alloc-id:fake
29721 Single-lit-var/imm32/inouts
29722 0/imm32/no-outputs
29723 0/imm32/no-outputs
29724 0x11/imm32/alloc-id:fake
29725 _string_0f_87_jump_label/imm32/subx-name
29726 0/imm32/no-rm32
29727 0/imm32/no-r32
29728 0/imm32/no-imm32
29729 0/imm32/no-imm8
29730 1/imm32/disp32-is-first-inout
29731 0/imm32/no-xm32
29732 0/imm32/no-x32
29733 0x11/imm32/alloc-id:fake
29734 _Primitive-loop-if-<-named/imm32/next
29735 _Primitive-loop-if-<-named:
29736 0x11/imm32/alloc-id:fake:payload
29737 0x11/imm32/alloc-id:fake
29738 _string-loop-if-</imm32/name
29739 0x11/imm32/alloc-id:fake
29740 Single-lit-var/imm32/inouts
29741 0/imm32/no-outputs
29742 0/imm32/no-outputs
29743 0x11/imm32/alloc-id:fake
29744 _string_0f_8c_jump_label/imm32/subx-name
29745 0/imm32/no-rm32
29746 0/imm32/no-r32
29747 0/imm32/no-imm32
29748 0/imm32/no-imm8
29749 1/imm32/disp32-is-first-inout
29750 0/imm32/no-xm32
29751 0/imm32/no-x32
29752 0x11/imm32/alloc-id:fake
29753 _Primitive-loop-if->=-named/imm32/next
29754 _Primitive-loop-if->=-named:
29755 0x11/imm32/alloc-id:fake:payload
29756 0x11/imm32/alloc-id:fake
29757 _string-loop-if->=/imm32/name
29758 0x11/imm32/alloc-id:fake
29759 Single-lit-var/imm32/inouts
29760 0/imm32/no-outputs
29761 0/imm32/no-outputs
29762 0x11/imm32/alloc-id:fake
29763 _string_0f_8d_jump_label/imm32/subx-name
29764 0/imm32/no-rm32
29765 0/imm32/no-r32
29766 0/imm32/no-imm32
29767 0/imm32/no-imm8
29768 1/imm32/disp32-is-first-inout
29769 0/imm32/no-xm32
29770 0/imm32/no-x32
29771 0x11/imm32/alloc-id:fake
29772 _Primitive-loop-if-<=-named/imm32/next
29773 _Primitive-loop-if-<=-named:
29774 0x11/imm32/alloc-id:fake:payload
29775 0x11/imm32/alloc-id:fake
29776 _string-loop-if-<=/imm32/name
29777 0x11/imm32/alloc-id:fake
29778 Single-lit-var/imm32/inouts
29779 0/imm32/no-outputs
29780 0/imm32/no-outputs
29781 0x11/imm32/alloc-id:fake
29782 _string_0f_8e_jump_label/imm32/subx-name
29783 0/imm32/no-rm32
29784 0/imm32/no-r32
29785 0/imm32/no-imm32
29786 0/imm32/no-imm8
29787 1/imm32/disp32-is-first-inout
29788 0/imm32/no-xm32
29789 0/imm32/no-x32
29790 0x11/imm32/alloc-id:fake
29791 _Primitive-loop-if->-named/imm32/next
29792 _Primitive-loop-if->-named:
29793 0x11/imm32/alloc-id:fake:payload
29794 0x11/imm32/alloc-id:fake
29795 _string-loop-if->/imm32/name
29796 0x11/imm32/alloc-id:fake
29797 Single-lit-var/imm32/inouts
29798 0/imm32/no-outputs
29799 0/imm32/no-outputs
29800 0x11/imm32/alloc-id:fake
29801 _string_0f_8f_jump_label/imm32/subx-name
29802 0/imm32/no-rm32
29803 0/imm32/no-r32
29804 0/imm32/no-imm32
29805 0/imm32/no-imm8
29806 1/imm32/disp32-is-first-inout
29807 0/imm32/no-xm32
29808 0/imm32/no-x32
29809 0x11/imm32/alloc-id:fake
29810 _Primitive-loop-named/imm32/next
29811 _Primitive-loop-named:
29812 0x11/imm32/alloc-id:fake:payload
29813 0x11/imm32/alloc-id:fake
29814 _string-loop/imm32/name
29815 0x11/imm32/alloc-id:fake
29816 Single-lit-var/imm32/inouts
29817 0/imm32/no-outputs
29818 0/imm32/no-outputs
29819 0x11/imm32/alloc-id:fake
29820 _string_e9_jump_label/imm32/subx-name
29821 0/imm32/no-rm32
29822 0/imm32/no-r32
29823 0/imm32/no-imm32
29824 0/imm32/no-imm8
29825 1/imm32/disp32-is-first-inout
29826 0/imm32/no-xm32
29827 0/imm32/no-x32
29828 0x11/imm32/alloc-id:fake
29829 _Primitive-break-if-float</imm32/next
29830
29831 _Primitive-break-if-float<:
29832 0x11/imm32/alloc-id:fake:payload
29833 0x11/imm32/alloc-id:fake
29834 _string-break-if-float</imm32/name
29835 0/imm32/no-inouts
29836 0/imm32/no-inouts
29837 0/imm32/no-outputs
29838 0/imm32/no-outputs
29839 0x11/imm32/alloc-id:fake
29840 _string_0f_82_jump_break/imm32/subx-name
29841 0/imm32/no-rm32
29842 0/imm32/no-r32
29843 0/imm32/no-imm32
29844 0/imm32/no-imm8
29845 0/imm32/no-disp32
29846 0/imm32/no-xm32
29847 0/imm32/no-x32
29848 0x11/imm32/alloc-id:fake
29849 _Primitive-break-if-float>=/imm32/next
29850 _Primitive-break-if-float>=:
29851 0x11/imm32/alloc-id:fake:payload
29852 0x11/imm32/alloc-id:fake
29853 _string-break-if-float>=/imm32/name
29854 0/imm32/no-inouts
29855 0/imm32/no-inouts
29856 0/imm32/no-outputs
29857 0/imm32/no-outputs
29858 0x11/imm32/alloc-id:fake
29859 _string_0f_83_jump_break/imm32/subx-name
29860 0/imm32/no-rm32
29861 0/imm32/no-r32
29862 0/imm32/no-imm32
29863 0/imm32/no-imm8
29864 0/imm32/no-disp32
29865 0/imm32/no-xm32
29866 0/imm32/no-x32
29867 0x11/imm32/alloc-id:fake
29868 _Primitive-break-if-float<=/imm32/next
29869 _Primitive-break-if-float<=:
29870 0x11/imm32/alloc-id:fake:payload
29871 0x11/imm32/alloc-id:fake
29872 _string-break-if-float<=/imm32/name
29873 0/imm32/no-inouts
29874 0/imm32/no-inouts
29875 0/imm32/no-outputs
29876 0/imm32/no-outputs
29877 0x11/imm32/alloc-id:fake
29878 _string_0f_86_jump_break/imm32/subx-name
29879 0/imm32/no-rm32
29880 0/imm32/no-r32
29881 0/imm32/no-imm32
29882 0/imm32/no-imm8
29883 0/imm32/no-disp32
29884 0/imm32/no-xm32
29885 0/imm32/no-x32
29886 0x11/imm32/alloc-id:fake
29887 _Primitive-break-if-float>/imm32/next
29888 _Primitive-break-if-float>:
29889 0x11/imm32/alloc-id:fake:payload
29890 0x11/imm32/alloc-id:fake
29891 _string-break-if-float>/imm32/name
29892 0/imm32/no-inouts
29893 0/imm32/no-inouts
29894 0/imm32/no-outputs
29895 0/imm32/no-outputs
29896 0x11/imm32/alloc-id:fake
29897 _string_0f_87_jump_break/imm32/subx-name
29898 0/imm32/no-rm32
29899 0/imm32/no-r32
29900 0/imm32/no-imm32
29901 0/imm32/no-imm8
29902 0/imm32/no-disp32
29903 0/imm32/no-xm32
29904 0/imm32/no-x32
29905 0x11/imm32/alloc-id:fake
29906 _Primitive-loop-if-float</imm32/next
29907 _Primitive-loop-if-float<:
29908 0x11/imm32/alloc-id:fake:payload
29909 0x11/imm32/alloc-id:fake
29910 _string-loop-if-float</imm32/name
29911 0/imm32/no-inouts
29912 0/imm32/no-inouts
29913 0/imm32/no-outputs
29914 0/imm32/no-outputs
29915 0x11/imm32/alloc-id:fake
29916 _string_0f_82_jump_loop/imm32/subx-name
29917 0/imm32/no-rm32
29918 0/imm32/no-r32
29919 0/imm32/no-imm32
29920 0/imm32/no-imm8
29921 0/imm32/no-disp32
29922 0/imm32/no-xm32
29923 0/imm32/no-x32
29924 0x11/imm32/alloc-id:fake
29925 _Primitive-loop-if-float>=/imm32/next
29926 _Primitive-loop-if-float>=:
29927 0x11/imm32/alloc-id:fake:payload
29928 0x11/imm32/alloc-id:fake
29929 _string-loop-if-float>=/imm32/name
29930 0/imm32/no-inouts
29931 0/imm32/no-inouts
29932 0/imm32/no-outputs
29933 0/imm32/no-outputs
29934 0x11/imm32/alloc-id:fake
29935 _string_0f_83_jump_loop/imm32/subx-name
29936 0/imm32/no-rm32
29937 0/imm32/no-r32
29938 0/imm32/no-imm32
29939 0/imm32/no-imm8
29940 0/imm32/no-disp32
29941 0/imm32/no-xm32
29942 0/imm32/no-x32
29943 0x11/imm32/alloc-id:fake
29944 _Primitive-loop-if-float<=/imm32/next
29945 _Primitive-loop-if-float<=:
29946 0x11/imm32/alloc-id:fake:payload
29947 0x11/imm32/alloc-id:fake
29948 _string-loop-if-float<=/imm32/name
29949 0/imm32/no-inouts
29950 0/imm32/no-inouts
29951 0/imm32/no-outputs
29952 0/imm32/no-outputs
29953 0x11/imm32/alloc-id:fake
29954 _string_0f_86_jump_loop/imm32/subx-name
29955 0/imm32/no-rm32
29956 0/imm32/no-r32
29957 0/imm32/no-imm32
29958 0/imm32/no-imm8
29959 0/imm32/no-disp32
29960 0/imm32/no-xm32
29961 0/imm32/no-x32
29962 0x11/imm32/alloc-id:fake
29963 _Primitive-loop-if-float>/imm32/next
29964 _Primitive-loop-if-float>:
29965 0x11/imm32/alloc-id:fake:payload
29966 0x11/imm32/alloc-id:fake
29967 _string-loop-if-float>/imm32/name
29968 0/imm32/no-inouts
29969 0/imm32/no-inouts
29970 0/imm32/no-outputs
29971 0/imm32/no-outputs
29972 0x11/imm32/alloc-id:fake
29973 _string_0f_87_jump_loop/imm32/subx-name
29974 0/imm32/no-rm32
29975 0/imm32/no-r32
29976 0/imm32/no-imm32
29977 0/imm32/no-imm8
29978 0/imm32/no-disp32
29979 0/imm32/no-xm32
29980 0/imm32/no-x32
29981 0x11/imm32/alloc-id:fake
29982 _Primitive-break-if-float<-named/imm32/next
29983 _Primitive-break-if-float<-named:
29984 0x11/imm32/alloc-id:fake:payload
29985 0x11/imm32/alloc-id:fake
29986 _string-break-if-float</imm32/name
29987 0x11/imm32/alloc-id:fake
29988 Single-lit-var/imm32/inouts
29989 0/imm32/no-outputs
29990 0/imm32/no-outputs
29991 0x11/imm32/alloc-id:fake
29992 _string_0f_82_jump_label/imm32/subx-name
29993 0/imm32/no-rm32
29994 0/imm32/no-r32
29995 0/imm32/no-imm32
29996 0/imm32/no-imm8
29997 1/imm32/disp32-is-first-inout
29998 0/imm32/no-xm32
29999 0/imm32/no-x32
30000 0x11/imm32/alloc-id:fake
30001 _Primitive-break-if-float>=-named/imm32/next
30002 _Primitive-break-if-float>=-named:
30003 0x11/imm32/alloc-id:fake:payload
30004 0x11/imm32/alloc-id:fake
30005 _string-break-if-float>=/imm32/name
30006 0x11/imm32/alloc-id:fake
30007 Single-lit-var/imm32/inouts
30008 0/imm32/no-outputs
30009 0/imm32/no-outputs
30010 0x11/imm32/alloc-id:fake
30011 _string_0f_83_jump_label/imm32/subx-name
30012 0/imm32/no-rm32
30013 0/imm32/no-r32
30014 0/imm32/no-imm32
30015 0/imm32/no-imm8
30016 1/imm32/disp32-is-first-inout
30017 0/imm32/no-xm32
30018 0/imm32/no-x32
30019 0x11/imm32/alloc-id:fake
30020 _Primitive-break-if-float<=-named/imm32/next
30021 _Primitive-break-if-float<=-named:
30022 0x11/imm32/alloc-id:fake:payload
30023 0x11/imm32/alloc-id:fake
30024 _string-break-if-float<=/imm32/name
30025 0x11/imm32/alloc-id:fake
30026 Single-lit-var/imm32/inouts
30027 0/imm32/no-outputs
30028 0/imm32/no-outputs
30029 0x11/imm32/alloc-id:fake
30030 _string_0f_86_jump_label/imm32/subx-name
30031 0/imm32/no-rm32
30032 0/imm32/no-r32
30033 0/imm32/no-imm32
30034 0/imm32/no-imm8
30035 1/imm32/disp32-is-first-inout
30036 0/imm32/no-xm32
30037 0/imm32/no-x32
30038 0x11/imm32/alloc-id:fake
30039 _Primitive-break-if-float>-named/imm32/next
30040 _Primitive-break-if-float>-named:
30041 0x11/imm32/alloc-id:fake:payload
30042 0x11/imm32/alloc-id:fake
30043 _string-break-if-float>/imm32/name
30044 0x11/imm32/alloc-id:fake
30045 Single-lit-var/imm32/inouts
30046 0/imm32/no-outputs
30047 0/imm32/no-outputs
30048 0x11/imm32/alloc-id:fake
30049 _string_0f_87_jump_label/imm32/subx-name
30050 0/imm32/no-rm32
30051 0/imm32/no-r32
30052 0/imm32/no-imm32
30053 0/imm32/no-imm8
30054 1/imm32/disp32-is-first-inout
30055 0/imm32/no-xm32
30056 0/imm32/no-x32
30057 0x11/imm32/alloc-id:fake
30058 _Primitive-loop-if-float<-named/imm32/next
30059 _Primitive-loop-if-float<-named:
30060 0x11/imm32/alloc-id:fake:payload
30061 0x11/imm32/alloc-id:fake
30062 _string-loop-if-float</imm32/name
30063 0x11/imm32/alloc-id:fake
30064 Single-lit-var/imm32/inouts
30065 0/imm32/no-outputs
30066 0/imm32/no-outputs
30067 0x11/imm32/alloc-id:fake
30068 _string_0f_82_jump_label/imm32/subx-name
30069 0/imm32/no-rm32
30070 0/imm32/no-r32
30071 0/imm32/no-imm32
30072 0/imm32/no-imm8
30073 1/imm32/disp32-is-first-inout
30074 0/imm32/no-xm32
30075 0/imm32/no-x32
30076 0x11/imm32/alloc-id:fake
30077 _Primitive-loop-if-float>=-named/imm32/next
30078 _Primitive-loop-if-float>=-named:
30079 0x11/imm32/alloc-id:fake:payload
30080 0x11/imm32/alloc-id:fake
30081 _string-loop-if-float>=/imm32/name
30082 0x11/imm32/alloc-id:fake
30083 Single-lit-var/imm32/inouts
30084 0/imm32/no-outputs
30085 0/imm32/no-outputs
30086 0x11/imm32/alloc-id:fake
30087 _string_0f_83_jump_label/imm32/subx-name
30088 0/imm32/no-rm32
30089 0/imm32/no-r32
30090 0/imm32/no-imm32
30091 0/imm32/no-imm8
30092 1/imm32/disp32-is-first-inout
30093 0/imm32/no-xm32
30094 0/imm32/no-x32
30095 0x11/imm32/alloc-id:fake
30096 _Primitive-loop-if-float<=-named/imm32/next
30097 _Primitive-loop-if-float<=-named:
30098 0x11/imm32/alloc-id:fake:payload
30099 0x11/imm32/alloc-id:fake
30100 _string-loop-if-float<=/imm32/name
30101 0x11/imm32/alloc-id:fake
30102 Single-lit-var/imm32/inouts
30103 0/imm32/no-outputs
30104 0/imm32/no-outputs
30105 0x11/imm32/alloc-id:fake
30106 _string_0f_86_jump_label/imm32/subx-name
30107 0/imm32/no-rm32
30108 0/imm32/no-r32
30109 0/imm32/no-imm32
30110 0/imm32/no-imm8
30111 1/imm32/disp32-is-first-inout
30112 0/imm32/no-xm32
30113 0/imm32/no-x32
30114 0x11/imm32/alloc-id:fake
30115 _Primitive-loop-if-float>-named/imm32/next
30116 _Primitive-loop-if-float>-named:
30117 0x11/imm32/alloc-id:fake:payload
30118 0x11/imm32/alloc-id:fake
30119 _string-loop-if-float>/imm32/name
30120 0x11/imm32/alloc-id:fake
30121 Single-lit-var/imm32/inouts
30122 0/imm32/no-outputs
30123 0/imm32/no-outputs
30124 0x11/imm32/alloc-id:fake
30125 _string_0f_87_jump_label/imm32/subx-name
30126 0/imm32/no-rm32
30127 0/imm32/no-r32
30128 0/imm32/no-imm32
30129 0/imm32/no-imm8
30130 1/imm32/disp32-is-first-inout
30131 0/imm32/no-xm32
30132 0/imm32/no-x32
30133 0/imm32/next
30134 0/imm32/next
30135
30136
30137 _string-add:
30138 0x11/imm32/alloc-id:fake:payload
30139
30140 0x3/imm32/size
30141 0x61/a 0x64/d 0x64/d
30142 _string-address:
30143 0x11/imm32/alloc-id:fake:payload
30144
30145 0x7/imm32/size
30146 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
30147 _string-add-to:
30148 0x11/imm32/alloc-id:fake:payload
30149
30150 0x6/imm32/size
30151 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
30152 _string-and:
30153 0x11/imm32/alloc-id:fake:payload
30154
30155 0x3/imm32/size
30156 0x61/a 0x6e/n 0x64/d
30157 _string-and-with:
30158 0x11/imm32/alloc-id:fake:payload
30159
30160 0x8/imm32/size
30161 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
30162 _string-break:
30163 0x11/imm32/alloc-id:fake:payload
30164
30165 0x5/imm32/size
30166 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k
30167 _string-break-if-<:
30168 0x11/imm32/alloc-id:fake:payload
30169
30170 0xa/imm32/size
30171 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
30172 _string-break-if-<=:
30173 0x11/imm32/alloc-id:fake:payload
30174
30175 0xb/imm32/size
30176 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
30177 _string-break-if-=:
30178 0x11/imm32/alloc-id:fake:payload
30179
30180 0xa/imm32/size
30181 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
30182 _string-break-if->:
30183 0x11/imm32/alloc-id:fake:payload
30184
30185 0xa/imm32/size
30186 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
30187 _string-break-if->=:
30188 0x11/imm32/alloc-id:fake:payload
30189
30190 0xb/imm32/size
30191 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
30192 _string-break-if-!=:
30193 0x11/imm32/alloc-id:fake:payload
30194
30195 0xb/imm32/size
30196 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
30197 _string-break-if-addr<:
30198 0x11/imm32/alloc-id:fake:payload
30199
30200 0xe/imm32/size
30201 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/<
30202 _string-break-if-addr<=:
30203 0x11/imm32/alloc-id:fake:payload
30204
30205 0xf/imm32/size
30206 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/=
30207 _string-break-if-addr>:
30208 0x11/imm32/alloc-id:fake:payload
30209
30210 0xe/imm32/size
30211 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/>
30212 _string-break-if-addr>=:
30213 0x11/imm32/alloc-id:fake:payload
30214
30215 0xf/imm32/size
30216 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/=
30217 _string-break-if-float<:
30218 0x11/imm32/alloc-id:fake:payload
30219
30220 0xf/imm32/size
30221 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3c/<
30222 _string-break-if-float<=:
30223 0x11/imm32/alloc-id:fake:payload
30224
30225 0x10/imm32/size
30226 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3c/< 0x3d/=
30227 _string-break-if-float>:
30228 0x11/imm32/alloc-id:fake:payload
30229
30230 0xf/imm32/size
30231 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3e/>
30232 _string-break-if-float>=:
30233 0x11/imm32/alloc-id:fake:payload
30234
30235 0x10/imm32/size
30236 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3e/> 0x3d/=
30237 _string-compare:
30238 0x11/imm32/alloc-id:fake:payload
30239
30240 0x7/imm32/size
30241 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
30242 _string-copy:
30243 0x11/imm32/alloc-id:fake:payload
30244
30245 0x4/imm32/size
30246 0x63/c 0x6f/o 0x70/p 0x79/y
30247 _string-copy-to:
30248 0x11/imm32/alloc-id:fake:payload
30249
30250 0x7/imm32/size
30251 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o
30252 _string-copy-byte:
30253 0x11/imm32/alloc-id:fake:payload
30254
30255 0x9/imm32/size
30256 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e
30257 _string-copy-byte-to:
30258 0x11/imm32/alloc-id:fake:payload
30259
30260 0xc/imm32/size
30261 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x74/t 0x6f/o
30262 _string-decrement:
30263 0x11/imm32/alloc-id:fake:payload
30264
30265 0x9/imm32/size
30266 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
30267 _string-increment:
30268 0x11/imm32/alloc-id:fake:payload
30269
30270 0x9/imm32/size
30271 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
30272 _string-loop:
30273 0x11/imm32/alloc-id:fake:payload
30274
30275 0x4/imm32/size
30276 0x6c/l 0x6f/o 0x6f/o 0x70/p
30277 _string-loop-if-<:
30278 0x11/imm32/alloc-id:fake:payload
30279
30280 0x9/imm32/size
30281 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
30282 _string-loop-if-<=:
30283 0x11/imm32/alloc-id:fake:payload
30284
30285 0xa/imm32/size
30286 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
30287 _string-loop-if-=:
30288 0x11/imm32/alloc-id:fake:payload
30289
30290 0x9/imm32/size
30291 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
30292 _string-loop-if->:
30293 0x11/imm32/alloc-id:fake:payload
30294
30295 0x9/imm32/size
30296 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
30297 _string-loop-if->=:
30298 0x11/imm32/alloc-id:fake:payload
30299
30300 0xa/imm32/size
30301 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
30302 _string-loop-if-!=:
30303 0x11/imm32/alloc-id:fake:payload
30304
30305 0xa/imm32/size
30306 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
30307 _string-loop-if-addr<:
30308 0x11/imm32/alloc-id:fake:payload
30309
30310 0xd/imm32/size
30311 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/<
30312 _string-loop-if-addr<=:
30313 0x11/imm32/alloc-id:fake:payload
30314
30315 0xe/imm32/size
30316 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/=
30317 _string-loop-if-addr>:
30318 0x11/imm32/alloc-id:fake:payload
30319
30320 0xd/imm32/size
30321 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/>
30322 _string-loop-if-addr>=:
30323 0x11/imm32/alloc-id:fake:payload
30324
30325 0xe/imm32/size
30326 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/=
30327 _string-loop-if-float<:
30328 0x11/imm32/alloc-id:fake:payload
30329
30330 0xe/imm32/size
30331 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3c/<
30332 _string-loop-if-float<=:
30333 0x11/imm32/alloc-id:fake:payload
30334
30335 0xf/imm32/size
30336 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3c/< 0x3d/=
30337 _string-loop-if-float>:
30338 0x11/imm32/alloc-id:fake:payload
30339
30340 0xe/imm32/size
30341 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3e/>
30342 _string-loop-if-float>=:
30343 0x11/imm32/alloc-id:fake:payload
30344
30345 0xf/imm32/size
30346 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3e/> 0x3d/=
30347 _string-multiply:
30348 0x11/imm32/alloc-id:fake:payload
30349
30350 0x8/imm32/size
30351 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
30352 _string-convert:
30353 0x11/imm32/alloc-id:fake:payload
30354
30355 0x7/imm32/size
30356 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t
30357 _string-truncate:
30358 0x11/imm32/alloc-id:fake:payload
30359
30360 0x8/imm32/size
30361 0x74/t 0x72/r 0x75/u 0x6e/n 0x63/c 0x61/a 0x74/t 0x65/e
30362 _string-reinterpret:
30363 0x11/imm32/alloc-id:fake:payload
30364
30365 0xb/imm32/size
30366 0x72/r 0x65/e 0x69/i 0x6e/n 0x74/t 0x65/e 0x72/r 0x70/p 0x72/r 0x65/e 0x74/t
30367 _string-divide:
30368 0x11/imm32/alloc-id:fake:payload
30369
30370 0x6/imm32/size
30371 0x64/d 0x69/i 0x76/v 0x69/i 0x64/d 0x65/e
30372 _string-max:
30373 0x11/imm32/alloc-id:fake:payload
30374
30375 0x3/imm32/size
30376 0x6d/m 0x61/a 0x78/x
30377 _string-min:
30378 0x11/imm32/alloc-id:fake:payload
30379
30380 0x3/imm32/size
30381 0x6d/m 0x69/i 0x6e/n
30382 _string-reciprocal:
30383 0x11/imm32/alloc-id:fake:payload
30384
30385 0xa/imm32/size
30386 0x72/r 0x65/e 0x63/c 0x69/i 0x70/p 0x72/r 0x6f/o 0x63/c 0x61/a 0x6c/l
30387 _string-square-root:
30388 0x11/imm32/alloc-id:fake:payload
30389
30390 0xb/imm32/size
30391 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/- 0x72/r 0x6f/o 0x6f/o 0x74/t
30392 _string-inverse-square-root:
30393 0x11/imm32/alloc-id:fake:payload
30394
30395 0x13/imm32/size
30396 0x69/i 0x6e/n 0x76/v 0x65/e 0x72/r 0x73/s 0x65/e 0x2d/- 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/- 0x72/r 0x6f/o 0x6f/o 0x74/t
30397 _string-negate:
30398 0x11/imm32/alloc-id:fake:payload
30399
30400 0x6/imm32/size
30401 0x6e/n 0x65/e 0x67/g 0x61/a 0x74/t 0x65/e
30402 _string-or:
30403 0x11/imm32/alloc-id:fake:payload
30404
30405 0x2/imm32/size
30406 0x6f/o 0x72/r
30407 _string-or-with:
30408 0x11/imm32/alloc-id:fake:payload
30409
30410 0x7/imm32/size
30411 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
30412 _string-subtract:
30413 0x11/imm32/alloc-id:fake:payload
30414
30415 0x8/imm32/size
30416 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
30417 _string-subtract-from:
30418 0x11/imm32/alloc-id:fake:payload
30419
30420 0xd/imm32/size
30421 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t 0x2d/dash 0x66/f 0x72/r 0x6f/o 0x6d/m
30422 _string-xor:
30423 0x11/imm32/alloc-id:fake:payload
30424
30425 0x3/imm32/size
30426 0x78/x 0x6f/o 0x72/r
30427 _string-xor-with:
30428 0x11/imm32/alloc-id:fake:payload
30429
30430 0x8/imm32/size
30431 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
30432 _string-shift-left:
30433 0x11/imm32/alloc-id:fake:payload
30434
30435 0xa/imm32/size
30436 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x6c/l 0x65/e 0x66/f 0x74/t
30437 _string-shift-right:
30438 0x11/imm32/alloc-id:fake:payload
30439
30440 0xb/imm32/size
30441 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t
30442 _string-shift-right-signed:
30443 0x11/imm32/alloc-id:fake:payload
30444
30445 0x12/imm32/size
30446 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t 0x2d/dash 0x73/s 0x69/i 0x67/g 0x6e/n 0x65/e 0x64/d
30447
30448
30449 _string_01_add_to:
30450 0x11/imm32/alloc-id:fake:payload
30451
30452 0x9/imm32/size
30453 0x30/0 0x31/1 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
30454 _string_03_add:
30455 0x11/imm32/alloc-id:fake:payload
30456
30457 0x6/imm32/size
30458 0x30/0 0x33/3 0x2f/slash 0x61/a 0x64/d 0x64/d
30459 _string_05_add_to_eax:
30460 0x11/imm32/alloc-id:fake:payload
30461
30462 0xd/imm32/size
30463 0x30/0 0x35/5 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x61/a 0x78/x
30464 _string_09_or_with:
30465 0x11/imm32/alloc-id:fake:payload
30466
30467 0xa/imm32/size
30468 0x30/0 0x39/9 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
30469 _string_0b_or:
30470 0x11/imm32/alloc-id:fake:payload
30471
30472 0x5/imm32/size
30473 0x30/0 0x62/b 0x2f/slash 0x6f/o 0x72/r
30474 _string_0d_or_with_eax:
30475 0x11/imm32/alloc-id:fake:payload
30476
30477 0xe/imm32/size
30478 0x30/0 0x64/d 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h 0x2d/dash 0x65/e 0x61/a 0x78/x
30479 _string_0f_82_jump_label:
30480 0x11/imm32/alloc-id:fake:payload
30481
30482 0x13/imm32/size
30483 0x30/0 0x66/f 0x20/space 0x38/8 0x32/2 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/<
30484 _string_0f_82_jump_break:
30485 0x11/imm32/alloc-id:fake:payload
30486
30487 0x20/imm32/size
30488 0x30/0 0x66/f 0x20/space 0x38/8 0x32/2 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30489 _string_0f_82_jump_loop:
30490 0x11/imm32/alloc-id:fake:payload
30491
30492 0x1f/imm32/size
30493 0x30/0 0x66/f 0x20/space 0x38/8 0x32/2 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30494 _string_0f_83_jump_label:
30495 0x11/imm32/alloc-id:fake:payload
30496
30497 0x14/imm32/size
30498 0x30/0 0x66/f 0x20/space 0x38/8 0x33/3 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/=
30499 _string_0f_83_jump_break:
30500 0x11/imm32/alloc-id:fake:payload
30501
30502 0x21/imm32/size
30503 0x30/0 0x66/f 0x20/space 0x38/8 0x33/3 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30504 _string_0f_83_jump_loop:
30505 0x11/imm32/alloc-id:fake:payload
30506
30507 0x20/imm32/size
30508 0x30/0 0x66/f 0x20/space 0x38/8 0x33/3 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30509 _string_0f_84_jump_label:
30510 0x11/imm32/alloc-id:fake:payload
30511
30512 0xf/imm32/size
30513 0x30/0 0x66/f 0x20/space 0x38/8 0x34/4 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
30514 _string_0f_84_jump_break:
30515 0x11/imm32/alloc-id:fake:payload
30516
30517 0x1c/imm32/size
30518 0x30/0 0x66/f 0x20/space 0x38/8 0x34/4 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30519 _string_0f_84_jump_loop:
30520 0x11/imm32/alloc-id:fake:payload
30521
30522 0x1b/imm32/size
30523 0x30/0 0x66/f 0x20/space 0x38/8 0x34/4 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/= 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30524 _string_0f_85_jump_label:
30525 0x11/imm32/alloc-id:fake:payload
30526
30527 0x10/imm32/size
30528 0x30/0 0x66/f 0x20/space 0x38/8 0x35/5 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
30529 _string_0f_85_jump_break:
30530 0x11/imm32/alloc-id:fake:payload
30531
30532 0x1d/imm32/size
30533 0x30/0 0x66/f 0x20/space 0x38/8 0x35/5 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30534 _string_0f_85_jump_loop:
30535 0x11/imm32/alloc-id:fake:payload
30536
30537 0x1c/imm32/size
30538 0x30/0 0x66/f 0x20/space 0x38/8 0x35/5 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30539 _string_0f_86_jump_label:
30540 0x11/imm32/alloc-id:fake:payload
30541
30542 0x14/imm32/size
30543 0x30/0 0x66/f 0x20/space 0x38/8 0x36/6 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/=
30544 _string_0f_86_jump_break:
30545 0x11/imm32/alloc-id:fake:payload
30546
30547 0x21/imm32/size
30548 0x30/0 0x66/f 0x20/space 0x38/8 0x36/6 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30549 _string_0f_86_jump_loop:
30550 0x11/imm32/alloc-id:fake:payload
30551
30552 0x20/imm32/size
30553 0x30/0 0x66/f 0x20/space 0x38/8 0x36/6 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3c/< 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30554 _string_0f_87_jump_label:
30555 0x11/imm32/alloc-id:fake:payload
30556
30557 0x13/imm32/size
30558 0x30/0 0x66/f 0x20/space 0x38/8 0x37/7 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/>
30559 _string_0f_87_jump_break:
30560 0x11/imm32/alloc-id:fake:payload
30561
30562 0x20/imm32/size
30563 0x30/0 0x66/f 0x20/space 0x38/8 0x37/7 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30564 _string_0f_87_jump_loop:
30565 0x11/imm32/alloc-id:fake:payload
30566
30567 0x1f/imm32/size
30568 0x30/0 0x66/f 0x20/space 0x38/8 0x37/7 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x3e/> 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30569 _string_0f_8c_jump_label:
30570 0x11/imm32/alloc-id:fake:payload
30571
30572 0xf/imm32/size
30573 0x30/0 0x66/f 0x20/space 0x38/8 0x63/c 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
30574 _string_0f_8c_jump_break:
30575 0x11/imm32/alloc-id:fake:payload
30576
30577 0x1c/imm32/size
30578 0x30/0 0x66/f 0x20/space 0x38/8 0x63/c 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30579 _string_0f_8c_jump_loop:
30580 0x11/imm32/alloc-id:fake:payload
30581
30582 0x1b/imm32/size
30583 0x30/0 0x66/f 0x20/space 0x38/8 0x63/c 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30584 _string_0f_8d_jump_label:
30585 0x11/imm32/alloc-id:fake:payload
30586
30587 0x10/imm32/size
30588 0x30/0 0x66/f 0x20/space 0x38/8 0x64/d 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
30589 _string_0f_8d_jump_break:
30590 0x11/imm32/alloc-id:fake:payload
30591
30592 0x1d/imm32/size
30593 0x30/0 0x66/f 0x20/space 0x38/8 0x64/d 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30594 _string_0f_8d_jump_loop:
30595 0x11/imm32/alloc-id:fake:payload
30596
30597 0x1c/imm32/size
30598 0x30/0 0x66/f 0x20/space 0x38/8 0x64/d 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30599 _string_0f_8e_jump_label:
30600 0x11/imm32/alloc-id:fake:payload
30601
30602 0x10/imm32/size
30603 0x30/0 0x66/f 0x20/space 0x38/8 0x65/e 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
30604 _string_0f_8e_jump_break:
30605 0x11/imm32/alloc-id:fake:payload
30606
30607 0x1d/imm32/size
30608 0x30/0 0x66/f 0x20/space 0x38/8 0x65/e 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/= 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30609 _string_0f_8e_jump_loop:
30610 0x11/imm32/alloc-id:fake:payload
30611
30612 0x1c/imm32/size
30613 0x30/0 0x66/f 0x20/space 0x38/8 0x65/e 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/= 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30614 _string_0f_8f_jump_label:
30615 0x11/imm32/alloc-id:fake:payload
30616
30617 0xf/imm32/size
30618 0x30/0 0x66/f 0x20/space 0x38/8 0x66/f 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
30619 _string_0f_8f_jump_break:
30620 0x11/imm32/alloc-id:fake:payload
30621
30622 0x1c/imm32/size
30623 0x30/0 0x66/f 0x20/space 0x38/8 0x66/f 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30624 _string_0f_8f_jump_loop:
30625 0x11/imm32/alloc-id:fake:payload
30626
30627 0x1b/imm32/size
30628 0x30/0 0x66/f 0x20/space 0x38/8 0x66/f 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30629 _string_0f_af_multiply:
30630 0x11/imm32/alloc-id:fake:payload
30631
30632 0xe/imm32/size
30633 0x30/0 0x66/f 0x20/space 0x61/a 0x66/f 0x2f/slash 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
30634 _string_f3_0f_2a_convert_to_float:
30635 0x11/imm32/alloc-id:fake:payload
30636
30637 0x19/imm32/size
30638 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x32/2 0x61/a 0x2f/slash 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t
30639 _string_f3_0f_2d_convert_to_int:
30640 0x11/imm32/alloc-id:fake:payload
30641
30642 0x17/imm32/size
30643 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x32/2 0x64/d 0x2f/slash 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x69/i 0x6e/n 0x74/t
30644 _string_f3_0f_2c_truncate_to_int:
30645 0x11/imm32/alloc-id:fake:payload
30646
30647 0x18/imm32/size
30648 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x32/2 0x63/c 0x2f/slash 0x74/t 0x72/r 0x75/u 0x6e/n 0x63/c 0x61/a 0x74/t 0x65/e 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x69/i 0x6e/n 0x74/t
30649 _string_f3_0f_58_add:
30650 0x11/imm32/alloc-id:fake:payload
30651
30652 0xc/imm32/size
30653 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x38/8 0x2f/slash 0x61/a 0x64/d 0x64/d
30654 _string_f3_0f_5c_subtract:
30655 0x11/imm32/alloc-id:fake:payload
30656
30657 0x11/imm32/size
30658 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x63/c 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
30659 _string_f3_0f_59_multiply:
30660 0x11/imm32/alloc-id:fake:payload
30661
30662 0x11/imm32/size
30663 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x39/9 0x2f/slash 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
30664 _string_f3_0f_5e_divide:
30665 0x11/imm32/alloc-id:fake:payload
30666
30667 0xf/imm32/size
30668 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x65/e 0x2f/slash 0x64/d 0x69/i 0x76/v 0x69/i 0x64/d 0x65/e
30669 _string_f3_0f_53_reciprocal:
30670 0x11/imm32/alloc-id:fake:payload
30671
30672 0x13/imm32/size
30673 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x33/3 0x2f/slash 0x72/r 0x65/e 0x63/c 0x69/i 0x70/p 0x72/r 0x6f/o 0x63/c 0x61/a 0x6c/l
30674 _string_f3_0f_51_square_root:
30675 0x11/imm32/alloc-id:fake:payload
30676
30677 0x14/imm32/size
30678 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x31/1 0x2f/slash 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/dash 0x72/r 0x6f/o 0x6f/o 0x74/t
30679 _string_f3_0f_52_inverse_square_root:
30680 0x11/imm32/alloc-id:fake:payload
30681
30682 0x1c/imm32/size
30683 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x32/2 0x2f/slash 0x69/i 0x6e/n 0x76/v 0x65/e 0x72/r 0x73/s 0x65/e 0x2d/dash 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/dash 0x72/r 0x6f/o 0x6f/o 0x74/t
30684 _string_f3_0f_5d_min:
30685 0x11/imm32/alloc-id:fake:payload
30686
30687 0xc/imm32/size
30688 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x64/d 0x2f/slash 0x6d/m 0x69/i 0x6e/n
30689 _string_f3_0f_5f_max:
30690 0x11/imm32/alloc-id:fake:payload
30691
30692 0xc/imm32/size
30693 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x66/f 0x2f/slash 0x6d/m 0x61/a 0x78/x
30694 _string_f3_0f_10_copy:
30695 0x11/imm32/alloc-id:fake:payload
30696
30697 0xd/imm32/size
30698 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x31/1 0x30/0 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y
30699 _string_f3_0f_11_copy:
30700 0x11/imm32/alloc-id:fake:payload
30701
30702 0xd/imm32/size
30703 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x31/1 0x31/1 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y
30704 _string_0f_2f_compare:
30705 0x11/imm32/alloc-id:fake:payload
30706
30707 0xd/imm32/size
30708 0x30/0 0x66/f 0x20/space 0x32/2 0x66/f 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
30709 _string_21_and_with:
30710 0x11/imm32/alloc-id:fake:payload
30711
30712 0xb/imm32/size
30713 0x32/2 0x31/1 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
30714 _string_23_and:
30715 0x11/imm32/alloc-id:fake:payload
30716
30717 0x6/imm32/size
30718 0x32/2 0x33/3 0x2f/slash 0x61/a 0x6e/n 0x64/d
30719 _string_25_and_with_eax:
30720 0x11/imm32/alloc-id:fake:payload
30721
30722 0xf/imm32/size
30723 0x32/2 0x35/5 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h 0x2d/dash 0x65/e 0x61/a 0x78/x
30724 _string_29_subtract_from:
30725 0x11/imm32/alloc-id:fake:payload
30726
30727 0x10/imm32/size
30728 0x32/2 0x39/9 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t 0x2d/dash 0x66/f 0x72/r 0x6f/o 0x6d/m
30729 _string_2b_subtract:
30730 0x11/imm32/alloc-id:fake:payload
30731
30732 0xb/imm32/size
30733 0x32/2 0x62/b 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
30734 _string_2d_subtract_from_eax:
30735 0x11/imm32/alloc-id:fake:payload
30736
30737 0x14/imm32/size
30738 0x32/2 0x64/d 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t 0x2d/dash 0x66/f 0x72/r 0x6f/o 0x6d/m 0x2d/dash 0x65/e 0x61/a 0x78/x
30739 _string_31_xor_with:
30740 0x11/imm32/alloc-id:fake:payload
30741
30742 0xb/imm32/size
30743 0x33/3 0x31/1 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
30744 _string_33_xor:
30745 0x11/imm32/alloc-id:fake:payload
30746
30747 0x6/imm32/size
30748 0x33/3 0x33/3 0x2f/slash 0x78/x 0x6f/o 0x72/r
30749 _string_35_xor_with_eax:
30750 0x11/imm32/alloc-id:fake:payload
30751
30752 0xf/imm32/size
30753 0x33/3 0x35/5 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h 0x2d/dash 0x65/e 0x61/a 0x78/x
30754 _string_39_compare->:
30755 0x11/imm32/alloc-id:fake:payload
30756
30757 0xc/imm32/size
30758 0x33/3 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x3e/>
30759 _string_3b_compare<-:
30760 0x11/imm32/alloc-id:fake:payload
30761
30762 0xc/imm32/size
30763 0x33/3 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x3c/< 0x2d/dash
30764 _string_3d_compare_eax_with:
30765 0x11/imm32/alloc-id:fake:payload
30766
30767 0x13/imm32/size
30768 0x33/3 0x64/d 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x65/e 0x61/a 0x78/x 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
30769 _string_40_increment_eax:
30770 0x11/imm32/alloc-id:fake:payload
30771
30772 0x10/imm32/size
30773 0x34/4 0x30/0 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x61/a 0x78/x
30774 _string_41_increment_ecx:
30775 0x11/imm32/alloc-id:fake:payload
30776
30777 0x10/imm32/size
30778 0x34/4 0x31/1 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x63/c 0x78/x
30779 _string_42_increment_edx:
30780 0x11/imm32/alloc-id:fake:payload
30781
30782 0x10/imm32/size
30783 0x34/4 0x32/2 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x64/d 0x78/x
30784 _string_43_increment_ebx:
30785 0x11/imm32/alloc-id:fake:payload
30786
30787 0x10/imm32/size
30788 0x34/4 0x33/3 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x62/b 0x78/x
30789 _string_46_increment_esi:
30790 0x11/imm32/alloc-id:fake:payload
30791
30792 0x10/imm32/size
30793 0x34/4 0x36/6 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x73/s 0x69/i
30794 _string_47_increment_edi:
30795 0x11/imm32/alloc-id:fake:payload
30796
30797 0x10/imm32/size
30798 0x34/4 0x37/7 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x64/d 0x69/i
30799 _string_48_decrement_eax:
30800 0x11/imm32/alloc-id:fake:payload
30801
30802 0x10/imm32/size
30803 0x34/4 0x38/8 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x61/a 0x78/x
30804 _string_49_decrement_ecx:
30805 0x11/imm32/alloc-id:fake:payload
30806
30807 0x10/imm32/size
30808 0x34/4 0x39/9 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x63/c 0x78/x
30809 _string_4a_decrement_edx:
30810 0x11/imm32/alloc-id:fake:payload
30811
30812 0x10/imm32/size
30813 0x34/4 0x61/a 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x64/d 0x78/x
30814 _string_4b_decrement_ebx:
30815 0x11/imm32/alloc-id:fake:payload
30816
30817 0x10/imm32/size
30818 0x34/4 0x62/b 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x62/b 0x78/x
30819 _string_4e_decrement_esi:
30820 0x11/imm32/alloc-id:fake:payload
30821
30822 0x10/imm32/size
30823 0x34/4 0x65/e 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x73/s 0x69/i
30824 _string_4f_decrement_edi:
30825 0x11/imm32/alloc-id:fake:payload
30826
30827 0x10/imm32/size
30828 0x34/4 0x66/f 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t 0x2d/dash 0x65/e 0x64/d 0x69/i
30829 _string_81_subop_add:
30830 0x11/imm32/alloc-id:fake:payload
30831
30832 0xe/imm32/size
30833 0x38/8 0x31/1 0x20/space 0x30/0 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x61/a 0x64/d 0x64/d
30834 _string_81_subop_or:
30835 0x11/imm32/alloc-id:fake:payload
30836
30837 0xd/imm32/size
30838 0x38/8 0x31/1 0x20/space 0x31/1 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x6f/o 0x72/r
30839 _string_81_subop_and:
30840 0x11/imm32/alloc-id:fake:payload
30841
30842 0xe/imm32/size
30843 0x38/8 0x31/1 0x20/space 0x34/4 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x61/a 0x6e/n 0x64/d
30844 _string_81_subop_subtract:
30845 0x11/imm32/alloc-id:fake:payload
30846
30847 0x13/imm32/size
30848 0x38/8 0x31/1 0x20/space 0x35/5 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
30849 _string_81_subop_xor:
30850 0x11/imm32/alloc-id:fake:payload
30851
30852 0xe/imm32/size
30853 0x38/8 0x31/1 0x20/space 0x36/6 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x78/x 0x6f/o 0x72/r
30854 _string_81_subop_compare:
30855 0x11/imm32/alloc-id:fake:payload
30856
30857 0x12/imm32/size
30858 0x38/8 0x31/1 0x20/space 0x37/7 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
30859 _string_89_<-:
30860 0x11/imm32/alloc-id:fake:payload
30861
30862 0x5/imm32/size
30863 0x38/8 0x39/9 0x2f/slash 0x3c/< 0x2d/dash
30864 _string_8b_->:
30865 0x11/imm32/alloc-id:fake:payload
30866
30867 0x5/imm32/size
30868 0x38/8 0x62/b 0x2f/slash 0x2d/dash 0x3e/>
30869 _string_8a_copy_byte:
30870 0x11/imm32/alloc-id:fake:payload
30871
30872 0x9/imm32/size
30873 0x38/8 0x61/a 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x3e/>
30874 _string_88_copy_byte:
30875 0x11/imm32/alloc-id:fake:payload
30876
30877 0x9/imm32/size
30878 0x38/8 0x38/8 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x3c/< 0x2d/-
30879 _string_8d_copy_address:
30880 0x11/imm32/alloc-id:fake:payload
30881
30882 0xf/imm32/size
30883 0x38/8 0x64/d 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
30884 _string_b8_copy_to_eax:
30885 0x11/imm32/alloc-id:fake:payload
30886
30887 0xe/imm32/size
30888 0x62/b 0x38/8 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x61/a 0x78/x
30889 _string_b9_copy_to_ecx:
30890 0x11/imm32/alloc-id:fake:payload
30891
30892 0xe/imm32/size
30893 0x62/b 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x63/c 0x78/x
30894 _string_ba_copy_to_edx:
30895 0x11/imm32/alloc-id:fake:payload
30896
30897 0xe/imm32/size
30898 0x62/b 0x61/a 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x64/d 0x78/x
30899 _string_bb_copy_to_ebx:
30900 0x11/imm32/alloc-id:fake:payload
30901
30902 0xe/imm32/size
30903 0x62/b 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x62/b 0x78/x
30904 _string_be_copy_to_esi:
30905 0x11/imm32/alloc-id:fake:payload
30906
30907 0xe/imm32/size
30908 0x62/b 0x65/e 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x73/s 0x69/i
30909 _string_bf_copy_to_edi:
30910 0x11/imm32/alloc-id:fake:payload
30911
30912 0xe/imm32/size
30913 0x62/b 0x66/f 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x65/e 0x64/d 0x69/i
30914 _string_c7_subop_copy:
30915 0x11/imm32/alloc-id:fake:payload
30916
30917 0xf/imm32/size
30918 0x63/c 0x37/7 0x20/space 0x30/0 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y
30919 _string_e9_jump_label:
30920 0x11/imm32/alloc-id:fake:payload
30921
30922 0x7/imm32/size
30923 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p
30924 _string_e9_jump_break:
30925 0x11/imm32/alloc-id:fake:payload
30926
30927 0x14/imm32/size
30928 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x20/space 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30929 _string_e9_jump_loop:
30930 0x11/imm32/alloc-id:fake:payload
30931
30932 0x13/imm32/size
30933 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
30934 _string_f7_subop_negate:
30935 0x11/imm32/alloc-id:fake:payload
30936
30937 0x11/imm32/size
30938 0x66/f 0x37/7 0x20/space 0x33/3 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x6e/n 0x65/e 0x67/g 0x61/a 0x74/t 0x65/e
30939 _string_ff_subop_increment:
30940 0x11/imm32/alloc-id:fake:payload
30941
30942 0x14/imm32/size
30943 0x66/f 0x66/f 0x20/space 0x30/0 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
30944 _string_ff_subop_decrement:
30945 0x11/imm32/alloc-id:fake:payload
30946
30947 0x14/imm32/size
30948 0x66/f 0x66/f 0x20/space 0x31/1 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
30949 _string_c1_subop_shift_left:
30950 0x11/imm32/alloc-id:fake:payload
30951
30952 0x15/imm32/size
30953 0x63/c 0x31/1 0x2f/slash 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x20/space 0x34/4 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x6c/l 0x65/e 0x66/f 0x74/t
30954 _string_c1_subop_shift_right_padding_zeroes:
30955 0x11/imm32/alloc-id:fake:payload
30956
30957 0x25/imm32/size
30958 0x63/c 0x31/1 0x2f/slash 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x20/space 0x35/5 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t 0x2d/dash 0x70/p 0x61/a 0x64/d 0x64/d 0x69/i 0x6e/n 0x67/g 0x2d/dash 0x7a/z 0x65/e 0x72/r 0x6f/o 0x65/e 0x73/s
30959 _string_c1_subop_shift_right_preserving_sign:
30960 0x11/imm32/alloc-id:fake:payload
30961
30962 0x26/imm32/size
30963 0x63/c 0x31/1 0x2f/slash 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x20/space 0x37/7 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t 0x2d/dash 0x70/p 0x72/r 0x65/e 0x73/s 0x65/e 0x72/r 0x76/v 0x69/i 0x6e/n 0x67/g 0x2d/dash 0x73/s 0x69/i 0x67/g 0x6e/n
30964
30965 Single-int-var-in-mem:
30966 0x11/imm32/alloc-id:fake:payload
30967 0x11/imm32/alloc-id:fake
30968 Int-var-in-mem/imm32
30969 0/imm32/next
30970 0/imm32/next
30971
30972 Int-var-in-mem:
30973 0x11/imm32/alloc-id:fake:payload
30974 0/imm32/name
30975 0/imm32/name
30976 0x11/imm32/alloc-id:fake
30977 Type-int/imm32
30978 1/imm32/some-block-depth
30979 1/imm32/some-stack-offset
30980 0/imm32/no-register
30981 0/imm32/no-register
30982
30983
30984 Single-byte-var-in-mem:
30985 0x11/imm32/alloc-id:fake:payload
30986 0x11/imm32/alloc-id:fake
30987 Byte-var-in-mem/imm32
30988 0/imm32/next
30989 0/imm32/next
30990
30991
30992 Byte-var-in-mem:
30993 0x11/imm32/alloc-id:fake:payload
30994 0/imm32/name
30995 0/imm32/name
30996 0x11/imm32/alloc-id:fake
30997 Type-byte/imm32
30998 1/imm32/some-block-depth
30999 1/imm32/some-stack-offset
31000 0/imm32/no-register
31001 0/imm32/no-register
31002
31003 Two-args-int-stack-int-reg:
31004 0x11/imm32/alloc-id:fake:payload
31005 0x11/imm32/alloc-id:fake
31006 Int-var-in-mem/imm32
31007 0x11/imm32/alloc-id:fake
31008 Single-int-var-in-some-register/imm32/next
31009
31010 Two-int-args-in-regs:
31011 0x11/imm32/alloc-id:fake:payload
31012 0x11/imm32/alloc-id:fake
31013 Int-var-in-some-register/imm32
31014 0x11/imm32/alloc-id:fake
31015 Single-int-var-in-some-register/imm32/next
31016
31017
31018 Two-args-byte-stack-byte-reg:
31019 0x11/imm32/alloc-id:fake:payload
31020 0x11/imm32/alloc-id:fake
31021 Byte-var-in-mem/imm32
31022 0x11/imm32/alloc-id:fake
31023 Single-byte-var-in-some-register/imm32/next
31024
31025 Two-args-int-reg-int-stack:
31026 0x11/imm32/alloc-id:fake:payload
31027 0x11/imm32/alloc-id:fake
31028 Int-var-in-some-register/imm32
31029 0x11/imm32/alloc-id:fake
31030 Single-int-var-in-mem/imm32/next
31031
31032 Two-args-int-eax-int-literal:
31033 0x11/imm32/alloc-id:fake:payload
31034 0x11/imm32/alloc-id:fake
31035 Int-var-in-eax/imm32
31036 0x11/imm32/alloc-id:fake
31037 Single-lit-var/imm32/next
31038
31039 Int-var-and-literal:
31040 0x11/imm32/alloc-id:fake:payload
31041 0x11/imm32/alloc-id:fake
31042 Int-var-in-mem/imm32
31043 0x11/imm32/alloc-id:fake
31044 Single-lit-var/imm32/next
31045
31046 Int-var-in-register-and-literal:
31047 0x11/imm32/alloc-id:fake:payload
31048 0x11/imm32/alloc-id:fake
31049 Int-var-in-some-register/imm32
31050 0x11/imm32/alloc-id:fake
31051 Single-lit-var/imm32/next
31052
31053 Two-float-args-in-regs:
31054 0x11/imm32/alloc-id:fake:payload
31055 0x11/imm32/alloc-id:fake
31056 Float-var-in-some-register/imm32
31057 0x11/imm32/alloc-id:fake
31058 Single-float-var-in-some-register/imm32/next
31059
31060 Two-args-float-reg-float-stack:
31061 0x11/imm32/alloc-id:fake:payload
31062 0x11/imm32/alloc-id:fake
31063 Float-var-in-some-register/imm32
31064 0x11/imm32/alloc-id:fake
31065 Single-float-var-in-mem/imm32/next
31066
31067 Two-args-float-stack-float-reg:
31068 0x11/imm32/alloc-id:fake:payload
31069 0x11/imm32/alloc-id:fake
31070 Float-var-in-mem/imm32
31071 0x11/imm32/alloc-id:fake
31072 Single-float-var-in-some-register/imm32/next
31073
31074 Single-int-var-in-some-register:
31075 0x11/imm32/alloc-id:fake:payload
31076 0x11/imm32/alloc-id:fake
31077 Int-var-in-some-register/imm32
31078 0/imm32/next
31079 0/imm32/next
31080
31081 Single-addr-var-in-some-register:
31082 0x11/imm32/alloc-id:fake:payload
31083 0x11/imm32/alloc-id:fake
31084 Addr-var-in-some-register/imm32
31085 0/imm32/next
31086 0/imm32/next
31087
31088 Single-byte-var-in-some-register:
31089 0x11/imm32/alloc-id:fake:payload
31090 0x11/imm32/alloc-id:fake
31091 Byte-var-in-some-register/imm32
31092 0/imm32/next
31093 0/imm32/next
31094
31095 Int-var-in-some-register:
31096 0x11/imm32/alloc-id:fake:payload
31097 0/imm32/name
31098 0/imm32/name
31099 0x11/imm32/alloc-id:fake
31100 Type-int/imm32
31101 1/imm32/some-block-depth
31102 0/imm32/no-stack-offset
31103 0x11/imm32/alloc-id:fake
31104 Any-register/imm32
31105
31106 Any-register:
31107 0x11/imm32/alloc-id:fake:payload
31108 1/imm32/size
31109
31110 2a/asterisk
31111
31112 Addr-var-in-some-register:
31113 0x11/imm32/alloc-id:fake:payload
31114 0/imm32/name
31115 0/imm32/name
31116 0x11/imm32/alloc-id:fake
31117 Type-addr/imm32
31118 1/imm32/some-block-depth
31119 0/imm32/no-stack-offset
31120 0x11/imm32/alloc-id:fake
31121 Any-register/imm32
31122
31123 Byte-var-in-some-register:
31124 0x11/imm32/alloc-id:fake:payload
31125 0/imm32/name
31126 0/imm32/name
31127 0x11/imm32/alloc-id:fake
31128 Type-byte/imm32
31129 1/imm32/some-block-depth
31130 0/imm32/no-stack-offset
31131 0x11/imm32/alloc-id:fake
31132 Any-register/imm32
31133
31134 Single-int-var-in-eax:
31135 0x11/imm32/alloc-id:fake:payload
31136 0x11/imm32/alloc-id:fake
31137 Int-var-in-eax/imm32
31138 0/imm32/next
31139 0/imm32/next
31140
31141 Int-var-in-eax:
31142 0x11/imm32/alloc-id:fake:payload
31143 0/imm32/name
31144 0/imm32/name
31145 0x11/imm32/alloc-id:fake
31146 Type-int/imm32
31147 1/imm32/some-block-depth
31148 0/imm32/no-stack-offset
31149 0x11/imm32/alloc-id:fake
31150 $Mu-register-eax/imm32
31151
31152 Single-int-var-in-ecx:
31153 0x11/imm32/alloc-id:fake:payload
31154 0x11/imm32/alloc-id:fake
31155 Int-var-in-ecx/imm32
31156 0/imm32/next
31157 0/imm32/next
31158
31159 Int-var-in-ecx:
31160 0x11/imm32/alloc-id:fake:payload
31161 0/imm32/name
31162 0/imm32/name
31163 0x11/imm32/alloc-id:fake
31164 Type-int/imm32
31165 1/imm32/some-block-depth
31166 0/imm32/no-stack-offset
31167 0x11/imm32/alloc-id:fake
31168 $Register-ecx/imm32/register
31169
31170 Single-int-var-in-edx:
31171 0x11/imm32/alloc-id:fake:payload
31172 0x11/imm32/alloc-id:fake
31173 Int-var-in-edx/imm32
31174 0/imm32/next
31175 0/imm32/next
31176
31177 Int-var-in-edx:
31178 0x11/imm32/alloc-id:fake:payload
31179 0/imm32/name
31180 0/imm32/name
31181 0x11/imm32/alloc-id:fake
31182 Type-int/imm32
31183 1/imm32/some-block-depth
31184 0/imm32/no-stack-offset
31185 0x11/imm32/alloc-id:fake
31186 $Register-edx/imm32/register
31187
31188 Single-int-var-in-ebx:
31189 0x11/imm32/alloc-id:fake:payload
31190 0x11/imm32/alloc-id:fake
31191 Int-var-in-ebx/imm32
31192 0/imm32/next
31193 0/imm32/next
31194
31195 Int-var-in-ebx:
31196 0x11/imm32/alloc-id:fake:payload
31197 0/imm32/name
31198 0/imm32/name
31199 0x11/imm32/alloc-id:fake
31200 Type-int/imm32
31201 1/imm32/some-block-depth
31202 0/imm32/no-stack-offset
31203 0x11/imm32/alloc-id:fake
31204 $Register-ebx/imm32/register
31205
31206 Single-int-var-in-esi:
31207 0x11/imm32/alloc-id:fake:payload
31208 0x11/imm32/alloc-id:fake
31209 Int-var-in-esi/imm32
31210 0/imm32/next
31211 0/imm32/next
31212
31213 Int-var-in-esi:
31214 0x11/imm32/alloc-id:fake:payload
31215 0/imm32/name
31216 0/imm32/name
31217 0x11/imm32/alloc-id:fake
31218 Type-int/imm32
31219 1/imm32/some-block-depth
31220 0/imm32/no-stack-offset
31221 0x11/imm32/alloc-id:fake
31222 $Register-esi/imm32/register
31223
31224 Single-int-var-in-edi:
31225 0x11/imm32/alloc-id:fake:payload
31226 0x11/imm32/alloc-id:fake
31227 Int-var-in-edi/imm32
31228 0/imm32/next
31229 0/imm32/next
31230
31231 Int-var-in-edi:
31232 0x11/imm32/alloc-id:fake:payload
31233 0/imm32/name
31234 0/imm32/name
31235 0x11/imm32/alloc-id:fake
31236 Type-int/imm32
31237 1/imm32/some-block-depth
31238 0/imm32/no-stack-offset
31239 0x11/imm32/alloc-id:fake
31240 $Register-edi/imm32/register
31241
31242 Single-lit-var:
31243 0x11/imm32/alloc-id:fake:payload
31244 0x11/imm32/alloc-id:fake
31245 Lit-var/imm32
31246 0/imm32/next
31247 0/imm32/next
31248
31249 Lit-var:
31250 0x11/imm32/alloc-id:fake:payload
31251 0/imm32/name
31252 0/imm32/name
31253 0x11/imm32/alloc-id:fake
31254 Type-literal/imm32
31255 1/imm32/some-block-depth
31256 0/imm32/no-stack-offset
31257 0/imm32/no-register
31258 0/imm32/no-register
31259
31260 Single-float-var-in-mem:
31261 0x11/imm32/alloc-id:fake:payload
31262 0x11/imm32/alloc-id:fake
31263 Float-var-in-mem/imm32
31264 0/imm32/next
31265 0/imm32/next
31266
31267 Float-var-in-mem:
31268 0x11/imm32/alloc-id:fake:payload
31269 0/imm32/name
31270 0/imm32/name
31271 0x11/imm32/alloc-id:fake
31272 Type-float/imm32
31273 1/imm32/some-block-depth
31274 1/imm32/some-stack-offset
31275 0/imm32/no-register
31276 0/imm32/no-register
31277
31278 Single-float-var-in-some-register:
31279 0x11/imm32/alloc-id:fake:payload
31280 0x11/imm32/alloc-id:fake
31281 Float-var-in-some-register/imm32
31282 0/imm32/next
31283 0/imm32/next
31284
31285 Float-var-in-some-register:
31286 0x11/imm32/alloc-id:fake:payload
31287 0/imm32/name
31288 0/imm32/name
31289 0x11/imm32/alloc-id:fake
31290 Type-float/imm32
31291 1/imm32/some-block-depth
31292 0/imm32/no-stack-offset
31293 0x11/imm32/alloc-id:fake
31294 Any-register/imm32
31295
31296 Type-int:
31297 0x11/imm32/alloc-id:fake:payload
31298 1/imm32/is-atom
31299 1/imm32/value:int
31300 0/imm32/left:unused
31301 0/imm32/right:null
31302 0/imm32/right:null
31303
31304 Type-literal:
31305 0x11/imm32/alloc-id:fake:payload
31306 1/imm32/is-atom
31307 0/imm32/value:literal
31308 0/imm32/left:unused
31309 0/imm32/right:null
31310 0/imm32/right:null
31311
31312 Type-addr:
31313 0x11/imm32/alloc-id:fake:payload
31314 1/imm32/is-atom
31315 2/imm32/value:addr
31316 0/imm32/left:unused
31317 0/imm32/right:null
31318 0/imm32/right:null
31319
31320 Type-byte:
31321 0x11/imm32/alloc-id:fake:payload
31322 1/imm32/is-atom
31323 8/imm32/value:byte
31324 0/imm32/left:unused
31325 0/imm32/right:null
31326 0/imm32/right:null
31327
31328 Type-float:
31329 0x11/imm32/alloc-id:fake:payload
31330 1/imm32/is-atom
31331 0xf/imm32/value:float
31332 0/imm32/left:unused
31333 0/imm32/right:null
31334 0/imm32/right:null
31335
31336 == code
31337 emit-subx-primitive:
31338
31339 55/push-ebp
31340 89/<- %ebp 4/r32/esp
31341
31342 50/push-eax
31343 51/push-ecx
31344
31345 8b/-> *(ebp+0x10) 1/r32/ecx
31346
31347 (emit-indent *(ebp+8) *Curr-block-depth)
31348 (lookup *(ecx+0x18) *(ecx+0x1c))
31349 (write-buffered *(ebp+8) %eax)
31350
31351 (emit-subx-rm32 *(ebp+8) *(ecx+0x20) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
31352
31353 (emit-subx-rm32 *(ebp+8) *(ecx+0x34) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
31354
31355 (emit-subx-r32 *(ebp+8) *(ecx+0x24) *(ebp+0xc))
31356
31357 (emit-subx-x32 *(ebp+8) *(ecx+0x38) *(ebp+0xc))
31358
31359 (emit-subx-imm32 *(ebp+8) *(ecx+0x28) *(ebp+0xc))
31360
31361 (emit-subx-imm8 *(ebp+8) *(ecx+0x2c) *(ebp+0xc))
31362
31363 (emit-subx-disp32 *(ebp+8) *(ecx+0x30) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
31364 (write-buffered *(ebp+8) Newline)
31365 $emit-subx-primitive:end:
31366
31367 59/pop-to-ecx
31368 58/pop-to-eax
31369
31370 89/<- %esp 5/r32/ebp
31371 5d/pop-to-ebp
31372 c3/return
31373
31374 emit-subx-rm32:
31375
31376 55/push-ebp
31377 89/<- %ebp 4/r32/esp
31378
31379 50/push-eax
31380
31381 81 7/subop/compare *(ebp+0xc) 0/imm32
31382 74/jump-if-= $emit-subx-rm32:end/disp8
31383
31384 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
31385 (emit-subx-var-as-rm32 *(ebp+8) %eax)
31386 $emit-subx-rm32:end:
31387
31388 58/pop-to-eax
31389
31390 89/<- %esp 5/r32/ebp
31391 5d/pop-to-ebp
31392 c3/return
31393
31394 get-stmt-operand-from-arg-location:
31395
31396 55/push-ebp
31397 89/<- %ebp 4/r32/esp
31398
31399 51/push-ecx
31400
31401 8b/-> *(ebp+0xc) 0/r32/eax
31402
31403 8b/-> *(ebp+8) 1/r32/ecx
31404
31405 {
31406 3d/compare-eax-and 1/imm32
31407 75/jump-if-!= break/disp8
31408 $get-stmt-operand-from-arg-location:1:
31409 (lookup *(ecx+0xc) *(ecx+0x10))
31410 eb/jump $get-stmt-operand-from-arg-location:end/disp8
31411 }
31412
31413 {
31414 3d/compare-eax-and 2/imm32
31415 75/jump-if-!= break/disp8
31416 $get-stmt-operand-from-arg-location:2:
31417 (lookup *(ecx+0xc) *(ecx+0x10))
31418 (lookup *(eax+8) *(eax+0xc))
31419 eb/jump $get-stmt-operand-from-arg-location:end/disp8
31420 }
31421
31422 {
31423 3d/compare-eax-and 3/imm32
31424 75/jump-if-!= break/disp8
31425 $get-stmt-operand-from-arg-location:3:
31426 (lookup *(ecx+0x14) *(ecx+0x18))
31427 eb/jump $get-stmt-operand-from-arg-location:end/disp8
31428 }
31429
31430 e9/jump $get-stmt-operand-from-arg-location:abort/disp32
31431 $get-stmt-operand-from-arg-location:end:
31432
31433 59/pop-to-ecx
31434
31435 89/<- %esp 5/r32/ebp
31436 5d/pop-to-ebp
31437 c3/return
31438
31439 $get-stmt-operand-from-arg-location:abort:
31440
31441 (write-buffered *(ebp+0x10) "invalid arg-location ")
31442 (write-int32-hex-buffered *(ebp+0x10) %eax)
31443 (write-buffered *(ebp+0x10) Newline)
31444 (flush *(ebp+0x10))
31445 (stop *(ebp+0x14) 1)
31446
31447
31448 emit-subx-r32:
31449
31450 55/push-ebp
31451 89/<- %ebp 4/r32/esp
31452
31453 50/push-eax
31454 51/push-ecx
31455
31456 81 7/subop/compare *(ebp+0xc) 0/imm32
31457 0f 84/jump-if-= $emit-subx-r32:end/disp32
31458
31459 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
31460 (lookup *eax *(eax+4))
31461 (lookup *(eax+0x18) *(eax+0x1c))
31462
31463
31464
31465
31466 (maybe-get Mu-registers %eax 0xc)
31467 (write-buffered *(ebp+8) Space)
31468 (write-int32-hex-buffered *(ebp+8) *eax)
31469 (write-buffered *(ebp+8) "/r32")
31470 $emit-subx-r32:end:
31471
31472 59/pop-to-ecx
31473 58/pop-to-eax
31474
31475 89/<- %esp 5/r32/ebp
31476 5d/pop-to-ebp
31477 c3/return
31478
31479 emit-subx-x32:
31480
31481 55/push-ebp
31482 89/<- %ebp 4/r32/esp
31483
31484 50/push-eax
31485 51/push-ecx
31486
31487 81 7/subop/compare *(ebp+0xc) 0/imm32
31488 0f 84/jump-if-= $emit-subx-x32:end/disp32
31489
31490 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
31491 (lookup *eax *(eax+4))
31492 (lookup *(eax+0x18) *(eax+0x1c))
31493
31494
31495
31496
31497 (maybe-get Mu-registers %eax 0xc)
31498 (write-buffered *(ebp+8) Space)
31499 (write-int32-hex-buffered *(ebp+8) *eax)
31500 (write-buffered *(ebp+8) "/x32")
31501 $emit-subx-x32:end:
31502
31503 59/pop-to-ecx
31504 58/pop-to-eax
31505
31506 89/<- %esp 5/r32/ebp
31507 5d/pop-to-ebp
31508 c3/return
31509
31510 emit-subx-imm32:
31511
31512 55/push-ebp
31513 89/<- %ebp 4/r32/esp
31514
31515 50/push-eax
31516 51/push-ecx
31517
31518 81 7/subop/compare *(ebp+0xc) 0/imm32
31519 0f 84/jump-if-= $emit-subx-imm32:end/disp32
31520
31521 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
31522 (lookup *eax *(eax+4))
31523 (lookup *eax *(eax+4))
31524 (write-buffered *(ebp+8) Space)
31525 (write-buffered *(ebp+8) %eax)
31526 (write-buffered *(ebp+8) "/imm32")
31527 $emit-subx-imm32:end:
31528
31529 59/pop-to-ecx
31530 58/pop-to-eax
31531
31532 89/<- %esp 5/r32/ebp
31533 5d/pop-to-ebp
31534 c3/return
31535
31536 emit-subx-imm8:
31537
31538 55/push-ebp
31539 89/<- %ebp 4/r32/esp
31540
31541 50/push-eax
31542 51/push-ecx
31543
31544 81 7/subop/compare *(ebp+0xc) 0/imm32
31545 0f 84/jump-if-= $emit-subx-imm32:end/disp32
31546
31547 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
31548 (lookup *eax *(eax+4))
31549 (lookup *eax *(eax+4))
31550 (write-buffered *(ebp+8) Space)
31551 (write-buffered *(ebp+8) %eax)
31552 (write-buffered *(ebp+8) "/imm8")
31553 $emit-subx-imm8:end:
31554
31555 59/pop-to-ecx
31556 58/pop-to-eax
31557
31558 89/<- %esp 5/r32/ebp
31559 5d/pop-to-ebp
31560 c3/return
31561
31562 emit-subx-disp32:
31563
31564 55/push-ebp
31565 89/<- %ebp 4/r32/esp
31566
31567 50/push-eax
31568 51/push-ecx
31569
31570 81 7/subop/compare *(ebp+0xc) 0/imm32
31571 0f 84/jump-if-= $emit-subx-disp32:end/disp32
31572
31573 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
31574 (lookup *eax *(eax+4))
31575 (lookup *eax *(eax+4))
31576 (write-buffered *(ebp+8) Space)
31577 (write-buffered *(ebp+8) %eax)
31578
31579
31580 8b/-> *(ebp+0x10) 0/r32/eax
31581 (lookup *(eax+4) *(eax+8))
31582 89/<- %ecx 0/r32/eax
31583 {
31584 (string-starts-with? %ecx "break")
31585 3d/compare-eax-and 0/imm32/false
31586 74/jump-if-= break/disp8
31587 (write-buffered *(ebp+8) ":break")
31588 }
31589
31590 {
31591 (string-starts-with? %ecx "loop")
31592 3d/compare-eax-and 0/imm32/false
31593 74/jump-if-= break/disp8
31594 (write-buffered *(ebp+8) ":loop")
31595 }
31596 (write-buffered *(ebp+8) "/disp32")
31597 $emit-subx-disp32:end:
31598
31599 59/pop-to-ecx
31600 58/pop-to-eax
31601
31602 89/<- %esp 5/r32/ebp
31603 5d/pop-to-ebp
31604 c3/return
31605
31606 emit-call:
31607
31608 55/push-ebp
31609 89/<- %ebp 4/r32/esp
31610
31611 50/push-eax
31612 51/push-ecx
31613
31614 (emit-indent *(ebp+8) *Curr-block-depth)
31615 (write-buffered *(ebp+8) "(")
31616
31617 8b/-> *(ebp+0xc) 1/r32/ecx
31618
31619 (lookup *(ecx+4) *(ecx+8))
31620 (write-buffered *(ebp+8) %eax)
31621
31622
31623 (lookup *(ecx+0xc) *(ecx+0x10))
31624 {
31625
31626 3d/compare-eax-and 0/imm32
31627 74/jump-if-= break/disp8
31628
31629 (emit-subx-call-operand *(ebp+8) %eax)
31630
31631 (lookup *(eax+8) *(eax+0xc))
31632 eb/jump loop/disp8
31633 }
31634
31635 (write-buffered *(ebp+8) ")\n")
31636 $emit-call:end:
31637
31638 59/pop-to-ecx
31639 58/pop-to-eax
31640
31641 89/<- %esp 5/r32/ebp
31642 5d/pop-to-ebp
31643 c3/return
31644
31645 emit-subx-call-operand:
31646
31647
31648 55/push-ebp
31649 89/<- %ebp 4/r32/esp
31650
31651 50/push-eax
31652 51/push-ecx
31653 56/push-esi
31654
31655 8b/-> *(ebp+0xc) 1/r32/ecx
31656
31657 (lookup *ecx *(ecx+4))
31658 89/<- %esi 0/r32/eax
31659
31660 {
31661 $emit-subx-call-operand:check-for-register-direct:
31662 81 7/subop/compare *(esi+0x18) 0/imm32
31663 74/jump-if-= break/disp8
31664 81 7/subop/compare *(ecx+0x10) 0/imm32/false
31665 75/jump-if-!= break/disp8
31666 $emit-subx-call-operand:register-direct:
31667 (write-buffered *(ebp+8) " %")
31668 (lookup *(esi+0x18) *(esi+0x1c))
31669 (write-buffered *(ebp+8) %eax)
31670 e9/jump $emit-subx-call-operand:end/disp32
31671 }
31672
31673 {
31674 $emit-subx-call-operand:check-for-register-indirect:
31675 81 7/subop/compare *(esi+0x18) 0/imm32
31676 74/jump-if-= break/disp8
31677 81 7/subop/compare *(ecx+0x10) 0/imm32/false
31678 74/jump-if-= break/disp8
31679 $emit-subx-call-operand:register-indirect:
31680 (emit-subx-call-operand-register-indirect *(ebp+8) %esi)
31681 e9/jump $emit-subx-call-operand:end/disp32
31682 }
31683
31684 {
31685 81 7/subop/compare *(esi+0x14) 0/imm32
31686 74/jump-if-= break/disp8
31687 $emit-subx-call-operand:stack:
31688 (emit-subx-call-operand-stack *(ebp+8) %esi)
31689 e9/jump $emit-subx-call-operand:end/disp32
31690 }
31691
31692 {
31693 (lookup *(esi+8) *(esi+0xc))
31694 81 7/subop/compare *(eax+4) 0/imm32
31695 75/jump-if-!= break/disp8
31696 $emit-subx-call-operand:literal:
31697 (write-buffered *(ebp+8) Space)
31698 (lookup *esi *(esi+4))
31699 (write-buffered *(ebp+8) %eax)
31700 e9/jump $emit-subx-call-operand:end/disp32
31701 }
31702
31703 {
31704 (lookup *(esi+8) *(esi+0xc))
31705 81 7/subop/compare *(eax+4) 0x10/imm32
31706 75/jump-if-!= break/disp8
31707 $emit-subx-call-operand:literal-string:
31708 (write-buffered *(ebp+8) Space)
31709 (lookup *esi *(esi+4))
31710 (write-buffered *(ebp+8) %eax)
31711 }
31712 $emit-subx-call-operand:end:
31713
31714 5e/pop-to-esi
31715 59/pop-to-ecx
31716 58/pop-to-eax
31717
31718 89/<- %esp 5/r32/ebp
31719 5d/pop-to-ebp
31720 c3/return
31721
31722 emit-subx-call-operand-register-indirect:
31723
31724 55/push-ebp
31725 89/<- %ebp 4/r32/esp
31726
31727 50/push-eax
31728 51/push-ecx
31729 56/push-esi
31730
31731 8b/-> *(ebp+0xc) 6/r32/esi
31732
31733 (size-of-deref %esi)
31734 89/<- %ecx 0/r32/eax
31735
31736 (lookup *(esi+0x18) *(esi+0x1c))
31737 89/<- %esi 0/r32/eax
31738
31739
31740 b8/copy-to-eax 0/imm32
31741 {
31742 $emit-subx-call-operand-register-indirect:loop:
31743
31744 39/compare %eax 1/r32/ecx
31745 7d/jump-if->= break/disp8
31746
31747 (write-buffered *(ebp+8) " *(")
31748 (write-buffered *(ebp+8) %esi)
31749 (write-buffered *(ebp+8) "+")
31750 (write-int32-hex-buffered *(ebp+8) %eax)
31751 (write-buffered *(ebp+8) ")")
31752
31753 05/add-to-eax 4/imm32
31754
31755 eb/jump loop/disp8
31756 }
31757 $emit-subx-call-operand-register-indirect:end:
31758
31759 5e/pop-to-esi
31760 59/pop-to-ecx
31761 58/pop-to-eax
31762
31763 89/<- %esp 5/r32/ebp
31764 5d/pop-to-ebp
31765 c3/return
31766
31767 emit-subx-call-operand-stack:
31768
31769 55/push-ebp
31770 89/<- %ebp 4/r32/esp
31771
31772 50/push-eax
31773 51/push-ecx
31774 56/push-esi
31775
31776 8b/-> *(ebp+0xc) 6/r32/esi
31777
31778 8b/-> *(esi+0x14) 1/r32/ecx
31779
31780 (size-of %esi)
31781
31782 01/add-to %eax 1/r32/ecx
31783 {
31784 $emit-subx-call-operand-stack:loop:
31785
31786 39/compare %ecx 0/r32/eax
31787 7d/jump-if->= break/disp8
31788
31789 (write-buffered *(ebp+8) " *(ebp+")
31790 (write-int32-hex-buffered *(ebp+8) %ecx)
31791 (write-buffered *(ebp+8) ")")
31792
31793 81 0/subop/add %ecx 4/imm32
31794
31795 eb/jump loop/disp8
31796 }
31797 $emit-subx-call-operand-stack:end:
31798
31799 5e/pop-to-esi
31800 59/pop-to-ecx
31801 58/pop-to-eax
31802
31803 89/<- %esp 5/r32/ebp
31804 5d/pop-to-ebp
31805 c3/return
31806
31807 emit-subx-var-as-rm32:
31808
31809 55/push-ebp
31810 89/<- %ebp 4/r32/esp
31811
31812 50/push-eax
31813 51/push-ecx
31814 56/push-esi
31815
31816 8b/-> *(ebp+0xc) 1/r32/ecx
31817
31818 (lookup *ecx *(ecx+4))
31819 89/<- %esi 0/r32/eax
31820
31821 {
31822 $emit-subx-var-as-rm32:check-for-register-indirect:
31823 81 7/subop/compare *(esi+0x18) 0/imm32
31824 74/jump-if-= break/disp8
31825 81 7/subop/compare *(ecx+0x10) 0/imm32/false
31826 74/jump-if-= break/disp8
31827 $emit-subx-var-as-rm32:register-indirect:
31828 (write-buffered *(ebp+8) " *")
31829 (lookup *(esi+0x18) *(esi+0x1c))
31830 (write-buffered *(ebp+8) %eax)
31831 e9/jump $emit-subx-var-as-rm32:end/disp32
31832 }
31833
31834 {
31835 $emit-subx-var-as-rm32:check-for-register-direct:
31836 81 7/subop/compare *(esi+0x18) 0/imm32
31837 74/jump-if-= break/disp8
31838 81 7/subop/compare *(ecx+0x10) 0/imm32/false
31839 75/jump-if-!= break/disp8
31840 $emit-subx-var-as-rm32:register-direct:
31841 (write-buffered *(ebp+8) " %")
31842 (lookup *(esi+0x18) *(esi+0x1c))
31843 (write-buffered *(ebp+8) %eax)
31844 e9/jump $emit-subx-var-as-rm32:end/disp32
31845 }
31846
31847 {
31848 81 7/subop/compare *(esi+0x14) 0/imm32
31849 74/jump-if-= break/disp8
31850 $emit-subx-var-as-rm32:stack:
31851 (write-buffered *(ebp+8) Space)
31852 (write-buffered *(ebp+8) "*(ebp+")
31853 (write-int32-hex-buffered *(ebp+8) *(esi+0x14))
31854 (write-buffered *(ebp+8) ")")
31855 }
31856 $emit-subx-var-as-rm32:end:
31857
31858 5e/pop-to-esi
31859 59/pop-to-ecx
31860 58/pop-to-eax
31861
31862 89/<- %esp 5/r32/ebp
31863 5d/pop-to-ebp
31864 c3/return
31865
31866 find-matching-primitive:
31867
31868 55/push-ebp
31869 89/<- %ebp 4/r32/esp
31870
31871 51/push-ecx
31872
31873 8b/-> *(ebp+8) 1/r32/ecx
31874 {
31875 $find-matching-primitive:loop:
31876
31877 81 7/subop/compare %ecx 0/imm32
31878 74/jump-if-= break/disp8
31879
31880 {
31881 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx)
31882 3d/compare-eax-and 0/imm32/false
31883 74/jump-if-= break/disp8
31884 89/<- %eax 1/r32/ecx
31885 eb/jump $find-matching-primitive:end/disp8
31886 }
31887 $find-matching-primitive:next-primitive:
31888
31889 (lookup *(ecx+0x3c) *(ecx+0x40))
31890 89/<- %ecx 0/r32/eax
31891
31892 e9/jump loop/disp32
31893 }
31894
31895 b8/copy-to-eax 0/imm32
31896 $find-matching-primitive:end:
31897
31898 59/pop-to-ecx
31899
31900 89/<- %esp 5/r32/ebp
31901 5d/pop-to-ebp
31902 c3/return
31903
31904 mu-stmt-matches-primitive?:
31905
31906
31907
31908
31909
31910
31911 55/push-ebp
31912 89/<- %ebp 4/r32/esp
31913
31914 51/push-ecx
31915 52/push-edx
31916 53/push-ebx
31917 56/push-esi
31918 57/push-edi
31919
31920 8b/-> *(ebp+8) 1/r32/ecx
31921
31922 8b/-> *(ebp+0xc) 2/r32/edx
31923 {
31924 $mu-stmt-matches-primitive?:check-name:
31925
31926
31927 (lookup *(ecx+4) *(ecx+8))
31928 89/<- %esi 0/r32/eax
31929
31930 (lookup *edx *(edx+4))
31931
31932
31933
31934 89/<- %edi 0/r32/eax
31935 (string-equal? %esi %edi)
31936 3d/compare-eax-and 0/imm32/false
31937 75/jump-if-!= break/disp8
31938 b8/copy-to-eax 0/imm32
31939 e9/jump $mu-stmt-matches-primitive?:end/disp32
31940 }
31941
31942 (lookup *(ecx+0xc) *(ecx+0x10))
31943 89/<- %esi 0/r32/eax
31944
31945 (lookup *(edx+8) *(edx+0xc))
31946 89/<- %edi 0/r32/eax
31947 {
31948 $mu-stmt-matches-primitive?:inouts-loop:
31949
31950 {
31951 $mu-stmt-matches-primitive?:check-both-inouts-null:
31952 81 7/subop/compare %esi 0/imm32
31953 75/jump-if-!= break/disp8
31954 $mu-stmt-matches-primitive?:stmt-inout-null:
31955 81 7/subop/compare %edi 0/imm32
31956 0f 84/jump-if-= $mu-stmt-matches-primitive?:check-outputs/disp32
31957 $mu-stmt-matches-primitive?:stmt-inout-null-and-prim-inout-not-null:
31958
31959 b8/copy-to-eax 0/imm32/false
31960 e9/jump $mu-stmt-matches-primitive?:end/disp32
31961 }
31962
31963 {
31964 $mu-stmt-matches-primitive?:check-prim-inout-null:
31965 81 7/subop/compare %edi 0/imm32
31966 75/jump-if-!= break/disp8
31967 $mu-stmt-matches-primitive?:prim-inout-null:
31968 b8/copy-to-eax 0/imm32/false
31969 e9/jump $mu-stmt-matches-primitive?:end/disp32
31970 }
31971
31972 {
31973 $mu-stmt-matches-primitive?:check-inouts-match:
31974 (lookup *edi *(edi+4))
31975 (operand-matches-primitive? %esi %eax)
31976 3d/compare-eax-and 0/imm32/false
31977 75/jump-if-!= break/disp8
31978 $mu-stmt-matches-primitive?:inouts-match:
31979 b8/copy-to-eax 0/imm32/false
31980 e9/jump $mu-stmt-matches-primitive?:end/disp32
31981 }
31982 $mu-stmt-matches-primitive?:next-inout:
31983
31984 (lookup *(esi+8) *(esi+0xc))
31985 89/<- %esi 0/r32/eax
31986
31987 (lookup *(edi+8) *(edi+0xc))
31988 89/<- %edi 0/r32/eax
31989
31990 e9/jump loop/disp32
31991 }
31992 $mu-stmt-matches-primitive?:check-outputs:
31993
31994 (lookup *(ecx+0x14) *(ecx+0x18))
31995 89/<- %esi 0/r32/eax
31996
31997 (lookup *(edx+0x10) *(edx+0x14))
31998 89/<- %edi 0/r32/eax
31999 {
32000 $mu-stmt-matches-primitive?:outputs-loop:
32001
32002 {
32003 $mu-stmt-matches-primitive?:check-both-outputs-null:
32004 81 7/subop/compare %esi 0/imm32
32005 75/jump-if-!= break/disp8
32006 {
32007 $mu-stmt-matches-primitive?:stmt-output-null:
32008 81 7/subop/compare %edi 0/imm32
32009 75/jump-if-!= break/disp8
32010 $mu-stmt-matches-primitive?:both-outputs-null:
32011
32012 b8/copy-to-eax 1/imm32
32013 e9/jump $mu-stmt-matches-primitive?:end/disp32
32014 }
32015 $mu-stmt-matches-primitive?:stmt-output-null-and-prim-output-not-null:
32016
32017 b8/copy-to-eax 0/imm32
32018 e9/jump $mu-stmt-matches-primitive?:end/disp32
32019 }
32020
32021 {
32022 $mu-stmt-matches-primitive?:check-prim-output-null:
32023 81 7/subop/compare %edi 0/imm32
32024 75/jump-if-!= break/disp8
32025 $mu-stmt-matches-primitive?:prim-output-is-null:
32026 b8/copy-to-eax 0/imm32
32027 e9/jump $mu-stmt-matches-primitive?:end/disp32
32028 }
32029
32030 {
32031 $mu-stmt-matches-primitive?:check-outputs-match:
32032 (lookup *edi *(edi+4))
32033 (operand-matches-primitive? %esi %eax)
32034 3d/compare-eax-and 0/imm32/false
32035 75/jump-if-!= break/disp8
32036 $mu-stmt-matches-primitive?:outputs-match:
32037 b8/copy-to-eax 0/imm32
32038 e9/jump $mu-stmt-matches-primitive?:end/disp32
32039 }
32040 $mu-stmt-matches-primitive?:next-output:
32041
32042 (lookup *(esi+8) *(esi+0xc))
32043 89/<- %esi 0/r32/eax
32044
32045 (lookup *(edi+8) *(edi+0xc))
32046 89/<- %edi 0/r32/eax
32047
32048 e9/jump loop/disp32
32049 }
32050 $mu-stmt-matches-primitive?:return-true:
32051 b8/copy-to-eax 1/imm32
32052 $mu-stmt-matches-primitive?:end:
32053
32054 5f/pop-to-edi
32055 5e/pop-to-esi
32056 5b/pop-to-ebx
32057 5a/pop-to-edx
32058 59/pop-to-ecx
32059
32060 89/<- %esp 5/r32/ebp
32061 5d/pop-to-ebp
32062 c3/return
32063
32064 operand-matches-primitive?:
32065
32066 55/push-ebp
32067 89/<- %ebp 4/r32/esp
32068
32069 51/push-ecx
32070 52/push-edx
32071 53/push-ebx
32072 56/push-esi
32073 57/push-edi
32074
32075 8b/-> *(ebp+8) 1/r32/ecx
32076
32077 (lookup *ecx *(ecx+4))
32078 89/<- %esi 0/r32/eax
32079
32080 8b/-> *(ebp+0xc) 7/r32/edi
32081 $operand-matches-primitive?:check-type:
32082
32083
32084 (lookup *(esi+8) *(esi+0xc))
32085 89/<- %ebx 0/r32/eax
32086
32087 {
32088 81 7/subop/compare *(ecx+0x10) 0/imm32/false
32089 74/jump-if-= break/disp8
32090 $operand-matches-primitive?:is-deref:
32091
32092 (lookup *(ebx+0xc) *(ebx+0x10))
32093
32094 81 7/subop/compare *eax 0/imm32/false
32095 {
32096 75/jump-if-!= break/disp8
32097 (lookup *(eax+4) *(eax+8))
32098 }
32099
32100 89/<- %ebx 0/r32/eax
32101 }
32102
32103 (lookup *(edi+8) *(edi+0xc))
32104 (subx-type-category-match? %ebx %eax)
32105 3d/compare-eax-and 0/imm32/false
32106 0f 84/jump-if-= $operand-matches-primitive?:return-false/disp32
32107 {
32108 $operand-matches-primitive?:check-register:
32109
32110 {
32111 81 7/subop/compare *(edi+0x18) 0/imm32
32112 0f 85/jump-if-!= break/disp32
32113 81 7/subop/compare *(esi+0x18) 0/imm32
32114 74/jump-if-= break/disp8
32115 81 7/subop/compare *(ecx+0x10) 0/imm32/false
32116 74/jump-if-= break/disp8
32117 $operand-matches-primitive?:var-deref-match:
32118 e9/jump $operand-matches-primitive?:return-true/disp32
32119 }
32120
32121 {
32122 81 7/subop/compare *(edi+0x18) 0/imm32
32123 0f 84/jump-if-= break/disp32
32124 81 7/subop/compare *(esi+0x18) 0/imm32
32125 0f 84/jump-if-= break/disp32
32126 81 7/subop/compare *(ecx+0x10) 0/imm32/false
32127 74/jump-if-= break/disp8
32128 $operand-matches-primitive?:var-deref-no-match:
32129 e9/jump $operand-matches-primitive?:return-false/disp32
32130 }
32131
32132 {
32133
32134
32135 (lookup *(esi+0x18) *(esi+0x1c))
32136 89/<- %ebx 0/r32/eax
32137
32138 (lookup *(edi+0x18) *(edi+0x1c))
32139 89/<- %ecx 0/r32/eax
32140
32141 39/compare %ecx 3/r32/ebx
32142 74/jump-if-= break/disp8
32143 $operand-matches-primitive?:var-register-no-match:
32144
32145 81 7/subop/compare %ebx 0/imm32
32146 74/jump-if-= $operand-matches-primitive?:return-false/disp8
32147 81 7/subop/compare %ecx 0/imm32
32148 74/jump-if-= $operand-matches-primitive?:return-false/disp8
32149
32150 (string-equal? %ecx "*")
32151 3d/compare-eax-and 0/imm32/false
32152 75/jump-if-!= break/disp8
32153 $operand-matches-primitive?:wildcard-no-match:
32154
32155 (string-equal? %ecx %ebx)
32156 3d/compare-eax-and 0/imm32/false
32157 74/jump-if-= $operand-matches-primitive?:return-false/disp8
32158 }
32159 }
32160 $operand-matches-primitive?:return-true:
32161 b8/copy-to-eax 1/imm32/true
32162 eb/jump $operand-matches-primitive?:end/disp8
32163 $operand-matches-primitive?:return-false:
32164 b8/copy-to-eax 0/imm32/false
32165 $operand-matches-primitive?:end:
32166
32167 5f/pop-to-edi
32168 5e/pop-to-esi
32169 5b/pop-to-ebx
32170 5a/pop-to-edx
32171 59/pop-to-ecx
32172
32173 89/<- %esp 5/r32/ebp
32174 5d/pop-to-ebp
32175 c3/return
32176
32177 find-matching-function:
32178
32179 55/push-ebp
32180 89/<- %ebp 4/r32/esp
32181
32182 51/push-ecx
32183
32184 8b/-> *(ebp+8) 1/r32/ecx
32185 {
32186
32187 81 7/subop/compare %ecx 0/imm32
32188 74/jump-if-= break/disp8
32189
32190
32191
32192 {
32193 (mu-stmt-matches-function? *(ebp+0xc) %ecx)
32194 3d/compare-eax-and 0/imm32/false
32195 74/jump-if-= break/disp8
32196 89/<- %eax 1/r32/ecx
32197 eb/jump $find-matching-function:end/disp8
32198 }
32199
32200 (lookup *(ecx+0x20) *(ecx+0x24))
32201 89/<- %ecx 0/r32/eax
32202
32203 eb/jump loop/disp8
32204 }
32205
32206 b8/copy-to-eax 0/imm32
32207 $find-matching-function:end:
32208
32209 59/pop-to-ecx
32210
32211 89/<- %esp 5/r32/ebp
32212 5d/pop-to-ebp
32213 c3/return
32214
32215
32216 mu-stmt-matches-function?:
32217
32218 55/push-ebp
32219 89/<- %ebp 4/r32/esp
32220
32221 51/push-ecx
32222
32223
32224 8b/-> *(ebp+8) 0/r32/eax
32225 (lookup *(eax+4) *(eax+8))
32226 89/<- %ecx 0/r32/eax
32227
32228 8b/-> *(ebp+0xc) 0/r32/eax
32229 (lookup *eax *(eax+4))
32230 (string-equal? %eax %ecx)
32231 $mu-stmt-matches-function?:end:
32232
32233 59/pop-to-ecx
32234
32235 89/<- %esp 5/r32/ebp
32236 5d/pop-to-ebp
32237 c3/return
32238
32239
32240
32241 subx-type-category-match?:
32242
32243 55/push-ebp
32244 89/<- %ebp 4/r32/esp
32245
32246 51/push-ecx
32247
32248 (type-category *(ebp+8))
32249 89/<- %ecx 0/r32/eax
32250
32251 (type-category *(ebp+0xc))
32252
32253 39/compare %eax 1/r32/ecx
32254 0f 94/set-byte-if-= %al
32255 81 4/subop/and %eax 0xff/imm32
32256 $subx-type-category-match?:end:
32257
32258 59/pop-to-ecx
32259
32260 89/<- %esp 5/r32/ebp
32261 5d/pop-to-ebp
32262 c3/return
32263
32264 type-category:
32265
32266 55/push-ebp
32267 89/<- %ebp 4/r32/esp
32268
32269 51/push-ecx
32270
32271 (is-simple-mu-type? *(ebp+8) 0)
32272 89/<- %ecx 0/r32/eax
32273
32274 (is-simple-mu-type? *(ebp+8) 0xf)
32275
32276 c1/shift 4/subop/left %ecx 1/imm8
32277 09/or %eax 1/r32/ecx
32278 $type-category:end:
32279
32280 59/pop-to-ecx
32281
32282 89/<- %esp 5/r32/ebp
32283 5d/pop-to-ebp
32284 c3/return
32285
32286 is-simple-mu-type?:
32287
32288 55/push-ebp
32289 89/<- %ebp 4/r32/esp
32290
32291 51/push-ecx
32292
32293 8b/-> *(ebp+0xc) 1/r32/ecx
32294
32295 8b/-> *(ebp+8) 0/r32/eax
32296 39/compare *(eax+4) 1/r32/ecx
32297 0f 94/set-byte-if-= %al
32298 81 4/subop/and %eax 0xff/imm32
32299 $is-simple-mu-type?:end:
32300
32301 59/pop-to-ecx
32302
32303 89/<- %esp 5/r32/ebp
32304 5d/pop-to-ebp
32305 c3/return
32306
32307 is-mu-addr-type?:
32308
32309 55/push-ebp
32310 89/<- %ebp 4/r32/esp
32311
32312 8b/-> *(ebp+8) 0/r32/eax
32313
32314 81 7/subop/compare *eax 0/imm32/false
32315 {
32316 75/jump-if-!= break/disp8
32317 (lookup *(eax+4) *(eax+8))
32318 }
32319
32320 81 7/subop/compare *(eax+4) 2/imm32/addr
32321 0f 94/set-byte-if-= %al
32322 81 4/subop/and %eax 0xff/imm32
32323 $is-mu-addr-type?:end:
32324
32325 89/<- %esp 5/r32/ebp
32326 5d/pop-to-ebp
32327 c3/return
32328
32329 is-mu-array-type?:
32330
32331 55/push-ebp
32332 89/<- %ebp 4/r32/esp
32333
32334 8b/-> *(ebp+8) 0/r32/eax
32335
32336 81 7/subop/compare *eax 0/imm32/false
32337 {
32338 75/jump-if-!= break/disp8
32339 (lookup *(eax+4) *(eax+8))
32340 }
32341
32342 81 7/subop/compare *(eax+4) 3/imm32/array
32343 0f 94/set-byte-if-= %al
32344 81 4/subop/and %eax 0xff/imm32
32345 $is-mu-array-type?:end:
32346
32347 89/<- %esp 5/r32/ebp
32348 5d/pop-to-ebp
32349 c3/return
32350
32351 is-mu-string-type?:
32352
32353 55/push-ebp
32354 89/<- %ebp 4/r32/esp
32355
32356 56/push-esi
32357
32358 8b/-> *(ebp+8) 6/r32/esi
32359
32360 81 7/subop/compare *esi 0/imm32/false
32361 0f 85/jump-if-!= $is-mu-string-type?:return-false/disp32
32362
32363 (is-mu-addr-type? %esi)
32364 3d/compare-eax-with 0/imm32/false
32365 0f 84/jump-if-= $is-mu-string-type?:end/disp32
32366
32367 (lookup *(esi+0xc) *(esi+0x10))
32368 (is-mu-array-type? %eax)
32369 3d/compare-eax-with 0/imm32/false
32370 74/jump-if-= $is-mu-string-type?:end/disp8
32371
32372 (lookup *(esi+0xc) *(esi+0x10))
32373 (lookup *(eax+0xc) *(eax+0x10))
32374
32375 81 7/subop/compare *eax 0/imm32/false
32376 75/jump-if-!= $is-mu-string-type?:return-false/disp8
32377
32378 (lookup *(eax+4) *(eax+8))
32379 (is-simple-mu-type? %eax 8)
32380 eb/jump $is-mu-string-type?:end/disp8
32381 $is-mu-string-type?:return-false:
32382 b8/copy-to-eax 0/imm32/false
32383 $is-mu-string-type?:end:
32384
32385 5e/pop-to-esi
32386
32387 89/<- %esp 5/r32/ebp
32388 5d/pop-to-ebp
32389 c3/return
32390
32391 is-mu-stream-type?:
32392
32393 55/push-ebp
32394 89/<- %ebp 4/r32/esp
32395
32396 8b/-> *(ebp+8) 0/r32/eax
32397
32398 81 7/subop/compare *eax 0/imm32/false
32399 {
32400 75/jump-if-!= break/disp8
32401 (lookup *(eax+4) *(eax+8))
32402 }
32403
32404 81 7/subop/compare *(eax+4) 0xb/imm32/stream
32405 0f 94/set-byte-if-= %al
32406 81 4/subop/and %eax 0xff/imm32
32407 $is-mu-stream-type?:end:
32408
32409 89/<- %esp 5/r32/ebp
32410 5d/pop-to-ebp
32411 c3/return
32412
32413 test-emit-subx-stmt-primitive:
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427
32428
32429
32430 55/push-ebp
32431 89/<- %ebp 4/r32/esp
32432
32433 (clear-stream _test-output-stream)
32434 (clear-stream $_test-output-buffered-file->buffer)
32435
32436 $test-emit-subx-stmt-primitive:initialize-type:
32437
32438 68/push 0/imm32/right:null
32439 68/push 0/imm32/right:null
32440 68/push 0/imm32/left:unused
32441 68/push 1/imm32/value:int
32442 68/push 1/imm32/is-atom?:true
32443 68/push 0x11/imm32/alloc-id:fake:payload
32444 89/<- %ecx 4/r32/esp
32445 $test-emit-subx-stmt-primitive:initialize-var:
32446
32447 68/push 0/imm32/no-register
32448 68/push 0/imm32/no-register
32449 68/push -8/imm32/stack-offset
32450 68/push 1/imm32/block-depth
32451 51/push-ecx/type
32452 68/push 0x11/imm32/alloc-id:fake
32453 68/push 0/imm32/name
32454 68/push 0/imm32/name
32455 68/push 0x11/imm32/alloc-id:fake:payload
32456 89/<- %ecx 4/r32/esp
32457 $test-emit-subx-stmt-primitive:initialize-var-name:
32458
32459 8d/copy-address *(ecx+4) 0/r32/eax
32460 (copy-array Heap "foo" %eax)
32461 $test-emit-subx-stmt-primitive:initialize-stmt-var:
32462
32463 68/push 0/imm32/is-deref:false
32464 68/push 0/imm32/next
32465 68/push 0/imm32/next
32466 51/push-ecx/var-foo
32467 68/push 0x11/imm32/alloc-id:fake
32468 68/push 0x11/imm32/alloc-id:fake:payload
32469 89/<- %ebx 4/r32/esp
32470 $test-emit-subx-stmt-primitive:initialize-stmt:
32471
32472 68/push 0/imm32/no-outputs
32473 68/push 0/imm32/no-outputs
32474 53/push-ebx/inouts
32475 68/push 0x11/imm32/alloc-id:fake
32476 68/push 0/imm32/operation
32477 68/push 0/imm32/operation
32478 68/push 1/imm32/tag
32479 89/<- %esi 4/r32/esp
32480 $test-emit-subx-stmt-primitive:initialize-stmt-operation:
32481
32482 8d/copy-address *(esi+4) 0/r32/eax
32483 (copy-array Heap "increment" %eax)
32484 $test-emit-subx-stmt-primitive:initialize-primitive:
32485
32486 68/push 0/imm32/next
32487 68/push 0/imm32/next
32488 68/push 0/imm32/no-x32
32489 68/push 0/imm32/no-xm32
32490 68/push 0/imm32/no-disp32
32491 68/push 0/imm32/no-imm8
32492 68/push 0/imm32/no-imm32
32493 68/push 0/imm32/no-r32
32494 68/push 1/imm32/rm32-is-first-inout
32495 68/push 0/imm32/subx-name
32496 68/push 0/imm32/subx-name
32497 68/push 0/imm32/no-outputs
32498 68/push 0/imm32/no-outputs
32499 53/push-ebx/inouts
32500 68/push 0x11/imm32/alloc-id:fake
32501 68/push 0/imm32/name
32502 68/push 0/imm32/name
32503 89/<- %ebx 4/r32/esp
32504 $test-emit-subx-stmt-primitive:initialize-primitive-name:
32505
32506 (copy-array Heap "increment" %ebx)
32507 $test-emit-subx-stmt-primitive:initialize-primitive-subx-name:
32508
32509 8d/copy-address *(ebx+0x18) 0/r32/eax
32510 (copy-array Heap "ff 0/subop/increment" %eax)
32511
32512 c7 0/subop/copy *Curr-block-depth 0/imm32
32513 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
32514 (flush _test-output-buffered-file)
32515 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
32521
32522 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-stmt-primitive")
32523
32524 89/<- %esp 5/r32/ebp
32525 5d/pop-to-ebp
32526 c3/return
32527
32528 test-emit-subx-stmt-primitive-register:
32529
32530
32531
32532
32533
32534
32535
32536
32537
32538
32539
32540
32541
32542
32543
32544
32545 55/push-ebp
32546 89/<- %ebp 4/r32/esp
32547
32548 (clear-stream _test-output-stream)
32549 (clear-stream $_test-output-buffered-file->buffer)
32550 $test-emit-subx-stmt-primitive-register:initialize-type:
32551
32552 68/push 0/imm32/right:null
32553 68/push 0/imm32/right:null
32554 68/push 0/imm32/left:unused
32555 68/push 1/imm32/value:int
32556 68/push 1/imm32/is-atom?:true
32557 68/push 0x11/imm32/alloc-id:fake:payload
32558 89/<- %ecx 4/r32/esp
32559 $test-emit-subx-stmt-primitive-register:initialize-var:
32560
32561 68/push 0/imm32/register
32562 68/push 0/imm32/register
32563 68/push 0/imm32/no-stack-offset
32564 68/push 1/imm32/block-depth
32565 51/push-ecx
32566 68/push 0x11/imm32/alloc-id:fake
32567 68/push 0/imm32/name
32568 68/push 0/imm32/name
32569 68/push 0x11/imm32/alloc-id:fake:payload
32570 89/<- %ecx 4/r32/esp
32571 $test-emit-subx-stmt-primitive-register:initialize-var-name:
32572
32573 8d/copy-address *(ecx+4) 0/r32/eax
32574 (copy-array Heap "foo" %eax)
32575 $test-emit-subx-stmt-primitive-register:initialize-var-register:
32576
32577 8d/copy-address *(ecx+0x1c) 0/r32/eax
32578 (copy-array Heap "eax" %eax)
32579 $test-emit-subx-stmt-primitive-register:initialize-stmt-var:
32580
32581 68/push 0/imm32/is-deref:false
32582 68/push 0/imm32/next
32583 68/push 0/imm32/next
32584 51/push-ecx/var-foo
32585 68/push 0x11/imm32/alloc-id:fake
32586 68/push 0x11/imm32/alloc-id:fake:payload
32587 89/<- %ebx 4/r32/esp
32588 $test-emit-subx-stmt-primitive-register:initialize-stmt:
32589
32590 53/push-ebx/outputs
32591 68/push 0x11/imm32/alloc-id:fake
32592 68/push 0/imm32/no-inouts
32593 68/push 0/imm32/no-inouts
32594 68/push 0/imm32/operation
32595 68/push 0/imm32/operation
32596 68/push 1/imm32
32597 89/<- %esi 4/r32/esp
32598 $test-emit-subx-stmt-primitive-register:initialize-stmt-operation:
32599
32600 8d/copy-address *(esi+4) 0/r32/eax
32601 (copy-array Heap "increment" %eax)
32602 $test-emit-subx-stmt-primitive-register:initialize-formal-var:
32603
32604 68/push 0/imm32/register
32605 68/push 0/imm32/register
32606 68/push 0/imm32/no-stack-offset
32607 68/push 1/imm32/block-depth
32608 ff 6/subop/push *(ecx+0x10)
32609 68/push 0x11/imm32/alloc-id:fake
32610 68/push 0/imm32/name
32611 68/push 0/imm32/name
32612 68/push 0x11/imm32/alloc-id:fake:payload
32613 89/<- %ebx 4/r32/esp
32614 $test-emit-subx-stmt-primitive-register:initialize-formal-var-name:
32615
32616 8d/copy-address *(ebx+4) 0/r32/eax
32617 (copy-array Heap "dummy" %eax)
32618 $test-emit-subx-stmt-primitive-register:initialize-formal-register:
32619
32620 8d/copy-address *(ebx+0x1c) 0/r32/eax
32621 (copy-array Heap "*" %eax)
32622 $test-emit-subx-stmt-primitive-register:initialize-var-list:
32623
32624 68/push 0/imm32/next
32625 68/push 0/imm32/next
32626 53/push-ebx/formal-var
32627 68/push 0x11/imm32/alloc-id:fake
32628 68/push 0x11/imm32/alloc-id:fake:payload
32629 89/<- %ebx 4/r32/esp
32630 $test-emit-subx-stmt-primitive-register:initialize-primitive:
32631
32632 68/push 0/imm32/next
32633 68/push 0/imm32/next
32634 68/push 0/imm32/no-x32
32635 68/push 0/imm32/no-xm32
32636 68/push 0/imm32/no-disp32
32637 68/push 0/imm32/no-imm8
32638 68/push 0/imm32/no-imm32
32639 68/push 0/imm32/no-r32
32640 68/push 3/imm32/rm32-is-first-output
32641 68/push 0/imm32/subx-name
32642 68/push 0/imm32/subx-name
32643 53/push-ebx/outputs
32644 68/push 0x11/imm32/alloc-id:fake
32645 68/push 0/imm32/no-inouts
32646 68/push 0/imm32/no-inouts
32647 68/push 0/imm32/name
32648 68/push 0/imm32/name
32649 89/<- %ebx 4/r32/esp
32650 $test-emit-subx-stmt-primitive-register:initialize-primitive-name:
32651
32652 (copy-array Heap "increment" %ebx)
32653 $test-emit-subx-stmt-primitive-register:initialize-primitive-subx-name:
32654
32655 8d/copy-address *(ebx+0x18) 0/r32/eax
32656 (copy-array Heap "ff 0/subop/increment" %eax)
32657
32658 c7 0/subop/copy *Curr-block-depth 0/imm32
32659 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
32660 (flush _test-output-buffered-file)
32661 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
32667
32668 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-primitive-register")
32669
32670 89/<- %esp 5/r32/ebp
32671 5d/pop-to-ebp
32672 c3/return
32673
32674 test-emit-subx-stmt-select-primitive:
32675
32676
32677
32678
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691
32692
32693
32694 55/push-ebp
32695 89/<- %ebp 4/r32/esp
32696
32697 (clear-stream _test-output-stream)
32698 (clear-stream $_test-output-buffered-file->buffer)
32699 $test-emit-subx-stmt-select-primitive:initialize-type:
32700
32701 68/push 0/imm32/right:null
32702 68/push 0/imm32/right:null
32703 68/push 0/imm32/left:unused
32704 68/push 1/imm32/value:int
32705 68/push 1/imm32/is-atom?:true
32706 68/push 0x11/imm32/alloc-id:fake:payload
32707 89/<- %ecx 4/r32/esp
32708 $test-emit-subx-stmt-select-primitive:initialize-var:
32709
32710 68/push 0/imm32/register
32711 68/push 0/imm32/register
32712 68/push 0/imm32/no-stack-offset
32713 68/push 1/imm32/block-depth
32714 51/push-ecx
32715 68/push 0x11/imm32/alloc-id:fake
32716 68/push 0/imm32/name
32717 68/push 0/imm32/name
32718 68/push 0x11/imm32/alloc-id:fake:payload
32719 89/<- %ecx 4/r32/esp
32720 $test-emit-subx-stmt-select-primitive:initialize-var-name:
32721
32722 8d/copy-address *(ecx+4) 0/r32/eax
32723 (copy-array Heap "foo" %eax)
32724 $test-emit-subx-stmt-select-primitive:initialize-var-register:
32725
32726 8d/copy-address *(ecx+0x1c) 0/r32/eax
32727 (copy-array Heap "eax" %eax)
32728 $test-emit-subx-stmt-select-primitive:initialize-stmt-var:
32729
32730 68/push 0/imm32/is-deref:false
32731 68/push 0/imm32/next
32732 68/push 0/imm32/next
32733 51/push-ecx/var-foo
32734 68/push 0x11/imm32/alloc-id:fake
32735 68/push 0x11/imm32/alloc-id:fake:payload
32736 89/<- %ebx 4/r32/esp
32737 $test-emit-subx-stmt-select-primitive:initialize-stmt:
32738
32739 53/push-ebx/outputs
32740 68/push 0x11/imm32/alloc-id:fake
32741 68/push 0/imm32/no-inouts
32742 68/push 0/imm32/no-inouts
32743 68/push 0/imm32/operation
32744 68/push 0/imm32/operation
32745 68/push 1/imm32
32746 89/<- %esi 4/r32/esp
32747 $test-emit-subx-stmt-select-primitive:initialize-stmt-operation:
32748
32749 8d/copy-address *(esi+4) 0/r32/eax
32750 (copy-array Heap "increment" %eax)
32751 $test-emit-subx-stmt-select-primitive:initialize-formal-var:
32752
32753 68/push 0/imm32/register
32754 68/push 0/imm32/register
32755 68/push 0/imm32/no-stack-offset
32756 68/push 1/imm32/block-depth
32757 ff 6/subop/push *(ecx+0x10)
32758 68/push 0x11/imm32/alloc-id:fake
32759 68/push 0/imm32/name
32760 68/push 0/imm32/name
32761 68/push 0x11/imm32/alloc-id:fake:payload
32762 89/<- %ebx 4/r32/esp
32763 $test-emit-subx-stmt-select-primitive:initialize-formal-var-name:
32764
32765 8d/copy-address *(ebx+4) 0/r32/eax
32766 (copy-array Heap "dummy" %eax)
32767 $test-emit-subx-stmt-select-primitive:initialize-formal-register:
32768
32769 8d/copy-address *(ebx+0x1c) 0/r32/eax
32770 (copy-array Heap "*" %eax)
32771 $test-emit-subx-stmt-select-primitive:initialize-var-list:
32772
32773 68/push 0/imm32/next
32774 68/push 0/imm32/next
32775 53/push-ebx/formal-var
32776 68/push 0x11/imm32/alloc-id:fake
32777 68/push 0x11/imm32/alloc-id:fake:payload
32778 89/<- %ebx 4/r32/esp
32779 $test-emit-subx-stmt-select-primitive:initialize-primitive2:
32780
32781 68/push 0/imm32/next
32782 68/push 0/imm32/next
32783 68/push 0/imm32/no-x32
32784 68/push 0/imm32/no-xm32
32785 68/push 0/imm32/no-disp32
32786 68/push 0/imm32/no-imm8
32787 68/push 0/imm32/no-imm32
32788 68/push 0/imm32/no-r32
32789 68/push 3/imm32/rm32-is-first-output
32790 68/push 0/imm32/subx-name
32791 68/push 0/imm32/subx-name
32792 53/push-ebx/outputs
32793 68/push 0x11/imm32/alloc-id:fake
32794 68/push 0/imm32/no-inouts
32795 68/push 0/imm32/no-inouts
32796 68/push 0/imm32/name
32797 68/push 0/imm32/name
32798 68/push 0x11/imm32/alloc-id:fake:payload
32799 89/<- %edi 4/r32/esp
32800 $test-emit-subx-stmt-select-primitive:initialize-primitive2-name:
32801
32802 8d/copy-address *(edi+4) 0/r32/eax
32803 (copy-array Heap "increment" %eax)
32804 $test-emit-subx-stmt-select-primitive:initialize-primitive2-subx-name:
32805
32806 8d/copy-address *(edi+0x1c) 0/r32/eax
32807 (copy-array Heap "ff 0/subop/increment" %eax)
32808 $test-emit-subx-stmt-select-primitive:initialize-primitive:
32809
32810 57/push-edi
32811 68/push 0x11/imm32/alloc-id:fake
32812 68/push 0/imm32/no-x32
32813 68/push 0/imm32/no-xm32
32814 68/push 0/imm32/no-disp32
32815 68/push 0/imm32/no-imm8
32816 68/push 0/imm32/no-imm32
32817 68/push 0/imm32/no-r32
32818 68/push 1/imm32/rm32-is-first-inout
32819 68/push 0/imm32/subx-name
32820 68/push 0/imm32/subx-name
32821 68/push 0/imm32/no-outputs
32822 68/push 0/imm32/no-outputs
32823 53/push-ebx/inouts
32824 68/push 0x11/imm32/alloc-id:fake
32825 68/push 0/imm32/name
32826 68/push 0/imm32/name
32827 89/<- %ebx 4/r32/esp
32828 $test-emit-subx-stmt-select-primitive:initialize-primitive-name:
32829
32830 (copy-array Heap "increment" %ebx)
32831 $test-emit-subx-stmt-select-primitive:initialize-primitive-subx-name:
32832
32833 8d/copy-address *(ebx+0x18) 0/r32/eax
32834 (copy-array Heap "ff 0/subop/increment" %eax)
32835
32836 c7 0/subop/copy *Curr-block-depth 0/imm32
32837 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
32838 (flush _test-output-buffered-file)
32839 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
32845
32846 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive")
32847
32848 89/<- %esp 5/r32/ebp
32849 5d/pop-to-ebp
32850 c3/return
32851
32852 test-emit-subx-stmt-select-primitive-2:
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866
32867
32868
32869
32870
32871
32872 55/push-ebp
32873 89/<- %ebp 4/r32/esp
32874
32875 (clear-stream _test-output-stream)
32876 (clear-stream $_test-output-buffered-file->buffer)
32877 $test-emit-subx-stmt-select-primitive-2:initialize-type:
32878
32879 68/push 0/imm32/right:null
32880 68/push 0/imm32/right:null
32881 68/push 0/imm32/left:unused
32882 68/push 1/imm32/value:int
32883 68/push 1/imm32/is-atom?:true
32884 68/push 0x11/imm32/alloc-id:fake:payload
32885 89/<- %ecx 4/r32/esp
32886 $test-emit-subx-stmt-select-primitive-2:initialize-var:
32887
32888 68/push 0/imm32/register
32889 68/push 0/imm32/register
32890 68/push 0/imm32/no-stack-offset
32891 68/push 1/imm32/block-depth
32892 51/push-ecx
32893 68/push 0x11/imm32/alloc-id:fake
32894 68/push 0/imm32/name
32895 68/push 0/imm32/name
32896 68/push 0x11/imm32/alloc-id:fake:payload
32897 89/<- %ecx 4/r32/esp
32898 $test-emit-subx-stmt-select-primitive-2:initialize-var-name:
32899
32900 8d/copy-address *(ecx+4) 0/r32/eax
32901 (copy-array Heap "foo" %eax)
32902 $test-emit-subx-stmt-select-primitive-2:initialize-var-register:
32903
32904 8d/copy-address *(ecx+0x1c) 0/r32/eax
32905 (copy-array Heap "eax" %eax)
32906 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-var:
32907
32908 68/push 0/imm32/is-deref:false
32909 68/push 0/imm32/next
32910 68/push 0/imm32/next
32911 51/push-ecx/var-foo
32912 68/push 0x11/imm32/alloc-id:fake
32913 68/push 0x11/imm32/alloc-id:fake:payload
32914 89/<- %ebx 4/r32/esp
32915 $test-emit-subx-stmt-select-primitive-2:initialize-stmt:
32916
32917 68/push 0/imm32/no-outputs
32918 68/push 0/imm32/no-outputs
32919 53/push-ebx/inouts
32920 68/push 0x11/imm32/alloc-id:fake
32921 68/push 0/imm32/operation
32922 68/push 0/imm32/operation
32923 68/push 1/imm32
32924 89/<- %esi 4/r32/esp
32925 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-operation:
32926
32927 8d/copy-address *(esi+4) 0/r32/eax
32928 (copy-array Heap "increment" %eax)
32929 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var:
32930
32931 68/push 0/imm32/register
32932 68/push 0/imm32/register
32933 68/push 0/imm32/no-stack-offset
32934 68/push 1/imm32/block-depth
32935 ff 6/subop/push *(ecx+0x10)
32936 68/push 0x11/imm32/alloc-id:fake
32937 68/push 0/imm32/name
32938 68/push 0/imm32/name
32939 68/push 0x11/imm32/alloc-id:fake:payload
32940 89/<- %ebx 4/r32/esp
32941 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var-name:
32942
32943 8d/copy-address *(ebx+4) 0/r32/eax
32944 (copy-array Heap "dummy" %eax)
32945 $test-emit-subx-stmt-select-primitive-2:initialize-formal-register:
32946
32947 8d/copy-address *(ebx+0x1c) 0/r32/eax
32948 (copy-array Heap "*" %eax)
32949 $test-emit-subx-stmt-select-primitive-2:initialize-var-list:
32950
32951 68/push 0/imm32/next
32952 68/push 0/imm32/next
32953 53/push-ebx/formal-var
32954 68/push 0x11/imm32/alloc-id:fake
32955 68/push 0x11/imm32/alloc-id:fake:payload
32956 89/<- %ebx 4/r32/esp
32957 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2:
32958
32959 68/push 0/imm32/next
32960 68/push 0/imm32/next
32961 68/push 0/imm32/no-x32
32962 68/push 0/imm32/no-xm32
32963 68/push 0/imm32/no-disp32
32964 68/push 0/imm32/no-imm8
32965 68/push 0/imm32/no-imm32
32966 68/push 0/imm32/no-r32
32967 68/push 3/imm32/rm32-is-first-output
32968 68/push 0/imm32/subx-name
32969 68/push 0/imm32/subx-name
32970 53/push-ebx/outputs
32971 68/push 0x11/imm32/alloc-id:fake
32972 68/push 0/imm32/no-inouts
32973 68/push 0/imm32/no-inouts
32974 68/push 0/imm32/name
32975 68/push 0/imm32/name
32976 68/push 0x11/imm32/alloc-id:fake:payload
32977 89/<- %edi 4/r32/esp
32978 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-name:
32979
32980 8d/copy-address *(edi+4) 0/r32/eax
32981 (copy-array Heap "increment" %eax)
32982 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-subx-name:
32983
32984 8d/copy-address *(edi+0x1c) 0/r32/eax
32985 (copy-array Heap "ff 0/subop/increment" %eax)
32986 $test-emit-subx-stmt-select-primitive-2:initialize-primitive:
32987
32988 57/push-edi
32989 68/push 0x11/imm32/alloc-id:fake
32990 68/push 0/imm32/no-x32
32991 68/push 0/imm32/no-xm32
32992 68/push 0/imm32/no-disp32
32993 68/push 0/imm32/no-imm8
32994 68/push 0/imm32/no-imm32
32995 68/push 0/imm32/no-r32
32996 68/push 1/imm32/rm32-is-first-inout
32997 68/push 0/imm32/subx-name
32998 68/push 0/imm32/subx-name
32999 68/push 0/imm32/no-outputs
33000 68/push 0/imm32/no-outputs
33001 53/push-ebx/inouts
33002 68/push 0x11/imm32/alloc-id:fake
33003 68/push 0/imm32/name
33004 68/push 0/imm32/name
33005 89/<- %ebx 4/r32/esp
33006 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-name:
33007
33008 (copy-array Heap "increment" %ebx)
33009 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-subx-name:
33010
33011 8d/copy-address *(ebx+0x18) 0/r32/eax
33012 (copy-array Heap "ff 0/subop/increment" %eax)
33013
33014 c7 0/subop/copy *Curr-block-depth 0/imm32
33015 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
33016 (flush _test-output-buffered-file)
33017 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33023
33024 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive-2")
33025
33026 89/<- %esp 5/r32/ebp
33027 5d/pop-to-ebp
33028 c3/return
33029
33030 test-increment-register:
33031
33032
33033
33034
33035
33036
33037
33038
33039
33040
33041
33042
33043
33044 55/push-ebp
33045 89/<- %ebp 4/r32/esp
33046
33047 (clear-stream _test-output-stream)
33048 (clear-stream $_test-output-buffered-file->buffer)
33049 $test-increment-register:initialize-type:
33050
33051 68/push 0/imm32/right:null
33052 68/push 0/imm32/right:null
33053 68/push 0/imm32/left:unused
33054 68/push 1/imm32/value:int
33055 68/push 1/imm32/is-atom?:true
33056 68/push 0x11/imm32/alloc-id:fake:payload
33057 89/<- %ecx 4/r32/esp
33058 $test-increment-register:initialize-var:
33059
33060 68/push 0/imm32/register
33061 68/push 0/imm32/register
33062 68/push 0/imm32/no-stack-offset
33063 68/push 1/imm32/block-depth
33064 51/push-ecx
33065 68/push 0x11/imm32/alloc-id:fake
33066 68/push 0/imm32/name
33067 68/push 0/imm32/name
33068 68/push 0x11/imm32/alloc-id:fake:payload
33069 89/<- %ecx 4/r32/esp
33070 $test-increment-register:initialize-var-name:
33071
33072 8d/copy-address *(ecx+4) 0/r32/eax
33073 (copy-array Heap "foo" %eax)
33074 $test-increment-register:initialize-var-register:
33075
33076 8d/copy-address *(ecx+0x1c) 0/r32/eax
33077 (copy-array Heap "eax" %eax)
33078 $test-increment-register:initialize-stmt-var:
33079
33080 68/push 0/imm32/is-deref:false
33081 68/push 0/imm32/next
33082 68/push 0/imm32/next
33083 51/push-ecx/var-foo
33084 68/push 0x11/imm32/alloc-id:fake
33085 68/push 0x11/imm32/alloc-id:fake:payload
33086 89/<- %ebx 4/r32/esp
33087 $test-increment-register:initialize-stmt:
33088
33089 53/push-ebx/outputs
33090 68/push 0x11/imm32/alloc-id:fake
33091 68/push 0/imm32/no-inouts
33092 68/push 0/imm32/no-inouts
33093 68/push 0/imm32/operation
33094 68/push 0/imm32/operation
33095 68/push 1/imm32
33096 89/<- %esi 4/r32/esp
33097 $test-increment-register:initialize-stmt-operation:
33098
33099 8d/copy-address *(esi+4) 0/r32/eax
33100 (copy-array Heap "increment" %eax)
33101
33102 c7 0/subop/copy *Curr-block-depth 0/imm32
33103 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33104 (flush _test-output-buffered-file)
33105 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33111
33112 (check-next-stream-line-equal _test-output-stream "40/increment-eax" "F - test-increment-register")
33113
33114 89/<- %esp 5/r32/ebp
33115 5d/pop-to-ebp
33116 c3/return
33117
33118 test-add-reg-to-reg:
33119
33120
33121
33122
33123
33124 55/push-ebp
33125 89/<- %ebp 4/r32/esp
33126
33127 (clear-stream _test-output-stream)
33128 (clear-stream $_test-output-buffered-file->buffer)
33129 $test-add-reg-to-reg:initialize-type:
33130
33131 68/push 0/imm32/right:null
33132 68/push 0/imm32/right:null
33133 68/push 0/imm32/left:unused
33134 68/push 1/imm32/value:int
33135 68/push 1/imm32/is-atom?:true
33136 68/push 0x11/imm32/alloc-id:fake:payload
33137 89/<- %ecx 4/r32/esp
33138 $test-add-reg-to-reg:initialize-var1:
33139
33140 68/push 0/imm32/register
33141 68/push 0/imm32/register
33142 68/push 0/imm32/no-stack-offset
33143 68/push 1/imm32/block-depth
33144 51/push-ecx
33145 68/push 0x11/imm32/alloc-id:fake
33146 68/push 0/imm32/name
33147 68/push 0/imm32/name
33148 68/push 0x11/imm32/alloc-id:fake:payload
33149 89/<- %ecx 4/r32/esp
33150 $test-add-reg-to-reg:initialize-var1-name:
33151
33152 8d/copy-address *(ecx+4) 0/r32/eax
33153 (copy-array Heap "var1" %eax)
33154 $test-add-reg-to-reg:initialize-var1-register:
33155
33156 8d/copy-address *(ecx+0x1c) 0/r32/eax
33157 (copy-array Heap "eax" %eax)
33158 $test-add-reg-to-reg:initialize-var2:
33159
33160 68/push 0/imm32/register
33161 68/push 0/imm32/register
33162 68/push 0/imm32/no-stack-offset
33163 68/push 1/imm32/block-depth
33164 ff 6/subop/push *(ecx+0x10)
33165 68/push 0x11/imm32/alloc-id:fake
33166 68/push 0/imm32/name
33167 68/push 0/imm32/name
33168 68/push 0x11/imm32/alloc-id:fake:payload
33169 89/<- %edx 4/r32/esp
33170 $test-add-reg-to-reg:initialize-var2-name:
33171
33172 8d/copy-address *(edx+4) 0/r32/eax
33173 (copy-array Heap "var2" %eax)
33174 $test-add-reg-to-reg:initialize-var2-register:
33175
33176 8d/copy-address *(edx+0x1c) 0/r32/eax
33177 (copy-array Heap "ecx" %eax)
33178 $test-add-reg-to-reg:initialize-inouts:
33179
33180 68/push 0/imm32/is-deref:false
33181 68/push 0/imm32/next
33182 68/push 0/imm32/next
33183 52/push-edx/var2
33184 68/push 0x11/imm32/alloc-id:fake
33185 68/push 0x11/imm32/alloc-id:fake:payload
33186 89/<- %esi 4/r32/esp
33187 $test-add-reg-to-reg:initialize-outputs:
33188
33189 68/push 0/imm32/is-deref:false
33190 68/push 0/imm32/next
33191 68/push 0/imm32/next
33192 51/push-ecx/var1
33193 68/push 0x11/imm32/alloc-id:fake
33194 68/push 0x11/imm32/alloc-id:fake:payload
33195 89/<- %edi 4/r32/esp
33196 $test-add-reg-to-reg:initialize-stmt:
33197
33198 68/push 0/imm32/next
33199 68/push 0/imm32/next
33200 57/push-edi/outputs
33201 68/push 0x11/imm32/alloc-id:fake
33202 56/push-esi/inouts
33203 68/push 0x11/imm32/alloc-id:fake
33204 68/push 0/imm32/operation
33205 68/push 0/imm32/operation
33206 68/push 1/imm32/tag:stmt1
33207 89/<- %esi 4/r32/esp
33208 $test-add-reg-to-reg:initialize-stmt-operation:
33209
33210 8d/copy-address *(esi+4) 0/r32/eax
33211 (copy-array Heap "add" %eax)
33212
33213 c7 0/subop/copy *Curr-block-depth 0/imm32
33214 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33215 (flush _test-output-buffered-file)
33216 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33222
33223 (check-next-stream-line-equal _test-output-stream "01/add-to %eax 0x00000001/r32" "F - test-add-reg-to-reg")
33224
33225 89/<- %esp 5/r32/ebp
33226 5d/pop-to-ebp
33227 c3/return
33228
33229 test-add-reg-to-mem:
33230
33231
33232
33233
33234
33235 55/push-ebp
33236 89/<- %ebp 4/r32/esp
33237
33238 (clear-stream _test-output-stream)
33239 (clear-stream $_test-output-buffered-file->buffer)
33240 $test-add-reg-to-mem:initialize-type:
33241
33242 68/push 0/imm32/right:null
33243 68/push 0/imm32/right:null
33244 68/push 0/imm32/left:unused
33245 68/push 1/imm32/value:int
33246 68/push 1/imm32/is-atom?:true
33247 68/push 0x11/imm32/alloc-id:fake:payload
33248 89/<- %ecx 4/r32/esp
33249 $test-add-reg-to-mem:initialize-var1:
33250
33251 68/push 0/imm32/register
33252 68/push 0/imm32/register
33253 68/push 8/imm32/stack-offset
33254 68/push 1/imm32/block-depth
33255 51/push-ecx
33256 68/push 0x11/imm32/alloc-id:fake
33257 68/push 0/imm32/name
33258 68/push 0/imm32/name
33259 68/push 0x11/imm32/alloc-id:fake:payload
33260 89/<- %ecx 4/r32/esp
33261 $test-add-reg-to-mem:initialize-var1-name:
33262
33263 8d/copy-address *(ecx+4) 0/r32/eax
33264 (copy-array Heap "var1" %eax)
33265 $test-add-reg-to-mem:initialize-var2:
33266
33267 68/push 0/imm32/register
33268 68/push 0/imm32/register
33269 68/push 0/imm32/no-stack-offset
33270 68/push 1/imm32/block-depth
33271 ff 6/subop/push *(ecx+0x10)
33272 68/push 0x11/imm32/alloc-id:fake
33273 68/push 0/imm32/name
33274 68/push 0/imm32/name
33275 68/push 0x11/imm32/alloc-id:fake:payload
33276 89/<- %edx 4/r32/esp
33277 $test-add-reg-to-mem:initialize-var2-name:
33278
33279 8d/copy-address *(edx+4) 0/r32/eax
33280 (copy-array Heap "var2" %eax)
33281 $test-add-reg-to-mem:initialize-var2-register:
33282
33283 8d/copy-address *(edx+0x1c) 0/r32/eax
33284 (copy-array Heap "ecx" %eax)
33285 $test-add-reg-to-mem:initialize-inouts:
33286
33287 68/push 0/imm32/is-deref:false
33288 68/push 0/imm32/next
33289 68/push 0/imm32/next
33290 52/push-edx/var2
33291 68/push 0x11/imm32/alloc-id:fake
33292 68/push 0x11/imm32/alloc-id:fake:payload
33293 89/<- %esi 4/r32/esp
33294
33295 68/push 0/imm32/is-deref:false
33296 56/push-esi/next
33297 68/push 0x11/imm32/alloc-id:fake
33298 51/push-ecx/var1
33299 68/push 0x11/imm32/alloc-id:fake
33300 68/push 0x11/imm32/alloc-id:fake:payload
33301 89/<- %esi 4/r32/esp
33302 $test-add-reg-to-mem:initialize-stmt:
33303
33304 68/push 0/imm32/next
33305 68/push 0/imm32/next
33306 68/push 0/imm32/outputs
33307 68/push 0/imm32/outputs
33308 56/push-esi/inouts
33309 68/push 0x11/imm32/alloc-id:fake
33310 68/push 0/imm32/operation
33311 68/push 0/imm32/operation
33312 68/push 1/imm32/tag:stmt1
33313 89/<- %esi 4/r32/esp
33314 $test-add-reg-to-mem:initialize-stmt-operation:
33315
33316 8d/copy-address *(esi+4) 0/r32/eax
33317 (copy-array Heap "add-to" %eax)
33318
33319 c7 0/subop/copy *Curr-block-depth 0/imm32
33320 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33321 (flush _test-output-buffered-file)
33322 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33328
33329 (check-next-stream-line-equal _test-output-stream "01/add-to *(ebp+0x00000008) 0x00000001/r32" "F - test-add-reg-to-mem")
33330
33331 89/<- %esp 5/r32/ebp
33332 5d/pop-to-ebp
33333 c3/return
33334
33335 test-add-mem-to-reg:
33336
33337
33338
33339
33340
33341 55/push-ebp
33342 89/<- %ebp 4/r32/esp
33343
33344 (clear-stream _test-output-stream)
33345 (clear-stream $_test-output-buffered-file->buffer)
33346 $test-add-mem-to-reg:initialize-type:
33347
33348 68/push 0/imm32/right:null
33349 68/push 0/imm32/right:null
33350 68/push 0/imm32/left:unused
33351 68/push 1/imm32/value:int
33352 68/push 1/imm32/is-atom?:true
33353 68/push 0x11/imm32/alloc-id:fake:payload
33354 89/<- %ecx 4/r32/esp
33355 $test-add-mem-to-reg:initialize-var:
33356
33357 68/push 0/imm32/register
33358 68/push 0/imm32/register
33359 68/push 0/imm32/no-stack-offset
33360 68/push 1/imm32/block-depth
33361 51/push-ecx
33362 68/push 0x11/imm32/alloc-id:fake
33363 68/push 0/imm32/name
33364 68/push 0/imm32/name
33365 68/push 0x11/imm32/alloc-id:fake:payload
33366 89/<- %ecx 4/r32/esp
33367 $test-add-mem-to-reg:initialize-var-name:
33368
33369 8d/copy-address *(ecx+4) 0/r32/eax
33370 (copy-array Heap "var1" %eax)
33371 $test-add-mem-to-reg:initialize-var-register:
33372
33373 8d/copy-address *(ecx+0x1c) 0/r32/eax
33374 (copy-array Heap "eax" %eax)
33375 $test-add-mem-to-reg:initialize-var2:
33376
33377 68/push 0/imm32/register
33378 68/push 0/imm32/register
33379 68/push 8/imm32/stack-offset
33380 68/push 1/imm32/block-depth
33381 ff 6/subop/push *(ecx+0x10)
33382 68/push 0x11/imm32/alloc-id:fake
33383 68/push 0/imm32/name
33384 68/push 0/imm32/name
33385 68/push 0x11/imm32/alloc-id:fake:payload
33386 89/<- %edx 4/r32/esp
33387 $test-add-mem-to-reg:initialize-var2-name:
33388
33389 8d/copy-address *(edx+4) 0/r32/eax
33390 (copy-array Heap "var2" %eax)
33391 $test-add-mem-to-reg:initialize-inouts:
33392
33393 68/push 0/imm32/is-deref:false
33394 68/push 0/imm32/next
33395 68/push 0/imm32/next
33396 52/push-edx/var2
33397 68/push 0x11/imm32/alloc-id:fake
33398 68/push 0x11/imm32/alloc-id:fake:payload
33399 89/<- %esi 4/r32/esp
33400 $test-add-mem-to-reg:initialize-outputs:
33401
33402 68/push 0/imm32/is-deref:false
33403 68/push 0/imm32/next
33404 68/push 0/imm32/next
33405 51/push-ecx/var1
33406 68/push 0x11/imm32/alloc-id:fake
33407 68/push 0x11/imm32/alloc-id:fake:payload
33408 89/<- %edi 4/r32/esp
33409 $test-add-mem-to-reg:initialize-stmt:
33410
33411 68/push 0/imm32/next
33412 68/push 0/imm32/next
33413 57/push-edi/outputs
33414 68/push 0x11/imm32/alloc-id:fake
33415 56/push-esi/inouts
33416 68/push 0x11/imm32/alloc-id:fake
33417 68/push 0/imm32/operation
33418 68/push 0/imm32/operation
33419 68/push 1/imm32/tag:stmt1
33420 89/<- %esi 4/r32/esp
33421 $test-add-mem-to-reg:initialize-stmt-operation:
33422
33423 8d/copy-address *(esi+4) 0/r32/eax
33424 (copy-array Heap "add" %eax)
33425
33426 c7 0/subop/copy *Curr-block-depth 0/imm32
33427 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33428 (flush _test-output-buffered-file)
33429 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33435
33436 (check-next-stream-line-equal _test-output-stream "03/add *(ebp+0x00000008) 0x00000000/r32" "F - test-add-mem-to-reg")
33437
33438 89/<- %esp 5/r32/ebp
33439 5d/pop-to-ebp
33440 c3/return
33441
33442 test-add-literal-to-eax:
33443
33444
33445
33446
33447
33448 55/push-ebp
33449 89/<- %ebp 4/r32/esp
33450
33451 (clear-stream _test-output-stream)
33452 (clear-stream $_test-output-buffered-file->buffer)
33453 $test-add-literal-to-eax:initialize-var-type:
33454
33455 68/push 0/imm32/right:null
33456 68/push 0/imm32/right:null
33457 68/push 0/imm32/left:unused
33458 68/push 1/imm32/value:int
33459 68/push 1/imm32/is-atom?:true
33460 68/push 0x11/imm32/alloc-id:fake:payload
33461 89/<- %ecx 4/r32/esp
33462 $test-add-literal-to-eax:initialize-var:
33463
33464 68/push 0/imm32/register
33465 68/push 0/imm32/register
33466 68/push 0/imm32/no-stack-offset
33467 68/push 1/imm32/block-depth
33468 51/push-ecx
33469 68/push 0x11/imm32/alloc-id:fake
33470 68/push 0/imm32/name
33471 68/push 0/imm32/name
33472 68/push 0x11/imm32/alloc-id:fake:payload
33473 89/<- %ecx 4/r32/esp
33474 $test-add-literal-to-eax:initialize-var-name:
33475
33476 8d/copy-address *(ecx+4) 0/r32/eax
33477 (copy-array Heap "v" %eax)
33478 $test-add-literal-to-eax:initialize-var-register:
33479
33480 8d/copy-address *(ecx+0x1c) 0/r32/eax
33481 (copy-array Heap "eax" %eax)
33482 $test-add-literal-to-eax:initialize-literal-type:
33483
33484 68/push 0/imm32/right:null
33485 68/push 0/imm32/right:null
33486 68/push 0/imm32/left:unused
33487 68/push 0/imm32/value:literal
33488 68/push 1/imm32/is-atom?:true
33489 68/push 0x11/imm32/alloc-id:fake:payload
33490 89/<- %edx 4/r32/esp
33491 $test-add-literal-to-eax:initialize-literal:
33492
33493 68/push 0/imm32/register
33494 68/push 0/imm32/register
33495 68/push 0/imm32/no-stack-offset
33496 68/push 1/imm32/block-depth
33497 52/push-edx
33498 68/push 0x11/imm32/alloc-id:fake
33499 68/push 0/imm32/name
33500 68/push 0/imm32/name
33501 68/push 0x11/imm32/alloc-id:fake:payload
33502 89/<- %edx 4/r32/esp
33503 $test-add-literal-to-eax:initialize-literal-value:
33504
33505 8d/copy-address *(edx+4) 0/r32/eax
33506 (copy-array Heap "0x34" %eax)
33507 $test-add-literal-to-eax:initialize-inouts:
33508
33509 68/push 0/imm32/is-deref:false
33510 68/push 0/imm32/next
33511 68/push 0/imm32/next
33512 52/push-edx/l
33513 68/push 0x11/imm32/alloc-id:fake
33514 68/push 0x11/imm32/alloc-id:fake:payload
33515 89/<- %esi 4/r32/esp
33516 $test-add-literal-to-eax:initialize-outputs:
33517
33518 68/push 0/imm32/is-deref:false
33519 68/push 0/imm32/next
33520 68/push 0/imm32/next
33521 51/push-ecx/v
33522 68/push 0x11/imm32/alloc-id:fake
33523 68/push 0x11/imm32/alloc-id:fake:payload
33524 89/<- %edi 4/r32/esp
33525 $test-add-literal-to-eax:initialize-stmt:
33526
33527 68/push 0/imm32/next
33528 68/push 0/imm32/next
33529 57/push-edi/outputs
33530 68/push 0x11/imm32/alloc-id:fake
33531 56/push-esi/inouts
33532 68/push 0x11/imm32/alloc-id:fake
33533 68/push 0/imm32/operation
33534 68/push 0/imm32/operation
33535 68/push 1/imm32/tag:stmt1
33536 89/<- %esi 4/r32/esp
33537 $test-add-literal-to-eax:initialize-stmt-operation:
33538
33539 8d/copy-address *(esi+4) 0/r32/eax
33540 (copy-array Heap "add" %eax)
33541
33542 c7 0/subop/copy *Curr-block-depth 0/imm32
33543 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33544 (flush _test-output-buffered-file)
33545 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33551
33552 (check-next-stream-line-equal _test-output-stream "05/add-to-eax 0x34/imm32" "F - test-add-literal-to-eax")
33553
33554 89/<- %esp 5/r32/ebp
33555 5d/pop-to-ebp
33556 c3/return
33557
33558 test-add-literal-to-reg:
33559
33560
33561
33562
33563
33564 55/push-ebp
33565 89/<- %ebp 4/r32/esp
33566
33567 (clear-stream _test-output-stream)
33568 (clear-stream $_test-output-buffered-file->buffer)
33569 $test-add-literal-to-reg:initialize-var-type:
33570
33571 68/push 0/imm32/right:null
33572 68/push 0/imm32/right:null
33573 68/push 0/imm32/left:unused
33574 68/push 1/imm32/value:int
33575 68/push 1/imm32/is-atom?:true
33576 68/push 0x11/imm32/alloc-id:fake:payload
33577 89/<- %ecx 4/r32/esp
33578 $test-add-literal-to-reg:initialize-var:
33579
33580 68/push 0/imm32/register
33581 68/push 0/imm32/register
33582 68/push 0/imm32/no-stack-offset
33583 68/push 1/imm32/block-depth
33584 51/push-ecx
33585 68/push 0x11/imm32/alloc-id:fake
33586 68/push 0/imm32/name
33587 68/push 0/imm32/name
33588 68/push 0x11/imm32/alloc-id:fake:payload
33589 89/<- %ecx 4/r32/esp
33590 $test-add-literal-to-reg:initialize-var-name:
33591
33592 8d/copy-address *(ecx+4) 0/r32/eax
33593 (copy-array Heap "v" %eax)
33594 $test-add-literal-to-reg:initialize-var-register:
33595
33596 8d/copy-address *(ecx+0x1c) 0/r32/eax
33597 (copy-array Heap "ecx" %eax)
33598 $test-add-literal-to-reg:initialize-literal-type:
33599
33600 68/push 0/imm32/right:null
33601 68/push 0/imm32/right:null
33602 68/push 0/imm32/left:unused
33603 68/push 0/imm32/value:literal
33604 68/push 1/imm32/is-atom?:true
33605 68/push 0x11/imm32/alloc-id:fake:payload
33606 89/<- %edx 4/r32/esp
33607 $test-add-literal-to-reg:initialize-literal:
33608
33609 68/push 0/imm32/register
33610 68/push 0/imm32/register
33611 68/push 0/imm32/no-stack-offset
33612 68/push 1/imm32/block-depth
33613 52/push-edx
33614 68/push 0x11/imm32/alloc-id:fake
33615 68/push 0/imm32/name
33616 68/push 0/imm32/name
33617 68/push 0x11/imm32/alloc-id:fake:payload
33618 89/<- %edx 4/r32/esp
33619 $test-add-literal-to-reg:initialize-literal-value:
33620
33621 8d/copy-address *(edx+4) 0/r32/eax
33622 (copy-array Heap "0x34" %eax)
33623 $test-add-literal-to-reg:initialize-inouts:
33624
33625 68/push 0/imm32/is-deref:false
33626 68/push 0/imm32/next
33627 68/push 0/imm32/next
33628 52/push-edx/l
33629 68/push 0x11/imm32/alloc-id:fake
33630 68/push 0x11/imm32/alloc-id:fake:payload
33631 89/<- %esi 4/r32/esp
33632 $test-add-literal-to-reg:initialize-outputs:
33633
33634 68/push 0/imm32/is-deref:false
33635 68/push 0/imm32/next
33636 68/push 0/imm32/next
33637 51/push-ecx/v
33638 68/push 0x11/imm32/alloc-id:fake
33639 68/push 0x11/imm32/alloc-id:fake:payload
33640 89/<- %edi 4/r32/esp
33641 $test-add-literal-to-reg:initialize-stmt:
33642
33643 68/push 0/imm32/next
33644 68/push 0/imm32/next
33645 57/push-edi/outputs
33646 68/push 0x11/imm32/alloc-id:fake
33647 56/push-esi/inouts
33648 68/push 0x11/imm32/alloc-id:fake
33649 68/push 0/imm32/operation
33650 68/push 0/imm32/operation
33651 68/push 1/imm32/tag:stmt1
33652 89/<- %esi 4/r32/esp
33653 $test-add-literal-to-reg:initialize-stmt-operation:
33654
33655 8d/copy-address *(esi+4) 0/r32/eax
33656 (copy-array Heap "add" %eax)
33657
33658 c7 0/subop/copy *Curr-block-depth 0/imm32
33659 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33660 (flush _test-output-buffered-file)
33661 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33667
33668 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %ecx 0x34/imm32" "F - test-add-literal-to-reg")
33669
33670 89/<- %esp 5/r32/ebp
33671 5d/pop-to-ebp
33672 c3/return
33673
33674 test-add-literal-to-mem:
33675
33676
33677
33678
33679
33680 55/push-ebp
33681 89/<- %ebp 4/r32/esp
33682
33683 (clear-stream _test-output-stream)
33684 (clear-stream $_test-output-buffered-file->buffer)
33685 $test-add-literal-to-mem:initialize-type:
33686
33687 68/push 0/imm32/right:null
33688 68/push 0/imm32/right:null
33689 68/push 0/imm32/left:unused
33690 68/push 1/imm32/value:int
33691 68/push 1/imm32/is-atom?:true
33692 68/push 0x11/imm32/alloc-id:fake:payload
33693 89/<- %ecx 4/r32/esp
33694 $test-add-literal-to-mem:initialize-var1:
33695
33696 68/push 0/imm32/register
33697 68/push 0/imm32/register
33698 68/push 8/imm32/stack-offset
33699 68/push 1/imm32/block-depth
33700 51/push-ecx
33701 68/push 0x11/imm32/alloc-id:fake
33702 68/push 0/imm32/name
33703 68/push 0/imm32/name
33704 68/push 0x11/imm32/alloc-id:fake:payload
33705 89/<- %ecx 4/r32/esp
33706 $test-add-literal-to-mem:initialize-var1-name:
33707
33708 8d/copy-address *(ecx+4) 0/r32/eax
33709 (copy-array Heap "var1" %eax)
33710 $test-add-literal-to-mem:initialize-literal-type:
33711
33712 68/push 0/imm32/right:null
33713 68/push 0/imm32/right:null
33714 68/push 0/imm32/left:unused
33715 68/push 0/imm32/value:literal
33716 68/push 1/imm32/is-atom?:true
33717 68/push 0x11/imm32/alloc-id:fake:payload
33718 89/<- %edx 4/r32/esp
33719 $test-add-literal-to-mem:initialize-literal:
33720
33721 68/push 0/imm32/register
33722 68/push 0/imm32/register
33723 68/push 0/imm32/no-stack-offset
33724 68/push 1/imm32/block-depth
33725 52/push-edx
33726 68/push 0x11/imm32/alloc-id:fake
33727 68/push 0/imm32/name
33728 68/push 0/imm32/name
33729 68/push 0x11/imm32/alloc-id:fake:payload
33730 89/<- %edx 4/r32/esp
33731 $test-add-literal-to-mem:initialize-literal-value:
33732
33733 8d/copy-address *(edx+4) 0/r32/eax
33734 (copy-array Heap "0x34" %eax)
33735 $test-add-literal-to-mem:initialize-inouts:
33736
33737 68/push 0/imm32/is-deref:false
33738 68/push 0/imm32/next
33739 68/push 0/imm32/next
33740 52/push-edx/l
33741 68/push 0x11/imm32/alloc-id:fake
33742 68/push 0x11/imm32/alloc-id:fake:payload
33743 89/<- %esi 4/r32/esp
33744
33745 68/push 0/imm32/is-deref:false
33746 56/push-esi/next
33747 68/push 0x11/imm32/alloc-id:fake
33748 51/push-ecx/var1
33749 68/push 0x11/imm32/alloc-id:fake
33750 68/push 0x11/imm32/alloc-id:fake:payload
33751 89/<- %esi 4/r32/esp
33752 $test-add-literal-to-mem:initialize-stmt:
33753
33754 68/push 0/imm32/next
33755 68/push 0/imm32/next
33756 68/push 0/imm32/outputs
33757 68/push 0/imm32/outputs
33758 56/push-esi/inouts
33759 68/push 0x11/imm32/alloc-id:fake
33760 68/push 0/imm32/operation
33761 68/push 0/imm32/operation
33762 68/push 1/imm32/tag:stmt1
33763 89/<- %esi 4/r32/esp
33764 $test-add-literal-to-mem:initialize-stmt-operation:
33765
33766 8d/copy-address *(esi+4) 0/r32/eax
33767 (copy-array Heap "add-to" %eax)
33768
33769 c7 0/subop/copy *Curr-block-depth 0/imm32
33770 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33771 (flush _test-output-buffered-file)
33772 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33778
33779 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem")
33780
33781 89/<- %esp 5/r32/ebp
33782 5d/pop-to-ebp
33783 c3/return
33784
33785 test-shift-reg-by-literal:
33786
33787
33788
33789
33790
33791 55/push-ebp
33792 89/<- %ebp 4/r32/esp
33793
33794 (clear-stream _test-output-stream)
33795 (clear-stream $_test-output-buffered-file->buffer)
33796 $test-shift-reg-by-literal:initialize-var-type:
33797
33798 68/push 0/imm32/right:null
33799 68/push 0/imm32/right:null
33800 68/push 0/imm32/left:unused
33801 68/push 1/imm32/value:int
33802 68/push 1/imm32/is-atom?:true
33803 68/push 0x11/imm32/alloc-id:fake:payload
33804 89/<- %ecx 4/r32/esp
33805 $test-shift-reg-by-literal:initialize-var:
33806
33807 68/push 0/imm32/register
33808 68/push 0/imm32/register
33809 68/push 0/imm32/no-stack-offset
33810 68/push 1/imm32/block-depth
33811 51/push-ecx
33812 68/push 0x11/imm32/alloc-id:fake
33813 68/push 0/imm32/name
33814 68/push 0/imm32/name
33815 68/push 0x11/imm32/alloc-id:fake:payload
33816 89/<- %ecx 4/r32/esp
33817 $test-shift-reg-by-literal:initialize-var-name:
33818
33819 8d/copy-address *(ecx+4) 0/r32/eax
33820 (copy-array Heap "v" %eax)
33821 $test-shift-reg-by-literal:initialize-var-register:
33822
33823 8d/copy-address *(ecx+0x1c) 0/r32/eax
33824 (copy-array Heap "ecx" %eax)
33825 $test-shift-reg-by-literal:initialize-literal-type:
33826
33827 68/push 0/imm32/right:null
33828 68/push 0/imm32/right:null
33829 68/push 0/imm32/left:unused
33830 68/push 0/imm32/value:literal
33831 68/push 1/imm32/is-atom?:true
33832 68/push 0x11/imm32/alloc-id:fake:payload
33833 89/<- %edx 4/r32/esp
33834 $test-shift-reg-by-literal:initialize-literal:
33835
33836 68/push 0/imm32/register
33837 68/push 0/imm32/register
33838 68/push 0/imm32/no-stack-offset
33839 68/push 1/imm32/block-depth
33840 52/push-edx
33841 68/push 0x11/imm32/alloc-id:fake
33842 68/push 0/imm32/name
33843 68/push 0/imm32/name
33844 68/push 0x11/imm32/alloc-id:fake:payload
33845 89/<- %edx 4/r32/esp
33846 $test-shift-reg-by-literal:initialize-literal-value:
33847
33848 8d/copy-address *(edx+4) 0/r32/eax
33849 (copy-array Heap "2" %eax)
33850 $test-shift-reg-by-literal:initialize-inouts:
33851
33852 68/push 0/imm32/is-deref:false
33853 68/push 0/imm32/next
33854 68/push 0/imm32/next
33855 52/push-edx/l
33856 68/push 0x11/imm32/alloc-id:fake
33857 68/push 0x11/imm32/alloc-id:fake:payload
33858 89/<- %esi 4/r32/esp
33859 $test-shift-reg-by-literal:initialize-outputs:
33860
33861 68/push 0/imm32/is-deref:false
33862 68/push 0/imm32/next
33863 68/push 0/imm32/next
33864 51/push-ecx/v
33865 68/push 0x11/imm32/alloc-id:fake
33866 68/push 0x11/imm32/alloc-id:fake:payload
33867 89/<- %edi 4/r32/esp
33868 $test-shift-reg-by-literal:initialize-stmt:
33869
33870 68/push 0/imm32/next
33871 68/push 0/imm32/next
33872 57/push-edi/outputs
33873 68/push 0x11/imm32/alloc-id:fake
33874 56/push-esi/inouts
33875 68/push 0x11/imm32/alloc-id:fake
33876 68/push 0/imm32/operation
33877 68/push 0/imm32/operation
33878 68/push 1/imm32/tag:stmt1
33879 89/<- %esi 4/r32/esp
33880 $test-shift-reg-by-literal:initialize-stmt-operation:
33881
33882 8d/copy-address *(esi+4) 0/r32/eax
33883 (copy-array Heap "shift-left" %eax)
33884
33885 c7 0/subop/copy *Curr-block-depth 0/imm32
33886 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33887 (flush _test-output-buffered-file)
33888 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33894
33895 (check-next-stream-line-equal _test-output-stream "c1/shift 4/subop/left %ecx 2/imm8" "F - test-shift-reg-by-literal")
33896
33897 89/<- %esp 5/r32/ebp
33898 5d/pop-to-ebp
33899 c3/return
33900
33901 test-shift-mem-by-literal:
33902
33903
33904
33905
33906
33907 55/push-ebp
33908 89/<- %ebp 4/r32/esp
33909
33910 (clear-stream _test-output-stream)
33911 (clear-stream $_test-output-buffered-file->buffer)
33912 $test-shift-mem-by-literal:initialize-type:
33913
33914 68/push 0/imm32/right:null
33915 68/push 0/imm32/right:null
33916 68/push 0/imm32/left:unused
33917 68/push 1/imm32/value:int
33918 68/push 1/imm32/is-atom?:true
33919 68/push 0x11/imm32/alloc-id:fake:payload
33920 89/<- %ecx 4/r32/esp
33921 $test-shift-mem-by-literal:initialize-var1:
33922
33923 68/push 0/imm32/register
33924 68/push 0/imm32/register
33925 68/push 8/imm32/stack-offset
33926 68/push 1/imm32/block-depth
33927 51/push-ecx
33928 68/push 0x11/imm32/alloc-id:fake
33929 68/push 0/imm32/name
33930 68/push 0/imm32/name
33931 68/push 0x11/imm32/alloc-id:fake:payload
33932 89/<- %ecx 4/r32/esp
33933 $test-shift-mem-by-literal:initialize-var1-name:
33934
33935 8d/copy-address *(ecx+4) 0/r32/eax
33936 (copy-array Heap "var1" %eax)
33937 $test-shift-mem-by-literal:initialize-literal-type:
33938
33939 68/push 0/imm32/right:null
33940 68/push 0/imm32/right:null
33941 68/push 0/imm32/left:unused
33942 68/push 0/imm32/value:literal
33943 68/push 1/imm32/is-atom?:true
33944 68/push 0x11/imm32/alloc-id:fake:payload
33945 89/<- %edx 4/r32/esp
33946 $test-shift-mem-by-literal:initialize-literal:
33947
33948 68/push 0/imm32/register
33949 68/push 0/imm32/register
33950 68/push 0/imm32/no-stack-offset
33951 68/push 1/imm32/block-depth
33952 52/push-edx
33953 68/push 0x11/imm32/alloc-id:fake
33954 68/push 0/imm32/name
33955 68/push 0/imm32/name
33956 68/push 0x11/imm32/alloc-id:fake:payload
33957 89/<- %edx 4/r32/esp
33958 $test-shift-mem-by-literal:initialize-literal-value:
33959
33960 8d/copy-address *(edx+4) 0/r32/eax
33961 (copy-array Heap "3" %eax)
33962 $test-shift-mem-by-literal:initialize-inouts:
33963
33964 68/push 0/imm32/is-deref:false
33965 68/push 0/imm32/next
33966 68/push 0/imm32/next
33967 52/push-edx/l
33968 68/push 0x11/imm32/alloc-id:fake
33969 68/push 0x11/imm32/alloc-id:fake:payload
33970 89/<- %esi 4/r32/esp
33971
33972 68/push 0/imm32/is-deref:false
33973 56/push-esi/next
33974 68/push 0x11/imm32/alloc-id:fake
33975 51/push-ecx/var1
33976 68/push 0x11/imm32/alloc-id:fake
33977 68/push 0x11/imm32/alloc-id:fake:payload
33978 89/<- %esi 4/r32/esp
33979 $test-shift-mem-by-literal:initialize-stmt:
33980
33981 68/push 0/imm32/next
33982 68/push 0/imm32/next
33983 68/push 0/imm32/outputs
33984 68/push 0/imm32/outputs
33985 56/push-esi/inouts
33986 68/push 0x11/imm32/alloc-id:fake
33987 68/push 0/imm32/operation
33988 68/push 0/imm32/operation
33989 68/push 1/imm32/tag:stmt1
33990 89/<- %esi 4/r32/esp
33991 $test-shift-mem-by-literal:initialize-stmt-operation:
33992
33993 8d/copy-address *(esi+4) 0/r32/eax
33994 (copy-array Heap "shift-left" %eax)
33995
33996 c7 0/subop/copy *Curr-block-depth 0/imm32
33997 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
33998 (flush _test-output-buffered-file)
33999 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34005
34006 (check-next-stream-line-equal _test-output-stream "c1/shift 4/subop/left *(ebp+0x00000008) 3/imm8" "F - test-shift-mem-by-literal")
34007
34008 89/<- %esp 5/r32/ebp
34009 5d/pop-to-ebp
34010 c3/return
34011
34012 test-compare-reg-with-reg:
34013
34014
34015
34016
34017
34018 55/push-ebp
34019 89/<- %ebp 4/r32/esp
34020
34021 (clear-stream _test-output-stream)
34022 (clear-stream $_test-output-buffered-file->buffer)
34023 $test-compare-reg-with-reg:initialize-type:
34024
34025 68/push 0/imm32/right:null
34026 68/push 0/imm32/right:null
34027 68/push 0/imm32/left:unused
34028 68/push 1/imm32/value:int
34029 68/push 1/imm32/is-atom?:true
34030 68/push 0x11/imm32/alloc-id:fake:payload
34031 89/<- %ecx 4/r32/esp
34032 $test-compare-reg-with-reg:initialize-var1:
34033
34034 68/push 0/imm32/register
34035 68/push 0/imm32/register
34036 68/push 0/imm32/no-stack-offset
34037 68/push 1/imm32/block-depth
34038 51/push-ecx
34039 68/push 0x11/imm32/alloc-id:fake
34040 68/push 0/imm32/name
34041 68/push 0/imm32/name
34042 68/push 0x11/imm32/alloc-id:fake:payload
34043 89/<- %ecx 4/r32/esp
34044 $test-compare-reg-with-reg:initialize-var1-name:
34045
34046 8d/copy-address *(ecx+4) 0/r32/eax
34047 (copy-array Heap "var1" %eax)
34048 $test-compare-reg-with-reg:initialize-var1-register:
34049
34050 8d/copy-address *(ecx+0x1c) 0/r32/eax
34051 (copy-array Heap "ecx" %eax)
34052 $test-compare-reg-with-reg:initialize-var2:
34053
34054 68/push 0/imm32/register
34055 68/push 0/imm32/register
34056 68/push 0/imm32/no-stack-offset
34057 68/push 1/imm32/block-depth
34058 ff 6/subop/push *(ecx+0x10)
34059 68/push 0x11/imm32/alloc-id:fake
34060 68/push 0/imm32/name
34061 68/push 0/imm32/name
34062 68/push 0x11/imm32/alloc-id:fake:payload
34063 89/<- %edx 4/r32/esp
34064 $test-compare-reg-with-reg:initialize-var2-name:
34065
34066 8d/copy-address *(edx+4) 0/r32/eax
34067 (copy-array Heap "var2" %eax)
34068 $test-compare-reg-with-reg:initialize-var2-register:
34069
34070 8d/copy-address *(edx+0x1c) 0/r32/eax
34071 (copy-array Heap "eax" %eax)
34072 $test-compare-reg-with-reg:initialize-inouts:
34073
34074 68/push 0/imm32/is-deref:false
34075 68/push 0/imm32/next
34076 68/push 0/imm32/next
34077 52/push-edx/var2
34078 68/push 0x11/imm32/alloc-id:fake
34079 68/push 0x11/imm32/alloc-id:fake:payload
34080 89/<- %esi 4/r32/esp
34081
34082 68/push 0/imm32/is-deref:false
34083 56/push-esi/next
34084 68/push 0x11/imm32/alloc-id:fake
34085 51/push-ecx/var1
34086 68/push 0x11/imm32/alloc-id:fake
34087 68/push 0x11/imm32/alloc-id:fake:payload
34088 89/<- %esi 4/r32/esp
34089 $test-compare-reg-with-reg:initialize-stmt:
34090
34091 68/push 0/imm32/next
34092 68/push 0/imm32/next
34093 68/push 0/imm32/outputs
34094 68/push 0/imm32/outputs
34095 56/push-esi/inouts
34096 68/push 0x11/imm32/alloc-id:fake
34097 68/push 0/imm32/operation
34098 68/push 0/imm32/operation
34099 68/push 1/imm32/tag:stmt1
34100 89/<- %esi 4/r32/esp
34101 $test-compare-reg-with-reg:initialize-stmt-operation:
34102
34103 8d/copy-address *(esi+4) 0/r32/eax
34104 (copy-array Heap "compare" %eax)
34105
34106 c7 0/subop/copy *Curr-block-depth 0/imm32
34107 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34108 (flush _test-output-buffered-file)
34109 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34115
34116 (check-next-stream-line-equal _test-output-stream "39/compare-> %ecx 0x00000000/r32" "F - test-compare-reg-with-reg")
34117
34118 89/<- %esp 5/r32/ebp
34119 5d/pop-to-ebp
34120 c3/return
34121
34122 test-compare-mem-with-reg:
34123
34124
34125
34126
34127
34128 55/push-ebp
34129 89/<- %ebp 4/r32/esp
34130
34131 (clear-stream _test-output-stream)
34132 (clear-stream $_test-output-buffered-file->buffer)
34133 $test-compare-mem-with-reg:initialize-type:
34134
34135 68/push 0/imm32/right:null
34136 68/push 0/imm32/right:null
34137 68/push 0/imm32/left:unused
34138 68/push 1/imm32/value:int
34139 68/push 1/imm32/is-atom?:true
34140 68/push 0x11/imm32/alloc-id:fake:payload
34141 89/<- %ecx 4/r32/esp
34142 $test-compare-mem-with-reg:initialize-var1:
34143
34144 68/push 0/imm32/register
34145 68/push 0/imm32/register
34146 68/push 8/imm32/stack-offset
34147 68/push 1/imm32/block-depth
34148 51/push-ecx
34149 68/push 0x11/imm32/alloc-id:fake
34150 68/push 0/imm32/name
34151 68/push 0/imm32/name
34152 68/push 0x11/imm32/alloc-id:fake:payload
34153 89/<- %ecx 4/r32/esp
34154 $test-compare-mem-with-reg:initialize-var1-name:
34155
34156 8d/copy-address *(ecx+4) 0/r32/eax
34157 (copy-array Heap "var1" %eax)
34158 $test-compare-mem-with-reg:initialize-var2:
34159
34160 68/push 0/imm32/register
34161 68/push 0/imm32/register
34162 68/push 0/imm32/no-stack-offset
34163 68/push 1/imm32/block-depth
34164 ff 6/subop/push *(ecx+0x10)
34165 68/push 0x11/imm32/alloc-id:fake
34166 68/push 0/imm32/name
34167 68/push 0/imm32/name
34168 68/push 0x11/imm32/alloc-id:fake:payload
34169 89/<- %edx 4/r32/esp
34170 $test-compare-mem-with-reg:initialize-var2-name:
34171
34172 8d/copy-address *(edx+4) 0/r32/eax
34173 (copy-array Heap "var2" %eax)
34174 $test-compare-mem-with-reg:initialize-var2-register:
34175
34176 8d/copy-address *(edx+0x1c) 0/r32/eax
34177 (copy-array Heap "eax" %eax)
34178 $test-compare-mem-with-reg:initialize-inouts:
34179
34180 68/push 0/imm32/is-deref:false
34181 68/push 0/imm32/next
34182 68/push 0/imm32/next
34183 52/push-edx/var2
34184 68/push 0x11/imm32/alloc-id:fake
34185 68/push 0x11/imm32/alloc-id:fake:payload
34186 89/<- %esi 4/r32/esp
34187
34188 68/push 0/imm32/is-deref:false
34189 56/push-esi/next
34190 68/push 0x11/imm32/alloc-id:fake
34191 51/push-ecx/var1
34192 68/push 0x11/imm32/alloc-id:fake
34193 68/push 0x11/imm32/alloc-id:fake:payload
34194 89/<- %esi 4/r32/esp
34195 $test-compare-mem-with-reg:initialize-stmt:
34196
34197 68/push 0/imm32/next
34198 68/push 0/imm32/next
34199 68/push 0/imm32/outputs
34200 68/push 0/imm32/outputs
34201 56/push-esi/inouts
34202 68/push 0x11/imm32/alloc-id:fake
34203 68/push 0/imm32/operation
34204 68/push 0/imm32/operation
34205 68/push 1/imm32/tag:stmt1
34206 89/<- %esi 4/r32/esp
34207 $test-compare-mem-with-reg:initialize-stmt-operation:
34208
34209 8d/copy-address *(esi+4) 0/r32/eax
34210 (copy-array Heap "compare" %eax)
34211
34212 c7 0/subop/copy *Curr-block-depth 0/imm32
34213 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34214 (flush _test-output-buffered-file)
34215 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34221
34222 (check-next-stream-line-equal _test-output-stream "39/compare-> *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-mem-with-reg")
34223
34224 89/<- %esp 5/r32/ebp
34225 5d/pop-to-ebp
34226 c3/return
34227
34228 test-compare-reg-with-mem:
34229
34230
34231
34232
34233
34234 55/push-ebp
34235 89/<- %ebp 4/r32/esp
34236
34237 (clear-stream _test-output-stream)
34238 (clear-stream $_test-output-buffered-file->buffer)
34239 $test-compare-reg-with-mem:initialize-type:
34240
34241 68/push 0/imm32/right:null
34242 68/push 0/imm32/right:null
34243 68/push 0/imm32/left:unused
34244 68/push 1/imm32/value:int
34245 68/push 1/imm32/is-atom?:true
34246 68/push 0x11/imm32/alloc-id:fake:payload
34247 89/<- %ecx 4/r32/esp
34248 $test-compare-reg-with-mem:initialize-var1:
34249
34250 68/push 0/imm32/register
34251 68/push 0/imm32/register
34252 68/push 0/imm32/no-stack-offset
34253 68/push 1/imm32/block-depth
34254 51/push-ecx
34255 68/push 0x11/imm32/alloc-id:fake
34256 68/push 0/imm32/name
34257 68/push 0/imm32/name
34258 68/push 0x11/imm32/alloc-id:fake:payload
34259 89/<- %ecx 4/r32/esp
34260 $test-compare-reg-with-mem:initialize-var1-name:
34261
34262 8d/copy-address *(ecx+4) 0/r32/eax
34263 (copy-array Heap "var1" %eax)
34264 $test-compare-reg-with-mem:initialize-var1-register:
34265
34266 8d/copy-address *(ecx+0x1c) 0/r32/eax
34267 (copy-array Heap "eax" %eax)
34268 $test-compare-reg-with-mem:initialize-var2:
34269
34270 68/push 0/imm32/register
34271 68/push 0/imm32/register
34272 68/push 8/imm32/stack-offset
34273 68/push 1/imm32/block-depth
34274 ff 6/subop/push *(ecx+0x10)
34275 68/push 0x11/imm32/alloc-id:fake
34276 68/push 0/imm32/name
34277 68/push 0/imm32/name
34278 68/push 0x11/imm32/alloc-id:fake:payload
34279 89/<- %edx 4/r32/esp
34280 $test-compare-reg-with-mem:initialize-var2-name:
34281
34282 8d/copy-address *(edx+4) 0/r32/eax
34283 (copy-array Heap "var2" %eax)
34284 $test-compare-reg-with-mem:initialize-inouts:
34285
34286 68/push 0/imm32/is-deref:false
34287 68/push 0/imm32/next
34288 68/push 0/imm32/next
34289 52/push-edx/var2
34290 68/push 0x11/imm32/alloc-id:fake
34291 68/push 0x11/imm32/alloc-id:fake:payload
34292 89/<- %esi 4/r32/esp
34293
34294 68/push 0/imm32/is-deref:false
34295 56/push-esi/next
34296 68/push 0x11/imm32/alloc-id:fake
34297 51/push-ecx/var1
34298 68/push 0x11/imm32/alloc-id:fake
34299 68/push 0x11/imm32/alloc-id:fake:payload
34300 89/<- %esi 4/r32/esp
34301 $test-compare-reg-with-mem:initialize-stmt:
34302
34303 68/push 0/imm32/next
34304 68/push 0/imm32/next
34305 68/push 0/imm32/outputs
34306 68/push 0/imm32/outputs
34307 56/push-esi/inouts
34308 68/push 0x11/imm32/alloc-id:fake
34309 68/push 0/imm32/operation
34310 68/push 0/imm32/operation
34311 68/push 1/imm32/tag:stmt1
34312 89/<- %esi 4/r32/esp
34313 $test-compare-reg-with-mem:initialize-stmt-operation:
34314
34315 8d/copy-address *(esi+4) 0/r32/eax
34316 (copy-array Heap "compare" %eax)
34317
34318 c7 0/subop/copy *Curr-block-depth 0/imm32
34319 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34320 (flush _test-output-buffered-file)
34321 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34327
34328 (check-next-stream-line-equal _test-output-stream "3b/compare<- *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-reg-with-mem")
34329
34330 89/<- %esp 5/r32/ebp
34331 5d/pop-to-ebp
34332 c3/return
34333
34334 test-compare-mem-with-literal:
34335
34336
34337
34338
34339
34340 55/push-ebp
34341 89/<- %ebp 4/r32/esp
34342
34343 (clear-stream _test-output-stream)
34344 (clear-stream $_test-output-buffered-file->buffer)
34345 $test-compare-mem-with-literal:initialize-type:
34346
34347 68/push 0/imm32/right:null
34348 68/push 0/imm32/right:null
34349 68/push 0/imm32/left:unused
34350 68/push 1/imm32/value:int
34351 68/push 1/imm32/is-atom?:true
34352 68/push 0x11/imm32/alloc-id:fake:payload
34353 89/<- %ecx 4/r32/esp
34354 $test-compare-mem-with-literal:initialize-var1:
34355
34356 68/push 0/imm32/register
34357 68/push 0/imm32/register
34358 68/push 8/imm32/stack-offset
34359 68/push 1/imm32/block-depth
34360 51/push-ecx
34361 68/push 0x11/imm32/alloc-id:fake
34362 68/push 0/imm32/name
34363 68/push 0/imm32/name
34364 68/push 0x11/imm32/alloc-id:fake:payload
34365 89/<- %ecx 4/r32/esp
34366 $test-compare-mem-with-literal:initialize-var1-name:
34367
34368 8d/copy-address *(ecx+4) 0/r32/eax
34369 (copy-array Heap "var1" %eax)
34370 $test-compare-mem-with-literal:initialize-literal-type:
34371
34372 68/push 0/imm32/right:null
34373 68/push 0/imm32/right:null
34374 68/push 0/imm32/left:unused
34375 68/push 0/imm32/value:literal
34376 68/push 1/imm32/is-atom?:true
34377 68/push 0x11/imm32/alloc-id:fake:payload
34378 89/<- %edx 4/r32/esp
34379 $test-compare-mem-with-literal:initialize-literal:
34380
34381 68/push 0/imm32/register
34382 68/push 0/imm32/register
34383 68/push 0/imm32/no-stack-offset
34384 68/push 1/imm32/block-depth
34385 52/push-edx
34386 68/push 0x11/imm32/alloc-id:fake
34387 68/push 0/imm32/name
34388 68/push 0/imm32/name
34389 68/push 0x11/imm32/alloc-id:fake:payload
34390 89/<- %edx 4/r32/esp
34391 $test-compare-mem-with-literal:initialize-literal-value:
34392
34393 8d/copy-address *(edx+4) 0/r32/eax
34394 (copy-array Heap "0x34" %eax)
34395 $test-compare-mem-with-literal:initialize-inouts:
34396
34397 68/push 0/imm32/is-deref:false
34398 68/push 0/imm32/next
34399 68/push 0/imm32/next
34400 52/push-edx/l
34401 68/push 0x11/imm32/alloc-id:fake
34402 68/push 0x11/imm32/alloc-id:fake:payload
34403 89/<- %esi 4/r32/esp
34404
34405 68/push 0/imm32/is-deref:false
34406 56/push-esi/next
34407 68/push 0x11/imm32/alloc-id:fake
34408 51/push-ecx/var1
34409 68/push 0x11/imm32/alloc-id:fake
34410 68/push 0x11/imm32/alloc-id:fake:payload
34411 89/<- %esi 4/r32/esp
34412 $test-compare-mem-with-literal:initialize-stmt:
34413
34414 68/push 0/imm32/next
34415 68/push 0/imm32/next
34416 68/push 0/imm32/outputs
34417 68/push 0/imm32/outputs
34418 56/push-esi/inouts
34419 68/push 0x11/imm32/alloc-id:fake
34420 68/push 0/imm32/operation
34421 68/push 0/imm32/operation
34422 68/push 1/imm32/tag:stmt1
34423 89/<- %esi 4/r32/esp
34424 $test-compare-mem-with-literal:initialize-stmt-operation:
34425
34426 8d/copy-address *(esi+4) 0/r32/eax
34427 (copy-array Heap "compare" %eax)
34428
34429 c7 0/subop/copy *Curr-block-depth 0/imm32
34430 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34431 (flush _test-output-buffered-file)
34432 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34438
34439 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare *(ebp+0x00000008) 0x34/imm32" "F - test-compare-mem-with-literal")
34440
34441 89/<- %esp 5/r32/ebp
34442 5d/pop-to-ebp
34443 c3/return
34444
34445 test-compare-eax-with-literal:
34446
34447
34448
34449
34450
34451 55/push-ebp
34452 89/<- %ebp 4/r32/esp
34453
34454 (clear-stream _test-output-stream)
34455 (clear-stream $_test-output-buffered-file->buffer)
34456 $test-compare-eax-with-literal:initialize-type:
34457
34458 68/push 0/imm32/right:null
34459 68/push 0/imm32/right:null
34460 68/push 0/imm32/left:unused
34461 68/push 1/imm32/value:int
34462 68/push 1/imm32/is-atom?:true
34463 68/push 0x11/imm32/alloc-id:fake:payload
34464 89/<- %ecx 4/r32/esp
34465 $test-compare-eax-with-literal:initialize-var1:
34466
34467 68/push 0/imm32/register
34468 68/push 0/imm32/register
34469 68/push 0/imm32/no-stack-offset
34470 68/push 1/imm32/block-depth
34471 51/push-ecx
34472 68/push 0x11/imm32/alloc-id:fake
34473 68/push 0/imm32/name
34474 68/push 0/imm32/name
34475 68/push 0x11/imm32/alloc-id:fake:payload
34476 89/<- %ecx 4/r32/esp
34477 $test-compare-eax-with-literal:initialize-var1-name:
34478
34479 8d/copy-address *(ecx+4) 0/r32/eax
34480 (copy-array Heap "var1" %eax)
34481 $test-compare-eax-with-literal:initialize-var1-register:
34482
34483 8d/copy-address *(ecx+0x1c) 0/r32/eax
34484 (copy-array Heap "eax" %eax)
34485 $test-compare-eax-with-literal:initialize-literal-type:
34486
34487 68/push 0/imm32/right:null
34488 68/push 0/imm32/right:null
34489 68/push 0/imm32/left:unused
34490 68/push 0/imm32/value:literal
34491 68/push 1/imm32/is-atom?:true
34492 68/push 0x11/imm32/alloc-id:fake:payload
34493 89/<- %edx 4/r32/esp
34494 $test-compare-eax-with-literal:initialize-literal:
34495
34496 68/push 0/imm32/register
34497 68/push 0/imm32/register
34498 68/push 0/imm32/no-stack-offset
34499 68/push 1/imm32/block-depth
34500 52/push-edx
34501 68/push 0x11/imm32/alloc-id:fake
34502 68/push 0/imm32/name
34503 68/push 0/imm32/name
34504 68/push 0x11/imm32/alloc-id:fake:payload
34505 89/<- %edx 4/r32/esp
34506 $test-compare-eax-with-literal:initialize-literal-value:
34507
34508 8d/copy-address *(edx+4) 0/r32/eax
34509 (copy-array Heap "0x34" %eax)
34510 $test-compare-eax-with-literal:initialize-inouts:
34511
34512 68/push 0/imm32/is-deref:false
34513 68/push 0/imm32/next
34514 68/push 0/imm32/next
34515 52/push-edx/l
34516 68/push 0x11/imm32/alloc-id:fake
34517 68/push 0x11/imm32/alloc-id:fake:payload
34518 89/<- %esi 4/r32/esp
34519
34520 68/push 0/imm32/is-deref:false
34521 56/push-esi/next
34522 68/push 0x11/imm32/alloc-id:fake
34523 51/push-ecx/var1
34524 68/push 0x11/imm32/alloc-id:fake
34525 68/push 0x11/imm32/alloc-id:fake:payload
34526 89/<- %esi 4/r32/esp
34527 $test-compare-eax-with-literal:initialize-stmt:
34528
34529 68/push 0/imm32/next
34530 68/push 0/imm32/next
34531 68/push 0/imm32/outputs
34532 68/push 0/imm32/outputs
34533 56/push-esi/inouts
34534 68/push 0x11/imm32/alloc-id:fake
34535 68/push 0/imm32/operation
34536 68/push 0/imm32/operation
34537 68/push 1/imm32/tag:stmt1
34538 89/<- %esi 4/r32/esp
34539 $test-compare-eax-with-literal:initialize-stmt-operation:
34540
34541 8d/copy-address *(esi+4) 0/r32/eax
34542 (copy-array Heap "compare" %eax)
34543
34544 c7 0/subop/copy *Curr-block-depth 0/imm32
34545 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34546 (flush _test-output-buffered-file)
34547 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34553
34554 (check-next-stream-line-equal _test-output-stream "3d/compare-eax-with 0x34/imm32" "F - test-compare-eax-with-literal")
34555
34556 89/<- %esp 5/r32/ebp
34557 5d/pop-to-ebp
34558 c3/return
34559
34560 test-compare-reg-with-literal:
34561
34562
34563
34564
34565
34566 55/push-ebp
34567 89/<- %ebp 4/r32/esp
34568
34569 (clear-stream _test-output-stream)
34570 (clear-stream $_test-output-buffered-file->buffer)
34571 $test-compare-reg-with-literal:initialize-type:
34572
34573 68/push 0/imm32/right:null
34574 68/push 0/imm32/right:null
34575 68/push 0/imm32/left:unused
34576 68/push 1/imm32/value:int
34577 68/push 1/imm32/is-atom?:true
34578 68/push 0x11/imm32/alloc-id:fake:payload
34579 89/<- %ecx 4/r32/esp
34580 $test-compare-reg-with-literal:initialize-var1:
34581
34582 68/push 0/imm32/register
34583 68/push 0/imm32/register
34584 68/push 0/imm32/no-stack-offset
34585 68/push 1/imm32/block-depth
34586 51/push-ecx
34587 68/push 0x11/imm32/alloc-id:fake
34588 68/push 0/imm32/name
34589 68/push 0/imm32/name
34590 68/push 0x11/imm32/alloc-id:fake:payload
34591 89/<- %ecx 4/r32/esp
34592 $test-compare-reg-with-literal:initialize-var1-name:
34593
34594 8d/copy-address *(ecx+4) 0/r32/eax
34595 (copy-array Heap "var1" %eax)
34596 $test-compare-reg-with-literal:initialize-var1-register:
34597
34598 8d/copy-address *(ecx+0x1c) 0/r32/eax
34599 (copy-array Heap "ecx" %eax)
34600 $test-compare-reg-with-literal:initialize-literal-type:
34601
34602 68/push 0/imm32/right:null
34603 68/push 0/imm32/right:null
34604 68/push 0/imm32/left:unused
34605 68/push 0/imm32/value:literal
34606 68/push 1/imm32/is-atom?:true
34607 68/push 0x11/imm32/alloc-id:fake:payload
34608 89/<- %edx 4/r32/esp
34609 $test-compare-reg-with-literal:initialize-literal:
34610
34611 68/push 0/imm32/register
34612 68/push 0/imm32/register
34613 68/push 0/imm32/no-stack-offset
34614 68/push 1/imm32/block-depth
34615 52/push-edx
34616 68/push 0x11/imm32/alloc-id:fake
34617 68/push 0/imm32/name
34618 68/push 0/imm32/name
34619 68/push 0x11/imm32/alloc-id:fake:payload
34620 89/<- %edx 4/r32/esp
34621 $test-compare-reg-with-literal:initialize-literal-value:
34622
34623 8d/copy-address *(edx+4) 0/r32/eax
34624 (copy-array Heap "0x34" %eax)
34625 $test-compare-reg-with-literal:initialize-inouts:
34626
34627 68/push 0/imm32/is-deref:false
34628 68/push 0/imm32/next
34629 68/push 0/imm32/next
34630 52/push-edx/l
34631 68/push 0x11/imm32/alloc-id:fake
34632 68/push 0x11/imm32/alloc-id:fake:payload
34633 89/<- %esi 4/r32/esp
34634
34635 68/push 0/imm32/is-deref:false
34636 56/push-esi/next
34637 68/push 0x11/imm32/alloc-id:fake
34638 51/push-ecx/var1
34639 68/push 0x11/imm32/alloc-id:fake
34640 68/push 0x11/imm32/alloc-id:fake:payload
34641 89/<- %esi 4/r32/esp
34642 $test-compare-reg-with-literal:initialize-stmt:
34643
34644 68/push 0/imm32/next
34645 68/push 0/imm32/next
34646 68/push 0/imm32/outputs
34647 68/push 0/imm32/outputs
34648 56/push-esi/inouts
34649 68/push 0x11/imm32/alloc-id:fake
34650 68/push 0/imm32/operation
34651 68/push 0/imm32/operation
34652 68/push 1/imm32/tag:stmt1
34653 89/<- %esi 4/r32/esp
34654 $test-compare-reg-with-literal:initialize-stmt-operation:
34655
34656 8d/copy-address *(esi+4) 0/r32/eax
34657 (copy-array Heap "compare" %eax)
34658
34659 c7 0/subop/copy *Curr-block-depth 0/imm32
34660 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34661 (flush _test-output-buffered-file)
34662 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34668
34669 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare %ecx 0x34/imm32" "F - test-compare-reg-with-literal")
34670
34671 89/<- %esp 5/r32/ebp
34672 5d/pop-to-ebp
34673 c3/return
34674
34675 test-emit-subx-stmt-function-call:
34676
34677
34678
34679
34680
34681
34682
34683
34684
34685
34686
34687
34688
34689
34690
34691
34692
34693 55/push-ebp
34694 89/<- %ebp 4/r32/esp
34695
34696 (clear-stream _test-output-stream)
34697 (clear-stream $_test-output-buffered-file->buffer)
34698 $test-emit-subx-function-call:initialize-type:
34699
34700 68/push 0/imm32/right:null
34701 68/push 0/imm32/right:null
34702 68/push 0/imm32/left:unused
34703 68/push 1/imm32/value:int
34704 68/push 1/imm32/is-atom?:true
34705 68/push 0x11/imm32/alloc-id:fake:payload
34706 89/<- %ecx 4/r32/esp
34707 $test-emit-subx-function-call:initialize-var:
34708
34709 68/push 0/imm32/no-register
34710 68/push 0/imm32/no-register
34711 68/push -8/imm32/stack-offset
34712 68/push 1/imm32/block-depth
34713 51/push-ecx/type
34714 68/push 0x11/imm32/alloc-id:fake
34715 68/push 0/imm32/name
34716 68/push 0/imm32/name
34717 68/push 0x11/imm32/alloc-id:fake:payload
34718 89/<- %ecx 4/r32/esp
34719 $test-emit-subx-function-call:initialize-var-name:
34720
34721 8d/copy-address *(ecx+4) 0/r32/eax
34722 (copy-array Heap "foo" %eax)
34723 $test-emit-subx-function-call:initialize-stmt-var:
34724
34725 68/push 0/imm32/is-deref:false
34726 68/push 0/imm32/next
34727 68/push 0/imm32/next
34728 51/push-ecx/var-foo
34729 68/push 0x11/imm32/alloc-id:fake
34730 68/push 0x11/imm32/alloc-id:fake:payload
34731 89/<- %ebx 4/r32/esp
34732 $test-emit-subx-function-call:initialize-stmt:
34733
34734 68/push 0/imm32/no-outputs
34735 68/push 0/imm32/no-outputs
34736 53/push-ebx/inouts
34737 68/push 0x11/imm32/alloc-id:fake
34738 68/push 0/imm32/operation
34739 68/push 0/imm32/operation
34740 68/push 1/imm32/tag
34741 89/<- %esi 4/r32/esp
34742 $test-emit-subx-function-call:initialize-stmt-operation:
34743
34744 8d/copy-address *(esi+4) 0/r32/eax
34745 (copy-array Heap "f" %eax)
34746
34747 c7 0/subop/copy *Curr-block-depth 0/imm32
34748 (emit-subx-stmt _test-output-buffered-file %esi 0 Stderr 0)
34749 (flush _test-output-buffered-file)
34750 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34756
34757 (check-next-stream-line-equal _test-output-stream "(f *(ebp+0xfffffff8))" "F - test-emit-subx-stmt-function-call")
34758
34759 89/<- %esp 5/r32/ebp
34760 5d/pop-to-ebp
34761 c3/return
34762
34763 test-emit-subx-stmt-function-call-with-literal-arg:
34764
34765
34766
34767
34768
34769
34770 55/push-ebp
34771 89/<- %ebp 4/r32/esp
34772
34773 (clear-stream _test-output-stream)
34774 (clear-stream $_test-output-buffered-file->buffer)
34775 $test-emit-subx-function-call-with-literal-arg:initialize-type:
34776
34777 68/push 0/imm32/right:null
34778 68/push 0/imm32/right:null
34779 68/push 0/imm32/left:unused
34780 68/push 0/imm32/value:literal
34781 68/push 1/imm32/is-atom?:true
34782 68/push 0x11/imm32/alloc-id:fake:payload
34783 89/<- %ecx 4/r32/esp
34784 $test-emit-subx-function-call-with-literal-arg:initialize-var:
34785
34786 68/push 0/imm32/no-register
34787 68/push 0/imm32/no-register
34788 68/push 0/imm32/no-stack-offset
34789 68/push 1/imm32/block-depth
34790 51/push-ecx/type
34791 68/push 0x11/imm32/alloc-id:fake
34792 68/push 0/imm32/name
34793 68/push 0/imm32/name
34794 68/push 0x11/imm32/alloc-id:fake:payload
34795 89/<- %ecx 4/r32/esp
34796 $test-emit-subx-function-call-with-literal-arg:initialize-var-name:
34797
34798 8d/copy-address *(ecx+4) 0/r32/eax
34799 (copy-array Heap "0x34" %eax)
34800 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-var:
34801
34802 68/push 0/imm32/is-deref:false
34803 68/push 0/imm32/next
34804 68/push 0/imm32/next
34805 51/push-ecx/var-foo
34806 68/push 0x11/imm32/alloc-id:fake
34807 68/push 0x11/imm32/alloc-id:fake:payload
34808 89/<- %ebx 4/r32/esp
34809 $test-emit-subx-function-call-with-literal-arg:initialize-stmt:
34810
34811 68/push 0/imm32/no-outputs
34812 68/push 0/imm32/no-outputs
34813 53/push-ebx/inouts
34814 68/push 0x11/imm32/alloc-id:fake
34815 68/push 0/imm32/operation
34816 68/push 0/imm32/operation
34817 68/push 1/imm32/tag
34818 89/<- %esi 4/r32/esp
34819 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-operation:
34820
34821 8d/copy-address *(esi+4) 0/r32/eax
34822 (copy-array Heap "f" %eax)
34823
34824 c7 0/subop/copy *Curr-block-depth 0/imm32
34825 (emit-subx-stmt _test-output-buffered-file %esi 0 %ebx Stderr 0)
34826 (flush _test-output-buffered-file)
34827 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34833
34834 (check-next-stream-line-equal _test-output-stream "(f 0x34)" "F - test-emit-subx-stmt-function-call-with-literal-arg")
34835
34836 89/<- %esp 5/r32/ebp
34837 5d/pop-to-ebp
34838 c3/return
34839
34840 emit-indent:
34841
34842 55/push-ebp
34843 89/<- %ebp 4/r32/esp
34844
34845 50/push-eax
34846
34847 8b/-> *(ebp+0xc) 0/r32/eax
34848 {
34849
34850 3d/compare-eax-with 0/imm32
34851 7e/jump-if-<= break/disp8
34852 (write-buffered *(ebp+8) " ")
34853 48/decrement-eax
34854 eb/jump loop/disp8
34855 }
34856 $emit-indent:end:
34857
34858 58/pop-to-eax
34859
34860 89/<- %esp 5/r32/ebp
34861 5d/pop-to-ebp
34862 c3/return
34863
34864 emit-subx-prologue:
34865
34866 55/push-ebp
34867 89/<- %ebp 4/r32/esp
34868
34869 (write-buffered *(ebp+8) " # . prologue\n")
34870 (write-buffered *(ebp+8) " 55/push-ebp\n")
34871 (write-buffered *(ebp+8) " 89/<- %ebp 4/r32/esp\n")
34872 $emit-subx-prologue:end:
34873
34874 89/<- %esp 5/r32/ebp
34875 5d/pop-to-ebp
34876 c3/return
34877
34878 emit-subx-epilogue:
34879
34880 55/push-ebp
34881 89/<- %ebp 4/r32/esp
34882
34883 (write-buffered *(ebp+8) " # . epilogue\n")
34884 (write-buffered *(ebp+8) " 89/<- %esp 5/r32/ebp\n")
34885 (write-buffered *(ebp+8) " 5d/pop-to-ebp\n")
34886 (write-buffered *(ebp+8) " c3/return\n")
34887 $emit-subx-epilogue:end:
34888
34889 89/<- %esp 5/r32/ebp
34890 5d/pop-to-ebp
34891 c3/return