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-function-with-addr-output:
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 (clear-stream _test-error-stream)
858 (clear-stream $_test-error-buffered-file->buffer)
859
860 68/push 0/imm32
861 68/push 0/imm32
862 89/<- %edx 4/r32/esp
863 (tailor-exit-descriptor %edx 0x10)
864
865 (write _test-input-stream "fn foo -> _/eax: (addr int) {\n")
866 (write _test-input-stream "}\n")
867
868 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
869
870
871 89/<- %edx 4/r32/esp
872 (flush _test-output-buffered-file)
873 (flush _test-error-buffered-file)
874 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
880
881 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-output: output should be empty")
882 (check-next-stream-line-equal _test-error-stream "fn foo: output cannot have an addr type; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-output: error message")
883
884 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-output: exit status")
885
886 81 0/subop/add %esp 8/imm32
887
888 5d/pop-to-ebp
889 c3/return
890
891 test-function-with-addr-inout:
892
893 55/push-ebp
894 89/<- %ebp 4/r32/esp
895
896 (clear-stream _test-input-stream)
897 (clear-stream $_test-input-buffered-file->buffer)
898 (clear-stream _test-output-stream)
899 (clear-stream $_test-output-buffered-file->buffer)
900 (clear-stream _test-error-stream)
901 (clear-stream $_test-error-buffered-file->buffer)
902
903 68/push 0/imm32
904 68/push 0/imm32
905 89/<- %edx 4/r32/esp
906 (tailor-exit-descriptor %edx 0x10)
907
908 (write _test-input-stream "fn foo a: (addr addr int) {\n")
909 (write _test-input-stream "}\n")
910
911 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
912
913
914 89/<- %edx 4/r32/esp
915 (flush _test-output-buffered-file)
916 (flush _test-error-buffered-file)
917 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
923
924 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout: output should be empty")
925 (check-next-stream-line-equal _test-error-stream "fn foo: inout 'a' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-inout: error message")
926
927 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout: exit status")
928
929 81 0/subop/add %esp 8/imm32
930
931 5d/pop-to-ebp
932 c3/return
933
934 test-function-with-addr-inout-2:
935
936 55/push-ebp
937 89/<- %ebp 4/r32/esp
938
939 (clear-stream _test-input-stream)
940 (clear-stream $_test-input-buffered-file->buffer)
941 (clear-stream _test-output-stream)
942 (clear-stream $_test-output-buffered-file->buffer)
943 (clear-stream _test-error-stream)
944 (clear-stream $_test-error-buffered-file->buffer)
945
946 68/push 0/imm32
947 68/push 0/imm32
948 89/<- %edx 4/r32/esp
949 (tailor-exit-descriptor %edx 0x10)
950
951 (write _test-input-stream "fn foo a: (addr array addr int) {\n")
952 (write _test-input-stream "}\n")
953
954 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
955
956
957 89/<- %edx 4/r32/esp
958 (flush _test-output-buffered-file)
959 (flush _test-error-buffered-file)
960 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
966
967 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-2: output should be empty")
968 (check-next-stream-line-equal _test-error-stream "fn foo: inout 'a' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-inout-2: error message")
969
970 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-2: exit status")
971
972 81 0/subop/add %esp 8/imm32
973
974 5d/pop-to-ebp
975 c3/return
976
977 test-function-with-addr-inout-3:
978
979 55/push-ebp
980 89/<- %ebp 4/r32/esp
981
982 (clear-stream _test-input-stream)
983 (clear-stream $_test-input-buffered-file->buffer)
984 (clear-stream _test-output-stream)
985 (clear-stream $_test-output-buffered-file->buffer)
986 (clear-stream _test-error-stream)
987 (clear-stream $_test-error-buffered-file->buffer)
988
989 68/push 0/imm32
990 68/push 0/imm32
991 89/<- %edx 4/r32/esp
992 (tailor-exit-descriptor %edx 0x10)
993
994 (write _test-input-stream "fn foo a: (addr array (addr int) 3) {\n")
995 (write _test-input-stream "}\n")
996
997 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
998
999
1000 89/<- %edx 4/r32/esp
1001 (flush _test-output-buffered-file)
1002 (flush _test-error-buffered-file)
1003 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1009
1010 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-3: output should be empty")
1011 (check-next-stream-line-equal _test-error-stream "fn foo: inout 'a' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-inout-3: error message")
1012
1013 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-3: exit status")
1014
1015 81 0/subop/add %esp 8/imm32
1016
1017 5d/pop-to-ebp
1018 c3/return
1019
1020 test-function-with-addr-inout-4:
1021
1022 55/push-ebp
1023 89/<- %ebp 4/r32/esp
1024
1025 (clear-stream _test-input-stream)
1026 (clear-stream $_test-input-buffered-file->buffer)
1027 (clear-stream _test-output-stream)
1028 (clear-stream $_test-output-buffered-file->buffer)
1029 (clear-stream _test-error-stream)
1030 (clear-stream $_test-error-buffered-file->buffer)
1031
1032 68/push 0/imm32
1033 68/push 0/imm32
1034 89/<- %edx 4/r32/esp
1035 (tailor-exit-descriptor %edx 0x10)
1036
1037 (write _test-input-stream "fn foo a: (array (addr int) 3) {\n")
1038 (write _test-input-stream "}\n")
1039
1040 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1041
1042
1043 89/<- %edx 4/r32/esp
1044 (flush _test-output-buffered-file)
1045 (flush _test-error-buffered-file)
1046 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1052
1053 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-4: output should be empty")
1054 (check-next-stream-line-equal _test-error-stream "fn foo: inout 'a' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-inout-4: error message")
1055
1056 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-4: exit status")
1057
1058 81 0/subop/add %esp 8/imm32
1059
1060 5d/pop-to-ebp
1061 c3/return
1062
1063
1064 test-function-main-with-addr-inout:
1065
1066 55/push-ebp
1067 89/<- %ebp 4/r32/esp
1068
1069 (clear-stream _test-input-stream)
1070 (clear-stream $_test-input-buffered-file->buffer)
1071 (clear-stream _test-output-stream)
1072 (clear-stream $_test-output-buffered-file->buffer)
1073
1074 (write _test-input-stream "fn main a: (addr addr int) {\n")
1075 (write _test-input-stream "}\n")
1076
1077 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1078 (flush _test-output-buffered-file)
1079
1080
1081 89/<- %esp 5/r32/ebp
1082 5d/pop-to-ebp
1083 c3/return
1084
1085
1086 test-signature-lookup-with-addr-inout:
1087
1088 55/push-ebp
1089 89/<- %ebp 4/r32/esp
1090
1091 (clear-stream _test-input-stream)
1092 (clear-stream $_test-input-buffered-file->buffer)
1093 (clear-stream _test-output-stream)
1094 (clear-stream $_test-output-buffered-file->buffer)
1095
1096 (write _test-input-stream "sig lookup h: (handle _T) -> _/eax: (addr _T)\n")
1097
1098 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1099 (flush _test-output-buffered-file)
1100
1101
1102 89/<- %esp 5/r32/ebp
1103 5d/pop-to-ebp
1104 c3/return
1105
1106 test-convert-function-with-arg-and-body:
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
1116 (write _test-input-stream "fn foo n: int {\n")
1117 (write _test-input-stream " increment n\n")
1118 (write _test-input-stream "}\n")
1119
1120 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1121 (flush _test-output-buffered-file)
1122 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1128
1129 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg-and-body/0")
1130 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg-and-body/1")
1131 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg-and-body/2")
1132 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg-and-body/3")
1133 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-arg-and-body/4")
1134 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-arg-and-body/5")
1135 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-arg-and-body/6")
1136 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-arg-and-body/7")
1137 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-arg-and-body/8")
1138 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg-and-body/9")
1139 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg-and-body/10")
1140 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg-and-body/11")
1141 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg-and-body/12")
1142
1143 89/<- %esp 5/r32/ebp
1144 5d/pop-to-ebp
1145 c3/return
1146
1147 test-convert-function-distinguishes-args:
1148
1149 55/push-ebp
1150 89/<- %ebp 4/r32/esp
1151
1152 (clear-stream _test-input-stream)
1153 (clear-stream $_test-input-buffered-file->buffer)
1154 (clear-stream _test-output-stream)
1155 (clear-stream $_test-output-buffered-file->buffer)
1156
1157 (write _test-input-stream "fn foo a: int, b: int {\n")
1158 (write _test-input-stream " increment b\n")
1159 (write _test-input-stream "}\n")
1160
1161 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1162 (flush _test-output-buffered-file)
1163 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1169
1170 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-distinguishes-args/0")
1171 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-distinguishes-args/1")
1172 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-distinguishes-args/2")
1173 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-distinguishes-args/3")
1174 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-distinguishes-args/4")
1175 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-distinguishes-args/5")
1176 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x0000000c)" "F - test-convert-function-distinguishes-args/6")
1177 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-distinguishes-args/7")
1178 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-distinguishes-args/8")
1179 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-distinguishes-args/9")
1180 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-distinguishes-args/10")
1181 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-distinguishes-args/11")
1182 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-distinguishes-args/12")
1183
1184 89/<- %esp 5/r32/ebp
1185 5d/pop-to-ebp
1186 c3/return
1187
1188 test-convert-function-with-return-literal:
1189
1190 55/push-ebp
1191 89/<- %ebp 4/r32/esp
1192
1193 (clear-stream _test-input-stream)
1194 (clear-stream $_test-input-buffered-file->buffer)
1195 (clear-stream _test-output-stream)
1196 (clear-stream $_test-output-buffered-file->buffer)
1197
1198 (write _test-input-stream "fn foo -> _/eax: int {\n")
1199 (write _test-input-stream " return 0\n")
1200 (write _test-input-stream "}\n")
1201
1202 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1203 (flush _test-output-buffered-file)
1204 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1210
1211 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-literal/0")
1212 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-literal/1")
1213 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-literal/2")
1214 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-literal/3")
1215 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-literal/4")
1216 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-literal/5")
1217 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy %eax 0/imm32" "F - test-convert-function-with-return-literal/6")
1218 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-literal/7")
1219 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-literal/8")
1220 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-literal/9")
1221 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-literal/10")
1222 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-literal/11")
1223 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-literal/12")
1224 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-literal/13")
1225
1226 89/<- %esp 5/r32/ebp
1227 5d/pop-to-ebp
1228 c3/return
1229
1230 test-convert-function-with-return:
1231
1232 55/push-ebp
1233 89/<- %ebp 4/r32/esp
1234
1235 (clear-stream _test-input-stream)
1236 (clear-stream $_test-input-buffered-file->buffer)
1237 (clear-stream _test-output-stream)
1238 (clear-stream $_test-output-buffered-file->buffer)
1239
1240 (write _test-input-stream "fn foo -> _/eax: int {\n")
1241 (write _test-input-stream " var y: int\n")
1242 (write _test-input-stream " return y\n")
1243 (write _test-input-stream "}\n")
1244
1245 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1246 (flush _test-output-buffered-file)
1247 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1253
1254 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return/0")
1255 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return/1")
1256 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return/2")
1257 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return/3")
1258 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return/4")
1259 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return/5")
1260 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return/6")
1261 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-function-with-return/7")
1262 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return/8")
1263 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return/9")
1264 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return/10")
1265 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return/11")
1266 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return/12")
1267 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return/13")
1268 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return/14")
1269 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return/15")
1270
1271 89/<- %esp 5/r32/ebp
1272 5d/pop-to-ebp
1273 c3/return
1274
1275 test-convert-function-with-return-register:
1276
1277 55/push-ebp
1278 89/<- %ebp 4/r32/esp
1279
1280 (clear-stream _test-input-stream)
1281 (clear-stream $_test-input-buffered-file->buffer)
1282 (clear-stream _test-output-stream)
1283 (clear-stream $_test-output-buffered-file->buffer)
1284
1285 (write _test-input-stream "fn foo -> _/eax: int {\n")
1286 (write _test-input-stream " var y/eax: int <- copy 3\n")
1287 (write _test-input-stream " return y\n")
1288 (write _test-input-stream "}\n")
1289
1290 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1291 (flush _test-output-buffered-file)
1292 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1298
1299 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register/0")
1300 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register/1")
1301 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register/2")
1302 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register/3")
1303 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register/4")
1304 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register/5")
1305 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register/6")
1306 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register/7")
1307 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register/8")
1308 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register/9")
1309 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register/10")
1310 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register/11")
1311 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register/12")
1312 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register/13")
1313 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register/14")
1314 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register/15")
1315 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register/16")
1316
1317 89/<- %esp 5/r32/ebp
1318 5d/pop-to-ebp
1319 c3/return
1320
1321 test-function-with-output-without-register:
1322
1323 55/push-ebp
1324 89/<- %ebp 4/r32/esp
1325
1326 (clear-stream _test-input-stream)
1327 (clear-stream $_test-input-buffered-file->buffer)
1328 (clear-stream _test-output-stream)
1329 (clear-stream $_test-output-buffered-file->buffer)
1330 (clear-stream _test-error-stream)
1331 (clear-stream $_test-error-buffered-file->buffer)
1332
1333 68/push 0/imm32
1334 68/push 0/imm32
1335 89/<- %edx 4/r32/esp
1336 (tailor-exit-descriptor %edx 0x10)
1337
1338 (write _test-input-stream "fn foo -> _: int {\n")
1339 (write _test-input-stream "}\n")
1340
1341 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1342
1343
1344 89/<- %edx 4/r32/esp
1345 (flush _test-output-buffered-file)
1346 (flush _test-error-buffered-file)
1347 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1353
1354 (check-stream-equal _test-output-stream "" "F - test-function-with-output-without-register: output should be empty")
1355 (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")
1356
1357 (check-ints-equal *(edx+4) 2 "F - test-function-with-output-without-register: exit status")
1358
1359 81 0/subop/add %esp 8/imm32
1360
1361 5d/pop-to-ebp
1362 c3/return
1363
1364 test-function-with-outputs-in-conflicting-registers:
1365
1366 55/push-ebp
1367 89/<- %ebp 4/r32/esp
1368
1369 (clear-stream _test-input-stream)
1370 (clear-stream $_test-input-buffered-file->buffer)
1371 (clear-stream _test-output-stream)
1372 (clear-stream $_test-output-buffered-file->buffer)
1373 (clear-stream _test-error-stream)
1374 (clear-stream $_test-error-buffered-file->buffer)
1375
1376 68/push 0/imm32
1377 68/push 0/imm32
1378 89/<- %edx 4/r32/esp
1379 (tailor-exit-descriptor %edx 0x10)
1380
1381 (write _test-input-stream "fn foo -> _/eax: int, _/eax: int {\n")
1382 (write _test-input-stream "}\n")
1383
1384 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1385
1386
1387 89/<- %edx 4/r32/esp
1388 (flush _test-output-buffered-file)
1389 (flush _test-error-buffered-file)
1390 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1396
1397 (check-stream-equal _test-output-stream "" "F - test-function-with-outputs-in-conflicting-registers: output should be empty")
1398 (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")
1399
1400 (check-ints-equal *(edx+4) 2 "F - test-function-with-outputs-in-conflicting-registers: exit status")
1401
1402 81 0/subop/add %esp 8/imm32
1403
1404 5d/pop-to-ebp
1405 c3/return
1406
1407 test-function-with-named-output:
1408
1409 55/push-ebp
1410 89/<- %ebp 4/r32/esp
1411
1412 (clear-stream _test-input-stream)
1413 (clear-stream $_test-input-buffered-file->buffer)
1414 (clear-stream _test-output-stream)
1415 (clear-stream $_test-output-buffered-file->buffer)
1416 (clear-stream _test-error-stream)
1417 (clear-stream $_test-error-buffered-file->buffer)
1418
1419 68/push 0/imm32
1420 68/push 0/imm32
1421 89/<- %edx 4/r32/esp
1422 (tailor-exit-descriptor %edx 0x10)
1423
1424 (write _test-input-stream "fn foo -> x/eax: int {\n")
1425 (write _test-input-stream " return 0\n")
1426 (write _test-input-stream "}\n")
1427
1428 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1429
1430
1431 89/<- %edx 4/r32/esp
1432 (flush _test-output-buffered-file)
1433 (flush _test-error-buffered-file)
1434 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1440
1441 (check-stream-equal _test-output-stream "" "F - test-function-with-named-output: output should be empty")
1442 (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")
1443
1444 (check-ints-equal *(edx+4) 2 "F - test-function-with-named-output: exit status")
1445
1446 81 0/subop/add %esp 8/imm32
1447
1448 5d/pop-to-ebp
1449 c3/return
1450
1451 test-return-with-wrong-type:
1452
1453 55/push-ebp
1454 89/<- %ebp 4/r32/esp
1455
1456 (clear-stream _test-input-stream)
1457 (clear-stream $_test-input-buffered-file->buffer)
1458 (clear-stream _test-output-stream)
1459 (clear-stream $_test-output-buffered-file->buffer)
1460 (clear-stream _test-error-stream)
1461 (clear-stream $_test-error-buffered-file->buffer)
1462
1463 68/push 0/imm32
1464 68/push 0/imm32
1465 89/<- %edx 4/r32/esp
1466 (tailor-exit-descriptor %edx 0x10)
1467
1468 (write _test-input-stream "fn foo -> _/eax: int {\n")
1469 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
1470 (write _test-input-stream " return x\n")
1471 (write _test-input-stream "}\n")
1472
1473 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1474
1475
1476 89/<- %edx 4/r32/esp
1477 (flush _test-output-buffered-file)
1478 (flush _test-error-buffered-file)
1479 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1485
1486 (check-stream-equal _test-output-stream "" "F - test-return-with-wrong-type: output should be empty")
1487 (check-next-stream-line-equal _test-error-stream "fn foo: return: 'x' has the wrong type" "F - test-return-with-wrong-type: error message")
1488
1489 (check-ints-equal *(edx+4) 2 "F - test-return-with-wrong-type: exit status")
1490
1491 81 0/subop/add %esp 8/imm32
1492
1493 5d/pop-to-ebp
1494 c3/return
1495
1496 test-missing-return:
1497
1498 55/push-ebp
1499 89/<- %ebp 4/r32/esp
1500
1501 (clear-stream _test-input-stream)
1502 (clear-stream $_test-input-buffered-file->buffer)
1503 (clear-stream _test-output-stream)
1504 (clear-stream $_test-output-buffered-file->buffer)
1505 (clear-stream _test-error-stream)
1506 (clear-stream $_test-error-buffered-file->buffer)
1507
1508 68/push 0/imm32
1509 68/push 0/imm32
1510 89/<- %edx 4/r32/esp
1511 (tailor-exit-descriptor %edx 0x10)
1512
1513 (write _test-input-stream "fn foo -> _/eax: int {\n")
1514 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
1515 (write _test-input-stream "}\n")
1516
1517 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1518
1519
1520 89/<- %edx 4/r32/esp
1521 (flush _test-output-buffered-file)
1522 (flush _test-error-buffered-file)
1523 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1529
1530 (check-stream-equal _test-output-stream "" "F - test-missing-return: output should be empty")
1531 (check-next-stream-line-equal _test-error-stream "fn foo: final statement should be a 'return'" "F - test-missing-return: error message")
1532
1533 (check-ints-equal *(edx+4) 2 "F - test-missing-return: exit status")
1534
1535 81 0/subop/add %esp 8/imm32
1536
1537 5d/pop-to-ebp
1538 c3/return
1539
1540 test-early-exit-without-return:
1541
1542 55/push-ebp
1543 89/<- %ebp 4/r32/esp
1544
1545 (clear-stream _test-input-stream)
1546 (clear-stream $_test-input-buffered-file->buffer)
1547 (clear-stream _test-output-stream)
1548 (clear-stream $_test-output-buffered-file->buffer)
1549 (clear-stream _test-error-stream)
1550 (clear-stream $_test-error-buffered-file->buffer)
1551
1552 68/push 0/imm32
1553 68/push 0/imm32
1554 89/<- %edx 4/r32/esp
1555 (tailor-exit-descriptor %edx 0x10)
1556
1557 (write _test-input-stream "fn foo -> _/eax: int {\n")
1558 (write _test-input-stream " break\n")
1559 (write _test-input-stream " return 0\n")
1560 (write _test-input-stream "}\n")
1561
1562 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1563
1564
1565 89/<- %edx 4/r32/esp
1566 (flush _test-output-buffered-file)
1567 (flush _test-error-buffered-file)
1568 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1574
1575 (check-stream-equal _test-output-stream "" "F - test-early-exit-without-return: output should be empty")
1576 (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")
1577
1578 (check-ints-equal *(edx+4) 2 "F - test-early-exit-without-return: exit status")
1579
1580 81 0/subop/add %esp 8/imm32
1581
1582 5d/pop-to-ebp
1583 c3/return
1584
1585 test-return-with-too-few-inouts:
1586
1587 55/push-ebp
1588 89/<- %ebp 4/r32/esp
1589
1590 (clear-stream _test-input-stream)
1591 (clear-stream $_test-input-buffered-file->buffer)
1592 (clear-stream _test-output-stream)
1593 (clear-stream $_test-output-buffered-file->buffer)
1594 (clear-stream _test-error-stream)
1595 (clear-stream $_test-error-buffered-file->buffer)
1596
1597 68/push 0/imm32
1598 68/push 0/imm32
1599 89/<- %edx 4/r32/esp
1600 (tailor-exit-descriptor %edx 0x10)
1601
1602 (write _test-input-stream "fn foo -> _/eax: int {\n")
1603 (write _test-input-stream " return\n")
1604 (write _test-input-stream "}\n")
1605
1606 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1607
1608
1609 89/<- %edx 4/r32/esp
1610 (flush _test-output-buffered-file)
1611 (flush _test-error-buffered-file)
1612 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1618
1619 (check-stream-equal _test-output-stream "" "F - test-return-with-too-few-inouts: output should be empty")
1620 (check-next-stream-line-equal _test-error-stream "fn foo: return: too few inouts" "F - test-return-with-too-few-inouts: error message")
1621
1622 (check-ints-equal *(edx+4) 2 "F - test-return-with-too-few-inouts: exit status")
1623
1624 81 0/subop/add %esp 8/imm32
1625
1626 5d/pop-to-ebp
1627 c3/return
1628
1629 test-return-with-too-many-inouts:
1630
1631 55/push-ebp
1632 89/<- %ebp 4/r32/esp
1633
1634 (clear-stream _test-input-stream)
1635 (clear-stream $_test-input-buffered-file->buffer)
1636 (clear-stream _test-output-stream)
1637 (clear-stream $_test-output-buffered-file->buffer)
1638 (clear-stream _test-error-stream)
1639 (clear-stream $_test-error-buffered-file->buffer)
1640
1641 68/push 0/imm32
1642 68/push 0/imm32
1643 89/<- %edx 4/r32/esp
1644 (tailor-exit-descriptor %edx 0x10)
1645
1646 (write _test-input-stream "fn foo -> _/eax: int {\n")
1647 (write _test-input-stream " return 0, 0\n")
1648 (write _test-input-stream "}\n")
1649
1650 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1651
1652
1653 89/<- %edx 4/r32/esp
1654 (flush _test-output-buffered-file)
1655 (flush _test-error-buffered-file)
1656 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1662
1663 (check-stream-equal _test-output-stream "" "F - test-return-with-too-many-inouts: output should be empty")
1664 (check-next-stream-line-equal _test-error-stream "fn foo: return: too many inouts" "F - test-return-with-too-many-inouts: error message")
1665
1666 (check-ints-equal *(edx+4) 2 "F - test-return-with-too-many-inouts: exit status")
1667
1668 81 0/subop/add %esp 8/imm32
1669
1670 5d/pop-to-ebp
1671 c3/return
1672
1673 test-return-unavailable-value:
1674
1675 55/push-ebp
1676 89/<- %ebp 4/r32/esp
1677
1678 (clear-stream _test-input-stream)
1679 (clear-stream $_test-input-buffered-file->buffer)
1680 (clear-stream _test-output-stream)
1681 (clear-stream $_test-output-buffered-file->buffer)
1682 (clear-stream _test-error-stream)
1683 (clear-stream $_test-error-buffered-file->buffer)
1684
1685 68/push 0/imm32
1686 68/push 0/imm32
1687 89/<- %edx 4/r32/esp
1688 (tailor-exit-descriptor %edx 0x10)
1689
1690 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1691 (write _test-input-stream " var x/eax: int <- copy 0\n")
1692 (write _test-input-stream " var y/ecx: int <- copy 0\n")
1693 (write _test-input-stream " return y, x\n")
1694 (write _test-input-stream "}\n")
1695
1696 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1697
1698
1699 89/<- %edx 4/r32/esp
1700 (flush _test-output-buffered-file)
1701 (flush _test-error-buffered-file)
1702 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1708
1709 (check-stream-equal _test-output-stream "" "F - test-return-unavailable-value: output should be empty")
1710 (check-next-stream-line-equal _test-error-stream "fn foo: return: 'x' is no longer available" "F - test-return-unavailable-value: error message")
1711
1712 (check-ints-equal *(edx+4) 2 "F - test-return-unavailable-value: exit status")
1713
1714 81 0/subop/add %esp 8/imm32
1715
1716 5d/pop-to-ebp
1717 c3/return
1718
1719 test-convert-return-with-duplicate-values:
1720
1721 55/push-ebp
1722 89/<- %ebp 4/r32/esp
1723
1724 (clear-stream _test-input-stream)
1725 (clear-stream $_test-input-buffered-file->buffer)
1726 (clear-stream _test-output-stream)
1727 (clear-stream $_test-output-buffered-file->buffer)
1728
1729 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1730 (write _test-input-stream " var x/eax: int <- copy 0x34\n")
1731 (write _test-input-stream " return x, x\n")
1732 (write _test-input-stream "}\n")
1733
1734 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1735 (flush _test-output-buffered-file)
1736 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1742
1743 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-return-with-duplicate-values/0")
1744 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-return-with-duplicate-values/1")
1745 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-return-with-duplicate-values/2")
1746 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-return-with-duplicate-values/3")
1747 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-return-with-duplicate-values/4")
1748 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-return-with-duplicate-values/5")
1749 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-return-with-duplicate-values/6")
1750 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0x34/imm32" "F - test-convert-return-with-duplicate-values/7")
1751 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-return-with-duplicate-values/8")
1752 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000001/r32" "F - test-convert-return-with-duplicate-values/9")
1753 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-return-with-duplicate-values/10")
1754 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-return-with-duplicate-values/11")
1755 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-return-with-duplicate-values/12")
1756 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-return-with-duplicate-values/13")
1757 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-return-with-duplicate-values/14")
1758 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-return-with-duplicate-values/15")
1759 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-return-with-duplicate-values/16")
1760 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-return-with-duplicate-values/17")
1761
1762 89/<- %esp 5/r32/ebp
1763 5d/pop-to-ebp
1764 c3/return
1765
1766 test-convert-return-with-duplicate-values-2:
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 foo -> _/eax: int, _/ecx: int {\n")
1777 (write _test-input-stream " var x/ecx: int <- copy 0x34\n")
1778 (write _test-input-stream " return x, x\n")
1779 (write _test-input-stream "}\n")
1780
1781 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1782 (flush _test-output-buffered-file)
1783 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1789
1790 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-return-with-duplicate-values-2/0")
1791 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-return-with-duplicate-values-2/1")
1792 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-return-with-duplicate-values-2/2")
1793 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-return-with-duplicate-values-2/3")
1794 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-return-with-duplicate-values-2/4")
1795 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-return-with-duplicate-values-2/5")
1796 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-return-with-duplicate-values-2/6")
1797 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x34/imm32" "F - test-convert-return-with-duplicate-values-2/7")
1798 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-return-with-duplicate-values-2/8")
1799 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000001/r32" "F - test-convert-return-with-duplicate-values-2/9")
1800 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-return-with-duplicate-values-2/10")
1801 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-return-with-duplicate-values-2/11")
1802 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-return-with-duplicate-values-2/12")
1803 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-return-with-duplicate-values-2/13")
1804 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-return-with-duplicate-values-2/14")
1805 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-return-with-duplicate-values-2/15")
1806 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-return-with-duplicate-values-2/16")
1807 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-return-with-duplicate-values-2/17")
1808
1809 89/<- %esp 5/r32/ebp
1810 5d/pop-to-ebp
1811 c3/return
1812
1813 test-stmt-with-unknown-var:
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 (clear-stream _test-error-stream)
1823 (clear-stream $_test-error-buffered-file->buffer)
1824
1825 68/push 0/imm32
1826 68/push 0/imm32
1827 89/<- %edx 4/r32/esp
1828 (tailor-exit-descriptor %edx 0x10)
1829
1830 (write _test-input-stream "fn foo {\n")
1831 (write _test-input-stream " x <- copy 0x34\n")
1832 (write _test-input-stream "}\n")
1833
1834 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1835
1836
1837 89/<- %edx 4/r32/esp
1838 (flush _test-output-buffered-file)
1839 (flush _test-error-buffered-file)
1840 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1846
1847 (check-stream-equal _test-output-stream "" "F - test-stmt-with-unknown-var: output should be empty")
1848 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-stmt-with-unknown-var: error message")
1849
1850 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-unknown-var: exit status")
1851
1852 81 0/subop/add %esp 8/imm32
1853
1854 5d/pop-to-ebp
1855 c3/return
1856
1857 test-stmt-with-invalid-identifier:
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 " 1 <- copy 0x34\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-stmt-with-invalid-identifier: output should be empty")
1892 (check-next-stream-line-equal _test-error-stream "fn foo: invalid identifier '1'" "F - test-stmt-with-invalid-identifier: error message")
1893
1894 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-invalid-identifier: exit status")
1895
1896 81 0/subop/add %esp 8/imm32
1897
1898 5d/pop-to-ebp
1899 c3/return
1900
1901 test-stmt-with-deref-var:
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 " *x <- copy 0x34\n")
1920 (write _test-input-stream "}\n")
1921
1922 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1923
1924
1925 89/<- %edx 4/r32/esp
1926 (flush _test-output-buffered-file)
1927 (flush _test-error-buffered-file)
1928 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1934
1935 (check-stream-equal _test-output-stream "" "F - test-stmt-with-deref-var: output should be empty")
1936 (check-next-stream-line-equal _test-error-stream "fn foo: output '*x' should write to a register, and therefore cannot be dereferenced" "F - test-stmt-with-deref-var: error message")
1937
1938 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-deref-var: exit status")
1939
1940 81 0/subop/add %esp 8/imm32
1941
1942 5d/pop-to-ebp
1943 c3/return
1944
1945 test-convert-function-with-literal-arg:
1946
1947 55/push-ebp
1948 89/<- %ebp 4/r32/esp
1949
1950 (clear-stream _test-input-stream)
1951 (clear-stream $_test-input-buffered-file->buffer)
1952 (clear-stream _test-output-stream)
1953 (clear-stream $_test-output-buffered-file->buffer)
1954
1955 (write _test-input-stream "fn foo a: int, b: int -> _/eax: int {\n")
1956 (write _test-input-stream " var result/eax: int <- copy a\n")
1957 (write _test-input-stream " result <- add 1\n")
1958 (write _test-input-stream " return result\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-literal-arg/0")
1971 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg/1")
1972 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg/2")
1973 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg/3")
1974 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg/4")
1975 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg/5")
1976 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-literal-arg/6")
1977 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-with-literal-arg/7")
1978 (check-next-stream-line-equal _test-output-stream " 05/add-to-eax 1/imm32" "F - test-convert-function-with-literal-arg/8")
1979 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-literal-arg/9")
1980 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg/10")
1981 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg/11")
1982 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg/12")
1983 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg/13")
1984 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg/14")
1985 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg/15")
1986 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg/16")
1987 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg/17")
1988
1989 89/<- %esp 5/r32/ebp
1990 5d/pop-to-ebp
1991 c3/return
1992
1993 test-convert-function-with-literal-arg-2:
1994
1995 55/push-ebp
1996 89/<- %ebp 4/r32/esp
1997
1998 (clear-stream _test-input-stream)
1999 (clear-stream $_test-input-buffered-file->buffer)
2000 (clear-stream _test-output-stream)
2001 (clear-stream $_test-output-buffered-file->buffer)
2002
2003 (write _test-input-stream "fn foo a: int, b: int -> _/ebx: int {\n")
2004 (write _test-input-stream " var result/ebx: int <- copy a\n")
2005 (write _test-input-stream " result <- add 1\n")
2006 (write _test-input-stream " return result\n")
2007 (write _test-input-stream "}\n")
2008
2009 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2010 (flush _test-output-buffered-file)
2011 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2017
2018 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg-2/0")
2019 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg-2/1")
2020 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg-2/2")
2021 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg-2/3")
2022 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg-2/4")
2023 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg-2/5")
2024 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-with-literal-arg-2/6")
2025 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/7")
2026 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %ebx 1/imm32" "F - test-convert-function-with-literal-arg-2/8")
2027 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/9")
2028 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg-2/10")
2029 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg-2/11")
2030 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg-2/12")
2031 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg-2/13")
2032 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg-2/14")
2033 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg-2/15")
2034 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg-2/16")
2035 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg-2/17")
2036
2037 89/<- %esp 5/r32/ebp
2038 5d/pop-to-ebp
2039 c3/return
2040
2041 test-convert-function-call-with-literal-arg:
2042
2043 55/push-ebp
2044 89/<- %ebp 4/r32/esp
2045
2046 (clear-stream _test-input-stream)
2047 (clear-stream $_test-input-buffered-file->buffer)
2048 (clear-stream _test-output-stream)
2049 (clear-stream $_test-output-buffered-file->buffer)
2050
2051 (write _test-input-stream "fn main -> _/ebx: int {\n")
2052 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
2053 (write _test-input-stream " return result\n")
2054 (write _test-input-stream "}\n")
2055 (write _test-input-stream "fn do-add a: int, b: int -> _/eax: int {\n")
2056 (write _test-input-stream " var result/eax: int <- copy a\n")
2057 (write _test-input-stream " result <- add b\n")
2058 (write _test-input-stream " return result\n")
2059 (write _test-input-stream "}\n")
2060
2061 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2062 (flush _test-output-buffered-file)
2063 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2069
2070 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-literal-arg/0")
2071 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/1")
2072 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/2")
2073 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/3")
2074 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/4")
2075 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-literal-arg/5")
2076 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
2077 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-literal-arg/7")
2078 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2079 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
2080 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2081 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/11")
2082 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-literal-arg/12")
2083 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/13")
2084 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/14")
2085 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/15")
2086 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/16")
2087 (check-next-stream-line-equal _test-output-stream "do-add:" "F - test-convert-function-call-with-literal-arg/17")
2088 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/18")
2089 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/19")
2090 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/20")
2091 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/21")
2092 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:loop:" "F - test-convert-function-call-with-literal-arg/22")
2093 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/23")
2094 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/24")
2095 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0x0000000c) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/25")
2096 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/26")
2097 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
2098 (check-next-stream-line-equal _test-output-stream " e9/jump $do-add:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/28")
2099 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/29")
2100 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:break:" "F - test-convert-function-call-with-literal-arg/30")
2101 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/31")
2102 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/32")
2103 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/33")
2104 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/34")
2105
2106 89/<- %esp 5/r32/ebp
2107 5d/pop-to-ebp
2108 c3/return
2109
2110 test-convert-function-call-with-literal-string-arg:
2111
2112 55/push-ebp
2113 89/<- %ebp 4/r32/esp
2114
2115 (clear-stream _test-input-stream)
2116 (clear-stream $_test-input-buffered-file->buffer)
2117 (clear-stream _test-output-stream)
2118 (clear-stream $_test-output-buffered-file->buffer)
2119
2120 (write _test-input-stream "fn foo {\n")
2121 (write _test-input-stream " string-func \"abc\"\n")
2122 (write _test-input-stream "}\n")
2123 (write _test-input-stream "sig string-func in: (addr array byte)\n")
2124
2125 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2126
2127
2128
2129 89/<- %esp 5/r32/ebp
2130 5d/pop-to-ebp
2131 c3/return
2132
2133 test-convert-function-call-with-null-addr:
2134
2135 55/push-ebp
2136 89/<- %ebp 4/r32/esp
2137
2138 (clear-stream _test-input-stream)
2139 (clear-stream $_test-input-buffered-file->buffer)
2140 (clear-stream _test-output-stream)
2141 (clear-stream $_test-output-buffered-file->buffer)
2142
2143 (write _test-input-stream "fn foo {\n")
2144 (write _test-input-stream " bar 0\n")
2145 (write _test-input-stream "}\n")
2146 (write _test-input-stream "sig bar in: (addr int)\n")
2147
2148 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2149
2150
2151
2152 89/<- %esp 5/r32/ebp
2153 5d/pop-to-ebp
2154 c3/return
2155
2156 test-convert-function-call-with-signature:
2157
2158 55/push-ebp
2159 89/<- %ebp 4/r32/esp
2160
2161 (clear-stream _test-input-stream)
2162 (clear-stream $_test-input-buffered-file->buffer)
2163 (clear-stream _test-output-stream)
2164 (clear-stream $_test-output-buffered-file->buffer)
2165
2166 (write _test-input-stream "fn main -> _/ebx: int {\n")
2167 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
2168 (write _test-input-stream " return result\n")
2169 (write _test-input-stream "}\n")
2170 (write _test-input-stream "sig do-add a: int, b: int -> _/eax: int\n")
2171
2172 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2173 (flush _test-output-buffered-file)
2174 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2180
2181 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-signature/0")
2182 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-signature/1")
2183 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-signature/2")
2184 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-signature/3")
2185 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-signature/4")
2186 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-signature/5")
2187 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
2188 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-signature/6")
2189 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2190 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
2191 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2192 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-signature/7")
2193 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-signature/8")
2194 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-signature/9")
2195 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-signature/10")
2196 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-signature/11")
2197 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-signature/12")
2198
2199 89/<- %esp 5/r32/ebp
2200 5d/pop-to-ebp
2201 c3/return
2202
2203 test-convert-function-with-local-var-in-mem:
2204
2205 55/push-ebp
2206 89/<- %ebp 4/r32/esp
2207
2208 (clear-stream _test-input-stream)
2209 (clear-stream $_test-input-buffered-file->buffer)
2210 (clear-stream _test-output-stream)
2211 (clear-stream $_test-output-buffered-file->buffer)
2212
2213 (write _test-input-stream "fn foo {\n")
2214 (write _test-input-stream " var x: int\n")
2215 (write _test-input-stream " increment x\n")
2216 (write _test-input-stream "}\n")
2217
2218 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2219 (flush _test-output-buffered-file)
2220 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2226
2227 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem/0")
2228 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem/1")
2229 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem/2")
2230 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem/3")
2231 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem/4")
2232 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem/5")
2233 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem/6")
2234 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem/7")
2235 (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")
2236 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem/9")
2237 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem/10")
2238 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem/11")
2239 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem/12")
2240 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem/13")
2241 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem/14")
2242
2243 89/<- %esp 5/r32/ebp
2244 5d/pop-to-ebp
2245 c3/return
2246
2247 test-convert-invalid-literal:
2248
2249 55/push-ebp
2250 89/<- %ebp 4/r32/esp
2251
2252 (clear-stream _test-input-stream)
2253 (clear-stream $_test-input-buffered-file->buffer)
2254 (clear-stream _test-output-stream)
2255 (clear-stream $_test-output-buffered-file->buffer)
2256 (clear-stream _test-error-stream)
2257 (clear-stream $_test-error-buffered-file->buffer)
2258
2259 68/push 0/imm32
2260 68/push 0/imm32
2261 89/<- %edx 4/r32/esp
2262 (tailor-exit-descriptor %edx 0x10)
2263
2264 (write _test-input-stream "fn foo {\n")
2265 (write _test-input-stream " increment 1n\n")
2266 (write _test-input-stream "}\n")
2267
2268 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2269
2270
2271 89/<- %edx 4/r32/esp
2272 (flush _test-output-buffered-file)
2273 (flush _test-error-buffered-file)
2274 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2280
2281 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-literal: output should be empty")
2282 (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")
2283
2284 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-literal: exit status")
2285
2286 81 0/subop/add %esp 8/imm32
2287
2288 5d/pop-to-ebp
2289 c3/return
2290
2291 test-local-var-in-mem-has-no-initializer:
2292
2293 55/push-ebp
2294 89/<- %ebp 4/r32/esp
2295
2296 (clear-stream _test-input-stream)
2297 (clear-stream $_test-input-buffered-file->buffer)
2298 (clear-stream _test-output-stream)
2299 (clear-stream $_test-output-buffered-file->buffer)
2300 (clear-stream _test-error-stream)
2301 (clear-stream $_test-error-buffered-file->buffer)
2302
2303 68/push 0/imm32
2304 68/push 0/imm32
2305 89/<- %edx 4/r32/esp
2306 (tailor-exit-descriptor %edx 0x10)
2307
2308 (write _test-input-stream "fn foo {\n")
2309 (write _test-input-stream " var x: int <- copy 0\n")
2310 (write _test-input-stream " increment x\n")
2311 (write _test-input-stream "}\n")
2312
2313 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2314
2315
2316 89/<- %edx 4/r32/esp
2317 (flush _test-output-buffered-file)
2318 (flush _test-error-buffered-file)
2319 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2325
2326 (check-stream-equal _test-output-stream "" "F - test-var-in-mem-has-no-initializer: output should be empty")
2327 (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")
2328
2329 (check-ints-equal *(edx+4) 2 "F - test-var-in-mem-has-no-initializer: exit status")
2330
2331 81 0/subop/add %esp 8/imm32
2332
2333 5d/pop-to-ebp
2334 c3/return
2335
2336 test-convert-function-with-local-var-with-compound-type-in-mem:
2337
2338 55/push-ebp
2339 89/<- %ebp 4/r32/esp
2340
2341 (clear-stream _test-input-stream)
2342 (clear-stream $_test-input-buffered-file->buffer)
2343 (clear-stream _test-output-stream)
2344 (clear-stream $_test-output-buffered-file->buffer)
2345
2346 (write _test-input-stream "fn foo {\n")
2347 (write _test-input-stream " var x: (addr int)\n")
2348 (write _test-input-stream " copy-to x, 0\n")
2349 (write _test-input-stream "}\n")
2350
2351 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2352 (flush _test-output-buffered-file)
2353 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2359
2360 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/0")
2361 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/1")
2362 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/2")
2363 (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")
2364 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-compound-type-in-mem/4")
2365 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/5")
2366 (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")
2367 (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")
2368 (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")
2369 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-compound-type-in-mem/9")
2370 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/10")
2371 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/11")
2372 (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")
2373 (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")
2374 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-compound-type-in-mem/14")
2375
2376 89/<- %esp 5/r32/ebp
2377 5d/pop-to-ebp
2378 c3/return
2379
2380 test-convert-function-with-local-var-in-reg:
2381
2382 55/push-ebp
2383 89/<- %ebp 4/r32/esp
2384
2385 (clear-stream _test-input-stream)
2386 (clear-stream $_test-input-buffered-file->buffer)
2387 (clear-stream _test-output-stream)
2388 (clear-stream $_test-output-buffered-file->buffer)
2389
2390 (write _test-input-stream "fn foo {\n")
2391 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2392 (write _test-input-stream " x <- increment\n")
2393 (write _test-input-stream "}\n")
2394
2395 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2396 (flush _test-output-buffered-file)
2397 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2403
2404 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-reg/0")
2405 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-reg/1")
2406 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-reg/2")
2407 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-reg/3")
2408 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-reg/4")
2409 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-reg/5")
2410 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-reg/6")
2411 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-reg/7")
2412 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-local-var-in-reg/8")
2413 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-reg/9")
2414 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-reg/10")
2415 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-reg/11")
2416 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-reg/12")
2417 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-reg/13")
2418 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-reg/14")
2419 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-reg/15")
2420
2421 89/<- %esp 5/r32/ebp
2422 5d/pop-to-ebp
2423 c3/return
2424
2425 test-float-var-in-wrong-register:
2426
2427 55/push-ebp
2428 89/<- %ebp 4/r32/esp
2429
2430 (clear-stream _test-input-stream)
2431 (clear-stream $_test-input-buffered-file->buffer)
2432 (clear-stream _test-output-stream)
2433 (clear-stream $_test-output-buffered-file->buffer)
2434 (clear-stream _test-error-stream)
2435 (clear-stream $_test-error-buffered-file->buffer)
2436
2437 68/push 0/imm32
2438 68/push 0/imm32
2439 89/<- %edx 4/r32/esp
2440 (tailor-exit-descriptor %edx 0x10)
2441
2442 (write _test-input-stream "fn foo {\n")
2443 (write _test-input-stream " var x/eax: int <- copy 0\n")
2444 (write _test-input-stream " var y/eax: float <- convert x\n")
2445 (write _test-input-stream "}\n")
2446
2447 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2448
2449
2450 89/<- %edx 4/r32/esp
2451 (flush _test-output-buffered-file)
2452 (flush _test-error-buffered-file)
2453 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2459
2460 (check-stream-equal _test-output-stream "" "F - test-float-var-in-wrong-register: output should be empty")
2461 (check-next-stream-line-equal _test-error-stream "fn foo: float var 'y' should be in a floating-point register" "F - test-float-var-in-wrong-register: error message")
2462
2463 (check-ints-equal *(edx+4) 2 "F - test-float-var-in-wrong-register: exit status")
2464
2465 81 0/subop/add %esp 8/imm32
2466
2467 5d/pop-to-ebp
2468 c3/return
2469
2470 test-non-float-var-in-wrong-register:
2471
2472 55/push-ebp
2473 89/<- %ebp 4/r32/esp
2474
2475 (clear-stream _test-input-stream)
2476 (clear-stream $_test-input-buffered-file->buffer)
2477 (clear-stream _test-output-stream)
2478 (clear-stream $_test-output-buffered-file->buffer)
2479 (clear-stream _test-error-stream)
2480 (clear-stream $_test-error-buffered-file->buffer)
2481
2482 68/push 0/imm32
2483 68/push 0/imm32
2484 89/<- %edx 4/r32/esp
2485 (tailor-exit-descriptor %edx 0x10)
2486
2487 (write _test-input-stream "fn foo {\n")
2488 (write _test-input-stream " var x/xmm5: int <- copy 0\n")
2489 (write _test-input-stream "}\n")
2490
2491 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2492
2493
2494 89/<- %edx 4/r32/esp
2495 (flush _test-output-buffered-file)
2496 (flush _test-error-buffered-file)
2497 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2503
2504 (check-stream-equal _test-output-stream "" "F - test-non-float-var-in-wrong-register: output should be empty")
2505 (check-next-stream-line-equal _test-error-stream "fn foo: non-float var 'x' should be in an integer register" "F - test-non-float-var-in-wrong-register: error message")
2506
2507 (check-ints-equal *(edx+4) 2 "F - test-non-float-var-in-wrong-register: exit status")
2508
2509 81 0/subop/add %esp 8/imm32
2510
2511 5d/pop-to-ebp
2512 c3/return
2513
2514 test-convert-function-with-allocate:
2515
2516 55/push-ebp
2517 89/<- %ebp 4/r32/esp
2518
2519 (clear-stream _test-input-stream)
2520 (clear-stream $_test-input-buffered-file->buffer)
2521 (clear-stream _test-output-stream)
2522 (clear-stream $_test-output-buffered-file->buffer)
2523
2524 (write _test-input-stream "fn foo {\n")
2525 (write _test-input-stream " var x/ecx: (addr handle int) <- copy 0\n")
2526 (write _test-input-stream " allocate x\n")
2527 (write _test-input-stream "}\n")
2528
2529 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2530 (flush _test-output-buffered-file)
2531 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2537
2538 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-allocate/0")
2539 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-allocate/1")
2540 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-allocate/2")
2541 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-allocate/3")
2542 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-allocate/4")
2543 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-allocate/5")
2544 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-allocate/6")
2545 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-allocate/7")
2546 (check-next-stream-line-equal _test-output-stream " (allocate Heap 0x00000004 %ecx)" "F - test-convert-function-with-allocate/8")
2547 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-allocate/9")
2548 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-allocate/10")
2549 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-allocate/11")
2550 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-allocate/12")
2551 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-allocate/13")
2552 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-allocate/14")
2553 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-allocate/15")
2554
2555 89/<- %esp 5/r32/ebp
2556 5d/pop-to-ebp
2557 c3/return
2558
2559 test-initializer-in-hex:
2560
2561 55/push-ebp
2562 89/<- %ebp 4/r32/esp
2563
2564 (clear-stream _test-input-stream)
2565 (clear-stream $_test-input-buffered-file->buffer)
2566 (clear-stream _test-output-stream)
2567 (clear-stream $_test-output-buffered-file->buffer)
2568 (clear-stream _test-error-stream)
2569 (clear-stream $_test-error-buffered-file->buffer)
2570
2571 68/push 0/imm32
2572 68/push 0/imm32
2573 89/<- %edx 4/r32/esp
2574 (tailor-exit-descriptor %edx 0x10)
2575
2576 (write _test-input-stream "fn foo {\n")
2577 (write _test-input-stream " var x/ecx: int <- copy 10\n")
2578 (write _test-input-stream "}\n")
2579
2580 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2581
2582
2583 89/<- %edx 4/r32/esp
2584 (flush _test-output-buffered-file)
2585 (flush _test-error-buffered-file)
2586 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2592
2593 (check-stream-equal _test-output-stream "" "F - test-initializer-in-hex: output should be empty")
2594 (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")
2595
2596 (check-ints-equal *(edx+4) 2 "F - test-initializer-in-hex: exit status")
2597
2598 81 0/subop/add %esp 8/imm32
2599
2600 5d/pop-to-ebp
2601 c3/return
2602
2603 test-convert-function-with-second-local-var-in-same-reg:
2604
2605 55/push-ebp
2606 89/<- %ebp 4/r32/esp
2607
2608 (clear-stream _test-input-stream)
2609 (clear-stream $_test-input-buffered-file->buffer)
2610 (clear-stream _test-output-stream)
2611 (clear-stream $_test-output-buffered-file->buffer)
2612
2613 (write _test-input-stream "fn foo {\n")
2614 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2615 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2616 (write _test-input-stream " y <- increment\n")
2617 (write _test-input-stream "}\n")
2618
2619 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2620 (flush _test-output-buffered-file)
2621 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2627
2628 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-second-local-var-in-same-reg/0")
2629 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-second-local-var-in-same-reg/1")
2630 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/2")
2631 (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")
2632 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-second-local-var-in-same-reg/4")
2633 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-second-local-var-in-same-reg/5")
2634 (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")
2635 (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")
2636 (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")
2637 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-second-local-var-in-same-reg/9")
2638 (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")
2639 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-second-local-var-in-same-reg/11")
2640 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-second-local-var-in-same-reg/12")
2641 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-second-local-var-in-same-reg/13")
2642 (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")
2643 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/15")
2644 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-second-local-var-in-same-reg/16")
2645
2646 89/<- %esp 5/r32/ebp
2647 5d/pop-to-ebp
2648 c3/return
2649
2650 test-read-clobbered-reg-var:
2651
2652 55/push-ebp
2653 89/<- %ebp 4/r32/esp
2654
2655 (clear-stream _test-input-stream)
2656 (clear-stream $_test-input-buffered-file->buffer)
2657 (clear-stream _test-output-stream)
2658 (clear-stream $_test-output-buffered-file->buffer)
2659 (clear-stream _test-error-stream)
2660 (clear-stream $_test-error-buffered-file->buffer)
2661
2662 68/push 0/imm32
2663 68/push 0/imm32
2664 89/<- %edx 4/r32/esp
2665 (tailor-exit-descriptor %edx 0x10)
2666
2667 (write _test-input-stream "fn foo {\n")
2668 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2669 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2670 (write _test-input-stream " x <- increment\n")
2671 (write _test-input-stream "}\n")
2672
2673 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2674
2675
2676 89/<- %edx 4/r32/esp
2677 (flush _test-output-buffered-file)
2678 (flush _test-error-buffered-file)
2679 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2685
2686 (check-stream-equal _test-output-stream "" "F - test-read-clobbered-reg-var: output should be empty")
2687 (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")
2688
2689 (check-ints-equal *(edx+4) 2 "F - test-read-clobbered-reg-var: exit status")
2690
2691 81 0/subop/add %esp 8/imm32
2692
2693 5d/pop-to-ebp
2694 c3/return
2695
2696 test-overlapping-int-fp-registers:
2697
2698 55/push-ebp
2699 89/<- %ebp 4/r32/esp
2700
2701 (clear-stream _test-input-stream)
2702 (clear-stream $_test-input-buffered-file->buffer)
2703 (clear-stream _test-output-stream)
2704 (clear-stream $_test-output-buffered-file->buffer)
2705 (clear-stream _test-error-stream)
2706 (clear-stream $_test-error-buffered-file->buffer)
2707
2708 68/push 0/imm32
2709 68/push 0/imm32
2710 89/<- %edx 4/r32/esp
2711 (tailor-exit-descriptor %edx 0x10)
2712
2713 (write _test-input-stream "fn foo {\n")
2714 (write _test-input-stream " var x/eax: int <- copy 3\n")
2715 (write _test-input-stream " var y/xmm0: float <- convert x\n")
2716 (write _test-input-stream " x <- increment\n")
2717 (write _test-input-stream "}\n")
2718
2719 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2720
2721
2722 89/<- %edx 4/r32/esp
2723 (flush _test-output-buffered-file)
2724 (flush _test-error-buffered-file)
2725 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2731
2732 (check-next-stream-line-equal _test-error-stream "" "F - test-overlapping-int-fp-registers: error message")
2733
2734
2735 81 0/subop/add %esp 8/imm32
2736
2737 5d/pop-to-ebp
2738 c3/return
2739
2740 test-convert-function-call:
2741
2742 55/push-ebp
2743 89/<- %ebp 4/r32/esp
2744
2745 (clear-stream _test-input-stream)
2746 (clear-stream $_test-input-buffered-file->buffer)
2747 (clear-stream _test-output-stream)
2748 (clear-stream $_test-output-buffered-file->buffer)
2749
2750 (write _test-input-stream "fn main -> _/ebx: int {\n")
2751 (write _test-input-stream " var result/ebx: int <- foo\n")
2752 (write _test-input-stream " return result\n")
2753 (write _test-input-stream "}\n")
2754 (write _test-input-stream "fn foo -> _/ebx: int {\n")
2755 (write _test-input-stream " var result/ebx: int <- copy 3\n")
2756 (write _test-input-stream " return result\n")
2757 (write _test-input-stream "}\n")
2758
2759 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2760 (flush _test-output-buffered-file)
2761 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2767
2768 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call/0")
2769 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/1")
2770 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/2")
2771 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/3")
2772 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/4")
2773 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call/5")
2774 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
2775 (check-next-stream-line-equal _test-output-stream " (foo)" "F - test-convert-function-call/6")
2776 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2777 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
2778 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2779 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/7")
2780 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call/8")
2781 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/9")
2782 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/10")
2783 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/11")
2784 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/12")
2785 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call/13")
2786 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/14")
2787 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/15")
2788 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/16")
2789 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/17")
2790 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call/18")
2791 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
2792 (check-next-stream-line-equal _test-output-stream " bb/copy-to-ebx 3/imm32" "F - test-convert-function-call/19")
2793 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2794 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
2795 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2796 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/20")
2797 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call/21")
2798 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/22")
2799 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/23")
2800 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/24")
2801 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/25")
2802
2803 89/<- %esp 5/r32/ebp
2804 5d/pop-to-ebp
2805 c3/return
2806
2807 test-convert-function-call-with-inout-with-compound-type:
2808
2809 55/push-ebp
2810 89/<- %ebp 4/r32/esp
2811
2812 (clear-stream _test-input-stream)
2813 (clear-stream $_test-input-buffered-file->buffer)
2814 (clear-stream _test-output-stream)
2815 (clear-stream $_test-output-buffered-file->buffer)
2816
2817 (write _test-input-stream "fn f {\n")
2818 (write _test-input-stream " var x: (addr int)\n")
2819 (write _test-input-stream " g x\n")
2820 (write _test-input-stream "}\n")
2821 (write _test-input-stream "fn g a: (addr int) {\n")
2822 (write _test-input-stream "}\n")
2823
2824 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2825 (flush _test-output-buffered-file)
2826 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2832
2833 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-inout-with-compound-type/0")
2834 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/1")
2835 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/2")
2836 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/3")
2837 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-inout-with-compound-type/4")
2838 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-inout-with-compound-type/5")
2839 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-inout-with-compound-type/6")
2840 (check-next-stream-line-equal _test-output-stream " (g *(ebp+0xfffffffc))" "F - test-convert-function-call-with-inout-with-compound-type/7")
2841 (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")
2842 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-inout-with-compound-type/9")
2843 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-inout-with-compound-type/10")
2844 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/11")
2845 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/12")
2846 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/13")
2847 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/14")
2848 (check-next-stream-line-equal _test-output-stream "g:" "F - test-convert-function-call-with-inout-with-compound-type/15")
2849 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/16")
2850 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/17")
2851 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/18")
2852 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/19")
2853 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/20")
2854 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/21")
2855 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/22")
2856
2857 89/<- %esp 5/r32/ebp
2858 5d/pop-to-ebp
2859 c3/return
2860
2861 test-convert-function-call-with-inout-with-type-parameter:
2862
2863 55/push-ebp
2864 89/<- %ebp 4/r32/esp
2865
2866 (clear-stream _test-input-stream)
2867 (clear-stream $_test-input-buffered-file->buffer)
2868 (clear-stream _test-output-stream)
2869 (clear-stream $_test-output-buffered-file->buffer)
2870 (clear-stream _test-error-stream)
2871 (clear-stream $_test-error-buffered-file->buffer)
2872
2873 68/push 0/imm32
2874 68/push 0/imm32
2875 89/<- %edx 4/r32/esp
2876 (tailor-exit-descriptor %edx 0x10)
2877
2878 (write _test-input-stream "fn f {\n")
2879 (write _test-input-stream " var x: (addr int)\n")
2880 (write _test-input-stream " g x\n")
2881 (write _test-input-stream "}\n")
2882 (write _test-input-stream "fn g a: (addr _) {\n")
2883 (write _test-input-stream "}\n")
2884
2885 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2886
2887
2888 89/<- %edx 4/r32/esp
2889 (flush _test-output-buffered-file)
2890 (flush _test-error-buffered-file)
2891 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2897
2898 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-type-parameter: error stream should be empty")
2899
2900
2901 81 0/subop/add %esp 8/imm32
2902
2903 5d/pop-to-ebp
2904 c3/return
2905
2906 test-convert-function-call-with-incorrect-inout-type:
2907
2908 55/push-ebp
2909 89/<- %ebp 4/r32/esp
2910
2911 (clear-stream _test-input-stream)
2912 (clear-stream $_test-input-buffered-file->buffer)
2913 (clear-stream _test-output-stream)
2914 (clear-stream $_test-output-buffered-file->buffer)
2915 (clear-stream _test-error-stream)
2916 (clear-stream $_test-error-buffered-file->buffer)
2917
2918 68/push 0/imm32
2919 68/push 0/imm32
2920 89/<- %edx 4/r32/esp
2921 (tailor-exit-descriptor %edx 0x10)
2922
2923 (write _test-input-stream "fn f {\n")
2924 (write _test-input-stream " var x: int\n")
2925 (write _test-input-stream " g x\n")
2926 (write _test-input-stream "}\n")
2927 (write _test-input-stream "fn g a: foo {\n")
2928 (write _test-input-stream "}\n")
2929
2930 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2931
2932
2933 89/<- %edx 4/r32/esp
2934 (flush _test-output-buffered-file)
2935 (flush _test-error-buffered-file)
2936 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2942
2943 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-inout-type: output should be empty")
2944 (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")
2945
2946 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-inout-type: exit status")
2947
2948 81 0/subop/add %esp 8/imm32
2949 5d/pop-to-ebp
2950 c3/return
2951
2952 test-convert-function-call-with-inout-with-incorrect-compound-type:
2953
2954 55/push-ebp
2955 89/<- %ebp 4/r32/esp
2956
2957 (clear-stream _test-input-stream)
2958 (clear-stream $_test-input-buffered-file->buffer)
2959 (clear-stream _test-output-stream)
2960 (clear-stream $_test-output-buffered-file->buffer)
2961 (clear-stream _test-error-stream)
2962 (clear-stream $_test-error-buffered-file->buffer)
2963
2964 68/push 0/imm32
2965 68/push 0/imm32
2966 89/<- %edx 4/r32/esp
2967 (tailor-exit-descriptor %edx 0x10)
2968
2969 (write _test-input-stream "fn f {\n")
2970 (write _test-input-stream " var x: (addr int)\n")
2971 (write _test-input-stream " g x\n")
2972 (write _test-input-stream "}\n")
2973 (write _test-input-stream "fn g a: (addr bool) {\n")
2974 (write _test-input-stream "}\n")
2975
2976 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2977
2978
2979 89/<- %edx 4/r32/esp
2980 (flush _test-output-buffered-file)
2981 (flush _test-error-buffered-file)
2982 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2988
2989 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incorrect-compound-type: output should be empty")
2990 (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")
2991
2992 81 0/subop/add %esp 8/imm32
2993
2994 5d/pop-to-ebp
2995 c3/return
2996
2997 test-convert-function-call-with-inout-with-multiple-type-parameters:
2998
2999 55/push-ebp
3000 89/<- %ebp 4/r32/esp
3001
3002 (clear-stream _test-input-stream)
3003 (clear-stream $_test-input-buffered-file->buffer)
3004 (clear-stream _test-output-stream)
3005 (clear-stream $_test-output-buffered-file->buffer)
3006 (clear-stream _test-error-stream)
3007 (clear-stream $_test-error-buffered-file->buffer)
3008
3009 68/push 0/imm32
3010 68/push 0/imm32
3011 89/<- %edx 4/r32/esp
3012 (tailor-exit-descriptor %edx 0x10)
3013
3014 (write _test-input-stream "fn f {\n")
3015 (write _test-input-stream " var x: (addr int)\n")
3016 (write _test-input-stream " var y: (addr int)\n")
3017 (write _test-input-stream " g x, y\n")
3018 (write _test-input-stream "}\n")
3019 (write _test-input-stream "fn g a: (addr _), b: (addr _) {\n")
3020 (write _test-input-stream "}\n")
3021
3022 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3023
3024
3025 89/<- %edx 4/r32/esp
3026 (flush _test-output-buffered-file)
3027 (flush _test-error-buffered-file)
3028 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3034
3035 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-multiple-type-parameters: error stream should be empty")
3036
3037
3038 81 0/subop/add %esp 8/imm32
3039
3040 5d/pop-to-ebp
3041 c3/return
3042
3043 test-type-parameter-matches-rest-of-type:
3044
3045 55/push-ebp
3046 89/<- %ebp 4/r32/esp
3047
3048 (clear-stream _test-input-stream)
3049 (clear-stream $_test-input-buffered-file->buffer)
3050 (clear-stream _test-output-stream)
3051 (clear-stream $_test-output-buffered-file->buffer)
3052 (clear-stream _test-error-stream)
3053 (clear-stream $_test-error-buffered-file->buffer)
3054
3055 68/push 0/imm32
3056 68/push 0/imm32
3057 89/<- %edx 4/r32/esp
3058 (tailor-exit-descriptor %edx 0x10)
3059
3060 (write _test-input-stream "fn f {\n")
3061 (write _test-input-stream " var x: (addr array int)\n")
3062 (write _test-input-stream " g x\n")
3063 (write _test-input-stream "}\n")
3064 (write _test-input-stream "fn g a: (addr _) {\n")
3065 (write _test-input-stream "}\n")
3066
3067 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3068
3069
3070 89/<- %edx 4/r32/esp
3071 (flush _test-output-buffered-file)
3072 (flush _test-error-buffered-file)
3073 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3079
3080 (check-stream-equal _test-error-stream "" "F - test-type-parameter-matches-rest-of-type: error stream should be empty")
3081
3082
3083 81 0/subop/add %esp 8/imm32
3084
3085 5d/pop-to-ebp
3086 c3/return
3087
3088 test-convert-function-call-with-inout-with-incompatible-type-parameters:
3089
3090 55/push-ebp
3091 89/<- %ebp 4/r32/esp
3092
3093 (clear-stream _test-input-stream)
3094 (clear-stream $_test-input-buffered-file->buffer)
3095 (clear-stream _test-output-stream)
3096 (clear-stream $_test-output-buffered-file->buffer)
3097 (clear-stream _test-error-stream)
3098 (clear-stream $_test-error-buffered-file->buffer)
3099
3100 68/push 0/imm32
3101 68/push 0/imm32
3102 89/<- %edx 4/r32/esp
3103 (tailor-exit-descriptor %edx 0x10)
3104
3105 (write _test-input-stream "fn f {\n")
3106 (write _test-input-stream " var x: (addr int)\n")
3107 (write _test-input-stream " var y: (addr boolean)\n")
3108 (write _test-input-stream " g x, y\n")
3109 (write _test-input-stream "}\n")
3110 (write _test-input-stream "fn g a: (addr _T), b: (addr _T) {\n")
3111 (write _test-input-stream "}\n")
3112
3113 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3114
3115
3116 89/<- %edx 4/r32/esp
3117 (flush _test-output-buffered-file)
3118 (flush _test-error-buffered-file)
3119 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3125
3126 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incompatible-type-parameters: output should be empty")
3127 (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")
3128
3129 81 0/subop/add %esp 8/imm32
3130
3131 5d/pop-to-ebp
3132 c3/return
3133
3134 test-convert-function-call-with-too-few-inouts:
3135
3136 55/push-ebp
3137 89/<- %ebp 4/r32/esp
3138
3139 (clear-stream _test-input-stream)
3140 (clear-stream $_test-input-buffered-file->buffer)
3141 (clear-stream _test-output-stream)
3142 (clear-stream $_test-output-buffered-file->buffer)
3143 (clear-stream _test-error-stream)
3144 (clear-stream $_test-error-buffered-file->buffer)
3145
3146 68/push 0/imm32
3147 68/push 0/imm32
3148 89/<- %edx 4/r32/esp
3149 (tailor-exit-descriptor %edx 0x10)
3150
3151 (write _test-input-stream "fn f {\n")
3152 (write _test-input-stream " g\n")
3153 (write _test-input-stream "}\n")
3154 (write _test-input-stream "fn g a: int {\n")
3155 (write _test-input-stream "}\n")
3156
3157 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3158
3159
3160 89/<- %edx 4/r32/esp
3161 (flush _test-output-buffered-file)
3162 (flush _test-error-buffered-file)
3163 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3169
3170 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-inouts: output should be empty")
3171 (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")
3172
3173 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-inouts: exit status")
3174
3175 81 0/subop/add %esp 8/imm32
3176 5d/pop-to-ebp
3177 c3/return
3178
3179 test-convert-function-call-with-too-many-inouts:
3180
3181 55/push-ebp
3182 89/<- %ebp 4/r32/esp
3183
3184 (clear-stream _test-input-stream)
3185 (clear-stream $_test-input-buffered-file->buffer)
3186 (clear-stream _test-output-stream)
3187 (clear-stream $_test-output-buffered-file->buffer)
3188 (clear-stream _test-error-stream)
3189 (clear-stream $_test-error-buffered-file->buffer)
3190
3191 68/push 0/imm32
3192 68/push 0/imm32
3193 89/<- %edx 4/r32/esp
3194 (tailor-exit-descriptor %edx 0x10)
3195
3196 (write _test-input-stream "fn f {\n")
3197 (write _test-input-stream " var x: int\n")
3198 (write _test-input-stream " g x\n")
3199 (write _test-input-stream "}\n")
3200 (write _test-input-stream "fn g {\n")
3201 (write _test-input-stream "}\n")
3202
3203 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3204
3205
3206 89/<- %edx 4/r32/esp
3207 (flush _test-output-buffered-file)
3208 (flush _test-error-buffered-file)
3209 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3215
3216 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-inouts: output should be empty")
3217 (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")
3218
3219 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-inouts: exit status")
3220
3221 81 0/subop/add %esp 8/imm32
3222 5d/pop-to-ebp
3223 c3/return
3224
3225 test-convert-function-call-with-incorrect-output-type:
3226
3227 55/push-ebp
3228 89/<- %ebp 4/r32/esp
3229
3230 (clear-stream _test-input-stream)
3231 (clear-stream $_test-input-buffered-file->buffer)
3232 (clear-stream _test-output-stream)
3233 (clear-stream $_test-output-buffered-file->buffer)
3234 (clear-stream _test-error-stream)
3235 (clear-stream $_test-error-buffered-file->buffer)
3236
3237 68/push 0/imm32
3238 68/push 0/imm32
3239 89/<- %edx 4/r32/esp
3240 (tailor-exit-descriptor %edx 0x10)
3241
3242 (write _test-input-stream "fn f {\n")
3243 (write _test-input-stream " var x/eax: int <- g\n")
3244 (write _test-input-stream "}\n")
3245 (write _test-input-stream "fn g -> _/eax: foo {\n")
3246 (write _test-input-stream "}\n")
3247
3248 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3249
3250
3251 89/<- %edx 4/r32/esp
3252 (flush _test-output-buffered-file)
3253 (flush _test-error-buffered-file)
3254 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3260
3261 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-type: output should be empty")
3262 (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")
3263
3264 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-type: exit status")
3265
3266 81 0/subop/add %esp 8/imm32
3267 5d/pop-to-ebp
3268 c3/return
3269
3270 test-convert-function-call-with-too-few-outputs:
3271
3272 55/push-ebp
3273 89/<- %ebp 4/r32/esp
3274
3275 (clear-stream _test-input-stream)
3276 (clear-stream $_test-input-buffered-file->buffer)
3277 (clear-stream _test-output-stream)
3278 (clear-stream $_test-output-buffered-file->buffer)
3279 (clear-stream _test-error-stream)
3280 (clear-stream $_test-error-buffered-file->buffer)
3281
3282 68/push 0/imm32
3283 68/push 0/imm32
3284 89/<- %edx 4/r32/esp
3285 (tailor-exit-descriptor %edx 0x10)
3286
3287 (write _test-input-stream "fn f {\n")
3288 (write _test-input-stream " g\n")
3289 (write _test-input-stream "}\n")
3290 (write _test-input-stream "fn g -> _/eax: int {\n")
3291 (write _test-input-stream "}\n")
3292
3293 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3294
3295
3296 89/<- %edx 4/r32/esp
3297 (flush _test-output-buffered-file)
3298 (flush _test-error-buffered-file)
3299 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3305
3306 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-outputs: output should be empty")
3307 (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")
3308
3309 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-outputs: exit status")
3310
3311 81 0/subop/add %esp 8/imm32
3312 5d/pop-to-ebp
3313 c3/return
3314
3315 test-convert-function-call-with-too-many-outputs:
3316
3317 55/push-ebp
3318 89/<- %ebp 4/r32/esp
3319
3320 (clear-stream _test-input-stream)
3321 (clear-stream $_test-input-buffered-file->buffer)
3322 (clear-stream _test-output-stream)
3323 (clear-stream $_test-output-buffered-file->buffer)
3324 (clear-stream _test-error-stream)
3325 (clear-stream $_test-error-buffered-file->buffer)
3326
3327 68/push 0/imm32
3328 68/push 0/imm32
3329 89/<- %edx 4/r32/esp
3330 (tailor-exit-descriptor %edx 0x10)
3331
3332 (write _test-input-stream "fn f {\n")
3333 (write _test-input-stream " var x/eax: int <- g\n")
3334 (write _test-input-stream "}\n")
3335 (write _test-input-stream "fn g {\n")
3336 (write _test-input-stream "}\n")
3337
3338 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3339
3340
3341 89/<- %edx 4/r32/esp
3342 (flush _test-output-buffered-file)
3343 (flush _test-error-buffered-file)
3344 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3350
3351 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-outputs: output should be empty")
3352 (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")
3353
3354 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-outputs: exit status")
3355
3356 81 0/subop/add %esp 8/imm32
3357 5d/pop-to-ebp
3358 c3/return
3359
3360 test-convert-function-call-with-missing-output-register:
3361
3362 55/push-ebp
3363 89/<- %ebp 4/r32/esp
3364
3365 (clear-stream _test-input-stream)
3366 (clear-stream $_test-input-buffered-file->buffer)
3367 (clear-stream _test-output-stream)
3368 (clear-stream $_test-output-buffered-file->buffer)
3369 (clear-stream _test-error-stream)
3370 (clear-stream $_test-error-buffered-file->buffer)
3371
3372 68/push 0/imm32
3373 68/push 0/imm32
3374 89/<- %edx 4/r32/esp
3375 (tailor-exit-descriptor %edx 0x10)
3376
3377 (write _test-input-stream "fn f {\n")
3378 (write _test-input-stream " var x: int\n")
3379 (write _test-input-stream " x <- g\n")
3380 (write _test-input-stream "}\n")
3381 (write _test-input-stream "fn g -> _/eax: int {\n")
3382 (write _test-input-stream "}\n")
3383
3384 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3385
3386
3387 89/<- %edx 4/r32/esp
3388 (flush _test-output-buffered-file)
3389 (flush _test-error-buffered-file)
3390 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3396
3397 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-missing-output-register: output should be empty")
3398 (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")
3399
3400 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-missing-output-register: exit status")
3401
3402 81 0/subop/add %esp 8/imm32
3403 5d/pop-to-ebp
3404 c3/return
3405
3406 test-convert-function-call-with-incorrect-output-register:
3407
3408 55/push-ebp
3409 89/<- %ebp 4/r32/esp
3410
3411 (clear-stream _test-input-stream)
3412 (clear-stream $_test-input-buffered-file->buffer)
3413 (clear-stream _test-output-stream)
3414 (clear-stream $_test-output-buffered-file->buffer)
3415 (clear-stream _test-error-stream)
3416 (clear-stream $_test-error-buffered-file->buffer)
3417
3418 68/push 0/imm32
3419 68/push 0/imm32
3420 89/<- %edx 4/r32/esp
3421 (tailor-exit-descriptor %edx 0x10)
3422
3423 (write _test-input-stream "fn f {\n")
3424 (write _test-input-stream " var x/ecx: int <- g\n")
3425 (write _test-input-stream "}\n")
3426 (write _test-input-stream "fn g -> _/eax: int {\n")
3427 (write _test-input-stream "}\n")
3428
3429 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3430
3431
3432 89/<- %edx 4/r32/esp
3433 (flush _test-output-buffered-file)
3434 (flush _test-error-buffered-file)
3435 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3441
3442 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-register: output should be empty")
3443 (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")
3444
3445 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-register: exit status")
3446
3447 81 0/subop/add %esp 8/imm32
3448 5d/pop-to-ebp
3449 c3/return
3450
3451 test-convert-function-with-local-var-dereferenced:
3452
3453 55/push-ebp
3454 89/<- %ebp 4/r32/esp
3455
3456 (clear-stream _test-input-stream)
3457 (clear-stream $_test-input-buffered-file->buffer)
3458 (clear-stream _test-output-stream)
3459 (clear-stream $_test-output-buffered-file->buffer)
3460
3461 (write _test-input-stream "fn foo {\n")
3462 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
3463 (write _test-input-stream " increment *x\n")
3464 (write _test-input-stream "}\n")
3465
3466 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3467 (flush _test-output-buffered-file)
3468 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3474
3475 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-dereferenced/0")
3476 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-dereferenced/1")
3477 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-dereferenced/2")
3478 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-dereferenced/3")
3479 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-dereferenced/4")
3480 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-dereferenced/5")
3481 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-dereferenced/6")
3482 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-dereferenced/7")
3483 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-with-local-var-dereferenced/8")
3484 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-dereferenced/9")
3485 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-dereferenced/10")
3486 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-dereferenced/11")
3487 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-dereferenced/12")
3488 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-dereferenced/13")
3489 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-dereferenced/14")
3490 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-dereferenced/15")
3491
3492 89/<- %esp 5/r32/ebp
3493 5d/pop-to-ebp
3494 c3/return
3495
3496 test-dereference-of-var-on-stack:
3497
3498 55/push-ebp
3499 89/<- %ebp 4/r32/esp
3500
3501 (clear-stream _test-input-stream)
3502 (clear-stream $_test-input-buffered-file->buffer)
3503 (clear-stream _test-output-stream)
3504 (clear-stream $_test-output-buffered-file->buffer)
3505 (clear-stream _test-error-stream)
3506 (clear-stream $_test-error-buffered-file->buffer)
3507
3508 68/push 0/imm32
3509 68/push 0/imm32
3510 89/<- %edx 4/r32/esp
3511 (tailor-exit-descriptor %edx 0x10)
3512
3513 (write _test-input-stream "fn foo {\n")
3514 (write _test-input-stream " var x: (addr int)\n")
3515 (write _test-input-stream " increment *x\n")
3516 (write _test-input-stream "}\n")
3517
3518 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3519
3520
3521 89/<- %edx 4/r32/esp
3522 (flush _test-output-buffered-file)
3523 (flush _test-error-buffered-file)
3524 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3530
3531 (check-stream-equal _test-output-stream "" "F - test-dereference-of-var-on-stack: output should be empty")
3532 (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")
3533
3534 (check-ints-equal *(edx+4) 2 "F - test-dereference-of-var-on-stack: exit status")
3535
3536 81 0/subop/add %esp 8/imm32
3537
3538 5d/pop-to-ebp
3539 c3/return
3540
3541 test-convert-function-with-byte-operations:
3542
3543 55/push-ebp
3544 89/<- %ebp 4/r32/esp
3545
3546 (clear-stream _test-input-stream)
3547 (clear-stream $_test-input-buffered-file->buffer)
3548 (clear-stream _test-output-stream)
3549 (clear-stream $_test-output-buffered-file->buffer)
3550
3551 (write _test-input-stream "fn foo {\n")
3552 (write _test-input-stream " var x/eax: byte <- copy 0\n")
3553 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
3554 (write _test-input-stream " y <- copy-byte x\n")
3555 (write _test-input-stream " var z/edx: (addr byte) <- copy 0\n")
3556 (write _test-input-stream " y <- copy-byte *z\n")
3557 (write _test-input-stream " copy-byte-to *z, x\n")
3558 (write _test-input-stream "}\n")
3559
3560 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3561 (flush _test-output-buffered-file)
3562 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3568
3569 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-byte-operations/0")
3570 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-byte-operations/1")
3571 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-byte-operations/2")
3572 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-byte-operations/3")
3573 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-byte-operations/4")
3574 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-byte-operations/5")
3575 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-byte-operations/6")
3576 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-byte-operations/7")
3577 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-byte-operations/8")
3578 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-byte-operations/9")
3579 (check-next-stream-line-equal _test-output-stream " 8a/byte-> %eax 0x00000001/r32" "F - test-convert-function-with-byte-operations/10")
3580 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-function-with-byte-operations/11")
3581 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 0/imm32" "F - test-convert-function-with-byte-operations/12")
3582 (check-next-stream-line-equal _test-output-stream " 8a/byte-> *edx 0x00000001/r32" "F - test-convert-function-with-byte-operations/13")
3583 (check-next-stream-line-equal _test-output-stream " 88/byte<- *edx 0x00000000/r32" "F - test-convert-function-with-byte-operations/14")
3584 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-function-with-byte-operations/15")
3585 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-byte-operations/16")
3586 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-byte-operations/17")
3587 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-byte-operations/18")
3588 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-byte-operations/19")
3589 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-byte-operations/20")
3590 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-byte-operations/21")
3591 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-byte-operations/22")
3592 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-byte-operations/23")
3593
3594 89/<- %esp 5/r32/ebp
3595 5d/pop-to-ebp
3596 c3/return
3597
3598
3599 test-byte-values-on-stack:
3600
3601 55/push-ebp
3602 89/<- %ebp 4/r32/esp
3603
3604 (clear-stream _test-input-stream)
3605 (clear-stream $_test-input-buffered-file->buffer)
3606 (clear-stream _test-output-stream)
3607 (clear-stream $_test-output-buffered-file->buffer)
3608 (clear-stream _test-error-stream)
3609 (clear-stream $_test-error-buffered-file->buffer)
3610
3611 68/push 0/imm32
3612 68/push 0/imm32
3613 89/<- %edx 4/r32/esp
3614 (tailor-exit-descriptor %edx 0x10)
3615
3616 (write _test-input-stream "fn foo {\n")
3617 (write _test-input-stream " var x: byte\n")
3618 (write _test-input-stream "}\n")
3619
3620 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3621
3622
3623 89/<- %edx 4/r32/esp
3624 (flush _test-output-buffered-file)
3625 (flush _test-error-buffered-file)
3626 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3632
3633 (check-stream-equal _test-output-stream "" "F - test-byte-values-on-stack: output should be empty")
3634 (check-next-stream-line-equal _test-error-stream "fn foo: var 'x' of type 'byte' cannot be on the stack" "F - test-byte-values-on-stack: error message")
3635
3636 (check-ints-equal *(edx+4) 2 "F - test-byte-values-on-stack: exit status")
3637
3638 81 0/subop/add %esp 8/imm32
3639
3640 5d/pop-to-ebp
3641 c3/return
3642
3643
3644 test-byte-values-in-unsupported-registers:
3645
3646 55/push-ebp
3647 89/<- %ebp 4/r32/esp
3648
3649 (clear-stream _test-input-stream)
3650 (clear-stream $_test-input-buffered-file->buffer)
3651 (clear-stream _test-output-stream)
3652 (clear-stream $_test-output-buffered-file->buffer)
3653 (clear-stream _test-error-stream)
3654 (clear-stream $_test-error-buffered-file->buffer)
3655
3656 68/push 0/imm32
3657 68/push 0/imm32
3658 89/<- %edx 4/r32/esp
3659 (tailor-exit-descriptor %edx 0x10)
3660
3661 (write _test-input-stream "fn foo {\n")
3662 (write _test-input-stream " var x/esi: byte <- copy 0\n")
3663 (write _test-input-stream "}\n")
3664
3665 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3666
3667
3668 89/<- %edx 4/r32/esp
3669 (flush _test-output-buffered-file)
3670 (flush _test-error-buffered-file)
3671 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3677
3678 (check-stream-equal _test-output-stream "" "F - test-byte-values-in-unsupported-registers: output should be empty")
3679 (check-next-stream-line-equal _test-error-stream "fn foo: var 'x' of type 'byte' cannot be in esi or edi" "F - test-byte-values-in-unsupported-registers: error message")
3680
3681 (check-ints-equal *(edx+4) 2 "F - test-byte-values-in-unsupported-registers: exit status")
3682
3683 81 0/subop/add %esp 8/imm32
3684
3685 5d/pop-to-ebp
3686 c3/return
3687
3688
3689 test-copy-byte-var-from-fn-arg:
3690
3691 55/push-ebp
3692 89/<- %ebp 4/r32/esp
3693
3694 (clear-stream _test-input-stream)
3695 (clear-stream $_test-input-buffered-file->buffer)
3696 (clear-stream _test-output-stream)
3697 (clear-stream $_test-output-buffered-file->buffer)
3698
3699 (write _test-input-stream "fn foo x: byte, y: int {\n")
3700 (write _test-input-stream " var a/eax: byte <- copy x\n")
3701 (write _test-input-stream " var b/eax: int <- copy y\n")
3702 (write _test-input-stream "}\n")
3703
3704 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3705 (flush _test-output-buffered-file)
3706 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3712
3713 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-copy-byte-from-fn-arg/0")
3714 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-copy-byte-from-fn-arg/1")
3715 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-copy-byte-from-fn-arg/2")
3716 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-copy-byte-from-fn-arg/3")
3717 (check-next-stream-line-equal _test-output-stream " {" "F - test-copy-byte-from-fn-arg/4")
3718 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-copy-byte-from-fn-arg/5")
3719 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-copy-byte-from-fn-arg/6")
3720 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/7")
3721 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x0000000c) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/8")
3722 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-copy-byte-from-fn-arg/9")
3723 (check-next-stream-line-equal _test-output-stream " }" "F - test-copy-byte-from-fn-arg/10")
3724 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-copy-byte-from-fn-arg/11")
3725 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-copy-byte-from-fn-arg/12")
3726 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-copy-byte-from-fn-arg/13")
3727 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-copy-byte-from-fn-arg/14")
3728 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-copy-byte-from-fn-arg/15")
3729
3730 89/<- %esp 5/r32/ebp
3731 5d/pop-to-ebp
3732 c3/return
3733
3734 test-convert-compare-register-with-literal:
3735
3736 55/push-ebp
3737 89/<- %ebp 4/r32/esp
3738
3739 (clear-stream _test-input-stream)
3740 (clear-stream $_test-input-buffered-file->buffer)
3741 (clear-stream _test-output-stream)
3742 (clear-stream $_test-output-buffered-file->buffer)
3743
3744 (write _test-input-stream "fn foo {\n")
3745 (write _test-input-stream " var x/ecx: int <- copy 0\n")
3746 (write _test-input-stream " compare x, 0\n")
3747 (write _test-input-stream "}\n")
3748
3749 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3750 (flush _test-output-buffered-file)
3751 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3757
3758 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compare-register-with-literal/0")
3759 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compare-register-with-literal/1")
3760 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compare-register-with-literal/2")
3761 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compare-register-with-literal/3")
3762 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compare-register-with-literal/4")
3763 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compare-register-with-literal/5")
3764 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
3765 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-compare-register-with-literal/7")
3766 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0/imm32" "F - test-convert-compare-register-with-literal/8")
3767 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
3768 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compare-register-with-literal/10")
3769 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compare-register-with-literal/11")
3770 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compare-register-with-literal/12")
3771 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compare-register-with-literal/13")
3772 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compare-register-with-literal/14")
3773 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compare-register-with-literal/15")
3774
3775 89/<- %esp 5/r32/ebp
3776 5d/pop-to-ebp
3777 c3/return
3778
3779 test-unknown-variable:
3780
3781 55/push-ebp
3782 89/<- %ebp 4/r32/esp
3783
3784 (clear-stream _test-input-stream)
3785 (clear-stream $_test-input-buffered-file->buffer)
3786 (clear-stream _test-output-stream)
3787 (clear-stream $_test-output-buffered-file->buffer)
3788 (clear-stream _test-error-stream)
3789 (clear-stream $_test-error-buffered-file->buffer)
3790
3791 68/push 0/imm32
3792 68/push 0/imm32
3793 89/<- %edx 4/r32/esp
3794 (tailor-exit-descriptor %edx 0x10)
3795
3796 (write _test-input-stream "fn foo {\n")
3797 (write _test-input-stream " compare x, 0\n")
3798 (write _test-input-stream "}\n")
3799
3800 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3801
3802
3803 89/<- %edx 4/r32/esp
3804 (flush _test-output-buffered-file)
3805 (flush _test-error-buffered-file)
3806 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
3812
3813 (check-stream-equal _test-output-stream "" "F - test-unknown-variable: output should be empty")
3814 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable: error message")
3815
3816 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable: exit status")
3817
3818 81 0/subop/add %esp 8/imm32
3819
3820 5d/pop-to-ebp
3821 c3/return
3822
3823 test-convert-function-with-local-var-in-block:
3824
3825 55/push-ebp
3826 89/<- %ebp 4/r32/esp
3827
3828 (clear-stream _test-input-stream)
3829 (clear-stream $_test-input-buffered-file->buffer)
3830 (clear-stream _test-output-stream)
3831 (clear-stream $_test-output-buffered-file->buffer)
3832
3833 (write _test-input-stream "fn foo {\n")
3834 (write _test-input-stream " {\n")
3835 (write _test-input-stream " var x: int\n")
3836 (write _test-input-stream " increment x\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-local-var-in-block/0")
3850 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-block/1")
3851 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-block/2")
3852 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-block/3")
3853 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/4")
3854 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-block/5")
3855 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/6")
3856 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-block/7")
3857 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-block/8")
3858 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-block/9")
3859 (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")
3860 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/11")
3861 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-block/12")
3862 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/13")
3863 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-block/14")
3864 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-block/15")
3865 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-block/16")
3866 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-block/17")
3867 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-block/18")
3868
3869 89/<- %esp 5/r32/ebp
3870 5d/pop-to-ebp
3871 c3/return
3872
3873 test-convert-function-with-local-var-in-mem-after-block:
3874
3875 55/push-ebp
3876 89/<- %ebp 4/r32/esp
3877
3878 (clear-stream _test-input-stream)
3879 (clear-stream $_test-input-buffered-file->buffer)
3880 (clear-stream _test-output-stream)
3881 (clear-stream $_test-output-buffered-file->buffer)
3882
3883 (write _test-input-stream "fn foo {\n")
3884 (write _test-input-stream " {\n")
3885 (write _test-input-stream " var y: int\n")
3886 (write _test-input-stream " }\n")
3887 (write _test-input-stream " var x: int\n")
3888 (write _test-input-stream " increment x\n")
3889 (write _test-input-stream "}\n")
3890
3891 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3892 (flush _test-output-buffered-file)
3893 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3899
3900 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem-after-block/0")
3901 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem-after-block/1")
3902 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/2")
3903 (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")
3904 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/4")
3905 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/5")
3906 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/6")
3907 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/7")
3908 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/8")
3909 (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")
3910 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/10")
3911 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-mem-after-block/11")
3912 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/12")
3913 (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")
3914 (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")
3915 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/15")
3916 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem-after-block/16")
3917 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem-after-block/17")
3918 (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")
3919 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/19")
3920 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem-after-block/20")
3921
3922 89/<- %esp 5/r32/ebp
3923 5d/pop-to-ebp
3924 c3/return
3925
3926 test-convert-function-with-local-var-in-named-block:
3927
3928 55/push-ebp
3929 89/<- %ebp 4/r32/esp
3930
3931 (clear-stream _test-input-stream)
3932 (clear-stream $_test-input-buffered-file->buffer)
3933 (clear-stream _test-output-stream)
3934 (clear-stream $_test-output-buffered-file->buffer)
3935
3936 (write _test-input-stream "fn foo {\n")
3937 (write _test-input-stream " $bar: {\n")
3938 (write _test-input-stream " var x: int\n")
3939 (write _test-input-stream " increment x\n")
3940 (write _test-input-stream " }\n")
3941 (write _test-input-stream "}\n")
3942
3943 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3944 (flush _test-output-buffered-file)
3945 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3951
3952 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-named-block/0")
3953 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-named-block/1")
3954 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-named-block/2")
3955 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-named-block/3")
3956 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/4")
3957 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-named-block/5")
3958 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/6")
3959 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-local-var-in-named-block/7")
3960 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-named-block/8")
3961 (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")
3962 (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")
3963 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/11")
3964 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-local-var-in-named-block/12")
3965 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/13")
3966 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-named-block/14")
3967 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-named-block/15")
3968 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-named-block/16")
3969 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-named-block/17")
3970 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-named-block/18")
3971
3972 89/<- %esp 5/r32/ebp
3973 5d/pop-to-ebp
3974 c3/return
3975
3976 test-unknown-variable-in-named-block:
3977
3978 55/push-ebp
3979 89/<- %ebp 4/r32/esp
3980
3981 (clear-stream _test-input-stream)
3982 (clear-stream $_test-input-buffered-file->buffer)
3983 (clear-stream _test-output-stream)
3984 (clear-stream $_test-output-buffered-file->buffer)
3985 (clear-stream _test-error-stream)
3986 (clear-stream $_test-error-buffered-file->buffer)
3987
3988 68/push 0/imm32
3989 68/push 0/imm32
3990 89/<- %edx 4/r32/esp
3991 (tailor-exit-descriptor %edx 0x10)
3992
3993 (write _test-input-stream "fn foo {\n")
3994 (write _test-input-stream " $a: {\n")
3995 (write _test-input-stream " compare x, 0\n")
3996 (write _test-input-stream " }\n")
3997 (write _test-input-stream "}\n")
3998
3999 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4000
4001
4002 89/<- %edx 4/r32/esp
4003 (flush _test-output-buffered-file)
4004 (flush _test-error-buffered-file)
4005 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
4011
4012 (check-stream-equal _test-output-stream "" "F - test-unknown-variable-in-named-block: output should be empty")
4013 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable-in-named-block: error message")
4014
4015 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable-in-named-block: exit status")
4016
4017 81 0/subop/add %esp 8/imm32
4018
4019 5d/pop-to-ebp
4020 c3/return
4021
4022 test-always-shadow-outermost-reg-vars-in-function:
4023
4024 55/push-ebp
4025 89/<- %ebp 4/r32/esp
4026
4027 (clear-stream _test-input-stream)
4028 (clear-stream $_test-input-buffered-file->buffer)
4029 (clear-stream _test-output-stream)
4030 (clear-stream $_test-output-buffered-file->buffer)
4031
4032 (write _test-input-stream "fn foo {\n")
4033 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4034 (write _test-input-stream "}\n")
4035
4036 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4037 (flush _test-output-buffered-file)
4038 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4044
4045 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-always-shadow-outermost-reg-vars-in-function/0")
4046 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-always-shadow-outermost-reg-vars-in-function/1")
4047 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/2")
4048 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-always-shadow-outermost-reg-vars-in-function/3")
4049 (check-next-stream-line-equal _test-output-stream " {" "F - test-always-shadow-outermost-reg-vars-in-function/4")
4050 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-always-shadow-outermost-reg-vars-in-function/5")
4051 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
4052 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-always-shadow-outermost-reg-vars-in-function/8")
4053 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
4054 (check-next-stream-line-equal _test-output-stream " }" "F - test-always-shadow-outermost-reg-vars-in-function/12")
4055 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-always-shadow-outermost-reg-vars-in-function/13")
4056 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-always-shadow-outermost-reg-vars-in-function/14")
4057 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-always-shadow-outermost-reg-vars-in-function/15")
4058 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/16")
4059 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-always-shadow-outermost-reg-vars-in-function/17")
4060
4061 89/<- %esp 5/r32/ebp
4062 5d/pop-to-ebp
4063 c3/return
4064
4065 test-shadow-local:
4066
4067 55/push-ebp
4068 89/<- %ebp 4/r32/esp
4069
4070 (clear-stream _test-input-stream)
4071 (clear-stream $_test-input-buffered-file->buffer)
4072 (clear-stream _test-output-stream)
4073 (clear-stream $_test-output-buffered-file->buffer)
4074
4075 (write _test-input-stream "fn foo {\n")
4076 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4077 (write _test-input-stream " {\n")
4078 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4079 (write _test-input-stream " }\n")
4080 (write _test-input-stream " x <- increment\n")
4081 (write _test-input-stream "}\n")
4082
4083 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4084 (flush _test-output-buffered-file)
4085 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4091
4092 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-local/0")
4093 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-local/1")
4094 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-local/2")
4095 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-local/3")
4096 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/4")
4097 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-local/5")
4098 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/6")
4099 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-local/7")
4100 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/8")
4101 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-local/9")
4102 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/10")
4103 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-local/11")
4104 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/12")
4105 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/13")
4106 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-local/14")
4107 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-local/15")
4108 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/16")
4109 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/17")
4110 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-local/18")
4111 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-local/19")
4112 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-local/20")
4113 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-local/21")
4114 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-local/22")
4115
4116 89/<- %esp 5/r32/ebp
4117 5d/pop-to-ebp
4118 c3/return
4119
4120 test-shadow-name:
4121
4122 55/push-ebp
4123 89/<- %ebp 4/r32/esp
4124
4125 (clear-stream _test-input-stream)
4126 (clear-stream $_test-input-buffered-file->buffer)
4127 (clear-stream _test-output-stream)
4128 (clear-stream $_test-output-buffered-file->buffer)
4129
4130 (write _test-input-stream "fn foo {\n")
4131 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4132 (write _test-input-stream " {\n")
4133 (write _test-input-stream " var x/edx: int <- copy 4\n")
4134 (write _test-input-stream " }\n")
4135 (write _test-input-stream " x <- increment\n")
4136 (write _test-input-stream "}\n")
4137
4138 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4139 (flush _test-output-buffered-file)
4140 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4146
4147 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name/0")
4148 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name/1")
4149 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name/2")
4150 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name/3")
4151 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/4")
4152 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name/5")
4153 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name/6")
4154 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name/7")
4155 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/8")
4156 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name/9")
4157 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name/10")
4158 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name/11")
4159 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name/12")
4160 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/13")
4161 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name/14")
4162 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name/15")
4163 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name/16")
4164 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/17")
4165 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name/18")
4166 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name/19")
4167 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name/20")
4168 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name/21")
4169 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name/22")
4170
4171 89/<- %esp 5/r32/ebp
4172 5d/pop-to-ebp
4173 c3/return
4174
4175 test-shadow-name-2:
4176
4177 55/push-ebp
4178 89/<- %ebp 4/r32/esp
4179
4180 (clear-stream _test-input-stream)
4181 (clear-stream $_test-input-buffered-file->buffer)
4182 (clear-stream _test-output-stream)
4183 (clear-stream $_test-output-buffered-file->buffer)
4184
4185 (write _test-input-stream "fn foo {\n")
4186 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4187 (write _test-input-stream " {\n")
4188 (write _test-input-stream " var x/edx: int <- copy 4\n")
4189 (write _test-input-stream " var y/ecx: int <- copy 5\n")
4190 (write _test-input-stream " }\n")
4191 (write _test-input-stream " x <- increment\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-shadow-name-2/0")
4204 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name-2/1")
4205 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name-2/2")
4206 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name-2/3")
4207 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/4")
4208 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name-2/5")
4209 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/6")
4210 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name-2/7")
4211 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/8")
4212 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name-2/9")
4213 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name-2/10")
4214 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name-2/11")
4215 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/12")
4216 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 5/imm32" "F - test-shadow-name-2/13")
4217 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/14")
4218 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name-2/15")
4219 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/16")
4220 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name-2/17")
4221 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name-2/18")
4222 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/19")
4223 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/20")
4224 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name-2/21")
4225 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name-2/22")
4226 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name-2/23")
4227 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name-2/24")
4228 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name-2/25")
4229
4230 89/<- %esp 5/r32/ebp
4231 5d/pop-to-ebp
4232 c3/return
4233
4234 test-do-not-spill-same-register-in-block:
4235
4236 55/push-ebp
4237 89/<- %ebp 4/r32/esp
4238
4239 (clear-stream _test-input-stream)
4240 (clear-stream $_test-input-buffered-file->buffer)
4241 (clear-stream _test-output-stream)
4242 (clear-stream $_test-output-buffered-file->buffer)
4243
4244 (write _test-input-stream "fn foo {\n")
4245 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4246 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4247 (write _test-input-stream " y <- increment\n")
4248 (write _test-input-stream "}\n")
4249
4250 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4251 (flush _test-output-buffered-file)
4252 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4258
4259 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-do-not-spill-same-register-in-block/0")
4260 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-do-not-spill-same-register-in-block/1")
4261 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-do-not-spill-same-register-in-block/2")
4262 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-do-not-spill-same-register-in-block/3")
4263 (check-next-stream-line-equal _test-output-stream " {" "F - test-do-not-spill-same-register-in-block/4")
4264 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-do-not-spill-same-register-in-block/5")
4265 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-do-not-spill-same-register-in-block/6")
4266 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-do-not-spill-same-register-in-block/7")
4267 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-do-not-spill-same-register-in-block/8")
4268 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-do-not-spill-same-register-in-block/9")
4269 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-do-not-spill-same-register-in-block/10")
4270 (check-next-stream-line-equal _test-output-stream " }" "F - test-do-not-spill-same-register-in-block/11")
4271 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-do-not-spill-same-register-in-block/12")
4272 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-do-not-spill-same-register-in-block/13")
4273 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-do-not-spill-same-register-in-block/14")
4274 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-do-not-spill-same-register-in-block/15")
4275 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-do-not-spill-same-register-in-block/16")
4276
4277 89/<- %esp 5/r32/ebp
4278 5d/pop-to-ebp
4279 c3/return
4280
4281 test-spill-different-register-in-block:
4282
4283 55/push-ebp
4284 89/<- %ebp 4/r32/esp
4285
4286 (clear-stream _test-input-stream)
4287 (clear-stream $_test-input-buffered-file->buffer)
4288 (clear-stream _test-output-stream)
4289 (clear-stream $_test-output-buffered-file->buffer)
4290
4291 (write _test-input-stream "fn foo {\n")
4292 (write _test-input-stream " var x/eax: int <- copy 3\n")
4293 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4294 (write _test-input-stream " y <- increment\n")
4295 (write _test-input-stream "}\n")
4296
4297 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4298 (flush _test-output-buffered-file)
4299 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4305
4306 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-spill-different-register-in-block/0")
4307 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-spill-different-register-in-block/1")
4308 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-spill-different-register-in-block/2")
4309 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-spill-different-register-in-block/3")
4310 (check-next-stream-line-equal _test-output-stream " {" "F - test-spill-different-register-in-block/4")
4311 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-spill-different-register-in-block/5")
4312 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-spill-different-register-in-block/6")
4313 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-spill-different-register-in-block/7")
4314 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-spill-different-register-in-block/8")
4315 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-spill-different-register-in-block/9")
4316 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-spill-different-register-in-block/10")
4317 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-spill-different-register-in-block/11")
4318 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-spill-different-register-in-block/12")
4319 (check-next-stream-line-equal _test-output-stream " }" "F - test-spill-different-register-in-block/13")
4320 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-spill-different-register-in-block/14")
4321 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-spill-different-register-in-block/15")
4322 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-spill-different-register-in-block/16")
4323 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-spill-different-register-in-block/17")
4324 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-spill-different-register-in-block/18")
4325
4326 89/<- %esp 5/r32/ebp
4327 5d/pop-to-ebp
4328 c3/return
4329
4330 test-convert-function-with-branches-in-block:
4331
4332 55/push-ebp
4333 89/<- %ebp 4/r32/esp
4334
4335 (clear-stream _test-input-stream)
4336 (clear-stream $_test-input-buffered-file->buffer)
4337 (clear-stream _test-output-stream)
4338 (clear-stream $_test-output-buffered-file->buffer)
4339
4340 (write _test-input-stream "fn foo x: int {\n")
4341 (write _test-input-stream " {\n")
4342 (write _test-input-stream " break-if->=\n")
4343 (write _test-input-stream " loop-if-addr<\n")
4344 (write _test-input-stream " increment x\n")
4345 (write _test-input-stream " loop\n")
4346 (write _test-input-stream " }\n")
4347 (write _test-input-stream "}\n")
4348
4349 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4350 (flush _test-output-buffered-file)
4351 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4357
4358 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
4359 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
4360 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
4361 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
4362 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
4363 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
4364 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
4365 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
4366 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
4367 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
4368 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
4369 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
4370 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
4371 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
4372 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
4373 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
4374 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
4375 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
4376 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
4377 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
4378 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
4379 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
4380 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
4381 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
4382 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
4383 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
4384
4385 89/<- %esp 5/r32/ebp
4386 5d/pop-to-ebp
4387 c3/return
4388
4389 test-convert-function-with-branches-in-block-2:
4390
4391 55/push-ebp
4392 89/<- %ebp 4/r32/esp
4393
4394 (clear-stream _test-input-stream)
4395 (clear-stream $_test-input-buffered-file->buffer)
4396 (clear-stream _test-output-stream)
4397 (clear-stream $_test-output-buffered-file->buffer)
4398
4399 (write _test-input-stream "fn foo x: int {\n")
4400 (write _test-input-stream " {\n")
4401 (write _test-input-stream " break-if->=\n")
4402 (write _test-input-stream " loop-if-float<\n")
4403 (write _test-input-stream " increment x\n")
4404 (write _test-input-stream " loop\n")
4405 (write _test-input-stream " }\n")
4406 (write _test-input-stream "}\n")
4407
4408 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4409 (flush _test-output-buffered-file)
4410 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4416
4417 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
4418 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
4419 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
4420 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
4421 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
4422 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
4423 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
4424 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
4425 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
4426 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
4427 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
4428 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
4429 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
4430 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
4431 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
4432 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
4433 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
4434 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
4435 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
4436 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
4437 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
4438 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
4439 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
4440 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
4441 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
4442 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
4443
4444 89/<- %esp 5/r32/ebp
4445 5d/pop-to-ebp
4446 c3/return
4447
4448 test-convert-function-with-branches-in-named-block:
4449
4450 55/push-ebp
4451 89/<- %ebp 4/r32/esp
4452
4453 (clear-stream _test-input-stream)
4454 (clear-stream $_test-input-buffered-file->buffer)
4455 (clear-stream _test-output-stream)
4456 (clear-stream $_test-output-buffered-file->buffer)
4457
4458 (write _test-input-stream "fn foo x: int {\n")
4459 (write _test-input-stream " $bar: {\n")
4460 (write _test-input-stream " break-if->= $bar\n")
4461 (write _test-input-stream " loop-if-addr< $bar\n")
4462 (write _test-input-stream " increment x\n")
4463 (write _test-input-stream " loop\n")
4464 (write _test-input-stream " }\n")
4465 (write _test-input-stream "}\n")
4466
4467 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4468 (flush _test-output-buffered-file)
4469 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4475
4476 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-named-block/0")
4477 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-named-block/1")
4478 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-named-block/2")
4479 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-named-block/3")
4480 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/4")
4481 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-named-block/5")
4482 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/6")
4483 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-branches-in-named-block/7")
4484 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/8")
4485 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-named-block/9")
4486 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:break/disp32" "F - test-convert-function-with-branches-in-named-block/10")
4487 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/11")
4488 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/12")
4489 (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")
4490 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:loop/disp32" "F - test-convert-function-with-branches-in-named-block/14")
4491 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/15")
4492 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-named-block/16")
4493 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-named-block/17")
4494 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/18")
4495 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-branches-in-named-block/19")
4496 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/20")
4497 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-named-block/21")
4498 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-named-block/22")
4499 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-named-block/23")
4500 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-named-block/24")
4501 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-named-block/25")
4502
4503 89/<- %esp 5/r32/ebp
4504 5d/pop-to-ebp
4505 c3/return
4506
4507 test-convert-function-with-var-in-nested-block:
4508
4509 55/push-ebp
4510 89/<- %ebp 4/r32/esp
4511
4512 (clear-stream _test-input-stream)
4513 (clear-stream $_test-input-buffered-file->buffer)
4514 (clear-stream _test-output-stream)
4515 (clear-stream $_test-output-buffered-file->buffer)
4516
4517 (write _test-input-stream "fn foo x: int {\n")
4518 (write _test-input-stream " {\n")
4519 (write _test-input-stream " {\n")
4520 (write _test-input-stream " var x: int\n")
4521 (write _test-input-stream " increment x\n")
4522 (write _test-input-stream " }\n")
4523 (write _test-input-stream " }\n")
4524 (write _test-input-stream "}\n")
4525
4526 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4527 (flush _test-output-buffered-file)
4528 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4534
4535 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-var-in-nested-block/0")
4536 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-var-in-nested-block/1")
4537 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-var-in-nested-block/2")
4538 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-var-in-nested-block/3")
4539 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/4")
4540 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-var-in-nested-block/5")
4541 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/6")
4542 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-var-in-nested-block/7")
4543 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/8")
4544 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-var-in-nested-block/9")
4545 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-var-in-nested-block/10")
4546 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-var-in-nested-block/11")
4547 (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")
4548 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/13")
4549 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-var-in-nested-block/14")
4550 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/15")
4551 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-var-in-nested-block/16")
4552 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/17")
4553 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-var-in-nested-block/18")
4554 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-var-in-nested-block/19")
4555 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-var-in-nested-block/20")
4556 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-var-in-nested-block/21")
4557 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-var-in-nested-block/22")
4558
4559 89/<- %esp 5/r32/ebp
4560 5d/pop-to-ebp
4561 c3/return
4562
4563 test-convert-function-with-multiple-vars-in-nested-blocks:
4564
4565 55/push-ebp
4566 89/<- %ebp 4/r32/esp
4567
4568 (clear-stream _test-input-stream)
4569 (clear-stream $_test-input-buffered-file->buffer)
4570 (clear-stream _test-output-stream)
4571 (clear-stream $_test-output-buffered-file->buffer)
4572
4573 (write _test-input-stream "fn foo x: int {\n")
4574 (write _test-input-stream " {\n")
4575 (write _test-input-stream " var x/eax: int <- copy 0\n")
4576 (write _test-input-stream " {\n")
4577 (write _test-input-stream " var y: int\n")
4578 (write _test-input-stream " x <- add y\n")
4579 (write _test-input-stream " }\n")
4580 (write _test-input-stream " }\n")
4581 (write _test-input-stream "}\n")
4582
4583 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4584 (flush _test-output-buffered-file)
4585 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4591
4592 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/0")
4593 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/1")
4594 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/2")
4595 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/3")
4596 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/4")
4597 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/5")
4598 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/6")
4599 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/7")
4600 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/8")
4601 (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")
4602 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/10")
4603 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/11")
4604 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/12")
4605 (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")
4606 (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")
4607 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/15")
4608 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/16")
4609 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/17")
4610 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/18")
4611 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/19")
4612 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/20")
4613 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/21")
4614 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/22")
4615 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/23")
4616 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/24")
4617 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-multiple-vars-in-nested-blocks/25")
4618
4619 89/<- %esp 5/r32/ebp
4620 5d/pop-to-ebp
4621 c3/return
4622
4623 test-convert-function-with-branches-and-local-vars:
4624
4625
4626
4627
4628 55/push-ebp
4629 89/<- %ebp 4/r32/esp
4630
4631 (clear-stream _test-input-stream)
4632 (clear-stream $_test-input-buffered-file->buffer)
4633 (clear-stream _test-output-stream)
4634 (clear-stream $_test-output-buffered-file->buffer)
4635
4636 (write _test-input-stream "fn foo {\n")
4637 (write _test-input-stream " {\n")
4638 (write _test-input-stream " var x: int\n")
4639 (write _test-input-stream " break-if->=\n")
4640 (write _test-input-stream " increment x\n")
4641 (write _test-input-stream " }\n")
4642 (write _test-input-stream "}\n")
4643
4644 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4645 (flush _test-output-buffered-file)
4646 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4652
4653 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-local-vars/0")
4654 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-local-vars/1")
4655 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-local-vars/2")
4656 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-local-vars/3")
4657 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/4")
4658 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-local-vars/5")
4659 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/6")
4660 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-local-vars/7")
4661 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-local-vars/8")
4662 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/9")
4663 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-local-vars/10")
4664 (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")
4665 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-local-vars/12")
4666 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/13")
4667 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-local-vars/14")
4668 (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")
4669 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/16")
4670 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-local-vars/17")
4671 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/18")
4672 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-local-vars/19")
4673 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-local-vars/20")
4674 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-local-vars/21")
4675 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-local-vars/22")
4676 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-local-vars/23")
4677
4678 89/<- %esp 5/r32/ebp
4679 5d/pop-to-ebp
4680 c3/return
4681
4682 test-convert-function-with-conditional-loops-and-local-vars:
4683
4684
4685
4686
4687 55/push-ebp
4688 89/<- %ebp 4/r32/esp
4689
4690 (clear-stream _test-input-stream)
4691 (clear-stream $_test-input-buffered-file->buffer)
4692 (clear-stream _test-output-stream)
4693 (clear-stream $_test-output-buffered-file->buffer)
4694
4695 (write _test-input-stream "fn foo {\n")
4696 (write _test-input-stream " {\n")
4697 (write _test-input-stream " var x: int\n")
4698 (write _test-input-stream " loop-if->=\n")
4699 (write _test-input-stream " increment x\n")
4700 (write _test-input-stream " }\n")
4701 (write _test-input-stream "}\n")
4702
4703 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4704 (flush _test-output-buffered-file)
4705 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4711
4712 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-conditional-loops-and-local-vars/0")
4713 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-conditional-loops-and-local-vars/1")
4714 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/2")
4715 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-conditional-loops-and-local-vars/3")
4716 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/4")
4717 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/5")
4718 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/6")
4719 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/7")
4720 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/8")
4721 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/9")
4722 (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")
4723 (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")
4724 (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")
4725 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/13")
4726 (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")
4727 (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")
4728 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/16")
4729 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/17")
4730 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/18")
4731 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/19")
4732 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-conditional-loops-and-local-vars/20")
4733 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/21")
4734 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/22")
4735 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-conditional-loops-and-local-vars/23")
4736
4737 89/<- %esp 5/r32/ebp
4738 5d/pop-to-ebp
4739 c3/return
4740
4741 test-convert-function-with-unconditional-loops-and-local-vars:
4742
4743
4744
4745
4746 55/push-ebp
4747 89/<- %ebp 4/r32/esp
4748
4749 (clear-stream _test-input-stream)
4750 (clear-stream $_test-input-buffered-file->buffer)
4751 (clear-stream _test-output-stream)
4752 (clear-stream $_test-output-buffered-file->buffer)
4753
4754 (write _test-input-stream "fn foo {\n")
4755 (write _test-input-stream " {\n")
4756 (write _test-input-stream " var x: int\n")
4757 (write _test-input-stream " loop\n")
4758 (write _test-input-stream " increment x\n")
4759 (write _test-input-stream " }\n")
4760 (write _test-input-stream "}\n")
4761
4762 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4763 (flush _test-output-buffered-file)
4764 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4770
4771 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-loops-and-local-vars/0")
4772 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-loops-and-local-vars/1")
4773 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/2")
4774 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-loops-and-local-vars/3")
4775 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/4")
4776 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/5")
4777 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/6")
4778 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/7")
4779 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/8")
4780 (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")
4781 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-unconditional-loops-and-local-vars/10")
4782
4783 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/11")
4784 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/12")
4785 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/13")
4786 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/14")
4787 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-loops-and-local-vars/15")
4788 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/16")
4789 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/17")
4790 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-loops-and-local-vars/18")
4791
4792 89/<- %esp 5/r32/ebp
4793 5d/pop-to-ebp
4794 c3/return
4795
4796 test-convert-function-with-branches-and-loops-and-local-vars:
4797
4798 55/push-ebp
4799 89/<- %ebp 4/r32/esp
4800
4801 (clear-stream _test-input-stream)
4802 (clear-stream $_test-input-buffered-file->buffer)
4803 (clear-stream _test-output-stream)
4804 (clear-stream $_test-output-buffered-file->buffer)
4805
4806 (write _test-input-stream "fn foo {\n")
4807 (write _test-input-stream " {\n")
4808 (write _test-input-stream " var x: int\n")
4809 (write _test-input-stream " break-if->=\n")
4810 (write _test-input-stream " increment x\n")
4811 (write _test-input-stream " loop\n")
4812 (write _test-input-stream " }\n")
4813 (write _test-input-stream "}\n")
4814
4815 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4816 (flush _test-output-buffered-file)
4817 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4823
4824 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-loops-and-local-vars/0")
4825 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-loops-and-local-vars/1")
4826 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/2")
4827 (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")
4828 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/4")
4829 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/5")
4830 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/6")
4831 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/7")
4832 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/8")
4833 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/9")
4834 (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")
4835 (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")
4836 (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")
4837 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/13")
4838 (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")
4839 (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")
4840 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/16")
4841 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/17")
4842 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/18")
4843 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/19")
4844 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/20")
4845 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-loops-and-local-vars/21")
4846 (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")
4847 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/23")
4848 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-loops-and-local-vars/24")
4849
4850 89/<- %esp 5/r32/ebp
4851 5d/pop-to-ebp
4852 c3/return
4853
4854 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars:
4855
4856 55/push-ebp
4857 89/<- %ebp 4/r32/esp
4858
4859 (clear-stream _test-input-stream)
4860 (clear-stream $_test-input-buffered-file->buffer)
4861 (clear-stream _test-output-stream)
4862 (clear-stream $_test-output-buffered-file->buffer)
4863
4864 (write _test-input-stream "fn foo {\n")
4865 (write _test-input-stream " a: {\n")
4866 (write _test-input-stream " var x: int\n")
4867 (write _test-input-stream " {\n")
4868 (write _test-input-stream " var y: int\n")
4869 (write _test-input-stream " break-if->= a\n")
4870 (write _test-input-stream " increment x\n")
4871 (write _test-input-stream " loop\n")
4872 (write _test-input-stream " }\n")
4873 (write _test-input-stream " }\n")
4874 (write _test-input-stream "}\n")
4875
4876 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4877 (flush _test-output-buffered-file)
4878 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4884
4885 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/0")
4886 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/1")
4887 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/2")
4888 (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")
4889 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/4")
4890 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/5")
4891 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/6")
4892 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/7")
4893 (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")
4894 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/9")
4895 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/10")
4896 (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")
4897 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/12")
4898 (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")
4899 (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")
4900 (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")
4901 (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")
4902 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/17")
4903 (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")
4904 (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")
4905 (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")
4906 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/21")
4907 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/22")
4908 (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")
4909 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/24")
4910 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/25")
4911 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/26")
4912 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/27")
4913 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/28")
4914 (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")
4915 (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")
4916 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/31")
4917
4918 89/<- %esp 5/r32/ebp
4919 5d/pop-to-ebp
4920 c3/return
4921
4922 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2:
4923
4924 55/push-ebp
4925 89/<- %ebp 4/r32/esp
4926
4927 (clear-stream _test-input-stream)
4928 (clear-stream $_test-input-buffered-file->buffer)
4929 (clear-stream _test-output-stream)
4930 (clear-stream $_test-output-buffered-file->buffer)
4931
4932
4933 (write _test-input-stream "fn foo {\n")
4934 (write _test-input-stream " a: {\n")
4935 (write _test-input-stream " var x: int\n")
4936 (write _test-input-stream " {\n")
4937 (write _test-input-stream " break-if->= a\n")
4938 (write _test-input-stream " }\n")
4939 (write _test-input-stream " }\n")
4940 (write _test-input-stream "}\n")
4941
4942 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4943 (flush _test-output-buffered-file)
4944 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4950
4951 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/0")
4952 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/1")
4953 (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")
4954 (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")
4955 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/4")
4956 (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")
4957 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/6")
4958 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/7")
4959 (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")
4960 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/9")
4961 (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")
4962 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/11")
4963 (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")
4964 (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")
4965 (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")
4966 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/15")
4967 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/16")
4968 (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")
4969 (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")
4970 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/19")
4971 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/20")
4972 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/21")
4973 (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")
4974 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/23")
4975 (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")
4976 (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")
4977 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/26")
4978
4979 89/<- %esp 5/r32/ebp
4980 5d/pop-to-ebp
4981 c3/return
4982
4983 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3:
4984
4985 55/push-ebp
4986 89/<- %ebp 4/r32/esp
4987
4988 (clear-stream _test-input-stream)
4989 (clear-stream $_test-input-buffered-file->buffer)
4990 (clear-stream _test-output-stream)
4991 (clear-stream $_test-output-buffered-file->buffer)
4992
4993
4994 (write _test-input-stream "fn foo {\n")
4995 (write _test-input-stream " a: {\n")
4996 (write _test-input-stream " var x: int\n")
4997 (write _test-input-stream " {\n")
4998 (write _test-input-stream " break a\n")
4999 (write _test-input-stream " }\n")
5000 (write _test-input-stream " }\n")
5001 (write _test-input-stream "}\n")
5002
5003 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5004 (flush _test-output-buffered-file)
5005 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5011
5012 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/0")
5013 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/1")
5014 (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")
5015 (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")
5016 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/4")
5017 (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")
5018 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/6")
5019 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/7")
5020 (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")
5021 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/9")
5022 (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")
5023 (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")
5024 (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")
5025 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/14")
5026 (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")
5027 (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")
5028 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/17")
5029 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/18")
5030 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/19")
5031 (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")
5032 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/21")
5033 (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")
5034 (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")
5035 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/24")
5036
5037 89/<- %esp 5/r32/ebp
5038 5d/pop-to-ebp
5039 c3/return
5040
5041 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4:
5042
5043 55/push-ebp
5044 89/<- %ebp 4/r32/esp
5045
5046 (clear-stream _test-input-stream)
5047 (clear-stream $_test-input-buffered-file->buffer)
5048 (clear-stream _test-output-stream)
5049 (clear-stream $_test-output-buffered-file->buffer)
5050
5051 (write _test-input-stream "fn foo {\n")
5052 (write _test-input-stream " a: {\n")
5053 (write _test-input-stream " var x/esi: int <- copy 0\n")
5054 (write _test-input-stream " {\n")
5055 (write _test-input-stream " break a\n")
5056 (write _test-input-stream " }\n")
5057 (write _test-input-stream " }\n")
5058 (write _test-input-stream "}\n")
5059
5060 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5061 (flush _test-output-buffered-file)
5062 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5068
5069 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/0")
5070 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/1")
5071 (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")
5072 (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")
5073 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/4")
5074 (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")
5075 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/6")
5076 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/7")
5077 (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")
5078 (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")
5079 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/10")
5080 (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")
5081 (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")
5082 (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")
5083 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/14")
5084 (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")
5085 (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")
5086 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/17")
5087 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/18")
5088 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/19")
5089 (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")
5090 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/21")
5091 (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")
5092 (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")
5093 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/24")
5094
5095 89/<- %esp 5/r32/ebp
5096 5d/pop-to-ebp
5097 c3/return
5098
5099 test-convert-function-with-nonlocal-unconditional-break-and-local-vars:
5100
5101 55/push-ebp
5102 89/<- %ebp 4/r32/esp
5103
5104 (clear-stream _test-input-stream)
5105 (clear-stream $_test-input-buffered-file->buffer)
5106 (clear-stream _test-output-stream)
5107 (clear-stream $_test-output-buffered-file->buffer)
5108
5109 (write _test-input-stream "fn foo {\n")
5110 (write _test-input-stream " a: {\n")
5111 (write _test-input-stream " var x: int\n")
5112 (write _test-input-stream " {\n")
5113 (write _test-input-stream " var y: int\n")
5114 (write _test-input-stream " break a\n")
5115 (write _test-input-stream " increment x\n")
5116 (write _test-input-stream " }\n")
5117 (write _test-input-stream " }\n")
5118 (write _test-input-stream "}\n")
5119
5120 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5121 (flush _test-output-buffered-file)
5122 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5128
5129 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/0")
5130 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/1")
5131 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/2")
5132 (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")
5133 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/4")
5134 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/5")
5135 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/6")
5136 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/7")
5137 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/8")
5138 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/9")
5139 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/10")
5140 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/11")
5141 (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")
5142 (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")
5143 (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")
5144 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/15")
5145 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/16")
5146 (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")
5147 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/18")
5148 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/19")
5149 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/20")
5150 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/21")
5151 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/22")
5152 (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")
5153 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/24")
5154 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/25")
5155
5156 89/<- %esp 5/r32/ebp
5157 5d/pop-to-ebp
5158 c3/return
5159
5160 test-convert-function-with-unconditional-break-and-local-vars:
5161
5162 55/push-ebp
5163 89/<- %ebp 4/r32/esp
5164
5165 (clear-stream _test-input-stream)
5166 (clear-stream $_test-input-buffered-file->buffer)
5167 (clear-stream _test-output-stream)
5168 (clear-stream $_test-output-buffered-file->buffer)
5169
5170 (write _test-input-stream "fn foo {\n")
5171 (write _test-input-stream " {\n")
5172 (write _test-input-stream " var x: int\n")
5173 (write _test-input-stream " {\n")
5174 (write _test-input-stream " var y: int\n")
5175 (write _test-input-stream " break\n")
5176 (write _test-input-stream " increment x\n")
5177 (write _test-input-stream " }\n")
5178 (write _test-input-stream " }\n")
5179 (write _test-input-stream "}\n")
5180
5181 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5182 (flush _test-output-buffered-file)
5183 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5189
5190 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-break-and-local-vars/0")
5191 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-break-and-local-vars/1")
5192 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/2")
5193 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-break-and-local-vars/3")
5194 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/4")
5195 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/5")
5196 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/6")
5197 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/7")
5198 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/8")
5199 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/9")
5200 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/10")
5201 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/11")
5202 (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")
5203 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/13")
5204 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/14")
5205 (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")
5206 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/16")
5207 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/17")
5208 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/18")
5209 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/19")
5210 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-break-and-local-vars/20")
5211 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/21")
5212 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/22")
5213 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-break-and-local-vars/23")
5214
5215 89/<- %esp 5/r32/ebp
5216 5d/pop-to-ebp
5217 c3/return
5218
5219 test-convert-function-with-nonlocal-unconditional-loop-and-local-vars:
5220
5221 55/push-ebp
5222 89/<- %ebp 4/r32/esp
5223
5224 (clear-stream _test-input-stream)
5225 (clear-stream $_test-input-buffered-file->buffer)
5226 (clear-stream _test-output-stream)
5227 (clear-stream $_test-output-buffered-file->buffer)
5228
5229 (write _test-input-stream "fn foo {\n")
5230 (write _test-input-stream " a: {\n")
5231 (write _test-input-stream " var x: int\n")
5232 (write _test-input-stream " {\n")
5233 (write _test-input-stream " var y: int\n")
5234 (write _test-input-stream " loop a\n")
5235 (write _test-input-stream " increment x\n")
5236 (write _test-input-stream " }\n")
5237 (write _test-input-stream " }\n")
5238 (write _test-input-stream "}\n")
5239
5240 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5241 (flush _test-output-buffered-file)
5242 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5248
5249 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/0")
5250 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/1")
5251 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/2")
5252 (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")
5253 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/4")
5254 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/5")
5255 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/6")
5256 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/7")
5257 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/8")
5258 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/9")
5259 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/10")
5260 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/11")
5261 (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")
5262 (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")
5263 (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")
5264 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/15")
5265 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/16")
5266 (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")
5267 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/18")
5268 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/19")
5269 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/20")
5270 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/21")
5271 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/22")
5272 (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")
5273 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/24")
5274 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/25")
5275
5276 89/<- %esp 5/r32/ebp
5277 5d/pop-to-ebp
5278 c3/return
5279
5280 test-convert-function-with-local-array-var-in-mem:
5281
5282 55/push-ebp
5283 89/<- %ebp 4/r32/esp
5284
5285 (clear-stream _test-input-stream)
5286 (clear-stream $_test-input-buffered-file->buffer)
5287 (clear-stream _test-output-stream)
5288 (clear-stream $_test-output-buffered-file->buffer)
5289
5290 (write _test-input-stream "fn foo {\n")
5291 (write _test-input-stream " var x: (array int 3)\n")
5292 (write _test-input-stream "}\n")
5293
5294 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5295 (flush _test-output-buffered-file)
5296 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5302
5303 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-var-in-mem/0")
5304 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-var-in-mem/1")
5305 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-var-in-mem/2")
5306 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-var-in-mem/3")
5307 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-var-in-mem/4")
5308 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-var-in-mem/5")
5309
5310 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-function-with-local-array-var-in-mem/7")
5311 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-function-with-local-array-var-in-mem/8")
5312
5313 (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")
5314
5315 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-var-in-mem/10")
5316 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-var-in-mem/11")
5317 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-var-in-mem/12")
5318 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-var-in-mem/13")
5319 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-var-in-mem/14")
5320 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-var-in-mem/15")
5321
5322 89/<- %esp 5/r32/ebp
5323 5d/pop-to-ebp
5324 c3/return
5325
5326 test-array-size-in-hex:
5327
5328 55/push-ebp
5329 89/<- %ebp 4/r32/esp
5330
5331 (clear-stream _test-input-stream)
5332 (clear-stream $_test-input-buffered-file->buffer)
5333 (clear-stream _test-output-stream)
5334 (clear-stream $_test-output-buffered-file->buffer)
5335 (clear-stream _test-error-stream)
5336 (clear-stream $_test-error-buffered-file->buffer)
5337
5338 68/push 0/imm32
5339 68/push 0/imm32
5340 89/<- %edx 4/r32/esp
5341 (tailor-exit-descriptor %edx 0x10)
5342
5343 (write _test-input-stream "fn foo {\n")
5344 (write _test-input-stream " var x: (array int 10)\n")
5345 (write _test-input-stream "}\n")
5346
5347 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5348
5349
5350 89/<- %edx 4/r32/esp
5351 (flush _test-output-buffered-file)
5352 (flush _test-error-buffered-file)
5353 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5359
5360 (check-stream-equal _test-output-stream "" "F - test-array-size-in-hex: output should be empty")
5361 (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")
5362
5363 (check-ints-equal *(edx+4) 2 "F - test-array-size-in-hex: exit status")
5364
5365 81 0/subop/add %esp 8/imm32
5366
5367 5d/pop-to-ebp
5368 c3/return
5369
5370 test-convert-function-with-populate:
5371
5372 55/push-ebp
5373 89/<- %ebp 4/r32/esp
5374
5375 (clear-stream _test-input-stream)
5376 (clear-stream $_test-input-buffered-file->buffer)
5377 (clear-stream _test-output-stream)
5378 (clear-stream $_test-output-buffered-file->buffer)
5379
5380 (write _test-input-stream "fn foo {\n")
5381 (write _test-input-stream " var x/ecx: (addr handle array int) <- copy 0\n")
5382 (write _test-input-stream " populate x, 7\n")
5383 (write _test-input-stream "}\n")
5384
5385 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5386 (flush _test-output-buffered-file)
5387 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5393
5394 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-populate/0")
5395 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-populate/1")
5396 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-populate/2")
5397 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-populate/3")
5398 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-populate/4")
5399 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-populate/5")
5400 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-populate/6")
5401 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-populate/7")
5402 (check-next-stream-line-equal _test-output-stream " (allocate-array2 Heap 0x00000004 7 %ecx)" "F - test-convert-function-with-populate/8")
5403 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-populate/9")
5404 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-populate/10")
5405 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-populate/11")
5406 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-populate/12")
5407 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-populate/13")
5408 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-populate/14")
5409 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-populate/15")
5410
5411 89/<- %esp 5/r32/ebp
5412 5d/pop-to-ebp
5413 c3/return
5414
5415
5416 test-convert-function-with-local-array-of-bytes-in-mem:
5417
5418 55/push-ebp
5419 89/<- %ebp 4/r32/esp
5420
5421 (clear-stream _test-input-stream)
5422 (clear-stream $_test-input-buffered-file->buffer)
5423 (clear-stream _test-output-stream)
5424 (clear-stream $_test-output-buffered-file->buffer)
5425
5426 (write _test-input-stream "fn foo {\n")
5427 (write _test-input-stream " var x: (array byte 3)\n")
5428 (write _test-input-stream "}\n")
5429
5430 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5431 (flush _test-output-buffered-file)
5432 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5438
5439 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-of-bytes-in-mem/0")
5440 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-of-bytes-in-mem/1")
5441 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/2")
5442 (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")
5443 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-of-bytes-in-mem/4")
5444 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-of-bytes-in-mem/5")
5445
5446 (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")
5447 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/8")
5448
5449 (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")
5450
5451 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-of-bytes-in-mem/10")
5452 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-of-bytes-in-mem/11")
5453 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-of-bytes-in-mem/12")
5454 (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")
5455 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/14")
5456 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-of-bytes-in-mem/15")
5457
5458 89/<- %esp 5/r32/ebp
5459 5d/pop-to-ebp
5460 c3/return
5461
5462 test-convert-address:
5463
5464 55/push-ebp
5465 89/<- %ebp 4/r32/esp
5466
5467 (clear-stream _test-input-stream)
5468 (clear-stream $_test-input-buffered-file->buffer)
5469 (clear-stream _test-output-stream)
5470 (clear-stream $_test-output-buffered-file->buffer)
5471
5472 (write _test-input-stream "fn foo {\n")
5473 (write _test-input-stream " var a: int\n")
5474 (write _test-input-stream " var b/eax: (addr int) <- address a\n")
5475 (write _test-input-stream "}\n")
5476
5477 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5478 (flush _test-output-buffered-file)
5479 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5485
5486 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-address/0")
5487 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-address/1")
5488 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-address/2")
5489 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-address/3")
5490 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-address/4")
5491 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-address/5")
5492 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-address/6")
5493 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-address/7")
5494 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-address/8")
5495 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-address/9")
5496 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-address/10")
5497 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-address/11")
5498 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-address/12")
5499 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-address/13")
5500 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-address/14")
5501 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-address/15")
5502 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-address/16")
5503
5504 89/<- %esp 5/r32/ebp
5505 5d/pop-to-ebp
5506 c3/return
5507
5508 test-convert-floating-point-convert:
5509
5510 55/push-ebp
5511 89/<- %ebp 4/r32/esp
5512
5513 (clear-stream _test-input-stream)
5514 (clear-stream $_test-input-buffered-file->buffer)
5515 (clear-stream _test-output-stream)
5516 (clear-stream $_test-output-buffered-file->buffer)
5517
5518 (write _test-input-stream "fn foo {\n")
5519 (write _test-input-stream " var a/eax: int <- copy 0\n")
5520 (write _test-input-stream " var b/xmm1: float <- convert a\n")
5521 (write _test-input-stream "}\n")
5522
5523 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5524 (flush _test-output-buffered-file)
5525 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5531
5532 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert/0")
5533 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert/1")
5534 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert/2")
5535 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert/3")
5536 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert/4")
5537 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert/5")
5538 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert/6")
5539 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert/7")
5540 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert/8")
5541 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert/9")
5542 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-floating-point-convert/10")
5543 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert/11")
5544 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert/12")
5545 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert/13")
5546 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert/14")
5547 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert/15")
5548 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert/16")
5549 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert/17")
5550 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert/18")
5551 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert/19")
5552
5553 89/<- %esp 5/r32/ebp
5554 5d/pop-to-ebp
5555 c3/return
5556
5557 test-convert-floating-point-convert-2:
5558
5559 55/push-ebp
5560 89/<- %ebp 4/r32/esp
5561
5562 (clear-stream _test-input-stream)
5563 (clear-stream $_test-input-buffered-file->buffer)
5564 (clear-stream _test-output-stream)
5565 (clear-stream $_test-output-buffered-file->buffer)
5566
5567 (write _test-input-stream "fn foo {\n")
5568 (write _test-input-stream " var a/eax: int <- copy 0\n")
5569 (write _test-input-stream " var b/xmm1: float <- convert a\n")
5570 (write _test-input-stream " a <- convert b\n")
5571 (write _test-input-stream "}\n")
5572
5573 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5574 (flush _test-output-buffered-file)
5575 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5581
5582 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert-2/0")
5583 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert-2/1")
5584 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert-2/2")
5585 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert-2/3")
5586 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert-2/4")
5587 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert-2/5")
5588 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert-2/6")
5589 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert-2/7")
5590 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert-2/8")
5591 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert-2/9")
5592 (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")
5593 (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")
5594 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert-2/12")
5595 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert-2/13")
5596 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert-2/14")
5597 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert-2/15")
5598 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert-2/16")
5599 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert-2/17")
5600 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert-2/18")
5601 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert-2/19")
5602 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert-2/20")
5603
5604 89/<- %esp 5/r32/ebp
5605 5d/pop-to-ebp
5606 c3/return
5607
5608 test-convert-floating-point-operation:
5609
5610 55/push-ebp
5611 89/<- %ebp 4/r32/esp
5612
5613 (clear-stream _test-input-stream)
5614 (clear-stream $_test-input-buffered-file->buffer)
5615 (clear-stream _test-output-stream)
5616 (clear-stream $_test-output-buffered-file->buffer)
5617
5618 (write _test-input-stream "fn f {\n")
5619 (write _test-input-stream " var m: float\n")
5620 (write _test-input-stream " var x/xmm1: float <- copy m\n")
5621 (write _test-input-stream " var y/xmm5: float <- copy m\n")
5622 (write _test-input-stream " x <- copy y\n")
5623 (write _test-input-stream " copy-to m, y\n")
5624 (write _test-input-stream " x <- add y\n")
5625 (write _test-input-stream " x <- add m\n")
5626 (write _test-input-stream " x <- subtract y\n")
5627 (write _test-input-stream " x <- subtract m\n")
5628 (write _test-input-stream " x <- multiply y\n")
5629 (write _test-input-stream " x <- multiply m\n")
5630 (write _test-input-stream " x <- divide y\n")
5631 (write _test-input-stream " x <- divide m\n")
5632 (write _test-input-stream " x <- reciprocal y\n")
5633 (write _test-input-stream " x <- reciprocal m\n")
5634 (write _test-input-stream " x <- square-root y\n")
5635 (write _test-input-stream " x <- square-root m\n")
5636 (write _test-input-stream " x <- inverse-square-root y\n")
5637 (write _test-input-stream " x <- inverse-square-root m\n")
5638 (write _test-input-stream " x <- max y\n")
5639 (write _test-input-stream " x <- max m\n")
5640 (write _test-input-stream " x <- min y\n")
5641 (write _test-input-stream " x <- min m\n")
5642 (write _test-input-stream " compare x, y\n")
5643 (write _test-input-stream " compare x, m\n")
5644 (write _test-input-stream "}\n")
5645
5646 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5647 (flush _test-output-buffered-file)
5648 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5654
5655 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-operation/0")
5656 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-operation/1")
5657 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-operation/2")
5658 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-operation/3")
5659 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-operation/4")
5660 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-operation/5")
5661 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-operation/6")
5662 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/7")
5663 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-operation/8")
5664 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/9")
5665 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/10")
5666 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 5/x32" "F - test-convert-floating-point-operation/11")
5667 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/12")
5668 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy %xmm1 0x00000005/x32" "F - test-convert-floating-point-operation/13")
5669 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/14")
5670 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/15")
5671 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/16")
5672 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/17")
5673 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/18")
5674 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/19")
5675 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/20")
5676 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/21")
5677 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/22")
5678 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/23")
5679 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/24")
5680 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/25")
5681 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/26")
5682 (check-next-stream-line-equal _test-output-stream " f3 0f 52/inverse-square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/27")
5683 (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")
5684 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/29")
5685 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/30")
5686 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/31")
5687 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/32")
5688 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare %xmm1 0x00000005/x32" "F - test-convert-floating-point-operation/33")
5689 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/34")
5690 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 5/x32" "F - test-convert-floating-point-operation/35")
5691 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/36")
5692 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-operation/37")
5693 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/38")
5694 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-operation/39")
5695 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-operation/40")
5696 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-operation/41")
5697 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-operation/42")
5698 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-operation/43")
5699 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-operation/44")
5700 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-operation/45")
5701
5702 89/<- %esp 5/r32/ebp
5703 5d/pop-to-ebp
5704 c3/return
5705
5706 test-convert-floating-point-dereferenced:
5707
5708 55/push-ebp
5709 89/<- %ebp 4/r32/esp
5710
5711 (clear-stream _test-input-stream)
5712 (clear-stream $_test-input-buffered-file->buffer)
5713 (clear-stream _test-output-stream)
5714 (clear-stream $_test-output-buffered-file->buffer)
5715
5716 (write _test-input-stream "fn f {\n")
5717 (write _test-input-stream " var m: float\n")
5718 (write _test-input-stream " var x/xmm1: float <- copy m\n")
5719 (write _test-input-stream " var y/eax: (addr float) <- copy 0\n")
5720 (write _test-input-stream " x <- multiply *y\n")
5721 (write _test-input-stream "}\n")
5722
5723 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5724 (flush _test-output-buffered-file)
5725 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5731
5732 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-dereferenced/0")
5733 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-dereferenced/1")
5734 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-dereferenced/2")
5735 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-dereferenced/3")
5736 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-dereferenced/4")
5737 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-dereferenced/5")
5738 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-dereferenced/6")
5739 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-dereferenced/7")
5740 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-dereferenced/8")
5741 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-dereferenced/9")
5742 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-dereferenced/10")
5743 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-dereferenced/11")
5744 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *eax 0x00000001/x32" "F - test-convert-floating-point-dereferenced/12")
5745 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-dereferenced/13")
5746 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-dereferenced/14")
5747 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
5748 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-dereferenced/16")
5749 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-dereferenced/17")
5750 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-dereferenced/18")
5751 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-dereferenced/19")
5752 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-dereferenced/20")
5753 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-dereferenced/21")
5754 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-dereferenced/22")
5755
5756 89/<- %esp 5/r32/ebp
5757 5d/pop-to-ebp
5758 c3/return
5759
5760 test-convert-length-of-array:
5761
5762 55/push-ebp
5763 89/<- %ebp 4/r32/esp
5764
5765 (clear-stream _test-input-stream)
5766 (clear-stream $_test-input-buffered-file->buffer)
5767 (clear-stream _test-output-stream)
5768 (clear-stream $_test-output-buffered-file->buffer)
5769
5770 (write _test-input-stream "fn foo a: (addr array int) {\n")
5771 (write _test-input-stream " var b/eax: (addr array int) <- copy a\n")
5772 (write _test-input-stream " var c/eax: int <- length b\n")
5773 (write _test-input-stream "}\n")
5774
5775 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5776 (flush _test-output-buffered-file)
5777 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5783
5784 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array/0")
5785 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array/1")
5786 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array/2")
5787 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array/3")
5788 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array/4")
5789 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array/5")
5790 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array/6")
5791 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array/7")
5792 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array/8")
5793 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array/9")
5794 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array/10")
5795 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array/11")
5796 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array/12")
5797 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array/13")
5798 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array/14")
5799 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array/15")
5800 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array/16")
5801
5802 89/<- %esp 5/r32/ebp
5803 5d/pop-to-ebp
5804 c3/return
5805
5806
5807 test-convert-length-of-array-of-bytes:
5808
5809 55/push-ebp
5810 89/<- %ebp 4/r32/esp
5811
5812 (clear-stream _test-input-stream)
5813 (clear-stream $_test-input-buffered-file->buffer)
5814 (clear-stream _test-output-stream)
5815 (clear-stream $_test-output-buffered-file->buffer)
5816
5817 (write _test-input-stream "fn foo a: (addr array byte) {\n")
5818 (write _test-input-stream " var b/eax: (addr array byte) <- copy a\n")
5819 (write _test-input-stream " var c/eax: int <- length b\n")
5820 (write _test-input-stream "}\n")
5821
5822 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5823 (flush _test-output-buffered-file)
5824 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5830
5831 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-bytes/0")
5832 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-bytes/1")
5833 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-bytes/2")
5834 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-bytes/3")
5835 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-bytes/4")
5836 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-bytes/5")
5837 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-bytes/6")
5838 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/7")
5839 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/8")
5840 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-bytes/9")
5841 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-bytes/10")
5842 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-bytes/11")
5843 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-bytes/12")
5844 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-bytes/13")
5845 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-bytes/14")
5846 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-bytes/15")
5847
5848 89/<- %esp 5/r32/ebp
5849 5d/pop-to-ebp
5850 c3/return
5851
5852 test-convert-length-of-array-on-stack:
5853
5854 55/push-ebp
5855 89/<- %ebp 4/r32/esp
5856
5857 (clear-stream _test-input-stream)
5858 (clear-stream $_test-input-buffered-file->buffer)
5859 (clear-stream _test-output-stream)
5860 (clear-stream $_test-output-buffered-file->buffer)
5861
5862 (write _test-input-stream "fn foo {\n")
5863 (write _test-input-stream " var a: (array int 3)\n")
5864 (write _test-input-stream " var b/eax: int <- length a\n")
5865 (write _test-input-stream "}\n")
5866
5867 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5868 (flush _test-output-buffered-file)
5869 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5875
5876 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-on-stack/0")
5877 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-on-stack/1")
5878 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-on-stack/2")
5879 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-on-stack/3")
5880 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-on-stack/4")
5881 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-on-stack/5")
5882
5883 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-length-of-array-on-stack/6")
5884 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-length-of-array-on-stack/7")
5885 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-on-stack/8")
5886 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff0) 0x00000000/r32" "F - test-convert-length-of-array-on-stack/9")
5887 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array-on-stack/10")
5888 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-on-stack/11")
5889 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-length-of-array-on-stack/12")
5890 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-on-stack/13")
5891 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-on-stack/14")
5892 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-on-stack/15")
5893 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-on-stack/16")
5894 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-on-stack/17")
5895 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-on-stack/18")
5896
5897 89/<- %esp 5/r32/ebp
5898 5d/pop-to-ebp
5899 c3/return
5900
5901 test-reg-var-def-with-read-of-same-register:
5902
5903 55/push-ebp
5904 89/<- %ebp 4/r32/esp
5905
5906 (clear-stream _test-input-stream)
5907 (clear-stream $_test-input-buffered-file->buffer)
5908 (clear-stream _test-output-stream)
5909 (clear-stream $_test-output-buffered-file->buffer)
5910 (clear-stream _test-error-stream)
5911 (clear-stream $_test-error-buffered-file->buffer)
5912
5913 68/push 0/imm32
5914 68/push 0/imm32
5915 89/<- %edx 4/r32/esp
5916 (tailor-exit-descriptor %edx 0x10)
5917
5918 (write _test-input-stream "fn foo {\n")
5919 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5920 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5921 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
5922 (write _test-input-stream "}\n")
5923
5924 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5925
5926
5927 89/<- %edx 4/r32/esp
5928 (flush _test-output-buffered-file)
5929 (flush _test-error-buffered-file)
5930 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5936 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5942 (check-stream-equal _test-error-stream "" "F - test-reg-var-def-with-read-of-same-register: error stream should be empty")
5943
5944 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-reg-var-def-with-read-of-same-register/0")
5945 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-reg-var-def-with-read-of-same-register/1")
5946 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-reg-var-def-with-read-of-same-register/2")
5947 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-reg-var-def-with-read-of-same-register/3")
5948 (check-next-stream-line-equal _test-output-stream " {" "F - test-reg-var-def-with-read-of-same-register/4")
5949 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-reg-var-def-with-read-of-same-register/5")
5950 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-reg-var-def-with-read-of-same-register/6")
5951 (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")
5952 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-reg-var-def-with-read-of-same-register/8")
5953 (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")
5954 (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")
5955 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-reg-var-def-with-read-of-same-register/13")
5956 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-reg-var-def-with-read-of-same-register/14")
5957 (check-next-stream-line-equal _test-output-stream " }" "F - test-reg-var-def-with-read-of-same-register/15")
5958 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-reg-var-def-with-read-of-same-register/16")
5959 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-reg-var-def-with-read-of-same-register/17")
5960 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-reg-var-def-with-read-of-same-register/18")
5961 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-reg-var-def-with-read-of-same-register/19")
5962 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-reg-var-def-with-read-of-same-register/20")
5963
5964 81 0/subop/add %esp 8/imm32
5965
5966 5d/pop-to-ebp
5967 c3/return
5968
5969 test-convert-index-into-array:
5970
5971 55/push-ebp
5972 89/<- %ebp 4/r32/esp
5973
5974 (clear-stream _test-input-stream)
5975 (clear-stream $_test-input-buffered-file->buffer)
5976 (clear-stream _test-output-stream)
5977 (clear-stream $_test-output-buffered-file->buffer)
5978
5979 (write _test-input-stream "fn foo {\n")
5980 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5981 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5982 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
5983 (write _test-input-stream "}\n")
5984
5985 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5986 (flush _test-output-buffered-file)
5987 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5993
5994 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array/0")
5995 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array/1")
5996 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array/2")
5997 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array/3")
5998 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array/4")
5999 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array/5")
6000 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array/6")
6001 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array/7")
6002 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array/8")
6003 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array/9")
6004 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-convert-index-into-array/10")
6005 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array/11")
6006 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array/12")
6007 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array/13")
6008 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array/14")
6009 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array/15")
6010 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array/16")
6011 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array/17")
6012 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array/18")
6013
6014 89/<- %esp 5/r32/ebp
6015 5d/pop-to-ebp
6016 c3/return
6017
6018 test-convert-index-into-array-of-bytes:
6019
6020 55/push-ebp
6021 89/<- %ebp 4/r32/esp
6022
6023 (clear-stream _test-input-stream)
6024 (clear-stream $_test-input-buffered-file->buffer)
6025 (clear-stream _test-output-stream)
6026 (clear-stream $_test-output-buffered-file->buffer)
6027
6028 (write _test-input-stream "fn foo {\n")
6029 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6030 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6031 (write _test-input-stream " var x/eax: (addr byte) <- index arr, idx\n")
6032 (write _test-input-stream "}\n")
6033
6034 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6035 (flush _test-output-buffered-file)
6036 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6042
6043 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes/0")
6044 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes/1")
6045 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes/2")
6046 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes/3")
6047 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes/4")
6048 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes/5")
6049 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes/6")
6050 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes/7")
6051 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes/8")
6052 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes/9")
6053 (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")
6054 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes/13")
6055 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes/14")
6056 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes/15")
6057 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes/16")
6058 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes/17")
6059 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes/18")
6060 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes/19")
6061 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes/20")
6062
6063 89/<- %esp 5/r32/ebp
6064 5d/pop-to-ebp
6065 c3/return
6066
6067 test-convert-index-into-array-with-literal:
6068
6069 55/push-ebp
6070 89/<- %ebp 4/r32/esp
6071
6072 (clear-stream _test-input-stream)
6073 (clear-stream $_test-input-buffered-file->buffer)
6074 (clear-stream _test-output-stream)
6075 (clear-stream $_test-output-buffered-file->buffer)
6076
6077 (write _test-input-stream "fn foo {\n")
6078 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6079 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
6080 (write _test-input-stream "}\n")
6081
6082 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6083 (flush _test-output-buffered-file)
6084 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6090
6091 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-with-literal/0")
6092 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-with-literal/1")
6093 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-with-literal/2")
6094 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-with-literal/3")
6095 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-with-literal/4")
6096 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-with-literal/5")
6097 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-with-literal/6")
6098 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-with-literal/7")
6099
6100 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x0000000c) 0x00000000/r32" "F - test-convert-index-into-array-with-literal/8")
6101 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-with-literal/9")
6102 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-with-literal/10")
6103 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-with-literal/11")
6104 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-with-literal/12")
6105 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-with-literal/13")
6106 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-with-literal/14")
6107 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-with-literal/15")
6108
6109 89/<- %esp 5/r32/ebp
6110 5d/pop-to-ebp
6111 c3/return
6112
6113 test-convert-index-into-array-of-bytes-with-literal:
6114
6115 55/push-ebp
6116 89/<- %ebp 4/r32/esp
6117
6118 (clear-stream _test-input-stream)
6119 (clear-stream $_test-input-buffered-file->buffer)
6120 (clear-stream _test-output-stream)
6121 (clear-stream $_test-output-buffered-file->buffer)
6122
6123 (write _test-input-stream "fn foo {\n")
6124 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6125 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
6126 (write _test-input-stream "}\n")
6127
6128 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6129 (flush _test-output-buffered-file)
6130 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6136
6137 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-with-literal/0")
6138 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-with-literal/1")
6139 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/2")
6140 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-with-literal/3")
6141 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-with-literal/4")
6142 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-with-literal/5")
6143 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-with-literal/6")
6144 (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")
6145
6146 (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")
6147 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-with-literal/9")
6148 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-with-literal/10")
6149 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-with-literal/11")
6150 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-with-literal/12")
6151 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-with-literal/13")
6152 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/14")
6153 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-with-literal/15")
6154
6155 89/<- %esp 5/r32/ebp
6156 5d/pop-to-ebp
6157 c3/return
6158
6159 test-convert-index-into-array-on-stack:
6160
6161 55/push-ebp
6162 89/<- %ebp 4/r32/esp
6163
6164 (clear-stream _test-input-stream)
6165 (clear-stream $_test-input-buffered-file->buffer)
6166 (clear-stream _test-output-stream)
6167 (clear-stream $_test-output-buffered-file->buffer)
6168
6169 (write _test-input-stream "fn foo {\n")
6170 (write _test-input-stream " var arr: (array int 3)\n")
6171 (write _test-input-stream " var idx/eax: int <- copy 2\n")
6172 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
6173 (write _test-input-stream "}\n")
6174
6175 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6176 (flush _test-output-buffered-file)
6177 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6183
6184 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack/0")
6185 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack/1")
6186 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack/2")
6187 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack/3")
6188 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack/4")
6189 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack/5")
6190
6191 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack/6")
6192 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack/7")
6193
6194 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack/8")
6195 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 2/imm32" "F - test-convert-index-into-array-on-stack/9")
6196
6197 (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")
6198
6199 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack/11")
6200
6201 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack/12")
6202
6203 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack/13")
6204 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack/14")
6205 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack/15")
6206 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack/16")
6207 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack/17")
6208 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack/18")
6209
6210 89/<- %esp 5/r32/ebp
6211 5d/pop-to-ebp
6212 c3/return
6213
6214 test-convert-index-into-array-on-stack-with-literal:
6215
6216 55/push-ebp
6217 89/<- %ebp 4/r32/esp
6218
6219 (clear-stream _test-input-stream)
6220 (clear-stream $_test-input-buffered-file->buffer)
6221 (clear-stream _test-output-stream)
6222 (clear-stream $_test-output-buffered-file->buffer)
6223
6224 (write _test-input-stream "fn foo {\n")
6225 (write _test-input-stream " var arr: (array int 3)\n")
6226 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
6227 (write _test-input-stream "}\n")
6228
6229 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6230 (flush _test-output-buffered-file)
6231 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6237
6238 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack-with-literal/0")
6239 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack-with-literal/1")
6240 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack-with-literal/2")
6241 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack-with-literal/3")
6242 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack-with-literal/4")
6243 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack-with-literal/5")
6244
6245 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack-with-literal/6")
6246 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack-with-literal/7")
6247
6248 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack-with-literal/8")
6249
6250 (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")
6251
6252 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack-with-literal/10")
6253
6254 (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")
6255
6256 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack-with-literal/12")
6257 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack-with-literal/13")
6258 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack-with-literal/14")
6259 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack-with-literal/15")
6260 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack-with-literal/16")
6261 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack-with-literal/17")
6262
6263 89/<- %esp 5/r32/ebp
6264 5d/pop-to-ebp
6265 c3/return
6266
6267 test-convert-index-into-array-of-bytes-on-stack-with-literal:
6268
6269 55/push-ebp
6270 89/<- %ebp 4/r32/esp
6271
6272 (clear-stream _test-input-stream)
6273 (clear-stream $_test-input-buffered-file->buffer)
6274 (clear-stream _test-output-stream)
6275 (clear-stream $_test-output-buffered-file->buffer)
6276
6277 (write _test-input-stream "fn foo {\n")
6278 (write _test-input-stream " var arr: (array byte 3)\n")
6279 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
6280 (write _test-input-stream "}\n")
6281
6282 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6283 (flush _test-output-buffered-file)
6284 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6290
6291 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/0")
6292 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/1")
6293 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/2")
6294 (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")
6295 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/4")
6296 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/5")
6297
6298 (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")
6299 (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")
6300
6301 (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")
6302
6303 (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")
6304
6305 (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")
6306
6307 (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")
6308
6309 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/12")
6310 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/13")
6311 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/14")
6312 (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")
6313 (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")
6314 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/17")
6315
6316 89/<- %esp 5/r32/ebp
6317 5d/pop-to-ebp
6318 c3/return
6319
6320 test-convert-index-into-array-using-offset:
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 foo {\n")
6331 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6332 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6333 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
6334 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
6335 (write _test-input-stream "}\n")
6336
6337 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6338 (flush _test-output-buffered-file)
6339 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6345
6346 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset/0")
6347 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset/1")
6348 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset/2")
6349 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset/3")
6350 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset/4")
6351 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset/5")
6352 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset/6")
6353 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset/7")
6354 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset/8")
6355 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-using-offset/9")
6356 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset/10")
6357 (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")
6358 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset/12")
6359 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset/13")
6360 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset/14")
6361 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset/15")
6362 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset/16")
6363 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset/17")
6364 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset/18")
6365 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset/19")
6366
6367 89/<- %esp 5/r32/ebp
6368 5d/pop-to-ebp
6369 c3/return
6370
6371 test-convert-index-into-array-of-bytes-using-offset:
6372
6373 55/push-ebp
6374 89/<- %ebp 4/r32/esp
6375
6376 (clear-stream _test-input-stream)
6377 (clear-stream $_test-input-buffered-file->buffer)
6378 (clear-stream _test-output-stream)
6379 (clear-stream $_test-output-buffered-file->buffer)
6380
6381 (write _test-input-stream "fn foo {\n")
6382 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6383 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6384 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
6385 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
6386 (write _test-input-stream "}\n")
6387
6388 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6389 (flush _test-output-buffered-file)
6390 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6396
6397 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset/0")
6398 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset/1")
6399 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/2")
6400 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset/3")
6401 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset/4")
6402 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset/5")
6403 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset/6")
6404 (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")
6405 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/8")
6406 (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")
6407 (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")
6408 (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")
6409 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/12")
6410 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset/13")
6411 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset/14")
6412 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset/15")
6413 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset/16")
6414 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset/17")
6415 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/18")
6416 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset/19")
6417
6418 89/<- %esp 5/r32/ebp
6419 5d/pop-to-ebp
6420 c3/return
6421
6422 test-convert-index-into-array-using-offset-on-stack:
6423
6424 55/push-ebp
6425 89/<- %ebp 4/r32/esp
6426
6427 (clear-stream _test-input-stream)
6428 (clear-stream $_test-input-buffered-file->buffer)
6429 (clear-stream _test-output-stream)
6430 (clear-stream $_test-output-buffered-file->buffer)
6431
6432 (write _test-input-stream "fn foo {\n")
6433 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6434 (write _test-input-stream " var idx: int\n")
6435 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
6436 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
6437 (write _test-input-stream "}\n")
6438
6439 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6440 (flush _test-output-buffered-file)
6441 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6447
6448 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset-on-stack/0")
6449 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset-on-stack/1")
6450 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset-on-stack/2")
6451 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset-on-stack/3")
6452 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset-on-stack/4")
6453 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset-on-stack/5")
6454 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset-on-stack/6")
6455 (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")
6456 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/8")
6457 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset-on-stack/9")
6458 (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")
6459 (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")
6460 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset-on-stack/12")
6461 (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")
6462 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset-on-stack/14")
6463 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset-on-stack/15")
6464 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset-on-stack/16")
6465 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset-on-stack/17")
6466 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset-on-stack/18")
6467 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset-on-stack/19")
6468 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset-on-stack/20")
6469
6470 89/<- %esp 5/r32/ebp
6471 5d/pop-to-ebp
6472 c3/return
6473
6474 test-convert-index-into-array-of-bytes-using-offset-on-stack:
6475
6476 55/push-ebp
6477 89/<- %ebp 4/r32/esp
6478
6479 (clear-stream _test-input-stream)
6480 (clear-stream $_test-input-buffered-file->buffer)
6481 (clear-stream _test-output-stream)
6482 (clear-stream $_test-output-buffered-file->buffer)
6483
6484 (write _test-input-stream "fn foo {\n")
6485 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6486 (write _test-input-stream " var idx: int\n")
6487 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
6488 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
6489 (write _test-input-stream "}\n")
6490
6491 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6492 (flush _test-output-buffered-file)
6493 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6499
6500 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/0")
6501 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/1")
6502 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/2")
6503 (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")
6504 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/4")
6505 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/5")
6506 (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")
6507 (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")
6508 (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")
6509 (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")
6510 (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")
6511 (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")
6512 (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")
6513 (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")
6514 (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")
6515 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/15")
6516 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/16")
6517 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/17")
6518 (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")
6519 (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")
6520 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/20")
6521
6522 89/<- %esp 5/r32/ebp
6523 5d/pop-to-ebp
6524 c3/return
6525
6526 test-convert-function-and-type-definition:
6527
6528 55/push-ebp
6529 89/<- %ebp 4/r32/esp
6530
6531 (clear-stream _test-input-stream)
6532 (clear-stream $_test-input-buffered-file->buffer)
6533 (clear-stream _test-output-stream)
6534 (clear-stream $_test-output-buffered-file->buffer)
6535
6536 (write _test-input-stream "fn foo a: (addr t) {\n")
6537 (write _test-input-stream " var _a/eax: (addr t) <- copy a\n")
6538 (write _test-input-stream " var b/ecx: (addr int) <- get _a, x\n")
6539 (write _test-input-stream " var c/ecx: (addr int) <- get _a, y\n")
6540 (write _test-input-stream "}\n")
6541 (write _test-input-stream "type t {\n")
6542 (write _test-input-stream " x: int\n")
6543 (write _test-input-stream " y: int\n")
6544 (write _test-input-stream "}\n")
6545
6546 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6547 (flush _test-output-buffered-file)
6548 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6554
6555 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-and-type-definition/0")
6556 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-and-type-definition/1")
6557 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-and-type-definition/2")
6558 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-and-type-definition/3")
6559 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-and-type-definition/4")
6560 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-and-type-definition/5")
6561 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-and-type-definition/6")
6562 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-and-type-definition/7")
6563 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-and-type-definition/8")
6564 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000000) 0x00000001/r32" "F - test-convert-function-and-type-definition/9")
6565 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000004) 0x00000001/r32" "F - test-convert-function-and-type-definition/11")
6566 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-and-type-definition/13")
6567 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-and-type-definition/14")
6568 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-and-type-definition/15")
6569 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-and-type-definition/16")
6570 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-and-type-definition/17")
6571 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-and-type-definition/18")
6572 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-and-type-definition/19")
6573 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-and-type-definition/20")
6574
6575 89/<- %esp 5/r32/ebp
6576 5d/pop-to-ebp
6577 c3/return
6578
6579 test-type-definition-with-array:
6580
6581 55/push-ebp
6582 89/<- %ebp 4/r32/esp
6583
6584 (clear-stream _test-input-stream)
6585 (clear-stream $_test-input-buffered-file->buffer)
6586 (clear-stream _test-output-stream)
6587 (clear-stream $_test-output-buffered-file->buffer)
6588 (clear-stream _test-error-stream)
6589 (clear-stream $_test-error-buffered-file->buffer)
6590
6591 68/push 0/imm32
6592 68/push 0/imm32
6593 89/<- %edx 4/r32/esp
6594 (tailor-exit-descriptor %edx 0x10)
6595
6596 (write _test-input-stream "type t {\n")
6597 (write _test-input-stream " a: (array int 3)\n")
6598 (write _test-input-stream "}\n")
6599
6600 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6601
6602
6603 89/<- %edx 4/r32/esp
6604 (flush _test-output-buffered-file)
6605 (flush _test-error-buffered-file)
6606 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6612
6613 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-array: output should be empty")
6614 (check-next-stream-line-equal _test-error-stream "type t: 'array' elements not allowed for now" "F - test-type-definition-with-array: error message")
6615
6616 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-array: exit status")
6617
6618 81 0/subop/add %esp 8/imm32
6619
6620 5d/pop-to-ebp
6621 c3/return
6622
6623 test-type-definition-with-addr:
6624
6625 55/push-ebp
6626 89/<- %ebp 4/r32/esp
6627
6628 (clear-stream _test-input-stream)
6629 (clear-stream $_test-input-buffered-file->buffer)
6630 (clear-stream _test-output-stream)
6631 (clear-stream $_test-output-buffered-file->buffer)
6632 (clear-stream _test-error-stream)
6633 (clear-stream $_test-error-buffered-file->buffer)
6634
6635 68/push 0/imm32
6636 68/push 0/imm32
6637 89/<- %edx 4/r32/esp
6638 (tailor-exit-descriptor %edx 0x10)
6639
6640 (write _test-input-stream "type t {\n")
6641 (write _test-input-stream " a: (addr int)\n")
6642 (write _test-input-stream "}\n")
6643
6644 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6645
6646
6647 89/<- %edx 4/r32/esp
6648 (flush _test-output-buffered-file)
6649 (flush _test-error-buffered-file)
6650 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6656
6657 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-addr: output should be empty")
6658 (check-next-stream-line-equal _test-error-stream "type t: 'addr' elements not allowed" "F - test-type-definition-with-addr: error message")
6659
6660 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-addr: exit status")
6661
6662 81 0/subop/add %esp 8/imm32
6663
6664 5d/pop-to-ebp
6665 c3/return
6666
6667 test-convert-function-with-local-var-with-user-defined-type:
6668
6669 55/push-ebp
6670 89/<- %ebp 4/r32/esp
6671
6672 (clear-stream _test-input-stream)
6673 (clear-stream $_test-input-buffered-file->buffer)
6674 (clear-stream _test-output-stream)
6675 (clear-stream $_test-output-buffered-file->buffer)
6676
6677 (write _test-input-stream "fn foo {\n")
6678 (write _test-input-stream " var a: t\n")
6679 (write _test-input-stream "}\n")
6680 (write _test-input-stream "type t {\n")
6681 (write _test-input-stream " x: int\n")
6682 (write _test-input-stream " y: int\n")
6683 (write _test-input-stream "}\n")
6684
6685 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6686 (flush _test-output-buffered-file)
6687 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6693
6694 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type/0")
6695 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type/1")
6696 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/2")
6697 (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")
6698 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type/4")
6699 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type/5")
6700 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/6")
6701 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/7")
6702 (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")
6703 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type/9")
6704 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type/10")
6705 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type/11")
6706 (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")
6707 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/13")
6708 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type/14")
6709
6710 89/<- %esp 5/r32/ebp
6711 5d/pop-to-ebp
6712 c3/return
6713
6714 test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type:
6715
6716 55/push-ebp
6717 89/<- %ebp 4/r32/esp
6718
6719 (clear-stream _test-input-stream)
6720 (clear-stream $_test-input-buffered-file->buffer)
6721 (clear-stream _test-output-stream)
6722 (clear-stream $_test-output-buffered-file->buffer)
6723
6724 (write _test-input-stream "fn foo {\n")
6725 (write _test-input-stream " var a: t\n")
6726 (write _test-input-stream "}\n")
6727 (write _test-input-stream "type t {\n")
6728 (write _test-input-stream " x: s\n")
6729 (write _test-input-stream "}\n")
6730 (write _test-input-stream "type s {\n")
6731 (write _test-input-stream " z: int\n")
6732 (write _test-input-stream "}\n")
6733
6734 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6735 (flush _test-output-buffered-file)
6736 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6742
6743 (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")
6744 (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")
6745 (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")
6746 (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")
6747 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/4")
6748 (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")
6749 (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")
6750 (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")
6751 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/9")
6752 (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")
6753 (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")
6754 (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")
6755 (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")
6756 (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")
6757
6758 89/<- %esp 5/r32/ebp
6759 5d/pop-to-ebp
6760 c3/return
6761
6762 test-convert-function-call-with-arg-of-user-defined-type:
6763
6764 55/push-ebp
6765 89/<- %ebp 4/r32/esp
6766
6767 (clear-stream _test-input-stream)
6768 (clear-stream $_test-input-buffered-file->buffer)
6769 (clear-stream _test-output-stream)
6770 (clear-stream $_test-output-buffered-file->buffer)
6771
6772 (write _test-input-stream "fn f {\n")
6773 (write _test-input-stream " var a: t\n")
6774 (write _test-input-stream " foo a\n")
6775 (write _test-input-stream "}\n")
6776 (write _test-input-stream "fn foo x: t {\n")
6777 (write _test-input-stream "}\n")
6778 (write _test-input-stream "type t {\n")
6779 (write _test-input-stream " x: int\n")
6780 (write _test-input-stream " y: int\n")
6781 (write _test-input-stream "}\n")
6782
6783 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6784 (flush _test-output-buffered-file)
6785 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6791
6792 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
6793 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
6794 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
6795 (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")
6796 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
6797 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
6798
6799 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
6800 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
6801
6802 (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")
6803
6804 (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")
6805 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
6806 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
6807 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
6808 (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")
6809 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
6810 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
6811 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
6812 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
6813 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
6814 (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")
6815 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
6816 (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")
6817 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
6818 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
6819
6820 89/<- %esp 5/r32/ebp
6821 5d/pop-to-ebp
6822 c3/return
6823
6824 test-convert-function-call-with-arg-of-user-defined-type-register-indirect:
6825
6826 55/push-ebp
6827 89/<- %ebp 4/r32/esp
6828
6829 (clear-stream _test-input-stream)
6830 (clear-stream $_test-input-buffered-file->buffer)
6831 (clear-stream _test-output-stream)
6832 (clear-stream $_test-output-buffered-file->buffer)
6833
6834 (write _test-input-stream "fn f {\n")
6835 (write _test-input-stream " var a/eax: (addr t) <- copy 0\n")
6836 (write _test-input-stream " foo *a\n")
6837 (write _test-input-stream "}\n")
6838 (write _test-input-stream "fn foo x: t {\n")
6839 (write _test-input-stream "}\n")
6840 (write _test-input-stream "type t {\n")
6841 (write _test-input-stream " x: int\n")
6842 (write _test-input-stream " y: int\n")
6843 (write _test-input-stream "}\n")
6844
6845 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6846 (flush _test-output-buffered-file)
6847 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6853
6854 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
6855 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
6856 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
6857 (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")
6858 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
6859 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
6860
6861 (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")
6862 (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")
6863
6864 (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")
6865
6866 (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")
6867 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
6868 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
6869 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
6870 (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")
6871 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
6872 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
6873 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
6874 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
6875 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
6876 (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")
6877 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
6878 (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")
6879 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
6880 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
6881
6882 89/<- %esp 5/r32/ebp
6883 5d/pop-to-ebp
6884 c3/return
6885
6886
6887
6888 test-convert-function-call-with-arg-of-user-defined-type-by-reference:
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
6898 (write _test-input-stream "fn f {\n")
6899 (write _test-input-stream " var a: t\n")
6900 (write _test-input-stream " var b/eax: (addr t) <- address a\n")
6901 (write _test-input-stream " foo b\n")
6902 (write _test-input-stream "}\n")
6903 (write _test-input-stream "fn foo x: (addr t) {\n")
6904 (write _test-input-stream " var x/ecx: (addr t) <- copy x\n")
6905 (write _test-input-stream "}\n")
6906 (write _test-input-stream "type t {\n")
6907 (write _test-input-stream " x: int\n")
6908 (write _test-input-stream " y: int\n")
6909 (write _test-input-stream "}\n")
6910
6911 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6912 (flush _test-output-buffered-file)
6913 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6919
6920 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/0")
6921 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/1")
6922 (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")
6923 (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")
6924 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/4")
6925 (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")
6926
6927 (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")
6928 (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")
6929
6930 (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")
6931 (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")
6932
6933 (check-next-stream-line-equal _test-output-stream " (foo %eax)" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/10")
6934
6935 (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")
6936 (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")
6937 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/13")
6938 (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")
6939 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/15")
6940 (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")
6941 (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")
6942 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/18")
6943 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/19")
6944 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/20")
6945 (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")
6946 (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")
6947 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/23")
6948 (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")
6949 (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")
6950 (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")
6951 (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")
6952 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/28")
6953 (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")
6954 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/30")
6955 (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")
6956 (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")
6957 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/33")
6958
6959 89/<- %esp 5/r32/ebp
6960 5d/pop-to-ebp
6961 c3/return
6962
6963 test-convert-get-on-local-variable:
6964
6965 55/push-ebp
6966 89/<- %ebp 4/r32/esp
6967
6968 (clear-stream _test-input-stream)
6969 (clear-stream $_test-input-buffered-file->buffer)
6970 (clear-stream _test-output-stream)
6971 (clear-stream $_test-output-buffered-file->buffer)
6972
6973 (write _test-input-stream "fn foo {\n")
6974 (write _test-input-stream " var a: t\n")
6975 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
6976 (write _test-input-stream "}\n")
6977 (write _test-input-stream "type t {\n")
6978 (write _test-input-stream " x: int\n")
6979 (write _test-input-stream " y: int\n")
6980 (write _test-input-stream "}\n")
6981
6982 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6983 (flush _test-output-buffered-file)
6984 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6990
6991 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-local-variable/0")
6992 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-local-variable/1")
6993 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-local-variable/2")
6994 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-local-variable/3")
6995 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-local-variable/4")
6996 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-local-variable/5")
6997
6998 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/6")
6999 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/7")
7000
7001 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-local-variable/8")
7002
7003 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000001/r32" "F - test-convert-get-on-local-variable/9")
7004
7005 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-local-variable/10")
7006
7007 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-get-on-local-variable/11")
7008 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-local-variable/12")
7009 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-local-variable/13")
7010 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-local-variable/14")
7011 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-local-variable/15")
7012 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-local-variable/16")
7013 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-local-variable/17")
7014
7015 89/<- %esp 5/r32/ebp
7016 5d/pop-to-ebp
7017 c3/return
7018
7019 test-convert-get-on-function-argument:
7020
7021 55/push-ebp
7022 89/<- %ebp 4/r32/esp
7023
7024 (clear-stream _test-input-stream)
7025 (clear-stream $_test-input-buffered-file->buffer)
7026 (clear-stream _test-output-stream)
7027 (clear-stream $_test-output-buffered-file->buffer)
7028
7029 (write _test-input-stream "fn foo a: t {\n")
7030 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
7031 (write _test-input-stream "}\n")
7032 (write _test-input-stream "type t {\n")
7033 (write _test-input-stream " x: int\n")
7034 (write _test-input-stream " y: int\n")
7035 (write _test-input-stream "}\n")
7036
7037 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7038 (flush _test-output-buffered-file)
7039 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
7045
7046 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument/0")
7047 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument/1")
7048 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument/2")
7049 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument/3")
7050 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument/4")
7051 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument/5")
7052
7053 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument/6")
7054
7055 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument/7")
7056
7057 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument/8")
7058 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument/9")
7059 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument/10")
7060 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument/11")
7061 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument/12")
7062 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument/13")
7063 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument/14")
7064
7065 89/<- %esp 5/r32/ebp
7066 5d/pop-to-ebp
7067 c3/return
7068
7069 test-convert-get-on-function-argument-with-known-type:
7070
7071 55/push-ebp
7072 89/<- %ebp 4/r32/esp
7073
7074 (clear-stream _test-input-stream)
7075 (clear-stream $_test-input-buffered-file->buffer)
7076 (clear-stream _test-output-stream)
7077 (clear-stream $_test-output-buffered-file->buffer)
7078
7079 (write _test-input-stream "type t {\n")
7080 (write _test-input-stream " x: int\n")
7081 (write _test-input-stream " y: int\n")
7082 (write _test-input-stream "}\n")
7083 (write _test-input-stream "fn foo a: t {\n")
7084 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
7085 (write _test-input-stream "}\n")
7086
7087 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7088 (flush _test-output-buffered-file)
7089 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
7095
7096 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument-with-known-type/0")
7097 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument-with-known-type/1")
7098 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument-with-known-type/2")
7099 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument-with-known-type/3")
7100 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument-with-known-type/4")
7101 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument-with-known-type/5")
7102
7103 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument-with-known-type/6")
7104
7105 (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")
7106
7107 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument-with-known-type/8")
7108 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument-with-known-type/9")
7109 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument-with-known-type/10")
7110 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument-with-known-type/11")
7111 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument-with-known-type/12")
7112 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument-with-known-type/13")
7113 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument-with-known-type/14")
7114
7115 89/<- %esp 5/r32/ebp
7116 5d/pop-to-ebp
7117 c3/return
7118
7119 test-add-with-too-many-inouts:
7120
7121 55/push-ebp
7122 89/<- %ebp 4/r32/esp
7123
7124 (clear-stream _test-input-stream)
7125 (clear-stream $_test-input-buffered-file->buffer)
7126 (clear-stream _test-output-stream)
7127 (clear-stream $_test-output-buffered-file->buffer)
7128 (clear-stream _test-error-stream)
7129 (clear-stream $_test-error-buffered-file->buffer)
7130
7131 68/push 0/imm32
7132 68/push 0/imm32
7133 89/<- %edx 4/r32/esp
7134 (tailor-exit-descriptor %edx 0x10)
7135
7136 (write _test-input-stream "fn foo {\n")
7137 (write _test-input-stream " var a: int\n")
7138 (write _test-input-stream " var b/ecx: int <- add a, 0\n")
7139 (write _test-input-stream "}\n")
7140
7141 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7142
7143
7144 89/<- %edx 4/r32/esp
7145 (flush _test-output-buffered-file)
7146 (flush _test-error-buffered-file)
7147 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7153
7154 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts: output should be empty")
7155 (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")
7156
7157 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts: exit status")
7158
7159 81 0/subop/add %esp 8/imm32
7160
7161 5d/pop-to-ebp
7162 c3/return
7163
7164 test-add-with-too-many-inouts-2:
7165
7166 55/push-ebp
7167 89/<- %ebp 4/r32/esp
7168
7169 (clear-stream _test-input-stream)
7170 (clear-stream $_test-input-buffered-file->buffer)
7171 (clear-stream _test-output-stream)
7172 (clear-stream $_test-output-buffered-file->buffer)
7173 (clear-stream _test-error-stream)
7174 (clear-stream $_test-error-buffered-file->buffer)
7175
7176 68/push 0/imm32
7177 68/push 0/imm32
7178 89/<- %edx 4/r32/esp
7179 (tailor-exit-descriptor %edx 0x10)
7180
7181 (write _test-input-stream "fn foo {\n")
7182 (write _test-input-stream " var a: int\n")
7183 (write _test-input-stream " add-to a, 0, 1\n")
7184 (write _test-input-stream "}\n")
7185
7186 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7187
7188
7189 89/<- %edx 4/r32/esp
7190 (flush _test-output-buffered-file)
7191 (flush _test-error-buffered-file)
7192 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7198
7199 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts-2: output should be empty")
7200 (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")
7201
7202 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts-2: exit status")
7203
7204 81 0/subop/add %esp 8/imm32
7205
7206 5d/pop-to-ebp
7207 c3/return
7208
7209 test-add-with-too-many-outputs:
7210
7211 55/push-ebp
7212 89/<- %ebp 4/r32/esp
7213
7214 (clear-stream _test-input-stream)
7215 (clear-stream $_test-input-buffered-file->buffer)
7216 (clear-stream _test-output-stream)
7217 (clear-stream $_test-output-buffered-file->buffer)
7218 (clear-stream _test-error-stream)
7219 (clear-stream $_test-error-buffered-file->buffer)
7220
7221 68/push 0/imm32
7222 68/push 0/imm32
7223 89/<- %edx 4/r32/esp
7224 (tailor-exit-descriptor %edx 0x10)
7225
7226 (write _test-input-stream "fn foo {\n")
7227 (write _test-input-stream " var a/eax: int <- copy 0\n")
7228 (write _test-input-stream " var b/ebx: int <- copy 0\n")
7229 (write _test-input-stream " var c/ecx: int <- copy 0\n")
7230 (write _test-input-stream " c, b <- add a\n")
7231 (write _test-input-stream "}\n")
7232
7233 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7234
7235
7236 89/<- %edx 4/r32/esp
7237 (flush _test-output-buffered-file)
7238 (flush _test-error-buffered-file)
7239 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7245
7246 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-outputs: output should be empty")
7247 (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")
7248
7249 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-outputs: exit status")
7250
7251 81 0/subop/add %esp 8/imm32
7252
7253 5d/pop-to-ebp
7254 c3/return
7255
7256 test-add-with-non-number:
7257
7258 55/push-ebp
7259 89/<- %ebp 4/r32/esp
7260
7261 (clear-stream _test-input-stream)
7262 (clear-stream $_test-input-buffered-file->buffer)
7263 (clear-stream _test-output-stream)
7264 (clear-stream $_test-output-buffered-file->buffer)
7265 (clear-stream _test-error-stream)
7266 (clear-stream $_test-error-buffered-file->buffer)
7267
7268 68/push 0/imm32
7269 68/push 0/imm32
7270 89/<- %edx 4/r32/esp
7271 (tailor-exit-descriptor %edx 0x10)
7272
7273 (write _test-input-stream "fn foo {\n")
7274 (write _test-input-stream " var a: int\n")
7275 (write _test-input-stream " var b/ecx: (addr int) <- add a\n")
7276 (write _test-input-stream "}\n")
7277
7278 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7279
7280
7281 89/<- %edx 4/r32/esp
7282 (flush _test-output-buffered-file)
7283 (flush _test-error-buffered-file)
7284 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7290
7291 (check-stream-equal _test-output-stream "" "F - test-add-with-non-number: output should be empty")
7292 (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")
7293
7294 (check-ints-equal *(edx+4) 2 "F - test-add-with-non-number: exit status")
7295
7296 81 0/subop/add %esp 8/imm32
7297
7298 5d/pop-to-ebp
7299 c3/return
7300
7301 test-add-with-addr-dereferenced:
7302
7303 55/push-ebp
7304 89/<- %ebp 4/r32/esp
7305
7306 (clear-stream _test-input-stream)
7307 (clear-stream $_test-input-buffered-file->buffer)
7308 (clear-stream _test-output-stream)
7309 (clear-stream $_test-output-buffered-file->buffer)
7310
7311 (write _test-input-stream "fn foo {\n")
7312 (write _test-input-stream " var a/eax: (addr int) <- copy 0\n")
7313 (write _test-input-stream " add-to *a, 1\n")
7314 (write _test-input-stream "}\n")
7315
7316 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7317 (flush _test-output-buffered-file)
7318
7319
7320 89/<- %esp 5/r32/ebp
7321 5d/pop-to-ebp
7322 c3/return
7323
7324 test-copy-with-no-inout:
7325
7326 55/push-ebp
7327 89/<- %ebp 4/r32/esp
7328
7329 (clear-stream _test-input-stream)
7330 (clear-stream $_test-input-buffered-file->buffer)
7331 (clear-stream _test-output-stream)
7332 (clear-stream $_test-output-buffered-file->buffer)
7333 (clear-stream _test-error-stream)
7334 (clear-stream $_test-error-buffered-file->buffer)
7335
7336 68/push 0/imm32
7337 68/push 0/imm32
7338 89/<- %edx 4/r32/esp
7339 (tailor-exit-descriptor %edx 0x10)
7340
7341 (write _test-input-stream "fn foo {\n")
7342 (write _test-input-stream " var x/eax: boolean <- copy\n")
7343 (write _test-input-stream "}\n")
7344
7345 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7346
7347
7348 89/<- %edx 4/r32/esp
7349 (flush _test-output-buffered-file)
7350 (flush _test-error-buffered-file)
7351 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7357
7358 (check-stream-equal _test-output-stream "" "F - test-copy-with-no-inout: output should be empty")
7359 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' expects an inout" "F - test-copy-with-no-inout: error message")
7360
7361 (check-ints-equal *(edx+4) 2 "F - test-copy-with-no-inout: exit status")
7362
7363 81 0/subop/add %esp 8/imm32
7364
7365 5d/pop-to-ebp
7366 c3/return
7367
7368 test-copy-with-multiple-inouts:
7369
7370 55/push-ebp
7371 89/<- %ebp 4/r32/esp
7372
7373 (clear-stream _test-input-stream)
7374 (clear-stream $_test-input-buffered-file->buffer)
7375 (clear-stream _test-output-stream)
7376 (clear-stream $_test-output-buffered-file->buffer)
7377 (clear-stream _test-error-stream)
7378 (clear-stream $_test-error-buffered-file->buffer)
7379
7380 68/push 0/imm32
7381 68/push 0/imm32
7382 89/<- %edx 4/r32/esp
7383 (tailor-exit-descriptor %edx 0x10)
7384
7385 (write _test-input-stream "fn foo {\n")
7386 (write _test-input-stream " var x/eax: boolean <- copy 0, 0\n")
7387 (write _test-input-stream "}\n")
7388
7389 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7390
7391
7392 89/<- %edx 4/r32/esp
7393 (flush _test-output-buffered-file)
7394 (flush _test-error-buffered-file)
7395 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7401
7402 (check-stream-equal _test-output-stream "" "F - test-copy-with-multiple-inouts: output should be empty")
7403 (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")
7404
7405 (check-ints-equal *(edx+4) 2 "F - test-copy-with-multiple-inouts: exit status")
7406
7407 81 0/subop/add %esp 8/imm32
7408
7409 5d/pop-to-ebp
7410 c3/return
7411
7412 test-copy-with-no-output:
7413
7414 55/push-ebp
7415 89/<- %ebp 4/r32/esp
7416
7417 (clear-stream _test-input-stream)
7418 (clear-stream $_test-input-buffered-file->buffer)
7419 (clear-stream _test-output-stream)
7420 (clear-stream $_test-output-buffered-file->buffer)
7421 (clear-stream _test-error-stream)
7422 (clear-stream $_test-error-buffered-file->buffer)
7423
7424 68/push 0/imm32
7425 68/push 0/imm32
7426 89/<- %edx 4/r32/esp
7427 (tailor-exit-descriptor %edx 0x10)
7428
7429 (write _test-input-stream "fn foo {\n")
7430 (write _test-input-stream " copy 0\n")
7431 (write _test-input-stream "}\n")
7432
7433 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7434
7435
7436 89/<- %edx 4/r32/esp
7437 (flush _test-output-buffered-file)
7438 (flush _test-error-buffered-file)
7439 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7445
7446 (check-stream-equal _test-output-stream "" "F - test-copy-with-no-output: output should be empty")
7447 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' expects an output" "F - test-copy-with-no-output: error message")
7448
7449 (check-ints-equal *(edx+4) 2 "F - test-copy-with-no-output: exit status")
7450
7451 81 0/subop/add %esp 8/imm32
7452
7453 5d/pop-to-ebp
7454 c3/return
7455
7456 test-copy-with-multiple-outputs:
7457
7458 55/push-ebp
7459 89/<- %ebp 4/r32/esp
7460
7461 (clear-stream _test-input-stream)
7462 (clear-stream $_test-input-buffered-file->buffer)
7463 (clear-stream _test-output-stream)
7464 (clear-stream $_test-output-buffered-file->buffer)
7465 (clear-stream _test-error-stream)
7466 (clear-stream $_test-error-buffered-file->buffer)
7467
7468 68/push 0/imm32
7469 68/push 0/imm32
7470 89/<- %edx 4/r32/esp
7471 (tailor-exit-descriptor %edx 0x10)
7472
7473 (write _test-input-stream "fn foo {\n")
7474 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
7475 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
7476 (write _test-input-stream " x, y <- copy 0\n")
7477 (write _test-input-stream "}\n")
7478
7479 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7480
7481
7482 89/<- %edx 4/r32/esp
7483 (flush _test-output-buffered-file)
7484 (flush _test-error-buffered-file)
7485 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7491
7492 (check-stream-equal _test-output-stream "" "F - test-copy-with-multiple-outputs: output should be empty")
7493 (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")
7494
7495 (check-ints-equal *(edx+4) 2 "F - test-copy-with-multiple-outputs: exit status")
7496
7497 81 0/subop/add %esp 8/imm32
7498
7499 5d/pop-to-ebp
7500 c3/return
7501
7502 test-copy-invalid-value-to-address:
7503
7504 55/push-ebp
7505 89/<- %ebp 4/r32/esp
7506
7507 (clear-stream _test-input-stream)
7508 (clear-stream $_test-input-buffered-file->buffer)
7509 (clear-stream _test-output-stream)
7510 (clear-stream $_test-output-buffered-file->buffer)
7511 (clear-stream _test-error-stream)
7512 (clear-stream $_test-error-buffered-file->buffer)
7513
7514 68/push 0/imm32
7515 68/push 0/imm32
7516 89/<- %edx 4/r32/esp
7517 (tailor-exit-descriptor %edx 0x10)
7518
7519 (write _test-input-stream "fn foo {\n")
7520 (write _test-input-stream " var x/eax: int <- copy 0\n")
7521 (write _test-input-stream " var y/ecx: (addr int) <- copy x\n")
7522 (write _test-input-stream "}\n")
7523
7524 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7525
7526
7527 89/<- %edx 4/r32/esp
7528 (flush _test-output-buffered-file)
7529 (flush _test-error-buffered-file)
7530 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7536
7537 (check-stream-equal _test-output-stream "" "F - test-copy-invalid-value-to-address: output should be empty")
7538 (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")
7539
7540 (check-ints-equal *(edx+4) 2 "F - test-copy-invalid-value-to-address: exit status")
7541
7542 81 0/subop/add %esp 8/imm32
7543
7544 5d/pop-to-ebp
7545 c3/return
7546
7547 test-copy-null-value-to-addr:
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
7557 (write _test-input-stream "fn foo {\n")
7558 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
7559 (write _test-input-stream "}\n")
7560
7561 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7562 (flush _test-output-buffered-file)
7563 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7569
7570
7571 89/<- %esp 5/r32/ebp
7572 5d/pop-to-ebp
7573 c3/return
7574
7575 test-copy-invalid-value-to-offset:
7576
7577 55/push-ebp
7578 89/<- %ebp 4/r32/esp
7579
7580 (clear-stream _test-input-stream)
7581 (clear-stream $_test-input-buffered-file->buffer)
7582 (clear-stream _test-output-stream)
7583 (clear-stream $_test-output-buffered-file->buffer)
7584 (clear-stream _test-error-stream)
7585 (clear-stream $_test-error-buffered-file->buffer)
7586
7587 68/push 0/imm32
7588 68/push 0/imm32
7589 89/<- %edx 4/r32/esp
7590 (tailor-exit-descriptor %edx 0x10)
7591
7592 (write _test-input-stream "fn foo {\n")
7593 (write _test-input-stream " var x/eax: int <- copy 0\n")
7594 (write _test-input-stream " var y/ecx: (offset int) <- copy x\n")
7595 (write _test-input-stream "}\n")
7596
7597 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7598
7599
7600 89/<- %edx 4/r32/esp
7601 (flush _test-output-buffered-file)
7602 (flush _test-error-buffered-file)
7603 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7609
7610 (check-stream-equal _test-output-stream "" "F - test-copy-invalid-value-to-address: output should be empty")
7611 (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")
7612
7613 (check-ints-equal *(edx+4) 2 "F - test-copy-invalid-value-to-offset: exit status")
7614
7615 81 0/subop/add %esp 8/imm32
7616
7617 5d/pop-to-ebp
7618 c3/return
7619
7620 test-copy-null-value-to-offset:
7621
7622 55/push-ebp
7623 89/<- %ebp 4/r32/esp
7624
7625 (clear-stream _test-input-stream)
7626 (clear-stream $_test-input-buffered-file->buffer)
7627 (clear-stream _test-output-stream)
7628 (clear-stream $_test-output-buffered-file->buffer)
7629
7630 (write _test-input-stream "fn foo {\n")
7631 (write _test-input-stream " var y/ecx: (offset int) <- copy 0\n")
7632 (write _test-input-stream "}\n")
7633
7634 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7635 (flush _test-output-buffered-file)
7636 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7642
7643
7644 89/<- %esp 5/r32/ebp
7645 5d/pop-to-ebp
7646 c3/return
7647
7648 test-copy-deref-address:
7649
7650 55/push-ebp
7651 89/<- %ebp 4/r32/esp
7652
7653 (clear-stream _test-input-stream)
7654 (clear-stream $_test-input-buffered-file->buffer)
7655 (clear-stream _test-output-stream)
7656 (clear-stream $_test-output-buffered-file->buffer)
7657
7658 (write _test-input-stream "fn foo {\n")
7659 (write _test-input-stream " var x/eax: (addr addr int) <- copy 0\n")
7660 (write _test-input-stream " var y/ecx: (addr int) <- copy *x\n")
7661 (write _test-input-stream "}\n")
7662
7663 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7664 (flush _test-output-buffered-file)
7665 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7671
7672 (check-next-stream-line-equal _test-error-stream "" "F - test-copy-deref-address: error message")
7673
7674 5d/pop-to-ebp
7675 c3/return
7676
7677 test-copy-to-non-register:
7678
7679 55/push-ebp
7680 89/<- %ebp 4/r32/esp
7681
7682 (clear-stream _test-input-stream)
7683 (clear-stream $_test-input-buffered-file->buffer)
7684 (clear-stream _test-output-stream)
7685 (clear-stream $_test-output-buffered-file->buffer)
7686 (clear-stream _test-error-stream)
7687 (clear-stream $_test-error-buffered-file->buffer)
7688
7689 68/push 0/imm32
7690 68/push 0/imm32
7691 89/<- %edx 4/r32/esp
7692 (tailor-exit-descriptor %edx 0x10)
7693
7694 (write _test-input-stream "fn foo {\n")
7695 (write _test-input-stream " var x: int\n")
7696 (write _test-input-stream " x <- copy 0\n")
7697 (write _test-input-stream "}\n")
7698
7699 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7700
7701
7702 89/<- %edx 4/r32/esp
7703 (flush _test-output-buffered-file)
7704 (flush _test-error-buffered-file)
7705 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7711
7712 (check-stream-equal _test-output-stream "" "F - test-copy-to-non-register: output should be empty")
7713 (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")
7714
7715 (check-ints-equal *(edx+4) 2 "F - test-copy-to-non-register: exit status")
7716
7717 81 0/subop/add %esp 8/imm32
7718
7719 5d/pop-to-ebp
7720 c3/return
7721
7722 test-copy-non-scalar:
7723
7724 55/push-ebp
7725 89/<- %ebp 4/r32/esp
7726
7727 (clear-stream _test-input-stream)
7728 (clear-stream $_test-input-buffered-file->buffer)
7729 (clear-stream _test-output-stream)
7730 (clear-stream $_test-output-buffered-file->buffer)
7731 (clear-stream _test-error-stream)
7732 (clear-stream $_test-error-buffered-file->buffer)
7733
7734 68/push 0/imm32
7735 68/push 0/imm32
7736 89/<- %edx 4/r32/esp
7737 (tailor-exit-descriptor %edx 0x10)
7738
7739 (write _test-input-stream "fn foo {\n")
7740 (write _test-input-stream " var x: (handle int)\n")
7741 (write _test-input-stream " var y/eax: int <- copy x\n")
7742 (write _test-input-stream "}\n")
7743
7744 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7745
7746
7747 89/<- %edx 4/r32/esp
7748 (flush _test-output-buffered-file)
7749 (flush _test-error-buffered-file)
7750 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7756
7757 (check-stream-equal _test-output-stream "" "F - test-copy-non-scalar: output should be empty")
7758 (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")
7759
7760 (check-ints-equal *(edx+4) 2 "F - test-copy-non-scalar: exit status")
7761
7762 81 0/subop/add %esp 8/imm32
7763
7764 5d/pop-to-ebp
7765 c3/return
7766
7767 test-copy-to-with-no-inout:
7768
7769 55/push-ebp
7770 89/<- %ebp 4/r32/esp
7771
7772 (clear-stream _test-input-stream)
7773 (clear-stream $_test-input-buffered-file->buffer)
7774 (clear-stream _test-output-stream)
7775 (clear-stream $_test-output-buffered-file->buffer)
7776 (clear-stream _test-error-stream)
7777 (clear-stream $_test-error-buffered-file->buffer)
7778
7779 68/push 0/imm32
7780 68/push 0/imm32
7781 89/<- %edx 4/r32/esp
7782 (tailor-exit-descriptor %edx 0x10)
7783
7784 (write _test-input-stream "fn foo {\n")
7785 (write _test-input-stream " copy-to\n")
7786 (write _test-input-stream "}\n")
7787
7788 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7789
7790
7791 89/<- %edx 4/r32/esp
7792 (flush _test-output-buffered-file)
7793 (flush _test-error-buffered-file)
7794 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7800
7801 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-inout: output should be empty")
7802 (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")
7803
7804 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-inout: exit status")
7805
7806 81 0/subop/add %esp 8/imm32
7807
7808 5d/pop-to-ebp
7809 c3/return
7810
7811 test-copy-to-with-no-input:
7812
7813 55/push-ebp
7814 89/<- %ebp 4/r32/esp
7815
7816 (clear-stream _test-input-stream)
7817 (clear-stream $_test-input-buffered-file->buffer)
7818 (clear-stream _test-output-stream)
7819 (clear-stream $_test-output-buffered-file->buffer)
7820 (clear-stream _test-error-stream)
7821 (clear-stream $_test-error-buffered-file->buffer)
7822
7823 68/push 0/imm32
7824 68/push 0/imm32
7825 89/<- %edx 4/r32/esp
7826 (tailor-exit-descriptor %edx 0x10)
7827
7828 (write _test-input-stream "fn foo {\n")
7829 (write _test-input-stream " var x: boolean\n")
7830 (write _test-input-stream " copy-to x\n")
7831 (write _test-input-stream "}\n")
7832
7833 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7834
7835
7836 89/<- %edx 4/r32/esp
7837 (flush _test-output-buffered-file)
7838 (flush _test-error-buffered-file)
7839 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7845
7846 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-input: output should be empty")
7847 (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")
7848
7849 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-input: exit status")
7850
7851 81 0/subop/add %esp 8/imm32
7852
7853 5d/pop-to-ebp
7854 c3/return
7855
7856 test-copy-to-with-no-register:
7857
7858 55/push-ebp
7859 89/<- %ebp 4/r32/esp
7860
7861 (clear-stream _test-input-stream)
7862 (clear-stream $_test-input-buffered-file->buffer)
7863 (clear-stream _test-output-stream)
7864 (clear-stream $_test-output-buffered-file->buffer)
7865 (clear-stream _test-error-stream)
7866 (clear-stream $_test-error-buffered-file->buffer)
7867
7868 68/push 0/imm32
7869 68/push 0/imm32
7870 89/<- %edx 4/r32/esp
7871 (tailor-exit-descriptor %edx 0x10)
7872
7873 (write _test-input-stream "fn foo {\n")
7874 (write _test-input-stream " var x: boolean\n")
7875 (write _test-input-stream " copy-to x, x\n")
7876 (write _test-input-stream "}\n")
7877
7878 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7879
7880
7881 89/<- %edx 4/r32/esp
7882 (flush _test-output-buffered-file)
7883 (flush _test-error-buffered-file)
7884 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7890
7891 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-register: output should be empty")
7892 (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")
7893
7894 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-register: exit status")
7895
7896 81 0/subop/add %esp 8/imm32
7897
7898 5d/pop-to-ebp
7899 c3/return
7900
7901 test-copy-to-with-too-many-inouts:
7902
7903 55/push-ebp
7904 89/<- %ebp 4/r32/esp
7905
7906 (clear-stream _test-input-stream)
7907 (clear-stream $_test-input-buffered-file->buffer)
7908 (clear-stream _test-output-stream)
7909 (clear-stream $_test-output-buffered-file->buffer)
7910 (clear-stream _test-error-stream)
7911 (clear-stream $_test-error-buffered-file->buffer)
7912
7913 68/push 0/imm32
7914 68/push 0/imm32
7915 89/<- %edx 4/r32/esp
7916 (tailor-exit-descriptor %edx 0x10)
7917
7918 (write _test-input-stream "fn foo {\n")
7919 (write _test-input-stream " var x: boolean\n")
7920 (write _test-input-stream " copy-to x, 0, 0\n")
7921 (write _test-input-stream "}\n")
7922
7923 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7924
7925
7926 89/<- %edx 4/r32/esp
7927 (flush _test-output-buffered-file)
7928 (flush _test-error-buffered-file)
7929 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7935
7936 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-too-many-inouts: output should be empty")
7937 (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")
7938
7939 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-too-many-inouts: exit status")
7940
7941 81 0/subop/add %esp 8/imm32
7942
7943 5d/pop-to-ebp
7944 c3/return
7945
7946 test-copy-to-with-output:
7947
7948 55/push-ebp
7949 89/<- %ebp 4/r32/esp
7950
7951 (clear-stream _test-input-stream)
7952 (clear-stream $_test-input-buffered-file->buffer)
7953 (clear-stream _test-output-stream)
7954 (clear-stream $_test-output-buffered-file->buffer)
7955 (clear-stream _test-error-stream)
7956 (clear-stream $_test-error-buffered-file->buffer)
7957
7958 68/push 0/imm32
7959 68/push 0/imm32
7960 89/<- %edx 4/r32/esp
7961 (tailor-exit-descriptor %edx 0x10)
7962
7963 (write _test-input-stream "fn foo {\n")
7964 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
7965 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
7966 (write _test-input-stream " x <- copy-to y, 0\n")
7967 (write _test-input-stream "}\n")
7968
7969 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7970
7971
7972 89/<- %edx 4/r32/esp
7973 (flush _test-output-buffered-file)
7974 (flush _test-error-buffered-file)
7975 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7981
7982 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-output: output should be empty")
7983 (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")
7984
7985 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-output: exit status")
7986
7987 81 0/subop/add %esp 8/imm32
7988
7989 5d/pop-to-ebp
7990 c3/return
7991
7992 test-copy-to-invalid-value-to-address:
7993
7994 55/push-ebp
7995 89/<- %ebp 4/r32/esp
7996
7997 (clear-stream _test-input-stream)
7998 (clear-stream $_test-input-buffered-file->buffer)
7999 (clear-stream _test-output-stream)
8000 (clear-stream $_test-output-buffered-file->buffer)
8001 (clear-stream _test-error-stream)
8002 (clear-stream $_test-error-buffered-file->buffer)
8003
8004 68/push 0/imm32
8005 68/push 0/imm32
8006 89/<- %edx 4/r32/esp
8007 (tailor-exit-descriptor %edx 0x10)
8008
8009 (write _test-input-stream "fn foo {\n")
8010 (write _test-input-stream " var x/eax: int <- copy 0\n")
8011 (write _test-input-stream " var y: (addr int)\n")
8012 (write _test-input-stream " copy-to y, x\n")
8013 (write _test-input-stream "}\n")
8014
8015 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8016
8017
8018 89/<- %edx 4/r32/esp
8019 (flush _test-output-buffered-file)
8020 (flush _test-error-buffered-file)
8021 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8027
8028 (check-stream-equal _test-output-stream "" "F - test-copy-to-invalid-value-to-address: output should be empty")
8029 (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")
8030
8031 (check-ints-equal *(edx+4) 2 "F - test-copy-to-invalid-value-to-address: exit status")
8032
8033 81 0/subop/add %esp 8/imm32
8034
8035 5d/pop-to-ebp
8036 c3/return
8037
8038 test-copy-to-deref-address:
8039
8040 55/push-ebp
8041 89/<- %ebp 4/r32/esp
8042
8043 (clear-stream _test-input-stream)
8044 (clear-stream $_test-input-buffered-file->buffer)
8045 (clear-stream _test-output-stream)
8046 (clear-stream $_test-output-buffered-file->buffer)
8047
8048 (write _test-input-stream "fn foo {\n")
8049 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
8050 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
8051 (write _test-input-stream " copy-to *y, x\n")
8052 (write _test-input-stream "}\n")
8053
8054 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8055 (flush _test-output-buffered-file)
8056 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8062
8063 (check-next-stream-line-equal _test-error-stream "" "F - test-copy-to-deref-address: error message")
8064
8065 5d/pop-to-ebp
8066 c3/return
8067
8068 test-copy-to-non-scalar:
8069
8070 55/push-ebp
8071 89/<- %ebp 4/r32/esp
8072
8073 (clear-stream _test-input-stream)
8074 (clear-stream $_test-input-buffered-file->buffer)
8075 (clear-stream _test-output-stream)
8076 (clear-stream $_test-output-buffered-file->buffer)
8077 (clear-stream _test-error-stream)
8078 (clear-stream $_test-error-buffered-file->buffer)
8079
8080 68/push 0/imm32
8081 68/push 0/imm32
8082 89/<- %edx 4/r32/esp
8083 (tailor-exit-descriptor %edx 0x10)
8084
8085 (write _test-input-stream "fn foo {\n")
8086 (write _test-input-stream " var x: (handle int)\n")
8087 (write _test-input-stream " var y: int\n")
8088 (write _test-input-stream " copy-to y, x\n")
8089 (write _test-input-stream "}\n")
8090
8091 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8092
8093
8094 89/<- %edx 4/r32/esp
8095 (flush _test-output-buffered-file)
8096 (flush _test-error-buffered-file)
8097 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8103
8104 (check-stream-equal _test-output-stream "" "F - test-copy-to-non-scalar: output should be empty")
8105
8106 (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")
8107
8108 (check-ints-equal *(edx+4) 2 "F - test-copy-to-non-scalar: exit status")
8109
8110 81 0/subop/add %esp 8/imm32
8111
8112 5d/pop-to-ebp
8113 c3/return
8114
8115 test-compare-with-no-inout:
8116
8117 55/push-ebp
8118 89/<- %ebp 4/r32/esp
8119
8120 (clear-stream _test-input-stream)
8121 (clear-stream $_test-input-buffered-file->buffer)
8122 (clear-stream _test-output-stream)
8123 (clear-stream $_test-output-buffered-file->buffer)
8124 (clear-stream _test-error-stream)
8125 (clear-stream $_test-error-buffered-file->buffer)
8126
8127 68/push 0/imm32
8128 68/push 0/imm32
8129 89/<- %edx 4/r32/esp
8130 (tailor-exit-descriptor %edx 0x10)
8131
8132 (write _test-input-stream "fn foo {\n")
8133 (write _test-input-stream " var x: boolean\n")
8134 (write _test-input-stream " compare\n")
8135 (write _test-input-stream "}\n")
8136
8137 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8138
8139
8140 89/<- %edx 4/r32/esp
8141 (flush _test-output-buffered-file)
8142 (flush _test-error-buffered-file)
8143 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8149
8150 (check-stream-equal _test-output-stream "" "F - test-compare-with-no-inout: output should be empty")
8151 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-no-inout: error message")
8152
8153 (check-ints-equal *(edx+4) 2 "F - test-compare-with-no-inout: exit status")
8154
8155 81 0/subop/add %esp 8/imm32
8156
8157 5d/pop-to-ebp
8158 c3/return
8159
8160 test-compare-with-no-input:
8161
8162 55/push-ebp
8163 89/<- %ebp 4/r32/esp
8164
8165 (clear-stream _test-input-stream)
8166 (clear-stream $_test-input-buffered-file->buffer)
8167 (clear-stream _test-output-stream)
8168 (clear-stream $_test-output-buffered-file->buffer)
8169 (clear-stream _test-error-stream)
8170 (clear-stream $_test-error-buffered-file->buffer)
8171
8172 68/push 0/imm32
8173 68/push 0/imm32
8174 89/<- %edx 4/r32/esp
8175 (tailor-exit-descriptor %edx 0x10)
8176
8177 (write _test-input-stream "fn foo {\n")
8178 (write _test-input-stream " var x: boolean\n")
8179 (write _test-input-stream " compare x\n")
8180 (write _test-input-stream "}\n")
8181
8182 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8183
8184
8185 89/<- %edx 4/r32/esp
8186 (flush _test-output-buffered-file)
8187 (flush _test-error-buffered-file)
8188 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8194
8195 (check-stream-equal _test-output-stream "" "F - test-compare-with-no-input: output should be empty")
8196 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-no-input: error message")
8197
8198 (check-ints-equal *(edx+4) 2 "F - test-compare-with-no-input: exit status")
8199
8200 81 0/subop/add %esp 8/imm32
8201
8202 5d/pop-to-ebp
8203 c3/return
8204
8205 test-compare-with-too-many-inouts:
8206
8207 55/push-ebp
8208 89/<- %ebp 4/r32/esp
8209
8210 (clear-stream _test-input-stream)
8211 (clear-stream $_test-input-buffered-file->buffer)
8212 (clear-stream _test-output-stream)
8213 (clear-stream $_test-output-buffered-file->buffer)
8214 (clear-stream _test-error-stream)
8215 (clear-stream $_test-error-buffered-file->buffer)
8216
8217 68/push 0/imm32
8218 68/push 0/imm32
8219 89/<- %edx 4/r32/esp
8220 (tailor-exit-descriptor %edx 0x10)
8221
8222 (write _test-input-stream "fn foo {\n")
8223 (write _test-input-stream " var x: boolean\n")
8224 (write _test-input-stream " compare x, 0, 0\n")
8225 (write _test-input-stream "}\n")
8226
8227 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8228
8229
8230 89/<- %edx 4/r32/esp
8231 (flush _test-output-buffered-file)
8232 (flush _test-error-buffered-file)
8233 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8239
8240 (check-stream-equal _test-output-stream "" "F - test-compare-with-too-many-inouts: output should be empty")
8241 (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")
8242
8243 (check-ints-equal *(edx+4) 2 "F - test-compare-with-too-many-inouts: exit status")
8244
8245 81 0/subop/add %esp 8/imm32
8246
8247 5d/pop-to-ebp
8248 c3/return
8249
8250 test-compare-with-output:
8251
8252 55/push-ebp
8253 89/<- %ebp 4/r32/esp
8254
8255 (clear-stream _test-input-stream)
8256 (clear-stream $_test-input-buffered-file->buffer)
8257 (clear-stream _test-output-stream)
8258 (clear-stream $_test-output-buffered-file->buffer)
8259 (clear-stream _test-error-stream)
8260 (clear-stream $_test-error-buffered-file->buffer)
8261
8262 68/push 0/imm32
8263 68/push 0/imm32
8264 89/<- %edx 4/r32/esp
8265 (tailor-exit-descriptor %edx 0x10)
8266
8267 (write _test-input-stream "fn foo {\n")
8268 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
8269 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
8270 (write _test-input-stream " x <- compare y, 0\n")
8271 (write _test-input-stream "}\n")
8272
8273 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8274
8275
8276 89/<- %edx 4/r32/esp
8277 (flush _test-output-buffered-file)
8278 (flush _test-error-buffered-file)
8279 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8285
8286 (check-stream-equal _test-output-stream "" "F - test-compare-with-output: output should be empty")
8287 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must not have any outputs" "F - test-compare-with-output: error message")
8288
8289 (check-ints-equal *(edx+4) 2 "F - test-compare-with-output: exit status")
8290
8291 81 0/subop/add %esp 8/imm32
8292
8293 5d/pop-to-ebp
8294 c3/return
8295
8296 test-compare-invalid-value-to-address:
8297
8298 55/push-ebp
8299 89/<- %ebp 4/r32/esp
8300
8301 (clear-stream _test-input-stream)
8302 (clear-stream $_test-input-buffered-file->buffer)
8303 (clear-stream _test-output-stream)
8304 (clear-stream $_test-output-buffered-file->buffer)
8305 (clear-stream _test-error-stream)
8306 (clear-stream $_test-error-buffered-file->buffer)
8307
8308 68/push 0/imm32
8309 68/push 0/imm32
8310 89/<- %edx 4/r32/esp
8311 (tailor-exit-descriptor %edx 0x10)
8312
8313 (write _test-input-stream "fn foo {\n")
8314 (write _test-input-stream " var x/eax: int <- copy 0\n")
8315 (write _test-input-stream " var y: (addr int)\n")
8316 (write _test-input-stream " compare y, x\n")
8317 (write _test-input-stream "}\n")
8318
8319 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8320
8321
8322 89/<- %edx 4/r32/esp
8323 (flush _test-output-buffered-file)
8324 (flush _test-error-buffered-file)
8325 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8331
8332 (check-stream-equal _test-output-stream "" "F - test-compare-invalid-value-to-address: output should be empty")
8333 (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")
8334
8335 (check-ints-equal *(edx+4) 2 "F - test-compare-invalid-value-to-address: exit status")
8336
8337 81 0/subop/add %esp 8/imm32
8338
8339 5d/pop-to-ebp
8340 c3/return
8341
8342 test-compare-address:
8343
8344 55/push-ebp
8345 89/<- %ebp 4/r32/esp
8346
8347 (clear-stream _test-input-stream)
8348 (clear-stream $_test-input-buffered-file->buffer)
8349 (clear-stream _test-output-stream)
8350 (clear-stream $_test-output-buffered-file->buffer)
8351
8352 (write _test-input-stream "fn foo {\n")
8353 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
8354 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
8355 (write _test-input-stream " compare y, x\n")
8356 (write _test-input-stream "}\n")
8357
8358 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8359 (flush _test-output-buffered-file)
8360 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8366
8367 (check-next-stream-line-equal _test-error-stream "" "F - test-compare-address: error message")
8368
8369 5d/pop-to-ebp
8370 c3/return
8371
8372 test-compare-deref-address:
8373
8374 55/push-ebp
8375 89/<- %ebp 4/r32/esp
8376
8377 (clear-stream _test-input-stream)
8378 (clear-stream $_test-input-buffered-file->buffer)
8379 (clear-stream _test-output-stream)
8380 (clear-stream $_test-output-buffered-file->buffer)
8381
8382 (write _test-input-stream "fn foo {\n")
8383 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
8384 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
8385 (write _test-input-stream " compare *y, x\n")
8386 (write _test-input-stream "}\n")
8387
8388 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8389 (flush _test-output-buffered-file)
8390 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8396
8397 (check-next-stream-line-equal _test-error-stream "" "F - test-compare-deref-address: error message")
8398
8399 5d/pop-to-ebp
8400 c3/return
8401
8402 test-compare-two-vars-in-memory:
8403
8404 55/push-ebp
8405 89/<- %ebp 4/r32/esp
8406
8407 (clear-stream _test-input-stream)
8408 (clear-stream $_test-input-buffered-file->buffer)
8409 (clear-stream _test-output-stream)
8410 (clear-stream $_test-output-buffered-file->buffer)
8411 (clear-stream _test-error-stream)
8412 (clear-stream $_test-error-buffered-file->buffer)
8413
8414 68/push 0/imm32
8415 68/push 0/imm32
8416 89/<- %edx 4/r32/esp
8417 (tailor-exit-descriptor %edx 0x10)
8418
8419 (write _test-input-stream "fn foo {\n")
8420 (write _test-input-stream " var x: boolean\n")
8421 (write _test-input-stream " compare x, x\n")
8422 (write _test-input-stream "}\n")
8423
8424 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8425
8426
8427 89/<- %edx 4/r32/esp
8428 (flush _test-output-buffered-file)
8429 (flush _test-error-buffered-file)
8430 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8436
8437 (check-stream-equal _test-output-stream "" "F - test-compare-two-vars-in-memory: output should be empty")
8438 (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")
8439
8440 (check-ints-equal *(edx+4) 2 "F - test-compare-two-vars-in-memory: exit status")
8441
8442 81 0/subop/add %esp 8/imm32
8443
8444 5d/pop-to-ebp
8445 c3/return
8446
8447 test-compare-non-scalar:
8448
8449 55/push-ebp
8450 89/<- %ebp 4/r32/esp
8451
8452 (clear-stream _test-input-stream)
8453 (clear-stream $_test-input-buffered-file->buffer)
8454 (clear-stream _test-output-stream)
8455 (clear-stream $_test-output-buffered-file->buffer)
8456 (clear-stream _test-error-stream)
8457 (clear-stream $_test-error-buffered-file->buffer)
8458
8459 68/push 0/imm32
8460 68/push 0/imm32
8461 89/<- %edx 4/r32/esp
8462 (tailor-exit-descriptor %edx 0x10)
8463
8464 (write _test-input-stream "fn foo {\n")
8465 (write _test-input-stream " var x: (handle int)\n")
8466 (write _test-input-stream " var y: int\n")
8467 (write _test-input-stream " compare y, x\n")
8468 (write _test-input-stream "}\n")
8469
8470 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8471
8472
8473 89/<- %edx 4/r32/esp
8474 (flush _test-output-buffered-file)
8475 (flush _test-error-buffered-file)
8476 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8482
8483 (check-stream-equal _test-output-stream "" "F - test-compare-non-scalar: output should be empty")
8484
8485 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: both inouts are in memory" "F - test-compare-non-scalar: error message")
8486
8487 (check-ints-equal *(edx+4) 2 "F - test-compare-non-scalar: exit status")
8488
8489 81 0/subop/add %esp 8/imm32
8490
8491 5d/pop-to-ebp
8492 c3/return
8493
8494 test-address-with-no-inout:
8495
8496 55/push-ebp
8497 89/<- %ebp 4/r32/esp
8498
8499 (clear-stream _test-input-stream)
8500 (clear-stream $_test-input-buffered-file->buffer)
8501 (clear-stream _test-output-stream)
8502 (clear-stream $_test-output-buffered-file->buffer)
8503 (clear-stream _test-error-stream)
8504 (clear-stream $_test-error-buffered-file->buffer)
8505
8506 68/push 0/imm32
8507 68/push 0/imm32
8508 89/<- %edx 4/r32/esp
8509 (tailor-exit-descriptor %edx 0x10)
8510
8511 (write _test-input-stream "fn foo {\n")
8512 (write _test-input-stream " var x/eax: boolean <- address\n")
8513 (write _test-input-stream "}\n")
8514
8515 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8516
8517
8518 89/<- %edx 4/r32/esp
8519 (flush _test-output-buffered-file)
8520 (flush _test-error-buffered-file)
8521 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8527
8528 (check-stream-equal _test-output-stream "" "F - test-address-with-no-inout: output should be empty")
8529 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' expects an inout" "F - test-address-with-no-inout: error message")
8530
8531 (check-ints-equal *(edx+4) 2 "F - test-address-with-no-inout: exit status")
8532
8533 81 0/subop/add %esp 8/imm32
8534
8535 5d/pop-to-ebp
8536 c3/return
8537
8538 test-address-with-multiple-inouts:
8539
8540 55/push-ebp
8541 89/<- %ebp 4/r32/esp
8542
8543 (clear-stream _test-input-stream)
8544 (clear-stream $_test-input-buffered-file->buffer)
8545 (clear-stream _test-output-stream)
8546 (clear-stream $_test-output-buffered-file->buffer)
8547 (clear-stream _test-error-stream)
8548 (clear-stream $_test-error-buffered-file->buffer)
8549
8550 68/push 0/imm32
8551 68/push 0/imm32
8552 89/<- %edx 4/r32/esp
8553 (tailor-exit-descriptor %edx 0x10)
8554
8555 (write _test-input-stream "fn foo {\n")
8556 (write _test-input-stream " var x/eax: boolean <- address 0, 0\n")
8557 (write _test-input-stream "}\n")
8558
8559 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8560
8561
8562 89/<- %edx 4/r32/esp
8563 (flush _test-output-buffered-file)
8564 (flush _test-error-buffered-file)
8565 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8571
8572 (check-stream-equal _test-output-stream "" "F - test-address-with-multiple-inouts: output should be empty")
8573 (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")
8574
8575 (check-ints-equal *(edx+4) 2 "F - test-address-with-multiple-inouts: exit status")
8576
8577 81 0/subop/add %esp 8/imm32
8578
8579 5d/pop-to-ebp
8580 c3/return
8581
8582 test-address-with-no-output:
8583
8584 55/push-ebp
8585 89/<- %ebp 4/r32/esp
8586
8587 (clear-stream _test-input-stream)
8588 (clear-stream $_test-input-buffered-file->buffer)
8589 (clear-stream _test-output-stream)
8590 (clear-stream $_test-output-buffered-file->buffer)
8591 (clear-stream _test-error-stream)
8592 (clear-stream $_test-error-buffered-file->buffer)
8593
8594 68/push 0/imm32
8595 68/push 0/imm32
8596 89/<- %edx 4/r32/esp
8597 (tailor-exit-descriptor %edx 0x10)
8598
8599 (write _test-input-stream "fn foo {\n")
8600 (write _test-input-stream " address 0\n")
8601 (write _test-input-stream "}\n")
8602
8603 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8604
8605
8606 89/<- %edx 4/r32/esp
8607 (flush _test-output-buffered-file)
8608 (flush _test-error-buffered-file)
8609 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8615
8616 (check-stream-equal _test-output-stream "" "F - test-address-with-no-output: output should be empty")
8617 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' expects an output" "F - test-address-with-no-output: error message")
8618
8619 (check-ints-equal *(edx+4) 2 "F - test-address-with-no-output: exit status")
8620
8621 81 0/subop/add %esp 8/imm32
8622
8623 5d/pop-to-ebp
8624 c3/return
8625
8626 test-address-with-multiple-outputs:
8627
8628 55/push-ebp
8629 89/<- %ebp 4/r32/esp
8630
8631 (clear-stream _test-input-stream)
8632 (clear-stream $_test-input-buffered-file->buffer)
8633 (clear-stream _test-output-stream)
8634 (clear-stream $_test-output-buffered-file->buffer)
8635 (clear-stream _test-error-stream)
8636 (clear-stream $_test-error-buffered-file->buffer)
8637
8638 68/push 0/imm32
8639 68/push 0/imm32
8640 89/<- %edx 4/r32/esp
8641 (tailor-exit-descriptor %edx 0x10)
8642
8643 (write _test-input-stream "fn foo {\n")
8644 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
8645 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
8646 (write _test-input-stream " x, y <- address 0\n")
8647 (write _test-input-stream "}\n")
8648
8649 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8650
8651
8652 89/<- %edx 4/r32/esp
8653 (flush _test-output-buffered-file)
8654 (flush _test-error-buffered-file)
8655 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8661
8662 (check-stream-equal _test-output-stream "" "F - test-address-with-multiple-outputs: output should be empty")
8663 (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")
8664
8665 (check-ints-equal *(edx+4) 2 "F - test-address-with-multiple-outputs: exit status")
8666
8667 81 0/subop/add %esp 8/imm32
8668
8669 5d/pop-to-ebp
8670 c3/return
8671
8672
8673 test-address-of-deref:
8674
8675 55/push-ebp
8676 89/<- %ebp 4/r32/esp
8677
8678 (clear-stream _test-input-stream)
8679 (clear-stream $_test-input-buffered-file->buffer)
8680 (clear-stream _test-output-stream)
8681 (clear-stream $_test-output-buffered-file->buffer)
8682
8683 (write _test-input-stream "fn foo {\n")
8684 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
8685 (write _test-input-stream " var y/ecx: (addr int) <- address *x\n")
8686 (write _test-input-stream "}\n")
8687
8688 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8689 (flush _test-output-buffered-file)
8690 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8696
8697 (check-next-stream-line-equal _test-error-stream "" "F - test-address-of-deref: error message")
8698
8699 5d/pop-to-ebp
8700 c3/return
8701
8702 test-address-to-non-register:
8703
8704 55/push-ebp
8705 89/<- %ebp 4/r32/esp
8706
8707 (clear-stream _test-input-stream)
8708 (clear-stream $_test-input-buffered-file->buffer)
8709 (clear-stream _test-output-stream)
8710 (clear-stream $_test-output-buffered-file->buffer)
8711 (clear-stream _test-error-stream)
8712 (clear-stream $_test-error-buffered-file->buffer)
8713
8714 68/push 0/imm32
8715 68/push 0/imm32
8716 89/<- %edx 4/r32/esp
8717 (tailor-exit-descriptor %edx 0x10)
8718
8719 (write _test-input-stream "fn foo {\n")
8720 (write _test-input-stream " var x: (addr int)\n")
8721 (write _test-input-stream " x <- address 0\n")
8722 (write _test-input-stream "}\n")
8723
8724 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8725
8726
8727 89/<- %edx 4/r32/esp
8728 (flush _test-output-buffered-file)
8729 (flush _test-error-buffered-file)
8730 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8736
8737 (check-stream-equal _test-output-stream "" "F - test-address-to-non-register: output should be empty")
8738 (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")
8739
8740 (check-ints-equal *(edx+4) 2 "F - test-address-to-non-register: exit status")
8741
8742 81 0/subop/add %esp 8/imm32
8743
8744 5d/pop-to-ebp
8745 c3/return
8746
8747 test-address-with-wrong-type:
8748
8749 55/push-ebp
8750 89/<- %ebp 4/r32/esp
8751
8752 (clear-stream _test-input-stream)
8753 (clear-stream $_test-input-buffered-file->buffer)
8754 (clear-stream _test-output-stream)
8755 (clear-stream $_test-output-buffered-file->buffer)
8756 (clear-stream _test-error-stream)
8757 (clear-stream $_test-error-buffered-file->buffer)
8758
8759 68/push 0/imm32
8760 68/push 0/imm32
8761 89/<- %edx 4/r32/esp
8762 (tailor-exit-descriptor %edx 0x10)
8763
8764 (write _test-input-stream "fn foo {\n")
8765 (write _test-input-stream " var x: int\n")
8766 (write _test-input-stream " var y/eax: (addr boolean) <- address x\n")
8767 (write _test-input-stream "}\n")
8768
8769 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8770
8771
8772 89/<- %edx 4/r32/esp
8773 (flush _test-output-buffered-file)
8774 (flush _test-error-buffered-file)
8775 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8781
8782 (check-stream-equal _test-output-stream "" "F - test-address-with-wrong-type: output should be empty")
8783 (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")
8784
8785 (check-ints-equal *(edx+4) 2 "F - test-address-with-wrong-type: exit status")
8786
8787 81 0/subop/add %esp 8/imm32
8788
8789 5d/pop-to-ebp
8790 c3/return
8791
8792 test-address-with-right-type-for-array:
8793
8794 55/push-ebp
8795 89/<- %ebp 4/r32/esp
8796
8797 (clear-stream _test-input-stream)
8798 (clear-stream $_test-input-buffered-file->buffer)
8799 (clear-stream _test-output-stream)
8800 (clear-stream $_test-output-buffered-file->buffer)
8801
8802 (write _test-input-stream "fn foo {\n")
8803 (write _test-input-stream " var x: (array int 3)\n")
8804 (write _test-input-stream " var y/eax: (addr array int) <- address x\n")
8805 (write _test-input-stream "}\n")
8806
8807 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8808 (flush _test-output-buffered-file)
8809 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8815
8816 (check-next-stream-line-equal _test-error-stream "" "F - test-address-with-right-type-for-array: error message")
8817
8818
8819 89/<- %esp 5/r32/ebp
8820 5d/pop-to-ebp
8821 c3/return
8822
8823 test-address-with-right-type-for-stream:
8824
8825 55/push-ebp
8826 89/<- %ebp 4/r32/esp
8827
8828 (clear-stream _test-input-stream)
8829 (clear-stream $_test-input-buffered-file->buffer)
8830 (clear-stream _test-output-stream)
8831 (clear-stream $_test-output-buffered-file->buffer)
8832
8833 (write _test-input-stream "fn foo {\n")
8834 (write _test-input-stream " var x: (stream int 3)\n")
8835 (write _test-input-stream " var y/eax: (addr stream int) <- address x\n")
8836 (write _test-input-stream "}\n")
8837
8838 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8839 (flush _test-output-buffered-file)
8840 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8846
8847 (check-next-stream-line-equal _test-error-stream "" "F - test-address-with-right-type-for-stream: error message")
8848
8849
8850 89/<- %esp 5/r32/ebp
8851 5d/pop-to-ebp
8852 c3/return
8853
8854 test-get-with-wrong-field:
8855
8856 55/push-ebp
8857 89/<- %ebp 4/r32/esp
8858
8859 (clear-stream _test-input-stream)
8860 (clear-stream $_test-input-buffered-file->buffer)
8861 (clear-stream _test-output-stream)
8862 (clear-stream $_test-output-buffered-file->buffer)
8863 (clear-stream _test-error-stream)
8864 (clear-stream $_test-error-buffered-file->buffer)
8865
8866 68/push 0/imm32
8867 68/push 0/imm32
8868 89/<- %edx 4/r32/esp
8869 (tailor-exit-descriptor %edx 0x10)
8870
8871 (write _test-input-stream "fn foo {\n")
8872 (write _test-input-stream " var a: t\n")
8873 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
8874 (write _test-input-stream "}\n")
8875 (write _test-input-stream "type t {\n")
8876 (write _test-input-stream " x: int\n")
8877 (write _test-input-stream "}\n")
8878
8879 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8880
8881
8882 89/<- %edx 4/r32/esp
8883 (flush _test-output-buffered-file)
8884 (flush _test-error-buffered-file)
8885 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8891
8892 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-field: output should be empty")
8893 (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")
8894
8895 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-field: exit status")
8896
8897 81 0/subop/add %esp 8/imm32
8898
8899 5d/pop-to-ebp
8900 c3/return
8901
8902 test-get-with-wrong-base-type:
8903
8904 55/push-ebp
8905 89/<- %ebp 4/r32/esp
8906
8907 (clear-stream _test-input-stream)
8908 (clear-stream $_test-input-buffered-file->buffer)
8909 (clear-stream _test-output-stream)
8910 (clear-stream $_test-output-buffered-file->buffer)
8911 (clear-stream _test-error-stream)
8912 (clear-stream $_test-error-buffered-file->buffer)
8913
8914 68/push 0/imm32
8915 68/push 0/imm32
8916 89/<- %edx 4/r32/esp
8917 (tailor-exit-descriptor %edx 0x10)
8918
8919 (write _test-input-stream "fn foo {\n")
8920 (write _test-input-stream " var a: int\n")
8921 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
8922 (write _test-input-stream "}\n")
8923
8924 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8925
8926
8927 89/<- %edx 4/r32/esp
8928 (flush _test-output-buffered-file)
8929 (flush _test-error-buffered-file)
8930 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8936
8937 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type: output should be empty")
8938 (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")
8939
8940 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type: exit status")
8941
8942 81 0/subop/add %esp 8/imm32
8943
8944 5d/pop-to-ebp
8945 c3/return
8946
8947 test-get-with-wrong-base-type-2:
8948
8949 55/push-ebp
8950 89/<- %ebp 4/r32/esp
8951
8952 (clear-stream _test-input-stream)
8953 (clear-stream $_test-input-buffered-file->buffer)
8954 (clear-stream _test-output-stream)
8955 (clear-stream $_test-output-buffered-file->buffer)
8956 (clear-stream _test-error-stream)
8957 (clear-stream $_test-error-buffered-file->buffer)
8958
8959 68/push 0/imm32
8960 68/push 0/imm32
8961 89/<- %edx 4/r32/esp
8962 (tailor-exit-descriptor %edx 0x10)
8963
8964 (write _test-input-stream "fn foo {\n")
8965 (write _test-input-stream " var a: (addr t)\n")
8966 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
8967 (write _test-input-stream "}\n")
8968 (write _test-input-stream "type t {\n")
8969 (write _test-input-stream " x: int\n")
8970 (write _test-input-stream "}\n")
8971
8972 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8973
8974
8975 89/<- %edx 4/r32/esp
8976 (flush _test-output-buffered-file)
8977 (flush _test-error-buffered-file)
8978 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8984
8985 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-2: output should be empty")
8986 (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")
8987
8988 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-2: exit status")
8989
8990 81 0/subop/add %esp 8/imm32
8991
8992 5d/pop-to-ebp
8993 c3/return
8994
8995 test-get-with-wrong-base-type-3:
8996
8997 55/push-ebp
8998 89/<- %ebp 4/r32/esp
8999
9000 (clear-stream _test-input-stream)
9001 (clear-stream $_test-input-buffered-file->buffer)
9002 (clear-stream _test-output-stream)
9003 (clear-stream $_test-output-buffered-file->buffer)
9004 (clear-stream _test-error-stream)
9005 (clear-stream $_test-error-buffered-file->buffer)
9006
9007 68/push 0/imm32
9008 68/push 0/imm32
9009 89/<- %edx 4/r32/esp
9010 (tailor-exit-descriptor %edx 0x10)
9011
9012 (write _test-input-stream "fn foo {\n")
9013 (write _test-input-stream " var a: (handle int)\n")
9014 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
9015 (write _test-input-stream "}\n")
9016
9017 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9018
9019
9020 89/<- %edx 4/r32/esp
9021 (flush _test-output-buffered-file)
9022 (flush _test-error-buffered-file)
9023 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9029
9030 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-3: output should be empty")
9031 (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")
9032
9033 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-3: exit status")
9034
9035 81 0/subop/add %esp 8/imm32
9036
9037 5d/pop-to-ebp
9038 c3/return
9039
9040 test-get-with-wrong-offset-type:
9041
9042 55/push-ebp
9043 89/<- %ebp 4/r32/esp
9044
9045 (clear-stream _test-input-stream)
9046 (clear-stream $_test-input-buffered-file->buffer)
9047 (clear-stream _test-output-stream)
9048 (clear-stream $_test-output-buffered-file->buffer)
9049 (clear-stream _test-error-stream)
9050 (clear-stream $_test-error-buffered-file->buffer)
9051
9052 68/push 0/imm32
9053 68/push 0/imm32
9054 89/<- %edx 4/r32/esp
9055 (tailor-exit-descriptor %edx 0x10)
9056
9057 (write _test-input-stream "fn foo {\n")
9058 (write _test-input-stream " var a: t\n")
9059 (write _test-input-stream " var b: int\n")
9060 (write _test-input-stream " var c/ecx: (addr int) <- get a, b\n")
9061 (write _test-input-stream "}\n")
9062 (write _test-input-stream "type t {\n")
9063 (write _test-input-stream " x: int\n")
9064 (write _test-input-stream "}\n")
9065
9066 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9067
9068
9069 89/<- %edx 4/r32/esp
9070 (flush _test-output-buffered-file)
9071 (flush _test-error-buffered-file)
9072 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9078
9079 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-offset-type: output should be empty")
9080 (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")
9081
9082 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-offset-type: exit status")
9083
9084 81 0/subop/add %esp 8/imm32
9085
9086 5d/pop-to-ebp
9087 c3/return
9088
9089 test-get-with-wrong-output-type:
9090
9091 55/push-ebp
9092 89/<- %ebp 4/r32/esp
9093
9094 (clear-stream _test-input-stream)
9095 (clear-stream $_test-input-buffered-file->buffer)
9096 (clear-stream _test-output-stream)
9097 (clear-stream $_test-output-buffered-file->buffer)
9098 (clear-stream _test-error-stream)
9099 (clear-stream $_test-error-buffered-file->buffer)
9100
9101 68/push 0/imm32
9102 68/push 0/imm32
9103 89/<- %edx 4/r32/esp
9104 (tailor-exit-descriptor %edx 0x10)
9105
9106 (write _test-input-stream "fn foo {\n")
9107 (write _test-input-stream " var a: t\n")
9108 (write _test-input-stream " var c: (addr int)\n")
9109 (write _test-input-stream " c <- get a, x\n")
9110 (write _test-input-stream "}\n")
9111 (write _test-input-stream "type t {\n")
9112 (write _test-input-stream " x: int\n")
9113 (write _test-input-stream "}\n")
9114
9115 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9116
9117
9118 89/<- %edx 4/r32/esp
9119 (flush _test-output-buffered-file)
9120 (flush _test-error-buffered-file)
9121 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9127
9128 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type: output should be empty")
9129 (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")
9130
9131 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type: exit status")
9132
9133 81 0/subop/add %esp 8/imm32
9134
9135 5d/pop-to-ebp
9136 c3/return
9137
9138 test-get-with-wrong-output-type-2:
9139
9140 55/push-ebp
9141 89/<- %ebp 4/r32/esp
9142
9143 (clear-stream _test-input-stream)
9144 (clear-stream $_test-input-buffered-file->buffer)
9145 (clear-stream _test-output-stream)
9146 (clear-stream $_test-output-buffered-file->buffer)
9147 (clear-stream _test-error-stream)
9148 (clear-stream $_test-error-buffered-file->buffer)
9149
9150 68/push 0/imm32
9151 68/push 0/imm32
9152 89/<- %edx 4/r32/esp
9153 (tailor-exit-descriptor %edx 0x10)
9154
9155 (write _test-input-stream "fn foo {\n")
9156 (write _test-input-stream " var a: t\n")
9157 (write _test-input-stream " var c/ecx: int <- get a, x\n")
9158 (write _test-input-stream "}\n")
9159 (write _test-input-stream "type t {\n")
9160 (write _test-input-stream " x: int\n")
9161 (write _test-input-stream "}\n")
9162
9163 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9164
9165
9166 89/<- %edx 4/r32/esp
9167 (flush _test-output-buffered-file)
9168 (flush _test-error-buffered-file)
9169 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9175
9176 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-2: output should be empty")
9177 (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")
9178
9179 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-2: exit status")
9180
9181 81 0/subop/add %esp 8/imm32
9182
9183 5d/pop-to-ebp
9184 c3/return
9185
9186 test-get-with-wrong-output-type-3:
9187
9188 55/push-ebp
9189 89/<- %ebp 4/r32/esp
9190
9191 (clear-stream _test-input-stream)
9192 (clear-stream $_test-input-buffered-file->buffer)
9193 (clear-stream _test-output-stream)
9194 (clear-stream $_test-output-buffered-file->buffer)
9195 (clear-stream _test-error-stream)
9196 (clear-stream $_test-error-buffered-file->buffer)
9197
9198 68/push 0/imm32
9199 68/push 0/imm32
9200 89/<- %edx 4/r32/esp
9201 (tailor-exit-descriptor %edx 0x10)
9202
9203 (write _test-input-stream "fn foo {\n")
9204 (write _test-input-stream " var a: t\n")
9205 (write _test-input-stream " var c/ecx: (array int) <- get a, x\n")
9206 (write _test-input-stream "}\n")
9207 (write _test-input-stream "type t {\n")
9208 (write _test-input-stream " x: int\n")
9209 (write _test-input-stream "}\n")
9210
9211 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9212
9213
9214 89/<- %edx 4/r32/esp
9215 (flush _test-output-buffered-file)
9216 (flush _test-error-buffered-file)
9217 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9223
9224 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-3: output should be empty")
9225 (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")
9226
9227 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-3: exit status")
9228
9229 81 0/subop/add %esp 8/imm32
9230
9231 5d/pop-to-ebp
9232 c3/return
9233
9234 test-get-with-wrong-output-type-4:
9235
9236 55/push-ebp
9237 89/<- %ebp 4/r32/esp
9238
9239 (clear-stream _test-input-stream)
9240 (clear-stream $_test-input-buffered-file->buffer)
9241 (clear-stream _test-output-stream)
9242 (clear-stream $_test-output-buffered-file->buffer)
9243 (clear-stream _test-error-stream)
9244 (clear-stream $_test-error-buffered-file->buffer)
9245
9246 68/push 0/imm32
9247 68/push 0/imm32
9248 89/<- %edx 4/r32/esp
9249 (tailor-exit-descriptor %edx 0x10)
9250
9251 (write _test-input-stream "fn foo {\n")
9252 (write _test-input-stream " var a: t\n")
9253 (write _test-input-stream " var c/ecx: (addr boolean) <- get a, x\n")
9254 (write _test-input-stream "}\n")
9255 (write _test-input-stream "type t {\n")
9256 (write _test-input-stream " x: int\n")
9257 (write _test-input-stream "}\n")
9258
9259 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9260
9261
9262 89/<- %edx 4/r32/esp
9263 (flush _test-output-buffered-file)
9264 (flush _test-error-buffered-file)
9265 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9271
9272 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-4: output should be empty")
9273 (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")
9274
9275 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-4: exit status")
9276
9277 81 0/subop/add %esp 8/imm32
9278
9279 5d/pop-to-ebp
9280 c3/return
9281
9282 test-get-with-wrong-output-type-5:
9283
9284 55/push-ebp
9285 89/<- %ebp 4/r32/esp
9286
9287 (clear-stream _test-input-stream)
9288 (clear-stream $_test-input-buffered-file->buffer)
9289 (clear-stream _test-output-stream)
9290 (clear-stream $_test-output-buffered-file->buffer)
9291
9292 (write _test-input-stream "fn foo {\n")
9293 (write _test-input-stream " var a: t\n")
9294 (write _test-input-stream " var c/ecx: (addr handle int) <- get a, x\n")
9295 (write _test-input-stream "}\n")
9296 (write _test-input-stream "type t {\n")
9297 (write _test-input-stream " x: (handle int)\n")
9298 (write _test-input-stream "}\n")
9299
9300 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9301 (flush _test-output-buffered-file)
9302
9303
9304 89/<- %esp 5/r32/ebp
9305 5d/pop-to-ebp
9306 c3/return
9307
9308 test-get-with-too-few-inouts:
9309
9310 55/push-ebp
9311 89/<- %ebp 4/r32/esp
9312
9313 (clear-stream _test-input-stream)
9314 (clear-stream $_test-input-buffered-file->buffer)
9315 (clear-stream _test-output-stream)
9316 (clear-stream $_test-output-buffered-file->buffer)
9317 (clear-stream _test-error-stream)
9318 (clear-stream $_test-error-buffered-file->buffer)
9319
9320 68/push 0/imm32
9321 68/push 0/imm32
9322 89/<- %edx 4/r32/esp
9323 (tailor-exit-descriptor %edx 0x10)
9324
9325 (write _test-input-stream "fn foo {\n")
9326 (write _test-input-stream " var a: t\n")
9327 (write _test-input-stream " var c/ecx: (addr int) <- get a\n")
9328 (write _test-input-stream "}\n")
9329 (write _test-input-stream "type t {\n")
9330 (write _test-input-stream " x: int\n")
9331 (write _test-input-stream "}\n")
9332
9333 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9334
9335
9336 89/<- %edx 4/r32/esp
9337 (flush _test-output-buffered-file)
9338 (flush _test-error-buffered-file)
9339 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9345
9346 (check-stream-equal _test-output-stream "" "F - test-get-with-too-few-inouts: output should be empty")
9347 (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")
9348
9349 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-few-inouts: exit status")
9350
9351 81 0/subop/add %esp 8/imm32
9352
9353 5d/pop-to-ebp
9354 c3/return
9355
9356 test-get-with-too-many-inouts:
9357
9358 55/push-ebp
9359 89/<- %ebp 4/r32/esp
9360
9361 (clear-stream _test-input-stream)
9362 (clear-stream $_test-input-buffered-file->buffer)
9363 (clear-stream _test-output-stream)
9364 (clear-stream $_test-output-buffered-file->buffer)
9365 (clear-stream _test-error-stream)
9366 (clear-stream $_test-error-buffered-file->buffer)
9367
9368 68/push 0/imm32
9369 68/push 0/imm32
9370 89/<- %edx 4/r32/esp
9371 (tailor-exit-descriptor %edx 0x10)
9372
9373 (write _test-input-stream "fn foo {\n")
9374 (write _test-input-stream " var a: t\n")
9375 (write _test-input-stream " var c/ecx: (addr int) <- get a, x, 0\n")
9376 (write _test-input-stream "}\n")
9377 (write _test-input-stream "type t {\n")
9378 (write _test-input-stream " x: int\n")
9379 (write _test-input-stream "}\n")
9380
9381 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9382
9383
9384 89/<- %edx 4/r32/esp
9385 (flush _test-output-buffered-file)
9386 (flush _test-error-buffered-file)
9387 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9393
9394 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-inouts: output should be empty")
9395 (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")
9396
9397 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-inouts: exit status")
9398
9399 81 0/subop/add %esp 8/imm32
9400
9401 5d/pop-to-ebp
9402 c3/return
9403
9404 test-get-with-no-output:
9405
9406 55/push-ebp
9407 89/<- %ebp 4/r32/esp
9408
9409 (clear-stream _test-input-stream)
9410 (clear-stream $_test-input-buffered-file->buffer)
9411 (clear-stream _test-output-stream)
9412 (clear-stream $_test-output-buffered-file->buffer)
9413 (clear-stream _test-error-stream)
9414 (clear-stream $_test-error-buffered-file->buffer)
9415
9416 68/push 0/imm32
9417 68/push 0/imm32
9418 89/<- %edx 4/r32/esp
9419 (tailor-exit-descriptor %edx 0x10)
9420
9421 (write _test-input-stream "fn foo {\n")
9422 (write _test-input-stream " var a: t\n")
9423 (write _test-input-stream " get a, x\n")
9424 (write _test-input-stream "}\n")
9425 (write _test-input-stream "type t {\n")
9426 (write _test-input-stream " x: int\n")
9427 (write _test-input-stream "}\n")
9428
9429 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9430
9431
9432 89/<- %edx 4/r32/esp
9433 (flush _test-output-buffered-file)
9434 (flush _test-error-buffered-file)
9435 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9441
9442 (check-stream-equal _test-output-stream "" "F - test-get-with-no-output: output should be empty")
9443 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: must have an output" "F - test-get-with-no-output: error message")
9444
9445 (check-ints-equal *(edx+4) 2 "F - test-get-with-no-output: exit status")
9446
9447 81 0/subop/add %esp 8/imm32
9448
9449 5d/pop-to-ebp
9450 c3/return
9451
9452 test-get-with-too-many-outputs:
9453
9454 55/push-ebp
9455 89/<- %ebp 4/r32/esp
9456
9457 (clear-stream _test-input-stream)
9458 (clear-stream $_test-input-buffered-file->buffer)
9459 (clear-stream _test-output-stream)
9460 (clear-stream $_test-output-buffered-file->buffer)
9461 (clear-stream _test-error-stream)
9462 (clear-stream $_test-error-buffered-file->buffer)
9463
9464 68/push 0/imm32
9465 68/push 0/imm32
9466 89/<- %edx 4/r32/esp
9467 (tailor-exit-descriptor %edx 0x10)
9468
9469 (write _test-input-stream "fn foo {\n")
9470 (write _test-input-stream " var a: t\n")
9471 (write _test-input-stream " var b: int\n")
9472 (write _test-input-stream " var c/eax: (addr int) <- copy 0\n")
9473 (write _test-input-stream " c, b <- get a, x\n")
9474 (write _test-input-stream "}\n")
9475 (write _test-input-stream "type t {\n")
9476 (write _test-input-stream " x: int\n")
9477 (write _test-input-stream "}\n")
9478
9479 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9480
9481
9482 89/<- %edx 4/r32/esp
9483 (flush _test-output-buffered-file)
9484 (flush _test-error-buffered-file)
9485 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9491
9492 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-outputs: output should be empty")
9493 (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")
9494
9495 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-outputs: exit status")
9496
9497 81 0/subop/add %esp 8/imm32
9498
9499 5d/pop-to-ebp
9500 c3/return
9501
9502 test-convert-array-of-user-defined-types:
9503
9504 55/push-ebp
9505 89/<- %ebp 4/r32/esp
9506
9507 (clear-stream _test-input-stream)
9508 (clear-stream $_test-input-buffered-file->buffer)
9509 (clear-stream _test-output-stream)
9510 (clear-stream $_test-output-buffered-file->buffer)
9511
9512 (write _test-input-stream "type t {\n")
9513 (write _test-input-stream " x: int\n")
9514 (write _test-input-stream " y: int\n")
9515 (write _test-input-stream "}\n")
9516 (write _test-input-stream "fn foo {\n")
9517 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9518 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
9519 (write _test-input-stream " var x/eax: (addr t) <- index arr, idx\n")
9520 (write _test-input-stream "}\n")
9521
9522 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9523 (flush _test-output-buffered-file)
9524 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9530
9531 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-array-of-user-defined-types/0")
9532 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-array-of-user-defined-types/1")
9533 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-array-of-user-defined-types/2")
9534 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-array-of-user-defined-types/3")
9535 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-array-of-user-defined-types/4")
9536 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-array-of-user-defined-types/5")
9537 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-array-of-user-defined-types/6")
9538 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-array-of-user-defined-types/7")
9539 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-array-of-user-defined-types/8")
9540 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-array-of-user-defined-types/9")
9541 (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")
9542 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-array-of-user-defined-types/13")
9543 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-array-of-user-defined-types/14")
9544 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-array-of-user-defined-types/15")
9545 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-array-of-user-defined-types/16")
9546 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-array-of-user-defined-types/17")
9547 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-array-of-user-defined-types/18")
9548 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-array-of-user-defined-types/19")
9549 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-array-of-user-defined-types/20")
9550
9551 89/<- %esp 5/r32/ebp
9552 5d/pop-to-ebp
9553 c3/return
9554
9555 test-convert-length-of-array-of-user-defined-types-to-eax:
9556
9557 55/push-ebp
9558 89/<- %ebp 4/r32/esp
9559
9560 (clear-stream _test-input-stream)
9561 (clear-stream $_test-input-buffered-file->buffer)
9562 (clear-stream _test-output-stream)
9563 (clear-stream $_test-output-buffered-file->buffer)
9564
9565 (write _test-input-stream "type t {\n")
9566 (write _test-input-stream " x: int\n")
9567 (write _test-input-stream " y: int\n")
9568 (write _test-input-stream " z: int\n")
9569 (write _test-input-stream "}\n")
9570 (write _test-input-stream "fn foo {\n")
9571 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9572 (write _test-input-stream " var x/eax: int <- length arr\n")
9573 (write _test-input-stream "}\n")
9574
9575 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9576 (flush _test-output-buffered-file)
9577 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9583
9584 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/0")
9585 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/1")
9586 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/2")
9587 (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")
9588 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-eax/4")
9589 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/5")
9590
9591 (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")
9592 (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")
9593
9594 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/8")
9595 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/9")
9596 (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")
9597 (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")
9598 (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")
9599 (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")
9600 (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")
9601 (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")
9602
9603 (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")
9604
9605 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-eax/17")
9606 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/18")
9607 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/19")
9608 (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")
9609 (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")
9610 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-eax/22")
9611
9612 89/<- %esp 5/r32/ebp
9613 5d/pop-to-ebp
9614 c3/return
9615
9616 test-convert-length-of-array-of-user-defined-types-to-ecx:
9617
9618 55/push-ebp
9619 89/<- %ebp 4/r32/esp
9620
9621 (clear-stream _test-input-stream)
9622 (clear-stream $_test-input-buffered-file->buffer)
9623 (clear-stream _test-output-stream)
9624 (clear-stream $_test-output-buffered-file->buffer)
9625
9626 (write _test-input-stream "type t {\n")
9627 (write _test-input-stream " x: int\n")
9628 (write _test-input-stream " y: int\n")
9629 (write _test-input-stream " z: int\n")
9630 (write _test-input-stream "}\n")
9631 (write _test-input-stream "fn foo {\n")
9632 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9633 (write _test-input-stream " var x/ecx: int <- length arr\n")
9634 (write _test-input-stream "}\n")
9635
9636 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9637 (flush _test-output-buffered-file)
9638 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9644
9645 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/0")
9646 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/1")
9647 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/2")
9648 (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")
9649 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/4")
9650 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/5")
9651
9652 (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")
9653 (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")
9654
9655 (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")
9656
9657 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/9")
9658 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/10")
9659 (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")
9660 (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")
9661 (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")
9662 (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")
9663 (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")
9664 (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")
9665 (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")
9666
9667 (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")
9668
9669 (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")
9670
9671 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/20")
9672 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/21")
9673 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/22")
9674 (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")
9675 (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")
9676 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/25")
9677
9678 89/<- %esp 5/r32/ebp
9679 5d/pop-to-ebp
9680 c3/return
9681
9682 test-convert-length-of-array-of-user-defined-types-to-edx:
9683
9684 55/push-ebp
9685 89/<- %ebp 4/r32/esp
9686
9687 (clear-stream _test-input-stream)
9688 (clear-stream $_test-input-buffered-file->buffer)
9689 (clear-stream _test-output-stream)
9690 (clear-stream $_test-output-buffered-file->buffer)
9691
9692 (write _test-input-stream "type t {\n")
9693 (write _test-input-stream " x: int\n")
9694 (write _test-input-stream " y: int\n")
9695 (write _test-input-stream " z: int\n")
9696 (write _test-input-stream "}\n")
9697 (write _test-input-stream "fn foo {\n")
9698 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9699 (write _test-input-stream " var x/edx: int <- length arr\n")
9700 (write _test-input-stream "}\n")
9701
9702 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9703 (flush _test-output-buffered-file)
9704 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9710
9711 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/0")
9712 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/1")
9713 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/2")
9714 (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")
9715 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-edx/4")
9716 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/5")
9717
9718 (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")
9719 (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")
9720
9721 (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")
9722
9723 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/9")
9724 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/10")
9725 (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")
9726 (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")
9727 (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")
9728 (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")
9729 (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")
9730 (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")
9731 (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")
9732
9733 (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")
9734
9735 (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")
9736
9737 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-edx/20")
9738 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/21")
9739 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/22")
9740 (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")
9741 (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")
9742 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-edx/25")
9743
9744 89/<- %esp 5/r32/ebp
9745 5d/pop-to-ebp
9746 c3/return
9747
9748 test-convert-length-of-array-of-user-defined-types:
9749
9750 55/push-ebp
9751 89/<- %ebp 4/r32/esp
9752
9753 (clear-stream _test-input-stream)
9754 (clear-stream $_test-input-buffered-file->buffer)
9755 (clear-stream _test-output-stream)
9756 (clear-stream $_test-output-buffered-file->buffer)
9757
9758 (write _test-input-stream "type t {\n")
9759 (write _test-input-stream " x: int\n")
9760 (write _test-input-stream " y: int\n")
9761 (write _test-input-stream " z: int\n")
9762 (write _test-input-stream "}\n")
9763 (write _test-input-stream "fn foo {\n")
9764 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
9765 (write _test-input-stream " var x/ebx: int <- length arr\n")
9766 (write _test-input-stream "}\n")
9767
9768 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9769 (flush _test-output-buffered-file)
9770 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9776
9777 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types/0")
9778 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types/1")
9779 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types/2")
9780 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types/3")
9781 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types/4")
9782 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types/5")
9783 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types/6")
9784 (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")
9785 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-length-of-array-of-user-defined-types/8")
9786 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types/9")
9787 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types/10")
9788 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types/11")
9789 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types/12")
9790 (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")
9791 (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")
9792 (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")
9793 (check-next-stream-line-equal _test-output-stream " 89/<- %ebx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types/16")
9794 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types/17")
9795 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types/18")
9796 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types/19")
9797 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ebx" "F - test-convert-length-of-array-of-user-defined-types/20")
9798 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types/21")
9799 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types/22")
9800 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types/23")
9801 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types/24")
9802 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types/25")
9803 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types/26")
9804 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types/27")
9805
9806 89/<- %esp 5/r32/ebp
9807 5d/pop-to-ebp
9808 c3/return
9809
9810 test-index-with-non-array-atom-base-type:
9811
9812 55/push-ebp
9813 89/<- %ebp 4/r32/esp
9814
9815 (clear-stream _test-input-stream)
9816 (clear-stream $_test-input-buffered-file->buffer)
9817 (clear-stream _test-output-stream)
9818 (clear-stream $_test-output-buffered-file->buffer)
9819 (clear-stream _test-error-stream)
9820 (clear-stream $_test-error-buffered-file->buffer)
9821
9822 68/push 0/imm32
9823 68/push 0/imm32
9824 89/<- %edx 4/r32/esp
9825 (tailor-exit-descriptor %edx 0x10)
9826
9827 (write _test-input-stream "fn foo {\n")
9828 (write _test-input-stream " var a: int\n")
9829 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9830 (write _test-input-stream "}\n")
9831
9832 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9833
9834
9835 89/<- %edx 4/r32/esp
9836 (flush _test-output-buffered-file)
9837 (flush _test-error-buffered-file)
9838 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9844
9845 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-atom-base-type: output should be empty")
9846 (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")
9847
9848 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-atom-base-type: exit status")
9849
9850 81 0/subop/add %esp 8/imm32
9851
9852 5d/pop-to-ebp
9853 c3/return
9854
9855 test-index-with-non-array-compound-base-type:
9856
9857 55/push-ebp
9858 89/<- %ebp 4/r32/esp
9859
9860 (clear-stream _test-input-stream)
9861 (clear-stream $_test-input-buffered-file->buffer)
9862 (clear-stream _test-output-stream)
9863 (clear-stream $_test-output-buffered-file->buffer)
9864 (clear-stream _test-error-stream)
9865 (clear-stream $_test-error-buffered-file->buffer)
9866
9867 68/push 0/imm32
9868 68/push 0/imm32
9869 89/<- %edx 4/r32/esp
9870 (tailor-exit-descriptor %edx 0x10)
9871
9872 (write _test-input-stream "fn foo {\n")
9873 (write _test-input-stream " var a: (handle int)\n")
9874 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9875 (write _test-input-stream "}\n")
9876
9877 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9878
9879
9880 89/<- %edx 4/r32/esp
9881 (flush _test-output-buffered-file)
9882 (flush _test-error-buffered-file)
9883 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9889
9890 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type: output should be empty")
9891 (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")
9892
9893 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type: exit status")
9894
9895 81 0/subop/add %esp 8/imm32
9896
9897 5d/pop-to-ebp
9898 c3/return
9899
9900 test-index-with-non-array-compound-base-type-2:
9901
9902 55/push-ebp
9903 89/<- %ebp 4/r32/esp
9904
9905 (clear-stream _test-input-stream)
9906 (clear-stream $_test-input-buffered-file->buffer)
9907 (clear-stream _test-output-stream)
9908 (clear-stream $_test-output-buffered-file->buffer)
9909 (clear-stream _test-error-stream)
9910 (clear-stream $_test-error-buffered-file->buffer)
9911
9912 68/push 0/imm32
9913 68/push 0/imm32
9914 89/<- %edx 4/r32/esp
9915 (tailor-exit-descriptor %edx 0x10)
9916
9917 (write _test-input-stream "fn foo {\n")
9918 (write _test-input-stream " var a: (addr int)\n")
9919 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9920 (write _test-input-stream "}\n")
9921
9922 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9923
9924
9925 89/<- %edx 4/r32/esp
9926 (flush _test-output-buffered-file)
9927 (flush _test-error-buffered-file)
9928 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9934
9935 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type-2: output should be empty")
9936 (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")
9937
9938 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type-2: exit status")
9939
9940 81 0/subop/add %esp 8/imm32
9941
9942 5d/pop-to-ebp
9943 c3/return
9944
9945 test-index-with-array-atom-base-type:
9946
9947 55/push-ebp
9948 89/<- %ebp 4/r32/esp
9949
9950 (clear-stream _test-input-stream)
9951 (clear-stream $_test-input-buffered-file->buffer)
9952 (clear-stream _test-output-stream)
9953 (clear-stream $_test-output-buffered-file->buffer)
9954 (clear-stream _test-error-stream)
9955 (clear-stream $_test-error-buffered-file->buffer)
9956
9957 68/push 0/imm32
9958 68/push 0/imm32
9959 89/<- %edx 4/r32/esp
9960 (tailor-exit-descriptor %edx 0x10)
9961
9962 (write _test-input-stream "fn foo {\n")
9963 (write _test-input-stream " var a: array\n")
9964 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
9965 (write _test-input-stream "}\n")
9966
9967 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9968
9969
9970 89/<- %edx 4/r32/esp
9971 (flush _test-output-buffered-file)
9972 (flush _test-error-buffered-file)
9973 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9979
9980 (check-stream-equal _test-output-stream "" "F - test-index-with-array-atom-base-type: output should be empty")
9981 (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")
9982
9983 (check-ints-equal *(edx+4) 2 "F - test-index-with-array-atom-base-type: exit status")
9984
9985 81 0/subop/add %esp 8/imm32
9986
9987 5d/pop-to-ebp
9988 c3/return
9989
9990 test-index-with-addr-base-on-stack:
9991
9992 55/push-ebp
9993 89/<- %ebp 4/r32/esp
9994
9995 (clear-stream _test-input-stream)
9996 (clear-stream $_test-input-buffered-file->buffer)
9997 (clear-stream _test-output-stream)
9998 (clear-stream $_test-output-buffered-file->buffer)
9999 (clear-stream _test-error-stream)
10000 (clear-stream $_test-error-buffered-file->buffer)
10001
10002 68/push 0/imm32
10003 68/push 0/imm32
10004 89/<- %edx 4/r32/esp
10005 (tailor-exit-descriptor %edx 0x10)
10006
10007 (write _test-input-stream "fn foo {\n")
10008 (write _test-input-stream " var a: (addr array int)\n")
10009 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
10010 (write _test-input-stream "}\n")
10011
10012 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10013
10014
10015 89/<- %edx 4/r32/esp
10016 (flush _test-output-buffered-file)
10017 (flush _test-error-buffered-file)
10018 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10024
10025 (check-stream-equal _test-output-stream "" "F - test-index-with-addr-base-on-stack: output should be empty")
10026 (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")
10027
10028 (check-ints-equal *(edx+4) 2 "F - test-index-with-addr-base-on-stack: exit status")
10029
10030 81 0/subop/add %esp 8/imm32
10031
10032 5d/pop-to-ebp
10033 c3/return
10034
10035 test-index-with-wrong-index-type:
10036
10037 55/push-ebp
10038 89/<- %ebp 4/r32/esp
10039
10040 (clear-stream _test-input-stream)
10041 (clear-stream $_test-input-buffered-file->buffer)
10042 (clear-stream _test-output-stream)
10043 (clear-stream $_test-output-buffered-file->buffer)
10044 (clear-stream _test-error-stream)
10045 (clear-stream $_test-error-buffered-file->buffer)
10046
10047 68/push 0/imm32
10048 68/push 0/imm32
10049 89/<- %edx 4/r32/esp
10050 (tailor-exit-descriptor %edx 0x10)
10051
10052 (write _test-input-stream "fn foo {\n")
10053 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
10054 (write _test-input-stream " var b: boolean\n")
10055 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
10056 (write _test-input-stream "}\n")
10057
10058 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10059
10060
10061 89/<- %edx 4/r32/esp
10062 (flush _test-output-buffered-file)
10063 (flush _test-error-buffered-file)
10064 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10070
10071 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-index-type: output should be empty")
10072 (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")
10073
10074 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-index-type: exit status")
10075
10076 81 0/subop/add %esp 8/imm32
10077
10078 5d/pop-to-ebp
10079 c3/return
10080
10081 test-index-with-offset-atom-index-type:
10082
10083 55/push-ebp
10084 89/<- %ebp 4/r32/esp
10085
10086 (clear-stream _test-input-stream)
10087 (clear-stream $_test-input-buffered-file->buffer)
10088 (clear-stream _test-output-stream)
10089 (clear-stream $_test-output-buffered-file->buffer)
10090 (clear-stream _test-error-stream)
10091 (clear-stream $_test-error-buffered-file->buffer)
10092
10093 68/push 0/imm32
10094 68/push 0/imm32
10095 89/<- %edx 4/r32/esp
10096 (tailor-exit-descriptor %edx 0x10)
10097
10098 (write _test-input-stream "fn foo {\n")
10099 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
10100 (write _test-input-stream " var b: offset\n")
10101 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
10102 (write _test-input-stream "}\n")
10103
10104 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10105
10106
10107 89/<- %edx 4/r32/esp
10108 (flush _test-output-buffered-file)
10109 (flush _test-error-buffered-file)
10110 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10116
10117 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-atom-index-type: output should be empty")
10118 (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")
10119
10120 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-atom-index-type: exit status")
10121
10122 81 0/subop/add %esp 8/imm32
10123
10124 5d/pop-to-ebp
10125 c3/return
10126
10127 test-index-with-offset-on-stack:
10128
10129 55/push-ebp
10130 89/<- %ebp 4/r32/esp
10131
10132 (clear-stream _test-input-stream)
10133 (clear-stream $_test-input-buffered-file->buffer)
10134 (clear-stream _test-output-stream)
10135 (clear-stream $_test-output-buffered-file->buffer)
10136 (clear-stream _test-error-stream)
10137 (clear-stream $_test-error-buffered-file->buffer)
10138
10139 68/push 0/imm32
10140 68/push 0/imm32
10141 89/<- %edx 4/r32/esp
10142 (tailor-exit-descriptor %edx 0x10)
10143
10144 (write _test-input-stream "fn foo {\n")
10145 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
10146 (write _test-input-stream " var b: int\n")
10147 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
10148 (write _test-input-stream "}\n")
10149
10150 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10151
10152
10153 89/<- %edx 4/r32/esp
10154 (flush _test-output-buffered-file)
10155 (flush _test-error-buffered-file)
10156 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10162
10163 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-on-stack: output should be empty")
10164 (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")
10165
10166 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-on-stack: exit status")
10167
10168 81 0/subop/add %esp 8/imm32
10169
10170 5d/pop-to-ebp
10171 c3/return
10172
10173 test-index-needs-offset-type:
10174
10175 55/push-ebp
10176 89/<- %ebp 4/r32/esp
10177
10178 (clear-stream _test-input-stream)
10179 (clear-stream $_test-input-buffered-file->buffer)
10180 (clear-stream _test-output-stream)
10181 (clear-stream $_test-output-buffered-file->buffer)
10182 (clear-stream _test-error-stream)
10183 (clear-stream $_test-error-buffered-file->buffer)
10184
10185 68/push 0/imm32
10186 68/push 0/imm32
10187 89/<- %edx 4/r32/esp
10188 (tailor-exit-descriptor %edx 0x10)
10189
10190 (write _test-input-stream "fn foo {\n")
10191 (write _test-input-stream " var a/eax: (addr array t) <- copy 0\n")
10192 (write _test-input-stream " var b/ebx: int <- copy 0\n")
10193 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
10194 (write _test-input-stream "}\n")
10195 (write _test-input-stream "type t {\n")
10196 (write _test-input-stream " x: int\n")
10197 (write _test-input-stream " y: int\n")
10198 (write _test-input-stream " z: int\n")
10199 (write _test-input-stream "}\n")
10200
10201 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10202
10203
10204 89/<- %edx 4/r32/esp
10205 (flush _test-output-buffered-file)
10206 (flush _test-error-buffered-file)
10207 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10213
10214 (check-stream-equal _test-output-stream "" "F - test-index-needs-offset-type: output should be empty")
10215 (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")
10216
10217 (check-ints-equal *(edx+4) 2 "F - test-index-needs-offset-type: exit status")
10218
10219 81 0/subop/add %esp 8/imm32
10220
10221 5d/pop-to-ebp
10222 c3/return
10223
10224 test-index-with-output-not-address:
10225
10226 55/push-ebp
10227 89/<- %ebp 4/r32/esp
10228
10229 (clear-stream _test-input-stream)
10230 (clear-stream $_test-input-buffered-file->buffer)
10231 (clear-stream _test-output-stream)
10232 (clear-stream $_test-output-buffered-file->buffer)
10233 (clear-stream _test-error-stream)
10234 (clear-stream $_test-error-buffered-file->buffer)
10235
10236 68/push 0/imm32
10237 68/push 0/imm32
10238 89/<- %edx 4/r32/esp
10239 (tailor-exit-descriptor %edx 0x10)
10240
10241 (write _test-input-stream "fn foo {\n")
10242 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10243 (write _test-input-stream " var o/edi: int <- index a, 0\n")
10244 (write _test-input-stream "}\n")
10245
10246 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10247
10248
10249 89/<- %edx 4/r32/esp
10250 (flush _test-output-buffered-file)
10251 (flush _test-error-buffered-file)
10252 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10258
10259 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address: output should be empty")
10260 (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")
10261
10262 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address: exit status")
10263
10264 81 0/subop/add %esp 8/imm32
10265
10266 5d/pop-to-ebp
10267 c3/return
10268
10269 test-index-with-output-not-address-2:
10270
10271 55/push-ebp
10272 89/<- %ebp 4/r32/esp
10273
10274 (clear-stream _test-input-stream)
10275 (clear-stream $_test-input-buffered-file->buffer)
10276 (clear-stream _test-output-stream)
10277 (clear-stream $_test-output-buffered-file->buffer)
10278 (clear-stream _test-error-stream)
10279 (clear-stream $_test-error-buffered-file->buffer)
10280
10281 68/push 0/imm32
10282 68/push 0/imm32
10283 89/<- %edx 4/r32/esp
10284 (tailor-exit-descriptor %edx 0x10)
10285
10286 (write _test-input-stream "fn foo {\n")
10287 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10288 (write _test-input-stream " var o/edi: (int) <- index a, 0\n")
10289 (write _test-input-stream "}\n")
10290
10291 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10292
10293
10294 89/<- %edx 4/r32/esp
10295 (flush _test-output-buffered-file)
10296 (flush _test-error-buffered-file)
10297 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10303
10304 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address-2: output should be empty")
10305 (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")
10306
10307 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address-2: exit status")
10308
10309 81 0/subop/add %esp 8/imm32
10310
10311 5d/pop-to-ebp
10312 c3/return
10313
10314 test-index-with-wrong-output-type:
10315
10316 55/push-ebp
10317 89/<- %ebp 4/r32/esp
10318
10319 (clear-stream _test-input-stream)
10320 (clear-stream $_test-input-buffered-file->buffer)
10321 (clear-stream _test-output-stream)
10322 (clear-stream $_test-output-buffered-file->buffer)
10323 (clear-stream _test-error-stream)
10324 (clear-stream $_test-error-buffered-file->buffer)
10325
10326 68/push 0/imm32
10327 68/push 0/imm32
10328 89/<- %edx 4/r32/esp
10329 (tailor-exit-descriptor %edx 0x10)
10330
10331 (write _test-input-stream "fn foo {\n")
10332 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10333 (write _test-input-stream " var o/edi: (addr int) <- index a, 0\n")
10334 (write _test-input-stream "}\n")
10335
10336 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10337
10338
10339 89/<- %edx 4/r32/esp
10340 (flush _test-output-buffered-file)
10341 (flush _test-error-buffered-file)
10342 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10348
10349 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-type: output should be empty")
10350 (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")
10351
10352 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-type: exit status")
10353
10354 81 0/subop/add %esp 8/imm32
10355
10356 5d/pop-to-ebp
10357 c3/return
10358
10359 test-index-with-wrong-output-compound-type:
10360
10361 55/push-ebp
10362 89/<- %ebp 4/r32/esp
10363
10364 (clear-stream _test-input-stream)
10365 (clear-stream $_test-input-buffered-file->buffer)
10366 (clear-stream _test-output-stream)
10367 (clear-stream $_test-output-buffered-file->buffer)
10368 (clear-stream _test-error-stream)
10369 (clear-stream $_test-error-buffered-file->buffer)
10370
10371 68/push 0/imm32
10372 68/push 0/imm32
10373 89/<- %edx 4/r32/esp
10374 (tailor-exit-descriptor %edx 0x10)
10375
10376 (write _test-input-stream "fn foo {\n")
10377 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
10378 (write _test-input-stream " var o/edi: (addr handle int) <- index a, 0\n")
10379 (write _test-input-stream "}\n")
10380
10381 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10382
10383
10384 89/<- %edx 4/r32/esp
10385 (flush _test-output-buffered-file)
10386 (flush _test-error-buffered-file)
10387 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10393
10394 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-compound-type: output should be empty")
10395 (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")
10396
10397 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-compound-type: exit status")
10398
10399 81 0/subop/add %esp 8/imm32
10400
10401 5d/pop-to-ebp
10402 c3/return
10403
10404 test-index-with-no-inouts:
10405
10406 55/push-ebp
10407 89/<- %ebp 4/r32/esp
10408
10409 (clear-stream _test-input-stream)
10410 (clear-stream $_test-input-buffered-file->buffer)
10411 (clear-stream _test-output-stream)
10412 (clear-stream $_test-output-buffered-file->buffer)
10413 (clear-stream _test-error-stream)
10414 (clear-stream $_test-error-buffered-file->buffer)
10415
10416 68/push 0/imm32
10417 68/push 0/imm32
10418 89/<- %edx 4/r32/esp
10419 (tailor-exit-descriptor %edx 0x10)
10420
10421 (write _test-input-stream "fn foo {\n")
10422 (write _test-input-stream " var c/ecx: (addr int) <- index\n")
10423 (write _test-input-stream "}\n")
10424
10425 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10426
10427
10428 89/<- %edx 4/r32/esp
10429 (flush _test-output-buffered-file)
10430 (flush _test-error-buffered-file)
10431 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10437
10438 (check-stream-equal _test-output-stream "" "F - test-index-with-no-inouts: output should be empty")
10439 (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")
10440
10441 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-inouts: exit status")
10442
10443 81 0/subop/add %esp 8/imm32
10444
10445 5d/pop-to-ebp
10446 c3/return
10447
10448 test-index-with-too-few-inouts:
10449
10450 55/push-ebp
10451 89/<- %ebp 4/r32/esp
10452
10453 (clear-stream _test-input-stream)
10454 (clear-stream $_test-input-buffered-file->buffer)
10455 (clear-stream _test-output-stream)
10456 (clear-stream $_test-output-buffered-file->buffer)
10457 (clear-stream _test-error-stream)
10458 (clear-stream $_test-error-buffered-file->buffer)
10459
10460 68/push 0/imm32
10461 68/push 0/imm32
10462 89/<- %edx 4/r32/esp
10463 (tailor-exit-descriptor %edx 0x10)
10464
10465 (write _test-input-stream "fn foo {\n")
10466 (write _test-input-stream " var a: (array int 3)\n")
10467 (write _test-input-stream " var c/ecx: (addr int) <- index a\n")
10468 (write _test-input-stream "}\n")
10469
10470 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10471
10472
10473 89/<- %edx 4/r32/esp
10474 (flush _test-output-buffered-file)
10475 (flush _test-error-buffered-file)
10476 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10482
10483 (check-stream-equal _test-output-stream "" "F - test-index-with-too-few-inouts: output should be empty")
10484 (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")
10485
10486 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-few-inouts: exit status")
10487
10488 81 0/subop/add %esp 8/imm32
10489
10490 5d/pop-to-ebp
10491 c3/return
10492
10493 test-index-with-too-many-inouts:
10494
10495 55/push-ebp
10496 89/<- %ebp 4/r32/esp
10497
10498 (clear-stream _test-input-stream)
10499 (clear-stream $_test-input-buffered-file->buffer)
10500 (clear-stream _test-output-stream)
10501 (clear-stream $_test-output-buffered-file->buffer)
10502 (clear-stream _test-error-stream)
10503 (clear-stream $_test-error-buffered-file->buffer)
10504
10505 68/push 0/imm32
10506 68/push 0/imm32
10507 89/<- %edx 4/r32/esp
10508 (tailor-exit-descriptor %edx 0x10)
10509
10510 (write _test-input-stream "fn foo {\n")
10511 (write _test-input-stream " var a: (array int 3)\n")
10512 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0, 0\n")
10513 (write _test-input-stream "}\n")
10514
10515 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10516
10517
10518 89/<- %edx 4/r32/esp
10519 (flush _test-output-buffered-file)
10520 (flush _test-error-buffered-file)
10521 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10527
10528 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-inouts: output should be empty")
10529 (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")
10530
10531 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-inouts: exit status")
10532
10533 81 0/subop/add %esp 8/imm32
10534
10535 5d/pop-to-ebp
10536 c3/return
10537
10538 test-index-with-no-output:
10539
10540 55/push-ebp
10541 89/<- %ebp 4/r32/esp
10542
10543 (clear-stream _test-input-stream)
10544 (clear-stream $_test-input-buffered-file->buffer)
10545 (clear-stream _test-output-stream)
10546 (clear-stream $_test-output-buffered-file->buffer)
10547 (clear-stream _test-error-stream)
10548 (clear-stream $_test-error-buffered-file->buffer)
10549
10550 68/push 0/imm32
10551 68/push 0/imm32
10552 89/<- %edx 4/r32/esp
10553 (tailor-exit-descriptor %edx 0x10)
10554
10555 (write _test-input-stream "fn foo {\n")
10556 (write _test-input-stream " var a: (array int 3)\n")
10557 (write _test-input-stream " index a, 0\n")
10558 (write _test-input-stream "}\n")
10559
10560 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10561
10562
10563 89/<- %edx 4/r32/esp
10564 (flush _test-output-buffered-file)
10565 (flush _test-error-buffered-file)
10566 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10572
10573 (check-stream-equal _test-output-stream "" "F - test-index-with-no-output: output should be empty")
10574 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: must have an output" "F - test-index-with-no-output: error message")
10575
10576 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-output: exit status")
10577
10578 81 0/subop/add %esp 8/imm32
10579
10580 5d/pop-to-ebp
10581 c3/return
10582
10583 test-index-with-too-many-outputs:
10584
10585 55/push-ebp
10586 89/<- %ebp 4/r32/esp
10587
10588 (clear-stream _test-input-stream)
10589 (clear-stream $_test-input-buffered-file->buffer)
10590 (clear-stream _test-output-stream)
10591 (clear-stream $_test-output-buffered-file->buffer)
10592 (clear-stream _test-error-stream)
10593 (clear-stream $_test-error-buffered-file->buffer)
10594
10595 68/push 0/imm32
10596 68/push 0/imm32
10597 89/<- %edx 4/r32/esp
10598 (tailor-exit-descriptor %edx 0x10)
10599
10600 (write _test-input-stream "fn foo {\n")
10601 (write _test-input-stream " var a: (array int 3)\n")
10602 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
10603 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
10604 (write _test-input-stream " b, c <- index a, 0\n")
10605 (write _test-input-stream "}\n")
10606
10607 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10608
10609
10610 89/<- %edx 4/r32/esp
10611 (flush _test-output-buffered-file)
10612 (flush _test-error-buffered-file)
10613 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10619
10620 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-outputs: output should be empty")
10621 (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")
10622
10623 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-outputs: exit status")
10624
10625 81 0/subop/add %esp 8/imm32
10626
10627 5d/pop-to-ebp
10628 c3/return
10629
10630 test-compute-offset-with-non-array-atom-base-type:
10631
10632 55/push-ebp
10633 89/<- %ebp 4/r32/esp
10634
10635 (clear-stream _test-input-stream)
10636 (clear-stream $_test-input-buffered-file->buffer)
10637 (clear-stream _test-output-stream)
10638 (clear-stream $_test-output-buffered-file->buffer)
10639 (clear-stream _test-error-stream)
10640 (clear-stream $_test-error-buffered-file->buffer)
10641
10642 68/push 0/imm32
10643 68/push 0/imm32
10644 89/<- %edx 4/r32/esp
10645 (tailor-exit-descriptor %edx 0x10)
10646
10647 (write _test-input-stream "fn foo {\n")
10648 (write _test-input-stream " var a: int\n")
10649 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
10650 (write _test-input-stream "}\n")
10651
10652 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10653
10654
10655 89/<- %edx 4/r32/esp
10656 (flush _test-output-buffered-file)
10657 (flush _test-error-buffered-file)
10658 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10664
10665 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-atom-base-type: output should be empty")
10666 (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")
10667
10668 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-atom-base-type: exit status")
10669
10670 81 0/subop/add %esp 8/imm32
10671
10672 5d/pop-to-ebp
10673 c3/return
10674
10675 test-compute-offset-with-non-array-compound-base-type:
10676
10677 55/push-ebp
10678 89/<- %ebp 4/r32/esp
10679
10680 (clear-stream _test-input-stream)
10681 (clear-stream $_test-input-buffered-file->buffer)
10682 (clear-stream _test-output-stream)
10683 (clear-stream $_test-output-buffered-file->buffer)
10684 (clear-stream _test-error-stream)
10685 (clear-stream $_test-error-buffered-file->buffer)
10686
10687 68/push 0/imm32
10688 68/push 0/imm32
10689 89/<- %edx 4/r32/esp
10690 (tailor-exit-descriptor %edx 0x10)
10691
10692 (write _test-input-stream "fn foo {\n")
10693 (write _test-input-stream " var a: (handle int)\n")
10694 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
10695 (write _test-input-stream "}\n")
10696
10697 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10698
10699
10700 89/<- %edx 4/r32/esp
10701 (flush _test-output-buffered-file)
10702 (flush _test-error-buffered-file)
10703 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10709
10710 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-compound-base-type: output should be empty")
10711 (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")
10712
10713 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type: exit status")
10714
10715 81 0/subop/add %esp 8/imm32
10716
10717 5d/pop-to-ebp
10718 c3/return
10719
10720 test-compute-offset-with-non-array-compound-base-type-2:
10721
10722 55/push-ebp
10723 89/<- %ebp 4/r32/esp
10724
10725 (clear-stream _test-input-stream)
10726 (clear-stream $_test-input-buffered-file->buffer)
10727 (clear-stream _test-output-stream)
10728 (clear-stream $_test-output-buffered-file->buffer)
10729 (clear-stream _test-error-stream)
10730 (clear-stream $_test-error-buffered-file->buffer)
10731
10732 68/push 0/imm32
10733 68/push 0/imm32
10734 89/<- %edx 4/r32/esp
10735 (tailor-exit-descriptor %edx 0x10)
10736
10737 (write _test-input-stream "fn foo {\n")
10738 (write _test-input-stream " var a: (addr int)\n")
10739 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
10740 (write _test-input-stream "}\n")
10741
10742 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10743
10744
10745 89/<- %edx 4/r32/esp
10746 (flush _test-output-buffered-file)
10747 (flush _test-error-buffered-file)
10748 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10754
10755 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-compound-base-type-2: output should be empty")
10756 (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")
10757
10758 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type-2: exit status")
10759
10760 81 0/subop/add %esp 8/imm32
10761
10762 5d/pop-to-ebp
10763 c3/return
10764
10765 test-compute-offset-with-array-atom-base-type:
10766
10767 55/push-ebp
10768 89/<- %ebp 4/r32/esp
10769
10770 (clear-stream _test-input-stream)
10771 (clear-stream $_test-input-buffered-file->buffer)
10772 (clear-stream _test-output-stream)
10773 (clear-stream $_test-output-buffered-file->buffer)
10774 (clear-stream _test-error-stream)
10775 (clear-stream $_test-error-buffered-file->buffer)
10776
10777 68/push 0/imm32
10778 68/push 0/imm32
10779 89/<- %edx 4/r32/esp
10780 (tailor-exit-descriptor %edx 0x10)
10781
10782 (write _test-input-stream "fn foo {\n")
10783 (write _test-input-stream " var a: array\n")
10784 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
10785 (write _test-input-stream "}\n")
10786
10787 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10788
10789
10790 89/<- %edx 4/r32/esp
10791 (flush _test-output-buffered-file)
10792 (flush _test-error-buffered-file)
10793 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10799
10800 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-array-atom-base-type: output should be empty")
10801 (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")
10802
10803 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-array-atom-base-type: exit status")
10804
10805 81 0/subop/add %esp 8/imm32
10806
10807 5d/pop-to-ebp
10808 c3/return
10809
10810 test-compute-offset-with-wrong-index-type:
10811
10812 55/push-ebp
10813 89/<- %ebp 4/r32/esp
10814
10815 (clear-stream _test-input-stream)
10816 (clear-stream $_test-input-buffered-file->buffer)
10817 (clear-stream _test-output-stream)
10818 (clear-stream $_test-output-buffered-file->buffer)
10819 (clear-stream _test-error-stream)
10820 (clear-stream $_test-error-buffered-file->buffer)
10821
10822 68/push 0/imm32
10823 68/push 0/imm32
10824 89/<- %edx 4/r32/esp
10825 (tailor-exit-descriptor %edx 0x10)
10826
10827 (write _test-input-stream "fn foo {\n")
10828 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
10829 (write _test-input-stream " var b: boolean\n")
10830 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, b\n")
10831 (write _test-input-stream "}\n")
10832
10833 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10834
10835
10836 89/<- %edx 4/r32/esp
10837 (flush _test-output-buffered-file)
10838 (flush _test-error-buffered-file)
10839 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10845
10846 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-index-type: output should be empty")
10847 (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")
10848
10849 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-index-type: exit status")
10850
10851 81 0/subop/add %esp 8/imm32
10852
10853 5d/pop-to-ebp
10854 c3/return
10855
10856 test-compute-offset-with-output-not-offset:
10857
10858 55/push-ebp
10859 89/<- %ebp 4/r32/esp
10860
10861 (clear-stream _test-input-stream)
10862 (clear-stream $_test-input-buffered-file->buffer)
10863 (clear-stream _test-output-stream)
10864 (clear-stream $_test-output-buffered-file->buffer)
10865 (clear-stream _test-error-stream)
10866 (clear-stream $_test-error-buffered-file->buffer)
10867
10868 68/push 0/imm32
10869 68/push 0/imm32
10870 89/<- %edx 4/r32/esp
10871 (tailor-exit-descriptor %edx 0x10)
10872
10873 (write _test-input-stream "fn foo {\n")
10874 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10875 (write _test-input-stream " var o/edi: int <- compute-offset a, 0\n")
10876 (write _test-input-stream "}\n")
10877
10878 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10879
10880
10881 89/<- %edx 4/r32/esp
10882 (flush _test-output-buffered-file)
10883 (flush _test-error-buffered-file)
10884 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10890
10891 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-offset: output should be empty")
10892 (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")
10893
10894 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-offset: exit status")
10895
10896 81 0/subop/add %esp 8/imm32
10897
10898 5d/pop-to-ebp
10899 c3/return
10900
10901 test-compute-offset-with-output-not-address-2:
10902
10903 55/push-ebp
10904 89/<- %ebp 4/r32/esp
10905
10906 (clear-stream _test-input-stream)
10907 (clear-stream $_test-input-buffered-file->buffer)
10908 (clear-stream _test-output-stream)
10909 (clear-stream $_test-output-buffered-file->buffer)
10910 (clear-stream _test-error-stream)
10911 (clear-stream $_test-error-buffered-file->buffer)
10912
10913 68/push 0/imm32
10914 68/push 0/imm32
10915 89/<- %edx 4/r32/esp
10916 (tailor-exit-descriptor %edx 0x10)
10917
10918 (write _test-input-stream "fn foo {\n")
10919 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10920 (write _test-input-stream " var o/edi: (int) <- compute-offset a, 0\n")
10921 (write _test-input-stream "}\n")
10922
10923 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10924
10925
10926 89/<- %edx 4/r32/esp
10927 (flush _test-output-buffered-file)
10928 (flush _test-error-buffered-file)
10929 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10935
10936 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-address-2: output should be empty")
10937 (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")
10938
10939 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-address-2: exit status")
10940
10941 81 0/subop/add %esp 8/imm32
10942
10943 5d/pop-to-ebp
10944 c3/return
10945
10946 test-compute-offset-with-wrong-output-type:
10947
10948 55/push-ebp
10949 89/<- %ebp 4/r32/esp
10950
10951 (clear-stream _test-input-stream)
10952 (clear-stream $_test-input-buffered-file->buffer)
10953 (clear-stream _test-output-stream)
10954 (clear-stream $_test-output-buffered-file->buffer)
10955 (clear-stream _test-error-stream)
10956 (clear-stream $_test-error-buffered-file->buffer)
10957
10958 68/push 0/imm32
10959 68/push 0/imm32
10960 89/<- %edx 4/r32/esp
10961 (tailor-exit-descriptor %edx 0x10)
10962
10963 (write _test-input-stream "fn foo {\n")
10964 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
10965 (write _test-input-stream " var o/edi: (offset int) <- compute-offset a, 0\n")
10966 (write _test-input-stream "}\n")
10967
10968 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10969
10970
10971 89/<- %edx 4/r32/esp
10972 (flush _test-output-buffered-file)
10973 (flush _test-error-buffered-file)
10974 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
10980
10981 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-type: output should be empty")
10982 (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")
10983
10984 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-type: exit status")
10985
10986 81 0/subop/add %esp 8/imm32
10987
10988 5d/pop-to-ebp
10989 c3/return
10990
10991 test-compute-offset-with-wrong-output-compound-type:
10992
10993 55/push-ebp
10994 89/<- %ebp 4/r32/esp
10995
10996 (clear-stream _test-input-stream)
10997 (clear-stream $_test-input-buffered-file->buffer)
10998 (clear-stream _test-output-stream)
10999 (clear-stream $_test-output-buffered-file->buffer)
11000 (clear-stream _test-error-stream)
11001 (clear-stream $_test-error-buffered-file->buffer)
11002
11003 68/push 0/imm32
11004 68/push 0/imm32
11005 89/<- %edx 4/r32/esp
11006 (tailor-exit-descriptor %edx 0x10)
11007
11008 (write _test-input-stream "fn foo {\n")
11009 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
11010 (write _test-input-stream " var o/edi: (offset handle int) <- compute-offset a, 0\n")
11011 (write _test-input-stream "}\n")
11012
11013 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11014
11015
11016 89/<- %edx 4/r32/esp
11017 (flush _test-output-buffered-file)
11018 (flush _test-error-buffered-file)
11019 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11025
11026 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-compound-type: output should be empty")
11027 (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")
11028
11029 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-compound-type: exit status")
11030
11031 81 0/subop/add %esp 8/imm32
11032
11033 5d/pop-to-ebp
11034 c3/return
11035
11036 test-compute-offset-with-no-inouts:
11037
11038 55/push-ebp
11039 89/<- %ebp 4/r32/esp
11040
11041 (clear-stream _test-input-stream)
11042 (clear-stream $_test-input-buffered-file->buffer)
11043 (clear-stream _test-output-stream)
11044 (clear-stream $_test-output-buffered-file->buffer)
11045 (clear-stream _test-error-stream)
11046 (clear-stream $_test-error-buffered-file->buffer)
11047
11048 68/push 0/imm32
11049 68/push 0/imm32
11050 89/<- %edx 4/r32/esp
11051 (tailor-exit-descriptor %edx 0x10)
11052
11053 (write _test-input-stream "fn foo {\n")
11054 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset\n")
11055 (write _test-input-stream "}\n")
11056
11057 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11058
11059
11060 89/<- %edx 4/r32/esp
11061 (flush _test-output-buffered-file)
11062 (flush _test-error-buffered-file)
11063 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11069
11070 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-inouts: output should be empty")
11071 (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")
11072
11073 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-inouts: exit status")
11074
11075 81 0/subop/add %esp 8/imm32
11076
11077 5d/pop-to-ebp
11078 c3/return
11079
11080 test-compute-offset-with-too-few-inouts:
11081
11082 55/push-ebp
11083 89/<- %ebp 4/r32/esp
11084
11085 (clear-stream _test-input-stream)
11086 (clear-stream $_test-input-buffered-file->buffer)
11087 (clear-stream _test-output-stream)
11088 (clear-stream $_test-output-buffered-file->buffer)
11089 (clear-stream _test-error-stream)
11090 (clear-stream $_test-error-buffered-file->buffer)
11091
11092 68/push 0/imm32
11093 68/push 0/imm32
11094 89/<- %edx 4/r32/esp
11095 (tailor-exit-descriptor %edx 0x10)
11096
11097 (write _test-input-stream "fn foo {\n")
11098 (write _test-input-stream " var a: (array int 3)\n")
11099 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a\n")
11100 (write _test-input-stream "}\n")
11101
11102 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11103
11104
11105 89/<- %edx 4/r32/esp
11106 (flush _test-output-buffered-file)
11107 (flush _test-error-buffered-file)
11108 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11114
11115 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-few-inouts: output should be empty")
11116 (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")
11117
11118 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-few-inouts: exit status")
11119
11120 81 0/subop/add %esp 8/imm32
11121
11122 5d/pop-to-ebp
11123 c3/return
11124
11125 test-compute-offset-with-too-many-inouts:
11126
11127 55/push-ebp
11128 89/<- %ebp 4/r32/esp
11129
11130 (clear-stream _test-input-stream)
11131 (clear-stream $_test-input-buffered-file->buffer)
11132 (clear-stream _test-output-stream)
11133 (clear-stream $_test-output-buffered-file->buffer)
11134 (clear-stream _test-error-stream)
11135 (clear-stream $_test-error-buffered-file->buffer)
11136
11137 68/push 0/imm32
11138 68/push 0/imm32
11139 89/<- %edx 4/r32/esp
11140 (tailor-exit-descriptor %edx 0x10)
11141
11142 (write _test-input-stream "fn foo {\n")
11143 (write _test-input-stream " var a: (array int 3)\n")
11144 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0, 0\n")
11145 (write _test-input-stream "}\n")
11146
11147 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11148
11149
11150 89/<- %edx 4/r32/esp
11151 (flush _test-output-buffered-file)
11152 (flush _test-error-buffered-file)
11153 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11159
11160 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-inouts: output should be empty")
11161 (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")
11162
11163 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-inouts: exit status")
11164
11165 81 0/subop/add %esp 8/imm32
11166
11167 5d/pop-to-ebp
11168 c3/return
11169
11170 test-compute-offset-with-no-output:
11171
11172 55/push-ebp
11173 89/<- %ebp 4/r32/esp
11174
11175 (clear-stream _test-input-stream)
11176 (clear-stream $_test-input-buffered-file->buffer)
11177 (clear-stream _test-output-stream)
11178 (clear-stream $_test-output-buffered-file->buffer)
11179 (clear-stream _test-error-stream)
11180 (clear-stream $_test-error-buffered-file->buffer)
11181
11182 68/push 0/imm32
11183 68/push 0/imm32
11184 89/<- %edx 4/r32/esp
11185 (tailor-exit-descriptor %edx 0x10)
11186
11187 (write _test-input-stream "fn foo {\n")
11188 (write _test-input-stream " var a: (array int 3)\n")
11189 (write _test-input-stream " compute-offset a, 0\n")
11190 (write _test-input-stream "}\n")
11191
11192 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11193
11194
11195 89/<- %edx 4/r32/esp
11196 (flush _test-output-buffered-file)
11197 (flush _test-error-buffered-file)
11198 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11204
11205 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-output: output should be empty")
11206 (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")
11207
11208 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-output: exit status")
11209
11210 81 0/subop/add %esp 8/imm32
11211
11212 5d/pop-to-ebp
11213 c3/return
11214
11215 test-compute-offset-with-too-many-outputs:
11216
11217 55/push-ebp
11218 89/<- %ebp 4/r32/esp
11219
11220 (clear-stream _test-input-stream)
11221 (clear-stream $_test-input-buffered-file->buffer)
11222 (clear-stream _test-output-stream)
11223 (clear-stream $_test-output-buffered-file->buffer)
11224 (clear-stream _test-error-stream)
11225 (clear-stream $_test-error-buffered-file->buffer)
11226
11227 68/push 0/imm32
11228 68/push 0/imm32
11229 89/<- %edx 4/r32/esp
11230 (tailor-exit-descriptor %edx 0x10)
11231
11232 (write _test-input-stream "fn foo {\n")
11233 (write _test-input-stream " var a: (array int 3)\n")
11234 (write _test-input-stream " var b/eax: (offset int) <- compute-offset a, 0\n")
11235 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
11236 (write _test-input-stream " b, c <- compute-offset a, 0\n")
11237 (write _test-input-stream "}\n")
11238
11239 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11240
11241
11242 89/<- %edx 4/r32/esp
11243 (flush _test-output-buffered-file)
11244 (flush _test-error-buffered-file)
11245 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11251
11252 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-outputs: output should be empty")
11253 (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")
11254
11255 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-outputs: exit status")
11256
11257 81 0/subop/add %esp 8/imm32
11258
11259 5d/pop-to-ebp
11260 c3/return
11261
11262 test-convert-read-from-stream:
11263
11264 55/push-ebp
11265 89/<- %ebp 4/r32/esp
11266
11267 (clear-stream _test-input-stream)
11268 (clear-stream $_test-input-buffered-file->buffer)
11269 (clear-stream _test-output-stream)
11270 (clear-stream $_test-output-buffered-file->buffer)
11271
11272 (write _test-input-stream "fn foo {\n")
11273 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
11274 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
11275 (write _test-input-stream " read-from-stream s, o\n")
11276 (write _test-input-stream "}\n")
11277
11278 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
11279
11280
11281 89/<- %edx 4/r32/esp
11282 (flush _test-output-buffered-file)
11283 (flush _test-error-buffered-file)
11284 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
11290
11291 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream/0")
11292 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream/1")
11293 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream/2")
11294 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream/3")
11295 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream/4")
11296 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream/5")
11297 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream/6")
11298 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-read-from-stream/7")
11299 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream/8")
11300 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-read-from-stream/9")
11301 (check-next-stream-line-equal _test-output-stream " (read-from-stream %esi %ecx 0x00000004)" "F - test-convert-read-from-stream/10")
11302 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream/11")
11303 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream/12")
11304 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream/13")
11305 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream/14")
11306 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream/15")
11307 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream/16")
11308 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream/17")
11309 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream/18")
11310
11311 89/<- %esp 5/r32/ebp
11312 5d/pop-to-ebp
11313 c3/return
11314
11315 test-convert-read-from-stream-with-correct-payload-size:
11316
11317 55/push-ebp
11318 89/<- %ebp 4/r32/esp
11319
11320 (clear-stream _test-input-stream)
11321 (clear-stream $_test-input-buffered-file->buffer)
11322 (clear-stream _test-output-stream)
11323 (clear-stream $_test-output-buffered-file->buffer)
11324
11325 (write _test-input-stream "fn foo {\n")
11326 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
11327 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
11328 (write _test-input-stream " read-from-stream s, o\n")
11329 (write _test-input-stream "}\n")
11330
11331 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
11332
11333
11334 89/<- %edx 4/r32/esp
11335 (flush _test-output-buffered-file)
11336 (flush _test-error-buffered-file)
11337 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
11343
11344 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream-with-correct-payload-size/0")
11345 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream-with-correct-payload-size/1")
11346 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/2")
11347 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream-with-correct-payload-size/3")
11348 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream-with-correct-payload-size/4")
11349 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream-with-correct-payload-size/5")
11350 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream-with-correct-payload-size/6")
11351 (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")
11352 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/8")
11353 (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")
11354 (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")
11355 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/11")
11356 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream-with-correct-payload-size/12")
11357 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream-with-correct-payload-size/13")
11358 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream-with-correct-payload-size/14")
11359 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream-with-correct-payload-size/15")
11360 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream-with-correct-payload-size/16")
11361 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/17")
11362 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream-with-correct-payload-size/18")
11363
11364 89/<- %esp 5/r32/ebp
11365 5d/pop-to-ebp
11366 c3/return
11367
11368 test-read-from-stream-with-non-stream-atom-base-type:
11369
11370 55/push-ebp
11371 89/<- %ebp 4/r32/esp
11372
11373 (clear-stream _test-input-stream)
11374 (clear-stream $_test-input-buffered-file->buffer)
11375 (clear-stream _test-output-stream)
11376 (clear-stream $_test-output-buffered-file->buffer)
11377 (clear-stream _test-error-stream)
11378 (clear-stream $_test-error-buffered-file->buffer)
11379
11380 68/push 0/imm32
11381 68/push 0/imm32
11382 89/<- %edx 4/r32/esp
11383 (tailor-exit-descriptor %edx 0x10)
11384
11385 (write _test-input-stream "fn foo {\n")
11386 (write _test-input-stream " var a: int\n")
11387 (write _test-input-stream " read-from-stream a, 0\n")
11388 (write _test-input-stream "}\n")
11389
11390 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11391
11392
11393 89/<- %edx 4/r32/esp
11394 (flush _test-output-buffered-file)
11395 (flush _test-error-buffered-file)
11396 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11402
11403 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-atom-base-type: output should be empty")
11404 (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")
11405
11406 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-atom-base-type: exit status")
11407
11408 81 0/subop/add %esp 8/imm32
11409
11410 5d/pop-to-ebp
11411 c3/return
11412
11413 test-read-from-stream-with-non-stream-compound-base-type:
11414
11415 55/push-ebp
11416 89/<- %ebp 4/r32/esp
11417
11418 (clear-stream _test-input-stream)
11419 (clear-stream $_test-input-buffered-file->buffer)
11420 (clear-stream _test-output-stream)
11421 (clear-stream $_test-output-buffered-file->buffer)
11422 (clear-stream _test-error-stream)
11423 (clear-stream $_test-error-buffered-file->buffer)
11424
11425 68/push 0/imm32
11426 68/push 0/imm32
11427 89/<- %edx 4/r32/esp
11428 (tailor-exit-descriptor %edx 0x10)
11429
11430 (write _test-input-stream "fn foo {\n")
11431 (write _test-input-stream " var a: (handle int)\n")
11432 (write _test-input-stream " read-from-stream a, 0\n")
11433 (write _test-input-stream "}\n")
11434
11435 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11436
11437
11438 89/<- %edx 4/r32/esp
11439 (flush _test-output-buffered-file)
11440 (flush _test-error-buffered-file)
11441 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11447
11448 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type: output should be empty")
11449 (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")
11450
11451 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type: exit status")
11452
11453 81 0/subop/add %esp 8/imm32
11454
11455 5d/pop-to-ebp
11456 c3/return
11457
11458 test-read-from-stream-with-non-stream-compound-base-type-2:
11459
11460 55/push-ebp
11461 89/<- %ebp 4/r32/esp
11462
11463 (clear-stream _test-input-stream)
11464 (clear-stream $_test-input-buffered-file->buffer)
11465 (clear-stream _test-output-stream)
11466 (clear-stream $_test-output-buffered-file->buffer)
11467 (clear-stream _test-error-stream)
11468 (clear-stream $_test-error-buffered-file->buffer)
11469
11470 68/push 0/imm32
11471 68/push 0/imm32
11472 89/<- %edx 4/r32/esp
11473 (tailor-exit-descriptor %edx 0x10)
11474
11475 (write _test-input-stream "fn foo {\n")
11476 (write _test-input-stream " var a: (addr int)\n")
11477 (write _test-input-stream " read-from-stream a, 0\n")
11478 (write _test-input-stream "}\n")
11479
11480 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11481
11482
11483 89/<- %edx 4/r32/esp
11484 (flush _test-output-buffered-file)
11485 (flush _test-error-buffered-file)
11486 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11492
11493 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type-2: output should be empty")
11494 (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")
11495
11496 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type-2: exit status")
11497
11498 81 0/subop/add %esp 8/imm32
11499
11500 5d/pop-to-ebp
11501 c3/return
11502
11503 test-read-from-stream-with-stream-atom-base-type:
11504
11505 55/push-ebp
11506 89/<- %ebp 4/r32/esp
11507
11508 (clear-stream _test-input-stream)
11509 (clear-stream $_test-input-buffered-file->buffer)
11510 (clear-stream _test-output-stream)
11511 (clear-stream $_test-output-buffered-file->buffer)
11512 (clear-stream _test-error-stream)
11513 (clear-stream $_test-error-buffered-file->buffer)
11514
11515 68/push 0/imm32
11516 68/push 0/imm32
11517 89/<- %edx 4/r32/esp
11518 (tailor-exit-descriptor %edx 0x10)
11519
11520 (write _test-input-stream "fn foo {\n")
11521 (write _test-input-stream " var a: stream\n")
11522 (write _test-input-stream " read-from-stream a, 0\n")
11523 (write _test-input-stream "}\n")
11524
11525 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11526
11527
11528 89/<- %edx 4/r32/esp
11529 (flush _test-output-buffered-file)
11530 (flush _test-error-buffered-file)
11531 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11537
11538 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-stream-atom-base-type: output should be empty")
11539 (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")
11540
11541 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-stream-atom-base-type: exit status")
11542
11543 81 0/subop/add %esp 8/imm32
11544
11545 5d/pop-to-ebp
11546 c3/return
11547
11548 test-read-from-stream-with-wrong-index-type:
11549
11550 55/push-ebp
11551 89/<- %ebp 4/r32/esp
11552
11553 (clear-stream _test-input-stream)
11554 (clear-stream $_test-input-buffered-file->buffer)
11555 (clear-stream _test-output-stream)
11556 (clear-stream $_test-output-buffered-file->buffer)
11557 (clear-stream _test-error-stream)
11558 (clear-stream $_test-error-buffered-file->buffer)
11559
11560 68/push 0/imm32
11561 68/push 0/imm32
11562 89/<- %edx 4/r32/esp
11563 (tailor-exit-descriptor %edx 0x10)
11564
11565 (write _test-input-stream "fn foo {\n")
11566 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
11567 (write _test-input-stream " var b: boolean\n")
11568 (write _test-input-stream " read-from-stream a, b\n")
11569 (write _test-input-stream "}\n")
11570
11571 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11572
11573
11574 89/<- %edx 4/r32/esp
11575 (flush _test-output-buffered-file)
11576 (flush _test-error-buffered-file)
11577 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11583
11584 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-wrong-index-type: output should be empty")
11585 (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")
11586
11587 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-wrong-index-type: exit status")
11588
11589 81 0/subop/add %esp 8/imm32
11590
11591 5d/pop-to-ebp
11592 c3/return
11593
11594 test-read-from-stream-with-no-inouts:
11595
11596 55/push-ebp
11597 89/<- %ebp 4/r32/esp
11598
11599 (clear-stream _test-input-stream)
11600 (clear-stream $_test-input-buffered-file->buffer)
11601 (clear-stream _test-output-stream)
11602 (clear-stream $_test-output-buffered-file->buffer)
11603 (clear-stream _test-error-stream)
11604 (clear-stream $_test-error-buffered-file->buffer)
11605
11606 68/push 0/imm32
11607 68/push 0/imm32
11608 89/<- %edx 4/r32/esp
11609 (tailor-exit-descriptor %edx 0x10)
11610
11611 (write _test-input-stream "fn foo {\n")
11612 (write _test-input-stream " read-from-stream\n")
11613 (write _test-input-stream "}\n")
11614
11615 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11616
11617
11618 89/<- %edx 4/r32/esp
11619 (flush _test-output-buffered-file)
11620 (flush _test-error-buffered-file)
11621 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11627
11628 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-no-inouts: output should be empty")
11629 (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")
11630
11631 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-no-inouts: exit status")
11632
11633 81 0/subop/add %esp 8/imm32
11634
11635 5d/pop-to-ebp
11636 c3/return
11637
11638 test-read-from-stream-with-too-few-inouts:
11639
11640 55/push-ebp
11641 89/<- %ebp 4/r32/esp
11642
11643 (clear-stream _test-input-stream)
11644 (clear-stream $_test-input-buffered-file->buffer)
11645 (clear-stream _test-output-stream)
11646 (clear-stream $_test-output-buffered-file->buffer)
11647 (clear-stream _test-error-stream)
11648 (clear-stream $_test-error-buffered-file->buffer)
11649
11650 68/push 0/imm32
11651 68/push 0/imm32
11652 89/<- %edx 4/r32/esp
11653 (tailor-exit-descriptor %edx 0x10)
11654
11655 (write _test-input-stream "fn foo {\n")
11656 (write _test-input-stream " var a: (addr stream int)\n")
11657 (write _test-input-stream " read-from-stream a\n")
11658 (write _test-input-stream "}\n")
11659
11660 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11661
11662
11663 89/<- %edx 4/r32/esp
11664 (flush _test-output-buffered-file)
11665 (flush _test-error-buffered-file)
11666 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11672
11673 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-few-inouts: output should be empty")
11674 (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")
11675
11676 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-few-inouts: exit status")
11677
11678 81 0/subop/add %esp 8/imm32
11679
11680 5d/pop-to-ebp
11681 c3/return
11682
11683 test-read-from-stream-with-too-many-inouts:
11684
11685 55/push-ebp
11686 89/<- %ebp 4/r32/esp
11687
11688 (clear-stream _test-input-stream)
11689 (clear-stream $_test-input-buffered-file->buffer)
11690 (clear-stream _test-output-stream)
11691 (clear-stream $_test-output-buffered-file->buffer)
11692 (clear-stream _test-error-stream)
11693 (clear-stream $_test-error-buffered-file->buffer)
11694
11695 68/push 0/imm32
11696 68/push 0/imm32
11697 89/<- %edx 4/r32/esp
11698 (tailor-exit-descriptor %edx 0x10)
11699
11700 (write _test-input-stream "fn foo {\n")
11701 (write _test-input-stream " var a: (addr stream int)\n")
11702 (write _test-input-stream " var b: (addr int)\n")
11703 (write _test-input-stream " read-from-stream a, b, 0\n")
11704 (write _test-input-stream "}\n")
11705
11706 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11707
11708
11709 89/<- %edx 4/r32/esp
11710 (flush _test-output-buffered-file)
11711 (flush _test-error-buffered-file)
11712 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11718
11719 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-many-inouts: output should be empty")
11720 (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")
11721
11722 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-many-inouts: exit status")
11723
11724 81 0/subop/add %esp 8/imm32
11725
11726 5d/pop-to-ebp
11727 c3/return
11728
11729 test-read-from-stream-with-output:
11730
11731 55/push-ebp
11732 89/<- %ebp 4/r32/esp
11733
11734 (clear-stream _test-input-stream)
11735 (clear-stream $_test-input-buffered-file->buffer)
11736 (clear-stream _test-output-stream)
11737 (clear-stream $_test-output-buffered-file->buffer)
11738 (clear-stream _test-error-stream)
11739 (clear-stream $_test-error-buffered-file->buffer)
11740
11741 68/push 0/imm32
11742 68/push 0/imm32
11743 89/<- %edx 4/r32/esp
11744 (tailor-exit-descriptor %edx 0x10)
11745
11746 (write _test-input-stream "fn foo {\n")
11747 (write _test-input-stream " var a: (addr stream int)\n")
11748 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
11749 (write _test-input-stream " b <- read-from-stream a, b\n")
11750 (write _test-input-stream "}\n")
11751
11752 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11753
11754
11755 89/<- %edx 4/r32/esp
11756 (flush _test-output-buffered-file)
11757 (flush _test-error-buffered-file)
11758 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11764
11765 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-output: output should be empty")
11766 (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")
11767
11768 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-output: exit status")
11769
11770 81 0/subop/add %esp 8/imm32
11771
11772 5d/pop-to-ebp
11773 c3/return
11774
11775 test-convert-write-to-stream:
11776
11777 55/push-ebp
11778 89/<- %ebp 4/r32/esp
11779
11780 (clear-stream _test-input-stream)
11781 (clear-stream $_test-input-buffered-file->buffer)
11782 (clear-stream _test-output-stream)
11783 (clear-stream $_test-output-buffered-file->buffer)
11784
11785 (write _test-input-stream "fn foo {\n")
11786 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
11787 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
11788 (write _test-input-stream " write-to-stream s, o\n")
11789 (write _test-input-stream "}\n")
11790
11791 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
11792
11793
11794 89/<- %edx 4/r32/esp
11795 (flush _test-output-buffered-file)
11796 (flush _test-error-buffered-file)
11797 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
11803
11804 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream/0")
11805 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream/1")
11806 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream/2")
11807 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream/3")
11808 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream/4")
11809 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream/5")
11810 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream/6")
11811 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-write-to-stream/7")
11812 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream/8")
11813 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-write-to-stream/9")
11814 (check-next-stream-line-equal _test-output-stream " (write-to-stream %esi %ecx 0x00000004)" "F - test-convert-write-to-stream/10")
11815 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream/11")
11816 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream/12")
11817 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream/13")
11818 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream/14")
11819 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream/15")
11820 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream/16")
11821 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream/17")
11822 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream/18")
11823
11824 89/<- %esp 5/r32/ebp
11825 5d/pop-to-ebp
11826 c3/return
11827
11828 test-convert-write-to-stream-with-correct-payload-size:
11829
11830 55/push-ebp
11831 89/<- %ebp 4/r32/esp
11832
11833 (clear-stream _test-input-stream)
11834 (clear-stream $_test-input-buffered-file->buffer)
11835 (clear-stream _test-output-stream)
11836 (clear-stream $_test-output-buffered-file->buffer)
11837
11838 (write _test-input-stream "fn foo {\n")
11839 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
11840 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
11841 (write _test-input-stream " write-to-stream s, o\n")
11842 (write _test-input-stream "}\n")
11843
11844 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
11845
11846
11847 89/<- %edx 4/r32/esp
11848 (flush _test-output-buffered-file)
11849 (flush _test-error-buffered-file)
11850 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
11856
11857 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream-with-correct-payload-size/0")
11858 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream-with-correct-payload-size/1")
11859 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/2")
11860 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream-with-correct-payload-size/3")
11861 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream-with-correct-payload-size/4")
11862 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream-with-correct-payload-size/5")
11863 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream-with-correct-payload-size/6")
11864 (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")
11865 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/8")
11866 (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")
11867 (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")
11868 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/11")
11869 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream-with-correct-payload-size/12")
11870 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream-with-correct-payload-size/13")
11871 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream-with-correct-payload-size/14")
11872 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream-with-correct-payload-size/15")
11873 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream-with-correct-payload-size/16")
11874 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/17")
11875 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream-with-correct-payload-size/18")
11876
11877 89/<- %esp 5/r32/ebp
11878 5d/pop-to-ebp
11879 c3/return
11880
11881 test-write-to-stream-with-non-stream-atom-base-type:
11882
11883 55/push-ebp
11884 89/<- %ebp 4/r32/esp
11885
11886 (clear-stream _test-input-stream)
11887 (clear-stream $_test-input-buffered-file->buffer)
11888 (clear-stream _test-output-stream)
11889 (clear-stream $_test-output-buffered-file->buffer)
11890 (clear-stream _test-error-stream)
11891 (clear-stream $_test-error-buffered-file->buffer)
11892
11893 68/push 0/imm32
11894 68/push 0/imm32
11895 89/<- %edx 4/r32/esp
11896 (tailor-exit-descriptor %edx 0x10)
11897
11898 (write _test-input-stream "fn foo {\n")
11899 (write _test-input-stream " var a: int\n")
11900 (write _test-input-stream " write-to-stream a, 0\n")
11901 (write _test-input-stream "}\n")
11902
11903 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11904
11905
11906 89/<- %edx 4/r32/esp
11907 (flush _test-output-buffered-file)
11908 (flush _test-error-buffered-file)
11909 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11915
11916 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-atom-base-type: output should be empty")
11917 (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")
11918
11919 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-atom-base-type: exit status")
11920
11921 81 0/subop/add %esp 8/imm32
11922
11923 5d/pop-to-ebp
11924 c3/return
11925
11926 test-write-to-stream-with-non-stream-compound-base-type:
11927
11928 55/push-ebp
11929 89/<- %ebp 4/r32/esp
11930
11931 (clear-stream _test-input-stream)
11932 (clear-stream $_test-input-buffered-file->buffer)
11933 (clear-stream _test-output-stream)
11934 (clear-stream $_test-output-buffered-file->buffer)
11935 (clear-stream _test-error-stream)
11936 (clear-stream $_test-error-buffered-file->buffer)
11937
11938 68/push 0/imm32
11939 68/push 0/imm32
11940 89/<- %edx 4/r32/esp
11941 (tailor-exit-descriptor %edx 0x10)
11942
11943 (write _test-input-stream "fn foo {\n")
11944 (write _test-input-stream " var a: (handle int)\n")
11945 (write _test-input-stream " write-to-stream a, 0\n")
11946 (write _test-input-stream "}\n")
11947
11948 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11949
11950
11951 89/<- %edx 4/r32/esp
11952 (flush _test-output-buffered-file)
11953 (flush _test-error-buffered-file)
11954 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
11960
11961 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type: output should be empty")
11962 (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")
11963
11964 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type: exit status")
11965
11966 81 0/subop/add %esp 8/imm32
11967
11968 5d/pop-to-ebp
11969 c3/return
11970
11971 test-write-to-stream-with-non-stream-compound-base-type-2:
11972
11973 55/push-ebp
11974 89/<- %ebp 4/r32/esp
11975
11976 (clear-stream _test-input-stream)
11977 (clear-stream $_test-input-buffered-file->buffer)
11978 (clear-stream _test-output-stream)
11979 (clear-stream $_test-output-buffered-file->buffer)
11980 (clear-stream _test-error-stream)
11981 (clear-stream $_test-error-buffered-file->buffer)
11982
11983 68/push 0/imm32
11984 68/push 0/imm32
11985 89/<- %edx 4/r32/esp
11986 (tailor-exit-descriptor %edx 0x10)
11987
11988 (write _test-input-stream "fn foo {\n")
11989 (write _test-input-stream " var a: (addr int)\n")
11990 (write _test-input-stream " write-to-stream a, 0\n")
11991 (write _test-input-stream "}\n")
11992
11993 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11994
11995
11996 89/<- %edx 4/r32/esp
11997 (flush _test-output-buffered-file)
11998 (flush _test-error-buffered-file)
11999 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12005
12006 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type-2: output should be empty")
12007 (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")
12008
12009 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type-2: exit status")
12010
12011 81 0/subop/add %esp 8/imm32
12012
12013 5d/pop-to-ebp
12014 c3/return
12015
12016 test-write-to-stream-with-stream-atom-base-type:
12017
12018 55/push-ebp
12019 89/<- %ebp 4/r32/esp
12020
12021 (clear-stream _test-input-stream)
12022 (clear-stream $_test-input-buffered-file->buffer)
12023 (clear-stream _test-output-stream)
12024 (clear-stream $_test-output-buffered-file->buffer)
12025 (clear-stream _test-error-stream)
12026 (clear-stream $_test-error-buffered-file->buffer)
12027
12028 68/push 0/imm32
12029 68/push 0/imm32
12030 89/<- %edx 4/r32/esp
12031 (tailor-exit-descriptor %edx 0x10)
12032
12033 (write _test-input-stream "fn foo {\n")
12034 (write _test-input-stream " var a: stream\n")
12035 (write _test-input-stream " write-to-stream a, 0\n")
12036 (write _test-input-stream "}\n")
12037
12038 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12039
12040
12041 89/<- %edx 4/r32/esp
12042 (flush _test-output-buffered-file)
12043 (flush _test-error-buffered-file)
12044 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12050
12051 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-stream-atom-base-type: output should be empty")
12052 (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")
12053
12054 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-stream-atom-base-type: exit status")
12055
12056 81 0/subop/add %esp 8/imm32
12057
12058 5d/pop-to-ebp
12059 c3/return
12060
12061 test-write-to-stream-with-wrong-index-type:
12062
12063 55/push-ebp
12064 89/<- %ebp 4/r32/esp
12065
12066 (clear-stream _test-input-stream)
12067 (clear-stream $_test-input-buffered-file->buffer)
12068 (clear-stream _test-output-stream)
12069 (clear-stream $_test-output-buffered-file->buffer)
12070 (clear-stream _test-error-stream)
12071 (clear-stream $_test-error-buffered-file->buffer)
12072
12073 68/push 0/imm32
12074 68/push 0/imm32
12075 89/<- %edx 4/r32/esp
12076 (tailor-exit-descriptor %edx 0x10)
12077
12078 (write _test-input-stream "fn foo {\n")
12079 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
12080 (write _test-input-stream " var b: boolean\n")
12081 (write _test-input-stream " write-to-stream a, b\n")
12082 (write _test-input-stream "}\n")
12083
12084 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12085
12086
12087 89/<- %edx 4/r32/esp
12088 (flush _test-output-buffered-file)
12089 (flush _test-error-buffered-file)
12090 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12096
12097 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-wrong-index-type: output should be empty")
12098 (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")
12099
12100 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-wrong-index-type: exit status")
12101
12102 81 0/subop/add %esp 8/imm32
12103
12104 5d/pop-to-ebp
12105 c3/return
12106
12107 test-write-to-stream-with-no-inouts:
12108
12109 55/push-ebp
12110 89/<- %ebp 4/r32/esp
12111
12112 (clear-stream _test-input-stream)
12113 (clear-stream $_test-input-buffered-file->buffer)
12114 (clear-stream _test-output-stream)
12115 (clear-stream $_test-output-buffered-file->buffer)
12116 (clear-stream _test-error-stream)
12117 (clear-stream $_test-error-buffered-file->buffer)
12118
12119 68/push 0/imm32
12120 68/push 0/imm32
12121 89/<- %edx 4/r32/esp
12122 (tailor-exit-descriptor %edx 0x10)
12123
12124 (write _test-input-stream "fn foo {\n")
12125 (write _test-input-stream " write-to-stream\n")
12126 (write _test-input-stream "}\n")
12127
12128 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12129
12130
12131 89/<- %edx 4/r32/esp
12132 (flush _test-output-buffered-file)
12133 (flush _test-error-buffered-file)
12134 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12140
12141 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-no-inouts: output should be empty")
12142 (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")
12143
12144 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-no-inouts: exit status")
12145
12146 81 0/subop/add %esp 8/imm32
12147
12148 5d/pop-to-ebp
12149 c3/return
12150
12151 test-write-to-stream-with-too-few-inouts:
12152
12153 55/push-ebp
12154 89/<- %ebp 4/r32/esp
12155
12156 (clear-stream _test-input-stream)
12157 (clear-stream $_test-input-buffered-file->buffer)
12158 (clear-stream _test-output-stream)
12159 (clear-stream $_test-output-buffered-file->buffer)
12160 (clear-stream _test-error-stream)
12161 (clear-stream $_test-error-buffered-file->buffer)
12162
12163 68/push 0/imm32
12164 68/push 0/imm32
12165 89/<- %edx 4/r32/esp
12166 (tailor-exit-descriptor %edx 0x10)
12167
12168 (write _test-input-stream "fn foo {\n")
12169 (write _test-input-stream " var a: (addr stream int)\n")
12170 (write _test-input-stream " write-to-stream a\n")
12171 (write _test-input-stream "}\n")
12172
12173 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12174
12175
12176 89/<- %edx 4/r32/esp
12177 (flush _test-output-buffered-file)
12178 (flush _test-error-buffered-file)
12179 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12185
12186 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-few-inouts: output should be empty")
12187 (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")
12188
12189 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-few-inouts: exit status")
12190
12191 81 0/subop/add %esp 8/imm32
12192
12193 5d/pop-to-ebp
12194 c3/return
12195
12196 test-write-to-stream-with-too-many-inouts:
12197
12198 55/push-ebp
12199 89/<- %ebp 4/r32/esp
12200
12201 (clear-stream _test-input-stream)
12202 (clear-stream $_test-input-buffered-file->buffer)
12203 (clear-stream _test-output-stream)
12204 (clear-stream $_test-output-buffered-file->buffer)
12205 (clear-stream _test-error-stream)
12206 (clear-stream $_test-error-buffered-file->buffer)
12207
12208 68/push 0/imm32
12209 68/push 0/imm32
12210 89/<- %edx 4/r32/esp
12211 (tailor-exit-descriptor %edx 0x10)
12212
12213 (write _test-input-stream "fn foo {\n")
12214 (write _test-input-stream " var a: (addr stream int)\n")
12215 (write _test-input-stream " var b: (addr int)\n")
12216 (write _test-input-stream " write-to-stream a, b, 0\n")
12217 (write _test-input-stream "}\n")
12218
12219 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12220
12221
12222 89/<- %edx 4/r32/esp
12223 (flush _test-output-buffered-file)
12224 (flush _test-error-buffered-file)
12225 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12231
12232 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-many-inouts: output should be empty")
12233 (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")
12234
12235 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-many-inouts: exit status")
12236
12237 81 0/subop/add %esp 8/imm32
12238
12239 5d/pop-to-ebp
12240 c3/return
12241
12242 test-write-to-stream-with-output:
12243
12244 55/push-ebp
12245 89/<- %ebp 4/r32/esp
12246
12247 (clear-stream _test-input-stream)
12248 (clear-stream $_test-input-buffered-file->buffer)
12249 (clear-stream _test-output-stream)
12250 (clear-stream $_test-output-buffered-file->buffer)
12251 (clear-stream _test-error-stream)
12252 (clear-stream $_test-error-buffered-file->buffer)
12253
12254 68/push 0/imm32
12255 68/push 0/imm32
12256 89/<- %edx 4/r32/esp
12257 (tailor-exit-descriptor %edx 0x10)
12258
12259 (write _test-input-stream "fn foo {\n")
12260 (write _test-input-stream " var a: (addr stream int)\n")
12261 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
12262 (write _test-input-stream " b <- write-to-stream a, b\n")
12263 (write _test-input-stream "}\n")
12264
12265 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12266
12267
12268 89/<- %edx 4/r32/esp
12269 (flush _test-output-buffered-file)
12270 (flush _test-error-buffered-file)
12271 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12277
12278 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-output: output should be empty")
12279 (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")
12280
12281 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-output: exit status")
12282
12283 81 0/subop/add %esp 8/imm32
12284
12285 5d/pop-to-ebp
12286 c3/return
12287
12288 test-length-with-non-array-atom-base-type:
12289
12290 55/push-ebp
12291 89/<- %ebp 4/r32/esp
12292
12293 (clear-stream _test-input-stream)
12294 (clear-stream $_test-input-buffered-file->buffer)
12295 (clear-stream _test-output-stream)
12296 (clear-stream $_test-output-buffered-file->buffer)
12297 (clear-stream _test-error-stream)
12298 (clear-stream $_test-error-buffered-file->buffer)
12299
12300 68/push 0/imm32
12301 68/push 0/imm32
12302 89/<- %edx 4/r32/esp
12303 (tailor-exit-descriptor %edx 0x10)
12304
12305 (write _test-input-stream "fn foo {\n")
12306 (write _test-input-stream " var a: int\n")
12307 (write _test-input-stream " var c/ecx: int <- length a\n")
12308 (write _test-input-stream "}\n")
12309
12310 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12311
12312
12313 89/<- %edx 4/r32/esp
12314 (flush _test-output-buffered-file)
12315 (flush _test-error-buffered-file)
12316 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12322
12323 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-atom-base-type: output should be empty")
12324 (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")
12325
12326 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-atom-base-type: exit status")
12327
12328 81 0/subop/add %esp 8/imm32
12329
12330 5d/pop-to-ebp
12331 c3/return
12332
12333 test-length-with-non-array-compound-base-type:
12334
12335 55/push-ebp
12336 89/<- %ebp 4/r32/esp
12337
12338 (clear-stream _test-input-stream)
12339 (clear-stream $_test-input-buffered-file->buffer)
12340 (clear-stream _test-output-stream)
12341 (clear-stream $_test-output-buffered-file->buffer)
12342 (clear-stream _test-error-stream)
12343 (clear-stream $_test-error-buffered-file->buffer)
12344
12345 68/push 0/imm32
12346 68/push 0/imm32
12347 89/<- %edx 4/r32/esp
12348 (tailor-exit-descriptor %edx 0x10)
12349
12350 (write _test-input-stream "fn foo {\n")
12351 (write _test-input-stream " var a: (handle int)\n")
12352 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
12353 (write _test-input-stream "}\n")
12354
12355 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12356
12357
12358 89/<- %edx 4/r32/esp
12359 (flush _test-output-buffered-file)
12360 (flush _test-error-buffered-file)
12361 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12367
12368 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type: output should be empty")
12369 (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")
12370
12371 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type: exit status")
12372
12373 81 0/subop/add %esp 8/imm32
12374
12375 5d/pop-to-ebp
12376 c3/return
12377
12378 test-length-with-non-array-compound-base-type-2:
12379
12380 55/push-ebp
12381 89/<- %ebp 4/r32/esp
12382
12383 (clear-stream _test-input-stream)
12384 (clear-stream $_test-input-buffered-file->buffer)
12385 (clear-stream _test-output-stream)
12386 (clear-stream $_test-output-buffered-file->buffer)
12387 (clear-stream _test-error-stream)
12388 (clear-stream $_test-error-buffered-file->buffer)
12389
12390 68/push 0/imm32
12391 68/push 0/imm32
12392 89/<- %edx 4/r32/esp
12393 (tailor-exit-descriptor %edx 0x10)
12394
12395 (write _test-input-stream "fn foo {\n")
12396 (write _test-input-stream " var a: (addr int)\n")
12397 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
12398 (write _test-input-stream "}\n")
12399
12400 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12401
12402
12403 89/<- %edx 4/r32/esp
12404 (flush _test-output-buffered-file)
12405 (flush _test-error-buffered-file)
12406 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12412
12413 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type-2: output should be empty")
12414 (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")
12415
12416 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type-2: exit status")
12417
12418 81 0/subop/add %esp 8/imm32
12419
12420 5d/pop-to-ebp
12421 c3/return
12422
12423 test-length-with-array-atom-base-type:
12424
12425 55/push-ebp
12426 89/<- %ebp 4/r32/esp
12427
12428 (clear-stream _test-input-stream)
12429 (clear-stream $_test-input-buffered-file->buffer)
12430 (clear-stream _test-output-stream)
12431 (clear-stream $_test-output-buffered-file->buffer)
12432 (clear-stream _test-error-stream)
12433 (clear-stream $_test-error-buffered-file->buffer)
12434
12435 68/push 0/imm32
12436 68/push 0/imm32
12437 89/<- %edx 4/r32/esp
12438 (tailor-exit-descriptor %edx 0x10)
12439
12440 (write _test-input-stream "fn foo {\n")
12441 (write _test-input-stream " var a: array\n")
12442 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
12443 (write _test-input-stream "}\n")
12444
12445 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12446
12447
12448 89/<- %edx 4/r32/esp
12449 (flush _test-output-buffered-file)
12450 (flush _test-error-buffered-file)
12451 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12457
12458 (check-stream-equal _test-output-stream "" "F - test-length-with-array-atom-base-type: output should be empty")
12459 (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")
12460
12461 (check-ints-equal *(edx+4) 2 "F - test-length-with-array-atom-base-type: exit status")
12462
12463 81 0/subop/add %esp 8/imm32
12464
12465 5d/pop-to-ebp
12466 c3/return
12467
12468 test-length-with-addr-base-on-stack:
12469
12470 55/push-ebp
12471 89/<- %ebp 4/r32/esp
12472
12473 (clear-stream _test-input-stream)
12474 (clear-stream $_test-input-buffered-file->buffer)
12475 (clear-stream _test-output-stream)
12476 (clear-stream $_test-output-buffered-file->buffer)
12477 (clear-stream _test-error-stream)
12478 (clear-stream $_test-error-buffered-file->buffer)
12479
12480 68/push 0/imm32
12481 68/push 0/imm32
12482 89/<- %edx 4/r32/esp
12483 (tailor-exit-descriptor %edx 0x10)
12484
12485 (write _test-input-stream "fn foo {\n")
12486 (write _test-input-stream " var a: (addr array int)\n")
12487 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
12488 (write _test-input-stream "}\n")
12489
12490 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12491
12492
12493 89/<- %edx 4/r32/esp
12494 (flush _test-output-buffered-file)
12495 (flush _test-error-buffered-file)
12496 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12502
12503 (check-stream-equal _test-output-stream "" "F - test-length-with-addr-base-on-stack: output should be empty")
12504 (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")
12505
12506 (check-ints-equal *(edx+4) 2 "F - test-length-with-addr-base-on-stack: exit status")
12507
12508 81 0/subop/add %esp 8/imm32
12509
12510 5d/pop-to-ebp
12511 c3/return
12512
12513 test-length-with-wrong-output-type:
12514
12515 55/push-ebp
12516 89/<- %ebp 4/r32/esp
12517
12518 (clear-stream _test-input-stream)
12519 (clear-stream $_test-input-buffered-file->buffer)
12520 (clear-stream _test-output-stream)
12521 (clear-stream $_test-output-buffered-file->buffer)
12522 (clear-stream _test-error-stream)
12523 (clear-stream $_test-error-buffered-file->buffer)
12524
12525 68/push 0/imm32
12526 68/push 0/imm32
12527 89/<- %edx 4/r32/esp
12528 (tailor-exit-descriptor %edx 0x10)
12529
12530 (write _test-input-stream "fn foo {\n")
12531 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
12532 (write _test-input-stream " var o/edi: (addr int) <- length a\n")
12533 (write _test-input-stream "}\n")
12534
12535 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12536
12537
12538 89/<- %edx 4/r32/esp
12539 (flush _test-output-buffered-file)
12540 (flush _test-error-buffered-file)
12541 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12547
12548 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-type: output should be empty")
12549 (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")
12550
12551 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-type: exit status")
12552
12553 81 0/subop/add %esp 8/imm32
12554
12555 5d/pop-to-ebp
12556 c3/return
12557
12558 test-length-with-wrong-output-compound-type:
12559
12560 55/push-ebp
12561 89/<- %ebp 4/r32/esp
12562
12563 (clear-stream _test-input-stream)
12564 (clear-stream $_test-input-buffered-file->buffer)
12565 (clear-stream _test-output-stream)
12566 (clear-stream $_test-output-buffered-file->buffer)
12567 (clear-stream _test-error-stream)
12568 (clear-stream $_test-error-buffered-file->buffer)
12569
12570 68/push 0/imm32
12571 68/push 0/imm32
12572 89/<- %edx 4/r32/esp
12573 (tailor-exit-descriptor %edx 0x10)
12574
12575 (write _test-input-stream "fn foo {\n")
12576 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
12577 (write _test-input-stream " var o/edi: (addr handle int) <- length a\n")
12578 (write _test-input-stream "}\n")
12579
12580 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12581
12582
12583 89/<- %edx 4/r32/esp
12584 (flush _test-output-buffered-file)
12585 (flush _test-error-buffered-file)
12586 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12592
12593 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-compound-type: output should be empty")
12594 (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")
12595
12596 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-compound-type: exit status")
12597
12598 81 0/subop/add %esp 8/imm32
12599
12600 5d/pop-to-ebp
12601 c3/return
12602
12603 test-length-with-no-inouts:
12604
12605 55/push-ebp
12606 89/<- %ebp 4/r32/esp
12607
12608 (clear-stream _test-input-stream)
12609 (clear-stream $_test-input-buffered-file->buffer)
12610 (clear-stream _test-output-stream)
12611 (clear-stream $_test-output-buffered-file->buffer)
12612 (clear-stream _test-error-stream)
12613 (clear-stream $_test-error-buffered-file->buffer)
12614
12615 68/push 0/imm32
12616 68/push 0/imm32
12617 89/<- %edx 4/r32/esp
12618 (tailor-exit-descriptor %edx 0x10)
12619
12620 (write _test-input-stream "fn foo {\n")
12621 (write _test-input-stream " var c/ecx: int <- length\n")
12622 (write _test-input-stream "}\n")
12623
12624 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12625
12626
12627 89/<- %edx 4/r32/esp
12628 (flush _test-output-buffered-file)
12629 (flush _test-error-buffered-file)
12630 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12636
12637 (check-stream-equal _test-output-stream "" "F - test-length-with-no-inouts: output should be empty")
12638 (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")
12639
12640 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-inouts: exit status")
12641
12642 81 0/subop/add %esp 8/imm32
12643
12644 5d/pop-to-ebp
12645 c3/return
12646
12647 test-length-with-too-many-inouts:
12648
12649 55/push-ebp
12650 89/<- %ebp 4/r32/esp
12651
12652 (clear-stream _test-input-stream)
12653 (clear-stream $_test-input-buffered-file->buffer)
12654 (clear-stream _test-output-stream)
12655 (clear-stream $_test-output-buffered-file->buffer)
12656 (clear-stream _test-error-stream)
12657 (clear-stream $_test-error-buffered-file->buffer)
12658
12659 68/push 0/imm32
12660 68/push 0/imm32
12661 89/<- %edx 4/r32/esp
12662 (tailor-exit-descriptor %edx 0x10)
12663
12664 (write _test-input-stream "fn foo {\n")
12665 (write _test-input-stream " var a: (array int 3)\n")
12666 (write _test-input-stream " var c/ecx: int <- length a, 0, 0\n")
12667 (write _test-input-stream "}\n")
12668
12669 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12670
12671
12672 89/<- %edx 4/r32/esp
12673 (flush _test-output-buffered-file)
12674 (flush _test-error-buffered-file)
12675 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12681
12682 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-inouts: output should be empty")
12683 (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")
12684
12685 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-inouts: exit status")
12686
12687 81 0/subop/add %esp 8/imm32
12688
12689 5d/pop-to-ebp
12690 c3/return
12691
12692 test-length-with-no-output:
12693
12694 55/push-ebp
12695 89/<- %ebp 4/r32/esp
12696
12697 (clear-stream _test-input-stream)
12698 (clear-stream $_test-input-buffered-file->buffer)
12699 (clear-stream _test-output-stream)
12700 (clear-stream $_test-output-buffered-file->buffer)
12701 (clear-stream _test-error-stream)
12702 (clear-stream $_test-error-buffered-file->buffer)
12703
12704 68/push 0/imm32
12705 68/push 0/imm32
12706 89/<- %edx 4/r32/esp
12707 (tailor-exit-descriptor %edx 0x10)
12708
12709 (write _test-input-stream "fn foo {\n")
12710 (write _test-input-stream " var a: (array int 3)\n")
12711 (write _test-input-stream " length a\n")
12712 (write _test-input-stream "}\n")
12713
12714 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12715
12716
12717 89/<- %edx 4/r32/esp
12718 (flush _test-output-buffered-file)
12719 (flush _test-error-buffered-file)
12720 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
12726
12727 (check-stream-equal _test-output-stream "" "F - test-length-with-no-output: output should be empty")
12728 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: must have an output" "F - test-length-with-no-output: error message")
12729
12730 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-output: exit status")
12731
12732 81 0/subop/add %esp 8/imm32
12733
12734 5d/pop-to-ebp
12735 c3/return
12736
12737 test-length-with-too-many-outputs:
12738
12739 55/push-ebp
12740 89/<- %ebp 4/r32/esp
12741
12742 (clear-stream _test-input-stream)
12743 (clear-stream $_test-input-buffered-file->buffer)
12744 (clear-stream _test-output-stream)
12745 (clear-stream $_test-output-buffered-file->buffer)
12746 (clear-stream _test-error-stream)
12747 (clear-stream $_test-error-buffered-file->buffer)
12748
12749 68/push 0/imm32
12750 68/push 0/imm32
12751 89/<- %edx 4/r32/esp
12752 (tailor-exit-descriptor %edx 0x10)
12753
12754 (write _test-input-stream "fn foo {\n")
12755 (write _test-input-stream " var a: (array int 3)\n")
12756 (write _test-input-stream " var b/eax: int <- copy 0\n")
12757 (write _test-input-stream " var c/ecx: int <- copy 0\n")
12758 (write _test-input-stream " b, c <- length a\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-length-with-too-many-outputs: output should be empty")
12775 (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")
12776
12777 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-outputs: exit status")
12778
12779 81 0/subop/add %esp 8/imm32
12780
12781 5d/pop-to-ebp
12782 c3/return
12783
12784 test-convert-function-with-return-register-and-local:
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
12794 (write _test-input-stream "fn foo -> _/eax: int {\n")
12795 (write _test-input-stream " var y/eax: int <- copy 3\n")
12796 (write _test-input-stream " var z/ecx: int <- copy 4\n")
12797 (write _test-input-stream " return y\n")
12798 (write _test-input-stream "}\n")
12799
12800 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12801 (flush _test-output-buffered-file)
12802 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
12808
12809 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local/0")
12810 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local/1")
12811 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local/2")
12812 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local/3")
12813 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local/4")
12814 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local/5")
12815 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local/6")
12816 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register-and-local/7")
12817 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local/8")
12818 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-return-register-and-local/9")
12819 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register-and-local/10")
12820 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local/11")
12821 (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")
12822 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register-and-local/13")
12823 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local/14")
12824 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local/15")
12825 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local/16")
12826 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local/17")
12827 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local/18")
12828 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local/19")
12829
12830 89/<- %esp 5/r32/ebp
12831 5d/pop-to-ebp
12832 c3/return
12833
12834 test-convert-function-with-return-register-and-local-2:
12835
12836 55/push-ebp
12837 89/<- %ebp 4/r32/esp
12838
12839 (clear-stream _test-input-stream)
12840 (clear-stream $_test-input-buffered-file->buffer)
12841 (clear-stream _test-output-stream)
12842 (clear-stream $_test-output-buffered-file->buffer)
12843
12844 (write _test-input-stream "fn foo -> _/eax: int {\n")
12845 (write _test-input-stream " var y/eax: int <- copy 3\n")
12846 (write _test-input-stream " var z/ecx: int <- copy 4\n")
12847 (write _test-input-stream " return z\n")
12848 (write _test-input-stream "}\n")
12849
12850 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12851 (flush _test-output-buffered-file)
12852 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
12858
12859 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local-2/0")
12860 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local-2/1")
12861 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local-2/2")
12862 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local-2/3")
12863 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local-2/4")
12864 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local-2/5")
12865 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local-2/6")
12866 (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")
12867 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local-2/8")
12868 (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")
12869 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-function-with-return-register-and-local-2/10")
12870 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local-2/11")
12871 (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")
12872 (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")
12873 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local-2/14")
12874 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local-2/15")
12875 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local-2/16")
12876 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local-2/17")
12877 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local-2/18")
12878 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local-2/19")
12879
12880 89/<- %esp 5/r32/ebp
12881 5d/pop-to-ebp
12882 c3/return
12883
12884 test-convert-function-with-return-float-register-and-local:
12885
12886 55/push-ebp
12887 89/<- %ebp 4/r32/esp
12888
12889 (clear-stream _test-input-stream)
12890 (clear-stream $_test-input-buffered-file->buffer)
12891 (clear-stream _test-output-stream)
12892 (clear-stream $_test-output-buffered-file->buffer)
12893
12894 (write _test-input-stream "fn foo -> _/xmm1: float {\n")
12895 (write _test-input-stream " var y/eax: int <- copy 3\n")
12896 (write _test-input-stream " var g/xmm0: float <- convert y\n")
12897 (write _test-input-stream " var h/xmm1: float <- convert y\n")
12898 (write _test-input-stream " return g\n")
12899 (write _test-input-stream "}\n")
12900
12901 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12902 (flush _test-output-buffered-file)
12903 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
12909
12910 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-float-register-and-local/0")
12911 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-float-register-and-local/1")
12912 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-float-register-and-local/2")
12913 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-float-register-and-local/3")
12914 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-float-register-and-local/4")
12915 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-float-register-and-local/5")
12916 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-float-register-and-local/6")
12917 (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")
12918 (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")
12919 (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")
12920 (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")
12921 (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")
12922 (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")
12923 (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")
12924 (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")
12925 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
12926 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 0/x32" "F - test-convert-floating-point-dereferenced/16")
12927 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/17")
12928 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-return-float-register-and-local/18")
12929 (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")
12930 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-float-register-and-local/20")
12931 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-float-register-and-local/21")
12932 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-float-register-and-local/22")
12933 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-float-register-and-local/23")
12934 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-float-register-and-local/24")
12935 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-float-register-and-local/25")
12936
12937 89/<- %esp 5/r32/ebp
12938 5d/pop-to-ebp
12939 c3/return
12940
12941 test-convert-function-with-return-and-local-vars:
12942
12943 55/push-ebp
12944 89/<- %ebp 4/r32/esp
12945
12946 (clear-stream _test-input-stream)
12947 (clear-stream $_test-input-buffered-file->buffer)
12948 (clear-stream _test-output-stream)
12949 (clear-stream $_test-output-buffered-file->buffer)
12950
12951 (write _test-input-stream "fn foo -> _/eax: int {\n")
12952 (write _test-input-stream " {\n")
12953 (write _test-input-stream " var x: int\n")
12954 (write _test-input-stream " {\n")
12955 (write _test-input-stream " var y: int\n")
12956 (write _test-input-stream " return y\n")
12957 (write _test-input-stream " increment x\n")
12958 (write _test-input-stream " }\n")
12959 (write _test-input-stream " }\n")
12960 (write _test-input-stream " return 0\n")
12961 (write _test-input-stream "}\n")
12962
12963 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12964 (flush _test-output-buffered-file)
12965 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
12971
12972 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-and-local-vars/0")
12973 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-and-local-vars/1")
12974 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-and-local-vars/2")
12975 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-and-local-vars/3")
12976 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/4")
12977 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-and-local-vars/5")
12978 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/6")
12979 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-return-and-local-vars/7")
12980 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/8")
12981 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/9")
12982 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-return-and-local-vars/10")
12983 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/11")
12984 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-with-return-and-local-vars/12")
12985 (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")
12986 (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")
12987 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/15")
12988 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/16")
12989 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-return-and-local-vars/17")
12990 (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")
12991 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/19")
12992 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-return-and-local-vars/20")
12993 (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")
12994 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/21")
12995 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/21")
12996 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-and-local-vars/22")
12997 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-and-local-vars/23")
12998 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-and-local-vars/24")
12999 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-and-local-vars/25")
13000 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-and-local-vars/26")
13001
13002 89/<- %esp 5/r32/ebp
13003 5d/pop-to-ebp
13004 c3/return
13005
13006 test-copy-object-with-no-inout:
13007
13008 55/push-ebp
13009 89/<- %ebp 4/r32/esp
13010
13011 (clear-stream _test-input-stream)
13012 (clear-stream $_test-input-buffered-file->buffer)
13013 (clear-stream _test-output-stream)
13014 (clear-stream $_test-output-buffered-file->buffer)
13015 (clear-stream _test-error-stream)
13016 (clear-stream $_test-error-buffered-file->buffer)
13017
13018 68/push 0/imm32
13019 68/push 0/imm32
13020 89/<- %edx 4/r32/esp
13021 (tailor-exit-descriptor %edx 0x10)
13022
13023 (write _test-input-stream "fn foo {\n")
13024 (write _test-input-stream " copy-object\n")
13025 (write _test-input-stream "}\n")
13026
13027 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13028
13029
13030 89/<- %edx 4/r32/esp
13031 (flush _test-output-buffered-file)
13032 (flush _test-error-buffered-file)
13033 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13039
13040 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-no-inout: output should be empty")
13041 (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")
13042
13043 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-no-inout: exit status")
13044
13045 81 0/subop/add %esp 8/imm32
13046
13047 5d/pop-to-ebp
13048 c3/return
13049
13050 test-copy-object-with-no-input:
13051
13052 55/push-ebp
13053 89/<- %ebp 4/r32/esp
13054
13055 (clear-stream _test-input-stream)
13056 (clear-stream $_test-input-buffered-file->buffer)
13057 (clear-stream _test-output-stream)
13058 (clear-stream $_test-output-buffered-file->buffer)
13059 (clear-stream _test-error-stream)
13060 (clear-stream $_test-error-buffered-file->buffer)
13061
13062 68/push 0/imm32
13063 68/push 0/imm32
13064 89/<- %edx 4/r32/esp
13065 (tailor-exit-descriptor %edx 0x10)
13066
13067 (write _test-input-stream "fn foo {\n")
13068 (write _test-input-stream " var x: (addr int)\n")
13069 (write _test-input-stream " copy-object x\n")
13070 (write _test-input-stream "}\n")
13071
13072 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13073
13074
13075 89/<- %edx 4/r32/esp
13076 (flush _test-output-buffered-file)
13077 (flush _test-error-buffered-file)
13078 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13084
13085 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-no-input: output should be empty")
13086 (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")
13087
13088 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-no-input: exit status")
13089
13090 81 0/subop/add %esp 8/imm32
13091
13092 5d/pop-to-ebp
13093 c3/return
13094
13095 test-copy-object-with-too-many-inouts:
13096
13097 55/push-ebp
13098 89/<- %ebp 4/r32/esp
13099
13100 (clear-stream _test-input-stream)
13101 (clear-stream $_test-input-buffered-file->buffer)
13102 (clear-stream _test-output-stream)
13103 (clear-stream $_test-output-buffered-file->buffer)
13104 (clear-stream _test-error-stream)
13105 (clear-stream $_test-error-buffered-file->buffer)
13106
13107 68/push 0/imm32
13108 68/push 0/imm32
13109 89/<- %edx 4/r32/esp
13110 (tailor-exit-descriptor %edx 0x10)
13111
13112 (write _test-input-stream "fn foo {\n")
13113 (write _test-input-stream " var x: (addr boolean)\n")
13114 (write _test-input-stream " copy-object x, x, x\n")
13115 (write _test-input-stream "}\n")
13116
13117 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13118
13119
13120 89/<- %edx 4/r32/esp
13121 (flush _test-output-buffered-file)
13122 (flush _test-error-buffered-file)
13123 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13129
13130 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-too-many-inouts: output should be empty")
13131 (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")
13132
13133 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-too-many-inouts: exit status")
13134
13135 81 0/subop/add %esp 8/imm32
13136
13137 5d/pop-to-ebp
13138 c3/return
13139
13140 test-copy-object-with-output:
13141
13142 55/push-ebp
13143 89/<- %ebp 4/r32/esp
13144
13145 (clear-stream _test-input-stream)
13146 (clear-stream $_test-input-buffered-file->buffer)
13147 (clear-stream _test-output-stream)
13148 (clear-stream $_test-output-buffered-file->buffer)
13149 (clear-stream _test-error-stream)
13150 (clear-stream $_test-error-buffered-file->buffer)
13151
13152 68/push 0/imm32
13153 68/push 0/imm32
13154 89/<- %edx 4/r32/esp
13155 (tailor-exit-descriptor %edx 0x10)
13156
13157 (write _test-input-stream "fn foo {\n")
13158 (write _test-input-stream " var x/eax: (addr boolean) <- copy 0\n")
13159 (write _test-input-stream " var y/ecx: (addr boolean) <- copy 0\n")
13160 (write _test-input-stream " x <- copy-object x, y\n")
13161 (write _test-input-stream "}\n")
13162
13163 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13164
13165
13166 89/<- %edx 4/r32/esp
13167 (flush _test-output-buffered-file)
13168 (flush _test-error-buffered-file)
13169 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13175
13176 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-output: output should be empty")
13177 (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")
13178
13179 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-output: exit status")
13180
13181 81 0/subop/add %esp 8/imm32
13182
13183 5d/pop-to-ebp
13184 c3/return
13185
13186 test-copy-object-deref-address:
13187
13188 55/push-ebp
13189 89/<- %ebp 4/r32/esp
13190
13191 (clear-stream _test-input-stream)
13192 (clear-stream $_test-input-buffered-file->buffer)
13193 (clear-stream _test-output-stream)
13194 (clear-stream $_test-output-buffered-file->buffer)
13195
13196 (write _test-input-stream "fn foo {\n")
13197 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
13198 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
13199 (write _test-input-stream " copy-object *y, x\n")
13200 (write _test-input-stream "}\n")
13201
13202 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13203 (flush _test-output-buffered-file)
13204 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13210
13211 (check-next-stream-line-equal _test-error-stream "" "F - test-copy-object-deref-address: error message")
13212
13213 5d/pop-to-ebp
13214 c3/return
13215
13216 test-copy-object-non-addr:
13217
13218 55/push-ebp
13219 89/<- %ebp 4/r32/esp
13220
13221 (clear-stream _test-input-stream)
13222 (clear-stream $_test-input-buffered-file->buffer)
13223 (clear-stream _test-output-stream)
13224 (clear-stream $_test-output-buffered-file->buffer)
13225 (clear-stream _test-error-stream)
13226 (clear-stream $_test-error-buffered-file->buffer)
13227
13228 68/push 0/imm32
13229 68/push 0/imm32
13230 89/<- %edx 4/r32/esp
13231 (tailor-exit-descriptor %edx 0x10)
13232
13233 (write _test-input-stream "fn foo {\n")
13234 (write _test-input-stream " var x: int\n")
13235 (write _test-input-stream " var y: int\n")
13236 (write _test-input-stream " copy-object y, x\n")
13237 (write _test-input-stream "}\n")
13238
13239 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13240
13241
13242 89/<- %edx 4/r32/esp
13243 (flush _test-output-buffered-file)
13244 (flush _test-error-buffered-file)
13245 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13251
13252 (check-stream-equal _test-output-stream "" "F - test-copy-object-non-addr: output should be empty")
13253 (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")
13254
13255 (check-ints-equal *(edx+4) 2 "F - test-copy-object-non-addr: exit status")
13256
13257 81 0/subop/add %esp 8/imm32
13258
13259 5d/pop-to-ebp
13260 c3/return
13261
13262 test-copy-object-non-equal:
13263
13264 55/push-ebp
13265 89/<- %ebp 4/r32/esp
13266
13267 (clear-stream _test-input-stream)
13268 (clear-stream $_test-input-buffered-file->buffer)
13269 (clear-stream _test-output-stream)
13270 (clear-stream $_test-output-buffered-file->buffer)
13271 (clear-stream _test-error-stream)
13272 (clear-stream $_test-error-buffered-file->buffer)
13273
13274 68/push 0/imm32
13275 68/push 0/imm32
13276 89/<- %edx 4/r32/esp
13277 (tailor-exit-descriptor %edx 0x10)
13278
13279 (write _test-input-stream "fn foo {\n")
13280 (write _test-input-stream " var x: (addr int)\n")
13281 (write _test-input-stream " var y: (addr boolean)\n")
13282 (write _test-input-stream " copy-object y, x\n")
13283 (write _test-input-stream "}\n")
13284
13285 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13286
13287
13288 89/<- %edx 4/r32/esp
13289 (flush _test-output-buffered-file)
13290 (flush _test-error-buffered-file)
13291 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13297
13298 (check-stream-equal _test-output-stream "" "F - test-copy-object-non-equal: output should be empty")
13299 (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")
13300
13301 (check-ints-equal *(edx+4) 2 "F - test-copy-object-non-equal: exit status")
13302
13303 81 0/subop/add %esp 8/imm32
13304
13305 5d/pop-to-ebp
13306 c3/return
13307
13308 test-allocate-with-no-inout:
13309
13310 55/push-ebp
13311 89/<- %ebp 4/r32/esp
13312
13313 (clear-stream _test-input-stream)
13314 (clear-stream $_test-input-buffered-file->buffer)
13315 (clear-stream _test-output-stream)
13316 (clear-stream $_test-output-buffered-file->buffer)
13317 (clear-stream _test-error-stream)
13318 (clear-stream $_test-error-buffered-file->buffer)
13319
13320 68/push 0/imm32
13321 68/push 0/imm32
13322 89/<- %edx 4/r32/esp
13323 (tailor-exit-descriptor %edx 0x10)
13324
13325 (write _test-input-stream "fn foo {\n")
13326 (write _test-input-stream " allocate\n")
13327 (write _test-input-stream "}\n")
13328
13329 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13330
13331
13332 89/<- %edx 4/r32/esp
13333 (flush _test-output-buffered-file)
13334 (flush _test-error-buffered-file)
13335 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13341
13342 (check-stream-equal _test-output-stream "" "F - test-allocate-with-no-inout: output should be empty")
13343 (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")
13344
13345 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-no-inout: exit status")
13346
13347 81 0/subop/add %esp 8/imm32
13348
13349 5d/pop-to-ebp
13350 c3/return
13351
13352 test-allocate-with-too-many-inouts:
13353
13354 55/push-ebp
13355 89/<- %ebp 4/r32/esp
13356
13357 (clear-stream _test-input-stream)
13358 (clear-stream $_test-input-buffered-file->buffer)
13359 (clear-stream _test-output-stream)
13360 (clear-stream $_test-output-buffered-file->buffer)
13361 (clear-stream _test-error-stream)
13362 (clear-stream $_test-error-buffered-file->buffer)
13363
13364 68/push 0/imm32
13365 68/push 0/imm32
13366 89/<- %edx 4/r32/esp
13367 (tailor-exit-descriptor %edx 0x10)
13368
13369 (write _test-input-stream "fn foo {\n")
13370 (write _test-input-stream " var x: (addr handle int)\n")
13371 (write _test-input-stream " allocate x, 0\n")
13372 (write _test-input-stream "}\n")
13373
13374 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13375
13376
13377 89/<- %edx 4/r32/esp
13378 (flush _test-output-buffered-file)
13379 (flush _test-error-buffered-file)
13380 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13386
13387 (check-stream-equal _test-output-stream "" "F - test-allocate-with-too-many-inouts: output should be empty")
13388 (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")
13389
13390 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-too-many-inouts: exit status")
13391
13392 81 0/subop/add %esp 8/imm32
13393
13394 5d/pop-to-ebp
13395 c3/return
13396
13397 test-allocate-with-output:
13398
13399 55/push-ebp
13400 89/<- %ebp 4/r32/esp
13401
13402 (clear-stream _test-input-stream)
13403 (clear-stream $_test-input-buffered-file->buffer)
13404 (clear-stream _test-output-stream)
13405 (clear-stream $_test-output-buffered-file->buffer)
13406 (clear-stream _test-error-stream)
13407 (clear-stream $_test-error-buffered-file->buffer)
13408
13409 68/push 0/imm32
13410 68/push 0/imm32
13411 89/<- %edx 4/r32/esp
13412 (tailor-exit-descriptor %edx 0x10)
13413
13414 (write _test-input-stream "fn foo {\n")
13415 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
13416 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
13417 (write _test-input-stream " x <- allocate y\n")
13418 (write _test-input-stream "}\n")
13419
13420 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13421
13422
13423 89/<- %edx 4/r32/esp
13424 (flush _test-output-buffered-file)
13425 (flush _test-error-buffered-file)
13426 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13432
13433 (check-stream-equal _test-output-stream "" "F - test-allocate-with-output: output should be empty")
13434 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'allocate' must not have any outputs" "F - test-allocate-with-output: error message")
13435
13436 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-output: exit status")
13437
13438 81 0/subop/add %esp 8/imm32
13439
13440 5d/pop-to-ebp
13441 c3/return
13442
13443 test-allocate-non-addr:
13444
13445 55/push-ebp
13446 89/<- %ebp 4/r32/esp
13447
13448 (clear-stream _test-input-stream)
13449 (clear-stream $_test-input-buffered-file->buffer)
13450 (clear-stream _test-output-stream)
13451 (clear-stream $_test-output-buffered-file->buffer)
13452 (clear-stream _test-error-stream)
13453 (clear-stream $_test-error-buffered-file->buffer)
13454
13455 68/push 0/imm32
13456 68/push 0/imm32
13457 89/<- %edx 4/r32/esp
13458 (tailor-exit-descriptor %edx 0x10)
13459
13460 (write _test-input-stream "fn foo {\n")
13461 (write _test-input-stream " var y: (handle int)\n")
13462 (write _test-input-stream " allocate y\n")
13463 (write _test-input-stream "}\n")
13464
13465 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13466
13467
13468 89/<- %edx 4/r32/esp
13469 (flush _test-output-buffered-file)
13470 (flush _test-error-buffered-file)
13471 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13477
13478 (check-stream-equal _test-output-stream "" "F - test-allocate-non-addr: output must be empty")
13479 (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")
13480
13481 (check-ints-equal *(edx+4) 2 "F - test-allocate-non-addr: exit status")
13482
13483 81 0/subop/add %esp 8/imm32
13484
13485 5d/pop-to-ebp
13486 c3/return
13487
13488 test-allocate-non-addr-handle:
13489
13490 55/push-ebp
13491 89/<- %ebp 4/r32/esp
13492
13493 (clear-stream _test-input-stream)
13494 (clear-stream $_test-input-buffered-file->buffer)
13495 (clear-stream _test-output-stream)
13496 (clear-stream $_test-output-buffered-file->buffer)
13497 (clear-stream _test-error-stream)
13498 (clear-stream $_test-error-buffered-file->buffer)
13499
13500 68/push 0/imm32
13501 68/push 0/imm32
13502 89/<- %edx 4/r32/esp
13503 (tailor-exit-descriptor %edx 0x10)
13504
13505 (write _test-input-stream "fn foo {\n")
13506 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
13507 (write _test-input-stream " allocate y\n")
13508 (write _test-input-stream "}\n")
13509
13510 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13511
13512
13513 89/<- %edx 4/r32/esp
13514 (flush _test-output-buffered-file)
13515 (flush _test-error-buffered-file)
13516 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13522
13523 (check-stream-equal _test-output-stream "" "F - test-allocate-non-addr-handle: output should be empty")
13524 (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")
13525
13526 (check-ints-equal *(edx+4) 2 "F - test-allocate-non-addr-handle: exit status")
13527
13528 81 0/subop/add %esp 8/imm32
13529
13530 5d/pop-to-ebp
13531 c3/return
13532
13533 test-allocate-deref-address:
13534
13535 55/push-ebp
13536 89/<- %ebp 4/r32/esp
13537
13538 (clear-stream _test-input-stream)
13539 (clear-stream $_test-input-buffered-file->buffer)
13540 (clear-stream _test-output-stream)
13541 (clear-stream $_test-output-buffered-file->buffer)
13542
13543 (write _test-input-stream "fn foo {\n")
13544 (write _test-input-stream " var y/ecx: (addr addr handle int) <- copy 0\n")
13545 (write _test-input-stream " allocate *y\n")
13546 (write _test-input-stream "}\n")
13547
13548 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13549 (flush _test-output-buffered-file)
13550 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13556
13557 (check-next-stream-line-equal _test-error-stream "" "F - test-allocate-deref-address: error message")
13558
13559 5d/pop-to-ebp
13560 c3/return
13561
13562 test-populate-with-no-inout:
13563
13564 55/push-ebp
13565 89/<- %ebp 4/r32/esp
13566
13567 (clear-stream _test-input-stream)
13568 (clear-stream $_test-input-buffered-file->buffer)
13569 (clear-stream _test-output-stream)
13570 (clear-stream $_test-output-buffered-file->buffer)
13571 (clear-stream _test-error-stream)
13572 (clear-stream $_test-error-buffered-file->buffer)
13573
13574 68/push 0/imm32
13575 68/push 0/imm32
13576 89/<- %edx 4/r32/esp
13577 (tailor-exit-descriptor %edx 0x10)
13578
13579 (write _test-input-stream "fn foo {\n")
13580 (write _test-input-stream " populate\n")
13581 (write _test-input-stream "}\n")
13582
13583 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13584
13585
13586 89/<- %edx 4/r32/esp
13587 (flush _test-output-buffered-file)
13588 (flush _test-error-buffered-file)
13589 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13595
13596 (check-stream-equal _test-output-stream "" "F - test-populate-with-no-inout: output should be empty")
13597 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must have two inouts" "F - test-populate-with-no-inout: error message")
13598
13599 (check-ints-equal *(edx+4) 2 "F - test-populate-with-no-inout: exit status")
13600
13601 81 0/subop/add %esp 8/imm32
13602
13603 5d/pop-to-ebp
13604 c3/return
13605
13606 test-populate-with-too-many-inouts:
13607
13608 55/push-ebp
13609 89/<- %ebp 4/r32/esp
13610
13611 (clear-stream _test-input-stream)
13612 (clear-stream $_test-input-buffered-file->buffer)
13613 (clear-stream _test-output-stream)
13614 (clear-stream $_test-output-buffered-file->buffer)
13615 (clear-stream _test-error-stream)
13616 (clear-stream $_test-error-buffered-file->buffer)
13617
13618 68/push 0/imm32
13619 68/push 0/imm32
13620 89/<- %edx 4/r32/esp
13621 (tailor-exit-descriptor %edx 0x10)
13622
13623 (write _test-input-stream "fn foo {\n")
13624 (write _test-input-stream " var x: (addr handle int)\n")
13625 (write _test-input-stream " populate x, 3, 0\n")
13626 (write _test-input-stream "}\n")
13627
13628 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13629
13630
13631 89/<- %edx 4/r32/esp
13632 (flush _test-output-buffered-file)
13633 (flush _test-error-buffered-file)
13634 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13640
13641 (check-stream-equal _test-output-stream "" "F - test-populate-with-too-many-inouts: output should be empty")
13642 (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")
13643
13644 (check-ints-equal *(edx+4) 2 "F - test-populate-with-too-many-inouts: exit status")
13645
13646 81 0/subop/add %esp 8/imm32
13647
13648 5d/pop-to-ebp
13649 c3/return
13650
13651 test-populate-with-output:
13652
13653 55/push-ebp
13654 89/<- %ebp 4/r32/esp
13655
13656 (clear-stream _test-input-stream)
13657 (clear-stream $_test-input-buffered-file->buffer)
13658 (clear-stream _test-output-stream)
13659 (clear-stream $_test-output-buffered-file->buffer)
13660 (clear-stream _test-error-stream)
13661 (clear-stream $_test-error-buffered-file->buffer)
13662
13663 68/push 0/imm32
13664 68/push 0/imm32
13665 89/<- %edx 4/r32/esp
13666 (tailor-exit-descriptor %edx 0x10)
13667
13668 (write _test-input-stream "fn foo {\n")
13669 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
13670 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
13671 (write _test-input-stream " x <- populate y\n")
13672 (write _test-input-stream "}\n")
13673
13674 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13675
13676
13677 89/<- %edx 4/r32/esp
13678 (flush _test-output-buffered-file)
13679 (flush _test-error-buffered-file)
13680 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13686
13687 (check-stream-equal _test-output-stream "" "F - test-populate-with-output: output should be empty")
13688 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must not have any outputs" "F - test-populate-with-output: error message")
13689
13690 (check-ints-equal *(edx+4) 2 "F - test-populate-with-output: exit status")
13691
13692 81 0/subop/add %esp 8/imm32
13693
13694 5d/pop-to-ebp
13695 c3/return
13696
13697 test-populate-non-addr:
13698
13699 55/push-ebp
13700 89/<- %ebp 4/r32/esp
13701
13702 (clear-stream _test-input-stream)
13703 (clear-stream $_test-input-buffered-file->buffer)
13704 (clear-stream _test-output-stream)
13705 (clear-stream $_test-output-buffered-file->buffer)
13706 (clear-stream _test-error-stream)
13707 (clear-stream $_test-error-buffered-file->buffer)
13708
13709 68/push 0/imm32
13710 68/push 0/imm32
13711 89/<- %edx 4/r32/esp
13712 (tailor-exit-descriptor %edx 0x10)
13713
13714 (write _test-input-stream "fn foo {\n")
13715 (write _test-input-stream " var y: (handle int)\n")
13716 (write _test-input-stream " populate y, 3\n")
13717 (write _test-input-stream "}\n")
13718
13719 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13720
13721
13722 89/<- %edx 4/r32/esp
13723 (flush _test-output-buffered-file)
13724 (flush _test-error-buffered-file)
13725 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13731
13732 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr: output must be empty")
13733 (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")
13734
13735 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr: exit status")
13736
13737 81 0/subop/add %esp 8/imm32
13738
13739 5d/pop-to-ebp
13740 c3/return
13741
13742 test-populate-non-addr-handle:
13743
13744 55/push-ebp
13745 89/<- %ebp 4/r32/esp
13746
13747 (clear-stream _test-input-stream)
13748 (clear-stream $_test-input-buffered-file->buffer)
13749 (clear-stream _test-output-stream)
13750 (clear-stream $_test-output-buffered-file->buffer)
13751 (clear-stream _test-error-stream)
13752 (clear-stream $_test-error-buffered-file->buffer)
13753
13754 68/push 0/imm32
13755 68/push 0/imm32
13756 89/<- %edx 4/r32/esp
13757 (tailor-exit-descriptor %edx 0x10)
13758
13759 (write _test-input-stream "fn foo {\n")
13760 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
13761 (write _test-input-stream " populate y, 3\n")
13762 (write _test-input-stream "}\n")
13763
13764 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13765
13766
13767 89/<- %edx 4/r32/esp
13768 (flush _test-output-buffered-file)
13769 (flush _test-error-buffered-file)
13770 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13776
13777 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr-handle: output should be empty")
13778 (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")
13779
13780 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr-handle: exit status")
13781
13782 81 0/subop/add %esp 8/imm32
13783
13784 5d/pop-to-ebp
13785 c3/return
13786
13787 test-populate-non-addr-handle-array:
13788
13789 55/push-ebp
13790 89/<- %ebp 4/r32/esp
13791
13792 (clear-stream _test-input-stream)
13793 (clear-stream $_test-input-buffered-file->buffer)
13794 (clear-stream _test-output-stream)
13795 (clear-stream $_test-output-buffered-file->buffer)
13796 (clear-stream _test-error-stream)
13797 (clear-stream $_test-error-buffered-file->buffer)
13798
13799 68/push 0/imm32
13800 68/push 0/imm32
13801 89/<- %edx 4/r32/esp
13802 (tailor-exit-descriptor %edx 0x10)
13803
13804 (write _test-input-stream "fn foo {\n")
13805 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
13806 (write _test-input-stream " populate y, 3\n")
13807 (write _test-input-stream "}\n")
13808
13809 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13810
13811
13812 89/<- %edx 4/r32/esp
13813 (flush _test-output-buffered-file)
13814 (flush _test-error-buffered-file)
13815 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13821
13822 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr-handle-array: output should be empty")
13823 (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")
13824
13825 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr-handle-array: exit status")
13826
13827 81 0/subop/add %esp 8/imm32
13828
13829 5d/pop-to-ebp
13830 c3/return
13831
13832 test-populate-deref-address:
13833
13834 55/push-ebp
13835 89/<- %ebp 4/r32/esp
13836
13837 (clear-stream _test-input-stream)
13838 (clear-stream $_test-input-buffered-file->buffer)
13839 (clear-stream _test-output-stream)
13840 (clear-stream $_test-output-buffered-file->buffer)
13841
13842 (write _test-input-stream "fn foo {\n")
13843 (write _test-input-stream " var y/ecx: (addr addr handle array int) <- copy 0\n")
13844 (write _test-input-stream " populate *y, 3\n")
13845 (write _test-input-stream "}\n")
13846
13847 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13848 (flush _test-output-buffered-file)
13849 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13855
13856 (check-next-stream-line-equal _test-error-stream "" "F - test-populate-deref-address: error message")
13857
13858 5d/pop-to-ebp
13859 c3/return
13860
13861 test-populate-stream-with-no-inout:
13862
13863 55/push-ebp
13864 89/<- %ebp 4/r32/esp
13865
13866 (clear-stream _test-input-stream)
13867 (clear-stream $_test-input-buffered-file->buffer)
13868 (clear-stream _test-output-stream)
13869 (clear-stream $_test-output-buffered-file->buffer)
13870 (clear-stream _test-error-stream)
13871 (clear-stream $_test-error-buffered-file->buffer)
13872
13873 68/push 0/imm32
13874 68/push 0/imm32
13875 89/<- %edx 4/r32/esp
13876 (tailor-exit-descriptor %edx 0x10)
13877
13878 (write _test-input-stream "fn foo {\n")
13879 (write _test-input-stream " populate-stream\n")
13880 (write _test-input-stream "}\n")
13881
13882 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13883
13884
13885 89/<- %edx 4/r32/esp
13886 (flush _test-output-buffered-file)
13887 (flush _test-error-buffered-file)
13888 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13894
13895 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-no-inout: output should be empty")
13896 (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")
13897
13898 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-no-inout: exit status")
13899
13900 81 0/subop/add %esp 8/imm32
13901
13902 5d/pop-to-ebp
13903 c3/return
13904
13905 test-populate-stream-with-too-many-inouts:
13906
13907 55/push-ebp
13908 89/<- %ebp 4/r32/esp
13909
13910 (clear-stream _test-input-stream)
13911 (clear-stream $_test-input-buffered-file->buffer)
13912 (clear-stream _test-output-stream)
13913 (clear-stream $_test-output-buffered-file->buffer)
13914 (clear-stream _test-error-stream)
13915 (clear-stream $_test-error-buffered-file->buffer)
13916
13917 68/push 0/imm32
13918 68/push 0/imm32
13919 89/<- %edx 4/r32/esp
13920 (tailor-exit-descriptor %edx 0x10)
13921
13922 (write _test-input-stream "fn foo {\n")
13923 (write _test-input-stream " var x: (addr handle int)\n")
13924 (write _test-input-stream " populate-stream x, 3, 0\n")
13925 (write _test-input-stream "}\n")
13926
13927 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13928
13929
13930 89/<- %edx 4/r32/esp
13931 (flush _test-output-buffered-file)
13932 (flush _test-error-buffered-file)
13933 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13939
13940 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-too-many-inouts: output should be empty")
13941 (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")
13942
13943 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-too-many-inouts: exit status")
13944
13945 81 0/subop/add %esp 8/imm32
13946
13947 5d/pop-to-ebp
13948 c3/return
13949
13950 test-populate-stream-with-output:
13951
13952 55/push-ebp
13953 89/<- %ebp 4/r32/esp
13954
13955 (clear-stream _test-input-stream)
13956 (clear-stream $_test-input-buffered-file->buffer)
13957 (clear-stream _test-output-stream)
13958 (clear-stream $_test-output-buffered-file->buffer)
13959 (clear-stream _test-error-stream)
13960 (clear-stream $_test-error-buffered-file->buffer)
13961
13962 68/push 0/imm32
13963 68/push 0/imm32
13964 89/<- %edx 4/r32/esp
13965 (tailor-exit-descriptor %edx 0x10)
13966
13967 (write _test-input-stream "fn foo {\n")
13968 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
13969 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
13970 (write _test-input-stream " x <- populate-stream y\n")
13971 (write _test-input-stream "}\n")
13972
13973 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13974
13975
13976 89/<- %edx 4/r32/esp
13977 (flush _test-output-buffered-file)
13978 (flush _test-error-buffered-file)
13979 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
13985
13986 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-output: output should be empty")
13987 (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")
13988
13989 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-output: exit status")
13990
13991 81 0/subop/add %esp 8/imm32
13992
13993 5d/pop-to-ebp
13994 c3/return
13995
13996 test-populate-stream-non-addr:
13997
13998 55/push-ebp
13999 89/<- %ebp 4/r32/esp
14000
14001 (clear-stream _test-input-stream)
14002 (clear-stream $_test-input-buffered-file->buffer)
14003 (clear-stream _test-output-stream)
14004 (clear-stream $_test-output-buffered-file->buffer)
14005 (clear-stream _test-error-stream)
14006 (clear-stream $_test-error-buffered-file->buffer)
14007
14008 68/push 0/imm32
14009 68/push 0/imm32
14010 89/<- %edx 4/r32/esp
14011 (tailor-exit-descriptor %edx 0x10)
14012
14013 (write _test-input-stream "fn foo {\n")
14014 (write _test-input-stream " var y: (handle int)\n")
14015 (write _test-input-stream " populate-stream y, 3\n")
14016 (write _test-input-stream "}\n")
14017
14018 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14019
14020
14021 89/<- %edx 4/r32/esp
14022 (flush _test-output-buffered-file)
14023 (flush _test-error-buffered-file)
14024 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
14030
14031 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr: output must be empty")
14032 (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")
14033
14034 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr: exit status")
14035
14036 81 0/subop/add %esp 8/imm32
14037
14038 5d/pop-to-ebp
14039 c3/return
14040
14041 test-populate-stream-non-addr-handle:
14042
14043 55/push-ebp
14044 89/<- %ebp 4/r32/esp
14045
14046 (clear-stream _test-input-stream)
14047 (clear-stream $_test-input-buffered-file->buffer)
14048 (clear-stream _test-output-stream)
14049 (clear-stream $_test-output-buffered-file->buffer)
14050 (clear-stream _test-error-stream)
14051 (clear-stream $_test-error-buffered-file->buffer)
14052
14053 68/push 0/imm32
14054 68/push 0/imm32
14055 89/<- %edx 4/r32/esp
14056 (tailor-exit-descriptor %edx 0x10)
14057
14058 (write _test-input-stream "fn foo {\n")
14059 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
14060 (write _test-input-stream " populate-stream y, 3\n")
14061 (write _test-input-stream "}\n")
14062
14063 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14064
14065
14066 89/<- %edx 4/r32/esp
14067 (flush _test-output-buffered-file)
14068 (flush _test-error-buffered-file)
14069 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
14075
14076 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr-handle: output should be empty")
14077 (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")
14078
14079 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr-handle: exit status")
14080
14081 81 0/subop/add %esp 8/imm32
14082
14083 5d/pop-to-ebp
14084 c3/return
14085
14086 test-populate-stream-non-addr-handle-stream:
14087
14088 55/push-ebp
14089 89/<- %ebp 4/r32/esp
14090
14091 (clear-stream _test-input-stream)
14092 (clear-stream $_test-input-buffered-file->buffer)
14093 (clear-stream _test-output-stream)
14094 (clear-stream $_test-output-buffered-file->buffer)
14095 (clear-stream _test-error-stream)
14096 (clear-stream $_test-error-buffered-file->buffer)
14097
14098 68/push 0/imm32
14099 68/push 0/imm32
14100 89/<- %edx 4/r32/esp
14101 (tailor-exit-descriptor %edx 0x10)
14102
14103 (write _test-input-stream "fn foo {\n")
14104 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
14105 (write _test-input-stream " populate-stream y, 3\n")
14106 (write _test-input-stream "}\n")
14107
14108 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14109
14110
14111 89/<- %edx 4/r32/esp
14112 (flush _test-output-buffered-file)
14113 (flush _test-error-buffered-file)
14114 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
14120
14121 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr-handle-stream: output should be empty")
14122 (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")
14123
14124 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr-handle-stream: exit status")
14125
14126 81 0/subop/add %esp 8/imm32
14127
14128 5d/pop-to-ebp
14129 c3/return
14130
14131 test-populate-stream-deref-address:
14132
14133 55/push-ebp
14134 89/<- %ebp 4/r32/esp
14135
14136 (clear-stream _test-input-stream)
14137 (clear-stream $_test-input-buffered-file->buffer)
14138 (clear-stream _test-output-stream)
14139 (clear-stream $_test-output-buffered-file->buffer)
14140
14141 (write _test-input-stream "fn foo {\n")
14142 (write _test-input-stream " var y/ecx: (addr addr handle stream int) <- copy 0\n")
14143 (write _test-input-stream " populate-stream *y, 3\n")
14144 (write _test-input-stream "}\n")
14145
14146 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14147 (flush _test-output-buffered-file)
14148 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
14154
14155 (check-next-stream-line-equal _test-error-stream "" "F - test-populate-stream-deref-address: error message")
14156
14157 5d/pop-to-ebp
14158 c3/return
14159
14160
14161
14162
14163
14164 == data
14165
14166
14167 Next-block-index:
14168 1/imm32
14169
14170 Curr-block-depth:
14171 1/imm32
14172
14173 == code
14174
14175 parse-mu:
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214 55/push-ebp
14215 89/<- %ebp 4/r32/esp
14216
14217 68/push _Program-signatures/imm32
14218
14219 50/push-eax
14220 51/push-ecx
14221 52/push-edx
14222 53/push-ebx
14223 56/push-esi
14224 57/push-edi
14225
14226 81 5/subop/subtract %esp 0x200/imm32
14227 68/push 0x200/imm32/size
14228 68/push 0/imm32/read
14229 68/push 0/imm32/write
14230 89/<- %ecx 4/r32/esp
14231
14232 68/push 0/imm32/end
14233 68/push 0/imm32/start
14234 89/<- %edx 4/r32/esp
14235
14236 bf/copy-to-edi _Program-functions/imm32
14237
14238 81 5/subop/subtract %esp 0xc00/imm32
14239 68/push 0xc00/imm32/size
14240 68/push 0/imm32/top
14241 89/<- %ebx 4/r32/esp
14242 {
14243 $parse-mu:line-loop:
14244 (clear-stream %ecx)
14245 (read-line-buffered *(ebp+8) %ecx)
14246
14247 81 7/subop/compare *ecx 0/imm32
14248 0f 84/jump-if-= break/disp32
14249 +-- 6 lines: #? # dump line ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
14255 (next-mu-token %ecx %edx)
14256
14257 (slice-empty? %edx)
14258 3d/compare-eax-and 0/imm32/false
14259 0f 85/jump-if-!= loop/disp32
14260
14261
14262 8b/-> *edx 0/r32/eax
14263 8a/copy-byte *eax 0/r32/AL
14264 81 4/subop/and %eax 0xff/imm32
14265
14266 3d/compare-eax-and 0x23/imm32/hash
14267 0f 84/jump-if-= loop/disp32
14268
14269 {
14270 $parse-mu:fn:
14271 (slice-equal? %edx "fn")
14272 3d/compare-eax-and 0/imm32/false
14273 0f 84/jump-if-= break/disp32
14274
14275 68/push 0/imm32
14276 68/push 0/imm32
14277 89/<- %esi 4/r32/esp
14278
14279 (allocate Heap *Function-size %esi)
14280
14281 (lookup *esi *(esi+4))
14282
14283 (clear-stack %ebx)
14284
14285 (populate-mu-function-header %ecx %eax %ebx *(ebp+0xc) *(ebp+0x10))
14286 (populate-mu-function-body *(ebp+8) %eax %ebx *(ebp+0xc) *(ebp+0x10))
14287
14288 8b/-> *esi 0/r32/eax
14289 89/<- *edi 0/r32/eax
14290 8b/-> *(esi+4) 0/r32/eax
14291 89/<- *(edi+4) 0/r32/eax
14292
14293
14294 (lookup *esi *(esi+4))
14295
14296 8d/copy-address *(eax+0x20) 7/r32/edi
14297
14298 81 0/subop/add %esp 8/imm32
14299
14300 e9/jump $parse-mu:line-loop/disp32
14301 }
14302
14303
14304 {
14305 $parse-mu:sig:
14306 (slice-equal? %edx "sig")
14307 3d/compare-eax-and 0/imm32/false
14308 0f 84/jump-if-= break/disp32
14309
14310 57/push-edi
14311 8b/-> *(ebp-4) 7/r32/edi
14312
14313 68/push 0/imm32
14314 68/push 0/imm32
14315 89/<- %esi 4/r32/esp
14316
14317 (allocate Heap *Function-size %esi)
14318
14319 (lookup *esi *(esi+4))
14320
14321 (populate-mu-function-signature %ecx %eax *(ebp+0xc) *(ebp+0x10))
14322
14323 8b/-> *esi 0/r32/eax
14324 89/<- *edi 0/r32/eax
14325 8b/-> *(esi+4) 0/r32/eax
14326 89/<- *(edi+4) 0/r32/eax
14327
14328
14329 (lookup *esi *(esi+4))
14330
14331 8d/copy-address *(eax+0x20) 7/r32/edi
14332
14333 81 0/subop/add %esp 8/imm32
14334
14335 89/<- *(ebp-4) 7/r32/edi
14336
14337 5f/pop-to-edi
14338
14339 e9/jump $parse-mu:line-loop/disp32
14340 }
14341
14342 {
14343 $parse-mu:type:
14344 (slice-equal? %edx "type")
14345 3d/compare-eax-and 0/imm32
14346 0f 84/jump-if-= break/disp32
14347 (next-mu-token %ecx %edx)
14348
14349 (pos-or-insert-slice Type-id %edx)
14350
14351 51/push-ecx
14352
14353 68/push 0/imm32
14354 68/push 0/imm32
14355 89/<- %ecx 4/r32/esp
14356 (find-or-create-typeinfo %eax %ecx)
14357
14358 (lookup *ecx *(ecx+4))
14359
14360
14361 (populate-mu-type *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
14362
14363
14364 81 0/subop/add %esp 8/imm32
14365
14366 59/pop-to-ecx
14367 e9/jump $parse-mu:line-loop/disp32
14368 }
14369
14370 e9/jump $parse-mu:error1/disp32
14371 }
14372 $parse-mu:end:
14373
14374 81 0/subop/add %esp 0x20c/imm32
14375 81 0/subop/add %esp 0xc08/imm32
14376 81 0/subop/add %esp 8/imm32
14377
14378 5f/pop-to-edi
14379 5e/pop-to-esi
14380 5b/pop-to-ebx
14381 5a/pop-to-edx
14382 59/pop-to-ecx
14383 58/pop-to-eax
14384
14385 81 0/subop/add %esp 4/imm32
14386
14387 89/<- %esp 5/r32/ebp
14388 5d/pop-to-ebp
14389 c3/return
14390
14391 $parse-mu:error1:
14392
14393 (write-buffered *(ebp+0xc) "unexpected top-level command: ")
14394 (write-slice-buffered *(ebp+0xc) %edx)
14395 (write-buffered *(ebp+0xc) "\n")
14396 (flush *(ebp+0xc))
14397 (stop *(ebp+0x10) 1)
14398
14399
14400 $parse-mu:error2:
14401
14402 (write-int32-hex-buffered *(ebp+0xc) *ebx)
14403 (write-buffered *(ebp+0xc) " vars not reclaimed after fn '")
14404 (write-slice-buffered *(ebp+0xc) *eax)
14405 (write-buffered *(ebp+0xc) "'\n")
14406 (flush *(ebp+0xc))
14407 (stop *(ebp+0x10) 1)
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424 populate-mu-function-header:
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456 55/push-ebp
14457 89/<- %ebp 4/r32/esp
14458
14459 50/push-eax
14460 51/push-ecx
14461 52/push-edx
14462 53/push-ebx
14463 57/push-edi
14464
14465 8b/-> *(ebp+0xc) 7/r32/edi
14466
14467 68/push 0/imm32/end
14468 68/push 0/imm32/start
14469 89/<- %ecx 4/r32/esp
14470
14471 68/push 0/imm32
14472 68/push 0/imm32
14473 89/<- %ebx 4/r32/esp
14474
14475 (next-mu-token *(ebp+8) %ecx)
14476
14477
14478 (slice-empty? %ecx)
14479 3d/compare-eax-and 0/imm32/false
14480 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14481
14482 (slice-equal? %ecx "{")
14483 3d/compare-eax-and 0/imm32/false
14484 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14485
14486 (slice-equal? %ecx "->")
14487 3d/compare-eax-and 0/imm32/false
14488 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14489
14490 (slice-equal? %ecx "}")
14491 3d/compare-eax-and 0/imm32/false
14492 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14493
14494 (function-exists? %ecx)
14495 3d/compare-eax-and 0/imm32/false
14496 0f 85/jump-if-!= $populate-mu-function-header:error-duplicate/disp32
14497
14498 (slice-starts-with? %ecx "break")
14499 3d/compare-eax-and 0/imm32/false
14500 0f 85/jump-if-!= $populate-mu-function-header:error-break/disp32
14501 (slice-starts-with? %ecx "loop")
14502 3d/compare-eax-and 0/imm32/false
14503 0f 85/jump-if-!= $populate-mu-function-header:error-loop/disp32
14504 (slice-equal? %ecx "lookup")
14505 3d/compare-eax-and 0/imm32/false
14506 0f 85/jump-if-!= $populate-mu-function-header:error-lookup/disp32
14507
14508 (slice-to-string Heap %ecx %edi)
14509
14510 {
14511 $populate-mu-function-header:check-for-inout:
14512 (next-mu-token *(ebp+8) %ecx)
14513
14514 (slice-empty? %ecx)
14515 3d/compare-eax-and 0/imm32/false
14516 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14517
14518 (slice-equal? %ecx "{")
14519 3d/compare-eax-and 0/imm32/false
14520 0f 85/jump-if-!= $populate-mu-function-header:done/disp32
14521
14522 (slice-equal? %ecx "->")
14523 3d/compare-eax-and 0/imm32/false
14524 0f 85/jump-if-!= break/disp32
14525
14526 (slice-equal? %ecx "}")
14527 3d/compare-eax-and 0/imm32/false
14528 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14529
14530 (lookup *edi *(edi+4))
14531 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x14) *(ebp+0x18))
14532
14533
14534 (lookup *ebx *(ebx+4))
14535 81 7/subop/compare *(eax+0x18) 0/imm32
14536 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
14537
14538
14539 {
14540 (lookup *edi *(edi+4))
14541 (string-equal? %eax "main")
14542 3d/compare-eax-and 0/imm32/false
14543 75/jump-if-!= break/disp8
14544 (lookup *ebx *(ebx+4))
14545 (addr-payload-contains-addr? %eax)
14546 3d/compare-eax-and 0/imm32/false
14547 0f 85/jump-if-!= $populate-mu-function-header:error-nested-addr-inout/disp32
14548 }
14549
14550
14551
14552 8d/copy-address *(edi+8) 0/r32/eax
14553 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
14554
14555 (push *(ebp+0x10) *ebx)
14556 (push *(ebp+0x10) *(ebx+4))
14557 (push *(ebp+0x10) 0)
14558
14559 e9/jump loop/disp32
14560 }
14561
14562 {
14563 $populate-mu-function-header:check-for-out:
14564 (next-mu-token *(ebp+8) %ecx)
14565
14566 (slice-empty? %ecx)
14567 3d/compare-eax-and 0/imm32/false
14568 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14569
14570 (slice-equal? %ecx "{")
14571 3d/compare-eax-and 0/imm32/false
14572 0f 85/jump-if-!= break/disp32
14573
14574 (slice-equal? %ecx "->")
14575 3d/compare-eax-and 0/imm32/false
14576 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14577
14578 (slice-equal? %ecx "}")
14579 3d/compare-eax-and 0/imm32/false
14580 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
14581
14582 (lookup *edi *(edi+4))
14583 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x14) *(ebp+0x18))
14584
14585
14586 (lookup *ebx *(ebx+4))
14587 81 7/subop/compare *(eax+0x18) 0/imm32
14588 0f 84/jump-if-= $populate-mu-function-header:error3/disp32
14589
14590 (lookup *eax *(eax+4))
14591 (string-equal? %eax "_")
14592 3d/compare-eax-and 0/imm32/false
14593 0f 84/jump-if-= $populate-mu-function-header:error4/disp32
14594
14595 (lookup *ebx *(ebx+4))
14596 (lookup *(eax+8) *(eax+0xc))
14597 (is-mu-addr-type? %eax)
14598 3d/compare-eax-and 0/imm32/false
14599 0f 85/jump-if-!= $populate-mu-function-header:error-addr-output/disp32
14600
14601 8d/copy-address *(edi+0x10) 0/r32/eax
14602 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
14603
14604 e9/jump loop/disp32
14605 }
14606 $populate-mu-function-header:done:
14607 (check-no-tokens-left *(ebp+8))
14608 $populate-mu-function-header:end:
14609
14610 81 0/subop/add %esp 0x10/imm32
14611
14612 5f/pop-to-edi
14613 5b/pop-to-ebx
14614 5a/pop-to-edx
14615 59/pop-to-ecx
14616 58/pop-to-eax
14617
14618 89/<- %esp 5/r32/ebp
14619 5d/pop-to-ebp
14620 c3/return
14621
14622 $populate-mu-function-header:error1:
14623
14624 (write-buffered *(ebp+0x14) "function header not in form 'fn <name> [inouts] [-> outputs] {' -- '")
14625 (flush *(ebp+0x14))
14626 (rewind-stream *(ebp+8))
14627 (write-stream-data *(ebp+0x14) *(ebp+8))
14628 (write-buffered *(ebp+0x14) "'\n")
14629 (flush *(ebp+0x14))
14630 (stop *(ebp+0x18) 1)
14631
14632
14633 $populate-mu-function-header:error2:
14634
14635 (write-buffered *(ebp+0x14) "fn ")
14636 50/push-eax
14637 (lookup *edi *(edi+4))
14638 (write-buffered *(ebp+0x14) %eax)
14639 58/pop-to-eax
14640 (write-buffered *(ebp+0x14) ": function inout '")
14641 (lookup *eax *(eax+4))
14642 (write-buffered *(ebp+0x14) %eax)
14643 (write-buffered *(ebp+0x14) "' cannot be in a register")
14644 (flush *(ebp+0x14))
14645 (stop *(ebp+0x18) 1)
14646
14647
14648 $populate-mu-function-header:error3:
14649
14650 (write-buffered *(ebp+0x14) "fn ")
14651 50/push-eax
14652 (lookup *edi *(edi+4))
14653 (write-buffered *(ebp+0x14) %eax)
14654 58/pop-to-eax
14655 (write-buffered *(ebp+0x14) ": function output '")
14656 (lookup *ebx *(ebx+4))
14657 (lookup *eax *(eax+4))
14658 (write-buffered *(ebp+0x14) %eax)
14659 (write-buffered *(ebp+0x14) "' must be in a register, in instruction '")
14660 (rewind-stream *(ebp+8))
14661 (write-stream-data *(ebp+0x14) *(ebp+8))
14662 (write-buffered *(ebp+0x14) "'\n")
14663 (flush *(ebp+0x14))
14664 (stop *(ebp+0x18) 1)
14665
14666
14667 $populate-mu-function-header:error4:
14668
14669 (write-buffered *(ebp+0x14) "fn ")
14670 50/push-eax
14671 (lookup *edi *(edi+4))
14672 (write-buffered *(ebp+0x14) %eax)
14673 58/pop-to-eax
14674 (write-buffered *(ebp+0x14) ": function outputs cannot be named; rename '")
14675 (lookup *ebx *(ebx+4))
14676 (lookup *eax *(eax+4))
14677 (write-buffered *(ebp+0x14) %eax)
14678 (write-buffered *(ebp+0x14) "' in the header to '_'\n")
14679 (flush *(ebp+0x14))
14680 (stop *(ebp+0x18) 1)
14681
14682
14683 $populate-mu-function-header:error-duplicate:
14684 (write-buffered *(ebp+0x14) "fn ")
14685 (write-slice-buffered *(ebp+0x14) %ecx)
14686 (write-buffered *(ebp+0x14) " defined more than once\n")
14687 (flush *(ebp+0x14))
14688 (stop *(ebp+0x18) 1)
14689
14690
14691 $populate-mu-function-header:error-break:
14692 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'break' for now. Please contact mu@akkartik.com.\n")
14693 (flush *(ebp+0x14))
14694 (stop *(ebp+0x18) 1)
14695
14696
14697 $populate-mu-function-header:error-loop:
14698 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'loop' for now. Please contact mu@akkartik.com.\n")
14699 (flush *(ebp+0x14))
14700 (stop *(ebp+0x18) 1)
14701
14702
14703 $populate-mu-function-header:error-lookup:
14704 (write-buffered *(ebp+0x14) "cannot define a function called 'lookup'\n")
14705 (flush *(ebp+0x14))
14706 (stop *(ebp+0x18) 1)
14707
14708
14709 $populate-mu-function-header:error-addr-output:
14710
14711 (write-buffered *(ebp+0x14) "fn ")
14712 50/push-eax
14713 (lookup *edi *(edi+4))
14714 (write-buffered *(ebp+0x14) %eax)
14715 58/pop-to-eax
14716 (write-buffered *(ebp+0x14) ": output cannot have an addr type; that could allow unsafe addresses to escape the function\n")
14717 (flush *(ebp+0x14))
14718 (stop *(ebp+0x18) 1)
14719
14720
14721 $populate-mu-function-header:error-nested-addr-inout:
14722
14723 (write-buffered *(ebp+0x14) "fn ")
14724 (lookup *edi *(edi+4))
14725 (write-buffered *(ebp+0x14) %eax)
14726 (write-buffered *(ebp+0x14) ": inout '")
14727 (lookup *ebx *(ebx+4))
14728 (lookup *eax *(eax+4))
14729 (write-buffered *(ebp+0x14) %eax)
14730 (write-buffered *(ebp+0x14) "' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function\n")
14731 (flush *(ebp+0x14))
14732 (stop *(ebp+0x18) 1)
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744 populate-mu-function-signature:
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770 55/push-ebp
14771 89/<- %ebp 4/r32/esp
14772
14773 50/push-eax
14774 51/push-ecx
14775 52/push-edx
14776 53/push-ebx
14777 57/push-edi
14778
14779 8b/-> *(ebp+0xc) 7/r32/edi
14780
14781 68/push 0/imm32/end
14782 68/push 0/imm32/start
14783 89/<- %ecx 4/r32/esp
14784
14785 68/push 0/imm32
14786 68/push 0/imm32
14787 89/<- %ebx 4/r32/esp
14788
14789 (next-mu-token *(ebp+8) %ecx)
14790
14791
14792 (slice-equal? %ecx "{")
14793 3d/compare-eax-and 0/imm32/false
14794 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14795
14796 (slice-equal? %ecx "->")
14797 3d/compare-eax-and 0/imm32/false
14798 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14799
14800 (slice-equal? %ecx "}")
14801 3d/compare-eax-and 0/imm32/false
14802 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14803
14804 (function-exists? %ecx)
14805 3d/compare-eax-and 0/imm32/false
14806 0f 85/jump-if-!= $populate-mu-function-signature:error-duplicate/disp32
14807
14808 (slice-starts-with? %ecx "break")
14809 3d/compare-eax-and 0/imm32/false
14810 0f 85/jump-if-!= $populate-mu-function-signature:error-break/disp32
14811 (slice-starts-with? %ecx "loop")
14812 3d/compare-eax-and 0/imm32/false
14813 0f 85/jump-if-!= $populate-mu-function-signature:error-loop/disp32
14814
14815 (slice-to-string Heap %ecx %edi)
14816
14817 {
14818 $populate-mu-function-signature:check-for-inout:
14819 (next-mu-token *(ebp+8) %ecx)
14820 (slice-empty? %ecx)
14821 3d/compare-eax-and 0/imm32/false
14822 0f 85/jump-if-!= break/disp32
14823
14824 (slice-equal? %ecx "->")
14825 3d/compare-eax-and 0/imm32/false
14826 0f 85/jump-if-!= break/disp32
14827
14828 (slice-equal? %ecx "{")
14829 3d/compare-eax-and 0/imm32/false
14830 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14831
14832 (slice-equal? %ecx "}")
14833 3d/compare-eax-and 0/imm32/false
14834 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14835
14836 (lookup *edi *(edi+4))
14837 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x10) *(ebp+0x14))
14838
14839
14840 (lookup *ebx *(ebx+4))
14841 81 7/subop/compare *(eax+0x18) 0/imm32
14842 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
14843
14844
14845 {
14846 (lookup *edi *(edi+4))
14847 (string-equal? %eax "main")
14848 3d/compare-eax-and 0/imm32/false
14849 75/jump-if-!= break/disp8
14850 (lookup *ebx *(ebx+4))
14851 (addr-payload-contains-addr? %eax)
14852 3d/compare-eax-and 0/imm32/false
14853 0f 85/jump-if-!= $populate-mu-function-signature:error-nested-addr-inout/disp32
14854 }
14855
14856
14857 (lookup *ebx *(ebx+4))
14858 81 7/subop/compare *(eax+0x18) 0/imm32
14859 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
14860
14861
14862
14863 8d/copy-address *(edi+8) 0/r32/eax
14864 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
14865
14866 e9/jump loop/disp32
14867 }
14868
14869 {
14870 $populate-mu-function-signature:check-for-out:
14871 (next-mu-token *(ebp+8) %ecx)
14872 (slice-empty? %ecx)
14873 3d/compare-eax-and 0/imm32/false
14874 0f 85/jump-if-!= break/disp32
14875
14876 (slice-equal? %ecx "{")
14877 3d/compare-eax-and 0/imm32/false
14878 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14879
14880 (slice-equal? %ecx "->")
14881 3d/compare-eax-and 0/imm32/false
14882 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14883
14884 (slice-equal? %ecx "}")
14885 3d/compare-eax-and 0/imm32/false
14886 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
14887
14888 (lookup *edi *(edi+4))
14889 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x10) *(ebp+0x14))
14890
14891
14892 (lookup *ebx *(ebx+4))
14893 81 7/subop/compare *(eax+0x18) 0/imm32
14894 0f 84/jump-if-= $populate-mu-function-signature:error3/disp32
14895
14896 (lookup *eax *(eax+4))
14897 (string-equal? %eax "_")
14898 3d/compare-eax-and 0/imm32/false
14899 0f 84/jump-if-= $populate-mu-function-signature:error4/disp32
14900
14901
14902 {
14903 (lookup *edi *(edi+4))
14904 (string-equal? %eax "lookup")
14905 3d/compare-eax-and 0/imm32/false
14906 75/jump-if-!= break/disp8
14907 (lookup *ebx *(ebx+4))
14908 (lookup *(eax+8) *(eax+0xc))
14909 (is-mu-addr-type? %eax)
14910 3d/compare-eax-and 0/imm32/false
14911 0f 85/jump-if-!= $populate-mu-function-signature:error-addr-output/disp32
14912 }
14913
14914 8d/copy-address *(edi+0x10) 0/r32/eax
14915 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
14916
14917 e9/jump loop/disp32
14918 }
14919 $populate-mu-function-signature:done:
14920 (check-no-tokens-left *(ebp+8))
14921 $populate-mu-function-signature:end:
14922
14923 81 0/subop/add %esp 0x10/imm32
14924
14925 5f/pop-to-edi
14926 5b/pop-to-ebx
14927 5a/pop-to-edx
14928 59/pop-to-ecx
14929 58/pop-to-eax
14930
14931 89/<- %esp 5/r32/ebp
14932 5d/pop-to-ebp
14933 c3/return
14934
14935 $populate-mu-function-signature:error1:
14936
14937 (write-buffered *(ebp+0x10) "function signature not in form 'fn <name> [inouts] [-> outputs] {' -- '")
14938 (flush *(ebp+0x10))
14939 (rewind-stream *(ebp+8))
14940 (write-stream-data *(ebp+0x10) *(ebp+8))
14941 (write-buffered *(ebp+0x10) "'\n")
14942 (flush *(ebp+0x10))
14943 (stop *(ebp+0x14) 1)
14944
14945
14946 $populate-mu-function-signature:error2:
14947
14948 (write-buffered *(ebp+0x10) "fn ")
14949 50/push-eax
14950 (lookup *edi *(edi+4))
14951 (write-buffered *(ebp+0x10) %eax)
14952 58/pop-to-eax
14953 (write-buffered *(ebp+0x10) ": function inout '")
14954 (lookup *eax *(eax+4))
14955 (write-buffered *(ebp+0x10) %eax)
14956 (write-buffered *(ebp+0x10) "' cannot be in a register")
14957 (flush *(ebp+0x10))
14958 (stop *(ebp+0x14) 1)
14959
14960
14961 $populate-mu-function-signature:error3:
14962
14963 (write-buffered *(ebp+0x10) "fn ")
14964 50/push-eax
14965 (lookup *edi *(edi+4))
14966 (write-buffered *(ebp+0x10) %eax)
14967 58/pop-to-eax
14968 (write-buffered *(ebp+0x10) ": function output '")
14969 (lookup *ebx *(ebx+4))
14970 (lookup *eax *(eax+4))
14971 (write-buffered *(ebp+0x10) %eax)
14972 (write-buffered *(ebp+0x10) "' must be in a register, in instruction '")
14973 (rewind-stream *(ebp+8))
14974 (write-stream-data *(ebp+0x10) *(ebp+8))
14975 (write-buffered *(ebp+0x10) "'\n")
14976 (flush *(ebp+0x10))
14977 (stop *(ebp+0x14) 1)
14978
14979
14980 $populate-mu-function-signature:error4:
14981
14982 (write-buffered *(ebp+0x10) "fn ")
14983 50/push-eax
14984 (lookup *edi *(edi+4))
14985 (write-buffered *(ebp+0x10) %eax)
14986 58/pop-to-eax
14987 (write-buffered *(ebp+0x10) ": function outputs cannot be named; rename '")
14988 (lookup *ebx *(ebx+4))
14989 (lookup *eax *(eax+4))
14990 (write-buffered *(ebp+0x10) %eax)
14991 (write-buffered *(ebp+0x10) "' in the header to '_'\n")
14992 (flush *(ebp+0x10))
14993 (stop *(ebp+0x14) 1)
14994
14995
14996 $populate-mu-function-signature:error-duplicate:
14997 (write-buffered *(ebp+0x10) "fn ")
14998 (write-slice-buffered *(ebp+0x10) %ecx)
14999 (write-buffered *(ebp+0x10) " defined more than once\n")
15000 (flush *(ebp+0x10))
15001 (stop *(ebp+0x14) 1)
15002
15003
15004 $populate-mu-function-signature:error-break:
15005 (write-buffered *(ebp+0x10) "Sorry, I've reserved all function names starting with 'break' for now. Please contact mu@akkartik.com.\n")
15006 (flush *(ebp+0x10))
15007 (stop *(ebp+0x14) 1)
15008
15009
15010 $populate-mu-function-signature:error-loop:
15011 (write-buffered *(ebp+0x10) "Sorry, I've reserved all function names starting with 'loop' for now. Please contact mu@akkartik.com.\n")
15012 (flush *(ebp+0x10))
15013 (stop *(ebp+0x14) 1)
15014
15015
15016 $populate-mu-function-signature:error-addr-output:
15017
15018 (write-buffered *(ebp+0x10) "fn ")
15019 50/push-eax
15020 (lookup *edi *(edi+4))
15021 (write-buffered *(ebp+0x10) %eax)
15022 58/pop-to-eax
15023 (write-buffered *(ebp+0x10) ": output cannot have an addr type; that could allow unsafe addresses to escape the function\n")
15024 (flush *(ebp+0x10))
15025 (stop *(ebp+0x14) 1)
15026
15027
15028 $populate-mu-function-signature:error-nested-addr-inout:
15029
15030 (write-buffered *(ebp+0x10) "fn ")
15031 (lookup *edi *(edi+4))
15032 (write-buffered *(ebp+0x10) %eax)
15033 (write-buffered *(ebp+0x10) ": inout '")
15034 (lookup *ebx *(ebx+4))
15035 (lookup *eax *(eax+4))
15036 (write-buffered *(ebp+0x10) %eax)
15037 (write-buffered *(ebp+0x10) "' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function\n")
15038 (flush *(ebp+0x10))
15039 (stop *(ebp+0x14) 1)
15040
15041
15042 addr-payload-contains-addr?:
15043
15044 55/push-ebp
15045 89/<- %ebp 4/r32/esp
15046
15047 8b/-> *(ebp+8) 0/r32/eax
15048 (lookup *(eax+8) *(eax+0xc))
15049
15050 (lookup *(eax+0xc) *(eax+0x10))
15051 (type-tree-contains? %eax 2)
15052
15053 $addr-payload-contains-addr?:end:
15054
15055 89/<- %esp 5/r32/ebp
15056 5d/pop-to-ebp
15057 c3/return
15058
15059 type-tree-contains?:
15060
15061 55/push-ebp
15062 89/<- %ebp 4/r32/esp
15063
15064 51/push-ecx
15065
15066 8b/-> *(ebp+8) 0/r32/eax
15067 3d/compare-eax-and 0/imm32
15068 0f 84/jump-if-= $type-tree-contains?:end/disp32
15069
15070 81 7/subop/compare *eax 0/imm32/false
15071 {
15072 74/jump-if-= break/disp8
15073 8b/-> *(ebp+0xc) 1/r32/ecx
15074 39/compare *(eax+4) 1/r32/ecx
15075 0f 94/set-if-= %al
15076 81 4/subop/and %eax 0xff/imm32
15077 eb/jump $type-tree-contains?:end/disp8
15078 }
15079
15080 (lookup *(eax+4) *(eax+8))
15081 (type-tree-contains? %eax *(ebp+0xc))
15082 3d/compare-eax-and 0/imm32/false
15083 75/jump-if-!= $type-tree-contains?:end/disp8
15084
15085 8b/-> *(ebp+8) 0/r32/eax
15086 (lookup *(eax+0xc) *(eax+0x10))
15087 (type-tree-contains? %eax *(ebp+0xc))
15088 $type-tree-contains?:end:
15089
15090 59/pop-to-ecx
15091
15092 89/<- %esp 5/r32/ebp
15093 5d/pop-to-ebp
15094 c3/return
15095
15096 function-exists?:
15097
15098 55/push-ebp
15099 89/<- %ebp 4/r32/esp
15100
15101 51/push-ecx
15102
15103 (lookup *_Program-functions *_Program-functions->payload)
15104 89/<- %ecx 0/r32/eax
15105 {
15106
15107 81 7/subop/compare %ecx 0/imm32
15108 74/jump-if-= break/disp8
15109
15110 {
15111 (lookup *ecx *(ecx+4))
15112 (slice-equal? *(ebp+8) %eax)
15113 3d/compare-eax-and 0/imm32/false
15114 74/jump-if-= break/disp8
15115 b8/copy-to-eax 1/imm32/true
15116 e9/jump $function-exists?:end/disp32
15117 }
15118
15119 (lookup *(ecx+0x20) *(ecx+0x24))
15120 89/<- %ecx 0/r32/eax
15121
15122 eb/jump loop/disp8
15123 }
15124
15125 (lookup *_Program-signatures *_Program-signatures->payload)
15126 89/<- %ecx 0/r32/eax
15127 {
15128
15129 81 7/subop/compare %ecx 0/imm32
15130 74/jump-if-= break/disp8
15131
15132 {
15133 (lookup *ecx *(ecx+4))
15134 (slice-equal? *(ebp+8) %eax)
15135 3d/compare-eax-and 0/imm32/false
15136 74/jump-if-= break/disp8
15137 b8/copy-to-eax 1/imm32/true
15138 eb/jump $function-exists?:end/disp8
15139 }
15140
15141 (lookup *(ecx+0x20) *(ecx+0x24))
15142 89/<- %ecx 0/r32/eax
15143
15144 eb/jump loop/disp8
15145 }
15146
15147 b8/copy-to-eax 0/imm32/false
15148 $function-exists?:end:
15149
15150 59/pop-to-ecx
15151
15152 89/<- %esp 5/r32/ebp
15153 5d/pop-to-ebp
15154 c3/return
15155
15156 test-function-header-with-arg:
15157
15158 55/push-ebp
15159 89/<- %ebp 4/r32/esp
15160
15161 8b/-> *Primitive-type-ids 0/r32/eax
15162 89/<- *Type-id 0/r32/eax
15163 c7 0/subop/copy *_Program-functions 0/imm32
15164 c7 0/subop/copy *_Program-functions->payload 0/imm32
15165 c7 0/subop/copy *_Program-types 0/imm32
15166 c7 0/subop/copy *_Program-types->payload 0/imm32
15167 c7 0/subop/copy *_Program-signatures 0/imm32
15168 c7 0/subop/copy *_Program-signatures->payload 0/imm32
15169 (clear-stream _test-input-stream)
15170 (write _test-input-stream "foo n: int {\n")
15171
15172 2b/subtract *Function-size 4/r32/esp
15173 89/<- %ecx 4/r32/esp
15174 (zero-out %ecx *Function-size)
15175
15176 81 5/subop/subtract %esp 0xc0/imm32
15177 68/push 0xc0/imm32/size
15178 68/push 0/imm32/top
15179 89/<- %ebx 4/r32/esp
15180
15181 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
15182
15183 (lookup *ecx *(ecx+4))
15184 (check-strings-equal %eax "foo" "F - test-function-header-with-arg/name")
15185
15186 (lookup *(ecx+8) *(ecx+0xc))
15187 (lookup *eax *(eax+4))
15188 89/<- %edx 0/r32/eax
15189
15190 (lookup *edx *(edx+4))
15191 (check-strings-equal %eax "n" "F - test-function-header-with-arg/inout:0")
15192
15193 (lookup *(edx+8) *(edx+0xc))
15194 (check-ints-equal *eax 1 "F - test-function-header-with-arg/inout:0/type:0")
15195 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-arg/inout:0/type:1")
15196 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-arg/inout:0/type:2")
15197
15198 89/<- %esp 5/r32/ebp
15199 5d/pop-to-ebp
15200 c3/return
15201
15202 test-function-header-with-multiple-args:
15203
15204 55/push-ebp
15205 89/<- %ebp 4/r32/esp
15206
15207 8b/-> *Primitive-type-ids 0/r32/eax
15208 89/<- *Type-id 0/r32/eax
15209 c7 0/subop/copy *_Program-functions 0/imm32
15210 c7 0/subop/copy *_Program-functions->payload 0/imm32
15211 c7 0/subop/copy *_Program-types 0/imm32
15212 c7 0/subop/copy *_Program-types->payload 0/imm32
15213 c7 0/subop/copy *_Program-signatures 0/imm32
15214 c7 0/subop/copy *_Program-signatures->payload 0/imm32
15215 (clear-stream _test-input-stream)
15216 (write _test-input-stream "foo a: int, b: int c: int {\n")
15217
15218 2b/subtract *Function-size 4/r32/esp
15219 89/<- %ecx 4/r32/esp
15220 (zero-out %ecx *Function-size)
15221
15222 81 5/subop/subtract %esp 0xc0/imm32
15223 68/push 0xc0/imm32/size
15224 68/push 0/imm32/top
15225 89/<- %ebx 4/r32/esp
15226
15227 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
15228
15229 (lookup *ecx *(ecx+4))
15230 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args/name")
15231
15232 (lookup *(ecx+8) *(ecx+0xc))
15233 89/<- %edx 0/r32/eax
15234 $test-function-header-with-multiple-args:inout0:
15235
15236 (lookup *edx *(edx+4))
15237 89/<- %ebx 0/r32/eax
15238
15239 (lookup *ebx *(ebx+4))
15240 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args/inout:0")
15241
15242 (lookup *(ebx+8) *(ebx+0xc))
15243 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:0/type:0")
15244 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:0/type:1")
15245 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:0/type:2")
15246 $test-function-header-with-multiple-args:inout1:
15247
15248 (lookup *(edx+8) *(edx+0xc))
15249 89/<- %edx 0/r32/eax
15250
15251 (lookup *edx *(edx+4))
15252 89/<- %ebx 0/r32/eax
15253
15254 (lookup *ebx *(ebx+4))
15255 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args/inout:1")
15256
15257 (lookup *(ebx+8) *(ebx+0xc))
15258 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:1/type:0")
15259 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:1/type:1")
15260 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:1/type:2")
15261 $test-function-header-with-multiple-args:inout2:
15262
15263 (lookup *(edx+8) *(edx+0xc))
15264 89/<- %edx 0/r32/eax
15265
15266 (lookup *edx *(edx+4))
15267 89/<- %ebx 0/r32/eax
15268
15269 (lookup *ebx *(ebx+4))
15270 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args/inout:2")
15271
15272 (lookup *(ebx+8) *(ebx+0xc))
15273 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:2/type:0")
15274 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:2/type:1")
15275 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:2/type:2")
15276
15277 89/<- %esp 5/r32/ebp
15278 5d/pop-to-ebp
15279 c3/return
15280
15281 test-function-header-with-multiple-args-and-outputs:
15282
15283 55/push-ebp
15284 89/<- %ebp 4/r32/esp
15285
15286 8b/-> *Primitive-type-ids 0/r32/eax
15287 89/<- *Type-id 0/r32/eax
15288 c7 0/subop/copy *_Program-functions 0/imm32
15289 c7 0/subop/copy *_Program-functions->payload 0/imm32
15290 c7 0/subop/copy *_Program-types 0/imm32
15291 c7 0/subop/copy *_Program-types->payload 0/imm32
15292 c7 0/subop/copy *_Program-signatures 0/imm32
15293 c7 0/subop/copy *_Program-signatures->payload 0/imm32
15294 (clear-stream _test-input-stream)
15295 (write _test-input-stream "foo a: int, b: int, c: int -> _/ecx: int _/edx: int {\n")
15296
15297 2b/subtract *Function-size 4/r32/esp
15298 89/<- %ecx 4/r32/esp
15299 (zero-out %ecx *Function-size)
15300
15301 81 5/subop/subtract %esp 0xc0/imm32
15302 68/push 0xc0/imm32/size
15303 68/push 0/imm32/top
15304 89/<- %ebx 4/r32/esp
15305
15306 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
15307
15308 (lookup *ecx *(ecx+4))
15309 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args-and-outputs/name")
15310
15311 (lookup *(ecx+8) *(ecx+0xc))
15312 89/<- %edx 0/r32/eax
15313 $test-function-header-with-multiple-args-and-outputs:inout0:
15314
15315 (lookup *edx *(edx+4))
15316 89/<- %ebx 0/r32/eax
15317
15318 (lookup *ebx *(ebx+4))
15319 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args-and-outputs/inout:0")
15320
15321 (lookup *(ebx+8) *(ebx+0xc))
15322 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:0")
15323 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:1")
15324 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:2")
15325 $test-function-header-with-multiple-args-and-outputs:inout1:
15326
15327 (lookup *(edx+8) *(edx+0xc))
15328 89/<- %edx 0/r32/eax
15329
15330 (lookup *edx *(edx+4))
15331 89/<- %ebx 0/r32/eax
15332
15333 (lookup *ebx *(ebx+4))
15334 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args-and-outputs/inout:1")
15335
15336 (lookup *(ebx+8) *(ebx+0xc))
15337 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:0")
15338 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:1")
15339 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:2")
15340 $test-function-header-with-multiple-args-and-outputs:inout2:
15341
15342 (lookup *(edx+8) *(edx+0xc))
15343 89/<- %edx 0/r32/eax
15344
15345 (lookup *edx *(edx+4))
15346 89/<- %ebx 0/r32/eax
15347
15348 (lookup *ebx *(ebx+4))
15349 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args-and-outputs/inout:2")
15350
15351 (lookup *(ebx+8) *(ebx+0xc))
15352 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:0")
15353 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:1")
15354 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:2")
15355 $test-function-header-with-multiple-args-and-outputs:out0:
15356
15357 (lookup *(ecx+0x10) *(ecx+0x14))
15358 89/<- %edx 0/r32/eax
15359
15360 (lookup *edx *(edx+4))
15361 89/<- %ebx 0/r32/eax
15362
15363 (lookup *ebx *(ebx+4))
15364 (check-strings-equal %eax "_" "F - test-function-header-with-multiple-args-and-outputs/output:0")
15365
15366 (lookup *(ebx+0x18) *(ebx+0x1c))
15367 (check-strings-equal %eax "ecx" "F - test-function-header-with-multiple-args-and-outputs/output:0/register")
15368
15369 (lookup *(ebx+8) *(ebx+0xc))
15370 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:0")
15371 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:1")
15372 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:2")
15373 $test-function-header-with-multiple-args-and-outputs:out1:
15374
15375 (lookup *(edx+8) *(edx+0xc))
15376 89/<- %edx 0/r32/eax
15377
15378 (lookup *edx *(edx+4))
15379 89/<- %ebx 0/r32/eax
15380
15381 (lookup *ebx *(ebx+4))
15382 (check-strings-equal %eax "_" "F - test-function-header-with-multiple-args-and-outputs/output:1")
15383
15384 (lookup *(ebx+0x18) *(ebx+0x1c))
15385 (check-strings-equal %eax "edx" "F - test-function-header-with-multiple-args-and-outputs/output:1/register")
15386
15387 (lookup *(ebx+8) *(ebx+0xc))
15388 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:0")
15389 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:1")
15390 (check-ints-equal *(eax+0c) 0 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:2")
15391
15392 89/<- %esp 5/r32/ebp
15393 5d/pop-to-ebp
15394 c3/return
15395
15396
15397
15398
15399
15400
15401
15402
15403 parse-var-with-type:
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420 55/push-ebp
15421 89/<- %ebp 4/r32/esp
15422
15423 50/push-eax
15424 51/push-ecx
15425 52/push-edx
15426 53/push-ebx
15427 56/push-esi
15428 57/push-edi
15429
15430 8b/-> *(ebp+8) 6/r32/esi
15431
15432 8b/-> *(esi+4) 1/r32/ecx
15433 49/decrement-ecx
15434 8a/copy-byte *ecx 1/r32/CL
15435 81 4/subop/and %ecx 0xff/imm32
15436 81 7/subop/compare %ecx 0x3a/imm32/colon
15437 0f 85/jump-if-!= $parse-var-with-type:abort/disp32
15438
15439 ff 1/subop/decrement *(esi+4)
15440
15441 68/push 0/imm32/end
15442 68/push 0/imm32/start
15443 89/<- %ecx 4/r32/esp
15444 $parse-var-with-type:parse-name:
15445 (next-token-from-slice *esi *(esi+4) 0x2f %ecx)
15446 $parse-var-with-type:create-var:
15447
15448 (new-var-from-slice Heap %ecx *(ebp+0x10))
15449
15450 $parse-var-with-type:save-register:
15451
15452 8b/-> *(ebp+0x10) 7/r32/edi
15453 (lookup *edi *(edi+4))
15454 89/<- %edi 0/r32/eax
15455
15456 (next-token-from-slice *(ecx+4) *(esi+4) 0x2f %ecx)
15457
15458 {
15459 $parse-var-with-type:write-register:
15460 (slice-empty? %ecx)
15461 3d/compare-eax-and 0/imm32/false
15462 75/jump-if-!= break/disp8
15463
15464 8d/copy-address *(edi+0x18) 0/r32/eax
15465 (slice-to-string Heap %ecx %eax)
15466 }
15467 $parse-var-with-type:save-type:
15468 8d/copy-address *(edi+8) 0/r32/eax
15469 (parse-type Heap *(ebp+0xc) %eax *(ebp+0x18) *(ebp+0x1c))
15470 $parse-var-with-type:check-register:
15471 (lookup *(edi+0x18) *(edi+0x1c))
15472 3d/compare-eax-and 0/imm32
15473 74/jump-if-= $parse-var-with-type:end/disp8
15474 (is-float-register? %eax)
15475 {
15476 3d/compare-eax-and 0/imm32/false
15477 74/jump-if-= break/disp8
15478
15479 (lookup *(edi+8) *(edi+0xc))
15480 (is-simple-mu-type? %eax 0xf)
15481 3d/compare-eax-and 0/imm32/false
15482 0f 84/jump-if-= $parse-var-with-type:error-non-float-in-floating-point-register/disp32
15483 eb/jump $parse-var-with-type:end/disp8
15484 }
15485
15486 (lookup *(edi+8) *(edi+0xc))
15487 (is-simple-mu-type? %eax 0xf)
15488 3d/compare-eax-and 0/imm32/false
15489 0f 85/jump-if-!= $parse-var-with-type:error-float-in-integer-register/disp32
15490 $parse-var-with-type:end:
15491
15492 81 0/subop/add %esp 8/imm32
15493
15494 5f/pop-to-edi
15495 5e/pop-to-esi
15496 5b/pop-to-ebx
15497 5a/pop-to-edx
15498 59/pop-to-ecx
15499 58/pop-to-eax
15500
15501 89/<- %esp 5/r32/ebp
15502 5d/pop-to-ebp
15503 c3/return
15504
15505 $parse-var-with-type:abort:
15506
15507 (write-buffered *(ebp+0x18) "fn ")
15508 (write-buffered *(ebp+0x18) *(ebp+0x14))
15509 (write-buffered *(ebp+0x18) ": var should have form 'name: type' in '")
15510 (flush *(ebp+0x18))
15511 (rewind-stream *(ebp+0xc))
15512 (write-stream-data *(ebp+0x18) *(ebp+0xc))
15513 (write-buffered *(ebp+0x18) "'\n")
15514 (flush *(ebp+0x18))
15515 (stop *(ebp+0x1c) 1)
15516
15517
15518 $parse-var-with-type:error-float-in-integer-register:
15519
15520 (write-buffered *(ebp+0x18) "fn ")
15521 (write-buffered *(ebp+0x18) *(ebp+0x14))
15522 (write-buffered *(ebp+0x18) ": float var '")
15523 (lookup *edi *(edi+4))
15524 (write-buffered *(ebp+0x18) %eax)
15525 (write-buffered *(ebp+0x18) "' should be in a floating-point register\n")
15526 (flush *(ebp+0x18))
15527 (stop *(ebp+0x1c) 1)
15528
15529
15530 $parse-var-with-type:error-non-float-in-floating-point-register:
15531
15532 (write-buffered *(ebp+0x18) "fn ")
15533 (write-buffered *(ebp+0x18) *(ebp+0x14))
15534 (write-buffered *(ebp+0x18) ": non-float var '")
15535 (lookup *edi *(edi+4))
15536 (write-buffered *(ebp+0x18) %eax)
15537 (write-buffered *(ebp+0x18) "' should be in an integer register\n")
15538 (flush *(ebp+0x18))
15539 (stop *(ebp+0x1c) 1)
15540
15541
15542 is-float-register?:
15543
15544 55/push-ebp
15545 89/<- %ebp 4/r32/esp
15546
15547 (get Mu-registers-unique *(ebp+8) 0xc "Mu-registers-unique")
15548 81 7/subop/compare *eax 8/imm32/start-of-floating-point-registers
15549 0f 9d/set-if->= %al
15550 81 4/subop/and %eax 0xff/imm32
15551 $is-float-register?:end:
15552
15553 89/<- %esp 5/r32/ebp
15554 5d/pop-to-ebp
15555 c3/return
15556
15557 parse-type:
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580 55/push-ebp
15581 89/<- %ebp 4/r32/esp
15582
15583 50/push-eax
15584 51/push-ecx
15585 52/push-edx
15586
15587 (zero-out *(ebp+0x10) *Handle-size)
15588
15589 68/push 0/imm32
15590 68/push 0/imm32
15591 89/<- %ecx 4/r32/esp
15592
15593 (next-mu-token *(ebp+0xc) %ecx)
15594
15595
15596
15597
15598
15599 (slice-equal? %ecx "")
15600 3d/compare-eax-and 0/imm32/false
15601 0f 85/jump-if-!= $parse-type:abort/disp32
15602
15603 (slice-equal? %ecx "{")
15604 3d/compare-eax-and 0/imm32/false
15605 0f 85/jump-if-!= $parse-type:abort/disp32
15606
15607 (slice-equal? %ecx "}")
15608 3d/compare-eax-and 0/imm32/false
15609 0f 85/jump-if-!= $parse-type:abort/disp32
15610
15611 (slice-equal? %ecx "->")
15612 3d/compare-eax-and 0/imm32/false
15613 0f 85/jump-if-!= $parse-type:abort/disp32
15614
15615 (slice-equal? %ecx ")")
15616 3d/compare-eax-and 0/imm32/false
15617 0f 85/jump-if-!= $parse-type:end/disp32
15618
15619 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
15620
15621 8b/-> *(ebp+0x10) 2/r32/edx
15622 (lookup *edx *(edx+4))
15623 89/<- %edx 0/r32/eax
15624 {
15625
15626 (slice-equal? %ecx "(")
15627 3d/compare-eax-and 0/imm32/false
15628 0f 85/jump-if-!= break/disp32
15629
15630 {
15631 $parse-type:check-for-int:
15632
15633 8b/-> *ecx 0/r32/eax
15634 8a/copy-byte *eax 0/r32/AL
15635 81 4/subop/and %eax 0xff/imm32
15636
15637 (is-decimal-digit? %eax)
15638 3d/compare-eax-and 0/imm32/false
15639 74/jump-if-= break/disp8
15640
15641 (is-hex-int? %ecx)
15642 3d/compare-eax-and 0/imm32/false
15643 74/jump-if-= break/disp8
15644 $parse-type:int:
15645 (check-mu-hex-int %ecx *(ebp+0x14) *(ebp+0x18))
15646 (parse-hex-int-from-slice %ecx)
15647 c7 0/subop/copy *(edx+4) 9/imm32/type-id-array-capacity
15648 89/<- *(edx+8) 0/r32/eax
15649 e9/jump $parse-type:end/disp32
15650 }
15651 $parse-type:atom:
15652
15653 c7 0/subop/copy *edx 1/imm32/true
15654 {
15655 $parse-type:check-for-type-parameter:
15656
15657 8b/-> *ecx 0/r32/eax
15658 8a/copy-byte *eax 0/r32/AL
15659 81 4/subop/and %eax 0xff/imm32
15660
15661 3d/compare-eax-and 0x5f/imm32/_
15662 75/jump-if-!= break/disp8
15663 $parse-type:type-parameter:
15664
15665 c7 0/subop/copy *(edx+4) 0xa/imm32/type-parameter
15666
15667 8d/copy-address *(edx+8) 0/r32/eax
15668 (slice-to-string *(ebp+8) %ecx %eax)
15669 e9/jump $parse-type:end/disp32
15670 }
15671 $parse-type:non-type-parameter:
15672
15673 (pos-or-insert-slice Type-id %ecx)
15674 89/<- *(edx+4) 0/r32/eax
15675 e9/jump $parse-type:end/disp32
15676 }
15677 $parse-type:non-atom:
15678
15679
15680 8d/copy-address *(edx+4) 0/r32/eax
15681 (parse-type *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
15682
15683 8d/copy-address *(edx+0xc) 0/r32/eax
15684 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
15685 $parse-type:end:
15686
15687 81 0/subop/add %esp 8/imm32
15688
15689 5a/pop-to-edx
15690 59/pop-to-ecx
15691 58/pop-to-eax
15692
15693 89/<- %esp 5/r32/ebp
15694 5d/pop-to-ebp
15695 c3/return
15696
15697 $parse-type:abort:
15698
15699 (write-buffered *(ebp+0x14) "unexpected token when parsing type: '")
15700 (write-slice-buffered *(ebp+0x14) %ecx)
15701 (write-buffered *(ebp+0x14) "'\n")
15702 (flush *(ebp+0x14))
15703 (stop *(ebp+0x18) 1)
15704
15705
15706 parse-type-tree:
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716 55/push-ebp
15717 89/<- %ebp 4/r32/esp
15718
15719 50/push-eax
15720 51/push-ecx
15721 52/push-edx
15722
15723 (zero-out *(ebp+0x10) *Handle-size)
15724
15725 68/push 0/imm32
15726 68/push 0/imm32
15727 89/<- %ecx 4/r32/esp
15728
15729 (parse-type *(ebp+8) *(ebp+0xc) %ecx *(ebp+0x14) *(ebp+0x18))
15730
15731 81 7/subop/compare *ecx 0/imm32
15732 74/jump-if-= $parse-type-tree:end/disp8
15733
15734 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
15735
15736 8b/-> *(ebp+0x10) 2/r32/edx
15737 (lookup *edx *(edx+4))
15738 89/<- %edx 0/r32/eax
15739
15740 8b/-> *ecx 0/r32/eax
15741 89/<- *(edx+4) 0/r32/eax
15742 8b/-> *(ecx+4) 0/r32/eax
15743 89/<- *(edx+8) 0/r32/eax
15744
15745 8d/copy-address *(edx+0xc) 0/r32/eax
15746 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
15747 $parse-type-tree:end:
15748
15749 81 0/subop/add %esp 8/imm32
15750
15751 5a/pop-to-edx
15752 59/pop-to-ecx
15753 58/pop-to-eax
15754
15755 89/<- %esp 5/r32/ebp
15756 5d/pop-to-ebp
15757 c3/return
15758
15759 next-mu-token:
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
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804 55/push-ebp
15805 89/<- %ebp 4/r32/esp
15806
15807 50/push-eax
15808 51/push-ecx
15809 56/push-esi
15810 57/push-edi
15811
15812 8b/-> *(ebp+8) 6/r32/esi
15813
15814 8b/-> *(ebp+0xc) 7/r32/edi
15815 $next-mu-token:start:
15816 (skip-chars-matching-whitespace %esi)
15817 $next-mu-token:check0:
15818
15819
15820 8b/-> *(esi+4) 1/r32/ecx
15821
15822 3b/compare<- *esi 1/r32/ecx
15823 c7 0/subop/copy *edi 0/imm32
15824 c7 0/subop/copy *(edi+4) 0/imm32
15825 0f 8d/jump-if->= $next-mu-token:end/disp32
15826
15827 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
15828 89/<- *edi 0/r32/eax
15829
15830 31/xor-with %eax 0/r32/eax
15831 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
15832 {
15833 $next-mu-token:check-for-comma:
15834
15835 3d/compare-eax-and 0x2c/imm32/comma
15836 75/jump-if-!= break/disp8
15837
15838 ff 0/subop/increment *(esi+4)
15839
15840 e9/jump $next-mu-token:start/disp32
15841 }
15842 {
15843 $next-mu-token:check-for-comment:
15844
15845 3d/compare-eax-and 0x23/imm32/pound
15846 75/jump-if-!= break/disp8
15847
15848 e9/jump $next-mu-token:done/disp32
15849 }
15850 {
15851 $next-mu-token:check-for-string-literal:
15852
15853 3d/compare-eax-and 0x22/imm32/dquote
15854 75/jump-if-!= break/disp8
15855 (skip-string %esi)
15856
15857 e9/jump $next-mu-token:done/disp32
15858 }
15859 {
15860 $next-mu-token:check-for-open-paren:
15861
15862 3d/compare-eax-and 0x28/imm32/open-paren
15863 75/jump-if-!= break/disp8
15864
15865 ff 0/subop/increment *(esi+4)
15866
15867 e9/jump $next-mu-token:done/disp32
15868 }
15869 {
15870 $next-mu-token:check-for-close-paren:
15871
15872 3d/compare-eax-and 0x29/imm32/close-paren
15873 75/jump-if-!= break/disp8
15874
15875 ff 0/subop/increment *(esi+4)
15876
15877 e9/jump $next-mu-token:done/disp32
15878 }
15879 {
15880 $next-mu-token:regular-word-without-metadata:
15881
15882
15883 8b/-> *(esi+4) 1/r32/ecx
15884
15885 3b/compare<- *esi 1/r32/ecx
15886 7d/jump-if->= break/disp8
15887
15888 31/xor-with %eax 0/r32/eax
15889 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
15890
15891 3d/compare-eax-and 0x20/imm32/space
15892 74/jump-if-= break/disp8
15893
15894 3d/compare-eax-and 0xd/imm32/carriage-return
15895 74/jump-if-= break/disp8
15896
15897 3d/compare-eax-and 0xa/imm32/newline
15898 74/jump-if-= break/disp8
15899
15900 3d/compare-eax-and 0x28/imm32/open-paren
15901 0f 84/jump-if-= break/disp32
15902
15903 3d/compare-eax-and 0x29/imm32/close-paren
15904 0f 84/jump-if-= break/disp32
15905
15906 3d/compare-eax-and 0x2c/imm32/comma
15907 0f 84/jump-if-= break/disp32
15908
15909 ff 0/subop/increment *(esi+4)
15910
15911 e9/jump loop/disp32
15912 }
15913 $next-mu-token:done:
15914
15915 8b/-> *(esi+4) 1/r32/ecx
15916 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
15917 89/<- *(edi+4) 0/r32/eax
15918 $next-mu-token:end:
15919
15920 5f/pop-to-edi
15921 5e/pop-to-esi
15922 59/pop-to-ecx
15923 58/pop-to-eax
15924
15925 89/<- %esp 5/r32/ebp
15926 5d/pop-to-ebp
15927 c3/return
15928
15929 pos-or-insert-slice:
15930
15931 55/push-ebp
15932 89/<- %ebp 4/r32/esp
15933
15934 (pos-slice *(ebp+8) *(ebp+0xc))
15935 3d/compare-eax-and -1/imm32
15936 75/jump-if-!= $pos-or-insert-slice:end/disp8
15937 $pos-or-insert-slice:insert:
15938
15939 68/push 0/imm32
15940 68/push 0/imm32
15941 89/<- %eax 4/r32/esp
15942 (slice-to-string Heap *(ebp+0xc) %eax)
15943
15944 (lookup *eax *(eax+4))
15945 (write-int *(ebp+8) %eax)
15946 (pos-slice *(ebp+8) *(ebp+0xc))
15947 $pos-or-insert-slice:end:
15948
15949 81 0/subop/add %esp 8/imm32
15950
15951 89/<- %esp 5/r32/ebp
15952 5d/pop-to-ebp
15953 c3/return
15954
15955
15956
15957 pos-slice:
15958
15959 55/push-ebp
15960 89/<- %ebp 4/r32/esp
15961
15962 51/push-ecx
15963 52/push-edx
15964 53/push-ebx
15965 56/push-esi
15966
15967
15968
15969
15970
15971 8b/-> *(ebp+8) 6/r32/esi
15972
15973 b9/copy-to-ecx 0/imm32
15974
15975 8d/copy-address *(esi+0xc) 2/r32/edx
15976
15977 8b/-> *esi 3/r32/ebx
15978 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
15979 {
15980
15981
15982
15983
15984
15985 39/compare %edx 3/r32/ebx
15986 b8/copy-to-eax -1/imm32
15987 73/jump-if-addr>= $pos-slice:end/disp8
15988
15989 (slice-equal? *(ebp+0xc) *edx)
15990 3d/compare-eax-and 0/imm32/false
15991 75/jump-if-!= break/disp8
15992
15993 41/increment-ecx
15994
15995 81 0/subop/add %edx 4/imm32
15996
15997 eb/jump loop/disp8
15998 }
15999
16000 89/<- %eax 1/r32/ecx
16001 $pos-slice:end:
16002
16003
16004
16005
16006 5e/pop-to-esi
16007 5b/pop-to-ebx
16008 5a/pop-to-edx
16009 59/pop-to-ecx
16010
16011 89/<- %esp 5/r32/ebp
16012 5d/pop-to-ebp
16013 c3/return
16014
16015 test-parse-var-with-type:
16016
16017 55/push-ebp
16018 89/<- %ebp 4/r32/esp
16019
16020 8b/-> *Primitive-type-ids 0/r32/eax
16021 89/<- *Type-id 0/r32/eax
16022
16023 b8/copy-to-eax "x:"/imm32
16024 8b/-> *eax 1/r32/ecx
16025 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16026 05/add-to-eax 4/imm32
16027
16028 51/push-ecx
16029 50/push-eax
16030 89/<- %ecx 4/r32/esp
16031
16032 (clear-stream _test-input-stream)
16033 (write _test-input-stream "int")
16034
16035 68/push 0/imm32
16036 68/push 0/imm32
16037 89/<- %edx 4/r32/esp
16038
16039 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
16040
16041 (lookup *edx *(edx+4))
16042 89/<- %edx 0/r32/eax
16043
16044 (lookup *edx *(edx+4))
16045 (check-strings-equal %eax "x" "F - test-parse-var-with-type/name")
16046
16047 (lookup *(edx+8) *(edx+0xc))
16048 (check-ints-equal *eax 1 "F - test-parse-var-with-type/type:0")
16049 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type/type:1")
16050 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type/type:2")
16051
16052 89/<- %esp 5/r32/ebp
16053 5d/pop-to-ebp
16054 c3/return
16055
16056 test-parse-var-with-type-and-register:
16057
16058 55/push-ebp
16059 89/<- %ebp 4/r32/esp
16060
16061 8b/-> *Primitive-type-ids 0/r32/eax
16062 89/<- *Type-id 0/r32/eax
16063
16064 b8/copy-to-eax "x/eax:"/imm32
16065 8b/-> *eax 1/r32/ecx
16066 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16067 05/add-to-eax 4/imm32
16068
16069 51/push-ecx
16070 50/push-eax
16071 89/<- %ecx 4/r32/esp
16072
16073 (clear-stream _test-input-stream)
16074 (write _test-input-stream "int")
16075
16076 68/push 0/imm32
16077 68/push 0/imm32
16078 89/<- %edx 4/r32/esp
16079
16080 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
16081
16082 (lookup *edx *(edx+4))
16083 89/<- %edx 0/r32/eax
16084
16085 (lookup *edx *(edx+4))
16086 (check-strings-equal %eax "x" "F - test-parse-var-with-type-and-register/name")
16087
16088 (lookup *(edx+0x18) *(edx+0x1c))
16089 (check-strings-equal %eax "eax" "F - test-parse-var-with-type-and-register/register")
16090
16091 (lookup *(edx+8) *(edx+0xc))
16092 (check-ints-equal *eax 1 "F - test-parse-var-with-type-and-register/type:0")
16093 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type-and-register/type:1")
16094 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type-and-register/type:2")
16095
16096 89/<- %esp 5/r32/ebp
16097 5d/pop-to-ebp
16098 c3/return
16099
16100 test-parse-var-with-trailing-characters:
16101
16102 55/push-ebp
16103 89/<- %ebp 4/r32/esp
16104
16105 8b/-> *Primitive-type-ids 0/r32/eax
16106 89/<- *Type-id 0/r32/eax
16107
16108 b8/copy-to-eax "x:"/imm32
16109 8b/-> *eax 1/r32/ecx
16110 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16111 05/add-to-eax 4/imm32
16112
16113 51/push-ecx
16114 50/push-eax
16115 89/<- %ecx 4/r32/esp
16116
16117 (clear-stream _test-input-stream)
16118 (write _test-input-stream "int,")
16119
16120 68/push 0/imm32
16121 68/push 0/imm32
16122 89/<- %edx 4/r32/esp
16123
16124 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
16125
16126 (lookup *edx *(edx+4))
16127 89/<- %edx 0/r32/eax
16128
16129 (lookup *edx *(edx+4))
16130 (check-strings-equal %eax "x" "F - test-parse-var-with-trailing-characters/name")
16131
16132 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-trailing-characters/register")
16133
16134 (lookup *(edx+8) *(edx+0xc))
16135 (check-ints-equal *eax 1 "F - test-parse-var-with-trailing-characters/type:0")
16136 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-trailing-characters/type:1")
16137 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-trailing-characters/type:1")
16138
16139 89/<- %esp 5/r32/ebp
16140 5d/pop-to-ebp
16141 c3/return
16142
16143 test-parse-var-with-register-and-trailing-characters:
16144
16145 55/push-ebp
16146 89/<- %ebp 4/r32/esp
16147
16148 8b/-> *Primitive-type-ids 0/r32/eax
16149 89/<- *Type-id 0/r32/eax
16150
16151 b8/copy-to-eax "x/eax:"/imm32
16152 8b/-> *eax 1/r32/ecx
16153 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16154 05/add-to-eax 4/imm32
16155
16156 51/push-ecx
16157 50/push-eax
16158 89/<- %ecx 4/r32/esp
16159
16160 (clear-stream _test-input-stream)
16161 (write _test-input-stream "int,")
16162
16163 68/push 0/imm32
16164 68/push 0/imm32
16165 89/<- %edx 4/r32/esp
16166
16167 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
16168
16169 (lookup *edx *(edx+4))
16170 89/<- %edx 0/r32/eax
16171
16172 (lookup *edx *(edx+4))
16173 (check-strings-equal %eax "x" "F - test-parse-var-with-register-and-trailing-characters/name")
16174
16175 (lookup *(edx+0x18) *(edx+0x1c))
16176 (check-strings-equal %eax "eax" "F - test-parse-var-with-register-and-trailing-characters/register")
16177
16178 (lookup *(edx+8) *(edx+0xc))
16179 (check-ints-equal *eax 1 "F - test-parse-var-with-register-and-trailing-characters/type:0")
16180 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-register-and-trailing-characters/type:1")
16181 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-register-and-trailing-characters/type:2")
16182
16183 89/<- %esp 5/r32/ebp
16184 5d/pop-to-ebp
16185 c3/return
16186
16187 test-parse-var-with-compound-type:
16188
16189 55/push-ebp
16190 89/<- %ebp 4/r32/esp
16191
16192 8b/-> *Primitive-type-ids 0/r32/eax
16193 89/<- *Type-id 0/r32/eax
16194
16195 b8/copy-to-eax "x:"/imm32
16196 8b/-> *eax 1/r32/ecx
16197 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16198 05/add-to-eax 4/imm32
16199
16200 51/push-ecx
16201 50/push-eax
16202 89/<- %ecx 4/r32/esp
16203
16204 (clear-stream _test-input-stream)
16205 (write _test-input-stream "(addr int)")
16206
16207 68/push 0/imm32
16208 68/push 0/imm32
16209 89/<- %edx 4/r32/esp
16210
16211 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
16212
16213 (lookup *edx *(edx+4))
16214 89/<- %edx 0/r32/eax
16215
16216 (lookup *edx *(edx+4))
16217 (check-strings-equal %eax "x" "F - test-parse-var-with-compound-type/name")
16218
16219 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-compound-type/register")
16220
16221
16222 (lookup *(edx+8) *(edx+0xc))
16223 89/<- %edx 0/r32/eax
16224
16225 (check-ints-equal *edx 0 "F - test-parse-var-with-compound-type/type:0")
16226
16227 (lookup *(edx+4) *(edx+8))
16228 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:1")
16229 (check-ints-equal *(eax+4) 2 "F - test-parse-var-with-compound-type/type:2")
16230
16231 (lookup *(edx+0xc) *(edx+0x10))
16232 (lookup *(eax+4) *(eax+8))
16233 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:3")
16234 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-compound-type/type:4")
16235
16236 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-compound-type/type:5")
16237
16238 89/<- %esp 5/r32/ebp
16239 5d/pop-to-ebp
16240 c3/return
16241
16242
16243
16244
16245 is-identifier?:
16246
16247 55/push-ebp
16248 89/<- %ebp 4/r32/esp
16249
16250 (slice-empty? *(ebp+8))
16251 3d/compare-eax-and 0/imm32/false
16252 75/jump-if-!= $is-identifier?:false/disp8
16253
16254 8b/-> *(ebp+8) 0/r32/eax
16255 8b/-> *eax 0/r32/eax
16256 8a/copy-byte *eax 0/r32/AL
16257 81 4/subop/and %eax 0xff/imm32
16258
16259 3d/compare-eax-and 0x24/imm32/$
16260 74/jump-if-= $is-identifier?:true/disp8
16261
16262 3d/compare-eax-and 0x5f/imm32/_
16263 74/jump-if-= $is-identifier?:true/disp8
16264
16265 25/and-eax-with 0x5f/imm32
16266
16267 3d/compare-eax-and 0x41/imm32/A
16268 7c/jump-if-< $is-identifier?:false/disp8
16269
16270 3d/compare-eax-and 0x5a/imm32/Z
16271 7f/jump-if-> $is-identifier?:false/disp8
16272
16273 $is-identifier?:true:
16274 b8/copy-to-eax 1/imm32/true
16275 eb/jump $is-identifier?:end/disp8
16276 $is-identifier?:false:
16277 b8/copy-to-eax 0/imm32/false
16278 $is-identifier?:end:
16279
16280 89/<- %esp 5/r32/ebp
16281 5d/pop-to-ebp
16282 c3/return
16283
16284 test-is-identifier-dollar:
16285
16286 55/push-ebp
16287 89/<- %ebp 4/r32/esp
16288
16289 b8/copy-to-eax "$a"/imm32
16290 8b/-> *eax 1/r32/ecx
16291 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16292 05/add-to-eax 4/imm32
16293
16294 51/push-ecx
16295 50/push-eax
16296 89/<- %ecx 4/r32/esp
16297
16298 (is-identifier? %ecx)
16299 (check-ints-equal %eax 1 "F - test-is-identifier-dollar")
16300
16301 89/<- %esp 5/r32/ebp
16302 5d/pop-to-ebp
16303 c3/return
16304
16305 test-is-identifier-underscore:
16306
16307 55/push-ebp
16308 89/<- %ebp 4/r32/esp
16309
16310 b8/copy-to-eax "_a"/imm32
16311 8b/-> *eax 1/r32/ecx
16312 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16313 05/add-to-eax 4/imm32
16314
16315 51/push-ecx
16316 50/push-eax
16317 89/<- %ecx 4/r32/esp
16318
16319 (is-identifier? %ecx)
16320 (check-ints-equal %eax 1 "F - test-is-identifier-underscore")
16321
16322 89/<- %esp 5/r32/ebp
16323 5d/pop-to-ebp
16324 c3/return
16325
16326 test-is-identifier-a:
16327
16328 55/push-ebp
16329 89/<- %ebp 4/r32/esp
16330
16331 b8/copy-to-eax "a$"/imm32
16332 8b/-> *eax 1/r32/ecx
16333 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16334 05/add-to-eax 4/imm32
16335
16336 51/push-ecx
16337 50/push-eax
16338 89/<- %ecx 4/r32/esp
16339
16340 (is-identifier? %ecx)
16341 (check-ints-equal %eax 1 "F - test-is-identifier-a")
16342
16343 89/<- %esp 5/r32/ebp
16344 5d/pop-to-ebp
16345 c3/return
16346
16347 test-is-identifier-z:
16348
16349 55/push-ebp
16350 89/<- %ebp 4/r32/esp
16351
16352 b8/copy-to-eax "z$"/imm32
16353 8b/-> *eax 1/r32/ecx
16354 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16355 05/add-to-eax 4/imm32
16356
16357 51/push-ecx
16358 50/push-eax
16359 89/<- %ecx 4/r32/esp
16360
16361 (is-identifier? %ecx)
16362 (check-ints-equal %eax 1 "F - test-is-identifier-z")
16363
16364 89/<- %esp 5/r32/ebp
16365 5d/pop-to-ebp
16366 c3/return
16367
16368 test-is-identifier-A:
16369
16370 55/push-ebp
16371 89/<- %ebp 4/r32/esp
16372
16373 b8/copy-to-eax "A$"/imm32
16374 8b/-> *eax 1/r32/ecx
16375 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16376 05/add-to-eax 4/imm32
16377
16378 51/push-ecx
16379 50/push-eax
16380 89/<- %ecx 4/r32/esp
16381
16382 (is-identifier? %ecx)
16383 (check-ints-equal %eax 1 "F - test-is-identifier-A")
16384
16385 89/<- %esp 5/r32/ebp
16386 5d/pop-to-ebp
16387 c3/return
16388
16389 test-is-identifier-Z:
16390
16391 55/push-ebp
16392 89/<- %ebp 4/r32/esp
16393
16394 b8/copy-to-eax "Z$"/imm32
16395 8b/-> *eax 1/r32/ecx
16396 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16397 05/add-to-eax 4/imm32
16398
16399 51/push-ecx
16400 50/push-eax
16401 89/<- %ecx 4/r32/esp
16402
16403 (is-identifier? %ecx)
16404 (check-ints-equal %eax 1 "F - test-is-identifier-Z")
16405
16406 89/<- %esp 5/r32/ebp
16407 5d/pop-to-ebp
16408 c3/return
16409
16410 test-is-identifier-at:
16411
16412
16413 55/push-ebp
16414 89/<- %ebp 4/r32/esp
16415
16416 b8/copy-to-eax "@a"/imm32
16417 8b/-> *eax 1/r32/ecx
16418 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16419 05/add-to-eax 4/imm32
16420
16421 51/push-ecx
16422 50/push-eax
16423 89/<- %ecx 4/r32/esp
16424
16425 (is-identifier? %ecx)
16426 (check-ints-equal %eax 0 "F - test-is-identifier-@")
16427
16428 89/<- %esp 5/r32/ebp
16429 5d/pop-to-ebp
16430 c3/return
16431
16432 test-is-identifier-square-bracket:
16433
16434
16435 55/push-ebp
16436 89/<- %ebp 4/r32/esp
16437
16438 b8/copy-to-eax "[a"/imm32
16439 8b/-> *eax 1/r32/ecx
16440 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16441 05/add-to-eax 4/imm32
16442
16443 51/push-ecx
16444 50/push-eax
16445 89/<- %ecx 4/r32/esp
16446
16447 (is-identifier? %ecx)
16448 (check-ints-equal %eax 0 "F - test-is-identifier-@")
16449
16450 89/<- %esp 5/r32/ebp
16451 5d/pop-to-ebp
16452 c3/return
16453
16454 test-is-identifier-backtick:
16455
16456
16457 55/push-ebp
16458 89/<- %ebp 4/r32/esp
16459
16460 b8/copy-to-eax "`a"/imm32
16461 8b/-> *eax 1/r32/ecx
16462 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16463 05/add-to-eax 4/imm32
16464
16465 51/push-ecx
16466 50/push-eax
16467 89/<- %ecx 4/r32/esp
16468
16469 (is-identifier? %ecx)
16470 (check-ints-equal %eax 0 "F - test-is-identifier-backtick")
16471
16472 89/<- %esp 5/r32/ebp
16473 5d/pop-to-ebp
16474 c3/return
16475
16476 test-is-identifier-curly-brace-open:
16477
16478
16479 55/push-ebp
16480 89/<- %ebp 4/r32/esp
16481
16482 b8/copy-to-eax "{a"/imm32
16483 8b/-> *eax 1/r32/ecx
16484 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16485 05/add-to-eax 4/imm32
16486
16487 51/push-ecx
16488 50/push-eax
16489 89/<- %ecx 4/r32/esp
16490
16491 (is-identifier? %ecx)
16492 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-open")
16493
16494 89/<- %esp 5/r32/ebp
16495 5d/pop-to-ebp
16496 c3/return
16497
16498 test-is-identifier-curly-brace-close:
16499
16500 55/push-ebp
16501 89/<- %ebp 4/r32/esp
16502
16503 b8/copy-to-eax "}a"/imm32
16504 8b/-> *eax 1/r32/ecx
16505 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16506 05/add-to-eax 4/imm32
16507
16508 51/push-ecx
16509 50/push-eax
16510 89/<- %ecx 4/r32/esp
16511
16512 (is-identifier? %ecx)
16513 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-close")
16514
16515 89/<- %esp 5/r32/ebp
16516 5d/pop-to-ebp
16517 c3/return
16518
16519 test-is-identifier-hyphen:
16520
16521
16522 55/push-ebp
16523 89/<- %ebp 4/r32/esp
16524
16525 b8/copy-to-eax "-a"/imm32
16526 8b/-> *eax 1/r32/ecx
16527 8d/copy-address *(eax+ecx+4) 1/r32/ecx
16528 05/add-to-eax 4/imm32
16529
16530 51/push-ecx
16531 50/push-eax
16532 89/<- %ecx 4/r32/esp
16533
16534 (is-identifier? %ecx)
16535 (check-ints-equal %eax 0 "F - test-is-identifier-hyphen")
16536
16537 89/<- %esp 5/r32/ebp
16538 5d/pop-to-ebp
16539 c3/return
16540
16541 populate-mu-function-body:
16542
16543 55/push-ebp
16544 89/<- %ebp 4/r32/esp
16545
16546 50/push-eax
16547 56/push-esi
16548 57/push-edi
16549
16550 8b/-> *(ebp+8) 6/r32/esi
16551
16552 8b/-> *(ebp+0xc) 7/r32/edi
16553
16554 c7 0/subop/copy *Curr-block-depth 1/imm32
16555
16556 8d/copy-address *(edi+0x18) 0/r32/eax
16557 (parse-mu-block %esi *(ebp+0x10) %edi %eax *(ebp+0x14) *(ebp+0x18))
16558 $populate-mu-function-body:end:
16559
16560 5f/pop-to-edi
16561 5e/pop-to-esi
16562 58/pop-to-eax
16563
16564 89/<- %esp 5/r32/ebp
16565 5d/pop-to-ebp
16566 c3/return
16567
16568
16569 parse-mu-block:
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607 55/push-ebp
16608 89/<- %ebp 4/r32/esp
16609
16610 50/push-eax
16611 51/push-ecx
16612 52/push-edx
16613 53/push-ebx
16614 57/push-edi
16615
16616 81 5/subop/subtract %esp 0x200/imm32
16617 68/push 0x200/imm32/size
16618 68/push 0/imm32/read
16619 68/push 0/imm32/write
16620 89/<- %ecx 4/r32/esp
16621
16622 68/push 0/imm32/end
16623 68/push 0/imm32/start
16624 89/<- %edx 4/r32/esp
16625
16626 (allocate Heap *Stmt-size *(ebp+0x14))
16627
16628 8b/-> *(ebp+0x14) 7/r32/edi
16629 (lookup *edi *(edi+4))
16630 89/<- %edi 0/r32/eax
16631
16632
16633 8d/copy-address *(edi+0xc) 0/r32/eax
16634 (new-block-name *(ebp+0x10) %eax)
16635
16636 (push *(ebp+0xc) *(edi+0xc))
16637 (push *(ebp+0xc) *(edi+0x10))
16638 (push *(ebp+0xc) 0)
16639
16640 ff 0/subop/increment *Curr-block-depth
16641 {
16642 $parse-mu-block:line-loop:
16643
16644 (clear-stream %ecx)
16645 (read-line-buffered *(ebp+8) %ecx)
16646
16647
16648
16649
16650
16651
16652 81 7/subop/compare *ecx 0/imm32
16653 0f 84/jump-if-= break/disp32
16654
16655
16656
16657 (next-mu-token %ecx %edx)
16658
16659
16660
16661
16662
16663 (slice-empty? %edx)
16664 3d/compare-eax-and 0/imm32/false
16665 0f 85/jump-if-!= loop/disp32
16666
16667
16668 8b/-> *edx 0/r32/eax
16669 8a/copy-byte *eax 0/r32/AL
16670 81 4/subop/and %eax 0xff/imm32
16671
16672 3d/compare-eax-and 0x23/imm32/hash
16673 0f 84/jump-if-= loop/disp32
16674
16675 {
16676 $parse-mu-block:check-for-block:
16677 (slice-equal? %edx "{")
16678 3d/compare-eax-and 0/imm32/false
16679 74/jump-if-= break/disp8
16680 (check-no-tokens-left %ecx)
16681
16682
16683 68/push 0/imm32
16684 68/push 0/imm32
16685 89/<- %eax 4/r32/esp
16686
16687 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
16688 (append-to-block Heap %edi *eax *(eax+4))
16689
16690 81 0/subop/add %esp 8/imm32
16691
16692 e9/jump $parse-mu-block:line-loop/disp32
16693 }
16694
16695 $parse-mu-block:check-for-end:
16696 (slice-equal? %edx "}")
16697 3d/compare-eax-and 0/imm32/false
16698 0f 85/jump-if-!= break/disp32
16699
16700 {
16701 $parse-mu-block:check-for-named-block:
16702
16703 8b/-> *(edx+4) 0/r32/eax
16704 48/decrement-eax
16705 8a/copy-byte *eax 0/r32/AL
16706 81 4/subop/and %eax 0xff/imm32
16707
16708 3d/compare-eax-and 0x3a/imm32/colon
16709 0f 85/jump-if-!= break/disp32
16710
16711
16712
16713 ff 1/subop/decrement *(edx+4)
16714
16715 68/push 0/imm32
16716 68/push 0/imm32
16717 89/<- %eax 4/r32/esp
16718
16719 (parse-mu-named-block %edx *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
16720 (append-to-block Heap %edi *eax *(eax+4))
16721
16722 81 0/subop/add %esp 8/imm32
16723
16724 e9/jump $parse-mu-block:line-loop/disp32
16725 }
16726
16727 {
16728 $parse-mu-block:check-for-var:
16729 (slice-equal? %edx "var")
16730 3d/compare-eax-and 0/imm32/false
16731 74/jump-if-= break/disp8
16732
16733 68/push 0/imm32
16734 68/push 0/imm32
16735 89/<- %eax 4/r32/esp
16736
16737 (parse-mu-var-def %ecx *(ebp+0xc) %eax *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
16738 (append-to-block Heap %edi *eax *(eax+4))
16739
16740 81 0/subop/add %esp 8/imm32
16741
16742 e9/jump $parse-mu-block:line-loop/disp32
16743 }
16744 $parse-mu-block:regular-stmt:
16745
16746
16747 68/push 0/imm32
16748 68/push 0/imm32
16749 89/<- %eax 4/r32/esp
16750
16751 (parse-mu-stmt %ecx *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
16752 (append-to-block Heap %edi *eax *(eax+4))
16753
16754 81 0/subop/add %esp 8/imm32
16755
16756 e9/jump loop/disp32
16757 }
16758 (clean-up-blocks *(ebp+0xc) *Curr-block-depth *(ebp+0x10))
16759
16760 ff 1/subop/decrement *Curr-block-depth
16761
16762 (pop *(ebp+0xc))
16763 (pop *(ebp+0xc))
16764 (pop *(ebp+0xc))
16765 $parse-mu-block:end:
16766
16767 81 0/subop/add %esp 0x214/imm32
16768
16769 5f/pop-to-edi
16770 5b/pop-to-ebx
16771 5a/pop-to-edx
16772 59/pop-to-ecx
16773 58/pop-to-eax
16774
16775 89/<- %esp 5/r32/ebp
16776 5d/pop-to-ebp
16777 c3/return
16778
16779 $parse-mu-block:abort:
16780
16781 (write-buffered *(ebp+0x18) "'{' or '}' should be on its own line, but got '")
16782 (rewind-stream %ecx)
16783 (write-stream-data *(ebp+0x18) %ecx)
16784 (write-buffered *(ebp+0x18) "'\n")
16785 (flush *(ebp+0x18))
16786 (stop *(ebp+0x1c) 1)
16787
16788
16789 new-block-name:
16790
16791 55/push-ebp
16792 89/<- %ebp 4/r32/esp
16793
16794 50/push-eax
16795 51/push-ecx
16796 52/push-edx
16797
16798 8b/-> *(ebp+8) 0/r32/eax
16799 (lookup *eax *(eax+4))
16800 8b/-> *eax 0/r32/eax
16801 05/add-to-eax 0xd/imm32
16802 89/<- %ecx 0/r32/eax
16803
16804 29/subtract-from %esp 1/r32/ecx
16805 ff 6/subop/push %ecx
16806 68/push 0/imm32/read
16807 68/push 0/imm32/write
16808 89/<- %edx 4/r32/esp
16809 (clear-stream %edx)
16810
16811 8b/-> *(ebp+8) 0/r32/eax
16812 (lookup *eax *(eax+4))
16813
16814 (write %edx "$")
16815 (write %edx %eax)
16816 (write %edx ":")
16817 (write-int32-hex %edx *Next-block-index)
16818 ff 0/subop/increment *Next-block-index
16819
16820
16821 8b/-> *edx 0/r32/eax
16822
16823 8d/copy-address *(edx+0xc) 2/r32/edx
16824
16825 01/add-to %eax 2/r32/edx
16826
16827 ff 6/subop/push %eax
16828 ff 6/subop/push %edx
16829 89/<- %eax 4/r32/esp
16830
16831 (new-literal Heap %eax *(ebp+0xc))
16832
16833
16834
16835
16836
16837
16838
16839 $new-block-name:end:
16840
16841 81 0/subop/add %ecx 0xc/imm32
16842 81 0/subop/add %ecx 8/imm32
16843 01/add-to %esp 1/r32/ecx
16844
16845 5a/pop-to-edx
16846 59/pop-to-ecx
16847 58/pop-to-eax
16848
16849 89/<- %esp 5/r32/ebp
16850 5d/pop-to-ebp
16851 c3/return
16852
16853 check-no-tokens-left:
16854
16855 55/push-ebp
16856 89/<- %ebp 4/r32/esp
16857
16858 50/push-eax
16859 51/push-ecx
16860
16861 68/push 0/imm32/end
16862 68/push 0/imm32/start
16863 89/<- %ecx 4/r32/esp
16864
16865 (next-mu-token *(ebp+8) %ecx)
16866
16867 (slice-empty? %ecx)
16868 3d/compare-eax-and 0/imm32/false
16869 75/jump-if-!= $check-no-tokens-left:end/disp8
16870
16871
16872 8b/-> *edx 0/r32/eax
16873 8a/copy-byte *eax 0/r32/AL
16874 81 4/subop/and %eax 0xff/imm32
16875
16876 3d/compare-eax-and 0x23/imm32/hash
16877 74/jump-if-= $check-no-tokens-left:end/disp8
16878
16879 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
16880 (rewind-stream %ecx)
16881 (write-stream 2 %ecx)
16882 (write-buffered Stderr "'\n")
16883 (flush Stderr)
16884
16885 bb/copy-to-ebx 1/imm32
16886 e8/call syscall_exit/disp32
16887
16888 $check-no-tokens-left:end:
16889
16890 81 0/subop/add %esp 8/imm32
16891
16892 59/pop-to-ecx
16893 58/pop-to-eax
16894
16895 89/<- %esp 5/r32/ebp
16896 5d/pop-to-ebp
16897 c3/return
16898
16899 parse-mu-named-block:
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910 55/push-ebp
16911 89/<- %ebp 4/r32/esp
16912
16913 50/push-eax
16914 51/push-ecx
16915 57/push-edi
16916
16917 68/push 0/imm32
16918 68/push 0/imm32
16919 89/<- %ecx 4/r32/esp
16920
16921 (new-literal Heap *(ebp+8) %ecx)
16922
16923 (push *(ebp+0x10) *ecx)
16924 (push *(ebp+0x10) *(ecx+4))
16925 (push *(ebp+0x10) 0)
16926
16927 (parse-mu-block *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20))
16928
16929 (pop *(ebp+0x10))
16930 (pop *(ebp+0x10))
16931 (pop *(ebp+0x10))
16932
16933 8b/-> *(ebp+0x18) 7/r32/edi
16934 (lookup *edi *(edi+4))
16935 89/<- %edi 0/r32/eax
16936
16937 c7 0/subop/copy *edi 0/imm32/block
16938
16939 8b/-> *ecx 0/r32/eax
16940 89/<- *(edi+0xc) 0/r32/eax
16941 8b/-> *(ecx+4) 0/r32/eax
16942 89/<- *(edi+0x10) 0/r32/eax
16943 $parse-mu-named-block:end:
16944
16945 81 0/subop/add %esp 8/imm32
16946
16947 5f/pop-to-edi
16948 59/pop-to-ecx
16949 58/pop-to-eax
16950
16951 89/<- %esp 5/r32/ebp
16952 5d/pop-to-ebp
16953 c3/return
16954
16955 parse-mu-var-def:
16956
16957 55/push-ebp
16958 89/<- %ebp 4/r32/esp
16959
16960 50/push-eax
16961 51/push-ecx
16962 52/push-edx
16963 56/push-esi
16964 57/push-edi
16965
16966 8b/-> *(ebp+0x10) 7/r32/edi
16967
16968 68/push 0/imm32/end
16969 68/push 0/imm32/start
16970 89/<- %ecx 4/r32/esp
16971
16972 68/push 0/imm32
16973 68/push 0/imm32
16974 89/<- %edx 4/r32/esp
16975
16976 (next-mu-token *(ebp+8) %ecx)
16977 {
16978
16979 8b/-> *(ebp+0x14) 0/r32/eax
16980 3d/compare-eax-and 0/imm32
16981 74/jump-if-= break/disp8
16982 (lookup *eax *(eax+4))
16983 }
16984 (parse-var-with-type %ecx *(ebp+8) %edx %eax *(ebp+0x18) *(ebp+0x1c))
16985
16986 (lookup *edx *(edx+4))
16987 89/<- %esi 0/r32/eax
16988
16989 8b/-> *Curr-block-depth 0/r32/eax
16990 89/<- *(esi+0x10) 0/r32/eax
16991
16992 81 7/subop/compare *(esi+0x18) 0/imm32
16993 {
16994 75/jump-if-!= break/disp8
16995
16996 (lookup *(esi+8) *(esi+0xc))
16997 (is-simple-mu-type? %eax 8)
16998 3d/compare-eax-and 0/imm32/false
16999 0f 85/jump-if-!= $parse-mu-var-def:error-byte-on-stack/disp32
17000
17001 (next-mu-token *(ebp+8) %ecx)
17002 (slice-empty? %ecx)
17003 3d/compare-eax-and 0/imm32/false
17004 0f 84/jump-if-= $parse-mu-var-def:error2/disp32
17005
17006 (new-var-def Heap *edx *(edx+4) %edi)
17007 e9/jump $parse-mu-var-def:update-vars/disp32
17008 }
17009
17010 {
17011 0f 84/jump-if-= break/disp32
17012
17013 {
17014 (lookup *(esi+8) *(esi+0xc))
17015 (is-simple-mu-type? %eax 8)
17016 3d/compare-eax-and 0/imm32/false
17017 74/jump-if-= break/disp8
17018 (lookup *(esi+0x18) *(esi+0x1c))
17019 (string-equal? %eax "esi")
17020 3d/compare-eax-and 0/imm32/false
17021 0f 85/jump-if-!= $parse-mu-var-def:error-byte-registers/disp32
17022 (lookup *(esi+0x18) *(esi+0x1c))
17023 (string-equal? %eax "edi")
17024 3d/compare-eax-and 0/imm32/false
17025 0f 85/jump-if-!= $parse-mu-var-def:error-byte-registers/disp32
17026 }
17027
17028
17029 (next-mu-token *(ebp+8) %ecx)
17030 (slice-equal? %ecx "<-")
17031 3d/compare-eax-and 0/imm32/false
17032 0f 84/jump-if-= $parse-mu-var-def:error1/disp32
17033
17034 (new-reg-var-def Heap *edx *(edx+4) %edi)
17035 (lookup *edi *(edi+4))
17036 (add-operation-and-inputs-to-stmt %eax *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
17037 }
17038 $parse-mu-var-def:update-vars:
17039
17040 (push *(ebp+0xc) *edx)
17041 (push *(ebp+0xc) *(edx+4))
17042 (push *(ebp+0xc) 0)
17043 $parse-mu-var-def:end:
17044
17045 81 0/subop/add %esp 0x10/imm32
17046
17047 5f/pop-to-edi
17048 5e/pop-to-esi
17049 5a/pop-to-edx
17050 59/pop-to-ecx
17051 58/pop-to-eax
17052
17053 89/<- %esp 5/r32/ebp
17054 5d/pop-to-ebp
17055 c3/return
17056
17057 $parse-mu-var-def:error1:
17058 (rewind-stream *(ebp+8))
17059
17060 (write-buffered *(ebp+0x18) "register variable requires a valid instruction to initialize but got '")
17061 (flush *(ebp+0x18))
17062 (write-stream-data *(ebp+0x18) *(ebp+8))
17063 (write-buffered *(ebp+0x18) "'\n")
17064 (flush *(ebp+0x18))
17065 (stop *(ebp+0x1c) 1)
17066
17067
17068 $parse-mu-var-def:error2:
17069
17070 (write-buffered *(ebp+0x18) "fn ")
17071 8b/-> *(ebp+0x14) 0/r32/eax
17072 (lookup *eax *(eax+4))
17073 (write-buffered *(ebp+0x18) %eax)
17074 (write-buffered *(ebp+0x18) ": var ")
17075
17076 (lookup *edx *(edx+4))
17077 (lookup *eax *(eax+4))
17078 (write-buffered *(ebp+0x18) %eax)
17079 (write-buffered *(ebp+0x18) ": variables on the stack can't take an initializer\n")
17080 (flush *(ebp+0x18))
17081 (stop *(ebp+0x1c) 1)
17082
17083
17084 $parse-mu-var-def:error-byte-on-stack:
17085
17086 (write-buffered *(ebp+0x18) "fn ")
17087 8b/-> *(ebp+0x14) 0/r32/eax
17088 (lookup *eax *(eax+4))
17089 (write-buffered *(ebp+0x18) %eax)
17090 (write-buffered *(ebp+0x18) ": var '")
17091
17092 (lookup *edx *(edx+4))
17093 (lookup *eax *(eax+4))
17094 (write-buffered *(ebp+0x18) %eax)
17095 (write-buffered *(ebp+0x18) "' of type 'byte' cannot be on the stack\n")
17096 (flush *(ebp+0x18))
17097 (stop *(ebp+0x1c) 1)
17098
17099
17100 $parse-mu-var-def:error-byte-registers:
17101
17102 (write-buffered *(ebp+0x18) "fn ")
17103 8b/-> *(ebp+0x14) 0/r32/eax
17104 (lookup *eax *(eax+4))
17105 (write-buffered *(ebp+0x18) %eax)
17106 (write-buffered *(ebp+0x18) ": var '")
17107
17108 (lookup *edx *(edx+4))
17109 (lookup *eax *(eax+4))
17110 (write-buffered *(ebp+0x18) %eax)
17111 (write-buffered *(ebp+0x18) "' of type 'byte' cannot be in esi or edi\n")
17112 (flush *(ebp+0x18))
17113 (stop *(ebp+0x1c) 1)
17114
17115
17116 test-parse-mu-var-def:
17117
17118
17119 55/push-ebp
17120 89/<- %ebp 4/r32/esp
17121
17122 8b/-> *Primitive-type-ids 0/r32/eax
17123 89/<- *Type-id 0/r32/eax
17124 (clear-stream _test-input-stream)
17125 (write _test-input-stream "n: int\n")
17126 c7 0/subop/copy *Curr-block-depth 1/imm32
17127
17128 68/push 0/imm32
17129 68/push 0/imm32
17130 89/<- %esi 4/r32/esp
17131
17132 81 5/subop/subtract %esp 0xc0/imm32
17133 68/push 0xc0/imm32/size
17134 68/push 0/imm32/top
17135 89/<- %ecx 4/r32/esp
17136 (clear-stack %ecx)
17137
17138 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
17139
17140 (lookup *esi *(esi+4))
17141 89/<- %esi 0/r32/eax
17142
17143 (check-ints-equal *esi 2 "F - test-parse-mu-var-def/tag")
17144
17145 (lookup *(esi+4) *(esi+8))
17146 89/<- %ecx 0/r32/eax
17147
17148 (lookup *ecx *(ecx+4))
17149 (check-strings-equal %eax "n" "F - test-parse-mu-var-def/var-name")
17150
17151 (check-ints-equal *(ecx+0x18) 0 "F - test-parse-mu-var-def/var-register")
17152
17153 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-var-def/output-block-depth")
17154
17155 (lookup *(ecx+8) *(ecx+0xc))
17156 (check-ints-equal *eax 1 "F - test-parse-mu-var-def/var-type:0")
17157 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-var-def/var-type:1")
17158 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-var-def/var-type:2")
17159
17160 89/<- %esp 5/r32/ebp
17161 5d/pop-to-ebp
17162 c3/return
17163
17164 test-parse-mu-reg-var-def:
17165
17166
17167 55/push-ebp
17168 89/<- %ebp 4/r32/esp
17169
17170 8b/-> *Primitive-type-ids 0/r32/eax
17171 89/<- *Type-id 0/r32/eax
17172 (clear-stream _test-input-stream)
17173 (write _test-input-stream "n/eax: int <- copy 0\n")
17174 c7 0/subop/copy *Curr-block-depth 1/imm32
17175
17176 68/push 0/imm32
17177 68/push 0/imm32
17178 89/<- %esi 4/r32/esp
17179
17180 81 5/subop/subtract %esp 0xc0/imm32
17181 68/push 0xc0/imm32/size
17182 68/push 0/imm32/top
17183 89/<- %ecx 4/r32/esp
17184 (clear-stack %ecx)
17185
17186 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
17187
17188 (lookup *esi *(esi+4))
17189 89/<- %esi 0/r32/eax
17190
17191 (check-ints-equal *esi 3 "F - test-parse-mu-reg-var-def/tag")
17192
17193
17194 (lookup *(esi+0x14) *(esi+0x18))
17195
17196 (check-ints-equal *(eax+8) 0 "F - test-parse-mu-reg-var-def/single-output")
17197
17198 (lookup *eax *(eax+4))
17199
17200 89/<- %ecx 0/r32/eax
17201
17202 (lookup *ecx *(ecx+4))
17203 (check-strings-equal %eax "n" "F - test-parse-mu-reg-var-def/output-name")
17204
17205 (lookup *(ecx+0x18) *(ecx+0x1c))
17206 (check-strings-equal %eax "eax" "F - test-parse-mu-reg-var-def/output-register")
17207
17208 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-reg-var-def/output-block-depth")
17209
17210 (lookup *(ecx+8) *(ecx+0xc))
17211 (check-ints-equal *eax 1 "F - test-parse-mu-reg-var-def/output-type:0")
17212 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-reg-var-def/output-type:1")
17213 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-reg-var-def/output-type:2")
17214
17215 89/<- %esp 5/r32/ebp
17216 5d/pop-to-ebp
17217 c3/return
17218
17219 parse-mu-stmt:
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235 55/push-ebp
17236 89/<- %ebp 4/r32/esp
17237
17238 50/push-eax
17239 51/push-ecx
17240 52/push-edx
17241 53/push-ebx
17242 57/push-edi
17243
17244 68/push 0/imm32/end
17245 68/push 0/imm32/start
17246 89/<- %ecx 4/r32/esp
17247
17248 ba/copy-to-edx 0/imm32/false
17249
17250 68/push 0/imm32
17251 68/push 0/imm32
17252 89/<- %ebx 4/r32/esp
17253
17254 (allocate Heap *Stmt-size *(ebp+0x14))
17255
17256 8b/-> *(ebp+0x14) 7/r32/edi
17257 (lookup *edi *(edi+4))
17258 89/<- %edi 0/r32/eax
17259
17260 c7 0/subop/copy *edi 1/imm32/stmt1
17261 {
17262 (stmt-has-outputs? *(ebp+8))
17263 3d/compare-eax-and 0/imm32/false
17264 0f 84/jump-if-= break/disp32
17265 {
17266 $parse-mu-stmt:read-outputs:
17267
17268 (next-mu-token *(ebp+8) %ecx)
17269
17270 (slice-empty? %ecx)
17271 3d/compare-eax-and 0/imm32/false
17272 0f 85/jump-if-!= break/disp32
17273
17274 (slice-equal? %ecx "<-")
17275 3d/compare-eax-and 0/imm32/false
17276 0f 85/jump-if-!= break/disp32
17277
17278 8b/-> *ecx 0/r32/eax
17279 8a/copy-byte *eax 0/r32/AL
17280 81 4/subop/and %eax 0xff/imm32
17281 3d/compare-eax-and 0x2a/imm32/asterisk
17282 0f 84/jump-if-= $parse-mu-stmt:error-output-dereferenced/disp32
17283
17284 (is-identifier? %ecx)
17285 3d/compare-eax-and 0/imm32/false
17286 0f 84/jump-if-= $parse-mu-stmt:abort/disp32
17287
17288 (lookup-var %ecx *(ebp+0xc) %ebx *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
17289 8d/copy-address *(edi+0x14) 0/r32/eax
17290 (append-stmt-var Heap *ebx *(ebx+4) *(edi+0x14) *(edi+0x18) 0 %eax)
17291
17292 e9/jump loop/disp32
17293 }
17294 }
17295 (add-operation-and-inputs-to-stmt %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
17296 $parse-mu-stmt:end:
17297
17298 81 0/subop/add %esp 0x10/imm32
17299
17300 5f/pop-to-edi
17301 5b/pop-to-ebx
17302 5a/pop-to-edx
17303 59/pop-to-ecx
17304 58/pop-to-eax
17305
17306 89/<- %esp 5/r32/ebp
17307 5d/pop-to-ebp
17308 c3/return
17309
17310 $parse-mu-stmt:abort:
17311
17312 (write-buffered *(ebp+0x18) "fn ")
17313 8b/-> *(ebp+0x10) 0/r32/eax
17314 (lookup *eax *(eax+4))
17315 (write-buffered *(ebp+0x18) %eax)
17316 (write-buffered *(ebp+0x18) ": invalid identifier '")
17317 (write-slice-buffered *(ebp+0x18) %ecx)
17318 (write-buffered *(ebp+0x18) "'\n")
17319 (flush *(ebp+0x18))
17320 (stop *(ebp+0x1c) 1)
17321
17322
17323 $parse-mu-stmt:error-output-dereferenced:
17324
17325 (write-buffered *(ebp+0x18) "fn ")
17326 8b/-> *(ebp+0x10) 0/r32/eax
17327 (lookup *eax *(eax+4))
17328 (write-buffered *(ebp+0x18) %eax)
17329 (write-buffered *(ebp+0x18) ": output '")
17330 (write-slice-buffered *(ebp+0x18) %ecx)
17331 (write-buffered *(ebp+0x18) "' should write to a register, and therefore cannot be dereferenced\n")
17332 (flush *(ebp+0x18))
17333 (stop *(ebp+0x1c) 1)
17334
17335
17336 add-operation-and-inputs-to-stmt:
17337
17338
17339
17340
17341
17342
17343
17344
17345 55/push-ebp
17346 89/<- %ebp 4/r32/esp
17347
17348 50/push-eax
17349 51/push-ecx
17350 52/push-edx
17351 53/push-ebx
17352 56/push-esi
17353 57/push-edi
17354
17355 8b/-> *(ebp+8) 7/r32/edi
17356
17357 68/push 0/imm32/end
17358 68/push 0/imm32/start
17359 89/<- %ecx 4/r32/esp
17360
17361 ba/copy-to-edx 0/imm32/false
17362
17363 68/push 0/imm32
17364 68/push 0/imm32
17365 89/<- %esi 4/r32/esp
17366 $add-operation-and-inputs-to-stmt:read-operation:
17367 (next-mu-token *(ebp+0xc) %ecx)
17368 8d/copy-address *(edi+4) 0/r32/eax
17369 (slice-to-string Heap %ecx %eax)
17370
17371 (slice-equal? %ecx "get")
17372 89/<- %ebx 0/r32/eax
17373 {
17374 $add-operation-and-inputs-to-stmt:read-inouts:
17375
17376 (next-mu-token *(ebp+0xc) %ecx)
17377
17378 (slice-empty? %ecx)
17379 3d/compare-eax-and 0/imm32/false
17380 0f 85/jump-if-!= break/disp32
17381
17382 (slice-equal? %ecx "<-")
17383 3d/compare-eax-and 0/imm32/false
17384 0f 85/jump-if-!= $add-operation-and-inputs-to-stmt:abort/disp32
17385
17386 {
17387 81 7/subop/compare %ebx 0/imm32/false
17388 74/jump-if-= break/disp8
17389 (lookup *(edi+0xc) *(edi+0x10))
17390 3d/compare-eax-and 0/imm32
17391 74/jump-if-= break/disp8
17392 (lookup-or-create-constant %eax %ecx %esi)
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403 e9/jump $add-operation-and-inputs-to-stmt:save-var/disp32
17404 }
17405
17406 ba/copy-to-edx 0/imm32/false
17407
17408 8b/-> *ecx 0/r32/eax
17409 8a/copy-byte *eax 0/r32/AL
17410 81 4/subop/and %eax 0xff/imm32
17411 3d/compare-eax-and 0x2a/imm32/asterisk
17412 {
17413 75/jump-if-!= break/disp8
17414 $add-operation-and-inputs-to-stmt:inout-is-deref:
17415 ff 0/subop/increment *ecx
17416 ba/copy-to-edx 1/imm32/true
17417 }
17418 (lookup-var-or-literal %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
17419
17420 81 7/subop/compare %edx 0/imm32/false
17421 {
17422 74/jump-if-= break/disp8
17423
17424 (lookup *esi *(esi+4))
17425 81 7/subop/compare *(eax+0x18) 0/imm32
17426 0f 84/jump-if-= $add-operation-and-inputs-to-stmt:error-deref-on-stack/disp32
17427
17428 (lookup *(eax+8) *(eax+0xc))
17429 (is-mu-addr-type? %eax)
17430 3d/compare-eax-and 0/imm32/false
17431 0f 84/jump-if-= $add-operation-and-inputs-to-stmt:error-deref-non-addr/disp32
17432 }
17433 $add-operation-and-inputs-to-stmt:save-var:
17434 8d/copy-address *(edi+0xc) 0/r32/eax
17435 (append-stmt-var Heap *esi *(esi+4) *(edi+0xc) *(edi+0x10) %edx %eax)
17436
17437 e9/jump loop/disp32
17438 }
17439 $add-operation-and-inputs-to-stmt:end:
17440
17441 81 0/subop/add %esp 0x10/imm32
17442
17443 5f/pop-to-edi
17444 5e/pop-to-esi
17445 5b/pop-to-ebx
17446 5a/pop-to-edx
17447 59/pop-to-ecx
17448 58/pop-to-eax
17449
17450 89/<- %esp 5/r32/ebp
17451 5d/pop-to-ebp
17452 c3/return
17453
17454 $add-operation-and-inputs-to-stmt:abort:
17455
17456 (write-buffered *(ebp+0x18) "fn ")
17457 8b/-> *(ebp+0x14) 0/r32/eax
17458 (lookup *eax *(eax+4))
17459 (write-buffered *(ebp+0x18) %eax)
17460 (rewind-stream *(ebp+0xc))
17461 (write-buffered *(ebp+0x18) ": invalid identifier in '")
17462 (write-stream-data *(ebp+0x18) *(ebp+0xc))
17463 (write-buffered *(ebp+0x18) "'\n")
17464 (flush *(ebp+0x18))
17465 (stop *(ebp+0x1c) 1)
17466
17467
17468 $add-operation-and-inputs-to-stmt:error-deref-on-stack:
17469
17470 (write-buffered *(ebp+0x18) "fn ")
17471 8b/-> *(ebp+0x14) 0/r32/eax
17472 (lookup *eax *(eax+4))
17473 (write-buffered *(ebp+0x18) %eax)
17474 (rewind-stream *(ebp+0xc))
17475 (write-buffered *(ebp+0x18) ": cannot dereference var '")
17476 (lookup *esi *(esi+4))
17477 (lookup *eax *(eax+4))
17478 (write-buffered *(ebp+0x18) %eax)
17479 (write-buffered *(ebp+0x18) "' on stack\n")
17480 (flush *(ebp+0x18))
17481 (stop *(ebp+0x1c) 1)
17482
17483
17484 $add-operation-and-inputs-to-stmt:error-deref-non-addr:
17485
17486 (write-buffered *(ebp+0x18) "fn ")
17487 8b/-> *(ebp+0x14) 0/r32/eax
17488 (lookup *eax *(eax+4))
17489 (write-buffered *(ebp+0x18) %eax)
17490 (rewind-stream *(ebp+0xc))
17491 (write-buffered *(ebp+0x18) ": cannot dereference non-addr var '")
17492 (lookup *esi *(esi+4))
17493 (lookup *eax *(eax+4))
17494 (write-buffered *(ebp+0x18) %eax)
17495 (write-buffered *(ebp+0x18) "'\n")
17496 (flush *(ebp+0x18))
17497 (stop *(ebp+0x1c) 1)
17498
17499
17500 stmt-has-outputs?:
17501
17502 55/push-ebp
17503 89/<- %ebp 4/r32/esp
17504
17505 51/push-ecx
17506
17507 68/push 0/imm32/end
17508 68/push 0/imm32/start
17509 89/<- %ecx 4/r32/esp
17510
17511 b8/copy-to-eax 0/imm32/false
17512 (rewind-stream *(ebp+8))
17513 {
17514 (next-mu-token *(ebp+8) %ecx)
17515
17516 (slice-empty? %ecx)
17517 3d/compare-eax-and 0/imm32/false
17518 b8/copy-to-eax 0/imm32/false/result
17519 0f 85/jump-if-!= break/disp32
17520
17521
17522 8b/-> *ecx 0/r32/eax
17523 8a/copy-byte *eax 0/r32/AL
17524 81 4/subop/and %eax 0xff/imm32
17525
17526 3d/compare-eax-and 0x23/imm32/hash
17527 b8/copy-to-eax 0/imm32/false/result
17528 0f 84/jump-if-= break/disp32
17529
17530 (slice-equal? %ecx "<-")
17531 3d/compare-eax-and 0/imm32/false
17532 74/jump-if-= loop/disp8
17533 b8/copy-to-eax 1/imm32/true
17534 }
17535 $stmt-has-outputs:end:
17536 (rewind-stream *(ebp+8))
17537
17538 81 0/subop/add %esp 8/imm32
17539
17540 59/pop-to-ecx
17541
17542 89/<- %esp 5/r32/ebp
17543 5d/pop-to-ebp
17544 c3/return
17545
17546
17547
17548 lookup-var-or-literal:
17549
17550 55/push-ebp
17551 89/<- %ebp 4/r32/esp
17552
17553 50/push-eax
17554 51/push-ecx
17555 56/push-esi
17556
17557 8b/-> *(ebp+8) 6/r32/esi
17558
17559 (slice-empty? %esi)
17560 3d/compare-eax-and 0/imm32/false
17561 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
17562
17563 8b/-> *esi 1/r32/ecx
17564 8a/copy-byte *ecx 1/r32/CL
17565 81 4/subop/and %ecx 0xff/imm32
17566
17567 {
17568 81 7/subop/compare %ecx 0x2d/imm32/dash
17569 74/jump-if-= $lookup-var-or-literal:literal/disp8
17570 (is-decimal-digit? %ecx)
17571 3d/compare-eax-and 0/imm32/false
17572 74/jump-if-= break/disp8
17573 $lookup-var-or-literal:literal:
17574 (new-literal-integer Heap %esi *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
17575 eb/jump $lookup-var-or-literal:end/disp8
17576 }
17577
17578 {
17579 81 7/subop/compare %ecx 0x22/imm32/dquote
17580 75/jump-if-!= break/disp8
17581 $lookup-var-or-literal:literal-string:
17582 (new-literal-string Heap %esi *(ebp+0x10))
17583 eb/jump $lookup-var-or-literal:end/disp8
17584 }
17585
17586 {
17587 $lookup-var-or-literal:var:
17588 (lookup-var %esi *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
17589 }
17590 $lookup-var-or-literal:end:
17591
17592 5e/pop-to-esi
17593 59/pop-to-ecx
17594 58/pop-to-eax
17595
17596 89/<- %esp 5/r32/ebp
17597 5d/pop-to-ebp
17598 c3/return
17599
17600 $lookup-var-or-literal:abort:
17601 (write-buffered *(ebp+0x18) "fn ")
17602 8b/-> *(ebp+0x14) 0/r32/eax
17603 (lookup *eax *(eax+4))
17604 (write-buffered *(ebp+0x18) %eax)
17605 (write-buffered *(ebp+0x18) ": empty variable!")
17606 (flush *(ebp+0x18))
17607 (stop *(ebp+0x1c) 1)
17608
17609
17610
17611 lookup-var:
17612
17613 55/push-ebp
17614 89/<- %ebp 4/r32/esp
17615
17616 50/push-eax
17617
17618 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
17619
17620 8b/-> *(ebp+0x10) 0/r32/eax
17621 81 7/subop/compare *eax 0/imm32
17622 74/jump-if-= $lookup-var:abort/disp8
17623 $lookup-var:end:
17624
17625 58/pop-to-eax
17626
17627 89/<- %esp 5/r32/ebp
17628 5d/pop-to-ebp
17629 c3/return
17630
17631 $lookup-var:abort:
17632 (write-buffered *(ebp+0x18) "fn ")
17633 8b/-> *(ebp+0x14) 0/r32/eax
17634 (lookup *eax *(eax+4))
17635 (write-buffered *(ebp+0x18) %eax)
17636 (write-buffered *(ebp+0x18) ": unknown variable '")
17637 (write-slice-buffered *(ebp+0x18) *(ebp+8))
17638 (write-buffered *(ebp+0x18) "'\n")
17639 (flush *(ebp+0x18))
17640 (stop *(ebp+0x1c) 1)
17641
17642
17643
17644
17645 lookup-var-helper:
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656 55/push-ebp
17657 89/<- %ebp 4/r32/esp
17658
17659 50/push-eax
17660 51/push-ecx
17661 52/push-edx
17662 53/push-ebx
17663 56/push-esi
17664 57/push-edi
17665
17666 (zero-out *(ebp+0x10) *Handle-size)
17667
17668 8b/-> *(ebp+0xc) 6/r32/esi
17669
17670 8b/-> *esi 3/r32/ebx
17671
17672 3b/compare<- *(esi+4) 0/r32/eax
17673 0f 8f/jump-if-> $lookup-var-helper:error1/disp32
17674
17675 8d/copy-address *(esi+8) 2/r32/edx
17676
17677 8d/copy-address *(esi+ebx-4) 3/r32/ebx
17678
17679 68/push 0/imm32
17680 68/push 0/imm32
17681 68/push 0/imm32
17682 68/push 0/imm32
17683 68/push 0/imm32
17684 68/push 0/imm32
17685 68/push 0/imm32
17686 68/push 0/imm32
17687 68/push 0/imm32
17688 68/push 0/imm32
17689 68/push 0/imm32
17690 68/push 0/imm32
17691 68/push 0/imm32
17692 68/push 0/imm32
17693 68/push 0/imm32
17694 68/push 0/imm32
17695 89/<- %edi 4/r32/esp
17696 {
17697 $lookup-var-helper:loop:
17698
17699 39/compare %ebx 2/r32/edx
17700 0f 82/jump-if-addr< break/disp32
17701
17702 (lookup *ebx *(ebx+4))
17703 89/<- %ecx 0/r32/eax
17704
17705 (lookup *ecx *(ecx+4))
17706
17707 (slice-equal? *(ebp+8) %eax)
17708 3d/compare-eax-and 0/imm32/false
17709 {
17710 74/jump-if-= break/disp8
17711 $lookup-var-helper:found:
17712
17713 (lookup *(ecx+0x18) *(ecx+0x1c))
17714 3d/compare-eax-and 0/imm32
17715 {
17716 74/jump-if-= break/disp8
17717 $lookup-var-helper:found-register:
17718
17719 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
17720 8b/-> *eax 0/r32/eax
17721
17722 8b/-> *(edi+eax<<2) 0/r32/eax
17723 3d/compare-eax-and 0/imm32
17724 0f 85/jump-if-!= $lookup-var-helper:error2/disp32
17725 }
17726 $lookup-var-helper:return:
17727
17728 8b/-> *(ebp+0x10) 6/r32/esi
17729
17730 8b/-> *ebx 0/r32/eax
17731 89/<- *esi 0/r32/eax
17732 8b/-> *(ebx+4) 0/r32/eax
17733 89/<- *(esi+4) 0/r32/eax
17734
17735 eb/jump $lookup-var-helper:end/disp8
17736 }
17737
17738
17739 (lookup *(ecx+0x18) *(ecx+0x1c))
17740
17741 3d/compare-eax-and 0/imm32
17742 74/jump-if-= $lookup-var-helper:continue/disp8
17743
17744 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
17745 8b/-> *eax 0/r32/eax
17746
17747 89/<- *(edi+eax<<2) 1/r32/ecx
17748 $lookup-var-helper:continue:
17749
17750 81 5/subop/subtract %ebx 0xc/imm32
17751 e9/jump loop/disp32
17752 }
17753 $lookup-var-helper:end:
17754
17755 81 0/subop/add %esp 0x40/imm32
17756
17757 5f/pop-to-edi
17758 5e/pop-to-esi
17759 5b/pop-to-ebx
17760 5a/pop-to-edx
17761 59/pop-to-ecx
17762 58/pop-to-eax
17763
17764 89/<- %esp 5/r32/ebp
17765 5d/pop-to-ebp
17766 c3/return
17767
17768 $lookup-var-helper:error1:
17769 (write-buffered *(ebp+0x18) "fn ")
17770 8b/-> *(ebp+0x14) 0/r32/eax
17771 (lookup *eax *(eax+4))
17772 (write-buffered *(ebp+0x18) %eax)
17773 (write-buffered *(ebp+0x18) ": malformed stack when looking up '")
17774 (write-slice-buffered *(ebp+0x18) *(ebp+8))
17775 (write-buffered *(ebp+0x18) "'\n")
17776 (flush *(ebp+0x18))
17777 (stop *(ebp+0x1c) 1)
17778
17779
17780 $lookup-var-helper:error2:
17781
17782 (write-buffered *(ebp+0x18) "fn ")
17783 50/push-eax
17784 8b/-> *(ebp+0x14) 0/r32/eax
17785 (lookup *eax *(eax+4))
17786 (write-buffered *(ebp+0x18) %eax)
17787 58/pop-eax
17788 (write-buffered *(ebp+0x18) ": register ")
17789 50/push-eax
17790 (lookup *(eax+0x18) *(eax+0x1c))
17791 (write-buffered *(ebp+0x18) %eax)
17792 58/pop-to-eax
17793 (write-buffered *(ebp+0x18) " reads var '")
17794 (write-slice-buffered *(ebp+0x18) *(ebp+8))
17795 (write-buffered *(ebp+0x18) "' after writing var '")
17796 (lookup *eax *(eax+4))
17797 (write-buffered *(ebp+0x18) %eax)
17798 (write-buffered *(ebp+0x18) "'\n")
17799 (flush *(ebp+0x18))
17800 (stop *(ebp+0x1c) 1)
17801
17802
17803 dump-vars:
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813 55/push-ebp
17814 89/<- %ebp 4/r32/esp
17815
17816 52/push-edx
17817 53/push-ebx
17818 56/push-esi
17819
17820 8b/-> *(ebp+8) 6/r32/esi
17821
17822 8b/-> *esi 3/r32/ebx
17823
17824 8d/copy-address *(esi+8) 2/r32/edx
17825
17826 8d/copy-address *(esi+ebx-4) 3/r32/ebx
17827 {
17828 $dump-vars:loop:
17829
17830 39/compare %ebx 2/r32/edx
17831 0f 82/jump-if-addr< break/disp32
17832
17833 (write-buffered Stderr " var@")
17834 (dump-var 2 %ebx)
17835
17836 81 5/subop/subtract %ebx 0xc/imm32
17837 e9/jump loop/disp32
17838 }
17839 $dump-vars:end:
17840
17841 5e/pop-to-esi
17842 5b/pop-to-ebx
17843 5a/pop-to-edx
17844
17845 89/<- %esp 5/r32/ebp
17846 5d/pop-to-ebp
17847 c3/return
17848
17849 == data
17850
17851 Mu-registers:
17852
17853 0xa8/imm32/write
17854 0/imm32/read
17855 0xa8/imm32/length
17856
17857
17858
17859 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
17860 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
17861 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
17862 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
17863 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
17864 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
17865
17866 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 0/imm32
17867 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 1/imm32
17868 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 2/imm32
17869 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 3/imm32
17870 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 4/imm32
17871 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 5/imm32
17872 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 6/imm32
17873 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 7/imm32
17874
17875
17876
17877
17878 Mu-registers-unique:
17879
17880 0xa8/imm32/write
17881 0/imm32/read
17882 0xa8/imm32/length
17883
17884
17885 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
17886 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
17887 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
17888 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
17889 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
17890 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
17891
17892 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 8/imm32
17893 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 9/imm32
17894 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 0xa/imm32
17895 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 0xb/imm32
17896 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 0xc/imm32
17897 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 0xd/imm32
17898 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 0xe/imm32
17899 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 0xf/imm32
17900
17901 $Mu-register-eax:
17902 0x11/imm32/alloc-id
17903 3/imm32/size
17904 0x65/e 0x61/a 0x78/x
17905
17906 $Mu-register-ecx:
17907 0x11/imm32/alloc-id
17908 3/imm32/size
17909 0x65/e 0x63/c 0x78/x
17910
17911 $Mu-register-edx:
17912 0x11/imm32/alloc-id
17913 3/imm32/size
17914 0x65/e 0x64/d 0x78/x
17915
17916 $Mu-register-ebx:
17917 0x11/imm32/alloc-id
17918 3/imm32/size
17919 0x65/e 0x62/b 0x78/x
17920
17921 $Mu-register-esi:
17922 0x11/imm32/alloc-id
17923 3/imm32/size
17924 0x65/e 0x73/s 0x69/i
17925
17926 $Mu-register-edi:
17927 0x11/imm32/alloc-id
17928 3/imm32/size
17929 0x65/e 0x64/d 0x69/i
17930
17931 $Mu-register-xmm0:
17932 0x11/imm32/alloc-id:fake:payload
17933
17934 0x4/imm32/size
17935 0x78/x 0x6d/m 0x6d/m 0x30/0
17936
17937 $Mu-register-xmm1:
17938 0x11/imm32/alloc-id:fake:payload
17939
17940 0x4/imm32/size
17941 0x78/x 0x6d/m 0x6d/m 0x31/1
17942
17943 $Mu-register-xmm2:
17944 0x11/imm32/alloc-id:fake:payload
17945
17946 0x4/imm32/size
17947 0x78/x 0x6d/m 0x6d/m 0x32/2
17948
17949 $Mu-register-xmm3:
17950 0x11/imm32/alloc-id:fake:payload
17951
17952 0x4/imm32/size
17953 0x78/x 0x6d/m 0x6d/m 0x33/3
17954
17955 $Mu-register-xmm4:
17956 0x11/imm32/alloc-id:fake:payload
17957
17958 0x4/imm32/size
17959 0x78/x 0x6d/m 0x6d/m 0x34/4
17960
17961 $Mu-register-xmm5:
17962 0x11/imm32/alloc-id:fake:payload
17963
17964 0x4/imm32/size
17965 0x78/x 0x6d/m 0x6d/m 0x35/5
17966
17967 $Mu-register-xmm6:
17968 0x11/imm32/alloc-id:fake:payload
17969
17970 0x4/imm32/size
17971 0x78/x 0x6d/m 0x6d/m 0x36/6
17972
17973 $Mu-register-xmm7:
17974 0x11/imm32/alloc-id:fake:payload
17975
17976 0x4/imm32/size
17977 0x78/x 0x6d/m 0x6d/m 0x37/7
17978
17979 == code
17980
17981
17982 maybe-define-var:
17983
17984 55/push-ebp
17985 89/<- %ebp 4/r32/esp
17986
17987 50/push-eax
17988
17989 (lookup *(ebp+8) *(ebp+0xc))
17990
17991 (binding-exists? %eax *(ebp+0x10))
17992 3d/compare-eax-and 0/imm32/false
17993 75/jump-if-!= $maybe-define-var:end/disp8
17994
17995 (push *(ebp+0x10) *(ebp+8))
17996 (push *(ebp+0x10) *(ebp+0xc))
17997 (push *(ebp+0x10) 0)
17998 $maybe-define-var:end:
17999
18000 58/pop-to-eax
18001
18002 89/<- %esp 5/r32/ebp
18003 5d/pop-to-ebp
18004 c3/return
18005
18006
18007 binding-exists?:
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019 55/push-ebp
18020 89/<- %ebp 4/r32/esp
18021
18022 51/push-ecx
18023 52/push-edx
18024 56/push-esi
18025
18026 8b/-> *(ebp+8) 0/r32/eax
18027 (lookup *eax *(eax+4))
18028 89/<- %ecx 0/r32/eax
18029
18030 8b/-> *(ebp+0xc) 6/r32/esi
18031
18032 8b/-> *esi 0/r32/eax
18033
18034 8d/copy-address *(esi+8) 2/r32/edx
18035
18036 8d/copy-address *(esi+eax-4) 6/r32/esi
18037 {
18038 $binding-exists?:loop:
18039
18040 39/compare %esi 2/r32/edx
18041 0f 82/jump-if-addr< break/disp32
18042
18043 (lookup *esi *(esi+4))
18044
18045 (lookup *eax *(eax+4))
18046
18047 (string-equal? %ecx %eax)
18048 3d/compare-eax-and 0/imm32/false
18049 75/jump-if-!= $binding-exists?:end/disp8
18050
18051 81 5/subop/subtract %esi 0xc/imm32
18052 e9/jump loop/disp32
18053 }
18054 b8/copy-to-eax 0/imm32/false
18055 $binding-exists?:end:
18056
18057 5e/pop-to-esi
18058 5a/pop-to-edx
18059 59/pop-to-ecx
18060
18061 89/<- %esp 5/r32/ebp
18062 5d/pop-to-ebp
18063 c3/return
18064
18065 test-parse-mu-stmt:
18066
18067 55/push-ebp
18068 89/<- %ebp 4/r32/esp
18069
18070 8b/-> *Primitive-type-ids 0/r32/eax
18071 89/<- *Type-id 0/r32/eax
18072 (clear-stream _test-input-stream)
18073 (write _test-input-stream "increment n\n")
18074
18075 81 5/subop/subtract %esp 0xc0/imm32
18076 68/push 0xc0/imm32/size
18077 68/push 0/imm32/top
18078 89/<- %ecx 4/r32/esp
18079 (clear-stack %ecx)
18080
18081 68/push 0/imm32
18082 68/push 0/imm32
18083 89/<- %edx 4/r32/esp
18084
18085 68/push 0/imm32
18086 68/push 0/imm32
18087 89/<- %eax 4/r32/esp
18088
18089 (copy-array Heap "n" %eax)
18090 (new-var Heap *eax *(eax+4) %edx)
18091
18092 (push %ecx *edx)
18093 (push %ecx *(edx+4))
18094 (push %ecx 0)
18095
18096 68/push 0/imm32
18097 68/push 0/imm32
18098 89/<- %eax 4/r32/esp
18099
18100 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
18101
18102 (lookup *eax *(eax+4))
18103 89/<- %edx 0/r32/eax
18104
18105 (check-ints-equal *edx 1 "F - test-parse-mu-stmt/tag")
18106
18107 (lookup *(edx+4) *(edx+8))
18108 (check-strings-equal %eax "increment" "F - test-parse-mu-stmt/name")
18109
18110
18111 (lookup *(edx+0xc) *(edx+0x10))
18112
18113 (lookup *eax *(eax+4))
18114
18115 (lookup *eax *(eax+4))
18116
18117 (check-strings-equal %eax "n" "F - test-parse-mu-stmt/inout:0")
18118
18119 89/<- %esp 5/r32/ebp
18120 5d/pop-to-ebp
18121 c3/return
18122
18123 test-parse-mu-stmt-with-comma:
18124
18125 55/push-ebp
18126 89/<- %ebp 4/r32/esp
18127
18128 8b/-> *Primitive-type-ids 0/r32/eax
18129 89/<- *Type-id 0/r32/eax
18130 (clear-stream _test-input-stream)
18131 (write _test-input-stream "copy-to n, 3\n")
18132
18133 81 5/subop/subtract %esp 0xc0/imm32
18134 68/push 0xc0/imm32/size
18135 68/push 0/imm32/top
18136 89/<- %ecx 4/r32/esp
18137 (clear-stack %ecx)
18138
18139 68/push 0/imm32
18140 68/push 0/imm32
18141 89/<- %edx 4/r32/esp
18142
18143 68/push 0/imm32
18144 68/push 0/imm32
18145 89/<- %eax 4/r32/esp
18146
18147 (copy-array Heap "n" %eax)
18148 (new-var Heap *eax *(eax+4) %edx)
18149
18150 (push %ecx *edx)
18151 (push %ecx *(edx+4))
18152 (push %ecx 0)
18153
18154 68/push 0/imm32
18155 68/push 0/imm32
18156 89/<- %eax 4/r32/esp
18157
18158 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
18159
18160 (lookup *eax *(eax+4))
18161 89/<- %edx 0/r32/eax
18162
18163 (check-ints-equal *edx 1 "F - test-parse-mu-stmt-with-comma/tag")
18164
18165 (lookup *(edx+4) *(edx+8))
18166 (check-strings-equal %eax "copy-to" "F - test-parse-mu-stmt-with-comma/name")
18167
18168
18169 (lookup *(edx+0xc) *(edx+0x10))
18170
18171 (lookup *eax *(eax+4))
18172
18173 (lookup *eax *(eax+4))
18174
18175 (check-strings-equal %eax "n" "F - test-parse-mu-stmt-with-comma/inout:0")
18176
18177 89/<- %esp 5/r32/ebp
18178 5d/pop-to-ebp
18179 c3/return
18180
18181 new-var:
18182
18183 55/push-ebp
18184 89/<- %ebp 4/r32/esp
18185
18186 50/push-eax
18187 51/push-ecx
18188
18189 8b/-> *(ebp+0x14) 1/r32/ecx
18190
18191 (allocate *(ebp+8) *Var-size %ecx)
18192
18193 (lookup *ecx *(ecx+4))
18194
18195 8b/-> *(ebp+0xc) 1/r32/ecx
18196 89/<- *eax 1/r32/ecx
18197 8b/-> *(ebp+0x10) 1/r32/ecx
18198 89/<- *(eax+4) 1/r32/ecx
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208 $new-var:end:
18209
18210 59/pop-to-ecx
18211 58/pop-to-eax
18212
18213 89/<- %esp 5/r32/ebp
18214 5d/pop-to-ebp
18215 c3/return
18216
18217 new-literal-integer:
18218
18219 55/push-ebp
18220 89/<- %ebp 4/r32/esp
18221
18222 50/push-eax
18223 51/push-ecx
18224
18225 (is-hex-int? *(ebp+0xc))
18226 3d/compare-eax-and 0/imm32/false
18227 0f 84/jump-if-= $new-literal-integer:abort/disp32
18228
18229 (check-mu-hex-int *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
18230
18231 (new-var-from-slice *(ebp+8) *(ebp+0xc) *(ebp+0x10))
18232
18233 8b/-> *(ebp+0x10) 0/r32/eax
18234 (lookup *eax *(eax+4))
18235 89/<- %ecx 0/r32/eax
18236
18237 8b/-> *Curr-block-depth 0/r32/eax
18238 89/<- *(ecx+0x10) 0/r32/eax
18239
18240 8d/copy-address *(ecx+8) 0/r32/eax
18241 (allocate *(ebp+8) *Type-tree-size %eax)
18242 (lookup *(ecx+8) *(ecx+0xc))
18243 c7 0/subop/copy *eax 1/imm32/true
18244
18245 $new-literal-integer:end:
18246
18247 81 0/subop/add %esp 8/imm32
18248
18249 59/pop-to-ecx
18250 58/pop-to-eax
18251
18252 89/<- %esp 5/r32/ebp
18253 5d/pop-to-ebp
18254 c3/return
18255
18256 $new-literal-integer:abort:
18257 (write-buffered *(ebp+0x18) "fn ")
18258 8b/-> *(ebp+0x14) 0/r32/eax
18259 (lookup *eax *(eax+4))
18260 (write-buffered *(ebp+0x18) %eax)
18261 (write-buffered *(ebp+0x18) ": variable '")
18262 (write-slice-buffered *(ebp+0x18) *(ebp+0xc))
18263 (write-buffered *(ebp+0x18) "' cannot begin with a digit (or do you have a typo in a number?)\n")
18264 (flush *(ebp+0x18))
18265 (stop *(ebp+0x1c) 1)
18266
18267
18268
18269 check-mu-hex-int:
18270
18271 55/push-ebp
18272 89/<- %ebp 4/r32/esp
18273
18274 50/push-eax
18275 51/push-ecx
18276 52/push-edx
18277
18278 8b/-> *(ebp+8) 1/r32/ecx
18279
18280 8b/-> *ecx 2/r32/edx
18281
18282 b8/copy-to-eax 0/imm32
18283 8a/copy-byte *edx 0/r32/AL
18284 3d/compare-eax-and 0x2d/imm32/dash
18285 {
18286 75/jump-if-!= break/disp8
18287 42/increment-edx
18288 }
18289
18290 8b/-> *(ecx+4) 1/r32/ecx
18291
18292 89/<- %eax 1/r32/ecx
18293 29/subtract-from %eax 2/r32/edx
18294
18295 3d/compare-eax-with 1/imm32
18296 0f 8e/jump-if-<= $check-mu-hex-int:end/disp32
18297 $check-mu-hex-int:length->-1:
18298
18299
18300 51/push-ecx
18301 52/push-edx
18302 89/<- %eax 4/r32/esp
18303
18304 (slice-starts-with? %eax "0x")
18305
18306 81 0/subop/add %esp 8/imm32
18307
18308 3d/compare-eax-with 0/imm32/false
18309 75/jump-if-!= $check-mu-hex-int:end/disp8
18310 $check-mu-hex-int:abort:
18311
18312 (write-buffered *(ebp+0xc) "literal integers are always hex in Mu; start '")
18313 (write-slice-buffered *(ebp+0xc) *(ebp+8))
18314 (write-buffered *(ebp+0xc) "' with a '0x' to be unambiguous, converting it to hexadecimal as necessary.\n")
18315 (flush *(ebp+0xc))
18316 (stop *(ebp+0x10) 1)
18317 $check-mu-hex-int:end:
18318
18319 5a/pop-to-edx
18320 59/pop-to-ecx
18321 58/pop-to-eax
18322
18323 89/<- %esp 5/r32/ebp
18324 5d/pop-to-ebp
18325 c3/return
18326
18327 new-literal:
18328
18329 55/push-ebp
18330 89/<- %ebp 4/r32/esp
18331
18332 50/push-eax
18333 51/push-ecx
18334
18335 68/push 0/imm32
18336 68/push 0/imm32
18337 89/<- %ecx 4/r32/esp
18338
18339 (slice-to-string Heap *(ebp+0xc) %ecx)
18340
18341 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
18342
18343 8b/-> *(ebp+0x10) 1/r32/ecx
18344 (lookup *ecx *(ecx+4))
18345 89/<- %ecx 0/r32/eax
18346
18347 8b/-> *Curr-block-depth 0/r32/eax
18348 89/<- *(ecx+0x10) 0/r32/eax
18349
18350 8d/copy-address *(ecx+8) 0/r32/eax
18351 (allocate *(ebp+8) *Type-tree-size %eax)
18352 (lookup *(ecx+8) *(ecx+0xc))
18353
18354 c7 0/subop/copy *eax 1/imm32/true
18355 $new-literal:end:
18356
18357 81 0/subop/add %esp 8/imm32
18358
18359 59/pop-to-ecx
18360 58/pop-to-eax
18361
18362 89/<- %esp 5/r32/ebp
18363 5d/pop-to-ebp
18364 c3/return
18365
18366 new-literal-string:
18367
18368 55/push-ebp
18369 89/<- %ebp 4/r32/esp
18370
18371 50/push-eax
18372 51/push-ecx
18373
18374 68/push 0/imm32
18375 68/push 0/imm32
18376 89/<- %ecx 4/r32/esp
18377
18378 (slice-to-string Heap *(ebp+0xc) %ecx)
18379
18380 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
18381
18382 8b/-> *(ebp+0x10) 1/r32/ecx
18383 (lookup *ecx *(ecx+4))
18384 89/<- %ecx 0/r32/eax
18385
18386 8b/-> *Curr-block-depth 0/r32/eax
18387 89/<- *(ecx+0x10) 0/r32/eax
18388
18389 8d/copy-address *(ecx+8) 0/r32/eax
18390 (allocate *(ebp+8) *Type-tree-size %eax)
18391 (lookup *(ecx+8) *(ecx+0xc))
18392
18393 c7 0/subop/copy *(eax+4) 0x10/imm32/type-id-string-literal
18394
18395 c7 0/subop/copy *eax 1/imm32/true
18396 $new-literal-string:end:
18397
18398 81 0/subop/add %esp 8/imm32
18399
18400 59/pop-to-ecx
18401 58/pop-to-eax
18402
18403 89/<- %esp 5/r32/ebp
18404 5d/pop-to-ebp
18405 c3/return
18406
18407 new-var-from-slice:
18408
18409 55/push-ebp
18410 89/<- %ebp 4/r32/esp
18411
18412 51/push-ecx
18413
18414 68/push 0/imm32
18415 68/push 0/imm32
18416 89/<- %ecx 4/r32/esp
18417
18418 (slice-to-string Heap *(ebp+0xc) %ecx)
18419
18420 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
18421 $new-var-from-slice:end:
18422
18423 81 0/subop/add %esp 8/imm32
18424
18425 59/pop-to-ecx
18426
18427 89/<- %esp 5/r32/ebp
18428 5d/pop-to-ebp
18429 c3/return
18430
18431 new-var-def:
18432
18433 55/push-ebp
18434 89/<- %ebp 4/r32/esp
18435
18436 50/push-eax
18437 51/push-ecx
18438
18439 (allocate *(ebp+8) *Stmt-size *(ebp+0x14))
18440
18441 8b/-> *(ebp+0x14) 0/r32/eax
18442 (lookup *eax *(eax+4))
18443
18444 c7 0/subop/copy *eax 2/imm32/tag/var-on-stack
18445
18446 8b/-> *(ebp+0xc) 1/r32/ecx
18447 89/<- *(eax+4) 1/r32/ecx
18448 8b/-> *(ebp+0x10) 1/r32/ecx
18449 89/<- *(eax+8) 1/r32/ecx
18450 $new-var-def:end:
18451
18452 59/pop-to-ecx
18453 58/pop-to-eax
18454
18455 89/<- %esp 5/r32/ebp
18456 5d/pop-to-ebp
18457 c3/return
18458
18459 new-reg-var-def:
18460
18461 55/push-ebp
18462 89/<- %ebp 4/r32/esp
18463
18464 50/push-eax
18465
18466 8b/-> *(ebp+0x14) 0/r32/eax
18467
18468 (allocate *(ebp+8) *Stmt-size %eax)
18469
18470 (lookup *eax *(eax+4))
18471
18472 c7 0/subop/copy *eax 3/imm32/tag/var-in-register
18473
18474 8d/copy-address *(eax+0x14) 0/r32/eax
18475 (append-stmt-var Heap *(ebp+0xc) *(ebp+0x10) 0 0 0 %eax)
18476 $new-reg-var-def:end:
18477
18478 58/pop-to-eax
18479
18480 89/<- %esp 5/r32/ebp
18481 5d/pop-to-ebp
18482 c3/return
18483
18484 append-list:
18485
18486 55/push-ebp
18487 89/<- %ebp 4/r32/esp
18488
18489 50/push-eax
18490 51/push-ecx
18491 57/push-edi
18492
18493 8b/-> *(ebp+0x1c) 7/r32/edi
18494
18495 (allocate *(ebp+8) *List-size %edi)
18496
18497 (lookup *edi *(edi+4))
18498 89/<- %edi 0/r32/eax
18499
18500 8b/-> *(ebp+0xc) 0/r32/eax
18501 89/<- *edi 0/r32/eax
18502 8b/-> *(ebp+0x10) 0/r32/eax
18503 89/<- *(edi+4) 0/r32/eax
18504
18505 81 7/subop/compare *(ebp+0x14) 0/imm32
18506 74/jump-if-= $append-list:end/disp8
18507
18508 $append-list:non-empty-list:
18509
18510 (lookup *(ebp+0x14) *(ebp+0x18))
18511
18512 {
18513 81 7/subop/compare *(eax+8) 0/imm32
18514 74/jump-if-= break/disp8
18515
18516 (lookup *(eax+8) *(eax+0xc))
18517
18518 eb/jump loop/disp8
18519 }
18520
18521 8b/-> *(ebp+0x1c) 7/r32/edi
18522
18523 8b/-> *edi 1/r32/ecx
18524 89/<- *(eax+8) 1/r32/ecx
18525 8b/-> *(edi+4) 1/r32/ecx
18526 89/<- *(eax+0xc) 1/r32/ecx
18527
18528 8b/-> *(ebp+0x14) 1/r32/ecx
18529 89/<- *edi 1/r32/ecx
18530 8b/-> *(ebp+0x18) 1/r32/ecx
18531 89/<- *(edi+4) 1/r32/ecx
18532 $append-list:end:
18533
18534 5f/pop-to-edi
18535 59/pop-to-ecx
18536 58/pop-to-eax
18537
18538 89/<- %esp 5/r32/ebp
18539 5d/pop-to-ebp
18540 c3/return
18541
18542 append-stmt-var:
18543
18544 55/push-ebp
18545 89/<- %ebp 4/r32/esp
18546
18547 50/push-eax
18548 51/push-ecx
18549 57/push-edi
18550
18551 8b/-> *(ebp+0x20) 7/r32/edi
18552
18553 (allocate *(ebp+8) *Stmt-var-size %edi)
18554
18555 (lookup *edi *(edi+4))
18556 89/<- %ecx 0/r32/eax
18557
18558 8b/-> *(ebp+0xc) 0/r32/eax
18559 89/<- *ecx 0/r32/eax
18560 8b/-> *(ebp+0x10) 0/r32/eax
18561 89/<- *(ecx+4) 0/r32/eax
18562
18563 8b/-> *(ebp+0x1c) 0/r32/eax
18564 89/<- *(ecx+0x10) 0/r32/eax
18565
18566 81 7/subop/compare *(ebp+0x14) 0/imm32/null
18567 74/jump-if-= $append-stmt-var:end/disp8
18568
18569
18570 (lookup *(ebp+0x14) *(ebp+0x18))
18571
18572 {
18573 81 7/subop/compare *(eax+8) 0/imm32
18574 74/jump-if-= break/disp8
18575
18576 (lookup *(eax+8) *(eax+0xc))
18577
18578 eb/jump loop/disp8
18579 }
18580
18581 8b/-> *edi 1/r32/ecx
18582 89/<- *(eax+8) 1/r32/ecx
18583 8b/-> *(edi+4) 1/r32/ecx
18584 89/<- *(eax+0xc) 1/r32/ecx
18585
18586 8b/-> *(ebp+0x14) 1/r32/ecx
18587 89/<- *edi 1/r32/ecx
18588 8b/-> *(ebp+0x18) 1/r32/ecx
18589 89/<- *(edi+4) 1/r32/ecx
18590 $append-stmt-var:end:
18591
18592 5f/pop-to-edi
18593 59/pop-to-ecx
18594 58/pop-to-eax
18595
18596 89/<- %esp 5/r32/ebp
18597 5d/pop-to-ebp
18598 c3/return
18599
18600 append-to-block:
18601
18602 55/push-ebp
18603 89/<- %ebp 4/r32/esp
18604
18605 50/push-eax
18606 56/push-esi
18607
18608 8b/-> *(ebp+0xc) 6/r32/esi
18609
18610 8d/copy-address *(esi+4) 0/r32/eax
18611 (append-list *(ebp+8) *(ebp+0x10) *(ebp+0x14) *(esi+4) *(esi+8) %eax)
18612 $append-to-block:end:
18613
18614 5e/pop-to-esi
18615 58/pop-to-eax
18616
18617 89/<- %esp 5/r32/ebp
18618 5d/pop-to-ebp
18619 c3/return
18620
18621
18622
18623
18624
18625
18626
18627 lookup-or-create-constant:
18628
18629 55/push-ebp
18630 89/<- %ebp 4/r32/esp
18631
18632 50/push-eax
18633 56/push-esi
18634
18635 (container-type *(ebp+8))
18636 89/<- %esi 0/r32/eax
18637
18638 68/push 0/imm32
18639 68/push 0/imm32
18640 89/<- %eax 4/r32/esp
18641 (find-or-create-typeinfo %esi %eax)
18642
18643 (lookup *eax *(eax+4))
18644
18645
18646
18647
18648
18649 (find-or-create-typeinfo-output-var %eax *(ebp+0xc) *(ebp+0x10))
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663 $lookup-or-create-constant:end:
18664
18665 81 0/subop/add %esp 8/imm32
18666
18667 5e/pop-to-esi
18668 58/pop-to-eax
18669
18670 89/<- %esp 5/r32/ebp
18671 5d/pop-to-ebp
18672 c3/return
18673
18674
18675
18676
18677
18678 container-type:
18679
18680 55/push-ebp
18681 89/<- %ebp 4/r32/esp
18682
18683 8b/-> *(ebp+8) 0/r32/eax
18684 (lookup *eax *(eax+4))
18685 (lookup *(eax+8) *(eax+0xc))
18686 {
18687 81 7/subop/compare *(eax+8) 0/imm32
18688 74/jump-if-= break/disp8
18689 (lookup *(eax+0xc) *(eax+0x10))
18690 (lookup *(eax+4) *(eax+8))
18691 }
18692 8b/-> *(eax+4) 0/r32/eax
18693 $container-type:end:
18694
18695 89/<- %esp 5/r32/ebp
18696 5d/pop-to-ebp
18697 c3/return
18698
18699 is-container?:
18700
18701 55/push-ebp
18702 89/<- %ebp 4/r32/esp
18703
18704 8b/-> *(ebp+8) 0/r32/eax
18705 c1/shift 4/subop/left %eax 2/imm8
18706 3b/compare 0/r32/eax *Primitive-type-ids
18707 0f 9d/set-if->= %al
18708 81 4/subop/and %eax 0xff/imm32
18709 $is-container?:end:
18710
18711 89/<- %esp 5/r32/ebp
18712 5d/pop-to-ebp
18713 c3/return
18714
18715 find-or-create-typeinfo:
18716
18717 55/push-ebp
18718 89/<- %ebp 4/r32/esp
18719
18720 50/push-eax
18721 51/push-ecx
18722 52/push-edx
18723 57/push-edi
18724
18725 8b/-> *(ebp+0xc) 7/r32/edi
18726
18727 68/push 0/imm32
18728 68/push 0/imm32
18729 89/<- %ecx 4/r32/esp
18730
18731 (find-typeinfo *(ebp+8) %edi)
18732 {
18733
18734 81 7/subop/compare *edi 0/imm32
18735 0f 85/jump-if-!= break/disp32
18736 $find-or-create-typeinfo:create:
18737
18738 (allocate Heap *Typeinfo-size %edi)
18739
18740 (lookup *edi *(edi+4))
18741
18742
18743
18744
18745
18746
18747
18748 8b/-> *(ebp+8) 2/r32/edx
18749 89/<- *eax 2/r32/edx
18750
18751
18752 (new-stream Heap 0x40 *Typeinfo-fields-row-size %ecx)
18753
18754 8b/-> *ecx 2/r32/edx
18755 89/<- *(eax+4) 2/r32/edx
18756 8b/-> *(ecx+4) 2/r32/edx
18757 89/<- *(eax+8) 2/r32/edx
18758
18759 8b/-> *_Program-types 1/r32/ecx
18760 89/<- *(eax+0x10) 1/r32/ecx
18761 8b/-> *_Program-types->payload 1/r32/ecx
18762 89/<- *(eax+0x14) 1/r32/ecx
18763
18764 8b/-> *edi 1/r32/ecx
18765 89/<- *_Program-types 1/r32/ecx
18766 8b/-> *(edi+4) 1/r32/ecx
18767 89/<- *_Program-types->payload 1/r32/ecx
18768 }
18769 $find-or-create-typeinfo:end:
18770
18771 81 0/subop/add %esp 8/imm32
18772
18773 5f/pop-to-edi
18774 5a/pop-to-edx
18775 59/pop-to-ecx
18776 58/pop-to-eax
18777
18778 89/<- %esp 5/r32/ebp
18779 5d/pop-to-ebp
18780 c3/return
18781
18782 find-typeinfo:
18783
18784 55/push-ebp
18785 89/<- %ebp 4/r32/esp
18786
18787 50/push-eax
18788 51/push-ecx
18789 52/push-edx
18790 57/push-edi
18791
18792 8b/-> *(ebp+8) 1/r32/ecx
18793
18794 8b/-> *(ebp+0xc) 7/r32/edi
18795
18796 8b/-> *_Program-types 0/r32/eax
18797 89/<- *edi 0/r32/eax
18798 8b/-> *_Program-types->payload 0/r32/eax
18799 89/<- *(edi+4) 0/r32/eax
18800 {
18801 $find-typeinfo:loop:
18802
18803 81 7/subop/compare *edi 0/imm32
18804 74/jump-if-= break/disp8
18805 $find-typeinfo:check:
18806
18807 (lookup *edi *(edi+4))
18808
18809 39/compare *eax 1/r32/ecx
18810 74/jump-if-= break/disp8
18811 $find-typeinfo:continue:
18812
18813 8b/-> *(eax+0x10) 2/r32/edx
18814 89/<- *edi 2/r32/edx
18815 8b/-> *(eax+0x14) 2/r32/edx
18816 89/<- *(edi+4) 2/r32/edx
18817
18818 eb/jump loop/disp8
18819 }
18820 $find-typeinfo:end:
18821
18822 5f/pop-to-edi
18823 5a/pop-to-edx
18824 59/pop-to-ecx
18825 58/pop-to-eax
18826
18827 89/<- %esp 5/r32/ebp
18828 5d/pop-to-ebp
18829 c3/return
18830
18831 find-or-create-typeinfo-output-var:
18832
18833 55/push-ebp
18834 89/<- %ebp 4/r32/esp
18835
18836 50/push-eax
18837 52/push-edx
18838 57/push-edi
18839
18840 68/push 0/imm32
18841 68/push 0/imm32
18842 89/<- %edi 4/r32/esp
18843
18844 (find-or-create-typeinfo-fields *(ebp+8) *(ebp+0xc) %edi)
18845
18846 (lookup *edi *(edi+4))
18847 89/<- %edi 0/r32/eax
18848
18849 {
18850 81 7/subop/compare *(edi+0xc) 0/imm32
18851 0f 85/jump-if-!= break/disp32
18852
18853
18854 68/push 0/imm32
18855 68/push 0/imm32
18856 89/<- %eax 4/r32/esp
18857 (slice-to-string Heap *(ebp+0xc) %eax)
18858
18859 8d/copy-address *(edi+0xc) 2/r32/edx
18860 (new-var Heap *eax *(eax+4) %edx)
18861
18862 81 0/subop/add %esp 8/imm32
18863
18864 (lookup *(edi+0xc) *(edi+0x10))
18865 89/<- %edx 0/r32/eax
18866
18867 8d/copy-address *(edx+8) 0/r32/eax
18868 (allocate Heap *Type-tree-size %eax)
18869 (lookup *(edx+8) *(edx+0xc))
18870 c7 0/subop/copy *eax 1/imm32/true
18871 c7 0/subop/copy *(eax+4) 6/imm32/constant
18872 c7 0/subop/copy *(eax+8) 0/imm32
18873 c7 0/subop/copy *(eax+0xc) 0/imm32
18874 c7 0/subop/copy *(eax+0x10) 0/imm32
18875
18876 c7 0/subop/copy *(edx+0x14) -1/imm32/uninitialized
18877 }
18878
18879 8b/-> *(ebp+0x10) 2/r32/edx
18880 8b/-> *(edi+0xc) 0/r32/eax
18881 89/<- *edx 0/r32/eax
18882 8b/-> *(edi+0x10) 0/r32/eax
18883 89/<- *(edx+4) 0/r32/eax
18884 $find-or-create-typeinfo-output-var:end:
18885
18886 81 0/subop/add %esp 8/imm32
18887
18888 5f/pop-to-edi
18889 5a/pop-to-edx
18890 58/pop-to-eax
18891
18892 89/<- %esp 5/r32/ebp
18893 5d/pop-to-ebp
18894 c3/return
18895
18896 find-or-create-typeinfo-fields:
18897
18898 55/push-ebp
18899 89/<- %ebp 4/r32/esp
18900
18901 50/push-eax
18902 56/push-esi
18903 57/push-edi
18904
18905 8b/-> *(ebp+8) 0/r32/eax
18906 (lookup *(eax+4) *(eax+8))
18907
18908 8b/-> *(ebp+0x10) 7/r32/edi
18909
18910 (get-or-insert-slice %eax *(ebp+0xc) *Typeinfo-fields-row-size Heap)
18911 89/<- %esi 0/r32/eax
18912
18913 {
18914 81 7/subop/compare *esi 0/imm32
18915 75/jump-if-!= break/disp8
18916 (allocate Heap *Typeinfo-entry-size %esi)
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932 }
18933
18934
18935 8b/-> *esi 0/r32/eax
18936 89/<- *edi 0/r32/eax
18937 8b/-> *(esi+4) 0/r32/eax
18938 89/<- *(edi+4) 0/r32/eax
18939 $find-or-create-typeinfo-fields:end:
18940
18941 5f/pop-to-edi
18942 5e/pop-to-esi
18943 58/pop-to-eax
18944
18945 89/<- %esp 5/r32/ebp
18946 5d/pop-to-ebp
18947 c3/return
18948
18949 populate-mu-type:
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975 55/push-ebp
18976 89/<- %ebp 4/r32/esp
18977
18978 68/push 0/imm32
18979
18980 50/push-eax
18981 51/push-ecx
18982 52/push-edx
18983 53/push-ebx
18984 56/push-esi
18985 57/push-edi
18986
18987 8b/-> *(ebp+0xc) 7/r32/edi
18988
18989 81 5/subop/subtract %esp 0x200/imm32
18990 68/push 0x200/imm32/size
18991 68/push 0/imm32/read
18992 68/push 0/imm32/write
18993 89/<- %ecx 4/r32/esp
18994
18995 68/push 0/imm32/end
18996 68/push 0/imm32/start
18997 89/<- %edx 4/r32/esp
18998
18999 68/push 0/imm32
19000 68/push 0/imm32
19001 89/<- %esi 4/r32/esp
19002
19003 68/push 0/imm32
19004 68/push 0/imm32
19005 89/<- %ebx 4/r32/esp
19006 {
19007 $populate-mu-type:line-loop:
19008 (clear-stream %ecx)
19009 (read-line-buffered *(ebp+8) %ecx)
19010
19011 81 7/subop/compare *ecx 0/imm32
19012 0f 84/jump-if-= $populate-mu-type:error1/disp32
19013 +-- 6 lines: #? # dump line ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
19019 (next-mu-token %ecx %edx)
19020
19021 (slice-empty? %edx)
19022 3d/compare-eax-and 0/imm32
19023 0f 85/jump-if-!= loop/disp32
19024
19025 (slice-equal? %edx "}")
19026 3d/compare-eax-and 0/imm32
19027 0f 85/jump-if-!= break/disp32
19028 $populate-mu-type:parse-element:
19029
19030
19031
19032
19033 (type-name *edi)
19034 (parse-var-with-type %edx %ecx %esi %eax *(ebp+0x10) *(ebp+0x14))
19035
19036 (lookup *esi *(esi+4))
19037 (lookup *(eax+8) *(eax+0xc))
19038 (is-mu-addr-type? %eax)
19039 3d/compare-eax-and 0/imm32/false
19040 0f 85/jump-if-!= $populate-mu-type:error2/disp32
19041
19042 (lookup *esi *(esi+4))
19043 (lookup *(eax+8) *(eax+0xc))
19044 (is-mu-array-type? %eax)
19045 3d/compare-eax-and 0/imm32/false
19046 0f 85/jump-if-!= $populate-mu-type:error3/disp32
19047
19048 (lookup *esi *(esi+4))
19049 (lookup *(eax+8) *(eax+0xc))
19050 (is-simple-mu-type? %eax 8)
19051 3d/compare-eax-and 0/imm32/false
19052 0f 85/jump-if-!= $populate-mu-type:error4/disp32
19053
19054 (lookup *esi *(esi+4))
19055 (lookup *(eax+8) *(eax+0xc))
19056 (is-simple-mu-type? %eax 0xc)
19057 3d/compare-eax-and 0/imm32/false
19058 0f 85/jump-if-!= $populate-mu-type:error5/disp32
19059
19060 (lookup *esi *(esi+4))
19061 (lookup *(eax+8) *(eax+0xc))
19062 (is-mu-stream-type? %eax)
19063 3d/compare-eax-and 0/imm32/false
19064 0f 85/jump-if-!= $populate-mu-type:error6/disp32
19065
19066 51/push-ecx
19067 $populate-mu-type:create-typeinfo-fields:
19068
19069 (find-or-create-typeinfo-fields %edi %edx %ebx)
19070
19071 (lookup *ebx *(ebx+4))
19072 8b/-> *(ebp-4) 1/r32/ecx
19073
19074
19075
19076
19077
19078
19079 89/<- *(eax+8) 1/r32/ecx
19080
19081 ff 0/subop/increment *(ebp-4)
19082 $populate-mu-type:set-input-type:
19083
19084 8b/-> *esi 1/r32/ecx
19085 89/<- *eax 1/r32/ecx
19086 8b/-> *(esi+4) 1/r32/ecx
19087 89/<- *(eax+4) 1/r32/ecx
19088
19089 59/pop-to-ecx
19090 {
19091 $populate-mu-type:create-output-type:
19092
19093 81 7/subop/compare *(eax+0xc) 0/imm32
19094 75/jump-if-!= break/disp8
19095 8d/copy-address *(eax+0xc) 0/r32/eax
19096 (new-literal Heap %edx %eax)
19097 }
19098 e9/jump loop/disp32
19099 }
19100 $populate-mu-type:invalidate-total-size-in-bytes:
19101
19102
19103
19104 c7 0/subop/copy *(edi+0xc) -2/imm32/uninitialized
19105 $populate-mu-type:end:
19106
19107 81 0/subop/add %esp 0x224/imm32
19108
19109 5f/pop-to-edi
19110 5e/pop-to-esi
19111 5b/pop-to-ebx
19112 5a/pop-to-edx
19113 59/pop-to-ecx
19114 58/pop-to-eax
19115
19116 81 0/subop/add %esp 4/imm32
19117
19118 89/<- %esp 5/r32/ebp
19119 5d/pop-to-ebp
19120 c3/return
19121
19122 $populate-mu-type:error1:
19123
19124 (write-buffered *(ebp+0x10) "incomplete type definition '")
19125 (type-name *edi)
19126 (write-buffered *(ebp+0x10) %eax)
19127 (write-buffered *(ebp+0x10) "\n")
19128 (flush *(ebp+0x10))
19129 (stop *(ebp+0x14) 1)
19130
19131
19132 $populate-mu-type:error2:
19133 (write-buffered *(ebp+0x10) "type ")
19134 (type-name *edi)
19135 (write-buffered *(ebp+0x10) %eax)
19136 (write-buffered *(ebp+0x10) ": 'addr' elements not allowed\n")
19137 (flush *(ebp+0x10))
19138 (stop *(ebp+0x14) 1)
19139
19140
19141 $populate-mu-type:error3:
19142 (write-buffered *(ebp+0x10) "type ")
19143 (type-name *edi)
19144 (write-buffered *(ebp+0x10) %eax)
19145 (write-buffered *(ebp+0x10) ": 'array' elements not allowed for now\n")
19146 (flush *(ebp+0x10))
19147 (stop *(ebp+0x14) 1)
19148
19149
19150 $populate-mu-type:error4:
19151 (write-buffered *(ebp+0x10) "type ")
19152 (type-name *edi)
19153 (write-buffered *(ebp+0x10) %eax)
19154 (write-buffered *(ebp+0x10) ": 'byte' elements not allowed\n")
19155 (flush *(ebp+0x10))
19156 (stop *(ebp+0x14) 1)
19157
19158
19159 $populate-mu-type:error5:
19160 (write-buffered *(ebp+0x10) "type ")
19161 (type-name *edi)
19162 (write-buffered *(ebp+0x10) %eax)
19163 (write-buffered *(ebp+0x10) ": 'slice' elements not allowed\n")
19164 (flush *(ebp+0x10))
19165 (stop *(ebp+0x14) 1)
19166
19167
19168 $populate-mu-type:error6:
19169 (write-buffered *(ebp+0x10) "type ")
19170 (type-name *edi)
19171 (write-buffered *(ebp+0x10) %eax)
19172 (write-buffered *(ebp+0x10) ": 'stream' elements not allowed for now\n")
19173 (flush *(ebp+0x10))
19174 (stop *(ebp+0x14) 1)
19175
19176
19177 type-name:
19178
19179 55/push-ebp
19180 89/<- %ebp 4/r32/esp
19181
19182 (index Type-id *(ebp+8))
19183 $type-name:end:
19184
19185 89/<- %esp 5/r32/ebp
19186 5d/pop-to-ebp
19187 c3/return
19188
19189 index:
19190
19191 55/push-ebp
19192 89/<- %ebp 4/r32/esp
19193
19194 56/push-esi
19195
19196
19197 8b/-> *(ebp+8) 6/r32/esi
19198
19199 8b/-> *(ebp+0xc) 0/r32/eax
19200
19201 8b/-> *(esi+eax<<2+0xc) 0/r32/eax
19202 $index:end:
19203
19204 5e/pop-to-esi
19205
19206 89/<- %esp 5/r32/ebp
19207 5d/pop-to-ebp
19208 c3/return
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219 populate-mu-type-sizes:
19220
19221 55/push-ebp
19222 89/<- %ebp 4/r32/esp
19223 $populate-mu-type-sizes:total-sizes:
19224
19225 (lookup *_Program-types *_Program-types->payload)
19226 {
19227
19228 3d/compare-eax-and 0/imm32/null
19229 74/jump-if-= break/disp8
19230 (populate-mu-type-sizes-in-type %eax *(ebp+8) *(ebp+0xc))
19231
19232 (lookup *(eax+0x10) *(eax+0x14))
19233 eb/jump loop/disp8
19234 }
19235 $populate-mu-type-sizes:offsets:
19236
19237 (lookup *_Program-types *_Program-types->payload)
19238 {
19239
19240 3d/compare-eax-and 0/imm32/null
19241 74/jump-if-= break/disp8
19242 (populate-mu-type-offsets %eax *(ebp+8) *(ebp+0xc))
19243
19244 (lookup *(eax+0x10) *(eax+0x14))
19245 eb/jump loop/disp8
19246 }
19247 $populate-mu-type-sizes:end:
19248
19249 89/<- %esp 5/r32/ebp
19250 5d/pop-to-ebp
19251 c3/return
19252
19253
19254
19255
19256 populate-mu-type-sizes-in-type:
19257
19258 55/push-ebp
19259 89/<- %ebp 4/r32/esp
19260
19261 50/push-eax
19262 51/push-ecx
19263 52/push-edx
19264 56/push-esi
19265 57/push-edi
19266
19267 8b/-> *(ebp+8) 6/r32/esi
19268
19269 81 7/subop/compare *(esi+0xc) 0/imm32
19270 0f 8d/jump-if->= $populate-mu-type-sizes-in-type:end/disp32
19271
19272 81 7/subop/compare *(esi+0xc) -1/imm32/being-computed
19273 0f 84/jump-if-= $populate-mu-type-sizes-in-type:abort/disp32
19274
19275 c7 0/subop/copy *(esi+0xc) -1/imm32/being-computed
19276
19277 bf/copy-to-edi 0/imm32
19278
19279
19280 (lookup *(esi+4) *(esi+8))
19281 89/<- %ecx 0/r32/eax
19282
19283 8b/-> *ecx 2/r32/edx
19284
19285 8d/copy-address *(ecx+0xc) 1/r32/ecx
19286
19287 8d/copy-address *(ecx+edx) 2/r32/edx
19288 {
19289 $populate-mu-type-sizes-in-type:loop:
19290
19291 39/compare %ecx 2/r32/edx
19292 73/jump-if-addr>= break/disp8
19293
19294 (lookup *(ecx+8) *(ecx+0xc))
19295
19296 81 7/subop/compare *eax 0/imm32
19297 74/jump-if-= $populate-mu-type-sizes-in-type:end/disp8
19298
19299 (lookup *eax *(eax+4))
19300 (compute-size-of-var %eax *(ebp+0xc) *(ebp+0x10))
19301
19302 01/add-to %edi 0/r32/eax
19303
19304 81 0/subop/add %ecx 0x10/imm32
19305
19306 eb/jump loop/disp8
19307 }
19308
19309 89/<- *(esi+0xc) 7/r32/edi
19310 $populate-mu-type-sizes-in-type:end:
19311
19312 5f/pop-to-edi
19313 5e/pop-to-esi
19314 5a/pop-to-edx
19315 59/pop-to-ecx
19316 58/pop-to-eax
19317
19318 89/<- %esp 5/r32/ebp
19319 5d/pop-to-ebp
19320 c3/return
19321
19322 $populate-mu-type-sizes-in-type:abort:
19323 (write-buffered *(ebp+0xc) "cycle in type definitions\n")
19324 (flush *(ebp+0xc))
19325 (stop *(ebp+0x10) 1)
19326
19327
19328
19329
19330 compute-size-of-var:
19331
19332 55/push-ebp
19333 89/<- %ebp 4/r32/esp
19334
19335 51/push-ecx
19336
19337 8b/-> *(ebp+8) 1/r32/ecx
19338 (lookup *(ecx+8) *(ecx+0xc))
19339 89/<- %ecx 0/r32/eax
19340
19341 {
19342 81 7/subop/compare *ecx 0/imm32/false
19343 75/jump-if-!= break/disp8
19344 (lookup *(ecx+4) *(ecx+8))
19345 89/<- %ecx 0/r32/eax
19346 }
19347
19348 (compute-size-of-type-id *(ecx+4) *(ebp+0xc) *(ebp+0x10))
19349 $compute-size-of-var:end:
19350
19351 59/pop-to-ecx
19352
19353 89/<- %esp 5/r32/ebp
19354 5d/pop-to-ebp
19355 c3/return
19356
19357 compute-size-of-type-id:
19358
19359 55/push-ebp
19360 89/<- %ebp 4/r32/esp
19361
19362 51/push-ecx
19363
19364 68/push 0/imm32
19365 68/push 0/imm32
19366 89/<- %ecx 4/r32/esp
19367
19368 8b/-> *(ebp+8) 0/r32/eax
19369
19370 3d/compare-eax-and 0/imm32/literal
19371 0f 84/jump-if-= $compute-size-of-type-id:end/disp32
19372
19373 3d/compare-eax-and 8/imm32/byte
19374 {
19375 75/jump-if-!= break/disp8
19376 b8/copy-to-eax 4/imm32
19377 eb/jump $compute-size-of-type-id:end/disp8
19378 }
19379
19380 3d/compare-eax-and 4/imm32/handle
19381 {
19382 75/jump-if-!= break/disp8
19383 b8/copy-to-eax 8/imm32
19384 eb/jump $compute-size-of-type-id:end/disp8
19385 }
19386
19387 3d/compare-eax-and 0xc/imm32/slice
19388 {
19389 75/jump-if-!= break/disp8
19390 b8/copy-to-eax 8/imm32
19391 eb/jump $compute-size-of-type-id:end/disp8
19392 }
19393
19394
19395 (find-typeinfo %eax %ecx)
19396 {
19397 81 7/subop/compare *ecx 0/imm32
19398 74/jump-if-= break/disp8
19399 $compute-size-of-type-id:user-defined:
19400 (lookup *ecx *(ecx+4))
19401 (populate-mu-type-sizes-in-type %eax *(ebp+0xc) *(ebp+0x10))
19402 8b/-> *(eax+0xc) 0/r32/eax
19403 eb/jump $compute-size-of-type-id:end/disp8
19404 }
19405
19406 b8/copy-to-eax 4/imm32
19407 $compute-size-of-type-id:end:
19408
19409 81 0/subop/add %esp 8/imm32
19410
19411 59/pop-to-ecx
19412
19413 89/<- %esp 5/r32/ebp
19414 5d/pop-to-ebp
19415 c3/return
19416
19417
19418
19419
19420 populate-mu-type-offsets:
19421
19422 55/push-ebp
19423 89/<- %ebp 4/r32/esp
19424
19425 50/push-eax
19426 51/push-ecx
19427 52/push-edx
19428 53/push-ebx
19429 56/push-esi
19430 57/push-edi
19431
19432
19433 bf/copy-to-edi 0/imm32
19434
19435 8b/-> *(ebp+8) 1/r32/ecx
19436 (lookup *(ecx+4) *(ecx+8))
19437 89/<- %ecx 0/r32/eax
19438
19439 8b/-> *ecx 2/r32/edx
19440 c1 5/subop/shift-right-logical %edx 4/imm8
19441
19442 bb/copy-to-ebx 0/imm32
19443 {
19444 $populate-mu-type-offsets:loop:
19445 39/compare %ebx 2/r32/edx
19446 0f 8d/jump-if->= break/disp32
19447
19448
19449
19450
19451
19452
19453
19454 (locate-typeinfo-entry-with-index %ecx %ebx *(ebp+0xc) *(ebp+0x10))
19455 89/<- %esi 0/r32/eax
19456
19457 81 7/subop/compare %esi 0/imm32
19458 74/jump-if-= $populate-mu-type-offsets:end/disp8
19459
19460 81 7/subop/compare *esi 0/imm32
19461 74/jump-if-= $populate-mu-type-offsets:end/disp8
19462
19463
19464 (lookup *(esi+0xc) *(esi+0x10))
19465 89/<- *(eax+0x14) 7/r32/edi
19466
19467 (lookup *esi *(esi+4))
19468 (size-of %eax)
19469 01/add-to %edi 0/r32/eax
19470
19471 43/increment-ebx
19472 e9/jump loop/disp32
19473 }
19474 $populate-mu-type-offsets:end:
19475
19476 5f/pop-to-edi
19477 5e/pop-to-esi
19478 5b/pop-to-ebx
19479 5a/pop-to-edx
19480 59/pop-to-ecx
19481 58/pop-to-eax
19482
19483 89/<- %esp 5/r32/ebp
19484 5d/pop-to-ebp
19485 c3/return
19486
19487 locate-typeinfo-entry-with-index:
19488
19489 55/push-ebp
19490 89/<- %ebp 4/r32/esp
19491
19492 51/push-ecx
19493 52/push-edx
19494 53/push-ebx
19495 56/push-esi
19496 57/push-edi
19497
19498 8b/-> *(ebp+8) 6/r32/esi
19499
19500 8d/copy-address *(esi+0xc) 1/r32/ecx
19501
19502 8b/-> *esi 2/r32/edx
19503 8d/copy-address *(ecx+edx) 2/r32/edx
19504 {
19505 $locate-typeinfo-entry-with-index:loop:
19506 39/compare %ecx 2/r32/edx
19507 73/jump-if-addr>= break/disp8
19508
19509 (lookup *(ecx+8) *(ecx+0xc))
19510
19511 8b/-> *(eax+8) 3/r32/ebx
19512
19513
19514
19515
19516
19517
19518 39/compare *(ebp+0xc) 3/r32/ebx
19519 74/jump-if-= $locate-typeinfo-entry-with-index:end/disp8
19520
19521 81 0/subop/add %ecx 0x10/imm32
19522
19523 eb/jump loop/disp8
19524 }
19525
19526 b8/copy-to-eax 0/imm32
19527 $locate-typeinfo-entry-with-index:end:
19528
19529
19530
19531
19532
19533 5f/pop-to-edi
19534 5e/pop-to-esi
19535 5b/pop-to-ebx
19536 5a/pop-to-edx
19537 59/pop-to-ecx
19538
19539 89/<- %esp 5/r32/ebp
19540 5d/pop-to-ebp
19541 c3/return
19542
19543 dump-typeinfos:
19544
19545 55/push-ebp
19546 89/<- %ebp 4/r32/esp
19547
19548 50/push-eax
19549
19550 (write-buffered Stderr *(ebp+8))
19551 (flush Stderr)
19552
19553 (lookup *_Program-types *_Program-types->payload)
19554 {
19555
19556 3d/compare-eax-and 0/imm32
19557 74/jump-if-= break/disp8
19558 (write-buffered Stderr "---\n")
19559 (flush Stderr)
19560 (dump-typeinfo %eax)
19561
19562 (lookup *(eax+0x10) *(eax+0x14))
19563 eb/jump loop/disp8
19564 }
19565 $dump-typeinfos:end:
19566
19567 58/pop-to-eax
19568
19569 89/<- %esp 5/r32/ebp
19570 5d/pop-to-ebp
19571 c3/return
19572
19573 dump-typeinfo:
19574
19575 55/push-ebp
19576 89/<- %ebp 4/r32/esp
19577
19578 50/push-eax
19579 51/push-ecx
19580 52/push-edx
19581 53/push-ebx
19582 56/push-esi
19583 57/push-edi
19584
19585 8b/-> *(ebp+8) 6/r32/esi
19586
19587 (lookup *(esi+4) *(esi+8))
19588 89/<- %ecx 0/r32/eax
19589 (write-buffered Stderr "id:")
19590 (write-int32-hex-buffered Stderr *esi)
19591 (write-buffered Stderr "\n")
19592 (write-buffered Stderr "fields @ ")
19593 (write-int32-hex-buffered Stderr %ecx)
19594 (write-buffered Stderr Newline)
19595 (flush Stderr)
19596 (write-buffered Stderr " write: ")
19597 (write-int32-hex-buffered Stderr *ecx)
19598 (write-buffered Stderr Newline)
19599 (flush Stderr)
19600 (write-buffered Stderr " read: ")
19601 (write-int32-hex-buffered Stderr *(ecx+4))
19602 (write-buffered Stderr Newline)
19603 (flush Stderr)
19604 (write-buffered Stderr " size: ")
19605 (write-int32-hex-buffered Stderr *(ecx+8))
19606 (write-buffered Stderr Newline)
19607 (flush Stderr)
19608
19609 8b/-> *ecx 2/r32/edx
19610
19611 8d/copy-address *(ecx+0xc) 1/r32/ecx
19612
19613 8d/copy-address *(ecx+edx) 2/r32/edx
19614 {
19615 $dump-typeinfo:loop:
19616
19617 39/compare %ecx 2/r32/edx
19618 0f 83/jump-if-addr>= break/disp32
19619 (write-buffered Stderr " row:\n")
19620 (write-buffered Stderr " key: ")
19621 (write-int32-hex-buffered Stderr *ecx)
19622 (write-buffered Stderr ",")
19623 (write-int32-hex-buffered Stderr *(ecx+4))
19624 (write-buffered Stderr " = '")
19625 (lookup *ecx *(ecx+4))
19626 (write-buffered Stderr %eax)
19627 (write-buffered Stderr "' @ ")
19628 (write-int32-hex-buffered Stderr %eax)
19629 (write-buffered Stderr Newline)
19630 (flush Stderr)
19631 (write-buffered Stderr " value: ")
19632 (write-int32-hex-buffered Stderr *(ecx+8))
19633 (write-buffered Stderr ",")
19634 (write-int32-hex-buffered Stderr *(ecx+0xc))
19635 (write-buffered Stderr " = typeinfo-entry@")
19636 (lookup *(ecx+8) *(ecx+0xc))
19637 (write-int32-hex-buffered Stderr %eax)
19638 (write-buffered Stderr Newline)
19639 (flush Stderr)
19640 (write-buffered Stderr " input var@")
19641 (dump-var 5 %eax)
19642 (lookup *(ecx+8) *(ecx+0xc))
19643 (write-buffered Stderr " index: ")
19644 (write-int32-hex-buffered Stderr *(eax+8))
19645 (write-buffered Stderr Newline)
19646 (flush Stderr)
19647 (write-buffered Stderr " output var@")
19648 8d/copy-address *(eax+0xc) 0/r32/eax
19649 (dump-var 5 %eax)
19650 (flush Stderr)
19651
19652 81 0/subop/add %ecx 0x10/imm32
19653
19654 e9/jump loop/disp32
19655 }
19656 $dump-typeinfo:end:
19657
19658 5f/pop-to-edi
19659 5e/pop-to-esi
19660 5b/pop-to-ebx
19661 5a/pop-to-edx
19662 59/pop-to-ecx
19663 58/pop-to-eax
19664
19665 89/<- %esp 5/r32/ebp
19666 5d/pop-to-ebp
19667 c3/return
19668
19669 dump-var:
19670
19671 55/push-ebp
19672 89/<- %ebp 4/r32/esp
19673
19674 50/push-eax
19675 53/push-ebx
19676
19677 8b/-> *(ebp+0xc) 0/r32/eax
19678
19679 (write-int32-hex-buffered Stderr *eax)
19680 (write-buffered Stderr ",")
19681 (write-int32-hex-buffered Stderr *(eax+4))
19682 (write-buffered Stderr "->")
19683 (lookup *eax *(eax+4))
19684 (write-int32-hex-buffered Stderr %eax)
19685 (write-buffered Stderr Newline)
19686 (flush Stderr)
19687 {
19688 3d/compare-eax-and 0/imm32
19689 0f 84/jump-if-= break/disp32
19690 (emit-indent Stderr *(ebp+8))
19691 (write-buffered Stderr "name: ")
19692 89/<- %ebx 0/r32/eax
19693 (write-int32-hex-buffered Stderr *ebx)
19694 (write-buffered Stderr ",")
19695 (write-int32-hex-buffered Stderr *(ebx+4))
19696 (write-buffered Stderr "->")
19697 (lookup *ebx *(ebx+4))
19698 (write-int32-hex-buffered Stderr %eax)
19699 {
19700 3d/compare-eax-and 0/imm32
19701 74/jump-if-= break/disp8
19702 (write-buffered Stderr Space)
19703 (write-buffered Stderr %eax)
19704 }
19705 (write-buffered Stderr Newline)
19706 (flush Stderr)
19707 (emit-indent Stderr *(ebp+8))
19708 (write-buffered Stderr "block depth: ")
19709 (write-int32-hex-buffered Stderr *(ebx+0x10))
19710 (write-buffered Stderr Newline)
19711 (flush Stderr)
19712 (emit-indent Stderr *(ebp+8))
19713 (write-buffered Stderr "stack offset: ")
19714 (write-int32-hex-buffered Stderr *(ebx+0x14))
19715 (write-buffered Stderr Newline)
19716 (flush Stderr)
19717 (emit-indent Stderr *(ebp+8))
19718 (write-buffered Stderr "reg: ")
19719 (write-int32-hex-buffered Stderr *(ebx+0x18))
19720 (write-buffered Stderr ",")
19721 (write-int32-hex-buffered Stderr *(ebx+0x1c))
19722 (write-buffered Stderr "->")
19723 (flush Stderr)
19724 (lookup *(ebx+0x18) *(ebx+0x1c))
19725 (write-int32-hex-buffered Stderr %eax)
19726 {
19727 3d/compare-eax-and 0/imm32
19728 74/jump-if-= break/disp8
19729 (write-buffered Stderr Space)
19730 (write-buffered Stderr %eax)
19731 }
19732 (write-buffered Stderr Newline)
19733 (flush Stderr)
19734 }
19735 $dump-var:end:
19736
19737 5b/pop-to-ebx
19738 58/pop-to-eax
19739
19740 89/<- %esp 5/r32/ebp
19741 5d/pop-to-ebp
19742 c3/return
19743
19744
19745
19746
19747
19748 check-mu-types:
19749
19750 55/push-ebp
19751 89/<- %ebp 4/r32/esp
19752
19753 50/push-eax
19754
19755 (lookup *_Program-functions *_Program-functions->payload)
19756 {
19757 $check-mu-types:loop:
19758
19759 3d/compare-eax-and 0/imm32
19760 0f 84/jump-if-= break/disp32
19761 +-- 8 lines: #? # dump curr->name ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
19769 (check-mu-function %eax *(ebp+8) *(ebp+0xc))
19770
19771 (lookup *(eax+0x20) *(eax+0x24))
19772 e9/jump loop/disp32
19773 }
19774 $check-mu-types:end:
19775
19776 58/pop-to-eax
19777
19778 89/<- %esp 5/r32/ebp
19779 5d/pop-to-ebp
19780 c3/return
19781
19782 check-mu-function:
19783
19784 55/push-ebp
19785 89/<- %ebp 4/r32/esp
19786
19787 50/push-eax
19788 56/push-esi
19789
19790 8b/-> *(ebp+8) 6/r32/esi
19791
19792 (lookup *(esi+0x10) *(esi+0x14))
19793 (check-all-unique-registers %eax %esi *(ebp+0xc) *(ebp+0x10))
19794
19795 (lookup *(esi+0x18) *(esi+0x1c))
19796 (check-mu-block %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10))
19797
19798 81 7/subop/compare *(esi+0x10) 0/imm32
19799 74/jump-if-= $check-mu-function:end/disp8
19800
19801 (check-final-stmt-is-return %eax %esi *(ebp+0xc) *(ebp+0x10))
19802 (check-no-breaks %eax %esi *(ebp+0xc) *(ebp+0x10))
19803 $check-mu-function:end:
19804
19805 5e/pop-to-esi
19806 58/pop-to-eax
19807
19808 89/<- %esp 5/r32/ebp
19809 5d/pop-to-ebp
19810 c3/return
19811
19812 check-mu-block:
19813
19814 55/push-ebp
19815 89/<- %ebp 4/r32/esp
19816
19817 50/push-eax
19818
19819 8b/-> *(ebp+8) 0/r32/eax
19820
19821 (lookup *(eax+4) *(eax+8))
19822
19823 {
19824 $check-mu-block:check-empty:
19825 3d/compare-eax-and 0/imm32
19826 0f 84/jump-if-= break/disp32
19827
19828 (check-mu-stmt-list %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19829 }
19830 $check-mu-block:end:
19831
19832 58/pop-to-eax
19833
19834 89/<- %esp 5/r32/ebp
19835 5d/pop-to-ebp
19836 c3/return
19837
19838 check-mu-stmt-list:
19839
19840 55/push-ebp
19841 89/<- %ebp 4/r32/esp
19842
19843 50/push-eax
19844 56/push-esi
19845
19846 8b/-> *(ebp+8) 6/r32/esi
19847 {
19848 $check-mu-stmt-list:loop:
19849 81 7/subop/compare %esi 0/imm32
19850 0f 84/jump-if-= break/disp32
19851
19852 (lookup *esi *(esi+4))
19853 {
19854 $check-mu-stmt-list:check-for-block:
19855 81 7/subop/compare *eax 0/imm32/block
19856 75/jump-if-!= break/disp8
19857 $check-mu-stmt-list:block:
19858 (check-mu-block %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19859 eb/jump $check-mu-stmt-list:continue/disp8
19860 }
19861 {
19862 $check-mu-stmt-list:check-for-stmt1:
19863 81 7/subop/compare *eax 1/imm32/stmt1
19864 0f 85/jump-if-!= break/disp32
19865 $check-mu-stmt-list:stmt1:
19866 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19867 eb/jump $check-mu-stmt-list:continue/disp8
19868 }
19869 {
19870 $check-mu-stmt-list:check-for-reg-var-def:
19871 81 7/subop/compare *eax 3/imm32/reg-var-def
19872 0f 85/jump-if-!= break/disp32
19873 $check-mu-stmt-list:reg-var-def:
19874 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19875 eb/jump $check-mu-stmt-list:continue/disp8
19876 }
19877 $check-mu-stmt-list:continue:
19878
19879 (lookup *(esi+8) *(esi+0xc))
19880 89/<- %esi 0/r32/eax
19881 e9/jump loop/disp32
19882 }
19883 $check-mu-stmt-list:end:
19884
19885 5e/pop-to-esi
19886 58/pop-to-eax
19887
19888 89/<- %esp 5/r32/ebp
19889 5d/pop-to-ebp
19890 c3/return
19891
19892 check-mu-stmt:
19893
19894 55/push-ebp
19895 89/<- %ebp 4/r32/esp
19896
19897 50/push-eax
19898
19899 (has-primitive-name? *(ebp+8))
19900 3d/compare-eax-and 0/imm32/false
19901 {
19902 74/jump-if-= break/disp8
19903 (check-mu-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19904 e9/jump $check-mu-stmt:end/disp32
19905 }
19906
19907
19908 (lookup *_Program-functions *_Program-functions->payload)
19909 (find-matching-function %eax *(ebp+8))
19910 3d/compare-eax-and 0/imm32
19911 {
19912 74/jump-if-= break/disp8
19913 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19914 eb/jump $check-mu-stmt:end/disp8
19915 }
19916
19917 (lookup *_Program-signatures *_Program-signatures->payload)
19918 (find-matching-function %eax *(ebp+8))
19919 3d/compare-eax-and 0/imm32
19920 {
19921 74/jump-if-= break/disp8
19922 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
19923 eb/jump $check-mu-stmt:end/disp8
19924 }
19925
19926 e9/jump $check-mu-stmt:unknown-call/disp32
19927 $check-mu-stmt:end:
19928
19929 58/pop-to-eax
19930
19931 89/<- %esp 5/r32/ebp
19932 5d/pop-to-ebp
19933 c3/return
19934
19935 $check-mu-stmt:unknown-call:
19936 (write-buffered *(ebp+0x10) "unknown function '")
19937 8b/-> *(ebp+8) 0/r32/eax
19938 (lookup *(eax+4) *(eax+8))
19939 (write-buffered *(ebp+0x10) %eax)
19940 (write-buffered *(ebp+0x10) "'\n")
19941 (flush *(ebp+0x10))
19942 (stop *(ebp+0x14) 1)
19943
19944
19945 has-primitive-name?:
19946
19947 55/push-ebp
19948 89/<- %ebp 4/r32/esp
19949
19950 51/push-ecx
19951 56/push-esi
19952
19953 8b/-> *(ebp+8) 6/r32/esi
19954 (lookup *(esi+4) *(esi+8))
19955 89/<- %esi 0/r32/eax
19956
19957 (string-equal? %esi "return")
19958 3d/compare-eax-and 0/imm32/false
19959 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19960
19961 (string-equal? %esi "get")
19962 3d/compare-eax-and 0/imm32/false
19963 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19964
19965 (string-equal? %esi "index")
19966 3d/compare-eax-and 0/imm32/false
19967 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19968
19969 (string-equal? %esi "length")
19970 3d/compare-eax-and 0/imm32/false
19971 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19972
19973 (string-equal? %esi "compute-offset")
19974 3d/compare-eax-and 0/imm32/false
19975 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19976
19977 (string-equal? %esi "copy-object")
19978 3d/compare-eax-and 0/imm32/false
19979 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19980
19981 (string-equal? %esi "clear-object")
19982 3d/compare-eax-and 0/imm32/false
19983 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19984
19985 (string-equal? %esi "allocate")
19986 3d/compare-eax-and 0/imm32/false
19987 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19988
19989 (string-equal? %esi "populate")
19990 3d/compare-eax-and 0/imm32/false
19991 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19992
19993 (string-equal? %esi "populate-stream")
19994 3d/compare-eax-and 0/imm32/false
19995 0f 85/jump-if-!= $has-primitive-name?:end/disp32
19996
19997 (string-equal? %esi "read-from-stream")
19998 3d/compare-eax-and 0/imm32/false
19999 0f 85/jump-if-!= $has-primitive-name?:end/disp32
20000
20001 (string-equal? %esi "write-to-stream")
20002 3d/compare-eax-and 0/imm32/false
20003 0f 85/jump-if-!= $has-primitive-name?:end/disp32
20004
20005 b9/copy-to-ecx Primitives/imm32
20006 {
20007 $has-primitive-name?:loop:
20008
20009 81 7/subop/compare %ecx 0/imm32
20010 74/jump-if-= break/disp8
20011
20012 (lookup *ecx *(ecx+4))
20013
20014
20015
20016 (string-equal? %esi %eax)
20017 3d/compare-eax-and 0/imm32/false
20018 75/jump-if-!= $has-primitive-name?:end/disp8
20019 $has-primitive-name?:next-primitive:
20020
20021 (lookup *(ecx+0x3c) *(ecx+0x40))
20022 89/<- %ecx 0/r32/eax
20023
20024 e9/jump loop/disp32
20025 }
20026
20027 b8/copy-to-eax 0/imm32
20028 $has-primitive-name?:end:
20029
20030 5e/pop-to-esi
20031 59/pop-to-ecx
20032
20033 89/<- %esp 5/r32/ebp
20034 5d/pop-to-ebp
20035 c3/return
20036
20037 check-mu-primitive:
20038
20039 55/push-ebp
20040 89/<- %ebp 4/r32/esp
20041
20042 50/push-eax
20043 51/push-ecx
20044
20045 8b/-> *(ebp+8) 0/r32/eax
20046 (lookup *(eax+4) *(eax+8))
20047 89/<- %ecx 0/r32/eax
20048
20049 {
20050 (string-equal? %ecx "copy")
20051 3d/compare-eax-and 0/imm32/false
20052 74/jump-if-= break/disp8
20053 (check-mu-copy-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20054 e9/jump $check-mu-primitive:end/disp32
20055 }
20056
20057 {
20058 (string-equal? %ecx "copy-to")
20059 3d/compare-eax-and 0/imm32/false
20060 74/jump-if-= break/disp8
20061 (check-mu-copy-to-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20062 e9/jump $check-mu-primitive:end/disp32
20063 }
20064
20065 {
20066 (string-equal? %ecx "compare")
20067 3d/compare-eax-and 0/imm32/false
20068 74/jump-if-= break/disp8
20069 (check-mu-compare-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20070 e9/jump $check-mu-primitive:end/disp32
20071 }
20072
20073 {
20074 (string-equal? %ecx "address")
20075 3d/compare-eax-and 0/imm32/false
20076 74/jump-if-= break/disp8
20077 (check-mu-address-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20078 e9/jump $check-mu-primitive:end/disp32
20079 }
20080
20081 {
20082 (string-equal? %ecx "return")
20083 3d/compare-eax-and 0/imm32/false
20084 74/jump-if-= break/disp8
20085 (check-mu-return-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20086 e9/jump $check-mu-primitive:end/disp32
20087 }
20088
20089 {
20090 (string-equal? %ecx "get")
20091 3d/compare-eax-and 0/imm32/false
20092 74/jump-if-= break/disp8
20093 (check-mu-get-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20094 e9/jump $check-mu-primitive:end/disp32
20095 }
20096
20097 {
20098 (string-equal? %ecx "index")
20099 3d/compare-eax-and 0/imm32/false
20100 74/jump-if-= break/disp8
20101 (check-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20102 e9/jump $check-mu-primitive:end/disp32
20103 }
20104
20105 {
20106 (string-equal? %ecx "length")
20107 3d/compare-eax-and 0/imm32/false
20108 74/jump-if-= break/disp8
20109 (check-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20110 e9/jump $check-mu-primitive:end/disp32
20111 }
20112
20113 {
20114 (string-equal? %ecx "compute-offset")
20115 3d/compare-eax-and 0/imm32/false
20116 74/jump-if-= break/disp8
20117 (check-mu-compute-offset-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20118 e9/jump $check-mu-primitive:end/disp32
20119 }
20120
20121 {
20122 (string-equal? %ecx "copy-object")
20123 3d/compare-eax-and 0/imm32/false
20124 74/jump-if-= break/disp8
20125 (check-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20126 e9/jump $check-mu-primitive:end/disp32
20127 }
20128
20129 {
20130 (string-equal? %ecx "clear-object")
20131 3d/compare-eax-and 0/imm32/false
20132 74/jump-if-= break/disp8
20133 (check-mu-clear-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20134 e9/jump $check-mu-primitive:end/disp32
20135 }
20136
20137 {
20138 (string-equal? %ecx "allocate")
20139 3d/compare-eax-and 0/imm32/false
20140 74/jump-if-= break/disp8
20141 (check-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20142 e9/jump $check-mu-primitive:end/disp32
20143 }
20144
20145 {
20146 (string-equal? %ecx "populate")
20147 3d/compare-eax-and 0/imm32/false
20148 74/jump-if-= break/disp8
20149 (check-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20150 e9/jump $check-mu-primitive:end/disp32
20151 }
20152
20153 {
20154 (string-equal? %ecx "populate-stream")
20155 3d/compare-eax-and 0/imm32/false
20156 74/jump-if-= break/disp8
20157 (check-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20158 e9/jump $check-mu-primitive:end/disp32
20159 }
20160
20161 {
20162 (string-equal? %ecx "read-from-stream")
20163 3d/compare-eax-and 0/imm32/false
20164 74/jump-if-= break/disp8
20165 (check-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20166 e9/jump $check-mu-primitive:end/disp32
20167 }
20168
20169 {
20170 (string-equal? %ecx "write-to-stream")
20171 3d/compare-eax-and 0/imm32/false
20172 74/jump-if-= break/disp8
20173 (check-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20174 e9/jump $check-mu-primitive:end/disp32
20175 }
20176
20177 {
20178 (string-equal? %ecx "convert")
20179 3d/compare-eax-and 0/imm32/false
20180 74/jump-if-= break/disp8
20181 (check-mu-convert-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20182 e9/jump $check-mu-primitive:end/disp32
20183 }
20184
20185 (check-mu-numberlike-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20186 $check-mu-primitive:end:
20187
20188 59/pop-to-ecx
20189 58/pop-to-eax
20190
20191 89/<- %esp 5/r32/ebp
20192 5d/pop-to-ebp
20193 c3/return
20194
20195
20196 check-mu-numberlike-primitive:
20197
20198 55/push-ebp
20199 89/<- %ebp 4/r32/esp
20200
20201 50/push-eax
20202 51/push-ecx
20203 56/push-esi
20204
20205 8b/-> *(ebp+8) 6/r32/esi
20206
20207 b9/copy-to-ecx 2/imm32
20208
20209
20210 (lookup *(esi+0x14) *(esi+0x18))
20211 {
20212 3d/compare-eax-and 0/imm32
20213 74/jump-if-= break/disp8
20214 $check-mu-numberlike-primitive:output:
20215 (check-mu-numberlike-output %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20216 (lookup *(eax+8) *(eax+0xc))
20217 3d/compare-eax-and 0/imm32
20218 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-outputs/disp32
20219
20220
20221 49/decrement-ecx
20222 }
20223
20224 (lookup *(esi+0xc) *(esi+0x10))
20225 {
20226 3d/compare-eax-and 0/imm32
20227 0f 84/jump-if-= $check-mu-numberlike-primitive:end/disp32
20228 $check-mu-numberlike-primitive:first-inout:
20229 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20230
20231 49/decrement-ecx
20232 }
20233
20234 (lookup *(eax+8) *(eax+0xc))
20235 {
20236 3d/compare-eax-and 0/imm32
20237 74/jump-if-= $check-mu-numberlike-primitive:end/disp8
20238 $check-mu-numberlike-primitive:second-inout:
20239
20240 81 7/subop/compare %ecx 0/imm32
20241 0f 84/jump-if-= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
20242 $check-mu-numberlike-primitive:second-inout-permitted:
20243 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20244 }
20245 $check-mu-numberlike-primitive:third-inout:
20246
20247 81 7/subop/compare *(eax+8) 0/imm32
20248 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
20249 $check-mu-numberlike-primitive:end:
20250
20251 5e/pop-to-esi
20252 59/pop-to-ecx
20253 58/pop-to-eax
20254
20255 89/<- %esp 5/r32/ebp
20256 5d/pop-to-ebp
20257 c3/return
20258
20259 $check-mu-numberlike-primitive:error-too-many-inouts:
20260 (write-buffered *(ebp+0x10) "fn ")
20261 8b/-> *(ebp+0xc) 0/r32/eax
20262 (lookup *eax *(eax+4))
20263 (write-buffered *(ebp+0x10) %eax)
20264 (write-buffered *(ebp+0x10) ": stmt ")
20265 (lookup *(esi+4) *(esi+8))
20266 (write-buffered *(ebp+0x10) %eax)
20267 (write-buffered *(ebp+0x10) ": too many inouts; most primitives support at most two arguments, across inouts and outputs\n")
20268 (flush *(ebp+0x10))
20269 (stop *(ebp+0x14) 1)
20270
20271
20272 $check-mu-numberlike-primitive:error-too-many-outputs:
20273 (write-buffered *(ebp+0x10) "fn ")
20274 8b/-> *(ebp+0xc) 0/r32/eax
20275 (lookup *eax *(eax+4))
20276 (write-buffered *(ebp+0x10) %eax)
20277 (write-buffered *(ebp+0x10) ": stmt ")
20278 (lookup *(esi+4) *(esi+8))
20279 (write-buffered *(ebp+0x10) %eax)
20280 (write-buffered *(ebp+0x10) ": too many outputs; most primitives support at most one output\n")
20281 (flush *(ebp+0x10))
20282 (stop *(ebp+0x14) 1)
20283
20284
20285 check-mu-numberlike-arg:
20286
20287 55/push-ebp
20288 89/<- %ebp 4/r32/esp
20289
20290 50/push-eax
20291 56/push-esi
20292
20293 8b/-> *(ebp+8) 0/r32/eax
20294 (lookup *eax *(eax+4))
20295 (lookup *(eax+8) *(eax+0xc))
20296 89/<- %esi 0/r32/eax
20297 $check-mu-numberlike-arg:check-literal:
20298
20299 (is-simple-mu-type? %esi 0)
20300 3d/compare-eax-and 0/imm32/false
20301 0f 85/jump-if-!= $check-mu-numberlike-arg:end/disp32
20302 $check-mu-numberlike-arg:check-addr:
20303
20304 {
20305 (is-mu-addr-type? %esi)
20306 3d/compare-eax-and 0/imm32/false
20307 74/jump-if-= break/disp8
20308 8b/-> *(ebp+8) 0/r32/eax
20309 8b/-> *(eax+0x10) 0/r32/eax
20310 3d/compare-eax-and 0/imm32/false
20311 {
20312 74/jump-if-= break/disp8
20313 (lookup *(esi+0xc) *(esi+0x10))
20314
20315 81 7/subop/compare *(eax+0xc) 0/imm32
20316 {
20317 75/jump-if-!= break/disp8
20318 (lookup *(eax+4) *(eax+8))
20319 }
20320 (is-mu-addr-type? %eax)
20321 3d/compare-eax-and 0/imm32/false
20322 74/jump-if-= $check-mu-numberlike-arg:end/disp8
20323 }
20324 }
20325 $check-mu-numberlike-arg:output-checks:
20326 (check-mu-numberlike-output *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
20327 $check-mu-numberlike-arg:end:
20328
20329 5e/pop-to-esi
20330 58/pop-to-eax
20331
20332 89/<- %esp 5/r32/ebp
20333 5d/pop-to-ebp
20334 c3/return
20335
20336 check-mu-numberlike-output:
20337
20338 55/push-ebp
20339 89/<- %ebp 4/r32/esp
20340
20341 50/push-eax
20342
20343 (is-mu-numberlike-output-var? *(ebp+8))
20344 3d/compare-eax-and 0/imm32/false
20345 0f 84/jump-if-= $check-mu-numberlike-output:fail/disp32
20346 $check-mu-numberlike-output:end:
20347
20348 58/pop-to-eax
20349
20350 89/<- %esp 5/r32/ebp
20351 5d/pop-to-ebp
20352 c3/return
20353
20354 $check-mu-numberlike-output:fail:
20355
20356 (write-buffered *(ebp+0x14) "fn ")
20357 8b/-> *(ebp+0x10) 0/r32/eax
20358 (lookup *eax *(eax+4))
20359 (write-buffered *(ebp+0x14) %eax)
20360 (write-buffered *(ebp+0x14) ": stmt ")
20361 8b/-> *(ebp+0xc) 0/r32/eax
20362 (lookup *(eax+4) *(eax+8))
20363 (write-buffered *(ebp+0x14) %eax)
20364 (write-buffered *(ebp+0x14) ": '")
20365 8b/-> *(ebp+8) 0/r32/eax
20366 (lookup *eax *(eax+4))
20367 (lookup *eax *(eax+4))
20368 (write-buffered *(ebp+0x14) %eax)
20369 (write-buffered *(ebp+0x14) "' must be a non-addr non-offset scalar\n")
20370 (flush *(ebp+0x14))
20371 (stop *(ebp+0x18) 1)
20372
20373
20374 is-mu-numberlike-output-var?:
20375
20376 55/push-ebp
20377 89/<- %ebp 4/r32/esp
20378
20379 8b/-> *(ebp+8) 0/r32/eax
20380 (lookup *eax *(eax+4))
20381 (lookup *(eax+8) *(eax+0xc))
20382 (is-mu-numberlike-output? %eax)
20383 $is-mu-numberlike-output-var?:end:
20384
20385 89/<- %esp 5/r32/ebp
20386 5d/pop-to-ebp
20387 c3/return
20388
20389 is-mu-numberlike-output?:
20390
20391 55/push-ebp
20392 89/<- %ebp 4/r32/esp
20393
20394 56/push-esi
20395
20396 8b/-> *(ebp+8) 6/r32/esi
20397 $is-mu-numberlike-output?:check-int:
20398
20399 (is-simple-mu-type? %esi 1)
20400 3d/compare-eax-and 0/imm32/false
20401 0f 85/jump-if-!= $is-mu-numberlike-output?:return-true/disp32
20402 $is-mu-numberlike-output?:check-float:
20403
20404 (is-simple-mu-type? %esi 0xf)
20405 3d/compare-eax-and 0/imm32/false
20406 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
20407 $is-mu-numberlike-output?:check-boolean:
20408
20409 (is-simple-mu-type? %esi 5)
20410 3d/compare-eax-and 0/imm32/false
20411 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
20412 $is-mu-numberlike-output?:check-byte:
20413
20414 (is-simple-mu-type? %esi 8)
20415 3d/compare-eax-and 0/imm32/false
20416 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
20417 $is-mu-numberlike-output?:check-code-point:
20418
20419 (is-simple-mu-type? %esi 0xd)
20420 3d/compare-eax-and 0/imm32/false
20421 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
20422 $is-mu-numberlike-output?:check-grapheme:
20423
20424 (is-simple-mu-type? %esi 0xe)
20425 3d/compare-eax-and 0/imm32/false
20426 75/jump-if-!= $is-mu-numberlike-output?:return-true/disp8
20427 $is-mu-numberlike-output?:return-false:
20428 b8/copy-to-eax 0/imm32/false
20429 eb/jump $is-mu-numberlike-output?:end/disp8
20430 $is-mu-numberlike-output?:return-true:
20431 b8/copy-to-eax 1/imm32/true
20432 $is-mu-numberlike-output?:end:
20433
20434 5e/pop-to-esi
20435
20436 89/<- %esp 5/r32/ebp
20437 5d/pop-to-ebp
20438 c3/return
20439
20440 check-mu-copy-stmt:
20441
20442 55/push-ebp
20443 89/<- %ebp 4/r32/esp
20444
20445 50/push-eax
20446 51/push-ecx
20447 52/push-edx
20448 56/push-esi
20449 57/push-edi
20450
20451 81 5/subop/subtract %esp 0x60/imm32
20452 68/push 0x60/imm32/size
20453 68/push 0/imm32/read
20454 68/push 0/imm32/write
20455 89/<- %edx 4/r32/esp
20456 $check-mu-copy-stmt:get-output:
20457
20458 8b/-> *(ebp+8) 6/r32/esi
20459
20460 (lookup *(esi+0x14) *(esi+0x18))
20461 89/<- %edi 0/r32/eax
20462
20463 3d/compare-eax-and 0/imm32
20464 0f 84/jump-if-= $check-mu-copy-stmt:error-no-output/disp32
20465
20466 (lookup *(edi+8) *(edi+0xc))
20467 3d/compare-eax-and 0/imm32
20468 0f 85/jump-if-!= $check-mu-copy-stmt:error-too-many-outputs/disp32
20469 $check-mu-copy-stmt:get-inout:
20470
20471 (lookup *(esi+0xc) *(esi+0x10))
20472 89/<- %esi 0/r32/eax
20473
20474 3d/compare-eax-and 0/imm32
20475 0f 84/jump-if-= $check-mu-copy-stmt:error-no-inout/disp32
20476
20477 (lookup *(esi+8) *(esi+0xc))
20478 3d/compare-eax-and 0/imm32
20479 0f 85/jump-if-!= $check-mu-copy-stmt:error-too-many-inouts/disp32
20480 $check-mu-copy-stmt:types:
20481
20482 (lookup *esi *(esi+4))
20483 (lookup *(eax+8) *(eax+0xc))
20484 89/<- %ecx 0/r32/eax
20485
20486 8b/-> *(esi+0x10) 0/r32/eax
20487 3d/compare-eax-and 0/imm32/false
20488 {
20489 74/jump-if-= break/disp8
20490 (lookup *(ecx+0xc) *(ecx+0x10))
20491
20492 81 7/subop/compare *(eax+0xc) 0/imm32
20493 {
20494 75/jump-if-!= break/disp8
20495 (lookup *(eax+4) *(eax+8))
20496 }
20497 89/<- %ecx 0/r32/eax
20498 }
20499
20500 (lookup *edi *(edi+4))
20501 (lookup *(eax+0x18) *(eax+0x1c))
20502 3d/compare-eax-and 0/imm32
20503 0f 84/jump-if-= $check-mu-copy-stmt:error-output-not-in-register/disp32
20504
20505 (lookup *esi *(esi+4))
20506 (size-of %eax)
20507 3d/compare-eax-and 4/imm32
20508 0f 8f/jump-if-> $check-mu-copy-stmt:error-inout-too-large/disp32
20509
20510 (lookup *edi *(edi+4))
20511 (lookup *(eax+8) *(eax+0xc))
20512
20513 (type-match? %eax %ecx %edx)
20514 3d/compare-eax-and 0/imm32
20515 0f 85/jump-if-!= $check-mu-copy-stmt:end/disp32
20516
20517 {
20518 (lookup *edi *(edi+4))
20519 (lookup *(eax+8) *(eax+0xc))
20520 (is-mu-addr-type? %eax)
20521 3d/compare-eax-and 0/imm32/false
20522 74/jump-if-= break/disp8
20523 (lookup *esi *(esi+4))
20524 (lookup *eax *(eax+4))
20525 (string-equal? %eax "0")
20526 3d/compare-eax-and 0/imm32/false
20527 74/jump-if-= break/disp8
20528 e9/jump $check-mu-copy-stmt:end/disp32
20529 }
20530
20531 {
20532 (lookup *edi *(edi+4))
20533 (lookup *(eax+8) *(eax+0xc))
20534 81 7/subop/compare *eax 0/imm32/false
20535 75/jump-if-!= break/disp8
20536 (lookup *(eax+4) *(eax+8))
20537 (is-simple-mu-type? %eax 7)
20538 3d/compare-eax-and 0/imm32/false
20539 74/jump-if-= break/disp8
20540 (lookup *esi *(esi+4))
20541 (lookup *eax *(eax+4))
20542 (string-equal? %eax "0")
20543 3d/compare-eax-and 0/imm32/false
20544 74/jump-if-= break/disp8
20545 eb/jump $check-mu-copy-stmt:end/disp8
20546 }
20547
20548 (check-mu-numberlike-output %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20549 $check-mu-copy-stmt:end:
20550
20551 81 0/subop/add %esp 0x6c/imm32
20552
20553 5f/pop-to-edi
20554 5e/pop-to-esi
20555 5a/pop-to-edx
20556 59/pop-to-ecx
20557 58/pop-to-eax
20558
20559 89/<- %esp 5/r32/ebp
20560 5d/pop-to-ebp
20561 c3/return
20562
20563 $check-mu-copy-stmt:error-no-inout:
20564 (write-buffered *(ebp+0x10) "fn ")
20565 8b/-> *(ebp+0xc) 0/r32/eax
20566 (lookup *eax *(eax+4))
20567 (write-buffered *(ebp+0x10) %eax)
20568 (write-buffered *(ebp+0x10) ": stmt 'copy' expects an inout\n")
20569 (flush *(ebp+0x10))
20570 (stop *(ebp+0x14) 1)
20571
20572
20573 $check-mu-copy-stmt:error-too-many-inouts:
20574 (write-buffered *(ebp+0x10) "fn ")
20575 8b/-> *(ebp+0xc) 0/r32/eax
20576 (lookup *eax *(eax+4))
20577 (write-buffered *(ebp+0x10) %eax)
20578 (write-buffered *(ebp+0x10) ": stmt 'copy' must have just one inout\n")
20579 (flush *(ebp+0x10))
20580 (stop *(ebp+0x14) 1)
20581
20582
20583 $check-mu-copy-stmt:error-no-output:
20584 (write-buffered *(ebp+0x10) "fn ")
20585 8b/-> *(ebp+0xc) 0/r32/eax
20586 (lookup *eax *(eax+4))
20587 (write-buffered *(ebp+0x10) %eax)
20588 (write-buffered *(ebp+0x10) ": stmt 'copy' expects an output\n")
20589 (flush *(ebp+0x10))
20590 (stop *(ebp+0x14) 1)
20591
20592
20593 $check-mu-copy-stmt:error-output-not-in-register:
20594 (write-buffered *(ebp+0x10) "fn ")
20595 8b/-> *(ebp+0xc) 0/r32/eax
20596 (lookup *eax *(eax+4))
20597 (write-buffered *(ebp+0x10) %eax)
20598 (write-buffered *(ebp+0x10) ": stmt copy: output '")
20599 (lookup *edi *(edi+4))
20600 (lookup *eax *(eax+4))
20601 (write-buffered *(ebp+0x10) %eax)
20602 (write-buffered *(ebp+0x10) "' not in a register\n")
20603 (flush *(ebp+0x10))
20604 (stop *(ebp+0x14) 1)
20605
20606
20607 $check-mu-copy-stmt:error-too-many-outputs:
20608 (write-buffered *(ebp+0x10) "fn ")
20609 8b/-> *(ebp+0xc) 0/r32/eax
20610 (lookup *eax *(eax+4))
20611 (write-buffered *(ebp+0x10) %eax)
20612 (write-buffered *(ebp+0x10) ": stmt 'copy' must have just one output\n")
20613 (flush *(ebp+0x10))
20614 (stop *(ebp+0x14) 1)
20615
20616
20617 $check-mu-copy-stmt:error-inout-too-large:
20618 (write-buffered *(ebp+0x10) "fn ")
20619 8b/-> *(ebp+0xc) 0/r32/eax
20620 (lookup *eax *(eax+4))
20621 (write-buffered *(ebp+0x10) %eax)
20622 (write-buffered *(ebp+0x10) ": stmt copy: '")
20623 (lookup *esi *(esi+4))
20624 (lookup *eax *(eax+4))
20625 (write-buffered *(ebp+0x10) %eax)
20626 (write-buffered *(ebp+0x10) "' is too large to fit in a register\n")
20627 (flush *(ebp+0x10))
20628 (stop *(ebp+0x14) 1)
20629
20630
20631 check-mu-copy-to-stmt:
20632
20633 55/push-ebp
20634 89/<- %ebp 4/r32/esp
20635
20636 50/push-eax
20637 51/push-ecx
20638 52/push-edx
20639 53/push-ebx
20640 56/push-esi
20641 57/push-edi
20642
20643 81 5/subop/subtract %esp 0x60/imm32
20644 68/push 0x60/imm32/size
20645 68/push 0/imm32/read
20646 68/push 0/imm32/write
20647 89/<- %edx 4/r32/esp
20648
20649 8b/-> *(ebp+8) 6/r32/esi
20650 $check-mu-copy-to-stmt:check-for-output:
20651
20652 (lookup *(esi+0x14) *(esi+0x18))
20653 3d/compare-eax-and 0/imm32
20654 0f 85/jump-if-!= $check-mu-copy-to-stmt:error-too-many-outputs/disp32
20655 $check-mu-copy-to-stmt:get-dest:
20656
20657 (lookup *(esi+0xc) *(esi+0x10))
20658 89/<- %edi 0/r32/eax
20659
20660 3d/compare-eax-and 0/imm32
20661 0f 84/jump-if-= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
20662 $check-mu-copy-to-stmt:get-src:
20663
20664 (lookup *(edi+8) *(edi+0xc))
20665 89/<- %esi 0/r32/eax
20666
20667 3d/compare-eax-and 0/imm32
20668 0f 84/jump-if-= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
20669
20670 (lookup *(esi+8) *(esi+0xc))
20671 3d/compare-eax-and 0/imm32
20672 0f 85/jump-if-!= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
20673 $check-mu-copy-to-stmt:types:
20674
20675 (lookup *esi *(esi+4))
20676 (lookup *(eax+8) *(eax+0xc))
20677 89/<- %ecx 0/r32/eax
20678
20679
20680 {
20681 (lookup *esi *(esi+4))
20682 (lookup *(eax+0x8) *(eax+0xc))
20683 (is-simple-mu-type? %eax 0)
20684 3d/compare-eax-and 0/imm32
20685 75/jump-if-!= break/disp8
20686 (lookup *esi *(esi+4))
20687 (lookup *(eax+0x18) *(eax+0x1c))
20688 3d/compare-eax-and 0/imm32
20689 75/jump-if-!= break/disp8
20690 e9/jump $check-mu-copy-to-stmt:error-src-not-literal-or-in-register/disp32
20691 }
20692
20693 (lookup *esi *(esi+4))
20694 (size-of %eax)
20695 3d/compare-eax-and 4/imm32
20696 0f 8f/jump-if-> $check-mu-copy-to-stmt:error-src-too-large/disp32
20697
20698 (lookup *edi *(edi+4))
20699 (lookup *(eax+8) *(eax+0xc))
20700 89/<- %ebx 0/r32/eax
20701
20702 8b/-> *(edi+0x10) 0/r32/eax
20703 3d/compare-eax-and 0/imm32/false
20704 {
20705 74/jump-if-= break/disp8
20706 (lookup *(ebx+0xc) *(ebx+0x10))
20707
20708 81 7/subop/compare *(eax+0xc) 0/imm32
20709 {
20710 75/jump-if-!= break/disp8
20711 (lookup *(eax+4) *(eax+8))
20712 }
20713 89/<- %ebx 0/r32/eax
20714 }
20715
20716 (type-match? %ebx %ecx %edx)
20717 3d/compare-eax-and 0/imm32
20718 0f 85/jump-if-!= $check-mu-copy-to-stmt:end/disp32
20719
20720 {
20721 (lookup *edi *(edi+4))
20722 (lookup *(eax+8) *(eax+0xc))
20723 (is-mu-addr-type? %eax)
20724 3d/compare-eax-and 0/imm32/false
20725 74/jump-if-= break/disp8
20726 (lookup *esi *(esi+4))
20727 (lookup *eax *(eax+4))
20728 (string-equal? %eax "0")
20729 3d/compare-eax-and 0/imm32/false
20730 74/jump-if-= break/disp8
20731 eb/jump $check-mu-copy-to-stmt:end/disp8
20732 }
20733
20734 (check-mu-numberlike-arg %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20735 $check-mu-copy-to-stmt:end:
20736
20737 81 0/subop/add %esp 0x6c/imm32
20738
20739 5f/pop-to-edi
20740 5e/pop-to-esi
20741 5b/pop-to-ebx
20742 5a/pop-to-edx
20743 59/pop-to-ecx
20744 58/pop-to-eax
20745
20746 89/<- %esp 5/r32/ebp
20747 5d/pop-to-ebp
20748 c3/return
20749
20750 $check-mu-copy-to-stmt:error-incorrect-inouts:
20751 (write-buffered *(ebp+0x10) "fn ")
20752 8b/-> *(ebp+0xc) 0/r32/eax
20753 (lookup *eax *(eax+4))
20754 (write-buffered *(ebp+0x10) %eax)
20755 (write-buffered *(ebp+0x10) ": stmt 'copy-to' must have two inouts\n")
20756 (flush *(ebp+0x10))
20757 (stop *(ebp+0x14) 1)
20758
20759
20760 $check-mu-copy-to-stmt:error-too-many-outputs:
20761 (write-buffered *(ebp+0x10) "fn ")
20762 8b/-> *(ebp+0xc) 0/r32/eax
20763 (lookup *eax *(eax+4))
20764 (write-buffered *(ebp+0x10) %eax)
20765 (write-buffered *(ebp+0x10) ": stmt 'copy-to' must not have any outputs\n")
20766 (flush *(ebp+0x10))
20767 (stop *(ebp+0x14) 1)
20768
20769
20770 $check-mu-copy-to-stmt:error-src-not-literal-or-in-register:
20771 (write-buffered *(ebp+0x10) "fn ")
20772 8b/-> *(ebp+0xc) 0/r32/eax
20773 (lookup *eax *(eax+4))
20774 (write-buffered *(ebp+0x10) %eax)
20775 (write-buffered *(ebp+0x10) ": stmt copy-to: source (second inout) is in memory\n")
20776 (flush *(ebp+0x10))
20777 (stop *(ebp+0x14) 1)
20778
20779
20780 $check-mu-copy-to-stmt:error-src-too-large:
20781 (write-buffered *(ebp+0x10) "fn ")
20782 8b/-> *(ebp+0xc) 0/r32/eax
20783 (lookup *eax *(eax+4))
20784 (write-buffered *(ebp+0x10) %eax)
20785 (write-buffered *(ebp+0x10) ": stmt copy-to: '")
20786 (lookup *esi *(esi+4))
20787 (lookup *eax *(eax+4))
20788 (write-buffered *(ebp+0x10) %eax)
20789 (write-buffered *(ebp+0x10) "' is too large to copy\n")
20790 (flush *(ebp+0x10))
20791 (stop *(ebp+0x14) 1)
20792
20793
20794 check-mu-compare-stmt:
20795
20796 55/push-ebp
20797 89/<- %ebp 4/r32/esp
20798
20799 50/push-eax
20800 51/push-ecx
20801 52/push-edx
20802 53/push-ebx
20803 56/push-esi
20804 57/push-edi
20805
20806 81 5/subop/subtract %esp 0x60/imm32
20807 68/push 0x60/imm32/size
20808 68/push 0/imm32/read
20809 68/push 0/imm32/write
20810 89/<- %edx 4/r32/esp
20811
20812 8b/-> *(ebp+8) 6/r32/esi
20813 $check-mu-compare-stmt:check-for-output:
20814
20815 (lookup *(esi+0x14) *(esi+0x18))
20816 3d/compare-eax-and 0/imm32
20817 0f 85/jump-if-!= $check-mu-compare-stmt:error-too-many-outputs/disp32
20818 $check-mu-compare-stmt:get-left:
20819
20820 (lookup *(esi+0xc) *(esi+0x10))
20821 89/<- %edi 0/r32/eax
20822
20823 3d/compare-eax-and 0/imm32
20824 0f 84/jump-if-= $check-mu-compare-stmt:error-incorrect-inouts/disp32
20825 $check-mu-compare-stmt:get-right:
20826
20827 (lookup *(edi+8) *(edi+0xc))
20828 89/<- %esi 0/r32/eax
20829
20830 3d/compare-eax-and 0/imm32
20831 0f 84/jump-if-= $check-mu-compare-stmt:error-incorrect-inouts/disp32
20832
20833 (lookup *(esi+8) *(esi+0xc))
20834 3d/compare-eax-and 0/imm32
20835 0f 85/jump-if-!= $check-mu-compare-stmt:error-incorrect-inouts/disp32
20836
20837 {
20838 $check-mu-compare-stmt:both-in-mem:
20839 (lookup *esi *(esi+4))
20840 (lookup *(eax+0x8) *(eax+0xc))
20841 (is-simple-mu-type? %eax 0)
20842 3d/compare-eax-and 0/imm32
20843 0f 85/jump-if-!= break/disp32
20844 (lookup *esi *(esi+4))
20845 (lookup *(eax+0x18) *(eax+0x1c))
20846 3d/compare-eax-and 0/imm32
20847 75/jump-if-!= break/disp8
20848 (lookup *edi *(edi+4))
20849 (lookup *(eax+0x8) *(eax+0xc))
20850 (is-simple-mu-type? %eax 0)
20851 3d/compare-eax-and 0/imm32
20852 75/jump-if-!= break/disp8
20853 (lookup *edi *(edi+4))
20854 (lookup *(eax+0x18) *(eax+0x1c))
20855 3d/compare-eax-and 0/imm32
20856 75/jump-if-!= break/disp8
20857 e9/jump $check-mu-compare-stmt:error-both-in-memory/disp32
20858 }
20859 $check-mu-compare-stmt:types:
20860
20861 (lookup *esi *(esi+4))
20862 (lookup *(eax+8) *(eax+0xc))
20863 89/<- %ecx 0/r32/eax
20864
20865 8b/-> *(esi+0x10) 0/r32/eax
20866 3d/compare-eax-and 0/imm32/false
20867 {
20868 74/jump-if-= break/disp8
20869 (lookup *(ecx+0xc) *(ecx+0x10))
20870
20871 81 7/subop/compare *(eax+0xc) 0/imm32
20872 {
20873 75/jump-if-!= break/disp8
20874 (lookup *(eax+4) *(eax+8))
20875 }
20876 89/<- %ecx 0/r32/eax
20877 }
20878
20879 (lookup *esi *(esi+4))
20880 (size-of %eax)
20881 3d/compare-eax-and 4/imm32
20882 0f 8f/jump-if-> $check-mu-compare-stmt:error-right-too-large/disp32
20883
20884 (lookup *edi *(edi+4))
20885 (size-of %eax)
20886 3d/compare-eax-and 4/imm32
20887 0f 8f/jump-if-> $check-mu-compare-stmt:error-left-too-large/disp32
20888
20889 (lookup *edi *(edi+4))
20890 (lookup *(eax+8) *(eax+0xc))
20891 89/<- %ebx 0/r32/eax
20892
20893 8b/-> *(edi+0x10) 0/r32/eax
20894 3d/compare-eax-and 0/imm32/false
20895 {
20896 74/jump-if-= break/disp8
20897 (lookup *(ebx+0xc) *(ebx+0x10))
20898
20899 81 7/subop/compare *(eax+0xc) 0/imm32
20900 {
20901 75/jump-if-!= break/disp8
20902 (lookup *(eax+4) *(eax+8))
20903 }
20904 89/<- %ebx 0/r32/eax
20905 }
20906
20907 (type-match? %ebx %ecx %edx)
20908 3d/compare-eax-and 0/imm32
20909 0f 85/jump-if-!= $check-mu-compare-stmt:end/disp32
20910
20911 {
20912 (lookup *edi *(edi+4))
20913 (lookup *(eax+8) *(eax+0xc))
20914 (is-mu-addr-type? %eax)
20915 3d/compare-eax-and 0/imm32/false
20916 74/jump-if-= break/disp8
20917 (lookup *esi *(esi+4))
20918 (lookup *eax *(eax+4))
20919 (string-equal? %eax "0")
20920 3d/compare-eax-and 0/imm32/false
20921 74/jump-if-= break/disp8
20922 eb/jump $check-mu-compare-stmt:end/disp8
20923 }
20924
20925 (check-mu-numberlike-arg %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20926 $check-mu-compare-stmt:end:
20927
20928 81 0/subop/add %esp 0x6c/imm32
20929
20930 5f/pop-to-edi
20931 5e/pop-to-esi
20932 5b/pop-to-ebx
20933 5a/pop-to-edx
20934 59/pop-to-ecx
20935 58/pop-to-eax
20936
20937 89/<- %esp 5/r32/ebp
20938 5d/pop-to-ebp
20939 c3/return
20940
20941 $check-mu-compare-stmt:error-incorrect-inouts:
20942 (write-buffered *(ebp+0x10) "fn ")
20943 8b/-> *(ebp+0xc) 0/r32/eax
20944 (lookup *eax *(eax+4))
20945 (write-buffered *(ebp+0x10) %eax)
20946 (write-buffered *(ebp+0x10) ": stmt 'compare' must have two inouts\n")
20947 (flush *(ebp+0x10))
20948 (stop *(ebp+0x14) 1)
20949
20950
20951 $check-mu-compare-stmt:error-too-many-outputs:
20952 (write-buffered *(ebp+0x10) "fn ")
20953 8b/-> *(ebp+0xc) 0/r32/eax
20954 (lookup *eax *(eax+4))
20955 (write-buffered *(ebp+0x10) %eax)
20956 (write-buffered *(ebp+0x10) ": stmt 'compare' must not have any outputs\n")
20957 (flush *(ebp+0x10))
20958 (stop *(ebp+0x14) 1)
20959
20960
20961 $check-mu-compare-stmt:error-both-in-memory:
20962 (write-buffered *(ebp+0x10) "fn ")
20963 8b/-> *(ebp+0xc) 0/r32/eax
20964 (lookup *eax *(eax+4))
20965 (write-buffered *(ebp+0x10) %eax)
20966 (write-buffered *(ebp+0x10) ": stmt compare: both inouts are in memory\n")
20967 (flush *(ebp+0x10))
20968 (stop *(ebp+0x14) 1)
20969
20970
20971 $check-mu-compare-stmt:error-left-too-large:
20972 (write-buffered *(ebp+0x10) "fn ")
20973 8b/-> *(ebp+0xc) 0/r32/eax
20974 (lookup *eax *(eax+4))
20975 (write-buffered *(ebp+0x10) %eax)
20976 (write-buffered *(ebp+0x10) ": stmt compare: '")
20977 (lookup *edi *(edi+4))
20978 (lookup *eax *(eax+4))
20979 (write-buffered *(ebp+0x10) %eax)
20980 (write-buffered *(ebp+0x10) "' is too large to compare\n")
20981 (flush *(ebp+0x10))
20982 (stop *(ebp+0x14) 1)
20983
20984
20985 $check-mu-compare-stmt:error-right-too-large:
20986 (write-buffered *(ebp+0x10) "fn ")
20987 8b/-> *(ebp+0xc) 0/r32/eax
20988 (lookup *eax *(eax+4))
20989 (write-buffered *(ebp+0x10) %eax)
20990 (write-buffered *(ebp+0x10) ": stmt compare: '")
20991 (lookup *esi *(esi+4))
20992 (lookup *eax *(eax+4))
20993 (write-buffered *(ebp+0x10) %eax)
20994 (write-buffered *(ebp+0x10) "' is too large to compare\n")
20995 (flush *(ebp+0x10))
20996 (stop *(ebp+0x14) 1)
20997
20998
20999 check-mu-address-stmt:
21000
21001 55/push-ebp
21002 89/<- %ebp 4/r32/esp
21003
21004 50/push-eax
21005 51/push-ecx
21006 52/push-edx
21007 56/push-esi
21008 57/push-edi
21009 $check-mu-address-stmt:get-output:
21010
21011 8b/-> *(ebp+8) 6/r32/esi
21012
21013 (lookup *(esi+0x14) *(esi+0x18))
21014 89/<- %edi 0/r32/eax
21015
21016 3d/compare-eax-and 0/imm32
21017 0f 84/jump-if-= $check-mu-address-stmt:error-no-output/disp32
21018
21019 (lookup *(edi+8) *(edi+0xc))
21020 3d/compare-eax-and 0/imm32
21021 0f 85/jump-if-!= $check-mu-address-stmt:error-too-many-outputs/disp32
21022 $check-mu-address-stmt:get-inout:
21023
21024 (lookup *(esi+0xc) *(esi+0x10))
21025 89/<- %esi 0/r32/eax
21026
21027 3d/compare-eax-and 0/imm32
21028 0f 84/jump-if-= $check-mu-address-stmt:error-no-inout/disp32
21029
21030 (lookup *(esi+8) *(esi+0xc))
21031 3d/compare-eax-and 0/imm32
21032 0f 85/jump-if-!= $check-mu-address-stmt:error-too-many-inouts/disp32
21033 $check-mu-address-stmt:types:
21034
21035 (lookup *edi *(edi+4))
21036 (lookup *(eax+0x18) *(eax+0x1c))
21037 3d/compare-eax-and 0/imm32
21038 0f 84/jump-if-= $check-mu-address-stmt:error-output-not-in-register/disp32
21039
21040 (lookup *edi *(edi+4))
21041 (lookup *(eax+8) *(eax+0xc))
21042 89/<- %edx 0/r32/eax
21043
21044 (is-mu-addr-type? %edx)
21045 3d/compare-eax-and 0/imm32/false
21046 0f 84/jump-if-= $check-mu-address-stmt:error-output-not-address/disp32
21047
21048 (lookup *(edx+0xc) *(edx+0x10))
21049
21050 81 7/subop/compare *(eax+0xc) 0/imm32
21051 {
21052 75/jump-if-!= break/disp8
21053 (lookup *(eax+4) *(eax+8))
21054 }
21055 89/<- %edx 0/r32/eax
21056
21057 (lookup *esi *(esi+4))
21058 (lookup *(eax+8) *(eax+0xc))
21059 89/<- %ecx 0/r32/eax
21060
21061 8b/-> *(esi+0x10) 0/r32/eax
21062 3d/compare-eax-and 0/imm32/false
21063 {
21064 74/jump-if-= break/disp8
21065 (lookup *(ecx+0xc) *(ecx+0x10))
21066
21067 81 7/subop/compare *(eax+0xc) 0/imm32
21068 {
21069 75/jump-if-!= break/disp8
21070 (lookup *(eax+4) *(eax+8))
21071 }
21072 89/<- %ecx 0/r32/eax
21073 }
21074
21075 (type-equal-ignoring-capacity? %edx %ecx)
21076 3d/compare-eax-and 0/imm32
21077 0f 84/jump-if-= $check-mu-address-stmt:error-type-mismatch/disp32
21078 $check-mu-address-stmt:end:
21079
21080 5f/pop-to-edi
21081 5e/pop-to-esi
21082 5a/pop-to-edx
21083 59/pop-to-ecx
21084 58/pop-to-eax
21085
21086 89/<- %esp 5/r32/ebp
21087 5d/pop-to-ebp
21088 c3/return
21089
21090 $check-mu-address-stmt:error-no-inout:
21091 (write-buffered *(ebp+0x10) "fn ")
21092 8b/-> *(ebp+0xc) 0/r32/eax
21093 (lookup *eax *(eax+4))
21094 (write-buffered *(ebp+0x10) %eax)
21095 (write-buffered *(ebp+0x10) ": stmt 'address' expects an inout\n")
21096 (flush *(ebp+0x10))
21097 (stop *(ebp+0x14) 1)
21098
21099
21100 $check-mu-address-stmt:error-too-many-inouts:
21101 (write-buffered *(ebp+0x10) "fn ")
21102 8b/-> *(ebp+0xc) 0/r32/eax
21103 (lookup *eax *(eax+4))
21104 (write-buffered *(ebp+0x10) %eax)
21105 (write-buffered *(ebp+0x10) ": stmt 'address' must have just one inout\n")
21106 (flush *(ebp+0x10))
21107 (stop *(ebp+0x14) 1)
21108
21109
21110 $check-mu-address-stmt:error-no-output:
21111 (write-buffered *(ebp+0x10) "fn ")
21112 8b/-> *(ebp+0xc) 0/r32/eax
21113 (lookup *eax *(eax+4))
21114 (write-buffered *(ebp+0x10) %eax)
21115 (write-buffered *(ebp+0x10) ": stmt 'address' expects an output\n")
21116 (flush *(ebp+0x10))
21117 (stop *(ebp+0x14) 1)
21118
21119
21120 $check-mu-address-stmt:error-output-not-in-register:
21121 (write-buffered *(ebp+0x10) "fn ")
21122 8b/-> *(ebp+0xc) 0/r32/eax
21123 (lookup *eax *(eax+4))
21124 (write-buffered *(ebp+0x10) %eax)
21125 (write-buffered *(ebp+0x10) ": stmt address: output '")
21126 (lookup *edi *(edi+4))
21127 (lookup *eax *(eax+4))
21128 (write-buffered *(ebp+0x10) %eax)
21129 (write-buffered *(ebp+0x10) "' not in a register\n")
21130 (flush *(ebp+0x10))
21131 (stop *(ebp+0x14) 1)
21132
21133
21134 $check-mu-address-stmt:error-too-many-outputs:
21135 (write-buffered *(ebp+0x10) "fn ")
21136 8b/-> *(ebp+0xc) 0/r32/eax
21137 (lookup *eax *(eax+4))
21138 (write-buffered *(ebp+0x10) %eax)
21139 (write-buffered *(ebp+0x10) ": stmt 'address' must have just one output\n")
21140 (flush *(ebp+0x10))
21141 (stop *(ebp+0x14) 1)
21142
21143
21144 $check-mu-address-stmt:error-output-not-address:
21145 (write-buffered *(ebp+0x10) "fn ")
21146 8b/-> *(ebp+0xc) 0/r32/eax
21147 (lookup *eax *(eax+4))
21148 (write-buffered *(ebp+0x10) %eax)
21149 (write-buffered *(ebp+0x10) ": stmt address: output '")
21150 (lookup *edi *(edi+4))
21151 (lookup *eax *(eax+4))
21152 (write-buffered *(ebp+0x10) %eax)
21153 (write-buffered *(ebp+0x10) "' is not an addr\n")
21154 (flush *(ebp+0x10))
21155 (stop *(ebp+0x14) 1)
21156
21157
21158 $check-mu-address-stmt:error-type-mismatch:
21159 (write-buffered *(ebp+0x10) "fn ")
21160 8b/-> *(ebp+0xc) 0/r32/eax
21161 (lookup *eax *(eax+4))
21162 (write-buffered *(ebp+0x10) %eax)
21163 (write-buffered *(ebp+0x10) ": stmt address: output '")
21164 (lookup *edi *(edi+4))
21165 (lookup *eax *(eax+4))
21166 (write-buffered *(ebp+0x10) %eax)
21167 (write-buffered *(ebp+0x10) "' cannot hold address of '")
21168 (lookup *esi *(esi+4))
21169 (lookup *eax *(eax+4))
21170 (write-buffered *(ebp+0x10) %eax)
21171 (write-buffered *(ebp+0x10) "'\n")
21172 (flush *(ebp+0x10))
21173 (stop *(ebp+0x14) 1)
21174
21175
21176 type-equal-ignoring-capacity?:
21177
21178 55/push-ebp
21179 89/<- %ebp 4/r32/esp
21180
21181 51/push-ecx
21182 52/push-edx
21183 53/push-ebx
21184
21185 8b/-> *(ebp+8) 1/r32/ecx
21186
21187 8b/-> *(ebp+0xc) 3/r32/ebx
21188
21189 81 7/subop/compare *ecx 0/imm32/false
21190 0f 85/jump-if-!= $type-equal-ignoring-capacity?:base-case/disp32
21191
21192 (lookup *(ecx+4) *(ecx+8))
21193 89/<- %edx 0/r32/eax
21194 (lookup *(ebx+4) *(ebx+8))
21195 (type-equal? %edx %eax)
21196 3d/compare-eax-and 0/imm32/false
21197 0f 84/jump-if-= $type-equal-ignoring-capacity?:end/disp32
21198
21199 {
21200 (is-mu-array? %edx)
21201 3d/compare-eax-and 0/imm32/false
21202 75/jump-if-!= break/disp8
21203 $type-equal-ignoring-capacity?:array:
21204
21205 (lookup *(ecx+0xc) *(ecx+0x10))
21206 (lookup *(eax+4) *(eax+8))
21207 89/<- %ecx 0/r32/eax
21208
21209 (lookup *(ebx+0xc) *(ebx+0x10))
21210 (lookup *(eax+4) *(eax+8))
21211 89/<- %ebx 0/r32/eax
21212 eb/jump $type-equal-ignoring-capacity?:base-case/disp8
21213 }
21214
21215 {
21216 (is-mu-stream? %edx)
21217 3d/compare-eax-and 0/imm32/false
21218 75/jump-if-!= break/disp8
21219 $type-equal-ignoring-capacity?:stream:
21220
21221 (lookup *(ecx+0xc) *(ecx+0x10))
21222 (lookup *(eax+4) *(eax+8))
21223 89/<- %ecx 0/r32/eax
21224
21225 (lookup *(ebx+0xc) *(ebx+0x10))
21226 (lookup *(eax+4) *(eax+8))
21227 89/<- %ebx 0/r32/eax
21228 eb/jump $type-equal-ignoring-capacity?:base-case/disp8
21229 }
21230 $type-equal-ignoring-capacity?:base-case:
21231
21232 (type-equal? %ecx %ebx)
21233 $type-equal-ignoring-capacity?:end:
21234
21235 5b/pop-to-ebx
21236 5a/pop-to-edx
21237 59/pop-to-ecx
21238
21239 89/<- %esp 5/r32/ebp
21240 5d/pop-to-ebp
21241 c3/return
21242
21243 check-mu-return-stmt:
21244
21245 55/push-ebp
21246 89/<- %ebp 4/r32/esp
21247
21248 50/push-eax
21249 51/push-ecx
21250 52/push-edx
21251 53/push-ebx
21252 56/push-esi
21253 57/push-edi
21254
21255 81 5/subop/subtract %esp 0x60/imm32
21256 68/push 0x60/imm32/size
21257 68/push 0/imm32/read
21258 68/push 0/imm32/write
21259 89/<- %edx 4/r32/esp
21260
21261 8b/-> *(ebp+0xc) 0/r32/eax
21262 (lookup *(eax+0x10) *(eax+0x14))
21263 89/<- %esi 0/r32/eax
21264
21265 89/<- %ebx 0/r32/eax
21266
21267 8b/-> *(ebp+8) 0/r32/eax
21268 (lookup *(eax+0xc) *(eax+0x10))
21269 89/<- %edi 0/r32/eax
21270 {
21271
21272 81 7/subop/compare %ebx 0/imm32
21273 0f 84/jump-if-= break/disp32
21274
21275 81 7/subop/compare %edi 0/imm32
21276 0f 84/jump-if-= $check-mu-return-stmt:error-too-few-inouts/disp32
21277
21278 (lookup *ebx *(ebx+4))
21279 (lookup *(eax+8) *(eax+0xc))
21280 89/<- %ecx 0/r32/eax
21281
21282 (lookup *edi *(edi+4))
21283 (lookup *(eax+8) *(eax+0xc))
21284
21285 81 7/subop/compare *(edi+0x10) 0/imm32/false
21286 {
21287 74/jump-if-= break/disp8
21288 (lookup *(eax+0xc) *(eax+0x10))
21289
21290 81 7/subop/compare *(eax+0xc) 0/imm32
21291 75/jump-if-!= break/disp8
21292 (lookup *(eax+4) *(eax+8))
21293 }
21294
21295 (type-match? %ecx %eax %edx)
21296 3d/compare-eax-and 0/imm32/false
21297 0f 84/jump-if-= $check-mu-return-stmt:error1/disp32
21298
21299 (register-within-list-with-conflict? %edi %esi %ebx *(ebp+8))
21300 3d/compare-eax-and 0/imm32/false
21301 0f 85/jump-if-!= $check-mu-return-stmt:error2/disp32
21302
21303 (lookup *(ebx+8) *(ebx+0xc))
21304 89/<- %ebx 0/r32/eax
21305
21306 (lookup *(edi+8) *(edi+0xc))
21307 89/<- %edi 0/r32/eax
21308
21309 e9/jump loop/disp32
21310 }
21311
21312 81 7/subop/compare %edi 0/imm32
21313 0f 85/jump-if-!= $check-mu-return-stmt:error-too-many-inouts/disp32
21314 $check-mu-return-stmt:end:
21315
21316 81 0/subop/add %esp 0x6c/imm32
21317
21318 5f/pop-to-edi
21319 5e/pop-to-esi
21320 5b/pop-to-ebx
21321 5a/pop-to-edx
21322 59/pop-to-ecx
21323 58/pop-to-eax
21324
21325 89/<- %esp 5/r32/ebp
21326 5d/pop-to-ebp
21327 c3/return
21328
21329 $check-mu-return-stmt:error1:
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) ": return: '")
21335 (lookup *edi *(edi+4))
21336 (lookup *eax *(eax+4))
21337 (write-buffered *(ebp+0x10) %eax)
21338 (write-buffered *(ebp+0x10) "' has the wrong type\n")
21339 (flush *(ebp+0x10))
21340 (stop *(ebp+0x14) 1)
21341
21342
21343 $check-mu-return-stmt:error2:
21344 (write-buffered *(ebp+0x10) "fn ")
21345 8b/-> *(ebp+0xc) 0/r32/eax
21346 (lookup *eax *(eax+4))
21347 (write-buffered *(ebp+0x10) %eax)
21348 (write-buffered *(ebp+0x10) ": return: '")
21349 (lookup *edi *(edi+4))
21350 (lookup *eax *(eax+4))
21351 (write-buffered *(ebp+0x10) %eax)
21352 (write-buffered *(ebp+0x10) "' is no longer available\n")
21353 (flush *(ebp+0x10))
21354 (stop *(ebp+0x14) 1)
21355
21356
21357 $check-mu-return-stmt:error-too-few-inouts:
21358 (write-buffered *(ebp+0x10) "fn ")
21359 8b/-> *(ebp+0xc) 0/r32/eax
21360 (lookup *eax *(eax+4))
21361 (write-buffered *(ebp+0x10) %eax)
21362 (write-buffered *(ebp+0x10) ": return: too few inouts\n")
21363 (flush *(ebp+0x10))
21364 (stop *(ebp+0x14) 1)
21365
21366
21367 $check-mu-return-stmt:error-too-many-inouts:
21368 (write-buffered *(ebp+0x10) "fn ")
21369 8b/-> *(ebp+0xc) 0/r32/eax
21370 (lookup *eax *(eax+4))
21371 (write-buffered *(ebp+0x10) %eax)
21372 (write-buffered *(ebp+0x10) ": return: too many inouts\n")
21373 (flush *(ebp+0x10))
21374 (stop *(ebp+0x14) 1)
21375
21376
21377 check-all-unique-registers:
21378
21379 55/push-ebp
21380 89/<- %ebp 4/r32/esp
21381
21382 50/push-eax
21383 51/push-ecx
21384 56/push-esi
21385
21386 81 5/subop/subtract %esp 0x60/imm32
21387 68/push 0x60/imm32/size
21388 68/push 0/imm32/read
21389 68/push 0/imm32/write
21390 89/<- %esi 4/r32/esp
21391
21392 8b/-> *(ebp+8) 1/r32/ecx
21393 {
21394
21395 81 7/subop/compare %ecx 0/imm32
21396 0f 84/jump-if-= break/disp32
21397
21398 (lookup *ecx *(ecx+4))
21399 (lookup *(eax+0x18) *(eax+0x1c))
21400
21401 (maybe-get %esi %eax 0xc)
21402 3d/compare-eax-and 0/imm32
21403 0f 85/jump-if-!= $check-all-unique-registers:abort/disp32
21404
21405 (lookup *ecx *(ecx+4))
21406 (lookup *(eax+0x18) *(eax+0x1c))
21407 (get-or-insert %esi %eax 0xc Heap)
21408
21409 (lookup *(ecx+8) *(ecx+0xc))
21410 89/<- %ecx 0/r32/eax
21411 e9/jump loop/disp32
21412 }
21413 $check-all-unique-registers:end:
21414
21415 81 0/subop/add %esp 0x6c/imm32
21416
21417 5e/pop-to-esi
21418 59/pop-to-ecx
21419 58/pop-to-eax
21420
21421 89/<- %esp 5/r32/ebp
21422 5d/pop-to-ebp
21423 c3/return
21424
21425 $check-all-unique-registers:abort:
21426 (write-buffered *(ebp+0x10) "fn ")
21427 8b/-> *(ebp+0xc) 0/r32/eax
21428 (lookup *eax *(eax+4))
21429 (write-buffered *(ebp+0x10) %eax)
21430 (write-buffered *(ebp+0x10) ": outputs must be in unique registers\n")
21431 (flush *(ebp+0x10))
21432 (stop *(ebp+0x14) 1)
21433
21434
21435
21436
21437
21438 register-within-list-with-conflict?:
21439
21440 55/push-ebp
21441 89/<- %ebp 4/r32/esp
21442
21443 51/push-ecx
21444 52/push-edx
21445 53/push-ebx
21446 56/push-esi
21447 57/push-edi
21448
21449 8b/-> *(ebp+8) 0/r32/eax
21450 (lookup *eax *(eax+4))
21451 (lookup *(eax+0x18) *(eax+0x1c))
21452
21453
21454
21455
21456
21457 3d/compare-eax-and 0/imm32
21458 0f 84/jump-if-= $register-within-list-with-conflict?:end/disp32
21459 89/<- %ebx 0/r32/eax
21460
21461 8b/-> *(ebp+0xc) 1/r32/ecx
21462
21463 8b/-> *(ebp+0x10) 2/r32/edx
21464 {
21465
21466 81 7/subop/compare %edi 0/imm32
21467 0f 84/jump-if-= break/disp32
21468
21469 39/compare %ecx 2/r32/edx
21470 0f 84/jump-if-= break/disp32
21471
21472 (lookup *ecx *(ecx+4))
21473 (lookup *(eax+0x18) *(eax+0x1c))
21474
21475 3d/compare-eax-and 0/imm32
21476 74/jump-if-= $register-within-list-with-conflict?:continue/disp8
21477
21478 (string-equal? %eax %ebx)
21479 3d/compare-eax-and 0/imm32/false
21480 {
21481 74/jump-if-= break/disp8
21482
21483
21484
21485 8b/-> *(ebp+0x14) 0/r32/eax
21486 (lookup *(eax+0xc) *(eax+0x10))
21487 (register-conflict? %ebx %eax *(ebp+0xc))
21488 eb/jump $register-within-list-with-conflict?:end/disp8
21489 }
21490 $register-within-list-with-conflict?:continue:
21491
21492 (lookup *(ecx+8) *(ecx+0xc))
21493 89/<- %ecx 0/r32/eax
21494 e9/jump loop/disp32
21495 }
21496
21497 b8/copy-to-eax 0/imm32/false
21498 $register-within-list-with-conflict?:end:
21499
21500 5f/pop-to-edi
21501 5e/pop-to-esi
21502 5b/pop-to-ebx
21503 5a/pop-to-edx
21504 59/pop-to-ecx
21505
21506 89/<- %esp 5/r32/ebp
21507 5d/pop-to-ebp
21508 c3/return
21509
21510
21511
21512
21513
21514 register-conflict?:
21515
21516 55/push-ebp
21517 89/<- %ebp 4/r32/esp
21518
21519 51/push-ecx
21520 52/push-edx
21521 53/push-ebx
21522 56/push-esi
21523 57/push-edi
21524
21525
21526
21527
21528
21529 8b/-> *(ebp+0x10) 7/r32/edi
21530
21531 8b/-> *(ebp+0xc) 6/r32/esi
21532 {
21533
21534 81 7/subop/compare %edi 0/imm32
21535 0f 84/jump-if-= break/disp32
21536
21537 (lookup *edi *(edi+4))
21538 (lookup *(eax+0x18) *(eax+0x1c))
21539 (string-equal? %eax *(ebp+8))
21540 3d/compare-eax-and 0/imm32/false
21541 0f 84/jump-if= $register-conflict?:continue/disp32
21542
21543
21544
21545 (lookup *esi *(esi+4))
21546 (lookup *(eax+0x18) *(eax+0x1c))
21547
21548 3d/compare-eax-and 0/imm32
21549 {
21550 75/jump-if-!= break/disp8
21551
21552
21553 b8/copy-to-eax 1/imm32/true
21554 e9/jump $register-conflict?:end/disp32
21555 }
21556
21557 (string-equal? %eax *(ebp+8))
21558 3d/compare-eax-and 0/imm32/false
21559 0f 94/set-if-= %al
21560
21561
21562
21563
21564 eb/jump $register-conflict?:end/disp8
21565 $register-conflict?:continue:
21566
21567 (lookup *(edi+8) *(edi+0xc))
21568 89/<- %edi 0/r32/eax
21569
21570 (lookup *(esi+8) *(esi+0xc))
21571 89/<- %esi 0/r32/eax
21572 e9/jump loop/disp32
21573 }
21574
21575 (write-buffered Stderr "register-conflict? misused\n")
21576 (flush Stderr)
21577 e8/call syscall_exit/disp32
21578 $register-conflict?:end:
21579
21580 5f/pop-to-edi
21581 5e/pop-to-esi
21582 5b/pop-to-ebx
21583 5a/pop-to-edx
21584 59/pop-to-ecx
21585
21586 89/<- %esp 5/r32/ebp
21587 5d/pop-to-ebp
21588 c3/return
21589
21590 check-final-stmt-is-return:
21591
21592 55/push-ebp
21593 89/<- %ebp 4/r32/esp
21594
21595 50/push-eax
21596 51/push-ecx
21597
21598 8b/-> *(ebp+8) 0/r32/eax
21599 (lookup *(eax+4) *(eax+8))
21600 3d/compare-eax-and 0/imm32
21601 74/jump-if-= $check-final-stmt-is-return:end/disp8
21602 89/<- %ecx 0/r32/eax
21603 {
21604
21605 (lookup *(ecx+8) *(ecx+0xc))
21606 3d/compare-eax-and 0/imm32
21607 74/jump-if-= break/disp8
21608
21609 89/<- %ecx 0/r32/eax
21610 e9/jump loop/disp32
21611 }
21612 $check-final-stmt-is-return:check-tag:
21613
21614 (lookup *ecx *(ecx+4))
21615 81 7/subop/compare *eax 1/imm32/stmt1
21616 75/jump-if-!= $check-final-stmt-is-return:error/disp8
21617 $check-final-stmt-is-return:check-operation:
21618
21619 (lookup *(eax+4) *(eax+8))
21620 (string-equal? %eax "return")
21621 3d/compare-eax-and 0/imm32/false
21622 74/jump-if-= $check-final-stmt-is-return:error/disp8
21623 $check-final-stmt-is-return:end:
21624
21625 59/pop-to-ecx
21626 58/pop-to-eax
21627
21628 89/<- %esp 5/r32/ebp
21629 5d/pop-to-ebp
21630 c3/return
21631
21632 $check-final-stmt-is-return:error:
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) ": final statement should be a 'return'\n")
21638 (flush *(ebp+0x10))
21639 (stop *(ebp+0x14) 1)
21640
21641
21642 check-no-breaks:
21643
21644 55/push-ebp
21645 89/<- %ebp 4/r32/esp
21646
21647 50/push-eax
21648 51/push-ecx
21649
21650 8b/-> *(ebp+8) 0/r32/eax
21651 (lookup *(eax+4) *(eax+8))
21652 3d/compare-eax-and 0/imm32
21653 0f 84/jump-if-= $check-no-breaks:end/disp32
21654 89/<- %ecx 0/r32/eax
21655 {
21656
21657 (lookup *(ecx+8) *(ecx+0xc))
21658 3d/compare-eax-and 0/imm32
21659 74/jump-if-= break/disp8
21660
21661 (lookup *ecx *(ecx+4))
21662 81 7/subop/compare *eax 1/imm32/stmt1
21663 75/jump-if-!= $check-no-breaks:continue/disp8
21664
21665 (lookup *(eax+4) *(eax+8))
21666 (string-starts-with? %eax "break")
21667 3d/compare-eax-and 0/imm32/false
21668 75/jump-if-!= $check-no-breaks:error/disp8
21669 $check-no-breaks:continue:
21670
21671 (lookup *(ecx+8) *(ecx+0xc))
21672 89/<- %ecx 0/r32/eax
21673 e9/jump loop/disp32
21674 }
21675 $check-no-breaks:end:
21676
21677 59/pop-to-ecx
21678 58/pop-to-eax
21679
21680 89/<- %esp 5/r32/ebp
21681 5d/pop-to-ebp
21682 c3/return
21683
21684 $check-no-breaks:error:
21685 (write-buffered *(ebp+0x10) "fn ")
21686 8b/-> *(ebp+0xc) 0/r32/eax
21687 (lookup *eax *(eax+4))
21688 (write-buffered *(ebp+0x10) %eax)
21689 (write-buffered *(ebp+0x10) " has outputs, so you cannot 'break' out of the outermost block. Use 'return'.\n")
21690 (flush *(ebp+0x10))
21691 (stop *(ebp+0x14) 1)
21692
21693
21694 check-mu-get-stmt:
21695
21696 55/push-ebp
21697 89/<- %ebp 4/r32/esp
21698
21699 50/push-eax
21700 51/push-ecx
21701 52/push-edx
21702 53/push-ebx
21703 56/push-esi
21704 57/push-edi
21705
21706 8b/-> *(ebp+8) 6/r32/esi
21707
21708
21709 (lookup *(esi+0xc) *(esi+0x10))
21710 3d/compare-eax-and 0/imm32/false
21711 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
21712 (lookup *eax *(eax+4))
21713 89/<- %ecx 0/r32/eax
21714 $check-mu-get-stmt:check-base:
21715
21716
21717
21718 (lookup *(ecx+8) *(ecx+0xc))
21719 89/<- %ebx 0/r32/eax
21720 {
21721 81 7/subop/compare *ebx 0/imm32/false
21722 0f 85/jump-if-!= break/disp32
21723 $check-mu-get-stmt:base-is-compound:
21724
21725 (lookup *(ebx+4) *(ebx+8))
21726 (is-simple-mu-type? %eax 2)
21727 3d/compare-eax-and 0/imm32/false
21728 74/jump-if-= break/disp8
21729 $check-mu-get-stmt:base-is-addr:
21730
21731 81 7/subop/compare *(ecx+0x18) 0/imm32
21732 0f 84/jump-if-= $check-mu-get-stmt:error-base-type-addr-but-not-register/disp32
21733 $check-mu-get-stmt:base-is-addr-in-register:
21734
21735 (lookup *(ebx+0xc) *(ebx+0x10))
21736 81 7/subop/compare *(eax+0xc) 0/imm32
21737 0f 85/jump-if-!= $check-mu-get-stmt:error-bad-base/disp32
21738 $check-mu-get-stmt:base-is-addr-to-atom-in-register:
21739 (lookup *(eax+4) *(eax+8))
21740 89/<- %ebx 0/r32/eax
21741 }
21742 $check-mu-get-stmt:check-base-typeinfo:
21743
21744 81 7/subop/compare *ebx 0/imm32/false
21745 {
21746 75/jump-if-!= break/disp8
21747 (lookup *(ebx+4) *(ebx+8))
21748 89/<- %ebx 0/r32/eax
21749 }
21750
21751 8b/-> *(ebx+4) 3/r32/ebx
21752 (is-container? %ebx)
21753 3d/compare-eax-and 0/imm32/false
21754 0f 84/jump-if-= $check-mu-get-stmt:error-bad-base/disp32
21755
21756
21757 68/push 0/imm32
21758 68/push 0/imm32
21759 89/<- %ecx 4/r32/esp
21760
21761 (find-typeinfo %ebx %ecx)
21762 (lookup *ecx *(ecx+4))
21763
21764 81 0/subop/add %esp 8/imm32
21765
21766 89/<- %edx 0/r32/eax
21767
21768 (lookup *(esi+0xc) *(esi+0x10))
21769 (lookup *(eax+8) *(eax+0xc))
21770 89/<- %ecx 0/r32/eax
21771
21772 3d/compare-eax-and 0/imm32/false
21773 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
21774
21775 (lookup *ecx *(ecx+4))
21776 89/<- %ecx 0/r32/eax
21777
21778 81 7/subop/compare *(ecx+0x14) -1/imm32/uninitialized
21779 0f 84/jump-if-= $check-mu-get-stmt:error-bad-field/disp32
21780
21781 (lookup *(esi+0xc) *(esi+0x10))
21782 (lookup *(eax+8) *(eax+0xc))
21783 (lookup *(eax+8) *(eax+0xc))
21784 3d/compare-eax-and 0/imm32/false
21785 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-inouts/disp32
21786
21787 (lookup *(esi+0x14) *(esi+0x18))
21788
21789 3d/compare-eax-and 0/imm32/false
21790 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-outputs/disp32
21791 (lookup *eax *(eax+4))
21792 89/<- %edi 0/r32/eax
21793 $check-mu-get-stmt:check-output-type:
21794
21795
21796 (lookup *(edi+0x18) *(edi+0x1c))
21797 3d/compare-eax-and 0/imm32
21798 0f 84/jump-if-= $check-mu-get-stmt:error-output-not-in-register/disp32
21799
21800 (lookup *(edi+8) *(edi+0xc))
21801 81 7/subop/compare *eax 0/imm32/false
21802 0f 85/jump-if-!= $check-mu-get-stmt:error-output-type-not-address/disp32
21803
21804 (lookup *(eax+4) *(eax+8))
21805 (is-simple-mu-type? %eax 2)
21806 3d/compare-eax-and 0/imm32/false
21807 0f 84/jump-if-= $check-mu-get-stmt:error-output-type-not-address/disp32
21808 $check-mu-get-stmt:check-output-type-match:
21809
21810 (lookup *(edi+8) *(edi+0xc))
21811 (lookup *(eax+0xc) *(eax+0x10))
21812
21813 81 7/subop/compare *(eax+0xc) 0/imm32/null
21814 {
21815 75/jump-if-!= break/disp8
21816 (lookup *(eax+4) *(eax+8))
21817 }
21818 89/<- %edi 0/r32/eax
21819
21820 (lookup *ecx *(ecx+4))
21821 89/<- %ecx 0/r32/eax
21822
21823 (lookup *(edx+4) *(edx+8))
21824 (get %eax %ecx 0x10)
21825
21826 (lookup *eax *(eax+4))
21827 (lookup *eax *(eax+4))
21828 (lookup *(eax+8) *(eax+0xc))
21829
21830 (type-equal? %edi %eax)
21831 3d/compare-eax-and 0/imm32/false
21832 0f 84/jump-if-= $check-mu-get-stmt:error-bad-output-type/disp32
21833
21834 (lookup *(esi+0x14) *(esi+0x18))
21835 (lookup *(eax+8) *(eax+0xc))
21836 3d/compare-eax-and 0/imm32/false
21837 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-outputs/disp32
21838 $check-mu-get-stmt:end:
21839
21840 5f/pop-to-edi
21841 5e/pop-to-esi
21842 5b/pop-to-ebx
21843 5a/pop-to-edx
21844 59/pop-to-ecx
21845 58/pop-to-eax
21846
21847 89/<- %esp 5/r32/ebp
21848 5d/pop-to-ebp
21849 c3/return
21850
21851 $check-mu-get-stmt:error-too-few-inouts:
21852 (write-buffered *(ebp+0x10) "fn ")
21853 8b/-> *(ebp+0xc) 0/r32/eax
21854 (lookup *eax *(eax+4))
21855 (write-buffered *(ebp+0x10) %eax)
21856 (write-buffered *(ebp+0x10) ": stmt get: too few inouts (2 required)\n")
21857 (flush *(ebp+0x10))
21858 (stop *(ebp+0x14) 1)
21859
21860
21861 $check-mu-get-stmt:error-too-many-inouts:
21862 (write-buffered *(ebp+0x10) "fn ")
21863 8b/-> *(ebp+0xc) 0/r32/eax
21864 (lookup *eax *(eax+4))
21865 (write-buffered *(ebp+0x10) %eax)
21866 (write-buffered *(ebp+0x10) ": stmt get: too many inouts (2 required)\n")
21867 (flush *(ebp+0x10))
21868 (stop *(ebp+0x14) 1)
21869
21870
21871 $check-mu-get-stmt:error-too-few-outputs:
21872 (write-buffered *(ebp+0x10) "fn ")
21873 8b/-> *(ebp+0xc) 0/r32/eax
21874 (lookup *eax *(eax+4))
21875 (write-buffered *(ebp+0x10) %eax)
21876 (write-buffered *(ebp+0x10) ": stmt get: must have an output\n")
21877 (flush *(ebp+0x10))
21878 (stop *(ebp+0x14) 1)
21879
21880
21881 $check-mu-get-stmt:error-too-many-outputs:
21882 (write-buffered *(ebp+0x10) "fn ")
21883 8b/-> *(ebp+0xc) 0/r32/eax
21884 (lookup *eax *(eax+4))
21885 (write-buffered *(ebp+0x10) %eax)
21886 (write-buffered *(ebp+0x10) ": stmt get: too many outputs (1 required)\n")
21887 (flush *(ebp+0x10))
21888 (stop *(ebp+0x14) 1)
21889
21890
21891 $check-mu-get-stmt:error-bad-base:
21892
21893 (write-buffered *(ebp+0x10) "fn ")
21894 8b/-> *(ebp+0xc) 0/r32/eax
21895 (lookup *eax *(eax+4))
21896 (write-buffered *(ebp+0x10) %eax)
21897 (write-buffered *(ebp+0x10) ": stmt get: var '")
21898 (lookup *(esi+0xc) *(esi+0x10))
21899 (lookup *eax *(eax+4))
21900 (lookup *eax *(eax+4))
21901 (write-buffered *(ebp+0x10) %eax)
21902 (write-buffered *(ebp+0x10) "' must have a 'type' definition\n")
21903 (flush *(ebp+0x10))
21904 (stop *(ebp+0x14) 1)
21905
21906
21907 $check-mu-get-stmt:error-base-type-addr-but-not-register:
21908 (write-buffered *(ebp+0x10) "fn ")
21909 8b/-> *(ebp+0xc) 0/r32/eax
21910 (lookup *eax *(eax+4))
21911 (write-buffered *(ebp+0x10) %eax)
21912 (write-buffered *(ebp+0x10) ": stmt get: var '")
21913 (lookup *(esi+0xc) *(esi+0x10))
21914 (lookup *eax *(eax+4))
21915 (lookup *eax *(eax+4))
21916 (write-buffered *(ebp+0x10) %eax)
21917 (write-buffered *(ebp+0x10) "' is an 'addr' type, and so must live in a register\n")
21918 (flush *(ebp+0x10))
21919 (stop *(ebp+0x14) 1)
21920
21921
21922 $check-mu-get-stmt:error-bad-field:
21923
21924 (write-buffered *(ebp+0x10) "fn ")
21925 8b/-> *(ebp+0xc) 0/r32/eax
21926 (lookup *eax *(eax+4))
21927 (write-buffered *(ebp+0x10) %eax)
21928 (write-buffered *(ebp+0x10) ": stmt get: type '")
21929
21930 bf/copy-to-edi Type-id/imm32
21931 8b/-> *(edi+ebx<<2+0xc) 6/r32/esi
21932 {
21933 81 7/subop/compare %esi 0/imm32
21934 74/jump-if-= break/disp8
21935 (write-buffered *(ebp+0x10) %esi)
21936 }
21937
21938 (write-buffered *(ebp+0x10) "' has no member called '")
21939 (lookup *ecx *(ecx+4))
21940 (write-buffered *(ebp+0x10) %eax)
21941 (write-buffered *(ebp+0x10) "'\n")
21942 (flush *(ebp+0x10))
21943 (stop *(ebp+0x14) 1)
21944
21945
21946 $check-mu-get-stmt:error-output-not-in-register:
21947 (write-buffered *(ebp+0x10) "fn ")
21948 8b/-> *(ebp+0xc) 0/r32/eax
21949 (lookup *eax *(eax+4))
21950 (write-buffered *(ebp+0x10) %eax)
21951 (write-buffered *(ebp+0x10) ": stmt get: output '")
21952 (lookup *edi *(edi+4))
21953 (write-buffered *(ebp+0x10) %eax)
21954 (write-buffered *(ebp+0x10) "' is not in a register\n")
21955 (flush *(ebp+0x10))
21956 (stop *(ebp+0x14) 1)
21957
21958
21959 $check-mu-get-stmt:error-output-type-not-address:
21960 (write-buffered *(ebp+0x10) "fn ")
21961 8b/-> *(ebp+0xc) 0/r32/eax
21962 (lookup *eax *(eax+4))
21963 (write-buffered *(ebp+0x10) %eax)
21964 (write-buffered *(ebp+0x10) ": stmt get: output must be an addr\n")
21965 (flush *(ebp+0x10))
21966 (stop *(ebp+0x14) 1)
21967
21968
21969 $check-mu-get-stmt:error-bad-output-type:
21970 (write-buffered *(ebp+0x10) "fn ")
21971 8b/-> *(ebp+0xc) 0/r32/eax
21972 (lookup *eax *(eax+4))
21973 (write-buffered *(ebp+0x10) %eax)
21974 (write-buffered *(ebp+0x10) ": stmt get: wrong output type for member '")
21975 (write-buffered *(ebp+0x10) %ecx)
21976 (write-buffered *(ebp+0x10) "' of type '")
21977 bf/copy-to-edi Type-id/imm32
21978 8b/-> *(edi+ebx<<2+0xc) 6/r32/esi
21979 {
21980 81 7/subop/compare %esi 0/imm32
21981 74/jump-if-= break/disp8
21982 (write-buffered *(ebp+0x10) %esi)
21983 }
21984 (write-buffered *(ebp+0x10) "'\n")
21985 (flush *(ebp+0x10))
21986 (stop *(ebp+0x14) 1)
21987
21988
21989 check-mu-index-stmt:
21990
21991 55/push-ebp
21992 89/<- %ebp 4/r32/esp
21993
21994 50/push-eax
21995 51/push-ecx
21996 52/push-edx
21997 53/push-ebx
21998 56/push-esi
21999 57/push-edi
22000
22001 8b/-> *(ebp+8) 6/r32/esi
22002
22003
22004 (lookup *(esi+0xc) *(esi+0x10))
22005 $check-mu-index-stmt:check-no-inouts:
22006 3d/compare-eax-and 0/imm32
22007 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
22008 (lookup *eax *(eax+4))
22009 89/<- %ecx 0/r32/eax
22010
22011
22012 (lookup *(ecx+8) *(ecx+0xc))
22013 89/<- %ebx 0/r32/eax
22014
22015 81 7/subop/compare *ebx 0/imm32/false
22016 {
22017 74/jump-if-= break/disp8
22018 (is-simple-mu-type? %ebx 3)
22019 3d/compare-eax-and 0/imm32/false
22020 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-atom-type/disp32
22021 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
22022 }
22023 $check-mu-index-stmt:base-is-compound:
22024
22025 {
22026 (lookup *(ebx+4) *(ebx+8))
22027 (is-simple-mu-type? %eax 2)
22028 3d/compare-eax-and 0/imm32/false
22029 75/jump-if-!= break/disp8
22030 (lookup *(ebx+4) *(ebx+8))
22031 (is-simple-mu-type? %eax 3)
22032 3d/compare-eax-and 0/imm32/false
22033 75/jump-if-!= break/disp8
22034 e9/jump $check-mu-index-stmt:error-base-non-array-type/disp32
22035 }
22036
22037 {
22038 (lookup *(ebx+4) *(ebx+8))
22039 (is-simple-mu-type? %eax 2)
22040 3d/compare-eax-and 0/imm32/false
22041 74/jump-if-= break/disp8
22042 $check-mu-index-stmt:base-is-addr:
22043 (lookup *(ebx+0xc) *(ebx+0x10))
22044 (lookup *(eax+4) *(eax+8))
22045 (is-simple-mu-type? %eax 3)
22046 3d/compare-eax-and 0/imm32/false
22047 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
22048 $check-mu-index-stmt:check-base-addr-is-register:
22049 81 7/subop/compare *(ecx+0x18) 0/imm32
22050 0f 84/jump-if-= $check-mu-index-stmt:error-base-address-array-type-on-stack/disp32
22051 }
22052
22053 {
22054 (lookup *(ebx+4) *(ebx+8))
22055 (is-simple-mu-type? %eax 3)
22056 3d/compare-eax-and 0/imm32/false
22057 74/jump-if-= break/disp8
22058 $check-mu-index-stmt:base-is-array:
22059 81 7/subop/compare *(ecx+0x18) 0/imm32
22060 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-type-in-register/disp32
22061 }
22062
22063 {
22064 (lookup *(ebx+4) *(ebx+8))
22065 (is-simple-mu-type? %eax 2)
22066 3d/compare-eax-and 0/imm32/false
22067 74/jump-if-= break/disp8
22068 (lookup *(ebx+0xc) *(ebx+0x10))
22069 89/<- %ebx 0/r32/eax
22070 }
22071
22072
22073 (lookup *(esi+0xc) *(esi+0x10))
22074 (lookup *(eax+8) *(eax+0xc))
22075 $check-mu-index-stmt:check-single-inout:
22076 3d/compare-eax-and 0/imm32
22077 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
22078 (lookup *eax *(eax+4))
22079 89/<- %ecx 0/r32/eax
22080
22081
22082 (lookup *(ecx+8) *(ecx+0xc))
22083 89/<- %edx 0/r32/eax
22084
22085 81 7/subop/compare *edx 0/imm32/false
22086 {
22087 74/jump-if-= break/disp8
22088 $check-mu-index-stmt:index-type-is-atom:
22089 (is-simple-mu-type? %edx 0)
22090 3d/compare-eax-and 0/imm32/false
22091 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
22092 (is-simple-mu-type? %edx 1)
22093 3d/compare-eax-and 0/imm32/false
22094 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
22095 (is-simple-mu-type? %edx 7)
22096 3d/compare-eax-and 0/imm32/false
22097 0f 85/jump-if-!= $check-mu-index-stmt:error-index-offset-atom-type/disp32
22098 e9/jump $check-mu-index-stmt:error-invalid-index-type/disp32
22099 }
22100
22101 {
22102 75/jump-if-!= break/disp8
22103 $check-mu-index-stmt:index-type-is-non-atom:
22104 (lookup *(edx+4) *(edx+8))
22105 (is-simple-mu-type? %eax 7)
22106 3d/compare-eax-and 0/imm32/false
22107 0f 84/jump-if-= $check-mu-index-stmt:error-invalid-index-type/disp32
22108 }
22109 $check-mu-index-stmt:index-type-done:
22110
22111 {
22112 (is-simple-mu-type? %edx 0)
22113 3d/compare-eax-and 0/imm32/false
22114 75/jump-if-!= break/disp8
22115 $check-mu-index-stmt:check-index-in-register:
22116 81 7/subop/compare *(ecx+0x18) 0/imm32
22117 0f 84/jump-if-= $check-mu-index-stmt:error-index-on-stack/disp32
22118 }
22119
22120 {
22121 (is-simple-mu-type? %edx 1)
22122 3d/compare-eax-and 0/imm32/false
22123 74/jump-if-= break/disp8
22124 $check-mu-index-stmt:check-index-can-be-int:
22125 (lookup *(esi+0xc) *(esi+0x10))
22126 (lookup *eax *(eax+4))
22127 (array-element-size %eax)
22128 3d/compare-eax-and 1/imm32
22129 74/jump-if-= break/disp8
22130 3d/compare-eax-and 2/imm32
22131 74/jump-if-= break/disp8
22132 3d/compare-eax-and 4/imm32
22133 74/jump-if-= break/disp8
22134 3d/compare-eax-and 8/imm32
22135 74/jump-if-= break/disp8
22136 e9/jump $check-mu-index-stmt:error-index-needs-offset/disp32
22137 }
22138
22139 (lookup *(esi+0xc) *(esi+0x10))
22140 (lookup *(eax+8) *(eax+0xc))
22141 (lookup *(eax+8) *(eax+0xc))
22142 3d/compare-eax-and 0/imm32/false
22143 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-inouts/disp32
22144
22145
22146 (lookup *(esi+0x14) *(esi+0x18))
22147 3d/compare-eax-and 0/imm32/false
22148 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-outputs/disp32
22149 (lookup *eax *(eax+4))
22150 89/<- %edi 0/r32/eax
22151
22152
22153 (lookup *(edi+8) *(edi+0xc))
22154 89/<- %edx 0/r32/eax
22155 81 7/subop/compare *edx 0/imm32/false
22156 0f 85/jump-if-!= $check-mu-index-stmt:error-output-type-not-address/disp32
22157
22158 (lookup *(edx+4) *(edx+8))
22159 (is-simple-mu-type? %eax 2)
22160 3d/compare-eax-and 0/imm32/false
22161 0f 84/jump-if-= $check-mu-index-stmt:error-output-type-not-address/disp32
22162
22163 (type-tail %ebx)
22164 89/<- %ebx 0/r32/eax
22165 (type-tail %edx)
22166 (type-equal? %ebx %eax)
22167 3d/compare-eax-and 0/imm32/false
22168 0f 84/jump-if-= $check-mu-index-stmt:error-bad-output-type/disp32
22169
22170 (lookup *(esi+0x14) *(esi+0x18))
22171 (lookup *(eax+8) *(eax+0xc))
22172 3d/compare-eax-and 0/imm32/false
22173 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-outputs/disp32
22174 $check-mu-index-stmt:end:
22175
22176 5f/pop-to-edi
22177 5e/pop-to-esi
22178 5b/pop-to-ebx
22179 5a/pop-to-edx
22180 59/pop-to-ecx
22181 58/pop-to-eax
22182
22183 89/<- %esp 5/r32/ebp
22184 5d/pop-to-ebp
22185 c3/return
22186
22187 $check-mu-index-stmt:error-base-non-array-type:
22188 (write-buffered *(ebp+0x10) "fn ")
22189 8b/-> *(ebp+0xc) 0/r32/eax
22190 (lookup *eax *(eax+4))
22191 (write-buffered *(ebp+0x10) %eax)
22192 (write-buffered *(ebp+0x10) ": stmt index: var '")
22193 (lookup *ecx *(ecx+4))
22194 (write-buffered *(ebp+0x10) %eax)
22195 (write-buffered *(ebp+0x10) "' is not an array\n")
22196 (flush *(ebp+0x10))
22197 (stop *(ebp+0x14) 1)
22198
22199
22200 $check-mu-index-stmt:error-base-array-atom-type:
22201 (write-buffered *(ebp+0x10) "fn ")
22202 8b/-> *(ebp+0xc) 0/r32/eax
22203 (lookup *eax *(eax+4))
22204 (write-buffered *(ebp+0x10) %eax)
22205 (write-buffered *(ebp+0x10) ": stmt index: array '")
22206 (lookup *ecx *(ecx+4))
22207 (write-buffered *(ebp+0x10) %eax)
22208 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
22209 (flush *(ebp+0x10))
22210 (stop *(ebp+0x14) 1)
22211
22212
22213 $check-mu-index-stmt:error-base-address-array-type-on-stack:
22214 (write-buffered *(ebp+0x10) "fn ")
22215 8b/-> *(ebp+0xc) 0/r32/eax
22216 (lookup *eax *(eax+4))
22217 (write-buffered *(ebp+0x10) %eax)
22218 (write-buffered *(ebp+0x10) ": stmt index: var '")
22219 (lookup *ecx *(ecx+4))
22220 (write-buffered *(ebp+0x10) %eax)
22221 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
22222 (flush *(ebp+0x10))
22223 (stop *(ebp+0x14) 1)
22224
22225
22226 $check-mu-index-stmt:error-base-array-type-in-register:
22227 (write-buffered *(ebp+0x10) "fn ")
22228 8b/-> *(ebp+0xc) 0/r32/eax
22229 (lookup *eax *(eax+4))
22230 (write-buffered *(ebp+0x10) %eax)
22231 (write-buffered *(ebp+0x10) ": stmt index: var '")
22232 (lookup *ecx *(ecx+4))
22233 (write-buffered *(ebp+0x10) %eax)
22234 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
22235 (flush *(ebp+0x10))
22236 (stop *(ebp+0x14) 1)
22237
22238
22239 $check-mu-index-stmt:error-too-few-inouts:
22240 (write-buffered *(ebp+0x10) "fn ")
22241 8b/-> *(ebp+0xc) 0/r32/eax
22242 (lookup *eax *(eax+4))
22243 (write-buffered *(ebp+0x10) %eax)
22244 (write-buffered *(ebp+0x10) ": stmt index: too few inouts (2 required)\n")
22245 (flush *(ebp+0x10))
22246 (stop *(ebp+0x14) 1)
22247
22248
22249 $check-mu-index-stmt:error-invalid-index-type:
22250 (write-buffered *(ebp+0x10) "fn ")
22251 8b/-> *(ebp+0xc) 0/r32/eax
22252 (lookup *eax *(eax+4))
22253 (write-buffered *(ebp+0x10) %eax)
22254 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
22255 (lookup *ecx *(ecx+4))
22256 (write-buffered *(ebp+0x10) %eax)
22257 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
22258 (flush *(ebp+0x10))
22259 (stop *(ebp+0x14) 1)
22260
22261
22262 $check-mu-index-stmt:error-index-offset-atom-type:
22263 (write-buffered *(ebp+0x10) "fn ")
22264 8b/-> *(ebp+0xc) 0/r32/eax
22265 (lookup *eax *(eax+4))
22266 (write-buffered *(ebp+0x10) %eax)
22267 (write-buffered *(ebp+0x10) ": stmt index: offset '")
22268 (lookup *ecx *(ecx+4))
22269 (write-buffered *(ebp+0x10) %eax)
22270 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
22271 (flush *(ebp+0x10))
22272 (stop *(ebp+0x14) 1)
22273
22274
22275 $check-mu-index-stmt:error-index-on-stack:
22276 (write-buffered *(ebp+0x10) "fn ")
22277 8b/-> *(ebp+0xc) 0/r32/eax
22278 (lookup *eax *(eax+4))
22279 (write-buffered *(ebp+0x10) %eax)
22280 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
22281 (lookup *ecx *(ecx+4))
22282 (write-buffered *(ebp+0x10) %eax)
22283 (write-buffered *(ebp+0x10) "' must be in a register\n")
22284 (flush *(ebp+0x10))
22285 (stop *(ebp+0x14) 1)
22286
22287
22288 $check-mu-index-stmt:error-index-needs-offset:
22289 (write-buffered *(ebp+0x10) "fn ")
22290 8b/-> *(ebp+0xc) 0/r32/eax
22291 (lookup *eax *(eax+4))
22292 (write-buffered *(ebp+0x10) %eax)
22293 (write-buffered *(ebp+0x10) ": stmt index: cannot take an int for array '")
22294 (lookup *(esi+0xc) *(esi+0x10))
22295 (lookup *eax *(eax+4))
22296 (lookup *eax *(eax+4))
22297 (write-buffered *(ebp+0x10) %eax)
22298 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
22299 (flush *(ebp+0x10))
22300 (stop *(ebp+0x14) 1)
22301
22302
22303 $check-mu-index-stmt:error-too-many-inouts:
22304 (write-buffered *(ebp+0x10) "fn ")
22305 8b/-> *(ebp+0xc) 0/r32/eax
22306 (lookup *eax *(eax+4))
22307 (write-buffered *(ebp+0x10) %eax)
22308 (write-buffered *(ebp+0x10) ": stmt index: too many inouts (2 required)\n")
22309 (flush *(ebp+0x10))
22310 (stop *(ebp+0x14) 1)
22311
22312
22313 $check-mu-index-stmt:error-too-few-outputs:
22314 (write-buffered *(ebp+0x10) "fn ")
22315 8b/-> *(ebp+0xc) 0/r32/eax
22316 (lookup *eax *(eax+4))
22317 (write-buffered *(ebp+0x10) %eax)
22318 (write-buffered *(ebp+0x10) ": stmt index: must have an output\n")
22319 (flush *(ebp+0x10))
22320 (stop *(ebp+0x14) 1)
22321
22322
22323 $check-mu-index-stmt:error-too-many-outputs:
22324 (write-buffered *(ebp+0x10) "fn ")
22325 8b/-> *(ebp+0xc) 0/r32/eax
22326 (lookup *eax *(eax+4))
22327 (write-buffered *(ebp+0x10) %eax)
22328 (write-buffered *(ebp+0x10) ": stmt index: too many outputs (1 required)\n")
22329 (flush *(ebp+0x10))
22330 (stop *(ebp+0x14) 1)
22331
22332
22333 $check-mu-index-stmt:error-output-not-in-register:
22334 (write-buffered *(ebp+0x10) "fn ")
22335 8b/-> *(ebp+0xc) 0/r32/eax
22336 (lookup *eax *(eax+4))
22337 (write-buffered *(ebp+0x10) %eax)
22338 (write-buffered *(ebp+0x10) ": stmt index: output '")
22339 (lookup *edi *(edi+4))
22340 (write-buffered *(ebp+0x10) %eax)
22341 (write-buffered *(ebp+0x10) "' is not in a register\n")
22342 (flush *(ebp+0x10))
22343 (stop *(ebp+0x14) 1)
22344
22345
22346 $check-mu-index-stmt:error-output-type-not-address:
22347 (write-buffered *(ebp+0x10) "fn ")
22348 8b/-> *(ebp+0xc) 0/r32/eax
22349 (lookup *eax *(eax+4))
22350 (write-buffered *(ebp+0x10) %eax)
22351 (write-buffered *(ebp+0x10) ": stmt index: output '")
22352 (lookup *edi *(edi+4))
22353 (write-buffered *(ebp+0x10) %eax)
22354 (write-buffered *(ebp+0x10) "' must be an addr\n")
22355 (flush *(ebp+0x10))
22356 (stop *(ebp+0x14) 1)
22357
22358
22359 $check-mu-index-stmt:error-bad-output-type:
22360 (write-buffered *(ebp+0x10) "fn ")
22361 8b/-> *(ebp+0xc) 0/r32/eax
22362 (lookup *eax *(eax+4))
22363 (write-buffered *(ebp+0x10) %eax)
22364 (write-buffered *(ebp+0x10) ": stmt index: output '")
22365 (lookup *edi *(edi+4))
22366 (write-buffered *(ebp+0x10) %eax)
22367 (write-buffered *(ebp+0x10) "' does not have the right type\n")
22368 (flush *(ebp+0x10))
22369 (stop *(ebp+0x14) 1)
22370
22371
22372 check-mu-length-stmt:
22373
22374 55/push-ebp
22375 89/<- %ebp 4/r32/esp
22376
22377 50/push-eax
22378 51/push-ecx
22379 52/push-edx
22380 53/push-ebx
22381 56/push-esi
22382 57/push-edi
22383
22384 8b/-> *(ebp+8) 6/r32/esi
22385
22386
22387 (lookup *(esi+0xc) *(esi+0x10))
22388 $check-mu-length-stmt:check-no-inouts:
22389 3d/compare-eax-and 0/imm32
22390 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-inouts/disp32
22391 (lookup *eax *(eax+4))
22392 89/<- %ecx 0/r32/eax
22393
22394
22395 (lookup *(ecx+8) *(ecx+0xc))
22396 89/<- %ebx 0/r32/eax
22397
22398 81 7/subop/compare *ebx 0/imm32/false
22399 {
22400 74/jump-if-= break/disp8
22401 (is-simple-mu-type? %ebx 3)
22402 3d/compare-eax-and 0/imm32/false
22403 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-atom-type/disp32
22404 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
22405 }
22406 $check-mu-length-stmt:base-is-compound:
22407
22408 {
22409 (lookup *(ebx+4) *(ebx+8))
22410 (is-simple-mu-type? %eax 2)
22411 3d/compare-eax-and 0/imm32/false
22412 75/jump-if-!= break/disp8
22413 (lookup *(ebx+4) *(ebx+8))
22414 (is-simple-mu-type? %eax 3)
22415 3d/compare-eax-and 0/imm32/false
22416 75/jump-if-!= break/disp8
22417 e9/jump $check-mu-length-stmt:error-base-non-array-type/disp32
22418 }
22419
22420 {
22421 (lookup *(ebx+4) *(ebx+8))
22422 (is-simple-mu-type? %eax 2)
22423 3d/compare-eax-and 0/imm32/false
22424 74/jump-if-= break/disp8
22425 $check-mu-length-stmt:base-is-addr:
22426 (lookup *(ebx+0xc) *(ebx+0x10))
22427 (lookup *(eax+4) *(eax+8))
22428 (is-simple-mu-type? %eax 3)
22429 3d/compare-eax-and 0/imm32/false
22430 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
22431 $check-mu-length-stmt:check-base-addr-is-register:
22432 81 7/subop/compare *(ecx+0x18) 0/imm32
22433 0f 84/jump-if-= $check-mu-length-stmt:error-base-address-array-type-on-stack/disp32
22434 }
22435
22436 {
22437 (lookup *(ebx+4) *(ebx+8))
22438 (is-simple-mu-type? %eax 3)
22439 3d/compare-eax-and 0/imm32/false
22440 74/jump-if-= break/disp8
22441 $check-mu-length-stmt:base-is-array:
22442 81 7/subop/compare *(ecx+0x18) 0/imm32
22443 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-type-in-register/disp32
22444 }
22445
22446 {
22447 (lookup *(ebx+4) *(ebx+8))
22448 (is-simple-mu-type? %eax 2)
22449 3d/compare-eax-and 0/imm32/false
22450 74/jump-if-= break/disp8
22451 (lookup *(ebx+0xc) *(ebx+0x10))
22452 89/<- %ebx 0/r32/eax
22453 }
22454
22455 (lookup *(esi+0xc) *(esi+0x10))
22456 (lookup *(eax+8) *(eax+0xc))
22457 3d/compare-eax-and 0/imm32/false
22458 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-inouts/disp32
22459
22460
22461 (lookup *(esi+0x14) *(esi+0x18))
22462 3d/compare-eax-and 0/imm32/false
22463 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-outputs/disp32
22464 (lookup *eax *(eax+4))
22465 89/<- %edi 0/r32/eax
22466
22467
22468 (lookup *(edi+8) *(edi+0xc))
22469 (is-simple-mu-type? %eax 1)
22470 3d/compare-eax-and 0/imm32/false
22471 0f 84/jump-if-= $check-mu-length-stmt:error-invalid-output-type/disp32
22472
22473 (lookup *(esi+0x14) *(esi+0x18))
22474 (lookup *(eax+8) *(eax+0xc))
22475 3d/compare-eax-and 0/imm32/false
22476 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-outputs/disp32
22477 $check-mu-length-stmt:end:
22478
22479 5f/pop-to-edi
22480 5e/pop-to-esi
22481 5b/pop-to-ebx
22482 5a/pop-to-edx
22483 59/pop-to-ecx
22484 58/pop-to-eax
22485
22486 89/<- %esp 5/r32/ebp
22487 5d/pop-to-ebp
22488 c3/return
22489
22490 $check-mu-length-stmt:error-base-non-array-type:
22491 (write-buffered *(ebp+0x10) "fn ")
22492 8b/-> *(ebp+0xc) 0/r32/eax
22493 (lookup *eax *(eax+4))
22494 (write-buffered *(ebp+0x10) %eax)
22495 (write-buffered *(ebp+0x10) ": stmt length: var '")
22496 (lookup *ecx *(ecx+4))
22497 (write-buffered *(ebp+0x10) %eax)
22498 (write-buffered *(ebp+0x10) "' is not an array\n")
22499 (flush *(ebp+0x10))
22500 (stop *(ebp+0x14) 1)
22501
22502
22503 $check-mu-length-stmt:error-base-array-atom-type:
22504 (write-buffered *(ebp+0x10) "fn ")
22505 8b/-> *(ebp+0xc) 0/r32/eax
22506 (lookup *eax *(eax+4))
22507 (write-buffered *(ebp+0x10) %eax)
22508 (write-buffered *(ebp+0x10) ": stmt length: array '")
22509 (lookup *ecx *(ecx+4))
22510 (write-buffered *(ebp+0x10) %eax)
22511 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
22512 (flush *(ebp+0x10))
22513 (stop *(ebp+0x14) 1)
22514
22515
22516 $check-mu-length-stmt:error-base-address-array-type-on-stack:
22517 (write-buffered *(ebp+0x10) "fn ")
22518 8b/-> *(ebp+0xc) 0/r32/eax
22519 (lookup *eax *(eax+4))
22520 (write-buffered *(ebp+0x10) %eax)
22521 (write-buffered *(ebp+0x10) ": stmt length: var '")
22522 (lookup *ecx *(ecx+4))
22523 (write-buffered *(ebp+0x10) %eax)
22524 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
22525 (flush *(ebp+0x10))
22526 (stop *(ebp+0x14) 1)
22527
22528
22529 $check-mu-length-stmt:error-base-array-type-in-register:
22530 (write-buffered *(ebp+0x10) "fn ")
22531 8b/-> *(ebp+0xc) 0/r32/eax
22532 (lookup *eax *(eax+4))
22533 (write-buffered *(ebp+0x10) %eax)
22534 (write-buffered *(ebp+0x10) ": stmt length: var '")
22535 (lookup *ecx *(ecx+4))
22536 (write-buffered *(ebp+0x10) %eax)
22537 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
22538 (flush *(ebp+0x10))
22539 (stop *(ebp+0x14) 1)
22540
22541
22542 $check-mu-length-stmt:error-too-few-inouts:
22543 (write-buffered *(ebp+0x10) "fn ")
22544 8b/-> *(ebp+0xc) 0/r32/eax
22545 (lookup *eax *(eax+4))
22546 (write-buffered *(ebp+0x10) %eax)
22547 (write-buffered *(ebp+0x10) ": stmt length: too few inouts (1 required)\n")
22548 (flush *(ebp+0x10))
22549 (stop *(ebp+0x14) 1)
22550
22551
22552 $check-mu-length-stmt:error-invalid-index-type:
22553 (write-buffered *(ebp+0x10) "fn ")
22554 8b/-> *(ebp+0xc) 0/r32/eax
22555 (lookup *eax *(eax+4))
22556 (write-buffered *(ebp+0x10) %eax)
22557 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
22558 (lookup *ecx *(ecx+4))
22559 (write-buffered *(ebp+0x10) %eax)
22560 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
22561 (flush *(ebp+0x10))
22562 (stop *(ebp+0x14) 1)
22563
22564
22565 $check-mu-length-stmt:error-index-offset-atom-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 length: offset '")
22571 (lookup *ecx *(ecx+4))
22572 (write-buffered *(ebp+0x10) %eax)
22573 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
22574 (flush *(ebp+0x10))
22575 (stop *(ebp+0x14) 1)
22576
22577
22578 $check-mu-length-stmt:error-index-on-stack:
22579 (write-buffered *(ebp+0x10) "fn ")
22580 8b/-> *(ebp+0xc) 0/r32/eax
22581 (lookup *eax *(eax+4))
22582 (write-buffered *(ebp+0x10) %eax)
22583 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
22584 (lookup *ecx *(ecx+4))
22585 (write-buffered *(ebp+0x10) %eax)
22586 (write-buffered *(ebp+0x10) "' must be in a register\n")
22587 (flush *(ebp+0x10))
22588 (stop *(ebp+0x14) 1)
22589
22590
22591 $check-mu-length-stmt:error-index-needs-offset:
22592 (write-buffered *(ebp+0x10) "fn ")
22593 8b/-> *(ebp+0xc) 0/r32/eax
22594 (lookup *eax *(eax+4))
22595 (write-buffered *(ebp+0x10) %eax)
22596 (write-buffered *(ebp+0x10) ": stmt length: cannot take an int for array '")
22597 (lookup *(esi+0xc) *(esi+0x10))
22598 (lookup *eax *(eax+4))
22599 (lookup *eax *(eax+4))
22600 (write-buffered *(ebp+0x10) %eax)
22601 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
22602 (flush *(ebp+0x10))
22603 (stop *(ebp+0x14) 1)
22604
22605
22606 $check-mu-length-stmt:error-too-many-inouts:
22607 (write-buffered *(ebp+0x10) "fn ")
22608 8b/-> *(ebp+0xc) 0/r32/eax
22609 (lookup *eax *(eax+4))
22610 (write-buffered *(ebp+0x10) %eax)
22611 (write-buffered *(ebp+0x10) ": stmt length: too many inouts (1 required)\n")
22612 (flush *(ebp+0x10))
22613 (stop *(ebp+0x14) 1)
22614
22615
22616 $check-mu-length-stmt:error-too-few-outputs:
22617 (write-buffered *(ebp+0x10) "fn ")
22618 8b/-> *(ebp+0xc) 0/r32/eax
22619 (lookup *eax *(eax+4))
22620 (write-buffered *(ebp+0x10) %eax)
22621 (write-buffered *(ebp+0x10) ": stmt length: must have an output\n")
22622 (flush *(ebp+0x10))
22623 (stop *(ebp+0x14) 1)
22624
22625
22626 $check-mu-length-stmt:error-too-many-outputs:
22627 (write-buffered *(ebp+0x10) "fn ")
22628 8b/-> *(ebp+0xc) 0/r32/eax
22629 (lookup *eax *(eax+4))
22630 (write-buffered *(ebp+0x10) %eax)
22631 (write-buffered *(ebp+0x10) ": stmt length: too many outputs (1 required)\n")
22632 (flush *(ebp+0x10))
22633 (stop *(ebp+0x14) 1)
22634
22635
22636 $check-mu-length-stmt:error-output-not-in-register:
22637 (write-buffered *(ebp+0x10) "fn ")
22638 8b/-> *(ebp+0xc) 0/r32/eax
22639 (lookup *eax *(eax+4))
22640 (write-buffered *(ebp+0x10) %eax)
22641 (write-buffered *(ebp+0x10) ": stmt length: output '")
22642 (lookup *edi *(edi+4))
22643 (write-buffered *(ebp+0x10) %eax)
22644 (write-buffered *(ebp+0x10) "' is not in a register\n")
22645 (flush *(ebp+0x10))
22646 (stop *(ebp+0x14) 1)
22647
22648
22649 $check-mu-length-stmt:error-invalid-output-type:
22650 (write-buffered *(ebp+0x10) "fn ")
22651 8b/-> *(ebp+0xc) 0/r32/eax
22652 (lookup *eax *(eax+4))
22653 (write-buffered *(ebp+0x10) %eax)
22654 (write-buffered *(ebp+0x10) ": stmt length: output '")
22655 (lookup *edi *(edi+4))
22656 (write-buffered *(ebp+0x10) %eax)
22657 (write-buffered *(ebp+0x10) "' does not have the right type\n")
22658 (flush *(ebp+0x10))
22659 (stop *(ebp+0x14) 1)
22660
22661
22662 check-mu-compute-offset-stmt:
22663
22664 55/push-ebp
22665 89/<- %ebp 4/r32/esp
22666
22667 50/push-eax
22668 51/push-ecx
22669 52/push-edx
22670 53/push-ebx
22671 56/push-esi
22672 57/push-edi
22673
22674 8b/-> *(ebp+8) 6/r32/esi
22675
22676
22677 (lookup *(esi+0xc) *(esi+0x10))
22678 $check-mu-compute-offset-stmt:check-no-inouts:
22679 3d/compare-eax-and 0/imm32
22680 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
22681 (lookup *eax *(eax+4))
22682 89/<- %ecx 0/r32/eax
22683
22684
22685 (lookup *(ecx+8) *(ecx+0xc))
22686 89/<- %ebx 0/r32/eax
22687
22688 81 7/subop/compare *ebx 0/imm32/false
22689 {
22690 74/jump-if-= break/disp8
22691 (is-simple-mu-type? %ebx 3)
22692 3d/compare-eax-and 0/imm32/false
22693 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-base-array-atom-type/disp32
22694 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
22695 }
22696 $check-mu-compute-offset-stmt:base-is-compound:
22697
22698 {
22699 (lookup *(ebx+4) *(ebx+8))
22700 (is-simple-mu-type? %eax 2)
22701 3d/compare-eax-and 0/imm32/false
22702 75/jump-if-!= break/disp8
22703 (lookup *(ebx+4) *(ebx+8))
22704 (is-simple-mu-type? %eax 3)
22705 3d/compare-eax-and 0/imm32/false
22706 75/jump-if-!= break/disp8
22707 e9/jump $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
22708 }
22709
22710 {
22711 (lookup *(ebx+4) *(ebx+8))
22712 (is-simple-mu-type? %eax 2)
22713 3d/compare-eax-and 0/imm32/false
22714 74/jump-if-= break/disp8
22715 $check-mu-compute-offset-stmt:base-is-addr:
22716 (lookup *(ebx+0xc) *(ebx+0x10))
22717 (lookup *(eax+4) *(eax+8))
22718 (is-simple-mu-type? %eax 3)
22719 3d/compare-eax-and 0/imm32/false
22720 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
22721 }
22722
22723 {
22724 (lookup *(ebx+4) *(ebx+8))
22725 (is-simple-mu-type? %eax 2)
22726 3d/compare-eax-and 0/imm32/false
22727 74/jump-if-= break/disp8
22728 (lookup *(ebx+0xc) *(ebx+0x10))
22729 89/<- %ebx 0/r32/eax
22730 }
22731
22732
22733 (lookup *(esi+0xc) *(esi+0x10))
22734 (lookup *(eax+8) *(eax+0xc))
22735 $check-mu-compute-offset-stmt:check-single-inout:
22736 3d/compare-eax-and 0/imm32
22737 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
22738 (lookup *eax *(eax+4))
22739 89/<- %ecx 0/r32/eax
22740
22741
22742 (lookup *(ecx+8) *(ecx+0xc))
22743 89/<- %edx 0/r32/eax
22744
22745 81 7/subop/compare *edx 0/imm32/false
22746 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
22747 {
22748 $check-mu-compute-offset-stmt:index-type-is-atom:
22749 (is-simple-mu-type? %edx 0)
22750 3d/compare-eax-and 0/imm32/false
22751 75/jump-if-!= break/disp8
22752 (is-simple-mu-type? %edx 1)
22753 3d/compare-eax-and 0/imm32/false
22754 75/jump-if-!= break/disp8
22755 e9/jump $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
22756 }
22757
22758 (lookup *(esi+0xc) *(esi+0x10))
22759 (lookup *(eax+8) *(eax+0xc))
22760 (lookup *(eax+8) *(eax+0xc))
22761 3d/compare-eax-and 0/imm32/false
22762 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-inouts/disp32
22763
22764
22765 (lookup *(esi+0x14) *(esi+0x18))
22766 3d/compare-eax-and 0/imm32/false
22767 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-outputs/disp32
22768 (lookup *eax *(eax+4))
22769 89/<- %edi 0/r32/eax
22770
22771
22772 (lookup *(edi+8) *(edi+0xc))
22773 89/<- %edx 0/r32/eax
22774 81 7/subop/compare *edx 0/imm32/false
22775 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
22776
22777 (lookup *(edx+4) *(edx+8))
22778 (is-simple-mu-type? %eax 7)
22779 3d/compare-eax-and 0/imm32/false
22780 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
22781
22782 (type-tail %ebx)
22783 89/<- %ebx 0/r32/eax
22784 (type-tail %edx)
22785 (type-equal? %ebx %eax)
22786 3d/compare-eax-and 0/imm32/false
22787 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-bad-output-type/disp32
22788
22789 (lookup *(esi+0x14) *(esi+0x18))
22790 (lookup *(eax+8) *(eax+0xc))
22791 3d/compare-eax-and 0/imm32/false
22792 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-outputs/disp32
22793 $check-mu-compute-offset-stmt:end:
22794
22795 5f/pop-to-edi
22796 5e/pop-to-esi
22797 5b/pop-to-ebx
22798 5a/pop-to-edx
22799 59/pop-to-ecx
22800 58/pop-to-eax
22801
22802 89/<- %esp 5/r32/ebp
22803 5d/pop-to-ebp
22804 c3/return
22805
22806 $check-mu-compute-offset-stmt:error-base-non-array-type:
22807 (write-buffered *(ebp+0x10) "fn ")
22808 8b/-> *(ebp+0xc) 0/r32/eax
22809 (lookup *eax *(eax+4))
22810 (write-buffered *(ebp+0x10) %eax)
22811 (write-buffered *(ebp+0x10) ": stmt compute-offset: var '")
22812 (lookup *ecx *(ecx+4))
22813 (write-buffered *(ebp+0x10) %eax)
22814 (write-buffered *(ebp+0x10) "' is not an array\n")
22815 (flush *(ebp+0x10))
22816 (stop *(ebp+0x14) 1)
22817
22818
22819 $check-mu-compute-offset-stmt:error-base-array-atom-type:
22820 (write-buffered *(ebp+0x10) "fn ")
22821 8b/-> *(ebp+0xc) 0/r32/eax
22822 (lookup *eax *(eax+4))
22823 (write-buffered *(ebp+0x10) %eax)
22824 (write-buffered *(ebp+0x10) ": stmt compute-offset: array '")
22825 (lookup *ecx *(ecx+4))
22826 (write-buffered *(ebp+0x10) %eax)
22827 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
22828 (flush *(ebp+0x10))
22829 (stop *(ebp+0x14) 1)
22830
22831
22832 $check-mu-compute-offset-stmt:error-too-few-inouts:
22833 (write-buffered *(ebp+0x10) "fn ")
22834 8b/-> *(ebp+0xc) 0/r32/eax
22835 (lookup *eax *(eax+4))
22836 (write-buffered *(ebp+0x10) %eax)
22837 (write-buffered *(ebp+0x10) ": stmt compute-offset: too few inouts (2 required)\n")
22838 (flush *(ebp+0x10))
22839 (stop *(ebp+0x14) 1)
22840
22841
22842 $check-mu-compute-offset-stmt:error-invalid-index-type:
22843 (write-buffered *(ebp+0x10) "fn ")
22844 8b/-> *(ebp+0xc) 0/r32/eax
22845 (lookup *eax *(eax+4))
22846 (write-buffered *(ebp+0x10) %eax)
22847 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
22848 (lookup *ecx *(ecx+4))
22849 (write-buffered *(ebp+0x10) %eax)
22850 (write-buffered *(ebp+0x10) "' must be an int\n")
22851 (flush *(ebp+0x10))
22852 (stop *(ebp+0x14) 1)
22853
22854
22855 $check-mu-compute-offset-stmt:error-index-offset-atom-type:
22856 (write-buffered *(ebp+0x10) "fn ")
22857 8b/-> *(ebp+0xc) 0/r32/eax
22858 (lookup *eax *(eax+4))
22859 (write-buffered *(ebp+0x10) %eax)
22860 (write-buffered *(ebp+0x10) ": stmt compute-offset: offset '")
22861 (lookup *ecx *(ecx+4))
22862 (write-buffered *(ebp+0x10) %eax)
22863 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
22864 (flush *(ebp+0x10))
22865 (stop *(ebp+0x14) 1)
22866
22867
22868 $check-mu-compute-offset-stmt:error-index-on-stack:
22869 (write-buffered *(ebp+0x10) "fn ")
22870 8b/-> *(ebp+0xc) 0/r32/eax
22871 (lookup *eax *(eax+4))
22872 (write-buffered *(ebp+0x10) %eax)
22873 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
22874 (lookup *ecx *(ecx+4))
22875 (write-buffered *(ebp+0x10) %eax)
22876 (write-buffered *(ebp+0x10) "' must be in a register\n")
22877 (flush *(ebp+0x10))
22878 (stop *(ebp+0x14) 1)
22879
22880
22881 $check-mu-compute-offset-stmt:error-too-many-inouts:
22882 (write-buffered *(ebp+0x10) "fn ")
22883 8b/-> *(ebp+0xc) 0/r32/eax
22884 (lookup *eax *(eax+4))
22885 (write-buffered *(ebp+0x10) %eax)
22886 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many inouts (2 required)\n")
22887 (flush *(ebp+0x10))
22888 (stop *(ebp+0x14) 1)
22889
22890
22891 $check-mu-compute-offset-stmt:error-too-few-outputs:
22892 (write-buffered *(ebp+0x10) "fn ")
22893 8b/-> *(ebp+0xc) 0/r32/eax
22894 (lookup *eax *(eax+4))
22895 (write-buffered *(ebp+0x10) %eax)
22896 (write-buffered *(ebp+0x10) ": stmt compute-offset: must have an output\n")
22897 (flush *(ebp+0x10))
22898 (stop *(ebp+0x14) 1)
22899
22900
22901 $check-mu-compute-offset-stmt:error-too-many-outputs:
22902 (write-buffered *(ebp+0x10) "fn ")
22903 8b/-> *(ebp+0xc) 0/r32/eax
22904 (lookup *eax *(eax+4))
22905 (write-buffered *(ebp+0x10) %eax)
22906 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many outputs (1 required)\n")
22907 (flush *(ebp+0x10))
22908 (stop *(ebp+0x14) 1)
22909
22910
22911 $check-mu-compute-offset-stmt:error-output-not-in-register:
22912 (write-buffered *(ebp+0x10) "fn ")
22913 8b/-> *(ebp+0xc) 0/r32/eax
22914 (lookup *eax *(eax+4))
22915 (write-buffered *(ebp+0x10) %eax)
22916 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
22917 (lookup *edi *(edi+4))
22918 (write-buffered *(ebp+0x10) %eax)
22919 (write-buffered *(ebp+0x10) "' is not in a register\n")
22920 (flush *(ebp+0x10))
22921 (stop *(ebp+0x14) 1)
22922
22923
22924 $check-mu-compute-offset-stmt:error-output-type-not-offset:
22925 (write-buffered *(ebp+0x10) "fn ")
22926 8b/-> *(ebp+0xc) 0/r32/eax
22927 (lookup *eax *(eax+4))
22928 (write-buffered *(ebp+0x10) %eax)
22929 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
22930 (lookup *edi *(edi+4))
22931 (write-buffered *(ebp+0x10) %eax)
22932 (write-buffered *(ebp+0x10) "' must be an offset\n")
22933 (flush *(ebp+0x10))
22934 (stop *(ebp+0x14) 1)
22935
22936
22937 $check-mu-compute-offset-stmt:error-bad-output-type:
22938 (write-buffered *(ebp+0x10) "fn ")
22939 8b/-> *(ebp+0xc) 0/r32/eax
22940 (lookup *eax *(eax+4))
22941 (write-buffered *(ebp+0x10) %eax)
22942 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
22943 (lookup *edi *(edi+4))
22944 (write-buffered *(ebp+0x10) %eax)
22945 (write-buffered *(ebp+0x10) "' does not have the right type\n")
22946 (flush *(ebp+0x10))
22947 (stop *(ebp+0x14) 1)
22948
22949
22950 check-mu-copy-object-stmt:
22951
22952 55/push-ebp
22953 89/<- %ebp 4/r32/esp
22954
22955 50/push-eax
22956 51/push-ecx
22957 53/push-ebx
22958 56/push-esi
22959 57/push-edi
22960
22961 8b/-> *(ebp+8) 6/r32/esi
22962 $check-mu-copy-object-stmt:check-for-output:
22963
22964 (lookup *(esi+0x14) *(esi+0x18))
22965 3d/compare-eax-and 0/imm32
22966 0f 85/jump-if-!= $check-mu-copy-object-stmt:error-too-many-outputs/disp32
22967 $check-mu-copy-object-stmt:get-left:
22968
22969 (lookup *(esi+0xc) *(esi+0x10))
22970 89/<- %edi 0/r32/eax
22971
22972 3d/compare-eax-and 0/imm32
22973 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
22974 $check-mu-copy-object-stmt:get-src:
22975
22976 (lookup *(edi+8) *(edi+0xc))
22977 89/<- %esi 0/r32/eax
22978
22979 3d/compare-eax-and 0/imm32
22980 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
22981
22982 (lookup *(esi+8) *(esi+0xc))
22983 3d/compare-eax-and 0/imm32
22984 0f 85/jump-if-!= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
22985 $check-mu-copy-object-stmt:types:
22986
22987 (lookup *esi *(esi+4))
22988 (lookup *(eax+8) *(eax+0xc))
22989 89/<- %ecx 0/r32/eax
22990
22991 8b/-> *(esi+0x10) 0/r32/eax
22992 3d/compare-eax-and 0/imm32/false
22993 {
22994 74/jump-if-= break/disp8
22995 (lookup *(ecx+0xc) *(ecx+0x10))
22996
22997 81 7/subop/compare *(eax+0xc) 0/imm32
22998 {
22999 75/jump-if-!= break/disp8
23000 (lookup *(eax+4) *(eax+8))
23001 }
23002 89/<- %ecx 0/r32/eax
23003 }
23004
23005 (is-mu-addr-type? %ecx)
23006 3d/compare-eax-and 0/imm32/false
23007 0f 84/jump-if-= $check-mu-copy-object-stmt:error-invalid-types/disp32
23008
23009 (lookup *edi *(edi+4))
23010 (lookup *(eax+8) *(eax+0xc))
23011 89/<- %ebx 0/r32/eax
23012
23013 8b/-> *(edi+0x10) 0/r32/eax
23014 3d/compare-eax-and 0/imm32/false
23015 {
23016 74/jump-if-= break/disp8
23017 (lookup *(ebx+0xc) *(ebx+0x10))
23018
23019 81 7/subop/compare *(eax+0xc) 0/imm32
23020 {
23021 75/jump-if-!= break/disp8
23022 (lookup *(eax+4) *(eax+8))
23023 }
23024 89/<- %ebx 0/r32/eax
23025 }
23026
23027 (type-equal? %ecx %ebx)
23028 3d/compare-eax-and 0/imm32
23029 0f 84/jump-if-= $check-mu-copy-object-stmt:error-invalid-types/disp32
23030 $check-mu-copy-object-stmt:end:
23031
23032 5f/pop-to-edi
23033 5e/pop-to-esi
23034 5b/pop-to-ebx
23035 59/pop-to-ecx
23036 58/pop-to-eax
23037
23038 89/<- %esp 5/r32/ebp
23039 5d/pop-to-ebp
23040 c3/return
23041
23042 $check-mu-copy-object-stmt:error-incorrect-inouts:
23043 (write-buffered *(ebp+0x10) "fn ")
23044 8b/-> *(ebp+0xc) 0/r32/eax
23045 (lookup *eax *(eax+4))
23046 (write-buffered *(ebp+0x10) %eax)
23047 (write-buffered *(ebp+0x10) ": stmt 'copy-object' must have two inouts\n")
23048 (flush *(ebp+0x10))
23049 (stop *(ebp+0x14) 1)
23050
23051
23052 $check-mu-copy-object-stmt:error-too-many-outputs:
23053 (write-buffered *(ebp+0x10) "fn ")
23054 8b/-> *(ebp+0xc) 0/r32/eax
23055 (lookup *eax *(eax+4))
23056 (write-buffered *(ebp+0x10) %eax)
23057 (write-buffered *(ebp+0x10) ": stmt 'copy-object' must not have any outputs\n")
23058 (flush *(ebp+0x10))
23059 (stop *(ebp+0x14) 1)
23060
23061
23062 $check-mu-copy-object-stmt:error-invalid-types:
23063 (write-buffered *(ebp+0x10) "fn ")
23064 8b/-> *(ebp+0xc) 0/r32/eax
23065 (lookup *eax *(eax+4))
23066 (write-buffered *(ebp+0x10) %eax)
23067 (write-buffered *(ebp+0x10) ": stmt copy-object: two inouts with identical addr types expected\n")
23068 (flush *(ebp+0x10))
23069 (stop *(ebp+0x14) 1)
23070
23071
23072 check-mu-clear-object-stmt:
23073
23074 55/push-ebp
23075 89/<- %ebp 4/r32/esp
23076
23077 50/push-eax
23078 51/push-ecx
23079 53/push-ebx
23080 56/push-esi
23081 57/push-edi
23082
23083 8b/-> *(ebp+8) 6/r32/esi
23084 $check-mu-clear-object-stmt:check-for-output:
23085
23086 (lookup *(esi+0x14) *(esi+0x18))
23087 3d/compare-eax-and 0/imm32
23088 0f 85/jump-if-!= $check-mu-clear-object-stmt:error-too-many-outputs/disp32
23089 $check-mu-clear-object-stmt:get-left:
23090
23091 (lookup *(esi+0xc) *(esi+0x10))
23092 89/<- %edi 0/r32/eax
23093
23094 3d/compare-eax-and 0/imm32
23095 0f 84/jump-if-= $check-mu-clear-object-stmt:error-incorrect-inouts/disp32
23096 $check-mu-clear-object-stmt:get-src:
23097
23098 (lookup *(edi+8) *(edi+0xc))
23099 3d/compare-eax-and 0/imm32
23100 0f 85/jump-if-!= $check-mu-clear-object-stmt:error-incorrect-inouts/disp32
23101 $check-mu-clear-object-stmt:types:
23102
23103 (lookup *edi *(edi+4))
23104 (lookup *(eax+8) *(eax+0xc))
23105 89/<- %ecx 0/r32/eax
23106
23107 8b/-> *(edi+0x10) 0/r32/eax
23108 3d/compare-eax-and 0/imm32/false
23109 {
23110 74/jump-if-= break/disp8
23111 (lookup *(ecx+0xc) *(ecx+0x10))
23112
23113 81 7/subop/compare *(eax+0xc) 0/imm32
23114 {
23115 75/jump-if-!= break/disp8
23116 (lookup *(eax+4) *(eax+8))
23117 }
23118 89/<- %ecx 0/r32/eax
23119 }
23120
23121 (is-mu-addr-type? %ecx)
23122 3d/compare-eax-and 0/imm32/false
23123 0f 84/jump-if-= $check-mu-clear-object-stmt:error-invalid-type/disp32
23124 $check-mu-clear-object-stmt:end:
23125
23126 5f/pop-to-edi
23127 5e/pop-to-esi
23128 5b/pop-to-ebx
23129 59/pop-to-ecx
23130 58/pop-to-eax
23131
23132 89/<- %esp 5/r32/ebp
23133 5d/pop-to-ebp
23134 c3/return
23135
23136 $check-mu-clear-object-stmt:error-incorrect-inouts:
23137 (write-buffered *(ebp+0x10) "fn ")
23138 8b/-> *(ebp+0xc) 0/r32/eax
23139 (lookup *eax *(eax+4))
23140 (write-buffered *(ebp+0x10) %eax)
23141 (write-buffered *(ebp+0x10) ": stmt 'clear-object' must have a single inout\n")
23142 (flush *(ebp+0x10))
23143 (stop *(ebp+0x14) 1)
23144
23145
23146 $check-mu-clear-object-stmt:error-too-many-outputs:
23147 (write-buffered *(ebp+0x10) "fn ")
23148 8b/-> *(ebp+0xc) 0/r32/eax
23149 (lookup *eax *(eax+4))
23150 (write-buffered *(ebp+0x10) %eax)
23151 (write-buffered *(ebp+0x10) ": stmt 'clear-object' must not have any outputs\n")
23152 (flush *(ebp+0x10))
23153 (stop *(ebp+0x14) 1)
23154
23155
23156 $check-mu-clear-object-stmt:error-invalid-type:
23157 (write-buffered *(ebp+0x10) "fn ")
23158 8b/-> *(ebp+0xc) 0/r32/eax
23159 (lookup *eax *(eax+4))
23160 (write-buffered *(ebp+0x10) %eax)
23161 (write-buffered *(ebp+0x10) ": stmt clear-object: inout must have an addr type\n")
23162 (flush *(ebp+0x10))
23163 (stop *(ebp+0x14) 1)
23164
23165
23166 check-mu-allocate-stmt:
23167
23168 55/push-ebp
23169 89/<- %ebp 4/r32/esp
23170
23171 50/push-eax
23172 53/push-ebx
23173 56/push-esi
23174 57/push-edi
23175
23176 8b/-> *(ebp+8) 6/r32/esi
23177 $check-mu-allocate-stmt:check-for-output:
23178
23179 (lookup *(esi+0x14) *(esi+0x18))
23180 3d/compare-eax-and 0/imm32
23181 0f 85/jump-if-!= $check-mu-allocate-stmt:error-too-many-outputs/disp32
23182 $check-mu-allocate-stmt:get-target:
23183
23184 (lookup *(esi+0xc) *(esi+0x10))
23185 89/<- %edi 0/r32/eax
23186
23187 3d/compare-eax-and 0/imm32
23188 0f 84/jump-if-= $check-mu-allocate-stmt:error-incorrect-inouts/disp32
23189
23190 (lookup *(edi+8) *(edi+0xc))
23191 3d/compare-eax-and 0/imm32
23192 0f 85/jump-if-!= $check-mu-allocate-stmt:error-incorrect-inouts/disp32
23193 $check-mu-allocate-stmt:check-type:
23194
23195 (lookup *edi *(edi+4))
23196 (lookup *(eax+8) *(eax+0xc))
23197 89/<- %ebx 0/r32/eax
23198
23199 8b/-> *(edi+0x10) 0/r32/eax
23200 3d/compare-eax-and 0/imm32/false
23201 {
23202 74/jump-if-= break/disp8
23203 (lookup *(ebx+0xc) *(ebx+0x10))
23204
23205 81 7/subop/compare *(eax+0xc) 0/imm32
23206 {
23207 75/jump-if-!= break/disp8
23208 (lookup *(eax+4) *(eax+8))
23209 }
23210 89/<- %ebx 0/r32/eax
23211 }
23212
23213 (is-mu-addr-type? %ebx)
23214 3d/compare-eax-and 0/imm32/false
23215 0f 84/jump-if-= $check-mu-allocate-stmt:error-invalid-type/disp32
23216
23217 (lookup *(ebx+0xc) *(ebx+0x10))
23218 81 7/subop/compare *eax 0/imm32/false
23219 0f 85/jump-if-!= $check-mu-allocate-stmt:error-invalid-type/disp32
23220
23221 (lookup *(eax+4) *(eax+8))
23222 (is-simple-mu-type? %eax 4)
23223 3d/compare-eax-and 0/imm32/false
23224 0f 84/jump-if-= $check-mu-allocate-stmt:error-invalid-type/disp32
23225 $check-mu-allocate-stmt:end:
23226
23227 5f/pop-to-edi
23228 5e/pop-to-esi
23229 5b/pop-to-ebx
23230 58/pop-to-eax
23231
23232 89/<- %esp 5/r32/ebp
23233 5d/pop-to-ebp
23234 c3/return
23235
23236 $check-mu-allocate-stmt:error-incorrect-inouts:
23237 (write-buffered *(ebp+0x10) "fn ")
23238 8b/-> *(ebp+0xc) 0/r32/eax
23239 (lookup *eax *(eax+4))
23240 (write-buffered *(ebp+0x10) %eax)
23241 (write-buffered *(ebp+0x10) ": stmt 'allocate' must have a single inout\n")
23242 (flush *(ebp+0x10))
23243 (stop *(ebp+0x14) 1)
23244
23245
23246 $check-mu-allocate-stmt:error-too-many-outputs:
23247 (write-buffered *(ebp+0x10) "fn ")
23248 8b/-> *(ebp+0xc) 0/r32/eax
23249 (lookup *eax *(eax+4))
23250 (write-buffered *(ebp+0x10) %eax)
23251 (write-buffered *(ebp+0x10) ": stmt 'allocate' must not have any outputs\n")
23252 (flush *(ebp+0x10))
23253 (stop *(ebp+0x14) 1)
23254
23255
23256 $check-mu-allocate-stmt:error-invalid-type:
23257 (write-buffered *(ebp+0x10) "fn ")
23258 8b/-> *(ebp+0xc) 0/r32/eax
23259 (lookup *eax *(eax+4))
23260 (write-buffered *(ebp+0x10) %eax)
23261 (write-buffered *(ebp+0x10) ": stmt allocate: inout '")
23262 (lookup *edi *(edi+4))
23263 (lookup *eax *(eax+4))
23264 (write-buffered *(ebp+0x10) %eax)
23265 (write-buffered *(ebp+0x10) "' must have type (addr handle ...)\n")
23266 (flush *(ebp+0x10))
23267 (stop *(ebp+0x14) 1)
23268
23269
23270 check-mu-populate-stmt:
23271
23272 55/push-ebp
23273 89/<- %ebp 4/r32/esp
23274
23275 50/push-eax
23276 53/push-ebx
23277 56/push-esi
23278 57/push-edi
23279
23280 8b/-> *(ebp+8) 6/r32/esi
23281 $check-mu-populate-stmt:check-for-output:
23282
23283 (lookup *(esi+0x14) *(esi+0x18))
23284 3d/compare-eax-and 0/imm32
23285 0f 85/jump-if-!= $check-mu-populate-stmt:error-too-many-outputs/disp32
23286 $check-mu-populate-stmt:get-target:
23287
23288 (lookup *(esi+0xc) *(esi+0x10))
23289 89/<- %edi 0/r32/eax
23290
23291 3d/compare-eax-and 0/imm32
23292 0f 84/jump-if-= $check-mu-populate-stmt:error-incorrect-inouts/disp32
23293 $check-mu-populate-stmt:get-length:
23294
23295 (lookup *(edi+8) *(edi+0xc))
23296 89/<- %esi 0/r32/eax
23297
23298 3d/compare-eax-and 0/imm32
23299 0f 84/jump-if-= $check-mu-populate-stmt:error-incorrect-inouts/disp32
23300
23301 (lookup *(esi+8) *(esi+0xc))
23302 3d/compare-eax-and 0/imm32
23303 0f 85/jump-if-!= $check-mu-populate-stmt:error-incorrect-inouts/disp32
23304 $check-mu-populate-stmt:check-target-type:
23305
23306 (lookup *edi *(edi+4))
23307 (lookup *(eax+8) *(eax+0xc))
23308 89/<- %ebx 0/r32/eax
23309 $check-mu-populate-stmt:check-target-type-deref:
23310
23311 8b/-> *(edi+0x10) 0/r32/eax
23312 3d/compare-eax-and 0/imm32/false
23313 {
23314 74/jump-if-= break/disp8
23315 (lookup *(ebx+0xc) *(ebx+0x10))
23316
23317 81 7/subop/compare *(eax+0xc) 0/imm32
23318 {
23319 75/jump-if-!= break/disp8
23320 (lookup *(eax+4) *(eax+8))
23321 }
23322 89/<- %ebx 0/r32/eax
23323 }
23324 $check-mu-populate-stmt:check-target-type-addr:
23325
23326 (is-mu-addr-type? %ebx)
23327 3d/compare-eax-and 0/imm32/false
23328 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
23329
23330 (lookup *(ebx+0xc) *(ebx+0x10))
23331 89/<- %ebx 0/r32/eax
23332 81 7/subop/compare *ebx 0/imm32/false
23333 0f 85/jump-if-!= $check-mu-populate-stmt:error-invalid-target-type/disp32
23334 $check-mu-populate-stmt:check-target-type-handle:
23335
23336 (lookup *(ebx+4) *(ebx+8))
23337 (is-simple-mu-type? %eax 4)
23338 3d/compare-eax-and 0/imm32/false
23339 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
23340
23341 (lookup *(ebx+0xc) *(ebx+0x10))
23342 89/<- %ebx 0/r32/eax
23343 81 7/subop/compare *ebx 0/imm32/false
23344 0f 85/jump-if-!= $check-mu-populate-stmt:error-invalid-target-type/disp32
23345 $check-mu-populate-stmt:check-target-type-array:
23346
23347 (lookup *(ebx+4) *(ebx+8))
23348 (is-simple-mu-type? %eax 3)
23349 3d/compare-eax-and 0/imm32/false
23350 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
23351 $check-mu-populate-stmt:check-length-type:
23352 (lookup *esi *(esi+4))
23353 (lookup *(eax+8) *(eax+0xc))
23354 89/<- %ebx 0/r32/eax
23355 (is-simple-mu-type? %ebx 0)
23356 3d/compare-eax-and 0/imm32/false
23357 75/jump-if-!= $check-mu-populate-stmt:end/disp8
23358 (is-simple-mu-type? %ebx 1)
23359 3d/compare-eax-and 0/imm32/false
23360 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-length-type/disp32
23361 $check-mu-populate-stmt:end:
23362
23363 5f/pop-to-edi
23364 5e/pop-to-esi
23365 5b/pop-to-ebx
23366 58/pop-to-eax
23367
23368 89/<- %esp 5/r32/ebp
23369 5d/pop-to-ebp
23370 c3/return
23371
23372 $check-mu-populate-stmt:error-incorrect-inouts:
23373 (write-buffered *(ebp+0x10) "fn ")
23374 8b/-> *(ebp+0xc) 0/r32/eax
23375 (lookup *eax *(eax+4))
23376 (write-buffered *(ebp+0x10) %eax)
23377 (write-buffered *(ebp+0x10) ": stmt 'populate' must have two inouts\n")
23378 (flush *(ebp+0x10))
23379 (stop *(ebp+0x14) 1)
23380
23381
23382 $check-mu-populate-stmt:error-too-many-outputs:
23383 (write-buffered *(ebp+0x10) "fn ")
23384 8b/-> *(ebp+0xc) 0/r32/eax
23385 (lookup *eax *(eax+4))
23386 (write-buffered *(ebp+0x10) %eax)
23387 (write-buffered *(ebp+0x10) ": stmt 'populate' must not have any outputs\n")
23388 (flush *(ebp+0x10))
23389 (stop *(ebp+0x14) 1)
23390
23391
23392 $check-mu-populate-stmt:error-invalid-target-type:
23393 (write-buffered *(ebp+0x10) "fn ")
23394 8b/-> *(ebp+0xc) 0/r32/eax
23395 (lookup *eax *(eax+4))
23396 (write-buffered *(ebp+0x10) %eax)
23397 (write-buffered *(ebp+0x10) ": stmt populate: first inout '")
23398 (lookup *edi *(edi+4))
23399 (lookup *eax *(eax+4))
23400 (write-buffered *(ebp+0x10) %eax)
23401 (write-buffered *(ebp+0x10) "' must have type (addr handle array ...)\n")
23402 (flush *(ebp+0x10))
23403 (stop *(ebp+0x14) 1)
23404
23405
23406 $check-mu-populate-stmt:error-invalid-length-type:
23407 (write-buffered *(ebp+0x10) "fn ")
23408 8b/-> *(ebp+0xc) 0/r32/eax
23409 (lookup *eax *(eax+4))
23410 (write-buffered *(ebp+0x10) %eax)
23411 (write-buffered *(ebp+0x10) ": stmt populate: second inout '")
23412 (lookup *esi *(esi+4))
23413 (lookup *eax *(eax+4))
23414 (write-buffered *(ebp+0x10) %eax)
23415 (write-buffered *(ebp+0x10) "' must be an int\n")
23416 (flush *(ebp+0x10))
23417 (stop *(ebp+0x14) 1)
23418
23419
23420 check-mu-populate-stream-stmt:
23421
23422 55/push-ebp
23423 89/<- %ebp 4/r32/esp
23424
23425 50/push-eax
23426 53/push-ebx
23427 56/push-esi
23428 57/push-edi
23429
23430 8b/-> *(ebp+8) 6/r32/esi
23431 $check-mu-populate-stream-stmt:check-for-output:
23432
23433 (lookup *(esi+0x14) *(esi+0x18))
23434 3d/compare-eax-and 0/imm32
23435 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-too-many-outputs/disp32
23436 $check-mu-populate-stream-stmt:get-target:
23437
23438 (lookup *(esi+0xc) *(esi+0x10))
23439 89/<- %edi 0/r32/eax
23440
23441 3d/compare-eax-and 0/imm32
23442 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
23443 $check-mu-populate-stream-stmt:get-length:
23444
23445 (lookup *(edi+8) *(edi+0xc))
23446 89/<- %esi 0/r32/eax
23447
23448 3d/compare-eax-and 0/imm32
23449 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
23450
23451 (lookup *(esi+8) *(esi+0xc))
23452 3d/compare-eax-and 0/imm32
23453 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
23454 $check-mu-populate-stream-stmt:check-target-type:
23455
23456 (lookup *edi *(edi+4))
23457 (lookup *(eax+8) *(eax+0xc))
23458 89/<- %ebx 0/r32/eax
23459 $check-mu-populate-stream-stmt:check-target-type-deref:
23460
23461 8b/-> *(edi+0x10) 0/r32/eax
23462 3d/compare-eax-and 0/imm32/false
23463 {
23464 74/jump-if-= break/disp8
23465 (lookup *(ebx+0xc) *(ebx+0x10))
23466
23467 81 7/subop/compare *(eax+0xc) 0/imm32
23468 {
23469 75/jump-if-!= break/disp8
23470 (lookup *(eax+4) *(eax+8))
23471 }
23472 89/<- %ebx 0/r32/eax
23473 }
23474 $check-mu-populate-stream-stmt:check-target-type-addr:
23475
23476 (is-mu-addr-type? %ebx)
23477 3d/compare-eax-and 0/imm32/false
23478 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
23479
23480 (lookup *(ebx+0xc) *(ebx+0x10))
23481 89/<- %ebx 0/r32/eax
23482 81 7/subop/compare *ebx 0/imm32/false
23483 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
23484 $check-mu-populate-stream-stmt:check-target-type-handle:
23485
23486 (lookup *(ebx+4) *(ebx+8))
23487 (is-simple-mu-type? %eax 4)
23488 3d/compare-eax-and 0/imm32/false
23489 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
23490
23491 (lookup *(ebx+0xc) *(ebx+0x10))
23492 89/<- %ebx 0/r32/eax
23493 81 7/subop/compare *ebx 0/imm32/false
23494 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
23495 $check-mu-populate-stream-stmt:check-target-type-stream:
23496
23497 (lookup *(ebx+4) *(ebx+8))
23498 (is-simple-mu-type? %eax 0xb)
23499 3d/compare-eax-and 0/imm32/false
23500 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
23501 $check-mu-populate-stream-stmt:check-length-type:
23502 (lookup *esi *(esi+4))
23503 (lookup *(eax+8) *(eax+0xc))
23504 89/<- %ebx 0/r32/eax
23505 (is-simple-mu-type? %ebx 0)
23506 3d/compare-eax-and 0/imm32/false
23507 75/jump-if-!= $check-mu-populate-stream-stmt:end/disp8
23508 (is-simple-mu-type? %ebx 1)
23509 3d/compare-eax-and 0/imm32/false
23510 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-length-type/disp32
23511 $check-mu-populate-stream-stmt:end:
23512
23513 5f/pop-to-edi
23514 5e/pop-to-esi
23515 5b/pop-to-ebx
23516 58/pop-to-eax
23517
23518 89/<- %esp 5/r32/ebp
23519 5d/pop-to-ebp
23520 c3/return
23521
23522 $check-mu-populate-stream-stmt:error-incorrect-inouts:
23523 (write-buffered *(ebp+0x10) "fn ")
23524 8b/-> *(ebp+0xc) 0/r32/eax
23525 (lookup *eax *(eax+4))
23526 (write-buffered *(ebp+0x10) %eax)
23527 (write-buffered *(ebp+0x10) ": stmt 'populate-stream' must have two inouts\n")
23528 (flush *(ebp+0x10))
23529 (stop *(ebp+0x14) 1)
23530
23531
23532 $check-mu-populate-stream-stmt:error-too-many-outputs:
23533 (write-buffered *(ebp+0x10) "fn ")
23534 8b/-> *(ebp+0xc) 0/r32/eax
23535 (lookup *eax *(eax+4))
23536 (write-buffered *(ebp+0x10) %eax)
23537 (write-buffered *(ebp+0x10) ": stmt 'populate-stream' must not have any outputs\n")
23538 (flush *(ebp+0x10))
23539 (stop *(ebp+0x14) 1)
23540
23541
23542 $check-mu-populate-stream-stmt:error-invalid-target-type:
23543 (write-buffered *(ebp+0x10) "fn ")
23544 8b/-> *(ebp+0xc) 0/r32/eax
23545 (lookup *eax *(eax+4))
23546 (write-buffered *(ebp+0x10) %eax)
23547 (write-buffered *(ebp+0x10) ": stmt populate-stream: first inout '")
23548 (lookup *edi *(edi+4))
23549 (lookup *eax *(eax+4))
23550 (write-buffered *(ebp+0x10) %eax)
23551 (write-buffered *(ebp+0x10) "' must have type (addr handle stream ...)\n")
23552 (flush *(ebp+0x10))
23553 (stop *(ebp+0x14) 1)
23554
23555
23556 $check-mu-populate-stream-stmt:error-invalid-length-type:
23557 (write-buffered *(ebp+0x10) "fn ")
23558 8b/-> *(ebp+0xc) 0/r32/eax
23559 (lookup *eax *(eax+4))
23560 (write-buffered *(ebp+0x10) %eax)
23561 (write-buffered *(ebp+0x10) ": stmt populate-stream: second inout '")
23562 (lookup *esi *(esi+4))
23563 (lookup *eax *(eax+4))
23564 (write-buffered *(ebp+0x10) %eax)
23565 (write-buffered *(ebp+0x10) "' must be an int\n")
23566 (flush *(ebp+0x10))
23567 (stop *(ebp+0x14) 1)
23568
23569
23570 check-mu-read-from-stream-stmt:
23571
23572 55/push-ebp
23573 89/<- %ebp 4/r32/esp
23574
23575 50/push-eax
23576 51/push-ecx
23577 52/push-edx
23578 53/push-ebx
23579 56/push-esi
23580 57/push-edi
23581
23582 8b/-> *(ebp+8) 6/r32/esi
23583
23584
23585 (lookup *(esi+0xc) *(esi+0x10))
23586 $check-mu-read-from-stream-stmt:check-no-inouts:
23587 3d/compare-eax-and 0/imm32
23588 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
23589 (lookup *eax *(eax+4))
23590 89/<- %ecx 0/r32/eax
23591
23592
23593 (lookup *(ecx+8) *(ecx+0xc))
23594 89/<- %ebx 0/r32/eax
23595 $check-mu-read-from-stream-stmt:check-base-is-compound:
23596
23597 81 7/subop/compare *ebx 0/imm32/false
23598 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
23599 $check-mu-read-from-stream-stmt:check-base-is-addr:
23600
23601 (lookup *(ebx+4) *(ebx+8))
23602 (is-simple-mu-type? %eax 2)
23603 3d/compare-eax-and 0/imm32/false
23604 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
23605 $check-mu-read-from-stream-stmt:check-base-is-addr-to-stream:
23606
23607 (lookup *(ebx+0xc) *(ebx+0x10))
23608 89/<- %ebx 0/r32/eax
23609
23610 (lookup *(eax+4) *(eax+8))
23611 (is-simple-mu-type? %eax 0xb)
23612 3d/compare-eax-and 0/imm32/false
23613 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
23614
23615
23616 (lookup *(esi+0xc) *(esi+0x10))
23617 (lookup *(eax+8) *(eax+0xc))
23618 $check-mu-read-from-stream-stmt:check-single-inout:
23619 3d/compare-eax-and 0/imm32
23620 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
23621 (lookup *eax *(eax+4))
23622 89/<- %ecx 0/r32/eax
23623
23624 (lookup *(ecx+8) *(ecx+0xc))
23625 89/<- %edx 0/r32/eax
23626
23627 $check-mu-read-from-stream-stmt:check-target-is-compound:
23628 81 7/subop/compare *edx 0/imm32/false
23629 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
23630 $check-mu-read-from-stream-stmt:check-target-type:
23631
23632 (lookup *(edx+4) *(edx+8))
23633 (is-simple-mu-type? %eax 2)
23634 3d/compare-eax-and 0/imm32/false
23635 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
23636
23637 (type-tail %ebx)
23638 89/<- %ebx 0/r32/eax
23639 (type-tail %edx)
23640 (type-equal? %ebx %eax)
23641 3d/compare-eax-and 0/imm32/false
23642 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-target-type/disp32
23643 $check-mu-read-from-stream-stmt:check-too-many-inouts:
23644
23645 (lookup *(esi+0xc) *(esi+0x10))
23646 (lookup *(eax+8) *(eax+0xc))
23647 (lookup *(eax+8) *(eax+0xc))
23648 3d/compare-eax-and 0/imm32/false
23649 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-too-many-inouts/disp32
23650 $check-mu-read-from-stream-stmt:check-unexpected-output:
23651
23652 (lookup *(esi+0x14) *(esi+0x18))
23653 3d/compare-eax-and 0/imm32/false
23654 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-unexpected-output/disp32
23655 $check-mu-read-from-stream-stmt:end:
23656
23657 5f/pop-to-edi
23658 5e/pop-to-esi
23659 5b/pop-to-ebx
23660 5a/pop-to-edx
23661 59/pop-to-ecx
23662 58/pop-to-eax
23663
23664 89/<- %esp 5/r32/ebp
23665 5d/pop-to-ebp
23666 c3/return
23667
23668 $check-mu-read-from-stream-stmt:error-invalid-base-type:
23669 (write-buffered *(ebp+0x10) "fn ")
23670 8b/-> *(ebp+0xc) 0/r32/eax
23671 (lookup *eax *(eax+4))
23672 (write-buffered *(ebp+0x10) %eax)
23673 (write-buffered *(ebp+0x10) ": stmt read-from-stream: var '")
23674 (lookup *ecx *(ecx+4))
23675 (write-buffered *(ebp+0x10) %eax)
23676 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
23677 (flush *(ebp+0x10))
23678 (stop *(ebp+0x14) 1)
23679
23680
23681 $check-mu-read-from-stream-stmt:error-too-few-inouts:
23682 (write-buffered *(ebp+0x10) "fn ")
23683 8b/-> *(ebp+0xc) 0/r32/eax
23684 (lookup *eax *(eax+4))
23685 (write-buffered *(ebp+0x10) %eax)
23686 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too few inouts (2 required)\n")
23687 (flush *(ebp+0x10))
23688 (stop *(ebp+0x14) 1)
23689
23690
23691 $check-mu-read-from-stream-stmt:error-target-type-not-address:
23692 (write-buffered *(ebp+0x10) "fn ")
23693 8b/-> *(ebp+0xc) 0/r32/eax
23694 (lookup *eax *(eax+4))
23695 (write-buffered *(ebp+0x10) %eax)
23696 (write-buffered *(ebp+0x10) ": stmt read-from-stream: target '")
23697 (lookup *ecx *(ecx+4))
23698 (write-buffered *(ebp+0x10) %eax)
23699 (write-buffered *(ebp+0x10) "' must be an addr\n")
23700 (flush *(ebp+0x10))
23701 (stop *(ebp+0x14) 1)
23702
23703
23704 $check-mu-read-from-stream-stmt:error-invalid-target-type:
23705 (write-buffered *(ebp+0x10) "fn ")
23706 8b/-> *(ebp+0xc) 0/r32/eax
23707 (lookup *eax *(eax+4))
23708 (write-buffered *(ebp+0x10) %eax)
23709 (write-buffered *(ebp+0x10) ": stmt read-from-stream: second inout '")
23710 (lookup *ecx *(ecx+4))
23711 (write-buffered *(ebp+0x10) %eax)
23712 (write-buffered *(ebp+0x10) "' does not have the right type\n")
23713 (flush *(ebp+0x10))
23714 (stop *(ebp+0x14) 1)
23715
23716
23717 $check-mu-read-from-stream-stmt:error-too-many-inouts:
23718 (write-buffered *(ebp+0x10) "fn ")
23719 8b/-> *(ebp+0xc) 0/r32/eax
23720 (lookup *eax *(eax+4))
23721 (write-buffered *(ebp+0x10) %eax)
23722 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too many inouts (2 required)\n")
23723 (flush *(ebp+0x10))
23724 (stop *(ebp+0x14) 1)
23725
23726
23727 $check-mu-read-from-stream-stmt:error-unexpected-output:
23728 (write-buffered *(ebp+0x10) "fn ")
23729 8b/-> *(ebp+0xc) 0/r32/eax
23730 (lookup *eax *(eax+4))
23731 (write-buffered *(ebp+0x10) %eax)
23732 (write-buffered *(ebp+0x10) ": stmt read-from-stream: unexpected output\n")
23733 (flush *(ebp+0x10))
23734 (stop *(ebp+0x14) 1)
23735
23736
23737 check-mu-write-to-stream-stmt:
23738
23739 55/push-ebp
23740 89/<- %ebp 4/r32/esp
23741
23742 50/push-eax
23743 51/push-ecx
23744 52/push-edx
23745 53/push-ebx
23746 56/push-esi
23747 57/push-edi
23748
23749 8b/-> *(ebp+8) 6/r32/esi
23750
23751
23752 (lookup *(esi+0xc) *(esi+0x10))
23753 $check-mu-write-to-stream-stmt:check-no-inouts:
23754 3d/compare-eax-and 0/imm32
23755 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
23756 (lookup *eax *(eax+4))
23757 89/<- %ecx 0/r32/eax
23758
23759
23760 (lookup *(ecx+8) *(ecx+0xc))
23761 89/<- %ebx 0/r32/eax
23762 $check-mu-write-to-stream-stmt:check-base-is-compound:
23763
23764 81 7/subop/compare *ebx 0/imm32/false
23765 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
23766 $check-mu-write-to-stream-stmt:check-base-is-addr:
23767
23768 (lookup *(ebx+4) *(ebx+8))
23769 (is-simple-mu-type? %eax 2)
23770 3d/compare-eax-and 0/imm32/false
23771 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
23772 $check-mu-write-to-stream-stmt:check-base-is-addr-to-stream:
23773
23774 (lookup *(ebx+0xc) *(ebx+0x10))
23775 89/<- %ebx 0/r32/eax
23776
23777 (lookup *(eax+4) *(eax+8))
23778 (is-simple-mu-type? %eax 0xb)
23779 3d/compare-eax-and 0/imm32/false
23780 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
23781
23782
23783 (lookup *(esi+0xc) *(esi+0x10))
23784 (lookup *(eax+8) *(eax+0xc))
23785 $check-mu-write-to-stream-stmt:check-single-inout:
23786 3d/compare-eax-and 0/imm32
23787 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
23788 (lookup *eax *(eax+4))
23789 89/<- %ecx 0/r32/eax
23790
23791 (lookup *(ecx+8) *(ecx+0xc))
23792 89/<- %edx 0/r32/eax
23793
23794 $check-mu-write-to-stream-stmt:check-target-is-compound:
23795 81 7/subop/compare *edx 0/imm32/false
23796 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
23797 $check-mu-write-to-stream-stmt:check-target-type:
23798
23799 (lookup *(edx+4) *(edx+8))
23800 (is-simple-mu-type? %eax 2)
23801 3d/compare-eax-and 0/imm32/false
23802 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
23803
23804 (type-tail %ebx)
23805 89/<- %ebx 0/r32/eax
23806 (type-tail %edx)
23807 (type-equal? %ebx %eax)
23808 3d/compare-eax-and 0/imm32/false
23809 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-target-type/disp32
23810 $check-mu-write-to-stream-stmt:check-too-many-inouts:
23811
23812 (lookup *(esi+0xc) *(esi+0x10))
23813 (lookup *(eax+8) *(eax+0xc))
23814 (lookup *(eax+8) *(eax+0xc))
23815 3d/compare-eax-and 0/imm32/false
23816 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-too-many-inouts/disp32
23817 $check-mu-write-to-stream-stmt:check-unexpected-output:
23818
23819 (lookup *(esi+0x14) *(esi+0x18))
23820 3d/compare-eax-and 0/imm32/false
23821 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-unexpected-output/disp32
23822 $check-mu-write-to-stream-stmt:end:
23823
23824 5f/pop-to-edi
23825 5e/pop-to-esi
23826 5b/pop-to-ebx
23827 5a/pop-to-edx
23828 59/pop-to-ecx
23829 58/pop-to-eax
23830
23831 89/<- %esp 5/r32/ebp
23832 5d/pop-to-ebp
23833 c3/return
23834
23835 $check-mu-write-to-stream-stmt:error-invalid-base-type:
23836 (write-buffered *(ebp+0x10) "fn ")
23837 8b/-> *(ebp+0xc) 0/r32/eax
23838 (lookup *eax *(eax+4))
23839 (write-buffered *(ebp+0x10) %eax)
23840 (write-buffered *(ebp+0x10) ": stmt write-to-stream: var '")
23841 (lookup *ecx *(ecx+4))
23842 (write-buffered *(ebp+0x10) %eax)
23843 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
23844 (flush *(ebp+0x10))
23845 (stop *(ebp+0x14) 1)
23846
23847
23848 $check-mu-write-to-stream-stmt:error-too-few-inouts:
23849 (write-buffered *(ebp+0x10) "fn ")
23850 8b/-> *(ebp+0xc) 0/r32/eax
23851 (lookup *eax *(eax+4))
23852 (write-buffered *(ebp+0x10) %eax)
23853 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too few inouts (2 required)\n")
23854 (flush *(ebp+0x10))
23855 (stop *(ebp+0x14) 1)
23856
23857
23858 $check-mu-write-to-stream-stmt:error-target-type-not-address:
23859 (write-buffered *(ebp+0x10) "fn ")
23860 8b/-> *(ebp+0xc) 0/r32/eax
23861 (lookup *eax *(eax+4))
23862 (write-buffered *(ebp+0x10) %eax)
23863 (write-buffered *(ebp+0x10) ": stmt write-to-stream: target '")
23864 (lookup *ecx *(ecx+4))
23865 (write-buffered *(ebp+0x10) %eax)
23866 (write-buffered *(ebp+0x10) "' must be an addr\n")
23867 (flush *(ebp+0x10))
23868 (stop *(ebp+0x14) 1)
23869
23870
23871 $check-mu-write-to-stream-stmt:error-invalid-target-type:
23872 (write-buffered *(ebp+0x10) "fn ")
23873 8b/-> *(ebp+0xc) 0/r32/eax
23874 (lookup *eax *(eax+4))
23875 (write-buffered *(ebp+0x10) %eax)
23876 (write-buffered *(ebp+0x10) ": stmt write-to-stream: second inout '")
23877 (lookup *ecx *(ecx+4))
23878 (write-buffered *(ebp+0x10) %eax)
23879 (write-buffered *(ebp+0x10) "' does not have the right type\n")
23880 (flush *(ebp+0x10))
23881 (stop *(ebp+0x14) 1)
23882
23883
23884 $check-mu-write-to-stream-stmt:error-too-many-inouts:
23885 (write-buffered *(ebp+0x10) "fn ")
23886 8b/-> *(ebp+0xc) 0/r32/eax
23887 (lookup *eax *(eax+4))
23888 (write-buffered *(ebp+0x10) %eax)
23889 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too many inouts (2 required)\n")
23890 (flush *(ebp+0x10))
23891 (stop *(ebp+0x14) 1)
23892
23893
23894 $check-mu-write-to-stream-stmt:error-unexpected-output:
23895 (write-buffered *(ebp+0x10) "fn ")
23896 8b/-> *(ebp+0xc) 0/r32/eax
23897 (lookup *eax *(eax+4))
23898 (write-buffered *(ebp+0x10) %eax)
23899 (write-buffered *(ebp+0x10) ": stmt write-to-stream: unexpected output\n")
23900 (flush *(ebp+0x10))
23901 (stop *(ebp+0x14) 1)
23902
23903
23904 check-mu-convert-stmt:
23905
23906 55/push-ebp
23907 89/<- %ebp 4/r32/esp
23908
23909 $check-mu-convert-stmt:end:
23910
23911
23912 89/<- %esp 5/r32/ebp
23913 5d/pop-to-ebp
23914 c3/return
23915
23916 check-mu-call:
23917
23918 55/push-ebp
23919 89/<- %ebp 4/r32/esp
23920
23921 68/push 0/imm32
23922
23923 81 5/subop/subtract %esp 0x60/imm32
23924 68/push 0x60/imm32/size
23925 68/push 0/imm32/read
23926 68/push 0/imm32/write
23927
23928 89/<- *(ebp-4) 4/r32/esp
23929 (clear-stream *(ebp-4))
23930
23931 50/push-eax
23932 51/push-ecx
23933 52/push-edx
23934 53/push-ebx
23935 56/push-esi
23936 57/push-edi
23937
23938 8b/-> *(ebp+8) 6/r32/esi
23939
23940 8b/-> *(ebp+0xc) 7/r32/edi
23941
23942 (lookup *(esi+0xc) *(esi+0x10))
23943 89/<- %ecx 0/r32/eax
23944
23945 (lookup *(edi+8) *(edi+0xc))
23946 89/<- %edx 0/r32/eax
23947 {
23948 $check-mu-call:check-for-inouts:
23949
23950 81 7/subop/compare %ecx 0/imm32
23951 0f 84/jump-if-= break/disp32
23952
23953 81 7/subop/compare %edx 0/imm32
23954 0f 84/jump-if-= break/disp32
23955 $check-mu-call:check-null-addr:
23956
23957 (lookup *ecx *(ecx+4))
23958 (lookup *eax *(eax+4))
23959 (string-equal? %eax "0")
23960 3d/compare-eax-and 0/imm32/false
23961 0f 85/jump-if-!= $check-mu-call:continue-to-next-inout/disp32
23962 $check-mu-call:check-inout-type:
23963
23964 (lookup *ecx *(ecx+4))
23965 (lookup *(eax+8) *(eax+0xc))
23966 89/<- %ebx 0/r32/eax
23967
23968 81 7/subop/compare *(ecx+0x10) 0/imm32/false
23969 {
23970 74/jump-if-= break/disp8
23971 (lookup *(ebx+0xc) *(ebx+0x10))
23972 89/<- %ebx 0/r32/eax
23973
23974 81 7/subop/compare *(ebx+0xc) 0/imm32
23975 75/jump-if-!= break/disp8
23976 (lookup *(ebx+4) *(ebx+8))
23977 89/<- %ebx 0/r32/eax
23978 }
23979
23980 (lookup *edx *(edx+4))
23981
23982 (lookup *(eax+8) *(eax+0xc))
23983
23984 (type-match? %eax %ebx *(ebp-4))
23985 3d/compare-eax-and 0/imm32/false
23986 {
23987 0f 85/jump-if-!= break/disp32
23988 (write-buffered *(ebp+0x14) "fn ")
23989 8b/-> *(ebp+0x10) 0/r32/eax
23990 (lookup *eax *(eax+4))
23991 (write-buffered *(ebp+0x14) %eax)
23992 (write-buffered *(ebp+0x14) ": call ")
23993 (lookup *edi *(edi+4))
23994 (write-buffered *(ebp+0x14) %eax)
23995 (write-buffered *(ebp+0x14) ": type for inout '")
23996 (lookup *ecx *(ecx+4))
23997 (lookup *eax *(eax+4))
23998 (write-buffered *(ebp+0x14) %eax)
23999 (write-buffered *(ebp+0x14) "' is not right\n")
24000 (flush *(ebp+0x14))
24001 (stop *(ebp+0x18) 1)
24002 }
24003 $check-mu-call:continue-to-next-inout:
24004
24005 (lookup *(ecx+8) *(ecx+0xc))
24006 89/<- %ecx 0/r32/eax
24007
24008 (lookup *(edx+8) *(edx+0xc))
24009 89/<- %edx 0/r32/eax
24010
24011 e9/jump loop/disp32
24012 }
24013 $check-mu-call:check-inout-count:
24014
24015 39/compare %ecx 2/r32/edx
24016 {
24017 0f 84/jump-if-= break/disp32
24018
24019
24020 {
24021 81 7/subop/compare %ecx 0/imm32
24022 0f 84/jump-if-= break/disp32
24023 (write-buffered *(ebp+0x14) "fn ")
24024 8b/-> *(ebp+0x10) 0/r32/eax
24025 (lookup *eax *(eax+4))
24026 (write-buffered *(ebp+0x14) %eax)
24027 (write-buffered *(ebp+0x14) ": call ")
24028 (lookup *edi *(edi+4))
24029 (write-buffered *(ebp+0x14) %eax)
24030 (write-buffered *(ebp+0x14) ": too many inouts\n")
24031 (flush *(ebp+0x14))
24032 (stop *(ebp+0x18) 1)
24033 }
24034
24035 {
24036 81 7/subop/compare %edx 0/imm32
24037 0f 84/jump-if-= break/disp32
24038 (write-buffered *(ebp+0x14) "fn ")
24039 8b/-> *(ebp+0x10) 0/r32/eax
24040 (lookup *eax *(eax+4))
24041 (write-buffered *(ebp+0x14) %eax)
24042 (write-buffered *(ebp+0x14) ": call ")
24043 (lookup *edi *(edi+4))
24044 (write-buffered *(ebp+0x14) %eax)
24045 (write-buffered *(ebp+0x14) ": too few inouts\n")
24046 (flush *(ebp+0x14))
24047 (stop *(ebp+0x18) 1)
24048 }
24049 }
24050 $check-mu-call:check-outputs:
24051
24052 (lookup *(esi+0x14) *(esi+0x18))
24053 89/<- %ecx 0/r32/eax
24054
24055 (lookup *(edi+0x10) *(edi+0x14))
24056 89/<- %edx 0/r32/eax
24057 {
24058 $check-mu-call:check-for-outputs:
24059
24060 81 7/subop/compare %ecx 0/imm32
24061 0f 84/jump-if-= break/disp32
24062
24063 81 7/subop/compare %edx 0/imm32
24064 0f 84/jump-if-= break/disp32
24065 $check-mu-call:check-output-type:
24066
24067 (lookup *ecx *(ecx+4))
24068
24069 (lookup *(eax+8) *(eax+0xc))
24070 89/<- %ebx 0/r32/eax
24071
24072 81 7/subop/compare *(ecx+0x10) 0/imm32/false
24073 {
24074 74/jump-if-= break/disp8
24075 (lookup *(ebx+0xc) *(ebx+0x10))
24076 89/<- %ebx 0/r32/eax
24077 }
24078
24079 (lookup *edx *(edx+4))
24080
24081 (lookup *(eax+8) *(eax+0xc))
24082
24083 (type-match? %eax %ebx *(ebp-4))
24084 3d/compare-eax-and 0/imm32/false
24085 {
24086 0f 85/jump-if-!= break/disp32
24087 (write-buffered *(ebp+0x14) "fn ")
24088 8b/-> *(ebp+0x10) 0/r32/eax
24089 (lookup *eax *(eax+4))
24090 (write-buffered *(ebp+0x14) %eax)
24091 (write-buffered *(ebp+0x14) ": call ")
24092 (lookup *edi *(edi+4))
24093 (write-buffered *(ebp+0x14) %eax)
24094 (write-buffered *(ebp+0x14) ": type for output '")
24095 (lookup *ecx *(ecx+4))
24096 (lookup *eax *(eax+4))
24097 (write-buffered *(ebp+0x14) %eax)
24098 (write-buffered *(ebp+0x14) "' is not right\n")
24099 (flush *(ebp+0x14))
24100 (stop *(ebp+0x18) 1)
24101 }
24102 $check-mu-call:check-output-register:
24103
24104 (lookup *ecx *(ecx+4))
24105
24106 (lookup *(eax+18) *(eax+0x1c))
24107 89/<- %ebx 0/r32/eax
24108
24109 3d/compare-eax-and 0/imm32
24110 {
24111 0f 85/jump-if-!= break/disp32
24112 (write-buffered *(ebp+0x14) "fn ")
24113 8b/-> *(ebp+0x10) 0/r32/eax
24114 (lookup *eax *(eax+4))
24115 (write-buffered *(ebp+0x14) %eax)
24116 (write-buffered *(ebp+0x14) ": call ")
24117 (lookup *edi *(edi+4))
24118 (write-buffered *(ebp+0x14) %eax)
24119 (write-buffered *(ebp+0x14) ": output '")
24120 (lookup *ecx *(ecx+4))
24121 (lookup *eax *(eax+4))
24122 (write-buffered *(ebp+0x14) %eax)
24123 (write-buffered *(ebp+0x14) "' is not in a register\n")
24124 (flush *(ebp+0x14))
24125 (stop *(ebp+0x18) 1)
24126 }
24127
24128 (lookup *edx *(edx+4))
24129
24130 (lookup *(eax+18) *(eax+0x1c))
24131
24132 (string-equal? %eax %ebx)
24133 3d/compare-eax-and 0/imm32/false
24134 {
24135 0f 85/jump-if-!= break/disp32
24136 (write-buffered *(ebp+0x14) "fn ")
24137 8b/-> *(ebp+0x10) 0/r32/eax
24138 (lookup *eax *(eax+4))
24139 (write-buffered *(ebp+0x14) %eax)
24140 (write-buffered *(ebp+0x14) ": call ")
24141 (lookup *edi *(edi+4))
24142 (write-buffered *(ebp+0x14) %eax)
24143 (write-buffered *(ebp+0x14) ": register for output '")
24144 (lookup *ecx *(ecx+4))
24145 (lookup *eax *(eax+4))
24146 (write-buffered *(ebp+0x14) %eax)
24147 (write-buffered *(ebp+0x14) "' is not right\n")
24148 (flush *(ebp+0x14))
24149 (stop *(ebp+0x18) 1)
24150 }
24151 $check-mu-call:continue-to-next-output:
24152
24153 (lookup *(ecx+8) *(ecx+0xc))
24154 89/<- %ecx 0/r32/eax
24155
24156 (lookup *(edx+8) *(edx+0xc))
24157 89/<- %edx 0/r32/eax
24158
24159 e9/jump loop/disp32
24160 }
24161 $check-mu-call:check-output-count:
24162
24163 39/compare %ecx 2/r32/edx
24164 {
24165 0f 84/jump-if-= break/disp32
24166
24167
24168 {
24169 81 7/subop/compare %ecx 0/imm32
24170 0f 84/jump-if-= break/disp32
24171 (write-buffered *(ebp+0x14) "fn ")
24172 8b/-> *(ebp+0x10) 0/r32/eax
24173 (lookup *eax *(eax+4))
24174 (write-buffered *(ebp+0x14) %eax)
24175 (write-buffered *(ebp+0x14) ": call ")
24176 (lookup *edi *(edi+4))
24177 (write-buffered *(ebp+0x14) %eax)
24178 (write-buffered *(ebp+0x14) ": too many outputs\n")
24179 (flush *(ebp+0x14))
24180 (stop *(ebp+0x18) 1)
24181 }
24182
24183 {
24184 81 7/subop/compare %edx 0/imm32
24185 0f 84/jump-if-= break/disp32
24186 (write-buffered *(ebp+0x14) "fn ")
24187 8b/-> *(ebp+0x10) 0/r32/eax
24188 (lookup *eax *(eax+4))
24189 (write-buffered *(ebp+0x14) %eax)
24190 (write-buffered *(ebp+0x14) ": call ")
24191 (lookup *edi *(edi+4))
24192 (write-buffered *(ebp+0x14) %eax)
24193 (write-buffered *(ebp+0x14) ": too few outputs\n")
24194 (flush *(ebp+0x14))
24195 (stop *(ebp+0x18) 1)
24196 }
24197 }
24198 $check-mu-call:end:
24199
24200 5f/pop-to-edi
24201 5e/pop-to-esi
24202 5b/pop-to-ebx
24203 5a/pop-to-edx
24204 59/pop-to-ecx
24205 58/pop-to-eax
24206
24207 81 0/subop/add %esp 0x70/imm32
24208
24209 89/<- %esp 5/r32/ebp
24210 5d/pop-to-ebp
24211 c3/return
24212
24213
24214 type-match?:
24215
24216 55/push-ebp
24217 89/<- %ebp 4/r32/esp
24218
24219 {
24220 $type-match?:check-literal-int:
24221 (is-simple-mu-type? *(ebp+0xc) 0)
24222 3d/compare-eax-and 0/imm32/false
24223 74/jump-if-= break/disp8
24224 (is-mu-numberlike-output? *(ebp+8))
24225 3d/compare-eax-and 0/imm32/false
24226 74/jump-if-= break/disp8
24227 b8/copy-to-eax 1/imm32/true
24228 e9/jump $type-match?:end/disp32
24229 }
24230
24231 {
24232 $type-match?:check-literal-string:
24233 (is-simple-mu-type? *(ebp+0xc) 0x10)
24234 3d/compare-eax-and 0/imm32/false
24235 74/jump-if-= break/disp8
24236 (is-mu-string-type? *(ebp+8))
24237 3d/compare-eax-and 0/imm32/false
24238 74/jump-if-= break/disp8
24239 b8/copy-to-eax 1/imm32/true
24240 e9/jump $type-match?:end/disp32
24241 }
24242 $type-match?:baseline:
24243
24244 (type-component-match? *(ebp+8) *(ebp+0xc) *(ebp+0x10))
24245 $type-match?:end:
24246
24247 89/<- %esp 5/r32/ebp
24248 5d/pop-to-ebp
24249 c3/return
24250
24251 type-component-match?:
24252
24253 55/push-ebp
24254 89/<- %ebp 4/r32/esp
24255
24256 51/push-ecx
24257 52/push-edx
24258 53/push-ebx
24259
24260 8b/-> *(ebp+8) 1/r32/ecx
24261
24262 8b/-> *(ebp+0xc) 2/r32/edx
24263 $type-component-match?:compare-addr:
24264
24265 8b/-> %ecx 0/r32/eax
24266 39/compare %edx 0/r32/eax
24267 b8/copy-to-eax 1/imm32/true
24268 0f 84/jump-if-= $type-component-match?:end/disp32
24269
24270 b8/copy-to-eax 0/imm32/false
24271 81 7/subop/compare %ecx 0/imm32
24272 0f 84/jump-if-= $type-component-match?:end/disp32
24273
24274 81 7/subop/compare %edx 0/imm32
24275 0f 84/jump-if-= $type-component-match?:end/disp32
24276
24277 {
24278 $type-component-match?:check-type-parameter:
24279 81 7/subop/compare *ecx 0/imm32/false
24280 74/jump-if-= break/disp8
24281 81 7/subop/compare *(ecx+4) 0xa/imm32/type-parameter
24282 75/jump-if-!= break/disp8
24283 $type-component-match?:type-parameter:
24284 (type-parameter-match? *(ecx+8) *(ecx+0xc) %edx *(ebp+0x10))
24285 e9/jump $type-component-match?:end/disp32
24286 }
24287
24288 {
24289 $type-component-match?:check-list-type-parameter:
24290
24291 81 7/subop/compare *ecx 0/imm32/false
24292 75/jump-if-!= break/disp8
24293
24294 81 7/subop/compare *(ecx+0xc) 0/imm32
24295 75/jump-if-!= break/disp8
24296
24297 (lookup *(ecx+4) *(ecx+8))
24298 81 7/subop/compare *eax 0/imm32/false
24299 74/jump-if-= break/disp8
24300 81 7/subop/compare *(eax+4) 0xa/imm32/type-parameter
24301 75/jump-if-!= break/disp8
24302 $type-component-match?:list-type-parameter:
24303 (type-parameter-match? *(eax+8) *(eax+0xc) %edx *(ebp+0x10))
24304 e9/jump $type-component-match?:end/disp32
24305 }
24306 $type-component-match?:compare-atom-state:
24307
24308 8b/-> *ecx 3/r32/ebx
24309 39/compare *edx 3/r32/ebx
24310 b8/copy-to-eax 0/imm32/false
24311 0f 85/jump-if-!= $type-component-match?:end/disp32
24312
24313 {
24314 $type-component-match?:check-atom:
24315 81 7/subop/compare %ebx 0/imm32/false
24316 74/jump-if-= break/disp8
24317 $type-component-match?:is-atom:
24318 8b/-> *(ecx+4) 0/r32/eax
24319 39/compare *(edx+4) 0/r32/eax
24320 0f 94/set-if-= %al
24321 81 4/subop/and %eax 0xff/imm32
24322 e9/jump $type-component-match?:end/disp32
24323 }
24324 $type-component-match?:check-left:
24325
24326 (lookup *(ecx+4) *(ecx+8))
24327 89/<- %ebx 0/r32/eax
24328 (lookup *(edx+4) *(edx+8))
24329 (type-component-match? %ebx %eax *(ebp+0x10))
24330 3d/compare-eax-and 0/imm32/false
24331 74/jump-if-= $type-component-match?:end/disp8
24332 $type-component-match?:check-right:
24333
24334 (lookup *(ecx+0xc) *(ecx+0x10))
24335 89/<- %ebx 0/r32/eax
24336 (lookup *(edx+0xc) *(edx+0x10))
24337 (type-component-match? %ebx %eax *(ebp+0x10))
24338 $type-component-match?:end:
24339
24340 5b/pop-to-ebx
24341 5a/pop-to-edx
24342 59/pop-to-ecx
24343
24344 89/<- %esp 5/r32/ebp
24345 5d/pop-to-ebp
24346 c3/return
24347
24348 type-parameter-match?:
24349
24350 55/push-ebp
24351 89/<- %ebp 4/r32/esp
24352
24353 51/push-ecx
24354
24355 (get-or-insert-handle *(ebp+0x14) *(ebp+8) *(ebp+0xc) 0xc)
24356
24357 {
24358 81 7/subop/compare *eax 0/imm32
24359 75/jump-if-!= break/disp8
24360 8b/-> *(ebp+0x10) 1/r32/ecx
24361 89/<- *eax 1/r32/ecx
24362 }
24363
24364 (type-equal? *(ebp+0x10) *eax)
24365 $type-parameter-match?:end:
24366
24367 59/pop-to-ecx
24368
24369 89/<- %esp 5/r32/ebp
24370 5d/pop-to-ebp
24371 c3/return
24372
24373 size-of:
24374
24375 55/push-ebp
24376 89/<- %ebp 4/r32/esp
24377
24378 51/push-ecx
24379
24380 8b/-> *(ebp+8) 1/r32/ecx
24381
24382
24383
24384
24385
24386
24387
24388 (lookup *(ecx+8) *(ecx+0xc))
24389 89/<- %ecx 0/r32/eax
24390
24391 {
24392 (is-mu-array? %ecx)
24393 3d/compare-eax-and 0/imm32/false
24394 74/jump-if-= break/disp8
24395 (size-of-array %ecx)
24396 eb/jump $size-of:end/disp8
24397 }
24398
24399 {
24400 (is-mu-stream? %ecx)
24401 3d/compare-eax-and 0/imm32/false
24402 74/jump-if-= break/disp8
24403 (size-of-stream %ecx)
24404 eb/jump $size-of:end/disp8
24405 }
24406
24407 {
24408 81 7/subop/compare *ecx 0/imm32/false
24409 75/jump-if-!= break/disp8
24410 (lookup *(ecx+4) *(ecx+8))
24411 89/<- %ecx 0/r32/eax
24412 }
24413
24414 (size-of-type-id *(ecx+4))
24415 $size-of:end:
24416
24417 59/pop-to-ecx
24418
24419 89/<- %esp 5/r32/ebp
24420 5d/pop-to-ebp
24421 c3/return
24422
24423 size-of-deref:
24424
24425 55/push-ebp
24426 89/<- %ebp 4/r32/esp
24427
24428 51/push-ecx
24429
24430 8b/-> *(ebp+8) 1/r32/ecx
24431 (lookup *(ecx+8) *(ecx+0xc))
24432 89/<- %ecx 0/r32/eax
24433
24434
24435 (lookup *(ecx+0xc) *(ecx+0x10))
24436 89/<- %ecx 0/r32/eax
24437
24438 {
24439 (is-mu-array? %ecx)
24440 3d/compare-eax-and 0/imm32/false
24441 74/jump-if-= break/disp8
24442 (size-of-array %ecx)
24443 eb/jump $size-of-deref:end/disp8
24444 }
24445
24446 {
24447 (is-mu-stream? %ecx)
24448 3d/compare-eax-and 0/imm32/false
24449 74/jump-if-= break/disp8
24450 (size-of-stream %ecx)
24451 eb/jump $size-of-deref:end/disp8
24452 }
24453
24454 {
24455 81 7/subop/compare *ecx 0/imm32/false
24456 75/jump-if-!= break/disp8
24457 (lookup *(ecx+4) *(ecx+8))
24458 89/<- %ecx 0/r32/eax
24459 }
24460
24461 (size-of-type-id *(ecx+4))
24462 $size-of-deref:end:
24463
24464 59/pop-to-ecx
24465
24466 89/<- %esp 5/r32/ebp
24467 5d/pop-to-ebp
24468 c3/return
24469
24470 is-mu-array?:
24471
24472 55/push-ebp
24473 89/<- %ebp 4/r32/esp
24474
24475 51/push-ecx
24476
24477 8b/-> *(ebp+8) 1/r32/ecx
24478
24479 81 7/subop/compare *ecx 0/imm32/false
24480 75/jump-if-!= $is-mu-array?:return-false/disp8
24481
24482 (lookup *(ecx+4) *(ecx+8))
24483 81 7/subop/compare *eax 0/imm32/false
24484 74/jump-if-= $is-mu-array?:return-false/disp8
24485
24486 81 7/subop/compare *(eax+4) 3/imm32/array-type-id
24487 0f 94/set-if-= %al
24488 81 4/subop/and %eax 0xff/imm32
24489 eb/jump $is-mu-array?:end/disp8
24490 $is-mu-array?:return-false:
24491 b8/copy-to-eax 0/imm32/false
24492 $is-mu-array?:end:
24493
24494 59/pop-to-ecx
24495
24496 89/<- %esp 5/r32/ebp
24497 5d/pop-to-ebp
24498 c3/return
24499
24500
24501 size-of-array:
24502
24503 55/push-ebp
24504 89/<- %ebp 4/r32/esp
24505
24506 51/push-ecx
24507 52/push-edx
24508
24509 8b/-> *(ebp+8) 1/r32/ecx
24510
24511 (lookup *(ecx+0xc) *(ecx+0x10))
24512 89/<- %ecx 0/r32/eax
24513
24514 (lookup *(ecx+4) *(ecx+8))
24515 8b/-> *(eax+4) 2/r32/edx
24516
24517
24518 (lookup *(ecx+0xc) *(ecx+0x10))
24519 (lookup *(eax+4) *(eax+8))
24520 8b/-> *(eax+8) 1/r32/ecx
24521
24522 (size-of-type-id-as-array-element %edx)
24523 f7 4/subop/multiply-into-edx-eax %ecx
24524 05/add-to-eax 4/imm32
24525
24526 $size-of-array:end:
24527
24528 5a/pop-to-edx
24529 59/pop-to-ecx
24530
24531 89/<- %esp 5/r32/ebp
24532 5d/pop-to-ebp
24533 c3/return
24534
24535 is-mu-stream?:
24536
24537 55/push-ebp
24538 89/<- %ebp 4/r32/esp
24539
24540 51/push-ecx
24541
24542 8b/-> *(ebp+8) 1/r32/ecx
24543
24544 81 7/subop/compare *ecx 0/imm32/false
24545 75/jump-if-!= $is-mu-stream?:return-false/disp8
24546
24547 (lookup *(ecx+4) *(ecx+8))
24548 81 7/subop/compare *eax 0/imm32/false
24549 74/jump-if-= $is-mu-stream?:return-false/disp8
24550
24551 81 7/subop/compare *(eax+4) 0xb/imm32/stream-type-id
24552 0f 94/set-if-= %al
24553 81 4/subop/and %eax 0xff/imm32
24554 eb/jump $is-mu-stream?:end/disp8
24555 $is-mu-stream?:return-false:
24556 b8/copy-to-eax 0/imm32/false
24557 $is-mu-stream?:end:
24558
24559 59/pop-to-ecx
24560
24561 89/<- %esp 5/r32/ebp
24562 5d/pop-to-ebp
24563 c3/return
24564
24565
24566 size-of-stream:
24567
24568 55/push-ebp
24569 89/<- %ebp 4/r32/esp
24570
24571 (size-of-array *(ebp+8))
24572 05/add-to-eax 8/imm32
24573 $size-of-stream:end:
24574
24575 89/<- %esp 5/r32/ebp
24576 5d/pop-to-ebp
24577 c3/return
24578
24579 size-of-type-id:
24580
24581 55/push-ebp
24582 89/<- %ebp 4/r32/esp
24583
24584 51/push-ecx
24585
24586 68/push 0/imm32
24587 68/push 0/imm32
24588 89/<- %ecx 4/r32/esp
24589
24590 8b/-> *(ebp+8) 0/r32/eax
24591
24592 3d/compare-eax-and 0/imm32
24593 0f 84/jump-if-= $size-of-type-id:end/disp32
24594
24595 3d/compare-eax-and 8/imm32/byte
24596 {
24597 75/jump-if-!= break/disp8
24598 b8/copy-to-eax 4/imm32
24599 eb/jump $size-of-type-id:end/disp8
24600 }
24601
24602 3d/compare-eax-and 4/imm32/handle
24603 {
24604 75/jump-if-!= break/disp8
24605 b8/copy-to-eax 8/imm32
24606 eb/jump $size-of-type-id:end/disp8
24607 }
24608
24609 3d/compare-eax-and 0xc/imm32/slice
24610 {
24611 75/jump-if-!= break/disp8
24612 b8/copy-to-eax 8/imm32
24613 eb/jump $size-of-type-id:end/disp8
24614 }
24615
24616
24617 (find-typeinfo %eax %ecx)
24618 {
24619 81 7/subop/compare *ecx 0/imm32
24620 74/jump-if-= break/disp8
24621 $size-of-type-id:user-defined:
24622 (lookup *ecx *(ecx+4))
24623 8b/-> *(eax+0xc) 0/r32/eax
24624 eb/jump $size-of-type-id:end/disp8
24625 }
24626
24627 b8/copy-to-eax 4/imm32
24628 $size-of-type-id:end:
24629
24630 81 0/subop/add %esp 8/imm32
24631
24632 59/pop-to-ecx
24633
24634 89/<- %esp 5/r32/ebp
24635 5d/pop-to-ebp
24636 c3/return
24637
24638
24639
24640
24641 type-tail:
24642
24643 55/push-ebp
24644 89/<- %ebp 4/r32/esp
24645
24646 51/push-ecx
24647
24648 b8/copy-to-eax 0/imm32
24649
24650 8b/-> *(ebp+8) 1/r32/ecx
24651 $type-tail:check-atom:
24652
24653 81 7/subop/compare *ecx 0/imm32/false
24654 0f 85/jump-if-!= $type-tail:end/disp32
24655
24656 (lookup *(ecx+0xc) *(ecx+0x10))
24657 89/<- %ecx 0/r32/eax
24658 $type-tail:check-singleton:
24659
24660 {
24661 81 7/subop/compare *(ecx+0xc) 0/imm32
24662 75/jump-if-!= break/disp8
24663 (lookup *(ecx+4) *(ecx+8))
24664 e9/jump $type-tail:end/disp32
24665 }
24666
24667 {
24668 $type-tail:check-array-capacity:
24669 (lookup *(ecx+0xc) *(ecx+0x10))
24670 81 7/subop/compare *eax 0/imm32/false
24671 75/jump-if-!= break/disp8
24672 $type-tail:check-array-capacity-1:
24673 (lookup *(eax+4) *(eax+8))
24674 3d/compare-eax-and 0/imm32
24675 74/jump-if-= break/disp8
24676 $type-tail:check-array-capacity-2:
24677 (is-simple-mu-type? %eax 9)
24678 3d/compare-eax-and 0/imm32/false
24679 74/jump-if-= break/disp8
24680 $type-tail:array-capacity:
24681 (lookup *(ecx+4) *(ecx+8))
24682 eb/jump $type-tail:end/disp8
24683 }
24684 $type-tail:check-compound-left:
24685
24686 (lookup *(ecx+4) *(ecx+8))
24687 81 7/subop/compare *eax 0/imm32/false
24688 74/jump-if-= $type-tail:end/disp8
24689 $type-tail:return-tail:
24690
24691 89/<- %eax 1/r32/ecx
24692 $type-tail:end:
24693
24694 59/pop-to-ecx
24695
24696 89/<- %esp 5/r32/ebp
24697 5d/pop-to-ebp
24698 c3/return
24699
24700 type-equal?:
24701
24702 55/push-ebp
24703 89/<- %ebp 4/r32/esp
24704
24705 51/push-ecx
24706 52/push-edx
24707 53/push-ebx
24708
24709 8b/-> *(ebp+8) 1/r32/ecx
24710
24711 8b/-> *(ebp+0xc) 2/r32/edx
24712 $type-equal?:compare-addr:
24713
24714 8b/-> %ecx 0/r32/eax
24715 39/compare %edx 0/r32/eax
24716 b8/copy-to-eax 1/imm32/true
24717 0f 84/jump-if-= $type-equal?:end/disp32
24718 $type-equal?:compare-null-a:
24719
24720 b8/copy-to-eax 0/imm32/false
24721 81 7/subop/compare %ecx 0/imm32
24722 0f 84/jump-if-= $type-equal?:end/disp32
24723 $type-equal?:compare-null-b:
24724
24725 81 7/subop/compare %edx 0/imm32
24726 0f 84/jump-if-= $type-equal?:end/disp32
24727 $type-equal?:compare-atom-state:
24728
24729 8b/-> *ecx 3/r32/ebx
24730 39/compare *edx 3/r32/ebx
24731 b8/copy-to-eax 0/imm32/false
24732 0f 85/jump-if-!= $type-equal?:end/disp32
24733
24734 {
24735 $type-equal?:check-atom:
24736 81 7/subop/compare %ebx 0/imm32/false
24737 74/jump-if-= break/disp8
24738 $type-equal?:is-atom:
24739 8b/-> *(ecx+4) 0/r32/eax
24740 39/compare *(edx+4) 0/r32/eax
24741 0f 94/set-if-= %al
24742 81 4/subop/and %eax 0xff/imm32
24743 e9/jump $type-equal?:end/disp32
24744 }
24745 $type-equal?:check-left:
24746
24747 (lookup *(ecx+4) *(ecx+8))
24748 89/<- %ebx 0/r32/eax
24749 (lookup *(edx+4) *(edx+8))
24750 (type-equal? %eax %ebx)
24751 3d/compare-eax-and 0/imm32/false
24752 74/jump-if-= $type-equal?:end/disp8
24753 $type-equal?:check-right:
24754
24755 (lookup *(ecx+0xc) *(ecx+0x10))
24756 89/<- %ebx 0/r32/eax
24757 (lookup *(edx+0xc) *(edx+0x10))
24758 (type-equal? %eax %ebx)
24759 $type-equal?:end:
24760
24761 5b/pop-to-ebx
24762 5a/pop-to-edx
24763 59/pop-to-ecx
24764
24765 89/<- %esp 5/r32/ebp
24766 5d/pop-to-ebp
24767 c3/return
24768
24769
24770
24771
24772
24773 == data
24774
24775
24776 Curr-local-stack-offset:
24777 0/imm32
24778
24779 == code
24780
24781 emit-subx:
24782
24783 55/push-ebp
24784 89/<- %ebp 4/r32/esp
24785
24786 50/push-eax
24787
24788 (lookup *_Program-functions *_Program-functions->payload)
24789 {
24790
24791 3d/compare-eax-and 0/imm32
24792 0f 84/jump-if-= break/disp32
24793 (emit-subx-function *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
24794
24795 (lookup *(eax+0x20) *(eax+0x24))
24796 e9/jump loop/disp32
24797 }
24798 $emit-subx:end:
24799
24800 58/pop-to-eax
24801
24802 89/<- %esp 5/r32/ebp
24803 5d/pop-to-ebp
24804 c3/return
24805
24806 emit-subx-function:
24807
24808 55/push-ebp
24809 89/<- %ebp 4/r32/esp
24810
24811 (populate-mu-type-offsets-in-inouts *(ebp+0xc))
24812
24813 50/push-eax
24814 51/push-ecx
24815 52/push-edx
24816
24817 c7 0/subop/copy *Curr-block-depth 1/imm32
24818 c7 0/subop/copy *Curr-local-stack-offset 0/imm32
24819
24820 8b/-> *(ebp+0xc) 1/r32/ecx
24821
24822 81 5/subop/subtract %esp 0xc00/imm32
24823 68/push 0xc00/imm32/size
24824 68/push 0/imm32/top
24825 89/<- %edx 4/r32/esp
24826
24827 (lookup *ecx *(ecx+4))
24828
24829 (write-buffered *(ebp+8) %eax)
24830 (write-buffered *(ebp+8) ":\n")
24831 (emit-subx-prologue *(ebp+8))
24832
24833 (lookup *(ecx+0x18) *(ecx+0x1c))
24834
24835 (emit-subx-block *(ebp+8) %eax %edx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
24836 (emit-subx-epilogue *(ebp+8))
24837
24838
24839 $emit-subx-function:end:
24840
24841 81 0/subop/add %esp 0xc08/imm32
24842
24843 5a/pop-to-edx
24844 59/pop-to-ecx
24845 58/pop-to-eax
24846
24847 89/<- %esp 5/r32/ebp
24848 5d/pop-to-ebp
24849 c3/return
24850
24851 populate-mu-type-offsets-in-inouts:
24852
24853 55/push-ebp
24854 89/<- %ebp 4/r32/esp
24855
24856 50/push-eax
24857 51/push-ecx
24858 52/push-edx
24859 53/push-ebx
24860 57/push-edi
24861
24862 ba/copy-to-edx 8/imm32
24863
24864 8b/-> *(ebp+8) 1/r32/ecx
24865 (lookup *(ecx+8) *(ecx+0xc))
24866 89/<- %ecx 0/r32/eax
24867 {
24868 $populate-mu-type-offsets-in-inouts:loop:
24869 81 7/subop/compare %ecx 0/imm32
24870 74/jump-if-= break/disp8
24871
24872 (lookup *ecx *(ecx+4))
24873 89/<- %ebx 0/r32/eax
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884 89/<- *(ebx+0x14) 2/r32/edx
24885
24886 (size-of %ebx)
24887 01/add-to %edx 0/r32/eax
24888
24889 (lookup *(ecx+8) *(ecx+0xc))
24890 89/<- %ecx 0/r32/eax
24891
24892 eb/jump loop/disp8
24893 }
24894 $populate-mu-type-offsets-in-inouts:end:
24895
24896 5f/pop-to-edi
24897 5b/pop-to-ebx
24898 5a/pop-to-edx
24899 59/pop-to-ecx
24900 58/pop-to-eax
24901
24902 89/<- %esp 5/r32/ebp
24903 5d/pop-to-ebp
24904 c3/return
24905
24906 emit-subx-stmt-list:
24907
24908 55/push-ebp
24909 89/<- %ebp 4/r32/esp
24910
24911 50/push-eax
24912 51/push-ecx
24913 53/push-ebx
24914 56/push-esi
24915
24916 8b/-> *(ebp+0xc) 6/r32/esi
24917
24918 {
24919 $emit-subx-stmt-list:loop:
24920 81 7/subop/compare %esi 0/imm32
24921 0f 84/jump-if-= break/disp32
24922
24923 (lookup *esi *(esi+4))
24924 89/<- %ecx 0/r32/eax
24925 {
24926 $emit-subx-stmt-list:check-for-block:
24927 81 7/subop/compare *ecx 0/imm32/block
24928 75/jump-if-!= break/disp8
24929 $emit-subx-stmt-list:block:
24930 (emit-subx-block *(ebp+8) %ecx *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
24931 }
24932 {
24933 $emit-subx-stmt-list:check-for-stmt:
24934 81 7/subop/compare *ecx 1/imm32/stmt1
24935 0f 85/jump-if-!= break/disp32
24936 $emit-subx-stmt-list:stmt1:
24937 {
24938 (is-mu-branch? %ecx)
24939 3d/compare-eax-and 0/imm32/false
24940 0f 84/jump-if-= break/disp32
24941 $emit-subx-stmt-list:branch-stmt:
24942 +-- 25 lines: # unconditional return -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
24967 +-- 27 lines: # unconditional loops --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
24994 +-- 16 lines: # unconditional breaks -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
25010 +-- 38 lines: # simple conditional branches without a target -------------------------------------------------------------------------------------------------------------------------------------------------------
25048 +-- 19 lines: # conditional branches with an explicit target -------------------------------------------------------------------------------------------------------------------------------------------------------
25067 }
25068 $emit-subx-stmt-list:1-to-1:
25069 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
25070 e9/jump $emit-subx-stmt-list:continue/disp32
25071 }
25072 {
25073 $emit-subx-stmt-list:check-for-var-def:
25074 81 7/subop/compare *ecx 2/imm32/var-def
25075 75/jump-if-!= break/disp8
25076 $emit-subx-stmt-list:var-def:
25077 (emit-subx-var-def *(ebp+8) %ecx)
25078 (push *(ebp+0x10) *(ecx+4))
25079 (push *(ebp+0x10) *(ecx+8))
25080 (push *(ebp+0x10) 0)
25081
25082 eb/jump $emit-subx-stmt-list:continue/disp8
25083 }
25084 {
25085 $emit-subx-stmt-list:check-for-reg-var-def:
25086 81 7/subop/compare *ecx 3/imm32/reg-var-def
25087 0f 85/jump-if-!= break/disp32
25088 $emit-subx-stmt-list:reg-var-def:
25089
25090 (push-output-and-maybe-emit-spill *(ebp+8) %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
25091
25092 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
25093
25094 eb/jump $emit-subx-stmt-list:continue/disp8
25095 }
25096 $emit-subx-stmt-list:continue:
25097
25098 (lookup *(esi+8) *(esi+0xc))
25099 89/<- %esi 0/r32/eax
25100 e9/jump loop/disp32
25101 }
25102 $emit-subx-stmt-list:emit-cleanup:
25103 (emit-cleanup-code-until-depth *(ebp+8) *(ebp+0x10) *Curr-block-depth)
25104 $emit-subx-stmt-list:clean-up:
25105 (clean-up-stack-offset-state *(ebp+0x10) *Curr-block-depth)
25106 (clean-up-blocks *(ebp+0x10) *Curr-block-depth *(ebp+0x14))
25107 $emit-subx-stmt-list:end:
25108
25109 5e/pop-to-esi
25110 5b/pop-to-ebx
25111 59/pop-to-ecx
25112 58/pop-to-eax
25113
25114 89/<- %esp 5/r32/ebp
25115 5d/pop-to-ebp
25116 c3/return
25117
25118
25119 push-output-and-maybe-emit-spill:
25120
25121 55/push-ebp
25122 89/<- %ebp 4/r32/esp
25123
25124 50/push-eax
25125 51/push-ecx
25126 52/push-edx
25127
25128 8b/-> *(ebp+0xc) 1/r32/ecx
25129
25130 (lookup *(ecx+0x14) *(ecx+0x18))
25131
25132
25133 (lookup *eax *(eax+4))
25134 89/<- %ecx 0/r32/eax
25135
25136 8b/-> *Curr-block-depth 0/r32/eax
25137 89/<- *(ecx+0x10) 0/r32/eax
25138
25139
25140
25141
25142
25143
25144
25145
25146 81 7/subop/compare *(ecx+0x18) 0/imm32
25147 0f 84/jump-if-= $push-output-and-maybe-emit-spill:abort/disp32
25148
25149 (not-yet-spilled-this-block? %ecx *(ebp+0x10))
25150 89/<- %edx 0/r32/eax
25151 3d/compare-eax-and 0/imm32/false
25152 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
25153 (will-not-write-some-register? %ecx *(ebp+0x14) *(ebp+0x18))
25154 89/<- %edx 0/r32/eax
25155
25156 3d/compare-eax-and 0/imm32/false
25157 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
25158
25159
25160 81 5/subop/subtract *Curr-local-stack-offset 4/imm32
25161
25162 (lookup *(ecx+0x18) *(ecx+0x1c))
25163 (emit-push-register *(ebp+8) %eax)
25164 $push-output-and-maybe-emit-spill:push:
25165 8b/-> *(ebp+0xc) 1/r32/ecx
25166 (lookup *(ecx+0x14) *(ecx+0x18))
25167
25168 (push *(ebp+0x10) *eax)
25169 (push *(ebp+0x10) *(eax+4))
25170 (push *(ebp+0x10) %edx)
25171 $push-output-and-maybe-emit-spill:end:
25172
25173 5a/pop-to-edx
25174 59/pop-to-ecx
25175 58/pop-to-eax
25176
25177 89/<- %esp 5/r32/ebp
25178 5d/pop-to-ebp
25179 c3/return
25180
25181 $push-output-and-maybe-emit-spill:abort:
25182
25183 (write-buffered *(ebp+0x1c) "var '")
25184 (write-buffered *(ebp+0x1c) *eax)
25185 (write-buffered *(ebp+0x1c) "' initialized from an instruction must live in a register\n")
25186 (flush *(ebp+0x1c))
25187 (stop *(ebp+0x20) 1)
25188
25189
25190 emit-subx-cleanup-and-unconditional-nonlocal-branch:
25191
25192 55/push-ebp
25193 89/<- %ebp 4/r32/esp
25194
25195 50/push-eax
25196 51/push-ecx
25197
25198 8b/-> *(ebp+0xc) 1/r32/ecx
25199
25200 (lookup *(ecx+0xc) *(ecx+0x10))
25201 (lookup *eax *(eax+4))
25202 (lookup *eax *(eax+4))
25203
25204 (emit-cleanup-code-until-target *(ebp+8) *(ebp+0x10) %eax)
25205
25206 (emit-indent *(ebp+8) *Curr-block-depth)
25207 (write-buffered *(ebp+8) "e9/jump ")
25208 (write-buffered *(ebp+8) %eax)
25209 (lookup *(ecx+4) *(ecx+8))
25210 (string-starts-with? %eax "break")
25211 3d/compare-eax-and 0/imm32/false
25212 {
25213 74/jump-if-= break/disp8
25214 (write-buffered *(ebp+8) ":break/disp32\n")
25215 eb/jump $emit-subx-cleanup-and-unconditional-nonlocal-branch:end/disp8
25216 }
25217 (write-buffered *(ebp+8) ":loop/disp32\n")
25218 $emit-subx-cleanup-and-unconditional-nonlocal-branch:end:
25219
25220 59/pop-to-ecx
25221 58/pop-to-eax
25222
25223 89/<- %esp 5/r32/ebp
25224 5d/pop-to-ebp
25225 c3/return
25226
25227 emit-outputs:
25228
25229
25230
25231
25232
25233
25234
25235
25236 55/push-ebp
25237 89/<- %ebp 4/r32/esp
25238
25239 50/push-eax
25240 51/push-ecx
25241 56/push-esi
25242 57/push-edi
25243
25244 8b/-> *(ebp+0xc) 0/r32/eax
25245 (lookup *(eax+0xc) *(eax+0x10))
25246 89/<- %esi 0/r32/eax
25247
25248 8b/-> *(ebp+0x10) 0/r32/eax
25249 (lookup *(eax+0x10) *(eax+0x14))
25250 89/<- %edi 0/r32/eax
25251 {
25252 $emit-outputs:loop:
25253 81 7/subop/compare %esi 0/imm32
25254 0f 84/jump-if-= break/disp32
25255
25256
25257 (lookup *esi *(esi+4))
25258 89/<- %ecx 0/r32/eax
25259
25260 (lookup *(ecx+8) *(ecx+0xc))
25261 (is-simple-mu-type? %eax 0)
25262 {
25263 3d/compare-eax-and 0/imm32/false
25264 0f 84/jump-if-= break/disp32
25265 (emit-indent *(ebp+8) *Curr-block-depth)
25266 (write-buffered *(ebp+8) "c7 0/subop/copy %")
25267 (lookup *edi *(edi+4))
25268 (lookup *(eax+0x18) *(eax+0x1c))
25269 (write-buffered *(ebp+8) %eax)
25270 (write-buffered *(ebp+8) " ")
25271 (lookup *ecx *(ecx+4))
25272 (write-buffered *(ebp+8) %eax)
25273 (write-buffered *(ebp+8) "/imm32\n")
25274 e9/jump $emit-outputs:continue/disp32
25275 }
25276
25277 (lookup *(ecx+0x18) *(ecx+0x1c))
25278 {
25279 3d/compare-eax-and 0/imm32
25280 0f 84/jump-if-= break/disp32
25281 8a/copy-byte *(eax+4) 0/r32/AL
25282 81 4/subop/and %eax 0xff/imm32
25283 3d/compare-eax-and 0x78/imm32/x
25284 0f 85/jump-if-!= break/disp32
25285 (emit-indent *(ebp+8) *Curr-block-depth)
25286 (write-buffered *(ebp+8) "f3 0f 10/->")
25287 (emit-subx-var-as-rm32 *(ebp+8) %esi)
25288 (write-buffered *(ebp+8) " ")
25289 (lookup *edi *(edi+4))
25290 (lookup *(eax+0x18) *(eax+0x1c))
25291 (get Mu-registers %eax 0xc "Mu-registers")
25292 (write-int32-hex-buffered *(ebp+8) *eax)
25293 (write-buffered *(ebp+8) "/x32\n")
25294 e9/jump $emit-outputs:continue/disp32
25295 }
25296
25297 (emit-indent *(ebp+8) *Curr-block-depth)
25298 (write-buffered *(ebp+8) "8b/->")
25299 (emit-subx-var-as-rm32 *(ebp+8) %esi)
25300 (write-buffered *(ebp+8) " ")
25301 (lookup *edi *(edi+4))
25302 (lookup *(eax+0x18) *(eax+0x1c))
25303 (get Mu-registers %eax 0xc "Mu-registers")
25304 (write-int32-hex-buffered *(ebp+8) *eax)
25305 (write-buffered *(ebp+8) "/r32\n")
25306 $emit-outputs:continue:
25307
25308 (lookup *(esi+8) *(esi+0xc))
25309 89/<- %esi 0/r32/eax
25310
25311 (lookup *(edi+8) *(edi+0xc))
25312 89/<- %edi 0/r32/eax
25313
25314 e9/jump loop/disp32
25315 }
25316 $emit-outputs:end:
25317
25318 5f/pop-to-edi
25319 5e/pop-to-esi
25320 59/pop-to-ecx
25321 58/pop-to-eax
25322
25323 89/<- %esp 5/r32/ebp
25324 5d/pop-to-ebp
25325 c3/return
25326
25327 is-mu-branch?:
25328
25329 55/push-ebp
25330 89/<- %ebp 4/r32/esp
25331
25332 51/push-ecx
25333
25334 8b/-> *(ebp+8) 1/r32/ecx
25335 (lookup *(ecx+4) *(ecx+8))
25336 89/<- %ecx 0/r32/eax
25337
25338 (string-starts-with? %ecx "loop")
25339 3d/compare-eax-and 0/imm32/false
25340 75/jump-if-not-equal $is-mu-branch?:end/disp8
25341
25342 (string-starts-with? %ecx "break")
25343 3d/compare-eax-and 0/imm32/false
25344 75/jump-if-not-equal $is-mu-branch?:end/disp8
25345
25346 (string-starts-with? %ecx "return")
25347 $is-mu-branch?:end:
25348
25349 59/pop-to-ecx
25350
25351 89/<- %esp 5/r32/ebp
25352 5d/pop-to-ebp
25353 c3/return
25354
25355 emit-reverse-break:
25356
25357 55/push-ebp
25358 89/<- %ebp 4/r32/esp
25359
25360 50/push-eax
25361
25362 8b/-> *(ebp+0xc) 0/r32/eax
25363
25364 (lookup *(eax+4) *(eax+8))
25365 (get Reverse-branch %eax 0x10 "reverse-branch: ")
25366 (emit-indent *(ebp+8) *Curr-block-depth)
25367 (lookup *eax *(eax+4))
25368 (write-buffered *(ebp+8) %eax)
25369 (write-buffered *(ebp+8) " break/disp32\n")
25370 $emit-reverse-break:end:
25371
25372 58/pop-to-eax
25373
25374 89/<- %esp 5/r32/ebp
25375 5d/pop-to-ebp
25376 c3/return
25377
25378 == data
25379
25380
25381 Reverse-branch:
25382
25383 0x1c0/imm32/write
25384 0/imm32/read
25385 0x1c0/imm32/size
25386
25387 0x11/imm32/alloc-id _string-break-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
25388 0x11/imm32/alloc-id _string-loop-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
25389 0x11/imm32/alloc-id _string-break-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
25390 0x11/imm32/alloc-id _string-loop-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
25391 0x11/imm32/alloc-id _string-break-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
25392 0x11/imm32/alloc-id _string-loop-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
25393 0x11/imm32/alloc-id _string-break-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
25394 0x11/imm32/alloc-id _string-loop-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
25395 0x11/imm32/alloc-id _string-break-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
25396 0x11/imm32/alloc-id _string-loop-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
25397 0x11/imm32/alloc-id _string-break-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
25398 0x11/imm32/alloc-id _string-loop-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
25399 0x11/imm32/alloc-id _string-break-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
25400 0x11/imm32/alloc-id _string-loop-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
25401 0x11/imm32/alloc-id _string-break-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
25402 0x11/imm32/alloc-id _string-loop-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
25403 0x11/imm32/alloc-id _string-break-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
25404 0x11/imm32/alloc-id _string-loop-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
25405 0x11/imm32/alloc-id _string-break-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
25406 0x11/imm32/alloc-id _string-loop-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
25407 0x11/imm32/alloc-id _string-break-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
25408 0x11/imm32/alloc-id _string-loop-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
25409 0x11/imm32/alloc-id _string-break-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
25410 0x11/imm32/alloc-id _string-loop-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
25411 0x11/imm32/alloc-id _string-break-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
25412 0x11/imm32/alloc-id _string-loop-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
25413 0x11/imm32/alloc-id _string-break-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
25414 0x11/imm32/alloc-id _string-loop-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
25415
25416 == code
25417
25418 emit-unconditional-jump-to-depth:
25419
25420 55/push-ebp
25421 89/<- %ebp 4/r32/esp
25422
25423 50/push-eax
25424 51/push-ecx
25425 52/push-edx
25426 53/push-ebx
25427 56/push-esi
25428
25429 8b/-> *(ebp+0xc) 1/r32/ecx
25430
25431 8b/-> *ecx 0/r32/eax
25432
25433 8d/copy-address *(ecx+eax-4) 6/r32/esi
25434
25435 8d/copy-address *(ecx+8) 1/r32/ecx
25436
25437 8b/-> *(ebp+0x10) 2/r32/edx
25438 {
25439 $emit-unconditional-jump-to-depth:loop:
25440
25441 39/compare %esi 1/r32/ecx
25442 0f 82/jump-if-addr< break/disp32
25443
25444 (lookup *esi *(esi+4))
25445 89/<- %ebx 0/r32/eax
25446
25447 39/compare *(ebx+0x10) 2/r32/edx
25448 0f 8c/jump-if-< break/disp32
25449 {
25450 $emit-unconditional-jump-to-depth:check:
25451
25452 39/compare *(ebx+0x10) 2/r32/edx
25453 0f 85/jump-if-!= break/disp32
25454 $emit-unconditional-jump-to-depth:depth-found:
25455
25456 (size-of %ebx)
25457 3d/compare-eax-and 0/imm32
25458 0f 85/jump-if-!= break/disp32
25459 $emit-unconditional-jump-to-depth:label-found:
25460
25461 (emit-indent *(ebp+8) *Curr-block-depth)
25462 (write-buffered *(ebp+8) "e9/jump ")
25463 (lookup *ebx *(ebx+4))
25464 (write-buffered *(ebp+8) %eax)
25465 (write-buffered *(ebp+8) ":")
25466 (write-buffered *(ebp+8) *(ebp+0x14))
25467 (write-buffered *(ebp+8) "/disp32\n")
25468 eb/jump $emit-unconditional-jump-to-depth:end/disp8
25469 }
25470
25471 81 5/subop/subtract %esi 0xc/imm32
25472 e9/jump loop/disp32
25473 }
25474
25475 $emit-unconditional-jump-to-depth:end:
25476
25477 5e/pop-to-esi
25478 5b/pop-to-ebx
25479 5a/pop-to-edx
25480 59/pop-to-ecx
25481 58/pop-to-eax
25482
25483 89/<- %esp 5/r32/ebp
25484 5d/pop-to-ebp
25485 c3/return
25486
25487
25488
25489 emit-cleanup-code-until-depth:
25490
25491 55/push-ebp
25492 89/<- %ebp 4/r32/esp
25493
25494 50/push-eax
25495 51/push-ecx
25496 52/push-edx
25497 53/push-ebx
25498 56/push-esi
25499
25500
25501
25502 8b/-> *(ebp+0xc) 1/r32/ecx
25503
25504 8b/-> *ecx 6/r32/esi
25505
25506 8d/copy-address *(ecx+esi-4) 6/r32/esi
25507
25508 81 0/subop/add %ecx 8/imm32
25509
25510 8b/-> *(ebp+0x10) 2/r32/edx
25511 {
25512 $emit-cleanup-code-until-depth:loop:
25513
25514 39/compare %esi 1/r32/ecx
25515 0f 82/jump-if-addr< break/disp32
25516
25517 (lookup *esi *(esi+4))
25518 89/<- %ebx 0/r32/eax
25519
25520
25521
25522
25523
25524
25525 39/compare *(ebx+0x10) 2/r32/edx
25526 0f 8c/jump-if-< break/disp32
25527
25528 81 7/subop/compare *(ebx+0x18) 0/imm32
25529 {
25530 0f 84/jump-if-= break/disp32
25531 {
25532 $emit-cleanup-code-until-depth:check-for-previous-spill:
25533 8b/-> *(esi+8) 0/r32/eax
25534 3d/compare-eax-and 0/imm32/false
25535 74/jump-if-= break/disp8
25536 $emit-cleanup-code-until-depth:reclaim-var-in-register:
25537 (lookup *(ebx+0x18) *(ebx+0x1c))
25538 (emit-pop-register *(ebp+8) %eax)
25539 }
25540 eb/jump $emit-cleanup-code-until-depth:continue/disp8
25541 }
25542
25543 {
25544 75/jump-if-!= break/disp8
25545 $emit-cleanup-code-until-depth:var-on-stack:
25546 (size-of %ebx)
25547
25548 3d/compare-eax-and 0/imm32
25549 74/jump-if-= break/disp8
25550 $emit-cleanup-code-until-depth:reclaim-var-on-stack:
25551 (emit-indent *(ebp+8) *Curr-block-depth)
25552 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
25553 (write-int32-hex-buffered *(ebp+8) %eax)
25554 (write-buffered *(ebp+8) "/imm32\n")
25555 }
25556 $emit-cleanup-code-until-depth:continue:
25557
25558 81 5/subop/subtract %esi 0xc/imm32
25559 e9/jump loop/disp32
25560 }
25561 $emit-cleanup-code-until-depth:end:
25562
25563 5e/pop-to-esi
25564 5b/pop-to-ebx
25565 5a/pop-to-edx
25566 59/pop-to-ecx
25567 58/pop-to-eax
25568
25569 89/<- %esp 5/r32/ebp
25570 5d/pop-to-ebp
25571 c3/return
25572
25573
25574
25575 emit-cleanup-code-for-non-outputs:
25576
25577 55/push-ebp
25578 89/<- %ebp 4/r32/esp
25579
25580 50/push-eax
25581 51/push-ecx
25582 52/push-edx
25583 53/push-ebx
25584 56/push-esi
25585 57/push-edi
25586
25587 8b/-> *(ebp+0xc) 1/r32/ecx
25588
25589 8b/-> *ecx 6/r32/esi
25590
25591 8d/copy-address *(ecx+esi-4) 6/r32/esi
25592
25593 81 0/subop/add %ecx 8/imm32
25594 {
25595 $emit-cleanup-code-for-non-outputs:loop:
25596
25597 39/compare %esi 1/r32/ecx
25598 0f 82/jump-if-addr< break/disp32
25599
25600 (lookup *esi *(esi+4))
25601 89/<- %ebx 0/r32/eax
25602
25603 81 7/subop/compare *(ebx+0x18) 0/imm32
25604 {
25605 0f 84/jump-if-= break/disp32
25606 {
25607 $emit-cleanup-code-for-non-outputs:check-for-previous-spill:
25608 8b/-> *(esi+8) 0/r32/eax
25609 3d/compare-eax-and 0/imm32/false
25610 0f 84/jump-if-= break/disp32
25611 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register:
25612
25613 (lookup *(ebx+0x18) *(ebx+0x1c))
25614 89/<- %edi 0/r32/eax
25615
25616 (reg-in-function-outputs? *(ebp+0x10) %edi)
25617 3d/compare-eax-and 0/imm32/false
25618 {
25619 75/jump-if-!= break/disp8
25620 (emit-pop-register *(ebp+8) %edi)
25621 eb/jump $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done/disp8
25622 }
25623
25624 (emit-indent *(ebp+8) *Curr-block-depth)
25625 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
25626 }
25627 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done:
25628 eb/jump $emit-cleanup-code-for-non-outputs:continue/disp8
25629 }
25630
25631 {
25632 75/jump-if-!= break/disp8
25633 $emit-cleanup-code-for-non-outputs:var-on-stack:
25634 (size-of %ebx)
25635
25636 3d/compare-eax-and 0/imm32
25637 74/jump-if-= break/disp8
25638 $emit-cleanup-code-for-non-outputs:reclaim-var-on-stack:
25639 (emit-indent *(ebp+8) *Curr-block-depth)
25640 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
25641 (write-int32-hex-buffered *(ebp+8) %eax)
25642 (write-buffered *(ebp+8) "/imm32\n")
25643 }
25644 $emit-cleanup-code-for-non-outputs:continue:
25645
25646 81 5/subop/subtract %esi 0xc/imm32
25647 e9/jump loop/disp32
25648 }
25649 $emit-cleanup-code-for-non-outputs:end:
25650
25651 5f/pop-to-edi
25652 5e/pop-to-esi
25653 5b/pop-to-ebx
25654 5a/pop-to-edx
25655 59/pop-to-ecx
25656 58/pop-to-eax
25657
25658 89/<- %esp 5/r32/ebp
25659 5d/pop-to-ebp
25660 c3/return
25661
25662 emit-push-register:
25663
25664 55/push-ebp
25665 89/<- %ebp 4/r32/esp
25666
25667 8b/-> *(ebp+0xc) 0/r32/eax
25668
25669 8a/copy-byte *(eax+4) 0/r32/AL
25670 81 4/subop/and %eax 0xff/imm32
25671
25672 {
25673 3d/compare-eax-and 0x78/imm32/x
25674 0f 85/jump-if-!= break/disp32
25675
25676 (emit-indent *(ebp+8) *Curr-block-depth)
25677 (write-buffered *(ebp+8) "81 5/subop/subtract %esp 4/imm32\n")
25678 (emit-indent *(ebp+8) *Curr-block-depth)
25679 (write-buffered *(ebp+8) "f3 0f 11/<- *esp ")
25680
25681 8b/-> *(ebp+0xc) 0/r32/eax
25682 8a/copy-byte *(eax+7) 0/r32/AL
25683 81 4/subop/and %eax 0xff/imm32
25684 (write-byte-buffered *(ebp+8) %eax)
25685 (write-buffered *(ebp+8) "/x32\n")
25686 e9/jump $emit-push-register:end/disp32
25687 }
25688
25689 (emit-indent *(ebp+8) *Curr-block-depth)
25690 (write-buffered *(ebp+8) "ff 6/subop/push %")
25691 (write-buffered *(ebp+8) *(ebp+0xc))
25692 (write-buffered *(ebp+8) Newline)
25693 $emit-push-register:end:
25694
25695 89/<- %esp 5/r32/ebp
25696 5d/pop-to-ebp
25697 c3/return
25698
25699 emit-pop-register:
25700
25701 55/push-ebp
25702 89/<- %ebp 4/r32/esp
25703
25704 50/push-eax
25705
25706 8b/-> *(ebp+0xc) 0/r32/eax
25707
25708 8a/copy-byte *(eax+4) 0/r32/AL
25709 81 4/subop/and %eax 0xff/imm32
25710
25711 {
25712 3d/compare-eax-and 0x78/imm32/x
25713 0f 85/jump-if-!= break/disp32
25714
25715 (emit-indent *(ebp+8) *Curr-block-depth)
25716 (write-buffered *(ebp+8) "f3 0f 10/-> *esp ")
25717
25718 8b/-> *(ebp+0xc) 0/r32/eax
25719 8a/copy-byte *(eax+7) 0/r32/AL
25720 81 4/subop/and %eax 0xff/imm32
25721 (write-byte-buffered *(ebp+8) %eax)
25722 (write-buffered *(ebp+8) "/x32\n")
25723 (emit-indent *(ebp+8) *Curr-block-depth)
25724 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
25725 e9/jump $emit-pop-register:end/disp32
25726 }
25727
25728 (emit-indent *(ebp+8) *Curr-block-depth)
25729 (write-buffered *(ebp+8) "8f 0/subop/pop %")
25730 (write-buffered *(ebp+8) *(ebp+0xc))
25731 (write-buffered *(ebp+8) Newline)
25732 $emit-pop-register:end:
25733
25734 58/pop-to-eax
25735
25736 89/<- %esp 5/r32/ebp
25737 5d/pop-to-ebp
25738 c3/return
25739
25740
25741
25742 emit-cleanup-code-until-target:
25743
25744 55/push-ebp
25745 89/<- %ebp 4/r32/esp
25746
25747 50/push-eax
25748 51/push-ecx
25749 52/push-edx
25750 53/push-ebx
25751
25752 8b/-> *(ebp+0xc) 1/r32/ecx
25753
25754 8b/-> *ecx 0/r32/eax
25755
25756 8d/copy-address *(ecx+eax-4) 2/r32/edx
25757
25758 81 0/subop/add %ecx 8/imm32
25759 {
25760 $emit-cleanup-code-until-target:loop:
25761
25762 39/compare %edx 1/r32/ecx
25763 0f 82/jump-if-addr< break/disp32
25764
25765 (lookup *edx *(edx+4))
25766 89/<- %ebx 0/r32/eax
25767
25768 (lookup *ebx *(ebx+4))
25769 (string-equal? %eax *(ebp+0x10))
25770 3d/compare-eax-and 0/imm32/false
25771 0f 85/jump-if-!= break/disp32
25772
25773 81 7/subop/compare *(ebx+0x18) 0/imm32
25774 {
25775 0f 84/jump-if-= break/disp32
25776 {
25777 $emit-cleanup-code-until-target:check-for-previous-spill:
25778 8b/-> *(edx+8) 0/r32/eax
25779 3d/compare-eax-and 0/imm32/false
25780 74/jump-if-= break/disp8
25781 $emit-cleanup-code-until-target:reclaim-var-in-register:
25782 (lookup *(ebx+0x18) *(ebx+0x1c))
25783 (emit-pop-register *(ebp+8) %eax)
25784 }
25785 eb/jump $emit-cleanup-code-until-target:continue/disp8
25786 }
25787
25788 {
25789 75/jump-if-!= break/disp8
25790 $emit-cleanup-code-until-target:reclaim-var-on-stack:
25791 (size-of %ebx)
25792
25793 3d/compare-eax-and 0/imm32
25794 74/jump-if-= break/disp8
25795
25796 (emit-indent *(ebp+8) *Curr-block-depth)
25797 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
25798 (write-int32-hex-buffered *(ebp+8) %eax)
25799 (write-buffered *(ebp+8) "/imm32\n")
25800 }
25801 $emit-cleanup-code-until-target:continue:
25802
25803 81 5/subop/subtract %edx 0xc/imm32
25804 e9/jump loop/disp32
25805 }
25806 $emit-cleanup-code-until-target:end:
25807
25808 5b/pop-to-ebx
25809 5a/pop-to-edx
25810 59/pop-to-ecx
25811 58/pop-to-eax
25812
25813 89/<- %esp 5/r32/ebp
25814 5d/pop-to-ebp
25815 c3/return
25816
25817
25818
25819 clean-up-stack-offset-state:
25820
25821 55/push-ebp
25822 89/<- %ebp 4/r32/esp
25823
25824 50/push-eax
25825 51/push-ecx
25826 52/push-edx
25827 53/push-ebx
25828 56/push-esi
25829
25830 8b/-> *(ebp+8) 1/r32/ecx
25831
25832 8b/-> *ecx 6/r32/esi
25833
25834 8d/copy-address *(ecx+esi-4) 6/r32/esi
25835
25836 81 0/subop/add %ecx 8/imm32
25837
25838 8b/-> *(ebp+0xc) 2/r32/edx
25839 {
25840 $clean-up-stack-offset-state:loop:
25841
25842 39/compare %esi 1/r32/ecx
25843 0f 82/jump-if-addr< break/disp32
25844
25845 (lookup *esi *(esi+4))
25846 89/<- %ebx 0/r32/eax
25847
25848 39/compare *(ebx+0x10) 2/r32/edx
25849 0f 8c/jump-if-< break/disp32
25850
25851 81 7/subop/compare *(ebx+0x18) 0/imm32
25852 {
25853 0f 84/jump-if-= break/disp32
25854 {
25855 $clean-up-stack-offset-state:check-for-previous-spill:
25856 8b/-> *(esi+8) 0/r32/eax
25857 3d/compare-eax-and 0/imm32/false
25858 74/jump-if-= break/disp8
25859 $clean-up-stack-offset-state:reclaim-var-in-register:
25860 81 0/subop/add *Curr-local-stack-offset 4/imm32
25861 }
25862 eb/jump $clean-up-stack-offset-state:continue/disp8
25863 }
25864
25865 {
25866 75/jump-if-!= break/disp8
25867 $clean-up-stack-offset-state:var-on-stack:
25868 (size-of %ebx)
25869 01/add-to *Curr-local-stack-offset 0/r32/eax
25870 }
25871 $clean-up-stack-offset-state:continue:
25872
25873 81 5/subop/subtract %esi 0xc/imm32
25874 e9/jump loop/disp32
25875 }
25876 $clean-up-stack-offset-state:end:
25877
25878 5e/pop-to-esi
25879 5b/pop-to-ebx
25880 5a/pop-to-edx
25881 59/pop-to-ecx
25882 58/pop-to-eax
25883
25884 89/<- %esp 5/r32/ebp
25885 5d/pop-to-ebp
25886 c3/return
25887
25888
25889
25890
25891 not-yet-spilled-this-block?:
25892
25893 55/push-ebp
25894 89/<- %ebp 4/r32/esp
25895
25896 51/push-ecx
25897 52/push-edx
25898 53/push-ebx
25899 56/push-esi
25900 57/push-edi
25901
25902 8b/-> *(ebp+0xc) 1/r32/ecx
25903
25904 8b/-> *ecx 0/r32/eax
25905
25906 8d/copy-address *(ecx+eax-4) 2/r32/edx
25907
25908 8d/copy-address *(ecx+8) 1/r32/ecx
25909
25910 8b/-> *(ebp+8) 3/r32/ebx
25911 8b/-> *(ebx+0x10) 3/r32/ebx
25912
25913 8b/-> *(ebp+8) 6/r32/esi
25914 (lookup *(esi+0x18) *(esi+0x1c))
25915 89/<- %esi 0/r32/eax
25916 {
25917 $not-yet-spilled-this-block?:loop:
25918
25919 39/compare %edx 1/r32/ecx
25920 0f 82/jump-if-addr< break/disp32
25921
25922 (lookup *edx *(edx+4))
25923 89/<- %edi 0/r32/eax
25924
25925 39/compare *(edi+0x10) 3/r32/ebx
25926 0f 8c/jump-if-< break/disp32
25927
25928 (lookup *(edi+0x18) *(edi+0x1c))
25929 89/<- %edi 0/r32/eax
25930
25931 {
25932 $not-yet-spilled-this-block?:check-reg:
25933 81 7/subop/compare %edi 0/imm32
25934 0f 84/jump-if-= break/disp32
25935
25936 (string-equal? %esi %edi)
25937 3d/compare-eax-and 0/imm32/false
25938 74/jump-if-= break/disp8
25939 $not-yet-spilled-this-block?:return-false:
25940 b8/copy-to-eax 0/imm32/false
25941 eb/jump $not-yet-spilled-this-block?:end/disp8
25942 }
25943 $not-yet-spilled-this-block?:continue:
25944
25945 81 5/subop/subtract %edx 0xc/imm32
25946 e9/jump loop/disp32
25947 }
25948 $not-yet-spilled-this-block?:return-true:
25949
25950 b8/copy-to-eax 1/imm32/true
25951 $not-yet-spilled-this-block?:end:
25952
25953 5f/pop-to-edi
25954 5e/pop-to-esi
25955 5b/pop-to-ebx
25956 5a/pop-to-edx
25957 59/pop-to-ecx
25958
25959 89/<- %esp 5/r32/ebp
25960 5d/pop-to-ebp
25961 c3/return
25962
25963
25964 will-not-write-some-register?:
25965
25966 55/push-ebp
25967 89/<- %ebp 4/r32/esp
25968
25969 8b/-> *(ebp+8) 0/r32/eax
25970
25971 (lookup *(eax+0x18) *(eax+0x1c))
25972
25973 (find-register *(ebp+0x10) %eax)
25974
25975 {
25976 3d/compare-eax-and 0/imm32
25977 75/jump-if-!= break/disp8
25978 b8/copy-to-eax 1/imm32/true
25979 eb/jump $will-not-write-some-register?:end/disp8
25980 }
25981
25982 (assigns-in-stmts? *(ebp+0xc) %eax)
25983 3d/compare-eax-and 0/imm32/false
25984
25985 0f 94/set-if-= %al
25986 $will-not-write-some-register?:end:
25987
25988 89/<- %esp 5/r32/ebp
25989 5d/pop-to-ebp
25990 c3/return
25991
25992
25993
25994 find-register:
25995
25996 55/push-ebp
25997 89/<- %ebp 4/r32/esp
25998
25999 51/push-ecx
26000
26001 8b/-> *(ebp+8) 1/r32/ecx
26002 (lookup *(ecx+0x10) *(ecx+0x14))
26003 89/<- %ecx 0/r32/eax
26004 {
26005 $find-register:loop:
26006
26007 81 7/subop/compare %ecx 0/imm32
26008 74/jump-if-= break/disp8
26009
26010 (lookup *ecx *(ecx+4))
26011 (lookup *(eax+0x18) *(eax+0x1c))
26012
26013 $find-register:compare:
26014 (string-equal? *(ebp+0xc) %eax)
26015 {
26016 3d/compare-eax-and 0/imm32/false
26017 74/jump-if-= break/disp8
26018 $find-register:found:
26019 (lookup *ecx *(ecx+4))
26020 eb/jump $find-register:end/disp8
26021 }
26022
26023 (lookup *(ecx+8) *(ecx+0xc))
26024 89/<- %ecx 0/r32/eax
26025
26026 eb/jump loop/disp8
26027 }
26028 $find-register:end:
26029
26030 59/pop-to-ecx
26031
26032 89/<- %esp 5/r32/ebp
26033 5d/pop-to-ebp
26034 c3/return
26035
26036 assigns-in-stmts?:
26037
26038 55/push-ebp
26039 89/<- %ebp 4/r32/esp
26040
26041 51/push-ecx
26042
26043 8b/-> *(ebp+8) 1/r32/ecx
26044 {
26045
26046 81 7/subop/compare %ecx 0/imm32
26047 74/jump-if-= break/disp8
26048
26049 (lookup *ecx *(ecx+4))
26050 (assigns-in-stmt? %eax *(ebp+0xc))
26051 3d/compare-eax-and 0/imm32/false
26052 75/jump-if-!= break/disp8
26053
26054 (lookup *(ecx+8) *(ecx+0xc))
26055 89/<- %ecx 0/r32/eax
26056
26057 eb/jump loop/disp8
26058 }
26059 $assigns-in-stmts?:end:
26060
26061 59/pop-to-ecx
26062
26063 89/<- %esp 5/r32/ebp
26064 5d/pop-to-ebp
26065 c3/return
26066
26067 assigns-in-stmt?:
26068
26069 55/push-ebp
26070 89/<- %ebp 4/r32/esp
26071
26072 51/push-ecx
26073
26074 8b/-> *(ebp+8) 1/r32/ecx
26075
26076 {
26077 81 7/subop/compare *ecx 1/imm32/stmt1
26078 75/jump-if-!= break/disp8
26079 (lookup *(ecx+0x14) *(ecx+0x18))
26080 (assigns-in-stmt-vars? %eax *(ebp+0xc))
26081 eb/jump $assigns-in-stmt?:end/disp8
26082 }
26083
26084 {
26085 81 7/subop/compare *ecx 0/imm32/block
26086 75/jump-if-!= break/disp8
26087 (lookup *(ecx+4) *(ecx+8))
26088 (assigns-in-stmts? %eax *(ebp+0xc))
26089 eb/jump $assigns-in-stmt?:end/disp8
26090 }
26091
26092 b8/copy 0/imm32/false
26093 $assigns-in-stmt?:end:
26094
26095 59/pop-to-ecx
26096
26097 89/<- %esp 5/r32/ebp
26098 5d/pop-to-ebp
26099 c3/return
26100
26101 assigns-in-stmt-vars?:
26102
26103 55/push-ebp
26104 89/<- %ebp 4/r32/esp
26105
26106 51/push-ecx
26107
26108 8b/-> *(ebp+8) 1/r32/ecx
26109 {
26110
26111 81 7/subop/compare %ecx 0/imm32
26112 74/jump-if-= break/disp8
26113
26114 (lookup *ecx *(ecx+4))
26115
26116 {
26117 39/compare *(ebp+0xc) 0/r32/eax
26118 75/jump-if-!= break/disp8
26119 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26120 75/jump-if-!= break/disp8
26121 b8/copy-to-eax 1/imm32/true
26122 eb/jump $assigns-in-stmt-vars?:end/disp8
26123 }
26124
26125 (lookup *(ecx+8) *(ecx+0xc))
26126 89/<- %ecx 0/r32/eax
26127
26128 eb/jump loop/disp8
26129 }
26130 $assigns-in-stmt-vars?:end:
26131
26132 59/pop-to-ecx
26133
26134 89/<- %esp 5/r32/ebp
26135 5d/pop-to-ebp
26136 c3/return
26137
26138
26139
26140
26141
26142 same-register-spilled-before?:
26143
26144 55/push-ebp
26145 89/<- %ebp 4/r32/esp
26146
26147 51/push-ecx
26148 52/push-edx
26149 53/push-ebx
26150 56/push-esi
26151 57/push-edi
26152
26153 8b/-> *(ebp+8) 1/r32/ecx
26154
26155 (lookup *(ecx+0x18) *(ecx+0x1c))
26156 89/<- %edx 0/r32/eax
26157
26158 8b/-> *(ecx+0x10) 3/r32/ebx
26159
26160 8b/-> *(ebp+0xc) 1/r32/ecx
26161 81 0/subop/add %ecx 8/imm32
26162
26163
26164
26165 8b/-> *(ebp+0x10) 6/r32/esi
26166
26167 81 5/subop/subtract %esi 8/imm32
26168 {
26169 $same-register-spilled-before?:loop:
26170
26171 39/compare %esi 1/r32/ecx
26172 0f 82/jump-if-addr< break/disp32
26173
26174 (lookup *esi *(esi+4))
26175
26176 39/compare *(eax+0x10) 3/r32/ebx
26177 0f 8c/jump-if-< break/disp32
26178
26179 81 7/subop/compare *(eax+0x18) 0/imm32
26180 74/jump-if-= $same-register-spilled-before?:continue/disp8
26181
26182 (lookup *(eax+0x18) *(eax+0x1c))
26183 (string-equal? %eax %edx)
26184 3d/compare-eax-and 0/imm32/false
26185 b8/copy-to-eax 1/imm32/true
26186 75/jump-if-!= $same-register-spilled-before?:end/disp8
26187 $same-register-spilled-before?:continue:
26188
26189 81 5/subop/subtract %esi 8/imm32
26190 e9/jump loop/disp32
26191 }
26192 $same-register-spilled-before?:false:
26193 b8/copy-to-eax 0/imm32/false
26194 $same-register-spilled-before?:end:
26195
26196 5f/pop-to-edi
26197 5e/pop-to-esi
26198 5b/pop-to-ebx
26199 5a/pop-to-edx
26200 59/pop-to-ecx
26201
26202 89/<- %esp 5/r32/ebp
26203 5d/pop-to-ebp
26204 c3/return
26205
26206
26207 clean-up-blocks:
26208
26209 55/push-ebp
26210 89/<- %ebp 4/r32/esp
26211
26212 50/push-eax
26213 51/push-ecx
26214 56/push-esi
26215
26216 8b/-> *(ebp+8) 6/r32/esi
26217
26218 8b/-> *(ebp+0xc) 1/r32/ecx
26219 {
26220 $clean-up-blocks:reclaim-loop:
26221
26222 8b/-> *esi 0/r32/eax
26223 3d/compare-eax-and 0/imm32
26224 0f 8e/jump-if-<= break/disp32
26225
26226 (lookup *(esi+eax-4) *(esi+eax))
26227
26228 39/compare *(eax+0x10) 1/r32/ecx
26229 0f 8c/jump-if-< break/disp32
26230 (pop %esi)
26231 (pop %esi)
26232 (pop %esi)
26233 e9/jump loop/disp32
26234 }
26235 $clean-up-blocks:end:
26236
26237 5e/pop-to-esi
26238 59/pop-to-ecx
26239 58/pop-to-eax
26240
26241 89/<- %esp 5/r32/ebp
26242 5d/pop-to-ebp
26243 c3/return
26244
26245 reg-in-function-outputs?:
26246
26247 55/push-ebp
26248 89/<- %ebp 4/r32/esp
26249
26250 51/push-ecx
26251
26252 8b/-> *(ebp+8) 0/r32/eax
26253 (lookup *(eax+0x10) *(eax+0x14))
26254 89/<- %ecx 0/r32/eax
26255
26256 {
26257 81 7/subop/compare %ecx 0/imm32
26258 74/jump-if-= break/disp8
26259
26260 (lookup *ecx *(ecx+4))
26261
26262 (lookup *(eax+0x18) *(eax+0x1c))
26263
26264 (string-equal? %eax *(ebp+0xc))
26265 3d/compare-eax-and 0/imm32/false
26266 75/jump-if-!= $reg-in-function-outputs?:end/disp8
26267
26268 (lookup *(ecx+8) *(ecx+0xc))
26269 89/<- %ecx 0/r32/eax
26270
26271 eb/jump loop/disp8
26272 }
26273
26274 b8/copy-to-eax 0/imm32
26275 $reg-in-function-outputs?:end:
26276
26277 59/pop-to-ecx
26278
26279 89/<- %esp 5/r32/ebp
26280 5d/pop-to-ebp
26281 c3/return
26282
26283 emit-subx-var-def:
26284
26285 55/push-ebp
26286 89/<- %ebp 4/r32/esp
26287
26288 50/push-eax
26289 51/push-ecx
26290 52/push-edx
26291
26292 8b/-> *(ebp+0xc) 0/r32/eax
26293
26294 (lookup *(eax+4) *(eax+8))
26295 89/<- %ecx 0/r32/eax
26296
26297 8b/-> *Curr-block-depth 0/r32/eax
26298 89/<- *(ecx+0x10) 0/r32/eax
26299
26300 (size-of %ecx)
26301 89/<- %edx 0/r32/eax
26302
26303 29/subtract-from *Curr-local-stack-offset 2/r32/edx
26304
26305 8b/-> *Curr-local-stack-offset 0/r32/eax
26306 89/<- *(ecx+0x14) 0/r32/eax
26307
26308 {
26309 (lookup *(ecx+8) *(ecx+0xc))
26310 (is-mu-array? %eax)
26311 3d/compare-eax-and 0/imm32/false
26312 0f 84/jump-if-= break/disp32
26313
26314 81 5/subop/subtract %edx 4/imm32
26315
26316 (emit-array-data-initialization *(ebp+8) %edx)
26317 e9/jump $emit-subx-var-def:end/disp32
26318 }
26319
26320
26321 {
26322 (lookup *(ecx+8) *(ecx+0xc))
26323 (is-mu-stream? %eax)
26324 3d/compare-eax-and 0/imm32/false
26325 0f 84/jump-if-= break/disp32
26326
26327 81 5/subop/subtract %edx 0xc/imm32
26328 (emit-array-data-initialization *(ebp+8) %edx)
26329
26330 (emit-indent *(ebp+8) *Curr-block-depth)
26331 (write-buffered *(ebp+8) "68/push 0/imm32\n")
26332 (emit-indent *(ebp+8) *Curr-block-depth)
26333 (write-buffered *(ebp+8) "68/push 0/imm32\n")
26334
26335 eb/jump $emit-subx-var-def:end/disp8
26336 }
26337
26338 {
26339 81 7/subop/compare %edx 0/imm32
26340 7e/jump-if-<= break/disp8
26341 (emit-indent *(ebp+8) *Curr-block-depth)
26342 (write-buffered *(ebp+8) "68/push 0/imm32\n")
26343
26344 81 5/subop/subtract %edx 4/imm32
26345
26346 eb/jump loop/disp8
26347 }
26348 $emit-subx-var-def:end:
26349
26350 5a/pop-to-edx
26351 59/pop-to-ecx
26352 58/pop-to-eax
26353
26354 89/<- %esp 5/r32/ebp
26355 5d/pop-to-ebp
26356 c3/return
26357
26358 emit-array-data-initialization:
26359
26360 55/push-ebp
26361 89/<- %ebp 4/r32/esp
26362
26363 (emit-indent *(ebp+8) *Curr-block-depth)
26364 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
26365 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
26366 (write-buffered *(ebp+8) ")\n")
26367 (emit-indent *(ebp+8) *Curr-block-depth)
26368 (write-buffered *(ebp+8) "68/push ")
26369 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
26370 (write-buffered *(ebp+8) "/imm32\n")
26371 $emit-array-data-initialization:end:
26372
26373 89/<- %esp 5/r32/ebp
26374 5d/pop-to-ebp
26375 c3/return
26376
26377 emit-subx-stmt:
26378
26379 55/push-ebp
26380 89/<- %ebp 4/r32/esp
26381
26382 50/push-eax
26383 51/push-ecx
26384
26385
26386 8b/-> *(ebp+0xc) 1/r32/ecx
26387 (lookup *(ecx+4) *(ecx+8))
26388 89/<- %ecx 0/r32/eax
26389
26390 {
26391
26392 (string-equal? %ecx "length")
26393 3d/compare-eax-and 0/imm32
26394 0f 84/jump-if-= break/disp32
26395 (translate-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26396 e9/jump $emit-subx-stmt:end/disp32
26397 }
26398
26399 {
26400
26401 (string-equal? %ecx "index")
26402 3d/compare-eax-and 0/imm32
26403 0f 84/jump-if-= break/disp32
26404 (translate-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26405 e9/jump $emit-subx-stmt:end/disp32
26406 }
26407
26408 {
26409
26410 (string-equal? %ecx "compute-offset")
26411 3d/compare-eax-and 0/imm32
26412 0f 84/jump-if-= break/disp32
26413 (translate-mu-compute-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26414 e9/jump $emit-subx-stmt:end/disp32
26415 }
26416
26417 {
26418
26419 (string-equal? %ecx "get")
26420 3d/compare-eax-and 0/imm32
26421 0f 84/jump-if-= break/disp32
26422 (translate-mu-get-stmt *(ebp+8) *(ebp+0xc))
26423 e9/jump $emit-subx-stmt:end/disp32
26424 }
26425
26426 {
26427
26428 (string-equal? %ecx "allocate")
26429 3d/compare-eax-and 0/imm32
26430 0f 84/jump-if-= break/disp32
26431 (translate-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26432 e9/jump $emit-subx-stmt:end/disp32
26433 }
26434
26435 {
26436
26437 (string-equal? %ecx "copy-object")
26438 3d/compare-eax-and 0/imm32
26439 0f 84/jump-if-= break/disp32
26440 (translate-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26441 e9/jump $emit-subx-stmt:end/disp32
26442 }
26443
26444 {
26445
26446 (string-equal? %ecx "clear-object")
26447 3d/compare-eax-and 0/imm32
26448 0f 84/jump-if-= break/disp32
26449 (translate-mu-clear-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26450 e9/jump $emit-subx-stmt:end/disp32
26451 }
26452
26453 {
26454
26455 (string-equal? %ecx "populate")
26456 3d/compare-eax-and 0/imm32
26457 0f 84/jump-if-= break/disp32
26458 (translate-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26459 e9/jump $emit-subx-stmt:end/disp32
26460 }
26461
26462 {
26463
26464 (string-equal? %ecx "populate-stream")
26465 3d/compare-eax-and 0/imm32
26466 0f 84/jump-if-= break/disp32
26467 (translate-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26468 e9/jump $emit-subx-stmt:end/disp32
26469 }
26470
26471 {
26472
26473 (string-equal? %ecx "read-from-stream")
26474 3d/compare-eax-and 0/imm32
26475 0f 84/jump-if-= break/disp32
26476 (translate-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26477 e9/jump $emit-subx-stmt:end/disp32
26478 }
26479
26480 {
26481
26482 (string-equal? %ecx "write-to-stream")
26483 3d/compare-eax-and 0/imm32
26484 0f 84/jump-if-= break/disp32
26485 (translate-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26486 e9/jump $emit-subx-stmt:end/disp32
26487 }
26488
26489 {
26490 $emit-subx-stmt:check-for-primitive:
26491
26492 (find-matching-primitive *(ebp+0x10) *(ebp+0xc))
26493 3d/compare-eax-and 0/imm32
26494 74/jump-if-= break/disp8
26495 $emit-subx-stmt:primitive:
26496 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax)
26497 e9/jump $emit-subx-stmt:end/disp32
26498 }
26499
26500
26501 $emit-subx-stmt:call:
26502 (emit-call *(ebp+8) *(ebp+0xc))
26503 $emit-subx-stmt:end:
26504
26505 59/pop-to-ecx
26506 58/pop-to-eax
26507
26508 89/<- %esp 5/r32/ebp
26509 5d/pop-to-ebp
26510 c3/return
26511
26512 translate-mu-length-stmt:
26513
26514 55/push-ebp
26515 89/<- %ebp 4/r32/esp
26516
26517 50/push-eax
26518 51/push-ecx
26519 52/push-edx
26520 53/push-ebx
26521 56/push-esi
26522
26523 8b/-> *(ebp+0xc) 6/r32/esi
26524
26525 (lookup *(esi+0xc) *(esi+0x10))
26526 (lookup *eax *(eax+4))
26527 89/<- %ebx 0/r32/eax
26528
26529 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
26530 89/<- %ecx 0/r32/eax
26531
26532 (lookup *(esi+0x14) *(esi+0x18))
26533 (lookup *eax *(eax+4))
26534 (lookup *(eax+0x18) *(eax+0x1c))
26535 89/<- %edx 0/r32/eax
26536
26537 {
26538 81 7/subop/compare %ecx 1/imm32
26539 75/jump-if-!= break/disp8
26540 $translate-mu-length-stmt:size-1:
26541 (emit-save-size-to *(ebp+8) %ebx %edx)
26542 e9/jump $translate-mu-length-stmt:end/disp32
26543 }
26544
26545 {
26546 (power-of-2? %ecx *(ebp+0x10) *(ebp+0x14))
26547 3d/compare-eax-and 0/imm32/false
26548 74/jump-if-= break/disp8
26549 81 7/subop/compare %ecx 0xff/imm32
26550 7f/jump-if-> break/disp8
26551 $translate-mu-length-stmt:size-power-of-2:
26552 (emit-save-size-to *(ebp+8) %ebx %edx)
26553 (emit-divide-by-shift-right *(ebp+8) %edx %ecx)
26554 e9/jump $translate-mu-length-stmt:end/disp32
26555 }
26556
26557
26558 {
26559 $translate-mu-length-stmt:complex:
26560 (string-equal? %edx "eax")
26561 3d/compare-eax-and 0/imm32/false
26562 75/break-if-!= break/disp8
26563 (emit-indent *(ebp+8) *Curr-block-depth)
26564 (write-buffered *(ebp+8) "50/push-eax\n")
26565 }
26566 {
26567 (string-equal? %edx "ecx")
26568 3d/compare-eax-and 0/imm32/false
26569 75/break-if-!= break/disp8
26570 (emit-indent *(ebp+8) *Curr-block-depth)
26571 (write-buffered *(ebp+8) "51/push-ecx\n")
26572 }
26573 {
26574 (string-equal? %edx "edx")
26575 3d/compare-eax-and 0/imm32/false
26576 75/break-if-!= break/disp8
26577 (emit-indent *(ebp+8) *Curr-block-depth)
26578 (write-buffered *(ebp+8) "52/push-edx\n")
26579 }
26580
26581 (emit-save-size-to *(ebp+8) %ebx "eax")
26582 (emit-indent *(ebp+8) *Curr-block-depth)
26583 (write-buffered *(ebp+8) "31/xor %edx 2/r32/edx\n")
26584 (emit-indent *(ebp+8) *Curr-block-depth)
26585 (write-buffered *(ebp+8) "b9/copy-to-ecx ")
26586 (write-int32-hex-buffered *(ebp+8) %ecx)
26587 (write-buffered *(ebp+8) "/imm32\n")
26588 (emit-indent *(ebp+8) *Curr-block-depth)
26589 (write-buffered *(ebp+8) "f7 7/subop/idiv-eax-edx-by %ecx\n")
26590 {
26591 (string-equal? %edx "eax")
26592 3d/compare-eax-and 0/imm32/false
26593 75/break-if-!= break/disp8
26594 (emit-indent *(ebp+8) *Curr-block-depth)
26595 (write-buffered *(ebp+8) "89/<- %")
26596 (write-buffered *(ebp+8) %edx)
26597 (write-buffered *(ebp+8) " 0/r32/eax\n")
26598 }
26599
26600 {
26601 (string-equal? %edx "edx")
26602 3d/compare-eax-and 0/imm32/false
26603 75/break-if-!= break/disp8
26604 (emit-indent *(ebp+8) *Curr-block-depth)
26605 (write-buffered *(ebp+8) "5a/pop-to-edx\n")
26606 }
26607 {
26608 (string-equal? %edx "ecx")
26609 3d/compare-eax-and 0/imm32/false
26610 75/break-if-!= break/disp8
26611 (emit-indent *(ebp+8) *Curr-block-depth)
26612 (write-buffered *(ebp+8) "59/pop-to-ecx\n")
26613 }
26614 {
26615 (string-equal? %edx "eax")
26616 3d/compare-eax-and 0/imm32/false
26617 75/break-if-!= break/disp8
26618 (emit-indent *(ebp+8) *Curr-block-depth)
26619 (write-buffered *(ebp+8) "58/pop-to-eax\n")
26620 }
26621 $translate-mu-length-stmt:end:
26622
26623 5e/pop-to-esi
26624 5b/pop-to-ebx
26625 5a/pop-to-edx
26626 59/pop-to-ecx
26627 58/pop-to-eax
26628
26629 89/<- %esp 5/r32/ebp
26630 5d/pop-to-ebp
26631 c3/return
26632
26633 array-element-size:
26634
26635 55/push-ebp
26636 89/<- %ebp 4/r32/esp
26637
26638 (array-element-type-id *(ebp+8) *(ebp+0xc) *(ebp+0x10))
26639 (size-of-type-id-as-array-element %eax)
26640 $array-element-size:end:
26641
26642 89/<- %esp 5/r32/ebp
26643 5d/pop-to-ebp
26644 c3/return
26645
26646 array-element-type-id:
26647
26648
26649 55/push-ebp
26650 89/<- %ebp 4/r32/esp
26651
26652 8b/-> *(ebp+8) 0/r32/eax
26653
26654 (lookup *(eax+8) *(eax+0xc))
26655
26656 3d/compare-eax-with 0/imm32
26657 0f 84/jump-if-== $array-element-type-id:error0/disp32
26658
26659 81 7/subop/compare *eax 0/imm32/false
26660 0f 85/jump-if-!= $array-element-type-id:error1/disp32
26661
26662 {
26663 50/push-eax
26664 (lookup *(eax+4) *(eax+8))
26665 (is-simple-mu-type? %eax 2)
26666 3d/compare-eax-with 0/imm32/false
26667 58/pop-to-eax
26668 74/jump-if-= break/disp8
26669 $array-element-type-id:skip-addr:
26670 (lookup *(eax+0xc) *(eax+0x10))
26671 }
26672
26673 3d/compare-eax-with 0/imm32
26674 0f 84/jump-if-= $array-element-type-id:error2/disp32
26675
26676 81 7/subop/compare *eax 0/imm32/false
26677 0f 85/jump-if-!= $array-element-type-id:error2/disp32
26678
26679 {
26680 50/push-eax
26681 (lookup *(eax+4) *(eax+8))
26682 (is-simple-mu-type? %eax 3)
26683 3d/compare-eax-with 0/imm32/false
26684 58/pop-to-eax
26685 $array-element-type-id:no-array:
26686 0f 84/jump-if-= $array-element-type-id:error2/disp32
26687 }
26688 $array-element-type-id:skip-array:
26689
26690 (lookup *(eax+0xc) *(eax+0x10))
26691
26692 3d/compare-eax-with 0/imm32
26693 0f 84/jump-if-= $array-element-type-id:error2/disp32
26694
26695 81 7/subop/compare *eax 0/imm32/false
26696 0f 85/jump-if-!= $array-element-type-id:error2/disp32
26697
26698 (lookup *(eax+4) *(eax+8))
26699
26700
26701 {
26702 81 7/subop/compare *eax 0/imm32/false
26703 75/jump-if-!= break/disp8
26704 (lookup *(eax+4) *(eax+8))
26705 }
26706
26707 8b/-> *(eax+4) 0/r32/eax
26708 $array-element-type-id:end:
26709
26710 89/<- %esp 5/r32/ebp
26711 5d/pop-to-ebp
26712 c3/return
26713
26714 $array-element-type-id:error0:
26715 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
26716 50/push-eax
26717 8b/-> *(ebp+8) 0/r32/eax
26718 (lookup *eax *(eax+4))
26719 (write-buffered *(ebp+0xc) %eax)
26720 58/pop-to-eax
26721 (write-buffered *(ebp+0xc) "' has no type\n")
26722 (flush *(ebp+0xc))
26723 (stop *(ebp+0x10) 1)
26724
26725
26726 $array-element-type-id:error1:
26727 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
26728 50/push-eax
26729 8b/-> *(ebp+8) 0/r32/eax
26730 (lookup *eax *(eax+4))
26731 (write-buffered *(ebp+0xc) %eax)
26732 58/pop-to-eax
26733 (write-buffered *(ebp+0xc) "' has atomic type ")
26734 (write-int32-hex-buffered *(ebp+0xc) *(eax+4))
26735 (write-buffered *(ebp+0xc) Newline)
26736 (flush *(ebp+0xc))
26737 (stop *(ebp+0x10) 1)
26738
26739
26740 $array-element-type-id:error2:
26741 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
26742 50/push-eax
26743 8b/-> *(ebp+8) 0/r32/eax
26744 (lookup *eax *(eax+4))
26745 (write-buffered *(ebp+0xc) %eax)
26746 58/pop-to-eax
26747 (write-buffered *(ebp+0xc) "' has non-array type\n")
26748 (flush *(ebp+0xc))
26749 (stop *(ebp+0x10) 1)
26750
26751
26752 size-of-type-id-as-array-element:
26753
26754 55/push-ebp
26755 89/<- %ebp 4/r32/esp
26756
26757 8b/-> *(ebp+8) 0/r32/eax
26758
26759 3d/compare-eax-and 8/imm32/byte
26760 {
26761 75/jump-if-!= break/disp8
26762 b8/copy-to-eax 1/imm32
26763 eb/jump $size-of-type-id-as-array-element:end/disp8
26764 }
26765
26766 (size-of-type-id %eax)
26767 $size-of-type-id-as-array-element:end:
26768
26769 89/<- %esp 5/r32/ebp
26770 5d/pop-to-ebp
26771 c3/return
26772
26773 emit-save-size-to:
26774
26775 55/push-ebp
26776 89/<- %ebp 4/r32/esp
26777
26778 50/push-eax
26779 53/push-ebx
26780
26781 8b/-> *(ebp+0xc) 3/r32/ebx
26782 (emit-indent *(ebp+8) *Curr-block-depth)
26783 (write-buffered *(ebp+8) "8b/-> *")
26784
26785 {
26786 81 7/subop/compare *(ebx+0x18)) 0/imm32
26787 74/jump-if-= break/disp8
26788 $emit-save-size-to:emit-base-from-register:
26789 (lookup *(ebx+0x18) *(ebx+0x1c))
26790 (write-buffered *(ebp+8) %eax)
26791 eb/jump $emit-save-size-to:emit-output/disp8
26792 }
26793
26794 {
26795 81 7/subop/compare *(ebx+0x14)) 0/imm32
26796 74/jump-if-= break/disp8
26797 $emit-save-size-to:emit-base-from-stack:
26798 (write-buffered *(ebp+8) "(ebp+")
26799 (write-int32-hex-buffered *(ebp+8) *(ebx+0x14))
26800 (write-buffered *(ebp+8) ")")
26801 }
26802 $emit-save-size-to:emit-output:
26803 (write-buffered *(ebp+8) " ")
26804 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
26805 (write-int32-hex-buffered *(ebp+8) *eax)
26806 (write-buffered *(ebp+8) "/r32\n")
26807 $emit-save-size-to:end:
26808
26809 5b/pop-to-ebx
26810 58/pop-to-eax
26811
26812 89/<- %esp 5/r32/ebp
26813 5d/pop-to-ebp
26814 c3/return
26815
26816 emit-divide-by-shift-right:
26817
26818 55/push-ebp
26819 89/<- %ebp 4/r32/esp
26820
26821 50/push-eax
26822
26823 (emit-indent *(ebp+8) *Curr-block-depth)
26824 (write-buffered *(ebp+8) "c1/shift 5/subop/>> %")
26825 (write-buffered *(ebp+8) *(ebp+0xc))
26826 (write-buffered *(ebp+8) Space)
26827 (num-shift-rights *(ebp+0x10))
26828 (write-int32-hex-buffered *(ebp+8) %eax)
26829 (write-buffered *(ebp+8) "/imm8\n")
26830 $emit-divide-by-shift-right:end:
26831
26832 58/pop-to-eax
26833
26834 89/<- %esp 5/r32/ebp
26835 5d/pop-to-ebp
26836 c3/return
26837
26838 translate-mu-index-stmt:
26839
26840 55/push-ebp
26841 89/<- %ebp 4/r32/esp
26842
26843 51/push-ecx
26844
26845 8b/-> *(ebp+0xc) 1/r32/ecx
26846
26847 (lookup *(ecx+0xc) *(ecx+0x10))
26848 (lookup *eax *(eax+4))
26849 89/<- %ecx 0/r32/eax
26850
26851 {
26852 81 7/subop/compare *(ecx+0x18) 0/imm32
26853 74/jump-if-= break/disp8
26854
26855 (translate-mu-index-stmt-with-array-in-register *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
26856 eb/jump $translate-mu-index-stmt:end/disp8
26857 }
26858
26859 {
26860 81 7/subop/compare *(ecx+0x14) 0/imm32
26861 74/jump-if-= break/disp8
26862
26863 (translate-mu-index-stmt-with-array-on-stack *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
26864 eb/jump $translate-mu-index-stmt:end/disp8
26865 }
26866 $translate-mu-index-stmt:end:
26867
26868 59/pop-to-ecx
26869
26870 89/<- %esp 5/r32/ebp
26871 5d/pop-to-ebp
26872 c3/return
26873
26874 $translate-mu-index-stmt-with-array:error1:
26875 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input must either lie in a register or be a literal\n")
26876 (flush *(ebp+0x10))
26877 (stop *(ebp+0x14) 1)
26878
26879
26880 $translate-mu-index-stmt-with-array:error2:
26881 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input when in a register must be an int or offset\n")
26882 (flush *(ebp+0x10))
26883 (stop *(ebp+0x14) 1)
26884
26885
26886 translate-mu-index-stmt-with-array-in-register:
26887
26888 55/push-ebp
26889 89/<- %ebp 4/r32/esp
26890
26891 50/push-eax
26892 51/push-ecx
26893 52/push-edx
26894 53/push-ebx
26895
26896 (emit-indent *(ebp+8) *Curr-block-depth)
26897 (write-buffered *(ebp+8) "8d/copy-address *(")
26898
26899 $translate-mu-index-stmt-with-array-in-register:emit-base:
26900
26901 8b/-> *(ebp+0xc) 1/r32/ecx
26902
26903 (lookup *(ecx+0xc) *(ecx+0x10))
26904 (lookup *eax *(eax+4))
26905 89/<- %ebx 0/r32/eax
26906
26907 (lookup *(ebx+0x18) *(ebx+0x1c))
26908 (write-buffered *(ebp+8) %eax)
26909 (write-buffered *(ebp+8) " + ")
26910
26911 (lookup *(ecx+0xc) *(ecx+0x10))
26912 (lookup *(eax+8) *(eax+0xc))
26913 (lookup *eax *(eax+4))
26914 89/<- %edx 0/r32/eax
26915
26916 81 7/subop/compare *(edx+0x18) 0/imm32
26917 {
26918 0f 84/jump-if-= break/disp32
26919 $translate-mu-index-stmt-with-array-in-register:emit-register-index:
26920
26921 (lookup *(edx+8) *(edx+0xc))
26922 (is-simple-mu-type? %eax 1)
26923 3d/compare-eax-and 0/imm32/false
26924 {
26925 0f 84/jump-if-= break/disp32
26926 $translate-mu-index-stmt-with-array-in-register:emit-int-register-index:
26927
26928
26929 (lookup *(edx+0x18) *(edx+0x1c))
26930 (write-buffered *(ebp+8) %eax)
26931 (write-buffered *(ebp+8) "<<")
26932
26933
26934 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
26935 (num-shift-rights %eax)
26936 (write-int32-hex-buffered *(ebp+8) %eax)
26937 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
26938 }
26939
26940 (lookup *(edx+8) *(edx+0xc))
26941 81 7/subop/compare *eax 0/imm32/false
26942 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
26943
26944 (lookup *(eax+4) *(eax+8))
26945 (is-simple-mu-type? %eax 7)
26946 3d/compare-eax-and 0/imm32/false
26947 {
26948 0f 84/jump-if-= break/disp32
26949
26950 $translate-mu-index-stmt-with-array-in-register:emit-offset-register-index:
26951 (lookup *(edx+0x18) *(edx+0x1c))
26952 (write-buffered *(ebp+8) %eax)
26953 }
26954 $translate-mu-index-stmt-with-array-in-register:emit-register-index-done:
26955 (write-buffered *(ebp+8) " + 4) ")
26956 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
26957 }
26958
26959 (lookup *(edx+8) *(edx+0xc))
26960 (is-simple-mu-type? %eax 0)
26961 3d/compare-eax-and 0/imm32/false
26962 {
26963 0f 84/jump-if-= break/disp32
26964 $translate-mu-index-stmt-with-array-in-register:emit-literal-index:
26965
26966 (lookup *edx *(edx+4))
26967 (parse-hex-int %eax)
26968 89/<- %edx 0/r32/eax
26969
26970 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
26971 f7 4/subop/multiply-into-edx-eax %edx
26972
26973 05/add-to-eax 4/imm32
26974
26975
26976 (write-int32-hex-buffered *(ebp+8) %eax)
26977 (write-buffered *(ebp+8) ") ")
26978 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
26979 }
26980
26981 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
26982 $translate-mu-index-stmt-with-array-in-register:emit-output:
26983
26984 8b/-> *(ebp+0xc) 1/r32/ecx
26985 (lookup *(ecx+0x14) *(ecx+0x18))
26986 (lookup *eax *(eax+4))
26987 (lookup *(eax+0x18) *(eax+0x1c))
26988 (get Mu-registers %eax 0xc "Mu-registers")
26989 (write-int32-hex-buffered *(ebp+8) *eax)
26990 (write-buffered *(ebp+8) "/r32\n")
26991 $translate-mu-index-stmt-with-array-in-register:end:
26992
26993 5b/pop-to-ebx
26994 5a/pop-to-edx
26995 59/pop-to-ecx
26996 58/pop-to-eax
26997
26998 89/<- %esp 5/r32/ebp
26999 5d/pop-to-ebp
27000 c3/return
27001
27002 translate-mu-index-stmt-with-array-on-stack:
27003
27004 55/push-ebp
27005 89/<- %ebp 4/r32/esp
27006
27007 50/push-eax
27008 51/push-ecx
27009 52/push-edx
27010 53/push-ebx
27011
27012 (emit-indent *(ebp+8) *Curr-block-depth)
27013 (write-buffered *(ebp+8) "8d/copy-address *(ebp + ")
27014
27015 8b/-> *(ebp+0xc) 0/r32/eax
27016 (lookup *(eax+0xc) *(eax+0x10))
27017 89/<- %edx 0/r32/eax
27018
27019 (lookup *eax *(eax+4))
27020 89/<- %ecx 0/r32/eax
27021
27022 (lookup *(edx+8) *(edx+0xc))
27023
27024 (lookup *eax *(eax+4))
27025 89/<- %edx 0/r32/eax
27026
27027 81 7/subop/compare *(edx+0x18) 0/imm32
27028 {
27029 0f 84/jump-if-= break/disp32
27030 $translate-mu-index-stmt-with-array-on-stack:emit-register-index:
27031
27032 (lookup *(edx+8) *(edx+0xc))
27033 (is-simple-mu-type? %eax 1)
27034 3d/compare-eax-and 0/imm32/false
27035 {
27036 0f 84/jump-if-= break/disp32
27037 $translate-mu-index-stmt-with-array-on-stack:emit-int-register-index:
27038
27039
27040 (lookup *(edx+0x18) *(edx+0x1c))
27041 (write-buffered *(ebp+8) %eax)
27042 (write-buffered *(ebp+8) "<<")
27043
27044
27045 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
27046 (num-shift-rights %eax)
27047 (write-int32-hex-buffered *(ebp+8) %eax)
27048
27049 (write-buffered *(ebp+8) " + ")
27050
27051 8b/-> *(ecx+0x14) 0/r32/eax
27052 05/add-to-eax 4/imm32
27053 (write-int32-hex-buffered *(ebp+8) %eax)
27054 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
27055 }
27056
27057 (lookup *(edx+8) *(edx+0xc))
27058 81 7/subop/compare *eax 0/imm32/false
27059 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
27060
27061 (lookup *(eax+4) *(eax+8))
27062 (is-simple-mu-type? %eax 7)
27063 3d/compare-eax-and 0/imm32/false
27064 {
27065 0f 84/jump-if-= break/disp32
27066
27067 $translate-mu-index-stmt-with-array-on-stack:emit-offset-register-index:
27068 (lookup *(edx+0x18) *(edx+0x1c))
27069 (write-buffered *(ebp+8) %eax)
27070 }
27071 $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done:
27072 (write-buffered *(ebp+8) ") ")
27073 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
27074 }
27075
27076 (lookup *(edx+8) *(edx+0xc))
27077 (is-simple-mu-type? %eax 0)
27078 3d/compare-eax-and 0/imm32/false
27079 {
27080 0f 84/jump-if-= break/disp32
27081 $translate-mu-index-stmt-with-array-on-stack:emit-literal-index:
27082
27083 (lookup *edx *(edx+4))
27084 (parse-hex-int %eax)
27085 89/<- %edx 0/r32/eax
27086
27087 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
27088 f7 4/subop/multiply-into-edx-eax %edx
27089
27090 03/add *(ecx+0x14) 0/r32/eax
27091
27092 05/add-to-eax 4/imm32
27093
27094
27095 (write-int32-hex-buffered *(ebp+8) %eax)
27096 (write-buffered *(ebp+8) ") ")
27097 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
27098 }
27099
27100 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
27101 $translate-mu-index-stmt-with-array-on-stack:emit-output:
27102
27103 8b/-> *(ebp+0xc) 0/r32/eax
27104 (lookup *(eax+0x14) *(eax+0x18))
27105 (lookup *eax *(eax+4))
27106 (lookup *(eax+0x18) *(eax+0x1c))
27107 (get Mu-registers %eax 0xc "Mu-registers")
27108 (write-int32-hex-buffered *(ebp+8) *eax)
27109 (write-buffered *(ebp+8) "/r32\n")
27110 $translate-mu-index-stmt-with-array-on-stack:end:
27111
27112 5b/pop-to-ebx
27113 5a/pop-to-edx
27114 59/pop-to-ecx
27115 58/pop-to-eax
27116
27117 89/<- %esp 5/r32/ebp
27118 5d/pop-to-ebp
27119 c3/return
27120
27121 translate-mu-compute-index-stmt:
27122
27123 55/push-ebp
27124 89/<- %ebp 4/r32/esp
27125
27126 50/push-eax
27127 51/push-ecx
27128 52/push-edx
27129 53/push-ebx
27130
27131 (emit-indent *(ebp+8) *Curr-block-depth)
27132 (write-buffered *(ebp+8) "69/multiply")
27133
27134 8b/-> *(ebp+0xc) 1/r32/ecx
27135
27136 (lookup *(ecx+0xc) *(ecx+0x10))
27137 89/<- %ebx 0/r32/eax
27138 $translate-mu-compute-index-stmt:emit-index:
27139 (lookup *(ebx+8) *(ebx+0xc))
27140 (emit-subx-var-as-rm32 *(ebp+8) %eax)
27141 (write-buffered *(ebp+8) Space)
27142 $translate-mu-compute-index-stmt:emit-elem-size:
27143
27144 (lookup *ebx *(ebx+4))
27145 89/<- %ebx 0/r32/eax
27146
27147 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
27148 (write-int32-hex-buffered *(ebp+8) %eax)
27149 (write-buffered *(ebp+8) "/imm32 ")
27150 $translate-mu-compute-index-stmt:emit-output:
27151
27152 (lookup *(ecx+0x14) *(ecx+0x18))
27153 (lookup *eax *(eax+4))
27154 (lookup *(eax+0x18) *(eax+0x1c))
27155 (get Mu-registers %eax 0xc "Mu-registers")
27156 (write-int32-hex-buffered *(ebp+8) *eax)
27157 (write-buffered *(ebp+8) "/r32\n")
27158 $translate-mu-compute-index-stmt:end:
27159
27160 5b/pop-to-ebx
27161 5a/pop-to-edx
27162 59/pop-to-ecx
27163 58/pop-to-eax
27164
27165 89/<- %esp 5/r32/ebp
27166 5d/pop-to-ebp
27167 c3/return
27168
27169 translate-mu-get-stmt:
27170
27171 55/push-ebp
27172 89/<- %ebp 4/r32/esp
27173
27174 50/push-eax
27175 51/push-ecx
27176 52/push-edx
27177
27178 (emit-indent *(ebp+8) *Curr-block-depth)
27179 (write-buffered *(ebp+8) "8d/copy-address ")
27180
27181 8b/-> *(ebp+0xc) 1/r32/ecx
27182
27183 (mu-get-offset %ecx)
27184 89/<- %edx 0/r32/eax
27185
27186 (lookup *(ecx+0xc) *(ecx+0x10))
27187 (lookup *eax *(eax+4))
27188
27189 81 7/subop/compare *(eax+0x18) 0/imm32
27190 {
27191 0f 84/jump-if-= break/disp32
27192 $translate-mu-get-stmt:emit-register-input:
27193
27194 (write-buffered *(ebp+8) "*(")
27195 (lookup *(eax+0x18) *(eax+0x1c))
27196 (write-buffered *(ebp+8) %eax)
27197 (write-buffered *(ebp+8) " + ")
27198 (write-int32-hex-buffered *(ebp+8) %edx)
27199 (write-buffered *(ebp+8) ") ")
27200 e9/jump $translate-mu-get-stmt:emit-output/disp32
27201 }
27202
27203 {
27204 $translate-mu-get-stmt:emit-stack-input:
27205
27206 (write-buffered *(ebp+8) "*(ebp+")
27207 03/add *(eax+0x14) 2/r32/edx
27208 (write-int32-hex-buffered *(ebp+8) %edx)
27209 (write-buffered *(ebp+8) ") ")
27210 eb/jump $translate-mu-get-stmt:emit-output/disp8
27211 }
27212 $translate-mu-get-stmt:emit-output:
27213
27214 (lookup *(ecx+0x14) *(ecx+0x18))
27215 (lookup *eax *(eax+4))
27216
27217 (lookup *(eax+0x18) *(eax+0x1c))
27218 (get Mu-registers %eax 0xc "Mu-registers")
27219 (write-int32-hex-buffered *(ebp+8) *eax)
27220 (write-buffered *(ebp+8) "/r32\n")
27221 $translate-mu-get-stmt:end:
27222
27223 5a/pop-to-edx
27224 59/pop-to-ecx
27225 58/pop-to-eax
27226
27227 89/<- %esp 5/r32/ebp
27228 5d/pop-to-ebp
27229 c3/return
27230
27231 translate-mu-copy-object-stmt:
27232
27233 55/push-ebp
27234 89/<- %ebp 4/r32/esp
27235
27236 50/push-eax
27237
27238 (emit-indent *(ebp+8) *Curr-block-depth)
27239 (write-buffered *(ebp+8) "(copy-bytes")
27240
27241 8b/-> *(ebp+0xc) 0/r32/eax
27242
27243 (lookup *(eax+0xc) *(eax+0x10))
27244 (emit-subx-call-operand *(ebp+8) %eax)
27245
27246 (lookup *(eax+8) *(eax+0xc))
27247 (emit-subx-call-operand *(ebp+8) %eax)
27248
27249 (write-buffered *(ebp+8) Space)
27250 (addr-payload-size %eax *(ebp+0x10) *(ebp+0x14))
27251 (write-int32-hex-buffered *(ebp+8) %eax)
27252 (write-buffered *(ebp+8) ")\n")
27253 $translate-mu-copy-object-stmt:end:
27254
27255 58/pop-to-eax
27256
27257 89/<- %esp 5/r32/ebp
27258 5d/pop-to-ebp
27259 c3/return
27260
27261 translate-mu-clear-object-stmt:
27262
27263 55/push-ebp
27264 89/<- %ebp 4/r32/esp
27265
27266 50/push-eax
27267
27268 (emit-indent *(ebp+8) *Curr-block-depth)
27269 (write-buffered *(ebp+8) "(zero-out")
27270
27271 8b/-> *(ebp+0xc) 0/r32/eax
27272
27273 (lookup *(eax+0xc) *(eax+0x10))
27274
27275 (emit-subx-call-operand *(ebp+8) %eax)
27276 (write-buffered *(ebp+8) Space)
27277 (addr-payload-size %eax *(ebp+0x10) *(ebp+0x14))
27278 (write-int32-hex-buffered *(ebp+8) %eax)
27279 (write-buffered *(ebp+8) ")\n")
27280 $translate-mu-clear-object-stmt:end:
27281
27282 58/pop-to-eax
27283
27284 89/<- %esp 5/r32/ebp
27285 5d/pop-to-ebp
27286 c3/return
27287
27288 translate-mu-allocate-stmt:
27289
27290 55/push-ebp
27291 89/<- %ebp 4/r32/esp
27292
27293 50/push-eax
27294 56/push-esi
27295 57/push-edi
27296
27297 8b/-> *(ebp+0xc) 6/r32/esi
27298
27299 (lookup *(esi+0xc) *(esi+0x10))
27300 89/<- %edi 0/r32/eax
27301
27302 (emit-indent *(ebp+8) *Curr-block-depth)
27303 (write-buffered *(ebp+8) "(allocate Heap ")
27304 (addr-handle-payload-size %edi *(ebp+0x10) *(ebp+0x14))
27305 (write-int32-hex-buffered *(ebp+8) %eax)
27306 (emit-subx-call-operand *(ebp+8) %edi)
27307 (write-buffered *(ebp+8) ")\n")
27308 $translate-mu-allocate-stmt:end:
27309
27310 5f/pop-to-edi
27311 5e/pop-to-esi
27312 58/pop-to-eax
27313
27314 89/<- %esp 5/r32/ebp
27315 5d/pop-to-ebp
27316 c3/return
27317
27318 addr-handle-payload-size:
27319
27320 55/push-ebp
27321 89/<- %ebp 4/r32/esp
27322
27323 8b/-> *(ebp+8) 0/r32/eax
27324 (lookup *eax *(eax+4))
27325 (lookup *(eax+8) *(eax+0xc))
27326
27327
27328
27329
27330 $addr-handle-payload-size:skip-addr:
27331 (lookup *(eax+0xc) *(eax+0x10))
27332
27333
27334
27335
27336 $addr-handle-payload-size:skip-handle:
27337 (lookup *(eax+0xc) *(eax+0x10))
27338
27339
27340 81 7/subop/compare *eax 0/imm32/false
27341 {
27342 75/jump-if-!= break/disp8
27343 (lookup *(eax+4) *(eax+8))
27344 }
27345
27346
27347 (size-of-type-id *(eax+4))
27348 $addr-handle-payload-size:end:
27349
27350 89/<- %esp 5/r32/ebp
27351 5d/pop-to-ebp
27352 c3/return
27353
27354 addr-payload-size:
27355
27356 55/push-ebp
27357 89/<- %ebp 4/r32/esp
27358
27359 8b/-> *(ebp+8) 0/r32/eax
27360 (lookup *eax *(eax+4))
27361 (lookup *(eax+8) *(eax+0xc))
27362
27363
27364
27365
27366 $addr-payload-size:skip-addr:
27367 (lookup *(eax+0xc) *(eax+0x10))
27368
27369
27370 81 7/subop/compare *eax 0/imm32/false
27371 {
27372 75/jump-if-!= break/disp8
27373 (lookup *(eax+4) *(eax+8))
27374 }
27375
27376
27377 (size-of-type-id *(eax+4))
27378 $addr-payload-size:end:
27379
27380 89/<- %esp 5/r32/ebp
27381 5d/pop-to-ebp
27382 c3/return
27383
27384 translate-mu-populate-stmt:
27385
27386 55/push-ebp
27387 89/<- %ebp 4/r32/esp
27388
27389 50/push-eax
27390 51/push-ecx
27391 56/push-esi
27392 57/push-edi
27393
27394 8b/-> *(ebp+0xc) 6/r32/esi
27395
27396 (lookup *(esi+0xc) *(esi+0x10))
27397 89/<- %edi 0/r32/eax
27398
27399 (lookup *(edi+8) *(edi+0xc))
27400 89/<- %ecx 0/r32/eax
27401
27402 (emit-indent *(ebp+8) *Curr-block-depth)
27403 (write-buffered *(ebp+8) "(allocate-array2 Heap ")
27404 (addr-handle-array-payload-size %edi *(ebp+0x10) *(ebp+0x14))
27405 (write-int32-hex-buffered *(ebp+8) %eax)
27406 (emit-subx-call-operand *(ebp+8) %ecx)
27407 (emit-subx-call-operand *(ebp+8) %edi)
27408 (write-buffered *(ebp+8) ")\n")
27409 $translate-mu-populate-stmt:end:
27410
27411 5f/pop-to-edi
27412 5e/pop-to-esi
27413 59/pop-to-ecx
27414 58/pop-to-eax
27415
27416 89/<- %esp 5/r32/ebp
27417 5d/pop-to-ebp
27418 c3/return
27419
27420 translate-mu-populate-stream-stmt:
27421
27422 55/push-ebp
27423 89/<- %ebp 4/r32/esp
27424
27425 50/push-eax
27426 51/push-ecx
27427 56/push-esi
27428 57/push-edi
27429
27430 8b/-> *(ebp+0xc) 6/r32/esi
27431
27432 (lookup *(esi+0xc) *(esi+0x10))
27433 89/<- %edi 0/r32/eax
27434
27435 (lookup *(edi+8) *(edi+0xc))
27436 89/<- %ecx 0/r32/eax
27437
27438 (emit-indent *(ebp+8) *Curr-block-depth)
27439 (write-buffered *(ebp+8) "(new-stream Heap ")
27440 (addr-handle-stream-payload-size %edi *(ebp+0x10) *(ebp+0x14))
27441 (write-int32-hex-buffered *(ebp+8) %eax)
27442 (emit-subx-call-operand *(ebp+8) %ecx)
27443 (emit-subx-call-operand *(ebp+8) %edi)
27444 (write-buffered *(ebp+8) ")\n")
27445 $translate-mu-populate-stream-stmt:end:
27446
27447 5f/pop-to-edi
27448 5e/pop-to-esi
27449 59/pop-to-ecx
27450 58/pop-to-eax
27451
27452 89/<- %esp 5/r32/ebp
27453 5d/pop-to-ebp
27454 c3/return
27455
27456 translate-mu-read-from-stream-stmt:
27457
27458 55/push-ebp
27459 89/<- %ebp 4/r32/esp
27460
27461 50/push-eax
27462 51/push-ecx
27463 56/push-esi
27464 57/push-edi
27465
27466 8b/-> *(ebp+0xc) 6/r32/esi
27467
27468 (lookup *(esi+0xc) *(esi+0x10))
27469 89/<- %ecx 0/r32/eax
27470
27471 (lookup *(ecx+8) *(ecx+0xc))
27472 89/<- %edi 0/r32/eax
27473
27474 (emit-indent *(ebp+8) *Curr-block-depth)
27475 (write-buffered *(ebp+8) "(read-from-stream")
27476 (emit-subx-call-operand *(ebp+8) %ecx)
27477 (emit-subx-call-operand *(ebp+8) %edi)
27478 (write-buffered *(ebp+8) Space)
27479 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
27480 (write-int32-hex-buffered *(ebp+8) %eax)
27481 (write-buffered *(ebp+8) ")\n")
27482 $translate-mu-read-from-stream-stmt:end:
27483
27484 5f/pop-to-edi
27485 5e/pop-to-esi
27486 59/pop-to-ecx
27487 58/pop-to-eax
27488
27489 89/<- %esp 5/r32/ebp
27490 5d/pop-to-ebp
27491 c3/return
27492
27493 translate-mu-write-to-stream-stmt:
27494
27495 55/push-ebp
27496 89/<- %ebp 4/r32/esp
27497
27498 50/push-eax
27499 51/push-ecx
27500 56/push-esi
27501 57/push-edi
27502
27503 8b/-> *(ebp+0xc) 6/r32/esi
27504
27505 (lookup *(esi+0xc) *(esi+0x10))
27506 89/<- %ecx 0/r32/eax
27507
27508 (lookup *(ecx+8) *(ecx+0xc))
27509 89/<- %edi 0/r32/eax
27510
27511 (emit-indent *(ebp+8) *Curr-block-depth)
27512 (write-buffered *(ebp+8) "(write-to-stream")
27513 (emit-subx-call-operand *(ebp+8) %ecx)
27514 (flush *(ebp+8))
27515 (emit-subx-call-operand *(ebp+8) %edi)
27516 (flush *(ebp+8))
27517 (write-buffered *(ebp+8) Space)
27518 (flush *(ebp+8))
27519 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
27520 (write-int32-hex-buffered *(ebp+8) %eax)
27521 (write-buffered *(ebp+8) ")\n")
27522 $translate-mu-write-to-stream-stmt:end:
27523
27524 5f/pop-to-edi
27525 5e/pop-to-esi
27526 59/pop-to-ecx
27527 58/pop-to-eax
27528
27529 89/<- %esp 5/r32/ebp
27530 5d/pop-to-ebp
27531 c3/return
27532
27533 addr-handle-array-payload-size:
27534
27535 55/push-ebp
27536 89/<- %ebp 4/r32/esp
27537
27538 8b/-> *(ebp+8) 0/r32/eax
27539 (lookup *eax *(eax+4))
27540 (lookup *(eax+8) *(eax+0xc))
27541
27542
27543
27544
27545 $addr-handle-array-payload-size:skip-addr:
27546 (lookup *(eax+0xc) *(eax+0x10))
27547
27548
27549
27550
27551 $addr-handle-array-payload-size:skip-handle:
27552 (lookup *(eax+0xc) *(eax+0x10))
27553
27554
27555
27556
27557 $addr-handle-array-payload-size:skip-array:
27558 (lookup *(eax+0xc) *(eax+0x10))
27559
27560
27561 81 7/subop/compare *eax 0/imm32/false
27562 {
27563 75/jump-if-!= break/disp8
27564 (lookup *(eax+4) *(eax+8))
27565 }
27566 $addr-handle-array-payload-size:compute-size:
27567
27568
27569 (size-of-type-id-as-array-element *(eax+4))
27570 $addr-handle-array-payload-size:end:
27571
27572 89/<- %esp 5/r32/ebp
27573 5d/pop-to-ebp
27574 c3/return
27575
27576 addr-handle-stream-payload-size:
27577
27578 55/push-ebp
27579 89/<- %ebp 4/r32/esp
27580
27581 8b/-> *(ebp+8) 0/r32/eax
27582 (lookup *eax *(eax+4))
27583 (lookup *(eax+8) *(eax+0xc))
27584
27585
27586
27587
27588 $addr-handle-stream-payload-size:skip-addr:
27589 (lookup *(eax+0xc) *(eax+0x10))
27590
27591
27592
27593
27594 $addr-handle-stream-payload-size:skip-handle:
27595 (lookup *(eax+0xc) *(eax+0x10))
27596
27597
27598
27599
27600 $addr-handle-stream-payload-size:skip-stream:
27601 (lookup *(eax+0xc) *(eax+0x10))
27602
27603
27604 81 7/subop/compare *eax 0/imm32/false
27605 {
27606 75/jump-if-!= break/disp8
27607 (lookup *(eax+4) *(eax+8))
27608 }
27609 $addr-handle-stream-payload-size:compute-size:
27610
27611
27612 (size-of-type-id-as-array-element *(eax+4))
27613 $addr-handle-stream-payload-size:end:
27614
27615 89/<- %esp 5/r32/ebp
27616 5d/pop-to-ebp
27617 c3/return
27618
27619 power-of-2?:
27620
27621
27622 55/push-ebp
27623 89/<- %ebp 4/r32/esp
27624
27625 8b/-> *(ebp+8) 0/r32/eax
27626
27627 3d/compare-eax-with 0/imm32
27628 0f 8c/jump-if-< $power-of-2?:abort/disp32
27629
27630 48/decrement-eax
27631
27632 23/and-> *(ebp+8) 0/r32/eax
27633
27634 3d/compare-eax-and 0/imm32
27635 0f 94/set-byte-if-= %al
27636 81 4/subop/and %eax 0xff/imm32
27637 $power-of-2?:end:
27638
27639 89/<- %esp 5/r32/ebp
27640 5d/pop-to-ebp
27641 c3/return
27642
27643 $power-of-2?:abort:
27644 (write-buffered *(ebp+0xc) "power-of-2?: negative number\n")
27645 (flush *(ebp+0xc))
27646 (stop *(ebp+0x10) 1)
27647
27648
27649 num-shift-rights:
27650
27651
27652 55/push-ebp
27653 89/<- %ebp 4/r32/esp
27654
27655 51/push-ecx
27656
27657 8b/-> *(ebp+8) 1/r32/ecx
27658
27659 b8/copy-to-eax 0/imm32
27660 {
27661
27662 81 7/subop/compare %ecx 1/imm32
27663 7e/jump-if-<= break/disp8
27664 40/increment-eax
27665 c1/shift 5/subop/arithmetic-right %ecx 1/imm8
27666 eb/jump loop/disp8
27667 }
27668 $num-shift-rights:end:
27669
27670 59/pop-to-ecx
27671
27672 89/<- %esp 5/r32/ebp
27673 5d/pop-to-ebp
27674 c3/return
27675
27676 mu-get-offset:
27677
27678 55/push-ebp
27679 89/<- %ebp 4/r32/esp
27680
27681 8b/-> *(ebp+8) 0/r32/eax
27682 (lookup *(eax+0xc) *(eax+0x10))
27683 (lookup *(eax+8) *(eax+0xc))
27684
27685 (lookup *eax *(eax+4))
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696 8b/-> *(eax+0x14) 0/r32/eax
27697
27698
27699
27700
27701 $emit-get-offset:end:
27702
27703 89/<- %esp 5/r32/ebp
27704 5d/pop-to-ebp
27705 c3/return
27706
27707 emit-subx-block:
27708
27709 55/push-ebp
27710 89/<- %ebp 4/r32/esp
27711
27712 50/push-eax
27713 51/push-ecx
27714 56/push-esi
27715
27716 8b/-> *(ebp+0xc) 6/r32/esi
27717
27718 (lookup *(esi+0xc) *(esi+0x10))
27719 8b/-> *Curr-block-depth 1/r32/ecx
27720 89/<- *(eax+0x10) 1/r32/ecx
27721
27722 (lookup *(esi+4) *(esi+8))
27723
27724 {
27725 $emit-subx-block:check-empty:
27726 3d/compare-eax-and 0/imm32
27727 0f 84/jump-if-= break/disp32
27728 (emit-indent *(ebp+8) *Curr-block-depth)
27729 (write-buffered *(ebp+8) "{\n")
27730
27731 (lookup *(esi+0xc) *(esi+0x10))
27732 89/<- %ecx 0/r32/eax
27733
27734 (lookup *ecx *(ecx+4))
27735 (write-buffered *(ebp+8) %eax)
27736 (write-buffered *(ebp+8) ":loop:\n")
27737 ff 0/subop/increment *Curr-block-depth
27738 (push *(ebp+0x10) *(esi+0xc))
27739 (push *(ebp+0x10) *(esi+0x10))
27740 (push *(ebp+0x10) 0)
27741
27742 (lookup *(esi+4) *(esi+8))
27743 (emit-subx-stmt-list *(ebp+8) %eax *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27744 (pop *(ebp+0x10))
27745 (pop *(ebp+0x10))
27746 (pop *(ebp+0x10))
27747 ff 1/subop/decrement *Curr-block-depth
27748 (emit-indent *(ebp+8) *Curr-block-depth)
27749 (write-buffered *(ebp+8) "}\n")
27750 (lookup *ecx *(ecx+4))
27751 (write-buffered *(ebp+8) %eax)
27752 (write-buffered *(ebp+8) ":break:\n")
27753 }
27754 $emit-subx-block:end:
27755
27756 5e/pop-to-esi
27757 59/pop-to-ecx
27758 58/pop-to-eax
27759
27760 89/<- %esp 5/r32/ebp
27761 5d/pop-to-ebp
27762 c3/return
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813 == data
27814 Primitives:
27815
27816 _Primitive-increment-eax:
27817
27818 0x11/imm32/alloc-id:fake
27819 _string-increment/imm32/name
27820 0/imm32/no-inouts
27821 0/imm32/no-inouts
27822 0x11/imm32/alloc-id:fake
27823 Single-int-var-in-eax/imm32/outputs
27824 0x11/imm32/alloc-id:fake
27825 _string_40_increment_eax/imm32/subx-name
27826 0/imm32/no-rm32
27827 0/imm32/no-r32
27828 0/imm32/no-imm32
27829 0/imm32/no-imm8
27830 0/imm32/no-disp32
27831 0/imm32/no-xm32
27832 0/imm32/no-x32
27833 0x11/imm32/alloc-id:fake
27834 _Primitive-increment-ecx/imm32/next
27835 _Primitive-increment-ecx:
27836 0x11/imm32/alloc-id:fake:payload
27837
27838 0x11/imm32/alloc-id:fake
27839 _string-increment/imm32/name
27840 0/imm32/no-inouts
27841 0/imm32/no-inouts
27842 0x11/imm32/alloc-id:fake
27843 Single-int-var-in-ecx/imm32/outputs
27844 0x11/imm32/alloc-id:fake
27845 _string_41_increment_ecx/imm32/subx-name
27846 0/imm32/no-rm32
27847 0/imm32/no-r32
27848 0/imm32/no-imm32
27849 0/imm32/no-imm8
27850 0/imm32/no-disp32
27851 0/imm32/no-xm32
27852 0/imm32/no-x32
27853 0x11/imm32/alloc-id:fake
27854 _Primitive-increment-edx/imm32/next
27855 _Primitive-increment-edx:
27856 0x11/imm32/alloc-id:fake:payload
27857
27858 0x11/imm32/alloc-id:fake
27859 _string-increment/imm32/name
27860 0/imm32/no-inouts
27861 0/imm32/no-inouts
27862 0x11/imm32/alloc-id:fake
27863 Single-int-var-in-edx/imm32/outputs
27864 0x11/imm32/alloc-id:fake
27865 _string_42_increment_edx/imm32/subx-name
27866 0/imm32/no-rm32
27867 0/imm32/no-r32
27868 0/imm32/no-imm32
27869 0/imm32/no-imm8
27870 0/imm32/no-disp32
27871 0/imm32/no-xm32
27872 0/imm32/no-x32
27873 0x11/imm32/alloc-id:fake
27874 _Primitive-increment-ebx/imm32/next
27875 _Primitive-increment-ebx:
27876 0x11/imm32/alloc-id:fake:payload
27877
27878 0x11/imm32/alloc-id:fake
27879 _string-increment/imm32/name
27880 0/imm32/no-inouts
27881 0/imm32/no-inouts
27882 0x11/imm32/alloc-id:fake
27883 Single-int-var-in-ebx/imm32/outputs
27884 0x11/imm32/alloc-id:fake
27885 _string_43_increment_ebx/imm32/subx-name
27886 0/imm32/no-rm32
27887 0/imm32/no-r32
27888 0/imm32/no-imm32
27889 0/imm32/no-imm8
27890 0/imm32/no-disp32
27891 0/imm32/no-xm32
27892 0/imm32/no-x32
27893 0x11/imm32/alloc-id:fake
27894 _Primitive-increment-esi/imm32/next
27895 _Primitive-increment-esi:
27896 0x11/imm32/alloc-id:fake:payload
27897
27898 0x11/imm32/alloc-id:fake
27899 _string-increment/imm32/name
27900 0/imm32/no-inouts
27901 0/imm32/no-inouts
27902 0x11/imm32/alloc-id:fake
27903 Single-int-var-in-esi/imm32/outputs
27904 0x11/imm32/alloc-id:fake
27905 _string_46_increment_esi/imm32/subx-name
27906 0/imm32/no-rm32
27907 0/imm32/no-r32
27908 0/imm32/no-imm32
27909 0/imm32/no-imm8
27910 0/imm32/no-disp32
27911 0/imm32/no-xm32
27912 0/imm32/no-x32
27913 0x11/imm32/alloc-id:fake
27914 _Primitive-increment-edi/imm32/next
27915 _Primitive-increment-edi:
27916 0x11/imm32/alloc-id:fake:payload
27917
27918 0x11/imm32/alloc-id:fake
27919 _string-increment/imm32/name
27920 0/imm32/no-inouts
27921 0/imm32/no-inouts
27922 0x11/imm32/alloc-id:fake
27923 Single-int-var-in-edi/imm32/outputs
27924 0x11/imm32/alloc-id:fake
27925 _string_47_increment_edi/imm32/subx-name
27926 0/imm32/no-rm32
27927 0/imm32/no-r32
27928 0/imm32/no-imm32
27929 0/imm32/no-imm8
27930 0/imm32/no-disp32
27931 0/imm32/no-xm32
27932 0/imm32/no-x32
27933 0x11/imm32/alloc-id:fake
27934 _Primitive-decrement-eax/imm32/next
27935 _Primitive-decrement-eax:
27936 0x11/imm32/alloc-id:fake:payload
27937
27938 0x11/imm32/alloc-id:fake
27939 _string-decrement/imm32/name
27940 0/imm32/no-inouts
27941 0/imm32/no-inouts
27942 0x11/imm32/alloc-id:fake
27943 Single-int-var-in-eax/imm32/outputs
27944 0x11/imm32/alloc-id:fake
27945 _string_48_decrement_eax/imm32/subx-name
27946 0/imm32/no-rm32
27947 0/imm32/no-r32
27948 0/imm32/no-imm32
27949 0/imm32/no-imm8
27950 0/imm32/no-disp32
27951 0/imm32/no-xm32
27952 0/imm32/no-x32
27953 0x11/imm32/alloc-id:fake
27954 _Primitive-decrement-ecx/imm32/next
27955 _Primitive-decrement-ecx:
27956 0x11/imm32/alloc-id:fake:payload
27957
27958 0x11/imm32/alloc-id:fake
27959 _string-decrement/imm32/name
27960 0/imm32/no-inouts
27961 0/imm32/no-inouts
27962 0x11/imm32/alloc-id:fake
27963 Single-int-var-in-ecx/imm32/outputs
27964 0x11/imm32/alloc-id:fake
27965 _string_49_decrement_ecx/imm32/subx-name
27966 0/imm32/no-rm32
27967 0/imm32/no-r32
27968 0/imm32/no-imm32
27969 0/imm32/no-imm8
27970 0/imm32/no-disp32
27971 0/imm32/no-xm32
27972 0/imm32/no-x32
27973 0x11/imm32/alloc-id:fake
27974 _Primitive-decrement-edx/imm32/next
27975 _Primitive-decrement-edx:
27976 0x11/imm32/alloc-id:fake:payload
27977
27978 0x11/imm32/alloc-id:fake
27979 _string-decrement/imm32/name
27980 0/imm32/no-inouts
27981 0/imm32/no-inouts
27982 0x11/imm32/alloc-id:fake
27983 Single-int-var-in-edx/imm32/outputs
27984 0x11/imm32/alloc-id:fake
27985 _string_4a_decrement_edx/imm32/subx-name
27986 0/imm32/no-rm32
27987 0/imm32/no-r32
27988 0/imm32/no-imm32
27989 0/imm32/no-imm8
27990 0/imm32/no-disp32
27991 0/imm32/no-xm32
27992 0/imm32/no-x32
27993 0x11/imm32/alloc-id:fake
27994 _Primitive-decrement-ebx/imm32/next
27995 _Primitive-decrement-ebx:
27996 0x11/imm32/alloc-id:fake:payload
27997
27998 0x11/imm32/alloc-id:fake
27999 _string-decrement/imm32/name
28000 0/imm32/no-inouts
28001 0/imm32/no-inouts
28002 0x11/imm32/alloc-id:fake
28003 Single-int-var-in-ebx/imm32/outputs
28004 0x11/imm32/alloc-id:fake
28005 _string_4b_decrement_ebx/imm32/subx-name
28006 0/imm32/no-rm32
28007 0/imm32/no-r32
28008 0/imm32/no-imm32
28009 0/imm32/no-imm8
28010 0/imm32/no-disp32
28011 0/imm32/no-xm32
28012 0/imm32/no-x32
28013 0x11/imm32/alloc-id:fake
28014 _Primitive-decrement-esi/imm32/next
28015 _Primitive-decrement-esi:
28016 0x11/imm32/alloc-id:fake:payload
28017
28018 0x11/imm32/alloc-id:fake
28019 _string-decrement/imm32/name
28020 0/imm32/no-inouts
28021 0/imm32/no-inouts
28022 0x11/imm32/alloc-id:fake
28023 Single-int-var-in-esi/imm32/outputs
28024 0x11/imm32/alloc-id:fake
28025 _string_4e_decrement_esi/imm32/subx-name
28026 0/imm32/no-rm32
28027 0/imm32/no-r32
28028 0/imm32/no-imm32
28029 0/imm32/no-imm8
28030 0/imm32/no-disp32
28031 0/imm32/no-xm32
28032 0/imm32/no-x32
28033 0x11/imm32/alloc-id:fake
28034 _Primitive-decrement-edi/imm32/next
28035 _Primitive-decrement-edi:
28036 0x11/imm32/alloc-id:fake:payload
28037
28038 0x11/imm32/alloc-id:fake
28039 _string-decrement/imm32/name
28040 0/imm32/no-inouts
28041 0/imm32/no-inouts
28042 0x11/imm32/alloc-id:fake
28043 Single-int-var-in-edi/imm32/outputs
28044 0x11/imm32/alloc-id:fake
28045 _string_4f_decrement_edi/imm32/subx-name
28046 0/imm32/no-rm32
28047 0/imm32/no-r32
28048 0/imm32/no-imm32
28049 0/imm32/no-imm8
28050 0/imm32/no-disp32
28051 0/imm32/no-xm32
28052 0/imm32/no-x32
28053 0x11/imm32/alloc-id:fake
28054 _Primitive-increment-mem/imm32/next
28055 _Primitive-increment-mem:
28056 0x11/imm32/alloc-id:fake:payload
28057
28058 0x11/imm32/alloc-id:fake
28059 _string-increment/imm32/name
28060 0x11/imm32/alloc-id:fake
28061 Single-int-var-in-mem/imm32/inouts
28062 0/imm32/no-outputs
28063 0/imm32/no-outputs
28064 0x11/imm32/alloc-id:fake
28065 _string_ff_subop_increment/imm32/subx-name
28066 1/imm32/rm32-is-first-inout
28067 0/imm32/no-r32
28068 0/imm32/no-imm32
28069 0/imm32/no-imm8
28070 0/imm32/no-disp32
28071 0/imm32/no-xm32
28072 0/imm32/no-x32
28073 0x11/imm32/alloc-id:fake
28074 _Primitive-increment-reg/imm32/next
28075 _Primitive-increment-reg:
28076 0x11/imm32/alloc-id:fake:payload
28077
28078 0x11/imm32/alloc-id:fake
28079 _string-increment/imm32/name
28080 0/imm32/no-inouts
28081 0/imm32/no-inouts
28082 0x11/imm32/alloc-id:fake
28083 Single-int-var-in-some-register/imm32/outputs
28084 0x11/imm32/alloc-id:fake
28085 _string_ff_subop_increment/imm32/subx-name
28086 3/imm32/rm32-is-first-output
28087 0/imm32/no-r32
28088 0/imm32/no-imm32
28089 0/imm32/no-imm8
28090 0/imm32/no-disp32
28091 0/imm32/no-xm32
28092 0/imm32/no-x32
28093 0x11/imm32/alloc-id:fake
28094 _Primitive-decrement-mem/imm32/next
28095 _Primitive-decrement-mem:
28096 0x11/imm32/alloc-id:fake:payload
28097
28098 0x11/imm32/alloc-id:fake
28099 _string-decrement/imm32/name
28100 0x11/imm32/alloc-id:fake
28101 Single-int-var-in-mem/imm32/inouts
28102 0/imm32/no-outputs
28103 0/imm32/no-outputs
28104 0x11/imm32/alloc-id:fake
28105 _string_ff_subop_decrement/imm32/subx-name
28106 1/imm32/rm32-is-first-inout
28107 0/imm32/no-r32
28108 0/imm32/no-imm32
28109 0/imm32/no-imm8
28110 0/imm32/no-disp32
28111 0/imm32/no-xm32
28112 0/imm32/no-x32
28113 0x11/imm32/alloc-id:fake
28114 _Primitive-decrement-reg/imm32/next
28115 _Primitive-decrement-reg:
28116 0x11/imm32/alloc-id:fake:payload
28117
28118 0x11/imm32/alloc-id:fake
28119 _string-decrement/imm32/name
28120 0/imm32/no-inouts
28121 0/imm32/no-inouts
28122 0x11/imm32/alloc-id:fake
28123 Single-int-var-in-some-register/imm32/outputs
28124 0x11/imm32/alloc-id:fake
28125 _string_ff_subop_decrement/imm32/subx-name
28126 3/imm32/rm32-is-first-output
28127 0/imm32/no-r32
28128 0/imm32/no-imm32
28129 0/imm32/no-imm8
28130 0/imm32/no-disp32
28131 0/imm32/no-xm32
28132 0/imm32/no-x32
28133 0x11/imm32/alloc-id:fake
28134 _Primitive-add-to-eax/imm32/next
28135
28136 _Primitive-add-to-eax:
28137 0x11/imm32/alloc-id:fake:payload
28138
28139 0x11/imm32/alloc-id:fake
28140 _string-add/imm32/name
28141 0x11/imm32/alloc-id:fake
28142 Single-lit-var/imm32/inouts
28143 0x11/imm32/alloc-id:fake
28144 Single-int-var-in-eax/imm32/outputs
28145 0x11/imm32/alloc-id:fake
28146 _string_05_add_to_eax/imm32/subx-name
28147 0/imm32/no-rm32
28148 0/imm32/no-r32
28149 1/imm32/imm32-is-first-inout
28150 0/imm32/no-imm8
28151 0/imm32/no-disp32
28152 0/imm32/no-xm32
28153 0/imm32/no-x32
28154 0x11/imm32/alloc-id:fake
28155 _Primitive-add-reg-to-reg/imm32/next
28156 _Primitive-add-reg-to-reg:
28157 0x11/imm32/alloc-id:fake:payload
28158
28159 0x11/imm32/alloc-id:fake
28160 _string-add/imm32/name
28161 0x11/imm32/alloc-id:fake
28162 Single-int-var-in-some-register/imm32/inouts
28163 0x11/imm32/alloc-id:fake
28164 Single-int-var-in-some-register/imm32/outputs
28165 0x11/imm32/alloc-id:fake
28166 _string_01_add_to/imm32/subx-name
28167 3/imm32/rm32-is-first-output
28168 1/imm32/r32-is-first-inout
28169 0/imm32/no-imm32
28170 0/imm32/no-imm8
28171 0/imm32/no-disp32
28172 0/imm32/no-xm32
28173 0/imm32/no-x32
28174 0x11/imm32/alloc-id:fake
28175 _Primitive-add-reg-to-mem/imm32/next
28176 _Primitive-add-reg-to-mem:
28177 0x11/imm32/alloc-id:fake:payload
28178
28179 0x11/imm32/alloc-id:fake
28180 _string-add-to/imm32/name
28181 0x11/imm32/alloc-id:fake
28182 Two-args-int-stack-int-reg/imm32/inouts
28183 0/imm32/no-outputs
28184 0/imm32/no-outputs
28185 0x11/imm32/alloc-id:fake
28186 _string_01_add_to/imm32/subx-name
28187 1/imm32/rm32-is-first-inout
28188 2/imm32/r32-is-second-inout
28189 0/imm32/no-imm32
28190 0/imm32/no-imm8
28191 0/imm32/no-disp32
28192 0/imm32/no-xm32
28193 0/imm32/no-x32
28194 0x11/imm32/alloc-id:fake
28195 _Primitive-add-mem-to-reg/imm32/next
28196 _Primitive-add-mem-to-reg:
28197 0x11/imm32/alloc-id:fake:payload
28198
28199 0x11/imm32/alloc-id:fake
28200 _string-add/imm32/name
28201 0x11/imm32/alloc-id:fake
28202 Single-int-var-in-mem/imm32/inouts
28203 0x11/imm32/alloc-id:fake
28204 Single-int-var-in-some-register/imm32/outputs
28205 0x11/imm32/alloc-id:fake
28206 _string_03_add/imm32/subx-name
28207 1/imm32/rm32-is-first-inout
28208 3/imm32/r32-is-first-output
28209 0/imm32/no-imm32
28210 0/imm32/no-imm8
28211 0/imm32/no-disp32
28212 0/imm32/no-xm32
28213 0/imm32/no-x32
28214 0x11/imm32/alloc-id:fake
28215 _Primitive-add-lit-to-reg/imm32/next
28216 _Primitive-add-lit-to-reg:
28217 0x11/imm32/alloc-id:fake:payload
28218
28219 0x11/imm32/alloc-id:fake
28220 _string-add/imm32/name
28221 0x11/imm32/alloc-id:fake
28222 Single-lit-var/imm32/inouts
28223 0x11/imm32/alloc-id:fake
28224 Single-int-var-in-some-register/imm32/outputs
28225 0x11/imm32/alloc-id:fake
28226 _string_81_subop_add/imm32/subx-name
28227 3/imm32/rm32-is-first-output
28228 0/imm32/no-r32
28229 1/imm32/imm32-is-first-inout
28230 0/imm32/no-imm8
28231 0/imm32/no-disp32
28232 0/imm32/no-xm32
28233 0/imm32/no-x32
28234 0x11/imm32/alloc-id:fake
28235 _Primitive-add-lit-to-mem/imm32/next
28236 _Primitive-add-lit-to-mem:
28237 0x11/imm32/alloc-id:fake:payload
28238
28239 0x11/imm32/alloc-id:fake
28240 _string-add-to/imm32/name
28241 0x11/imm32/alloc-id:fake
28242 Int-var-and-literal/imm32/inouts
28243 0/imm32/no-outputs
28244 0/imm32/no-outputs
28245 0x11/imm32/alloc-id:fake
28246 _string_81_subop_add/imm32/subx-name
28247 1/imm32/rm32-is-first-inout
28248 0/imm32/no-r32
28249 2/imm32/imm32-is-second-inout
28250 0/imm32/no-imm8
28251 0/imm32/no-disp32
28252 0/imm32/no-xm32
28253 0/imm32/no-x32
28254 0x11/imm32/alloc-id:fake
28255 _Primitive-subtract-from-eax/imm32/next
28256
28257 _Primitive-subtract-from-eax:
28258 0x11/imm32/alloc-id:fake:payload
28259
28260 0x11/imm32/alloc-id:fake
28261 _string-subtract/imm32/name
28262 0x11/imm32/alloc-id:fake
28263 Single-lit-var/imm32/inouts
28264 0x11/imm32/alloc-id:fake
28265 Single-int-var-in-eax/imm32/outputs
28266 0x11/imm32/alloc-id:fake
28267 _string_2d_subtract_from_eax/imm32/subx-name
28268 0/imm32/no-rm32
28269 0/imm32/no-r32
28270 1/imm32/imm32-is-first-inout
28271 0/imm32/no-imm8
28272 0/imm32/no-disp32
28273 0/imm32/no-xm32
28274 0/imm32/no-x32
28275 0x11/imm32/alloc-id:fake
28276 _Primitive-subtract-reg-from-reg/imm32/next
28277 _Primitive-subtract-reg-from-reg:
28278 0x11/imm32/alloc-id:fake:payload
28279
28280 0x11/imm32/alloc-id:fake
28281 _string-subtract/imm32/name
28282 0x11/imm32/alloc-id:fake
28283 Single-int-var-in-some-register/imm32/inouts
28284 0x11/imm32/alloc-id:fake
28285 Single-int-var-in-some-register/imm32/outputs
28286 0x11/imm32/alloc-id:fake
28287 _string_29_subtract_from/imm32/subx-name
28288 3/imm32/rm32-is-first-output
28289 1/imm32/r32-is-first-inout
28290 0/imm32/no-imm32
28291 0/imm32/no-imm8
28292 0/imm32/no-disp32
28293 0/imm32/no-xm32
28294 0/imm32/no-x32
28295 0x11/imm32/alloc-id:fake
28296 _Primitive-subtract-reg-from-mem/imm32/next
28297 _Primitive-subtract-reg-from-mem:
28298 0x11/imm32/alloc-id:fake:payload
28299
28300 0x11/imm32/alloc-id:fake
28301 _string-subtract-from/imm32/name
28302 0x11/imm32/alloc-id:fake
28303 Two-args-int-stack-int-reg/imm32/inouts
28304 0/imm32/no-outputs
28305 0/imm32/no-outputs
28306 0x11/imm32/alloc-id:fake
28307 _string_29_subtract_from/imm32/subx-name
28308 1/imm32/rm32-is-first-inout
28309 2/imm32/r32-is-second-inout
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-subtract-mem-from-reg/imm32/next
28317 _Primitive-subtract-mem-from-reg:
28318 0x11/imm32/alloc-id:fake:payload
28319
28320 0x11/imm32/alloc-id:fake
28321 _string-subtract/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_2b_subtract/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-subtract-lit-from-reg/imm32/next
28337 _Primitive-subtract-lit-from-reg:
28338 0x11/imm32/alloc-id:fake:payload
28339
28340 0x11/imm32/alloc-id:fake
28341 _string-subtract/imm32/name
28342 0x11/imm32/alloc-id:fake
28343 Single-lit-var/imm32/inouts
28344 0x11/imm32/alloc-id:fake
28345 Single-int-var-in-some-register/imm32/outputs
28346 0x11/imm32/alloc-id:fake
28347 _string_81_subop_subtract/imm32/subx-name
28348 3/imm32/rm32-is-first-output
28349 0/imm32/no-r32
28350 1/imm32/imm32-is-first-inout
28351 0/imm32/no-imm8
28352 0/imm32/no-disp32
28353 0/imm32/no-xm32
28354 0/imm32/no-x32
28355 0x11/imm32/alloc-id:fake
28356 _Primitive-subtract-lit-from-mem/imm32/next
28357 _Primitive-subtract-lit-from-mem:
28358 0x11/imm32/alloc-id:fake:payload
28359
28360 0x11/imm32/alloc-id:fake
28361 _string-subtract-from/imm32/name
28362 0x11/imm32/alloc-id:fake
28363 Int-var-and-literal/imm32/inouts
28364 0/imm32/no-outputs
28365 0/imm32/no-outputs
28366 0x11/imm32/alloc-id:fake
28367 _string_81_subop_subtract/imm32/subx-name
28368 1/imm32/rm32-is-first-inout
28369 0/imm32/no-r32
28370 2/imm32/imm32-is-second-inout
28371 0/imm32/no-imm8
28372 0/imm32/no-disp32
28373 0/imm32/no-xm32
28374 0/imm32/no-x32
28375 0x11/imm32/alloc-id:fake
28376 _Primitive-and-with-eax/imm32/next
28377
28378 _Primitive-and-with-eax:
28379 0x11/imm32/alloc-id:fake:payload
28380
28381 0x11/imm32/alloc-id:fake
28382 _string-and/imm32/name
28383 0x11/imm32/alloc-id:fake
28384 Single-lit-var/imm32/inouts
28385 0x11/imm32/alloc-id:fake
28386 Single-int-var-in-eax/imm32/outputs
28387 0x11/imm32/alloc-id:fake
28388 _string_25_and_with_eax/imm32/subx-name
28389 0/imm32/no-rm32
28390 0/imm32/no-r32
28391 1/imm32/imm32-is-first-inout
28392 0/imm32/no-imm8
28393 0/imm32/no-disp32
28394 0/imm32/no-xm32
28395 0/imm32/no-x32
28396 0x11/imm32/alloc-id:fake
28397 _Primitive-and-reg-with-reg/imm32/next
28398 _Primitive-and-reg-with-reg:
28399 0x11/imm32/alloc-id:fake:payload
28400
28401 0x11/imm32/alloc-id:fake
28402 _string-and/imm32/name
28403 0x11/imm32/alloc-id:fake
28404 Single-int-var-in-some-register/imm32/inouts
28405 0x11/imm32/alloc-id:fake
28406 Single-int-var-in-some-register/imm32/outputs
28407 0x11/imm32/alloc-id:fake
28408 _string_21_and_with/imm32/subx-name
28409 3/imm32/rm32-is-first-output
28410 1/imm32/r32-is-first-inout
28411 0/imm32/no-imm32
28412 0/imm32/no-imm8
28413 0/imm32/no-disp32
28414 0/imm32/no-xm32
28415 0/imm32/no-x32
28416 0x11/imm32/alloc-id:fake
28417 _Primitive-and-reg-with-mem/imm32/next
28418 _Primitive-and-reg-with-mem:
28419 0x11/imm32/alloc-id:fake:payload
28420
28421 0x11/imm32/alloc-id:fake
28422 _string-and-with/imm32/name
28423 0x11/imm32/alloc-id:fake
28424 Two-args-int-stack-int-reg/imm32/inouts
28425 0/imm32/no-outputs
28426 0/imm32/no-outputs
28427 0x11/imm32/alloc-id:fake
28428 _string_21_and_with/imm32/subx-name
28429 1/imm32/rm32-is-first-inout
28430 2/imm32/r32-is-second-inout
28431 0/imm32/no-imm32
28432 0/imm32/no-imm8
28433 0/imm32/no-disp32
28434 0/imm32/no-xm32
28435 0/imm32/no-x32
28436 0x11/imm32/alloc-id:fake
28437 _Primitive-and-mem-with-reg/imm32/next
28438 _Primitive-and-mem-with-reg:
28439 0x11/imm32/alloc-id:fake:payload
28440
28441 0x11/imm32/alloc-id:fake
28442 _string-and/imm32/name
28443 0x11/imm32/alloc-id:fake
28444 Single-int-var-in-mem/imm32/inouts
28445 0x11/imm32/alloc-id:fake
28446 Single-int-var-in-some-register/imm32/outputs
28447 0x11/imm32/alloc-id:fake
28448 _string_23_and/imm32/subx-name
28449 1/imm32/rm32-is-first-inout
28450 3/imm32/r32-is-first-output
28451 0/imm32/no-imm32
28452 0/imm32/no-imm8
28453 0/imm32/no-disp32
28454 0/imm32/no-xm32
28455 0/imm32/no-x32
28456 0x11/imm32/alloc-id:fake
28457 _Primitive-and-lit-with-reg/imm32/next
28458 _Primitive-and-lit-with-reg:
28459 0x11/imm32/alloc-id:fake:payload
28460
28461 0x11/imm32/alloc-id:fake
28462 _string-and/imm32/name
28463 0x11/imm32/alloc-id:fake
28464 Single-lit-var/imm32/inouts
28465 0x11/imm32/alloc-id:fake
28466 Single-int-var-in-some-register/imm32/outputs
28467 0x11/imm32/alloc-id:fake
28468 _string_81_subop_and/imm32/subx-name
28469 3/imm32/rm32-is-first-output
28470 0/imm32/no-r32
28471 1/imm32/imm32-is-first-inout
28472 0/imm32/no-imm8
28473 0/imm32/no-disp32
28474 0/imm32/no-xm32
28475 0/imm32/no-x32
28476 0x11/imm32/alloc-id:fake
28477 _Primitive-and-lit-with-mem/imm32/next
28478 _Primitive-and-lit-with-mem:
28479 0x11/imm32/alloc-id:fake:payload
28480
28481 0x11/imm32/alloc-id:fake
28482 _string-and-with/imm32/name
28483 0x11/imm32/alloc-id:fake
28484 Int-var-and-literal/imm32/inouts
28485 0/imm32/no-outputs
28486 0/imm32/no-outputs
28487 0x11/imm32/alloc-id:fake
28488 _string_81_subop_and/imm32/subx-name
28489 1/imm32/rm32-is-first-inout
28490 0/imm32/no-r32
28491 2/imm32/imm32-is-second-inout
28492 0/imm32/no-imm8
28493 0/imm32/no-disp32
28494 0/imm32/no-xm32
28495 0/imm32/no-x32
28496 0x11/imm32/alloc-id:fake
28497 _Primitive-or-with-eax/imm32/next
28498
28499 _Primitive-or-with-eax:
28500 0x11/imm32/alloc-id:fake:payload
28501
28502 0x11/imm32/alloc-id:fake
28503 _string-or/imm32/name
28504 0x11/imm32/alloc-id:fake
28505 Single-lit-var/imm32/inouts
28506 0x11/imm32/alloc-id:fake
28507 Single-int-var-in-eax/imm32/outputs
28508 0x11/imm32/alloc-id:fake
28509 _string_0d_or_with_eax/imm32/subx-name
28510 0/imm32/no-rm32
28511 0/imm32/no-r32
28512 1/imm32/imm32-is-first-inout
28513 0/imm32/no-imm8
28514 0/imm32/no-disp32
28515 0/imm32/no-xm32
28516 0/imm32/no-x32
28517 0x11/imm32/alloc-id:fake
28518 _Primitive-or-reg-with-reg/imm32/next
28519 _Primitive-or-reg-with-reg:
28520 0x11/imm32/alloc-id:fake:payload
28521
28522 0x11/imm32/alloc-id:fake
28523 _string-or/imm32/name
28524 0x11/imm32/alloc-id:fake
28525 Single-int-var-in-some-register/imm32/inouts
28526 0x11/imm32/alloc-id:fake
28527 Single-int-var-in-some-register/imm32/outputs
28528 0x11/imm32/alloc-id:fake
28529 _string_09_or_with/imm32/subx-name
28530 3/imm32/rm32-is-first-output
28531 1/imm32/r32-is-first-inout
28532 0/imm32/no-imm32
28533 0/imm32/no-imm8
28534 0/imm32/no-disp32
28535 0/imm32/no-xm32
28536 0/imm32/no-x32
28537 0x11/imm32/alloc-id:fake
28538 _Primitive-or-reg-with-mem/imm32/next
28539 _Primitive-or-reg-with-mem:
28540 0x11/imm32/alloc-id:fake:payload
28541
28542 0x11/imm32/alloc-id:fake
28543 _string-or-with/imm32/name
28544 0x11/imm32/alloc-id:fake
28545 Two-args-int-stack-int-reg/imm32/inouts
28546 0/imm32/no-outputs
28547 0/imm32/no-outputs
28548 0x11/imm32/alloc-id:fake
28549 _string_09_or_with/imm32/subx-name
28550 1/imm32/rm32-is-first-inout
28551 2/imm32/r32-is-second-inout
28552 0/imm32/no-imm32
28553 0/imm32/no-imm8
28554 0/imm32/no-disp32
28555 0/imm32/no-xm32
28556 0/imm32/no-x32
28557 0x11/imm32/alloc-id:fake
28558 _Primitive-or-mem-with-reg/imm32/next
28559 _Primitive-or-mem-with-reg:
28560 0x11/imm32/alloc-id:fake:payload
28561
28562 0x11/imm32/alloc-id:fake
28563 _string-or/imm32/name
28564 0x11/imm32/alloc-id:fake
28565 Single-int-var-in-mem/imm32/inouts
28566 0x11/imm32/alloc-id:fake
28567 Single-int-var-in-some-register/imm32/outputs
28568 0x11/imm32/alloc-id:fake
28569 _string_0b_or/imm32/subx-name
28570 1/imm32/rm32-is-first-inout
28571 3/imm32/r32-is-first-output
28572 0/imm32/no-imm32
28573 0/imm32/no-imm8
28574 0/imm32/no-disp32
28575 0/imm32/no-xm32
28576 0/imm32/no-x32
28577 0x11/imm32/alloc-id:fake
28578 _Primitive-or-lit-with-reg/imm32/next
28579 _Primitive-or-lit-with-reg:
28580 0x11/imm32/alloc-id:fake:payload
28581
28582 0x11/imm32/alloc-id:fake
28583 _string-or/imm32/name
28584 0x11/imm32/alloc-id:fake
28585 Single-lit-var/imm32/inouts
28586 0x11/imm32/alloc-id:fake
28587 Single-int-var-in-some-register/imm32/outputs
28588 0x11/imm32/alloc-id:fake
28589 _string_81_subop_or/imm32/subx-name
28590 3/imm32/rm32-is-first-output
28591 0/imm32/no-r32
28592 1/imm32/imm32-is-first-inout
28593 0/imm32/no-imm8
28594 0/imm32/no-disp32
28595 0/imm32/no-xm32
28596 0/imm32/no-x32
28597 0x11/imm32/alloc-id:fake
28598 _Primitive-or-lit-with-mem/imm32/next
28599 _Primitive-or-lit-with-mem:
28600 0x11/imm32/alloc-id:fake:payload
28601
28602 0x11/imm32/alloc-id:fake
28603 _string-or-with/imm32/name
28604 0x11/imm32/alloc-id:fake
28605 Int-var-and-literal/imm32/inouts
28606 0/imm32/no-outputs
28607 0/imm32/no-outputs
28608 0x11/imm32/alloc-id:fake
28609 _string_81_subop_or/imm32/subx-name
28610 1/imm32/rm32-is-first-inout
28611 0/imm32/no-r32
28612 2/imm32/imm32-is-second-inout
28613 0/imm32/no-imm8
28614 0/imm32/no-disp32
28615 0/imm32/no-xm32
28616 0/imm32/no-x32
28617 0x11/imm32/alloc-id:fake
28618 _Primitive-xor-with-eax/imm32/next
28619
28620 _Primitive-xor-with-eax:
28621 0x11/imm32/alloc-id:fake:payload
28622
28623 0x11/imm32/alloc-id:fake
28624 _string-xor/imm32/name
28625 0x11/imm32/alloc-id:fake
28626 Single-lit-var/imm32/inouts
28627 0x11/imm32/alloc-id:fake
28628 Single-int-var-in-eax/imm32/outputs
28629 0x11/imm32/alloc-id:fake
28630 _string_35_xor_with_eax/imm32/subx-name
28631 0/imm32/no-rm32
28632 0/imm32/no-r32
28633 1/imm32/imm32-is-first-inout
28634 0/imm32/no-imm8
28635 0/imm32/no-disp32
28636 0/imm32/no-xm32
28637 0/imm32/no-x32
28638 0x11/imm32/alloc-id:fake
28639 _Primitive-xor-reg-with-reg/imm32/next
28640 _Primitive-xor-reg-with-reg:
28641 0x11/imm32/alloc-id:fake:payload
28642
28643 0x11/imm32/alloc-id:fake
28644 _string-xor/imm32/name
28645 0x11/imm32/alloc-id:fake
28646 Single-int-var-in-some-register/imm32/inouts
28647 0x11/imm32/alloc-id:fake
28648 Single-int-var-in-some-register/imm32/outputs
28649 0x11/imm32/alloc-id:fake
28650 _string_31_xor_with/imm32/subx-name
28651 3/imm32/rm32-is-first-output
28652 1/imm32/r32-is-first-inout
28653 0/imm32/no-imm32
28654 0/imm32/no-imm8
28655 0/imm32/no-disp32
28656 0/imm32/no-xm32
28657 0/imm32/no-x32
28658 0x11/imm32/alloc-id:fake
28659 _Primitive-xor-reg-with-mem/imm32/next
28660 _Primitive-xor-reg-with-mem:
28661 0x11/imm32/alloc-id:fake:payload
28662
28663 0x11/imm32/alloc-id:fake
28664 _string-xor-with/imm32/name
28665 0x11/imm32/alloc-id:fake
28666 Two-args-int-stack-int-reg/imm32/inouts
28667 0/imm32/no-outputs
28668 0/imm32/no-outputs
28669 0x11/imm32/alloc-id:fake
28670 _string_31_xor_with/imm32/subx-name
28671 1/imm32/rm32-is-first-inout
28672 2/imm32/r32-is-second-inout
28673 0/imm32/no-imm32
28674 0/imm32/no-imm8
28675 0/imm32/no-disp32
28676 0/imm32/no-xm32
28677 0/imm32/no-x32
28678 0x11/imm32/alloc-id:fake
28679 _Primitive-xor-mem-with-reg/imm32/next
28680 _Primitive-xor-mem-with-reg:
28681 0x11/imm32/alloc-id:fake:payload
28682
28683 0x11/imm32/alloc-id:fake
28684 _string-xor/imm32/name
28685 0x11/imm32/alloc-id:fake
28686 Single-int-var-in-mem/imm32/inouts
28687 0x11/imm32/alloc-id:fake
28688 Single-int-var-in-some-register/imm32/outputs
28689 0x11/imm32/alloc-id:fake
28690 _string_33_xor/imm32/subx-name
28691 1/imm32/rm32-is-first-inout
28692 3/imm32/r32-is-first-output
28693 0/imm32/no-imm32
28694 0/imm32/no-imm8
28695 0/imm32/no-disp32
28696 0/imm32/no-xm32
28697 0/imm32/no-x32
28698 0x11/imm32/alloc-id:fake
28699 _Primitive-xor-lit-with-reg/imm32/next
28700 _Primitive-xor-lit-with-reg:
28701 0x11/imm32/alloc-id:fake:payload
28702
28703 0x11/imm32/alloc-id:fake
28704 _string-xor/imm32/name
28705 0x11/imm32/alloc-id:fake
28706 Single-lit-var/imm32/inouts
28707 0x11/imm32/alloc-id:fake
28708 Single-int-var-in-some-register/imm32/outputs
28709 0x11/imm32/alloc-id:fake
28710 _string_81_subop_xor/imm32/subx-name
28711 3/imm32/rm32-is-first-output
28712 0/imm32/no-r32
28713 1/imm32/imm32-is-first-inout
28714 0/imm32/no-imm8
28715 0/imm32/no-disp32
28716 0/imm32/no-xm32
28717 0/imm32/no-x32
28718 0x11/imm32/alloc-id:fake
28719 _Primitive-xor-lit-with-mem/imm32/next
28720 _Primitive-xor-lit-with-mem:
28721 0x11/imm32/alloc-id:fake:payload
28722
28723 0x11/imm32/alloc-id:fake
28724 _string-xor-with/imm32/name
28725 0x11/imm32/alloc-id:fake
28726 Int-var-and-literal/imm32/inouts
28727 0/imm32/no-outputs
28728 0/imm32/no-outputs
28729 0x11/imm32/alloc-id:fake
28730 _string_81_subop_xor/imm32/subx-name
28731 1/imm32/rm32-is-first-inout
28732 0/imm32/no-r32
28733 2/imm32/imm32-is-second-inout
28734 0/imm32/no-imm8
28735 0/imm32/no-disp32
28736 0/imm32/no-xm32
28737 0/imm32/no-x32
28738 0x11/imm32/alloc-id:fake
28739 _Primitive-shift-reg-left-by-lit/imm32/next
28740 _Primitive-shift-reg-left-by-lit:
28741 0x11/imm32/alloc-id:fake:payload
28742
28743 0x11/imm32/alloc-id:fake
28744 _string-shift-left/imm32/name
28745 0x11/imm32/alloc-id:fake
28746 Single-lit-var/imm32/inouts
28747 0x11/imm32/alloc-id:fake
28748 Single-int-var-in-some-register/imm32/outputs
28749 0x11/imm32/alloc-id:fake
28750 _string_c1_subop_shift_left/imm32/subx-name
28751 3/imm32/rm32-is-first-output
28752 0/imm32/no-r32
28753 0/imm32/no-imm32
28754 1/imm32/imm8-is-first-inout
28755 0/imm32/no-disp32
28756 0/imm32/no-xm32
28757 0/imm32/no-x32
28758 0x11/imm32/alloc-id:fake
28759 _Primitive-shift-reg-right-by-lit/imm32/next
28760 _Primitive-shift-reg-right-by-lit:
28761 0x11/imm32/alloc-id:fake:payload
28762
28763 0x11/imm32/alloc-id:fake
28764 _string-shift-right/imm32/name
28765 0x11/imm32/alloc-id:fake
28766 Single-lit-var/imm32/inouts
28767 0x11/imm32/alloc-id:fake
28768 Single-int-var-in-some-register/imm32/outputs
28769 0x11/imm32/alloc-id:fake
28770 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
28771 3/imm32/rm32-is-first-output
28772 0/imm32/no-r32
28773 0/imm32/no-imm32
28774 1/imm32/imm8-is-first-inout
28775 0/imm32/no-disp32
28776 0/imm32/no-xm32
28777 0/imm32/no-x32
28778 0x11/imm32/alloc-id:fake
28779 _Primitive-shift-reg-right-signed-by-lit/imm32/next
28780 _Primitive-shift-reg-right-signed-by-lit:
28781 0x11/imm32/alloc-id:fake:payload
28782
28783 0x11/imm32/alloc-id:fake
28784 _string-shift-right-signed/imm32/name
28785 0x11/imm32/alloc-id:fake
28786 Single-lit-var/imm32/inouts
28787 0x11/imm32/alloc-id:fake
28788 Single-int-var-in-some-register/imm32/outputs
28789 0x11/imm32/alloc-id:fake
28790 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
28791 3/imm32/rm32-is-first-output
28792 0/imm32/no-r32
28793 0/imm32/no-imm32
28794 1/imm32/imm8-is-first-inout
28795 0/imm32/no-disp32
28796 0/imm32/no-xm32
28797 0/imm32/no-x32
28798 0x11/imm32/alloc-id:fake
28799 _Primitive-shift-mem-left-by-lit/imm32/next
28800 _Primitive-shift-mem-left-by-lit:
28801 0x11/imm32/alloc-id:fake:payload
28802
28803 0x11/imm32/alloc-id:fake
28804 _string-shift-left/imm32/name
28805 0x11/imm32/alloc-id:fake
28806 Int-var-and-literal/imm32/inouts
28807 0/imm32/no-outputs
28808 0/imm32/no-outputs
28809 0x11/imm32/alloc-id:fake
28810 _string_c1_subop_shift_left/imm32/subx-name
28811 1/imm32/rm32-is-first-inout
28812 0/imm32/no-r32
28813 0/imm32/no-imm32
28814 2/imm32/imm8-is-second-inout
28815 0/imm32/no-disp32
28816 0/imm32/no-xm32
28817 0/imm32/no-x32
28818 0x11/imm32/alloc-id:fake
28819 _Primitive-shift-mem-right-by-lit/imm32/next
28820 _Primitive-shift-mem-right-by-lit:
28821 0x11/imm32/alloc-id:fake:payload
28822
28823 0x11/imm32/alloc-id:fake
28824 _string-shift-right/imm32/name
28825 0x11/imm32/alloc-id:fake
28826 Int-var-and-literal/imm32/inouts
28827 0/imm32/no-outputs
28828 0/imm32/no-outputs
28829 0x11/imm32/alloc-id:fake
28830 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
28831 1/imm32/rm32-is-first-inout
28832 0/imm32/no-r32
28833 0/imm32/no-imm32
28834 2/imm32/imm8-is-second-inout
28835 0/imm32/no-disp32
28836 0/imm32/no-xm32
28837 0/imm32/no-x32
28838 0x11/imm32/alloc-id:fake
28839 _Primitive-shift-mem-right-signed-by-lit/imm32/next
28840 _Primitive-shift-mem-right-signed-by-lit:
28841 0x11/imm32/alloc-id:fake:payload
28842
28843 0x11/imm32/alloc-id:fake
28844 _string-shift-right-signed/imm32/name
28845 0x11/imm32/alloc-id:fake
28846 Int-var-and-literal/imm32/inouts
28847 0/imm32/no-outputs
28848 0/imm32/no-outputs
28849 0x11/imm32/alloc-id:fake
28850 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
28851 1/imm32/rm32-is-first-inout
28852 0/imm32/no-r32
28853 0/imm32/no-imm32
28854 2/imm32/imm8-is-second-inout
28855 0/imm32/no-disp32
28856 0/imm32/no-xm32
28857 0/imm32/no-x32
28858 0x11/imm32/alloc-id:fake
28859 _Primitive-copy-to-eax/imm32/next
28860
28861 _Primitive-copy-to-eax:
28862 0x11/imm32/alloc-id:fake:payload
28863
28864 0x11/imm32/alloc-id:fake
28865 _string-copy/imm32/name
28866 0x11/imm32/alloc-id:fake
28867 Single-lit-var/imm32/inouts
28868 0x11/imm32/alloc-id:fake
28869 Single-int-var-in-eax/imm32/outputs
28870 0x11/imm32/alloc-id:fake
28871 _string_b8_copy_to_eax/imm32/subx-name
28872 0/imm32/no-rm32
28873 0/imm32/no-r32
28874 1/imm32/imm32-is-first-inout
28875 0/imm32/no-imm8
28876 0/imm32/no-disp32
28877 0/imm32/no-xm32
28878 0/imm32/no-x32
28879 0x11/imm32/alloc-id:fake
28880 _Primitive-copy-to-ecx/imm32/next
28881 _Primitive-copy-to-ecx:
28882 0x11/imm32/alloc-id:fake:payload
28883
28884 0x11/imm32/alloc-id:fake
28885 _string-copy/imm32/name
28886 0x11/imm32/alloc-id:fake
28887 Single-lit-var/imm32/inouts
28888 0x11/imm32/alloc-id:fake
28889 Single-int-var-in-ecx/imm32/outputs
28890 0x11/imm32/alloc-id:fake
28891 _string_b9_copy_to_ecx/imm32/subx-name
28892 0/imm32/no-rm32
28893 0/imm32/no-r32
28894 1/imm32/imm32-is-first-inout
28895 0/imm32/no-imm8
28896 0/imm32/no-disp32
28897 0/imm32/no-xm32
28898 0/imm32/no-x32
28899 0x11/imm32/alloc-id:fake
28900 _Primitive-copy-to-edx/imm32/next
28901 _Primitive-copy-to-edx:
28902 0x11/imm32/alloc-id:fake:payload
28903
28904 0x11/imm32/alloc-id:fake
28905 _string-copy/imm32/name
28906 0x11/imm32/alloc-id:fake
28907 Single-lit-var/imm32/inouts
28908 0x11/imm32/alloc-id:fake
28909 Single-int-var-in-edx/imm32/outputs
28910 0x11/imm32/alloc-id:fake
28911 _string_ba_copy_to_edx/imm32/subx-name
28912 0/imm32/no-rm32
28913 0/imm32/no-r32
28914 1/imm32/imm32-is-first-inout
28915 0/imm32/no-imm8
28916 0/imm32/no-disp32
28917 0/imm32/no-xm32
28918 0/imm32/no-x32
28919 0x11/imm32/alloc-id:fake
28920 _Primitive-copy-to-ebx/imm32/next
28921 _Primitive-copy-to-ebx:
28922 0x11/imm32/alloc-id:fake:payload
28923
28924 0x11/imm32/alloc-id:fake
28925 _string-copy/imm32/name
28926 0x11/imm32/alloc-id:fake
28927 Single-lit-var/imm32/inouts
28928 0x11/imm32/alloc-id:fake
28929 Single-int-var-in-ebx/imm32/outputs
28930 0x11/imm32/alloc-id:fake
28931 _string_bb_copy_to_ebx/imm32/subx-name
28932 0/imm32/no-rm32
28933 0/imm32/no-r32
28934 1/imm32/imm32-is-first-inout
28935 0/imm32/no-imm8
28936 0/imm32/no-disp32
28937 0/imm32/no-xm32
28938 0/imm32/no-x32
28939 0x11/imm32/alloc-id:fake
28940 _Primitive-copy-to-esi/imm32/next
28941 _Primitive-copy-to-esi:
28942 0x11/imm32/alloc-id:fake:payload
28943
28944 0x11/imm32/alloc-id:fake
28945 _string-copy/imm32/name
28946 0x11/imm32/alloc-id:fake
28947 Single-lit-var/imm32/inouts
28948 0x11/imm32/alloc-id:fake
28949 Single-int-var-in-esi/imm32/outputs
28950 0x11/imm32/alloc-id:fake
28951 _string_be_copy_to_esi/imm32/subx-name
28952 0/imm32/no-rm32
28953 0/imm32/no-r32
28954 1/imm32/imm32-is-first-inout
28955 0/imm32/no-imm8
28956 0/imm32/no-disp32
28957 0/imm32/no-xm32
28958 0/imm32/no-x32
28959 0x11/imm32/alloc-id:fake
28960 _Primitive-copy-to-edi/imm32/next
28961 _Primitive-copy-to-edi:
28962 0x11/imm32/alloc-id:fake:payload
28963
28964 0x11/imm32/alloc-id:fake
28965 _string-copy/imm32/name
28966 0x11/imm32/alloc-id:fake
28967 Single-lit-var/imm32/inouts
28968 0x11/imm32/alloc-id:fake
28969 Single-int-var-in-edi/imm32/outputs
28970 0x11/imm32/alloc-id:fake
28971 _string_bf_copy_to_edi/imm32/subx-name
28972 0/imm32/no-rm32
28973 0/imm32/no-r32
28974 1/imm32/imm32-is-first-inout
28975 0/imm32/no-imm8
28976 0/imm32/no-disp32
28977 0/imm32/no-xm32
28978 0/imm32/no-x32
28979 0x11/imm32/alloc-id:fake
28980 _Primitive-copy-reg-to-reg/imm32/next
28981 _Primitive-copy-reg-to-reg:
28982 0x11/imm32/alloc-id:fake:payload
28983
28984 0x11/imm32/alloc-id:fake
28985 _string-copy/imm32/name
28986 0x11/imm32/alloc-id:fake
28987 Single-int-var-in-some-register/imm32/inouts
28988 0x11/imm32/alloc-id:fake
28989 Single-int-var-in-some-register/imm32/outputs
28990 0x11/imm32/alloc-id:fake
28991 _string_89_<-/imm32/subx-name
28992 3/imm32/rm32-is-first-output
28993 1/imm32/r32-is-first-inout
28994 0/imm32/no-imm32
28995 0/imm32/no-imm8
28996 0/imm32/no-disp32
28997 0/imm32/no-xm32
28998 0/imm32/no-x32
28999 0x11/imm32/alloc-id:fake
29000 _Primitive-copy-reg-to-mem/imm32/next
29001 _Primitive-copy-reg-to-mem:
29002 0x11/imm32/alloc-id:fake:payload
29003
29004 0x11/imm32/alloc-id:fake
29005 _string-copy-to/imm32/name
29006 0x11/imm32/alloc-id:fake
29007 Two-args-int-stack-int-reg/imm32/inouts
29008 0/imm32/no-outputs
29009 0/imm32/no-outputs
29010 0x11/imm32/alloc-id:fake
29011 _string_89_<-/imm32/subx-name
29012 1/imm32/rm32-is-first-inout
29013 2/imm32/r32-is-second-inout
29014 0/imm32/no-imm32
29015 0/imm32/no-imm8
29016 0/imm32/no-disp32
29017 0/imm32/no-xm32
29018 0/imm32/no-x32
29019 0x11/imm32/alloc-id:fake
29020 _Primitive-copy-mem-to-reg/imm32/next
29021 _Primitive-copy-mem-to-reg:
29022 0x11/imm32/alloc-id:fake:payload
29023
29024 0x11/imm32/alloc-id:fake
29025 _string-copy/imm32/name
29026 0x11/imm32/alloc-id:fake
29027 Single-int-var-in-mem/imm32/inouts
29028 0x11/imm32/alloc-id:fake
29029 Single-int-var-in-some-register/imm32/outputs
29030 0x11/imm32/alloc-id:fake
29031 _string_8b_->/imm32/subx-name
29032 1/imm32/rm32-is-first-inout
29033 3/imm32/r32-is-first-output
29034 0/imm32/no-imm32
29035 0/imm32/no-imm8
29036 0/imm32/no-disp32
29037 0/imm32/no-xm32
29038 0/imm32/no-x32
29039 0x11/imm32/alloc-id:fake
29040 _Primitive-copy-lit-to-reg/imm32/next
29041 _Primitive-copy-lit-to-reg:
29042 0x11/imm32/alloc-id:fake:payload
29043
29044 0x11/imm32/alloc-id:fake
29045 _string-copy/imm32/name
29046 0x11/imm32/alloc-id:fake
29047 Single-lit-var/imm32/inouts
29048 0x11/imm32/alloc-id:fake
29049 Single-int-var-in-some-register/imm32/outputs
29050 0x11/imm32/alloc-id:fake
29051 _string_c7_subop_copy/imm32/subx-name
29052 3/imm32/rm32-is-first-output
29053 0/imm32/no-r32
29054 1/imm32/imm32-is-first-inout
29055 0/imm32/no-imm8
29056 0/imm32/no-disp32
29057 0/imm32/no-xm32
29058 0/imm32/no-x32
29059 0x11/imm32/alloc-id:fake
29060 _Primitive-copy-lit-to-mem/imm32/next
29061 _Primitive-copy-lit-to-mem:
29062 0x11/imm32/alloc-id:fake:payload
29063
29064 0x11/imm32/alloc-id:fake
29065 _string-copy-to/imm32/name
29066 0x11/imm32/alloc-id:fake
29067 Int-var-and-literal/imm32/inouts
29068 0/imm32/no-outputs
29069 0/imm32/no-outputs
29070 0x11/imm32/alloc-id:fake
29071 _string_c7_subop_copy/imm32/subx-name
29072 1/imm32/rm32-is-first-inout
29073 0/imm32/no-r32
29074 2/imm32/imm32-is-second-inout
29075 0/imm32/no-imm8
29076 0/imm32/no-disp32
29077 0/imm32/no-xm32
29078 0/imm32/no-x32
29079 0x11/imm32/alloc-id:fake
29080 _Primitive-copy-byte-from-reg/imm32/next
29081
29082 _Primitive-copy-byte-from-reg:
29083 0x11/imm32/alloc-id:fake:payload
29084
29085 0x11/imm32/alloc-id:fake
29086 _string-copy-byte/imm32/name
29087 0x11/imm32/alloc-id:fake
29088 Single-byte-var-in-some-register/imm32/inouts
29089 0x11/imm32/alloc-id:fake
29090 Single-byte-var-in-some-register/imm32/outputs
29091 0x11/imm32/alloc-id:fake
29092 _string_8a_copy_byte/imm32/subx-name
29093 1/imm32/rm32-is-first-inout
29094 3/imm32/r32-is-first-output
29095 0/imm32/no-imm32
29096 0/imm32/no-imm8
29097 0/imm32/no-disp32
29098 0/imm32/no-xm32
29099 0/imm32/no-x32
29100 0x11/imm32/alloc-id:fake
29101 _Primitive-copy-byte-from-mem/imm32/next
29102 _Primitive-copy-byte-from-mem:
29103 0x11/imm32/alloc-id:fake:payload
29104
29105 0x11/imm32/alloc-id:fake
29106 _string-copy-byte/imm32/name
29107 0x11/imm32/alloc-id:fake
29108 Single-byte-var-in-mem/imm32/inouts
29109 0x11/imm32/alloc-id:fake
29110 Single-byte-var-in-some-register/imm32/outputs
29111 0x11/imm32/alloc-id:fake
29112 _string_8a_copy_byte/imm32/subx-name
29113 1/imm32/rm32-is-first-inout
29114 3/imm32/r32-is-first-output
29115 0/imm32/no-imm32
29116 0/imm32/no-imm8
29117 0/imm32/no-disp32
29118 0/imm32/no-xm32
29119 0/imm32/no-x32
29120 0x11/imm32/alloc-id:fake
29121 _Primitive-copy-byte-to-mem/imm32/next
29122 _Primitive-copy-byte-to-mem:
29123 0x11/imm32/alloc-id:fake:payload
29124
29125 0x11/imm32/alloc-id:fake
29126 _string-copy-byte-to/imm32/name
29127 0x11/imm32/alloc-id:fake
29128 Two-args-byte-stack-byte-reg/imm32/inouts
29129 0/imm32/no-outputs
29130 0/imm32/no-outputs
29131 0x11/imm32/alloc-id:fake
29132 _string_88_copy_byte/imm32/subx-name
29133 1/imm32/rm32-is-first-inout
29134 2/imm32/r32-is-second-inout
29135 0/imm32/no-imm32
29136 0/imm32/no-imm8
29137 0/imm32/no-disp32
29138 0/imm32/no-xm32
29139 0/imm32/no-x32
29140 0x11/imm32/alloc-id:fake
29141 _Primitive-address/imm32/next
29142
29143 _Primitive-address:
29144 0x11/imm32/alloc-id:fake:payload
29145
29146 0x11/imm32/alloc-id:fake
29147 _string-address/imm32/name
29148 0x11/imm32/alloc-id:fake
29149 Single-int-var-in-mem/imm32/inouts
29150 0x11/imm32/alloc-id:fake
29151 Single-addr-var-in-some-register/imm32/outputs
29152 0x11/imm32/alloc-id:fake
29153 _string_8d_copy_address/imm32/subx-name
29154 1/imm32/rm32-is-first-inout
29155 3/imm32/r32-is-first-output
29156 0/imm32/no-imm32
29157 0/imm32/no-imm8
29158 0/imm32/no-disp32
29159 0/imm32/no-xm32
29160 0/imm32/no-x32
29161 0x11/imm32/alloc-id:fake
29162 _Primitive-compare-reg-with-reg/imm32/next
29163
29164 _Primitive-compare-reg-with-reg:
29165 0x11/imm32/alloc-id:fake:payload
29166
29167 0x11/imm32/alloc-id:fake
29168 _string-compare/imm32/name
29169 0x11/imm32/alloc-id:fake
29170 Two-int-args-in-regs/imm32/inouts
29171 0/imm32/no-outputs
29172 0/imm32/no-outputs
29173 0x11/imm32/alloc-id:fake
29174 _string_39_compare->/imm32/subx-name
29175 1/imm32/rm32-is-first-inout
29176 2/imm32/r32-is-second-inout
29177 0/imm32/no-imm32
29178 0/imm32/no-imm8
29179 0/imm32/no-disp32
29180 0/imm32/no-xm32
29181 0/imm32/no-x32
29182 0x11/imm32/alloc-id:fake
29183 _Primitive-compare-mem-with-reg/imm32/next
29184 _Primitive-compare-mem-with-reg:
29185 0x11/imm32/alloc-id:fake:payload
29186
29187 0x11/imm32/alloc-id:fake
29188 _string-compare/imm32/name
29189 0x11/imm32/alloc-id:fake
29190 Two-args-int-stack-int-reg/imm32/inouts
29191 0/imm32/no-outputs
29192 0/imm32/no-outputs
29193 0x11/imm32/alloc-id:fake
29194 _string_39_compare->/imm32/subx-name
29195 1/imm32/rm32-is-first-inout
29196 2/imm32/r32-is-second-inout
29197 0/imm32/no-imm32
29198 0/imm32/no-imm8
29199 0/imm32/no-disp32
29200 0/imm32/no-xm32
29201 0/imm32/no-x32
29202 0x11/imm32/alloc-id:fake
29203 _Primitive-compare-reg-with-mem/imm32/next
29204 _Primitive-compare-reg-with-mem:
29205 0x11/imm32/alloc-id:fake:payload
29206
29207 0x11/imm32/alloc-id:fake
29208 _string-compare/imm32/name
29209 0x11/imm32/alloc-id:fake
29210 Two-args-int-reg-int-stack/imm32/inouts
29211 0/imm32/no-outputs
29212 0/imm32/no-outputs
29213 0x11/imm32/alloc-id:fake
29214 _string_3b_compare<-/imm32/subx-name
29215 2/imm32/rm32-is-second-inout
29216 1/imm32/r32-is-first-inout
29217 0/imm32/no-imm32
29218 0/imm32/no-imm8
29219 0/imm32/no-disp32
29220 0/imm32/no-xm32
29221 0/imm32/no-x32
29222 0x11/imm32/alloc-id:fake
29223 _Primitive-compare-eax-with-literal/imm32/next
29224 _Primitive-compare-eax-with-literal:
29225 0x11/imm32/alloc-id:fake:payload
29226
29227 0x11/imm32/alloc-id:fake
29228 _string-compare/imm32/name
29229 0x11/imm32/alloc-id:fake
29230 Two-args-int-eax-int-literal/imm32/inouts
29231 0/imm32/no-outputs
29232 0/imm32/no-outputs
29233 0x11/imm32/alloc-id:fake
29234 _string_3d_compare_eax_with/imm32/subx-name
29235 0/imm32/no-rm32
29236 0/imm32/no-r32
29237 2/imm32/imm32-is-second-inout
29238 0/imm32/no-imm8
29239 0/imm32/no-disp32
29240 0/imm32/no-xm32
29241 0/imm32/no-x32
29242 0x11/imm32/alloc-id:fake
29243 _Primitive-compare-reg-with-literal/imm32/next
29244 _Primitive-compare-reg-with-literal:
29245 0x11/imm32/alloc-id:fake:payload
29246
29247 0x11/imm32/alloc-id:fake
29248 _string-compare/imm32/name
29249 0x11/imm32/alloc-id:fake
29250 Int-var-in-register-and-literal/imm32/inouts
29251 0/imm32/no-outputs
29252 0/imm32/no-outputs
29253 0x11/imm32/alloc-id:fake
29254 _string_81_subop_compare/imm32/subx-name
29255 1/imm32/rm32-is-first-inout
29256 0/imm32/no-r32
29257 2/imm32/imm32-is-second-inout
29258 0/imm32/no-imm8
29259 0/imm32/no-disp32
29260 0/imm32/no-xm32
29261 0/imm32/no-x32
29262 0x11/imm32/alloc-id:fake
29263 _Primitive-compare-mem-with-literal/imm32/next
29264 _Primitive-compare-mem-with-literal:
29265 0x11/imm32/alloc-id:fake:payload
29266
29267 0x11/imm32/alloc-id:fake
29268 _string-compare/imm32/name
29269 0x11/imm32/alloc-id:fake
29270 Int-var-and-literal/imm32/inouts
29271 0/imm32/no-outputs
29272 0/imm32/no-outputs
29273 0x11/imm32/alloc-id:fake
29274 _string_81_subop_compare/imm32/subx-name
29275 1/imm32/rm32-is-first-inout
29276 0/imm32/no-r32
29277 2/imm32/imm32-is-second-inout
29278 0/imm32/no-imm8
29279 0/imm32/no-disp32
29280 0/imm32/no-xm32
29281 0/imm32/no-x32
29282 0x11/imm32/alloc-id:fake
29283 _Primitive-negate-reg/imm32/next
29284
29285 _Primitive-negate-reg:
29286 0x11/imm32/alloc-id:fake:payload
29287
29288 0x11/imm32/alloc-id:fake
29289 _string-negate/imm32/name
29290 0/imm32/no-inouts
29291 0/imm32/no-inouts
29292 0x11/imm32/alloc-id:fake
29293 Single-int-var-in-some-register/imm32/outputs
29294 0x11/imm32/alloc-id:fake
29295 _string_f7_subop_negate/imm32/subx-name
29296 3/imm32/rm32-is-first-output
29297 0/imm32/no-r32
29298 0/imm32/no-imm32
29299 0/imm32/no-imm8
29300 0/imm32/no-disp32
29301 0/imm32/no-xm32
29302 0/imm32/no-x32
29303 0x11/imm32/alloc-id:fake
29304 _Primitive-negate-mem/imm32/next
29305 _Primitive-negate-mem:
29306 0x11/imm32/alloc-id:fake:payload
29307
29308 0x11/imm32/alloc-id:fake
29309 _string-negate/imm32/name
29310 0x11/imm32/alloc-id:fake
29311 Single-int-var-in-mem/imm32/inouts
29312 0/imm32/no-outputs
29313 0/imm32/no-outputs
29314 0x11/imm32/alloc-id:fake
29315 _string_f7_subop_negate/imm32/subx-name
29316 1/imm32/rm32-is-first-inout
29317 0/imm32/no-r32
29318 0/imm32/no-imm32
29319 0/imm32/no-imm8
29320 0/imm32/no-disp32
29321 0/imm32/no-xm32
29322 0/imm32/no-x32
29323 0x11/imm32/alloc-id:fake
29324 _Primitive-multiply-reg-by-reg/imm32/next
29325
29326 _Primitive-multiply-reg-by-reg:
29327 0x11/imm32/alloc-id:fake:payload
29328
29329 0x11/imm32/alloc-id:fake
29330 _string-multiply/imm32/name
29331 0x11/imm32/alloc-id:fake
29332 Single-int-var-in-some-register/imm32/inouts
29333 0x11/imm32/alloc-id:fake
29334 Single-int-var-in-some-register/imm32/outputs
29335 0x11/imm32/alloc-id:fake
29336 _string_0f_af_multiply/imm32/subx-name
29337 1/imm32/rm32-is-first-inout
29338 3/imm32/r32-is-first-output
29339 0/imm32/no-imm32
29340 0/imm32/no-imm8
29341 0/imm32/no-disp32
29342 0/imm32/no-xm32
29343 0/imm32/no-x32
29344 0x11/imm32/alloc-id:fake
29345 _Primitive-multiply-reg-by-mem/imm32/next
29346 _Primitive-multiply-reg-by-mem:
29347 0x11/imm32/alloc-id:fake:payload
29348
29349 0x11/imm32/alloc-id:fake
29350 _string-multiply/imm32/name
29351 0x11/imm32/alloc-id:fake
29352 Single-int-var-in-mem/imm32/inouts
29353 0x11/imm32/alloc-id:fake
29354 Single-int-var-in-some-register/imm32/outputs
29355 0x11/imm32/alloc-id:fake
29356 _string_0f_af_multiply/imm32/subx-name
29357 1/imm32/rm32-is-first-inout
29358 3/imm32/r32-is-first-output
29359 0/imm32/no-imm32
29360 0/imm32/no-imm8
29361 0/imm32/no-disp32
29362 0/imm32/no-xm32
29363 0/imm32/no-x32
29364 0x11/imm32/alloc-id:fake
29365 _Primitive-convert-mem-to-xreg/imm32/next
29366
29367 _Primitive-convert-mem-to-xreg:
29368 0x11/imm32/alloc-id:fake:payload
29369
29370 0x11/imm32/alloc-id:fake
29371 _string-convert/imm32/name
29372 0x11/imm32/alloc-id:fake
29373 Single-int-var-in-mem/imm32/inouts
29374 0x11/imm32/alloc-id:fake
29375 Single-float-var-in-some-register/imm32/outputs
29376 0x11/imm32/alloc-id:fake
29377 _string_f3_0f_2a_convert_to_float/imm32/subx-name
29378 1/imm32/rm32-is-first-inout
29379 0/imm32/no-r32
29380 0/imm32/no-imm32
29381 0/imm32/no-imm8
29382 0/imm32/no-disp32
29383 0/imm32/no-xm32
29384 3/imm32/x32-is-first-output
29385 0x11/imm32/alloc-id:fake
29386 _Primitive-convert-reg-to-xreg/imm32/next
29387 _Primitive-convert-reg-to-xreg:
29388 0x11/imm32/alloc-id:fake:payload
29389
29390 0x11/imm32/alloc-id:fake
29391 _string-convert/imm32/name
29392 0x11/imm32/alloc-id:fake
29393 Single-int-var-in-some-register/imm32/inouts
29394 0x11/imm32/alloc-id:fake
29395 Single-float-var-in-some-register/imm32/outputs
29396 0x11/imm32/alloc-id:fake
29397 _string_f3_0f_2a_convert_to_float/imm32/subx-name
29398 1/imm32/rm32-is-first-inout
29399 0/imm32/no-r32
29400 0/imm32/no-imm32
29401 0/imm32/no-imm8
29402 0/imm32/no-disp32
29403 0/imm32/no-xm32
29404 3/imm32/x32-is-first-output
29405 0x11/imm32/alloc-id:fake
29406 _Primitive-convert-xmem-to-reg/imm32/next
29407
29408 _Primitive-convert-xmem-to-reg:
29409 0x11/imm32/alloc-id:fake:payload
29410
29411 0x11/imm32/alloc-id:fake
29412 _string-convert/imm32/name
29413 0x11/imm32/alloc-id:fake
29414 Single-float-var-in-mem/imm32/inouts
29415 0x11/imm32/alloc-id:fake
29416 Single-int-var-in-some-register/imm32/outputs
29417 0x11/imm32/alloc-id:fake
29418 _string_f3_0f_2d_convert_to_int/imm32/subx-name
29419 0/imm32/no-rm32
29420 3/imm32/r32-is-first-output
29421 0/imm32/no-imm32
29422 0/imm32/no-imm8
29423 0/imm32/no-disp32
29424 1/imm32/xm32-is-first-inout
29425 0/imm32/no-x32
29426 0x11/imm32/alloc-id:fake
29427 _Primitive-convert-xreg-to-reg/imm32/next
29428 _Primitive-convert-xreg-to-reg:
29429 0x11/imm32/alloc-id:fake:payload
29430
29431 0x11/imm32/alloc-id:fake
29432 _string-convert/imm32/name
29433 0x11/imm32/alloc-id:fake
29434 Single-float-var-in-some-register/imm32/inouts
29435 0x11/imm32/alloc-id:fake
29436 Single-int-var-in-some-register/imm32/outputs
29437 0x11/imm32/alloc-id:fake
29438 _string_f3_0f_2d_convert_to_int/imm32/subx-name
29439 0/imm32/no-rm32
29440 3/imm32/r32-is-first-output
29441 0/imm32/no-imm32
29442 0/imm32/no-imm8
29443 0/imm32/no-disp32
29444 1/imm32/xm32-is-first-inout
29445 0/imm32/no-x32
29446 0x11/imm32/alloc-id:fake
29447 _Primitive-truncate-xmem-to-reg/imm32/next
29448 _Primitive-truncate-xmem-to-reg:
29449 0x11/imm32/alloc-id:fake:payload
29450
29451 0x11/imm32/alloc-id:fake
29452 _string-truncate/imm32/name
29453 0x11/imm32/alloc-id:fake
29454 Single-float-var-in-mem/imm32/inouts
29455 0x11/imm32/alloc-id:fake
29456 Single-int-var-in-some-register/imm32/outputs
29457 0x11/imm32/alloc-id:fake
29458 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
29459 0/imm32/no-rm32
29460 3/imm32/r32-is-first-output
29461 0/imm32/no-imm32
29462 0/imm32/no-imm8
29463 0/imm32/no-disp32
29464 1/imm32/xm32-is-first-inout
29465 0/imm32/no-x32
29466 0x11/imm32/alloc-id:fake
29467 _Primitive-truncate-xreg-to-reg/imm32/next
29468 _Primitive-truncate-xreg-to-reg:
29469 0x11/imm32/alloc-id:fake:payload
29470
29471 0x11/imm32/alloc-id:fake
29472 _string-truncate/imm32/name
29473 0x11/imm32/alloc-id:fake
29474 Single-float-var-in-some-register/imm32/inouts
29475 0x11/imm32/alloc-id:fake
29476 Single-int-var-in-some-register/imm32/outputs
29477 0x11/imm32/alloc-id:fake
29478 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
29479 0/imm32/no-rm32
29480 3/imm32/r32-is-first-output
29481 0/imm32/no-imm32
29482 0/imm32/no-imm8
29483 0/imm32/no-disp32
29484 1/imm32/xm32-is-first-inout
29485 0/imm32/no-x32
29486 0x11/imm32/alloc-id:fake
29487 _Primitive-reinterpret-xmem-as-reg/imm32/next
29488
29489 _Primitive-reinterpret-xmem-as-reg:
29490 0x11/imm32/alloc-id:fake:payload
29491
29492 0x11/imm32/alloc-id:fake
29493 _string-reinterpret/imm32/name
29494 0x11/imm32/alloc-id:fake
29495 Single-float-var-in-mem/imm32/inouts
29496 0x11/imm32/alloc-id:fake
29497 Single-int-var-in-some-register/imm32/outputs
29498 0x11/imm32/alloc-id:fake
29499 _string_8b_->/imm32/subx-name
29500 0/imm32/no-rm32
29501 3/imm32/r32-is-first-output
29502 0/imm32/no-imm32
29503 0/imm32/no-imm8
29504 0/imm32/no-disp32
29505 1/imm32/xm32-is-first-inout
29506 0/imm32/no-x32
29507 0x11/imm32/alloc-id:fake
29508 _Primitive-reinterpret-mem-as-xreg/imm32/next
29509 _Primitive-reinterpret-mem-as-xreg:
29510 0x11/imm32/alloc-id:fake:payload
29511
29512 0x11/imm32/alloc-id:fake
29513 _string-reinterpret/imm32/name
29514 0x11/imm32/alloc-id:fake
29515 Single-int-var-in-mem/imm32/inouts
29516 0x11/imm32/alloc-id:fake
29517 Single-float-var-in-some-register/imm32/outputs
29518 0x11/imm32/alloc-id:fake
29519 _string_f3_0f_10_copy/imm32/subx-name
29520 1/imm32/rm32-is-first-inout
29521 0/imm32/no-r32
29522 0/imm32/no-imm32
29523 0/imm32/no-imm8
29524 0/imm32/no-disp32
29525 0/imm32/no-xm32
29526 3/imm32/x32-is-first-output
29527 0x11/imm32/alloc-id:fake
29528 _Primitive-copy-xreg-to-xreg/imm32/next
29529
29530 _Primitive-copy-xreg-to-xreg:
29531 0x11/imm32/alloc-id:fake:payload
29532
29533 0x11/imm32/alloc-id:fake
29534 _string-copy/imm32/name
29535 0x11/imm32/alloc-id:fake
29536 Single-float-var-in-some-register/imm32/inouts
29537 0x11/imm32/alloc-id:fake
29538 Single-float-var-in-some-register/imm32/outputs
29539 0x11/imm32/alloc-id:fake
29540 _string_f3_0f_11_copy/imm32/subx-name
29541 0/imm32/no-rm32
29542 0/imm32/no-r32
29543 0/imm32/no-imm32
29544 0/imm32/no-imm8
29545 0/imm32/no-disp32
29546 3/imm32/xm32-is-first-output
29547 1/imm32/x32-is-first-inout
29548 0x11/imm32/alloc-id:fake
29549 _Primitive-copy-xreg-to-mem/imm32/next
29550 _Primitive-copy-xreg-to-mem:
29551 0x11/imm32/alloc-id:fake:payload
29552
29553 0x11/imm32/alloc-id:fake
29554 _string-copy-to/imm32/name
29555 0x11/imm32/alloc-id:fake
29556 Two-args-float-stack-float-reg/imm32/inouts
29557 0/imm32/no-outputs
29558 0/imm32/no-outputs
29559 0x11/imm32/alloc-id:fake
29560 _string_f3_0f_11_copy/imm32/subx-name
29561 0/imm32/no-rm32
29562 0/imm32/no-r32
29563 0/imm32/no-imm32
29564 0/imm32/no-imm8
29565 0/imm32/no-disp32
29566 1/imm32/xm32-is-first-inout
29567 2/imm32/x32-is-second-inout
29568 0x11/imm32/alloc-id:fake
29569 _Primitive-copy-mem-to-xreg/imm32/next
29570 _Primitive-copy-mem-to-xreg:
29571 0x11/imm32/alloc-id:fake:payload
29572
29573 0x11/imm32/alloc-id:fake
29574 _string-copy/imm32/name
29575 0x11/imm32/alloc-id:fake
29576 Single-float-var-in-mem/imm32/inouts
29577 0x11/imm32/alloc-id:fake
29578 Single-float-var-in-some-register/imm32/outputs
29579 0x11/imm32/alloc-id:fake
29580 _string_f3_0f_10_copy/imm32/subx-name
29581 0/imm32/no-rm32
29582 0/imm32/no-r32
29583 0/imm32/no-imm32
29584 0/imm32/no-imm8
29585 0/imm32/no-disp32
29586 1/imm32/xm32-is-first-inout
29587 3/imm32/x32-is-first-output
29588 0x11/imm32/alloc-id:fake
29589 _Primitive-address-of-xmem/imm32/next
29590
29591 _Primitive-address-of-xmem:
29592 0x11/imm32/alloc-id:fake:payload
29593
29594 0x11/imm32/alloc-id:fake
29595 _string-address/imm32/name
29596 0x11/imm32/alloc-id:fake
29597 Single-float-var-in-mem/imm32/inouts
29598 0x11/imm32/alloc-id:fake
29599 Single-addr-var-in-some-register/imm32/outputs
29600 0x11/imm32/alloc-id:fake
29601 _string_8d_copy_address/imm32/subx-name
29602 1/imm32/rm32-is-first-inout
29603 3/imm32/r32-is-first-output
29604 0/imm32/no-imm32
29605 0/imm32/no-imm8
29606 0/imm32/no-disp32
29607 0/imm32/no-xm32
29608 0/imm32/no-x32
29609 0x11/imm32/alloc-id:fake
29610 _Primitive-add-xreg-to-xreg/imm32/next
29611
29612 _Primitive-add-xreg-to-xreg:
29613 0x11/imm32/alloc-id:fake:payload
29614
29615 0x11/imm32/alloc-id:fake
29616 _string-add/imm32/name
29617 0x11/imm32/alloc-id:fake
29618 Single-float-var-in-some-register/imm32/inouts
29619 0x11/imm32/alloc-id:fake
29620 Single-float-var-in-some-register/imm32/outputs
29621 0x11/imm32/alloc-id:fake
29622 _string_f3_0f_58_add/imm32/subx-name
29623 0/imm32/no-rm32
29624 0/imm32/no-r32
29625 0/imm32/no-imm32
29626 0/imm32/no-imm8
29627 0/imm32/no-disp32
29628 1/imm32/xm32-is-first-inout
29629 3/imm32/x32-is-first-output
29630 0x11/imm32/alloc-id:fake
29631 _Primitive-add-mem-to-xreg/imm32/next
29632 _Primitive-add-mem-to-xreg:
29633 0x11/imm32/alloc-id:fake:payload
29634
29635 0x11/imm32/alloc-id:fake
29636 _string-add/imm32/name
29637 0x11/imm32/alloc-id:fake
29638 Single-float-var-in-mem/imm32/inouts
29639 0x11/imm32/alloc-id:fake
29640 Single-float-var-in-some-register/imm32/outputs
29641 0x11/imm32/alloc-id:fake
29642 _string_f3_0f_58_add/imm32/subx-name
29643 0/imm32/no-rm32
29644 0/imm32/no-r32
29645 0/imm32/no-imm32
29646 0/imm32/no-imm8
29647 0/imm32/no-disp32
29648 1/imm32/xm32-is-first-inout
29649 3/imm32/x32-is-first-output
29650 0x11/imm32/alloc-id:fake
29651 _Primitive-subtract-xreg-from-xreg/imm32/next
29652
29653 _Primitive-subtract-xreg-from-xreg:
29654 0x11/imm32/alloc-id:fake:payload
29655
29656 0x11/imm32/alloc-id:fake
29657 _string-subtract/imm32/name
29658 0x11/imm32/alloc-id:fake
29659 Single-float-var-in-some-register/imm32/inouts
29660 0x11/imm32/alloc-id:fake
29661 Single-float-var-in-some-register/imm32/outputs
29662 0x11/imm32/alloc-id:fake
29663 _string_f3_0f_5c_subtract/imm32/subx-name
29664 0/imm32/no-rm32
29665 0/imm32/no-r32
29666 0/imm32/no-imm32
29667 0/imm32/no-imm8
29668 0/imm32/no-disp32
29669 1/imm32/xm32-is-first-inout
29670 3/imm32/x32-is-first-output
29671 0x11/imm32/alloc-id:fake
29672 _Primitive-subtract-mem-from-xreg/imm32/next
29673 _Primitive-subtract-mem-from-xreg:
29674 0x11/imm32/alloc-id:fake:payload
29675
29676 0x11/imm32/alloc-id:fake
29677 _string-subtract/imm32/name
29678 0x11/imm32/alloc-id:fake
29679 Single-float-var-in-mem/imm32/inouts
29680 0x11/imm32/alloc-id:fake
29681 Single-float-var-in-some-register/imm32/outputs
29682 0x11/imm32/alloc-id:fake
29683 _string_f3_0f_5c_subtract/imm32/subx-name
29684 0/imm32/no-rm32
29685 0/imm32/no-r32
29686 0/imm32/no-imm32
29687 0/imm32/no-imm8
29688 0/imm32/no-disp32
29689 1/imm32/xm32-is-first-inout
29690 3/imm32/x32-is-first-output
29691 0x11/imm32/alloc-id:fake
29692 _Primitive-multiply-xreg-by-xreg/imm32/next
29693
29694 _Primitive-multiply-xreg-by-xreg:
29695 0x11/imm32/alloc-id:fake:payload
29696
29697 0x11/imm32/alloc-id:fake
29698 _string-multiply/imm32/name
29699 0x11/imm32/alloc-id:fake
29700 Single-float-var-in-some-register/imm32/inouts
29701 0x11/imm32/alloc-id:fake
29702 Single-float-var-in-some-register/imm32/outputs
29703 0x11/imm32/alloc-id:fake
29704 _string_f3_0f_59_multiply/imm32/subx-name
29705 0/imm32/no-rm32
29706 0/imm32/no-r32
29707 0/imm32/no-imm32
29708 0/imm32/no-imm8
29709 0/imm32/no-disp32
29710 1/imm32/xm32-is-first-inout
29711 3/imm32/x32-is-first-output
29712 0x11/imm32/alloc-id:fake
29713 _Primitive-multiply-xreg-by-mem/imm32/next
29714 _Primitive-multiply-xreg-by-mem:
29715 0x11/imm32/alloc-id:fake:payload
29716
29717 0x11/imm32/alloc-id:fake
29718 _string-multiply/imm32/name
29719 0x11/imm32/alloc-id:fake
29720 Single-float-var-in-mem/imm32/inouts
29721 0x11/imm32/alloc-id:fake
29722 Single-float-var-in-some-register/imm32/outputs
29723 0x11/imm32/alloc-id:fake
29724 _string_f3_0f_59_multiply/imm32/subx-name
29725 0/imm32/no-rm32
29726 0/imm32/no-r32
29727 0/imm32/no-imm32
29728 0/imm32/no-imm8
29729 0/imm32/no-disp32
29730 1/imm32/xm32-is-first-inout
29731 3/imm32/x32-is-first-output
29732 0x11/imm32/alloc-id:fake
29733 _Primitive-divide-xreg-by-xreg/imm32/next
29734
29735 _Primitive-divide-xreg-by-xreg:
29736 0x11/imm32/alloc-id:fake:payload
29737
29738 0x11/imm32/alloc-id:fake
29739 _string-divide/imm32/name
29740 0x11/imm32/alloc-id:fake
29741 Single-float-var-in-some-register/imm32/inouts
29742 0x11/imm32/alloc-id:fake
29743 Single-float-var-in-some-register/imm32/outputs
29744 0x11/imm32/alloc-id:fake
29745 _string_f3_0f_5e_divide/imm32/subx-name
29746 0/imm32/no-rm32
29747 0/imm32/no-r32
29748 0/imm32/no-imm32
29749 0/imm32/no-imm8
29750 0/imm32/no-disp32
29751 1/imm32/xm32-is-first-inout
29752 3/imm32/x32-is-first-output
29753 0x11/imm32/alloc-id:fake
29754 _Primitive-divide-xreg-by-mem/imm32/next
29755 _Primitive-divide-xreg-by-mem:
29756 0x11/imm32/alloc-id:fake:payload
29757
29758 0x11/imm32/alloc-id:fake
29759 _string-divide/imm32/name
29760 0x11/imm32/alloc-id:fake
29761 Single-float-var-in-mem/imm32/inouts
29762 0x11/imm32/alloc-id:fake
29763 Single-float-var-in-some-register/imm32/outputs
29764 0x11/imm32/alloc-id:fake
29765 _string_f3_0f_5e_divide/imm32/subx-name
29766 0/imm32/no-rm32
29767 0/imm32/no-r32
29768 0/imm32/no-imm32
29769 0/imm32/no-imm8
29770 0/imm32/no-disp32
29771 1/imm32/xm32-is-first-inout
29772 3/imm32/x32-is-first-output
29773 0x11/imm32/alloc-id:fake
29774 _Primitive-max-xreg-with-xreg/imm32/next
29775
29776 _Primitive-max-xreg-with-xreg:
29777 0x11/imm32/alloc-id:fake:payload
29778
29779 0x11/imm32/alloc-id:fake
29780 _string-max/imm32/name
29781 0x11/imm32/alloc-id:fake
29782 Single-float-var-in-some-register/imm32/inouts
29783 0x11/imm32/alloc-id:fake
29784 Single-float-var-in-some-register/imm32/outputs
29785 0x11/imm32/alloc-id:fake
29786 _string_f3_0f_5f_max/imm32/subx-name
29787 0/imm32/no-rm32
29788 0/imm32/no-r32
29789 0/imm32/no-imm32
29790 0/imm32/no-imm8
29791 0/imm32/no-disp32
29792 1/imm32/xm32-is-first-inout
29793 3/imm32/x32-is-first-output
29794 0x11/imm32/alloc-id:fake
29795 _Primitive-max-xreg-with-mem/imm32/next
29796 _Primitive-max-xreg-with-mem:
29797 0x11/imm32/alloc-id:fake:payload
29798
29799 0x11/imm32/alloc-id:fake
29800 _string-max/imm32/name
29801 0x11/imm32/alloc-id:fake
29802 Single-float-var-in-mem/imm32/inouts
29803 0x11/imm32/alloc-id:fake
29804 Single-float-var-in-some-register/imm32/outputs
29805 0x11/imm32/alloc-id:fake
29806 _string_f3_0f_5f_max/imm32/subx-name
29807 0/imm32/no-rm32
29808 0/imm32/no-r32
29809 0/imm32/no-imm32
29810 0/imm32/no-imm8
29811 0/imm32/no-disp32
29812 1/imm32/xm32-is-first-inout
29813 3/imm32/x32-is-first-output
29814 0x11/imm32/alloc-id:fake
29815 _Primitive-min-xreg-with-xreg/imm32/next
29816
29817 _Primitive-min-xreg-with-xreg:
29818 0x11/imm32/alloc-id:fake:payload
29819
29820 0x11/imm32/alloc-id:fake
29821 _string-min/imm32/name
29822 0x11/imm32/alloc-id:fake
29823 Single-float-var-in-some-register/imm32/inouts
29824 0x11/imm32/alloc-id:fake
29825 Single-float-var-in-some-register/imm32/outputs
29826 0x11/imm32/alloc-id:fake
29827 _string_f3_0f_5d_min/imm32/subx-name
29828 0/imm32/no-rm32
29829 0/imm32/no-r32
29830 0/imm32/no-imm32
29831 0/imm32/no-imm8
29832 0/imm32/no-disp32
29833 1/imm32/xm32-is-first-inout
29834 3/imm32/x32-is-first-output
29835 0x11/imm32/alloc-id:fake
29836 _Primitive-min-xreg-with-mem/imm32/next
29837 _Primitive-min-xreg-with-mem:
29838 0x11/imm32/alloc-id:fake:payload
29839
29840 0x11/imm32/alloc-id:fake
29841 _string-min/imm32/name
29842 0x11/imm32/alloc-id:fake
29843 Single-float-var-in-mem/imm32/inouts
29844 0x11/imm32/alloc-id:fake
29845 Single-float-var-in-some-register/imm32/outputs
29846 0x11/imm32/alloc-id:fake
29847 _string_f3_0f_5d_min/imm32/subx-name
29848 0/imm32/no-rm32
29849 0/imm32/no-r32
29850 0/imm32/no-imm32
29851 0/imm32/no-imm8
29852 0/imm32/no-disp32
29853 1/imm32/xm32-is-first-inout
29854 3/imm32/x32-is-first-output
29855 0x11/imm32/alloc-id:fake
29856 _Primitive-reciprocal-xreg-to-xreg/imm32/next
29857
29858 _Primitive-reciprocal-xreg-to-xreg:
29859 0x11/imm32/alloc-id:fake:payload
29860
29861 0x11/imm32/alloc-id:fake
29862 _string-reciprocal/imm32/name
29863 0x11/imm32/alloc-id:fake
29864 Single-float-var-in-some-register/imm32/inouts
29865 0x11/imm32/alloc-id:fake
29866 Single-float-var-in-some-register/imm32/outputs
29867 0x11/imm32/alloc-id:fake
29868 _string_f3_0f_53_reciprocal/imm32/subx-name
29869 0/imm32/no-rm32
29870 0/imm32/no-r32
29871 0/imm32/no-imm32
29872 0/imm32/no-imm8
29873 0/imm32/no-disp32
29874 1/imm32/xm32-is-first-inout
29875 3/imm32/x32-is-first-output
29876 0x11/imm32/alloc-id:fake
29877 _Primitive-reciprocal-mem-to-xreg/imm32/next
29878 _Primitive-reciprocal-mem-to-xreg:
29879 0x11/imm32/alloc-id:fake:payload
29880
29881 0x11/imm32/alloc-id:fake
29882 _string-reciprocal/imm32/name
29883 0x11/imm32/alloc-id:fake
29884 Single-float-var-in-mem/imm32/inouts
29885 0x11/imm32/alloc-id:fake
29886 Single-float-var-in-some-register/imm32/outputs
29887 0x11/imm32/alloc-id:fake
29888 _string_f3_0f_53_reciprocal/imm32/subx-name
29889 0/imm32/no-rm32
29890 0/imm32/no-r32
29891 0/imm32/no-imm32
29892 0/imm32/no-imm8
29893 0/imm32/no-disp32
29894 1/imm32/xm32-is-first-inout
29895 3/imm32/x32-is-first-output
29896 0x11/imm32/alloc-id:fake
29897 _Primitive-square-root-xreg-to-xreg/imm32/next
29898
29899 _Primitive-square-root-xreg-to-xreg:
29900 0x11/imm32/alloc-id:fake:payload
29901
29902 0x11/imm32/alloc-id:fake
29903 _string-square-root/imm32/name
29904 0x11/imm32/alloc-id:fake
29905 Single-float-var-in-some-register/imm32/inouts
29906 0x11/imm32/alloc-id:fake
29907 Single-float-var-in-some-register/imm32/outputs
29908 0x11/imm32/alloc-id:fake
29909 _string_f3_0f_51_square_root/imm32/subx-name
29910 0/imm32/no-rm32
29911 0/imm32/no-r32
29912 0/imm32/no-imm32
29913 0/imm32/no-imm8
29914 0/imm32/no-disp32
29915 1/imm32/xm32-is-first-inout
29916 3/imm32/x32-is-first-output
29917 0x11/imm32/alloc-id:fake
29918 _Primitive-square-root-mem-to-xreg/imm32/next
29919 _Primitive-square-root-mem-to-xreg:
29920 0x11/imm32/alloc-id:fake:payload
29921
29922 0x11/imm32/alloc-id:fake
29923 _string-square-root/imm32/name
29924 0x11/imm32/alloc-id:fake
29925 Single-float-var-in-mem/imm32/inouts
29926 0x11/imm32/alloc-id:fake
29927 Single-float-var-in-some-register/imm32/outputs
29928 0x11/imm32/alloc-id:fake
29929 _string_f3_0f_51_square_root/imm32/subx-name
29930 0/imm32/no-rm32
29931 0/imm32/no-r32
29932 0/imm32/no-imm32
29933 0/imm32/no-imm8
29934 0/imm32/no-disp32
29935 1/imm32/xm32-is-first-inout
29936 3/imm32/x32-is-first-output
29937 0x11/imm32/alloc-id:fake
29938 _Primitive-inverse-square-root-xreg-to-xreg/imm32/next
29939
29940 _Primitive-inverse-square-root-xreg-to-xreg:
29941 0x11/imm32/alloc-id:fake:payload
29942
29943 0x11/imm32/alloc-id:fake
29944 _string-inverse-square-root/imm32/name
29945 0x11/imm32/alloc-id:fake
29946 Single-float-var-in-some-register/imm32/inouts
29947 0x11/imm32/alloc-id:fake
29948 Single-float-var-in-some-register/imm32/outputs
29949 0x11/imm32/alloc-id:fake
29950 _string_f3_0f_52_inverse_square_root/imm32/subx-name
29951 0/imm32/no-rm32
29952 0/imm32/no-r32
29953 0/imm32/no-imm32
29954 0/imm32/no-imm8
29955 0/imm32/no-disp32
29956 1/imm32/xm32-is-first-inout
29957 3/imm32/x32-is-first-output
29958 0x11/imm32/alloc-id:fake
29959 _Primitive-inverse-square-root-mem-to-xreg/imm32/next
29960 _Primitive-inverse-square-root-mem-to-xreg:
29961 0x11/imm32/alloc-id:fake:payload
29962
29963 0x11/imm32/alloc-id:fake
29964 _string-inverse-square-root/imm32/name
29965 0x11/imm32/alloc-id:fake
29966 Single-float-var-in-mem/imm32/inouts
29967 0x11/imm32/alloc-id:fake
29968 Single-float-var-in-some-register/imm32/outputs
29969 0x11/imm32/alloc-id:fake
29970 _string_f3_0f_52_inverse_square_root/imm32/subx-name
29971 0/imm32/no-rm32
29972 0/imm32/no-r32
29973 0/imm32/no-imm32
29974 0/imm32/no-imm8
29975 0/imm32/no-disp32
29976 1/imm32/xm32-is-first-inout
29977 3/imm32/x32-is-first-output
29978 0x11/imm32/alloc-id:fake
29979 _Primitive-compare-xreg-with-xreg/imm32/next
29980
29981 _Primitive-compare-xreg-with-xreg:
29982 0x11/imm32/alloc-id:fake:payload
29983
29984 0x11/imm32/alloc-id:fake
29985 _string-compare/imm32/name
29986 0x11/imm32/alloc-id:fake
29987 Two-float-args-in-regs/imm32/inouts
29988 0/imm32/no-outputs
29989 0/imm32/no-outputs
29990 0x11/imm32/alloc-id:fake
29991 _string_0f_2f_compare/imm32/subx-name
29992 0/imm32/no-rm32
29993 0/imm32/no-r32
29994 0/imm32/no-imm32
29995 0/imm32/no-imm8
29996 0/imm32/no-disp32
29997 1/imm32/xm32-is-first-inout
29998 2/imm32/x32-is-second-inout
29999 0x11/imm32/alloc-id:fake
30000 _Primitive-compare-xreg-with-mem/imm32/next
30001 _Primitive-compare-xreg-with-mem:
30002 0x11/imm32/alloc-id:fake:payload
30003
30004 0x11/imm32/alloc-id:fake
30005 _string-compare/imm32/name
30006 0x11/imm32/alloc-id:fake
30007 Two-args-float-reg-float-stack/imm32/inouts
30008 0/imm32/no-outputs
30009 0/imm32/no-outputs
30010 0x11/imm32/alloc-id:fake
30011 _string_0f_2f_compare/imm32/subx-name
30012 0/imm32/no-rm32
30013 0/imm32/no-r32
30014 0/imm32/no-imm32
30015 0/imm32/no-imm8
30016 0/imm32/no-disp32
30017 2/imm32/xm32-is-second-inout
30018 1/imm32/x32-is-first-inout
30019 0x11/imm32/alloc-id:fake
30020 _Primitive-break-if-addr</imm32/next
30021
30022 _Primitive-break-if-addr<:
30023 0x11/imm32/alloc-id:fake:payload
30024 0x11/imm32/alloc-id:fake
30025 _string-break-if-addr</imm32/name
30026 0/imm32/no-inouts
30027 0/imm32/no-inouts
30028 0/imm32/no-outputs
30029 0/imm32/no-outputs
30030 0x11/imm32/alloc-id:fake
30031 _string_0f_82_jump_break/imm32/subx-name
30032 0/imm32/no-rm32
30033 0/imm32/no-r32
30034 0/imm32/no-imm32
30035 0/imm32/no-imm8
30036 0/imm32/no-disp32
30037 0/imm32/no-xm32
30038 0/imm32/no-x32
30039 0x11/imm32/alloc-id:fake
30040 _Primitive-break-if-addr>=/imm32/next
30041 _Primitive-break-if-addr>=:
30042 0x11/imm32/alloc-id:fake:payload
30043 0x11/imm32/alloc-id:fake
30044 _string-break-if-addr>=/imm32/name
30045 0/imm32/no-inouts
30046 0/imm32/no-inouts
30047 0/imm32/no-outputs
30048 0/imm32/no-outputs
30049 0x11/imm32/alloc-id:fake
30050 _string_0f_83_jump_break/imm32/subx-name
30051 0/imm32/no-rm32
30052 0/imm32/no-r32
30053 0/imm32/no-imm32
30054 0/imm32/no-imm8
30055 0/imm32/no-disp32
30056 0/imm32/no-xm32
30057 0/imm32/no-x32
30058 0x11/imm32/alloc-id:fake
30059 _Primitive-break-if-=/imm32/next
30060 _Primitive-break-if-=:
30061 0x11/imm32/alloc-id:fake:payload
30062 0x11/imm32/alloc-id:fake
30063 _string-break-if-=/imm32/name
30064 0/imm32/no-inouts
30065 0/imm32/no-inouts
30066 0/imm32/no-outputs
30067 0/imm32/no-outputs
30068 0x11/imm32/alloc-id:fake
30069 _string_0f_84_jump_break/imm32/subx-name
30070 0/imm32/no-rm32
30071 0/imm32/no-r32
30072 0/imm32/no-imm32
30073 0/imm32/no-imm8
30074 0/imm32/no-disp32
30075 0/imm32/no-xm32
30076 0/imm32/no-x32
30077 0x11/imm32/alloc-id:fake
30078 _Primitive-break-if-!=/imm32/next
30079 _Primitive-break-if-!=:
30080 0x11/imm32/alloc-id:fake:payload
30081 0x11/imm32/alloc-id:fake
30082 _string-break-if-!=/imm32/name
30083 0/imm32/no-inouts
30084 0/imm32/no-inouts
30085 0/imm32/no-outputs
30086 0/imm32/no-outputs
30087 0x11/imm32/alloc-id:fake
30088 _string_0f_85_jump_break/imm32/subx-name
30089 0/imm32/no-rm32
30090 0/imm32/no-r32
30091 0/imm32/no-imm32
30092 0/imm32/no-imm8
30093 0/imm32/no-disp32
30094 0/imm32/no-xm32
30095 0/imm32/no-x32
30096 0x11/imm32/alloc-id:fake
30097 _Primitive-break-if-addr<=/imm32/next
30098 _Primitive-break-if-addr<=:
30099 0x11/imm32/alloc-id:fake:payload
30100 0x11/imm32/alloc-id:fake
30101 _string-break-if-addr<=/imm32/name
30102 0/imm32/no-inouts
30103 0/imm32/no-inouts
30104 0/imm32/no-outputs
30105 0/imm32/no-outputs
30106 0x11/imm32/alloc-id:fake
30107 _string_0f_86_jump_break/imm32/subx-name
30108 0/imm32/no-rm32
30109 0/imm32/no-r32
30110 0/imm32/no-imm32
30111 0/imm32/no-imm8
30112 0/imm32/no-disp32
30113 0/imm32/no-xm32
30114 0/imm32/no-x32
30115 0x11/imm32/alloc-id:fake
30116 _Primitive-break-if-addr>/imm32/next
30117 _Primitive-break-if-addr>:
30118 0x11/imm32/alloc-id:fake:payload
30119 0x11/imm32/alloc-id:fake
30120 _string-break-if-addr>/imm32/name
30121 0/imm32/no-inouts
30122 0/imm32/no-inouts
30123 0/imm32/no-outputs
30124 0/imm32/no-outputs
30125 0x11/imm32/alloc-id:fake
30126 _string_0f_87_jump_break/imm32/subx-name
30127 0/imm32/no-rm32
30128 0/imm32/no-r32
30129 0/imm32/no-imm32
30130 0/imm32/no-imm8
30131 0/imm32/no-disp32
30132 0/imm32/no-xm32
30133 0/imm32/no-x32
30134 0x11/imm32/alloc-id:fake
30135 _Primitive-break-if-</imm32/next
30136 _Primitive-break-if-<:
30137 0x11/imm32/alloc-id:fake:payload
30138 0x11/imm32/alloc-id:fake
30139 _string-break-if-</imm32/name
30140 0/imm32/no-inouts
30141 0/imm32/no-inouts
30142 0/imm32/no-outputs
30143 0/imm32/no-outputs
30144 0x11/imm32/alloc-id:fake
30145 _string_0f_8c_jump_break/imm32/subx-name
30146 0/imm32/no-rm32
30147 0/imm32/no-r32
30148 0/imm32/no-imm32
30149 0/imm32/no-imm8
30150 0/imm32/no-disp32
30151 0/imm32/no-xm32
30152 0/imm32/no-x32
30153 0x11/imm32/alloc-id:fake
30154 _Primitive-break-if->=/imm32/next
30155 _Primitive-break-if->=:
30156 0x11/imm32/alloc-id:fake:payload
30157 0x11/imm32/alloc-id:fake
30158 _string-break-if->=/imm32/name
30159 0/imm32/no-inouts
30160 0/imm32/no-inouts
30161 0/imm32/no-outputs
30162 0/imm32/no-outputs
30163 0x11/imm32/alloc-id:fake
30164 _string_0f_8d_jump_break/imm32/subx-name
30165 0/imm32/no-rm32
30166 0/imm32/no-r32
30167 0/imm32/no-imm32
30168 0/imm32/no-imm8
30169 0/imm32/no-disp32
30170 0/imm32/no-xm32
30171 0/imm32/no-x32
30172 0x11/imm32/alloc-id:fake
30173 _Primitive-break-if-<=/imm32/next
30174 _Primitive-break-if-<=:
30175 0x11/imm32/alloc-id:fake:payload
30176 0x11/imm32/alloc-id:fake
30177 _string-break-if-<=/imm32/name
30178 0/imm32/no-inouts
30179 0/imm32/no-inouts
30180 0/imm32/no-outputs
30181 0/imm32/no-outputs
30182 0x11/imm32/alloc-id:fake
30183 _string_0f_8e_jump_break/imm32/subx-name
30184 0/imm32/no-rm32
30185 0/imm32/no-r32
30186 0/imm32/no-imm32
30187 0/imm32/no-imm8
30188 0/imm32/no-disp32
30189 0/imm32/no-xm32
30190 0/imm32/no-x32
30191 0x11/imm32/alloc-id:fake
30192 _Primitive-break-if->/imm32/next
30193 _Primitive-break-if->:
30194 0x11/imm32/alloc-id:fake:payload
30195 0x11/imm32/alloc-id:fake
30196 _string-break-if->/imm32/name
30197 0/imm32/no-inouts
30198 0/imm32/no-inouts
30199 0/imm32/no-outputs
30200 0/imm32/no-outputs
30201 0x11/imm32/alloc-id:fake
30202 _string_0f_8f_jump_break/imm32/subx-name
30203 0/imm32/no-rm32
30204 0/imm32/no-r32
30205 0/imm32/no-imm32
30206 0/imm32/no-imm8
30207 0/imm32/no-disp32
30208 0/imm32/no-xm32
30209 0/imm32/no-x32
30210 0x11/imm32/alloc-id:fake
30211 _Primitive-break/imm32/next
30212 _Primitive-break:
30213 0x11/imm32/alloc-id:fake:payload
30214 0x11/imm32/alloc-id:fake
30215 _string-break/imm32/name
30216 0/imm32/no-inouts
30217 0/imm32/no-inouts
30218 0/imm32/no-outputs
30219 0/imm32/no-outputs
30220 0x11/imm32/alloc-id:fake
30221 _string_e9_jump_break/imm32/subx-name
30222 0/imm32/no-rm32
30223 0/imm32/no-r32
30224 0/imm32/no-imm32
30225 0/imm32/no-imm8
30226 0/imm32/no-disp32
30227 0/imm32/no-xm32
30228 0/imm32/no-x32
30229 0x11/imm32/alloc-id:fake
30230 _Primitive-loop-if-addr</imm32/next
30231 _Primitive-loop-if-addr<:
30232 0x11/imm32/alloc-id:fake:payload
30233 0x11/imm32/alloc-id:fake
30234 _string-loop-if-addr</imm32/name
30235 0/imm32/no-inouts
30236 0/imm32/no-inouts
30237 0/imm32/no-outputs
30238 0/imm32/no-outputs
30239 0x11/imm32/alloc-id:fake
30240 _string_0f_82_jump_loop/imm32/subx-name
30241 0/imm32/no-rm32
30242 0/imm32/no-r32
30243 0/imm32/no-imm32
30244 0/imm32/no-imm8
30245 0/imm32/no-disp32
30246 0/imm32/no-xm32
30247 0/imm32/no-x32
30248 0x11/imm32/alloc-id:fake
30249 _Primitive-loop-if-addr>=/imm32/next
30250 _Primitive-loop-if-addr>=:
30251 0x11/imm32/alloc-id:fake:payload
30252 0x11/imm32/alloc-id:fake
30253 _string-loop-if-addr>=/imm32/name
30254 0/imm32/no-inouts
30255 0/imm32/no-inouts
30256 0/imm32/no-outputs
30257 0/imm32/no-outputs
30258 0x11/imm32/alloc-id:fake
30259 _string_0f_83_jump_loop/imm32/subx-name
30260 0/imm32/no-rm32
30261 0/imm32/no-r32
30262 0/imm32/no-imm32
30263 0/imm32/no-imm8
30264 0/imm32/no-disp32
30265 0/imm32/no-xm32
30266 0/imm32/no-x32
30267 0x11/imm32/alloc-id:fake
30268 _Primitive-loop-if-=/imm32/next
30269 _Primitive-loop-if-=:
30270 0x11/imm32/alloc-id:fake:payload
30271 0x11/imm32/alloc-id:fake
30272 _string-loop-if-=/imm32/name
30273 0/imm32/no-inouts
30274 0/imm32/no-inouts
30275 0/imm32/no-outputs
30276 0/imm32/no-outputs
30277 0x11/imm32/alloc-id:fake
30278 _string_0f_84_jump_loop/imm32/subx-name
30279 0/imm32/no-rm32
30280 0/imm32/no-r32
30281 0/imm32/no-imm32
30282 0/imm32/no-imm8
30283 0/imm32/no-disp32
30284 0/imm32/no-xm32
30285 0/imm32/no-x32
30286 0x11/imm32/alloc-id:fake
30287 _Primitive-loop-if-!=/imm32/next
30288 _Primitive-loop-if-!=:
30289 0x11/imm32/alloc-id:fake:payload
30290 0x11/imm32/alloc-id:fake
30291 _string-loop-if-!=/imm32/name
30292 0/imm32/no-inouts
30293 0/imm32/no-inouts
30294 0/imm32/no-outputs
30295 0/imm32/no-outputs
30296 0x11/imm32/alloc-id:fake
30297 _string_0f_85_jump_loop/imm32/subx-name
30298 0/imm32/no-rm32
30299 0/imm32/no-r32
30300 0/imm32/no-imm32
30301 0/imm32/no-imm8
30302 0/imm32/no-disp32
30303 0/imm32/no-xm32
30304 0/imm32/no-x32
30305 0x11/imm32/alloc-id:fake
30306 _Primitive-loop-if-addr<=/imm32/next
30307 _Primitive-loop-if-addr<=:
30308 0x11/imm32/alloc-id:fake:payload
30309 0x11/imm32/alloc-id:fake
30310 _string-loop-if-addr<=/imm32/name
30311 0/imm32/no-inouts
30312 0/imm32/no-inouts
30313 0/imm32/no-outputs
30314 0/imm32/no-outputs
30315 0x11/imm32/alloc-id:fake
30316 _string_0f_86_jump_loop/imm32/subx-name
30317 0/imm32/no-rm32
30318 0/imm32/no-r32
30319 0/imm32/no-imm32
30320 0/imm32/no-imm8
30321 0/imm32/no-disp32
30322 0/imm32/no-xm32
30323 0/imm32/no-x32
30324 0x11/imm32/alloc-id:fake
30325 _Primitive-loop-if-addr>/imm32/next
30326 _Primitive-loop-if-addr>:
30327 0x11/imm32/alloc-id:fake:payload
30328 0x11/imm32/alloc-id:fake
30329 _string-loop-if-addr>/imm32/name
30330 0/imm32/no-inouts
30331 0/imm32/no-inouts
30332 0/imm32/no-outputs
30333 0/imm32/no-outputs
30334 0x11/imm32/alloc-id:fake
30335 _string_0f_87_jump_loop/imm32/subx-name
30336 0/imm32/no-rm32
30337 0/imm32/no-r32
30338 0/imm32/no-imm32
30339 0/imm32/no-imm8
30340 0/imm32/no-disp32
30341 0/imm32/no-xm32
30342 0/imm32/no-x32
30343 0x11/imm32/alloc-id:fake
30344 _Primitive-loop-if-</imm32/next
30345 _Primitive-loop-if-<:
30346 0x11/imm32/alloc-id:fake:payload
30347 0x11/imm32/alloc-id:fake
30348 _string-loop-if-</imm32/name
30349 0/imm32/no-inouts
30350 0/imm32/no-inouts
30351 0/imm32/no-outputs
30352 0/imm32/no-outputs
30353 0x11/imm32/alloc-id:fake
30354 _string_0f_8c_jump_loop/imm32/subx-name
30355 0/imm32/no-rm32
30356 0/imm32/no-r32
30357 0/imm32/no-imm32
30358 0/imm32/no-imm8
30359 0/imm32/no-disp32
30360 0/imm32/no-xm32
30361 0/imm32/no-x32
30362 0x11/imm32/alloc-id:fake
30363 _Primitive-loop-if->=/imm32/next
30364 _Primitive-loop-if->=:
30365 0x11/imm32/alloc-id:fake:payload
30366 0x11/imm32/alloc-id:fake
30367 _string-loop-if->=/imm32/name
30368 0/imm32/no-inouts
30369 0/imm32/no-inouts
30370 0/imm32/no-outputs
30371 0/imm32/no-outputs
30372 0x11/imm32/alloc-id:fake
30373 _string_0f_8d_jump_loop/imm32/subx-name
30374 0/imm32/no-rm32
30375 0/imm32/no-r32
30376 0/imm32/no-imm32
30377 0/imm32/no-imm8
30378 0/imm32/no-disp32
30379 0/imm32/no-xm32
30380 0/imm32/no-x32
30381 0x11/imm32/alloc-id:fake
30382 _Primitive-loop-if-<=/imm32/next
30383 _Primitive-loop-if-<=:
30384 0x11/imm32/alloc-id:fake:payload
30385 0x11/imm32/alloc-id:fake
30386 _string-loop-if-<=/imm32/name
30387 0/imm32/no-inouts
30388 0/imm32/no-inouts
30389 0/imm32/no-outputs
30390 0/imm32/no-outputs
30391 0x11/imm32/alloc-id:fake
30392 _string_0f_8e_jump_loop/imm32/subx-name
30393 0/imm32/no-rm32
30394 0/imm32/no-r32
30395 0/imm32/no-imm32
30396 0/imm32/no-imm8
30397 0/imm32/no-disp32
30398 0/imm32/no-xm32
30399 0/imm32/no-x32
30400 0x11/imm32/alloc-id:fake
30401 _Primitive-loop-if->/imm32/next
30402 _Primitive-loop-if->:
30403 0x11/imm32/alloc-id:fake:payload
30404 0x11/imm32/alloc-id:fake
30405 _string-loop-if->/imm32/name
30406 0/imm32/no-inouts
30407 0/imm32/no-inouts
30408 0/imm32/no-outputs
30409 0/imm32/no-outputs
30410 0x11/imm32/alloc-id:fake
30411 _string_0f_8f_jump_loop/imm32/subx-name
30412 0/imm32/no-rm32
30413 0/imm32/no-r32
30414 0/imm32/no-imm32
30415 0/imm32/no-imm8
30416 0/imm32/no-disp32
30417 0/imm32/no-xm32
30418 0/imm32/no-x32
30419 0x11/imm32/alloc-id:fake
30420 _Primitive-loop/imm32/next
30421 _Primitive-loop:
30422 0x11/imm32/alloc-id:fake:payload
30423 0x11/imm32/alloc-id:fake
30424 _string-loop/imm32/name
30425 0/imm32/no-inouts
30426 0/imm32/no-inouts
30427 0/imm32/no-outputs
30428 0/imm32/no-outputs
30429 0x11/imm32/alloc-id:fake
30430 _string_e9_jump_loop/imm32/subx-name
30431 0/imm32/no-rm32
30432 0/imm32/no-r32
30433 0/imm32/no-imm32
30434 0/imm32/no-imm8
30435 0/imm32/no-disp32
30436 0/imm32/no-xm32
30437 0/imm32/no-x32
30438 0x11/imm32/alloc-id:fake
30439 _Primitive-break-if-addr<-named/imm32/next
30440
30441 _Primitive-break-if-addr<-named:
30442 0x11/imm32/alloc-id:fake:payload
30443 0x11/imm32/alloc-id:fake
30444 _string-break-if-addr</imm32/name
30445 0x11/imm32/alloc-id:fake
30446 Single-lit-var/imm32/inouts
30447 0/imm32/no-outputs
30448 0/imm32/no-outputs
30449 0x11/imm32/alloc-id:fake
30450 _string_0f_82_jump_label/imm32/subx-name
30451 0/imm32/no-rm32
30452 0/imm32/no-r32
30453 0/imm32/no-imm32
30454 0/imm32/no-imm8
30455 1/imm32/disp32-is-first-inout
30456 0/imm32/no-xm32
30457 0/imm32/no-x32
30458 0x11/imm32/alloc-id:fake
30459 _Primitive-break-if-addr>=-named/imm32/next
30460 _Primitive-break-if-addr>=-named:
30461 0x11/imm32/alloc-id:fake:payload
30462 0x11/imm32/alloc-id:fake
30463 _string-break-if-addr>=/imm32/name
30464 0x11/imm32/alloc-id:fake
30465 Single-lit-var/imm32/inouts
30466 0/imm32/no-outputs
30467 0/imm32/no-outputs
30468 0x11/imm32/alloc-id:fake
30469 _string_0f_83_jump_label/imm32/subx-name
30470 0/imm32/no-rm32
30471 0/imm32/no-r32
30472 0/imm32/no-imm32
30473 0/imm32/no-imm8
30474 1/imm32/disp32-is-first-inout
30475 0/imm32/no-xm32
30476 0/imm32/no-x32
30477 0x11/imm32/alloc-id:fake
30478 _Primitive-break-if-=-named/imm32/next
30479 _Primitive-break-if-=-named:
30480 0x11/imm32/alloc-id:fake:payload
30481 0x11/imm32/alloc-id:fake
30482 _string-break-if-=/imm32/name
30483 0x11/imm32/alloc-id:fake
30484 Single-lit-var/imm32/inouts
30485 0/imm32/no-outputs
30486 0/imm32/no-outputs
30487 0x11/imm32/alloc-id:fake
30488 _string_0f_84_jump_label/imm32/subx-name
30489 0/imm32/no-rm32
30490 0/imm32/no-r32
30491 0/imm32/no-imm32
30492 0/imm32/no-imm8
30493 1/imm32/disp32-is-first-inout
30494 0/imm32/no-xm32
30495 0/imm32/no-x32
30496 0x11/imm32/alloc-id:fake
30497 _Primitive-break-if-!=-named/imm32/next
30498 _Primitive-break-if-!=-named:
30499 0x11/imm32/alloc-id:fake:payload
30500 0x11/imm32/alloc-id:fake
30501 _string-break-if-!=/imm32/name
30502 0x11/imm32/alloc-id:fake
30503 Single-lit-var/imm32/inouts
30504 0/imm32/no-outputs
30505 0/imm32/no-outputs
30506 0x11/imm32/alloc-id:fake
30507 _string_0f_85_jump_label/imm32/subx-name
30508 0/imm32/no-rm32
30509 0/imm32/no-r32
30510 0/imm32/no-imm32
30511 0/imm32/no-imm8
30512 1/imm32/disp32-is-first-inout
30513 0/imm32/no-xm32
30514 0/imm32/no-x32
30515 0x11/imm32/alloc-id:fake
30516 _Primitive-break-if-addr<=-named/imm32/next
30517 _Primitive-break-if-addr<=-named:
30518 0x11/imm32/alloc-id:fake:payload
30519 0x11/imm32/alloc-id:fake
30520 _string-break-if-addr<=/imm32/name
30521 0x11/imm32/alloc-id:fake
30522 Single-lit-var/imm32/inouts
30523 0/imm32/no-outputs
30524 0/imm32/no-outputs
30525 0x11/imm32/alloc-id:fake
30526 _string_0f_86_jump_label/imm32/subx-name
30527 0/imm32/no-rm32
30528 0/imm32/no-r32
30529 0/imm32/no-imm32
30530 0/imm32/no-imm8
30531 1/imm32/disp32-is-first-inout
30532 0/imm32/no-xm32
30533 0/imm32/no-x32
30534 0x11/imm32/alloc-id:fake
30535 _Primitive-break-if-addr>-named/imm32/next
30536 _Primitive-break-if-addr>-named:
30537 0x11/imm32/alloc-id:fake:payload
30538 0x11/imm32/alloc-id:fake
30539 _string-break-if-addr>/imm32/name
30540 0x11/imm32/alloc-id:fake
30541 Single-lit-var/imm32/inouts
30542 0/imm32/no-outputs
30543 0/imm32/no-outputs
30544 0x11/imm32/alloc-id:fake
30545 _string_0f_87_jump_label/imm32/subx-name
30546 0/imm32/no-rm32
30547 0/imm32/no-r32
30548 0/imm32/no-imm32
30549 0/imm32/no-imm8
30550 1/imm32/disp32-is-first-inout
30551 0/imm32/no-xm32
30552 0/imm32/no-x32
30553 0x11/imm32/alloc-id:fake
30554 _Primitive-break-if-<-named/imm32/next
30555 _Primitive-break-if-<-named:
30556 0x11/imm32/alloc-id:fake:payload
30557 0x11/imm32/alloc-id:fake
30558 _string-break-if-</imm32/name
30559 0x11/imm32/alloc-id:fake
30560 Single-lit-var/imm32/inouts
30561 0/imm32/no-outputs
30562 0/imm32/no-outputs
30563 0x11/imm32/alloc-id:fake
30564 _string_0f_8c_jump_label/imm32/subx-name
30565 0/imm32/no-rm32
30566 0/imm32/no-r32
30567 0/imm32/no-imm32
30568 0/imm32/no-imm8
30569 1/imm32/disp32-is-first-inout
30570 0/imm32/no-xm32
30571 0/imm32/no-x32
30572 0x11/imm32/alloc-id:fake
30573 _Primitive-break-if->=-named/imm32/next
30574 _Primitive-break-if->=-named:
30575 0x11/imm32/alloc-id:fake:payload
30576 0x11/imm32/alloc-id:fake
30577 _string-break-if->=/imm32/name
30578 0x11/imm32/alloc-id:fake
30579 Single-lit-var/imm32/inouts
30580 0/imm32/no-outputs
30581 0/imm32/no-outputs
30582 0x11/imm32/alloc-id:fake
30583 _string_0f_8d_jump_label/imm32/subx-name
30584 0/imm32/no-rm32
30585 0/imm32/no-r32
30586 0/imm32/no-imm32
30587 0/imm32/no-imm8
30588 1/imm32/disp32-is-first-inout
30589 0/imm32/no-xm32
30590 0/imm32/no-x32
30591 0x11/imm32/alloc-id:fake
30592 _Primitive-break-if-<=-named/imm32/next
30593 _Primitive-break-if-<=-named:
30594 0x11/imm32/alloc-id:fake:payload
30595 0x11/imm32/alloc-id:fake
30596 _string-break-if-<=/imm32/name
30597 0x11/imm32/alloc-id:fake
30598 Single-lit-var/imm32/inouts
30599 0/imm32/no-outputs
30600 0/imm32/no-outputs
30601 0x11/imm32/alloc-id:fake
30602 _string_0f_8e_jump_label/imm32/subx-name
30603 0/imm32/no-rm32
30604 0/imm32/no-r32
30605 0/imm32/no-imm32
30606 0/imm32/no-imm8
30607 1/imm32/disp32-is-first-inout
30608 0/imm32/no-xm32
30609 0/imm32/no-x32
30610 0x11/imm32/alloc-id:fake
30611 _Primitive-break-if->-named/imm32/next
30612 _Primitive-break-if->-named:
30613 0x11/imm32/alloc-id:fake:payload
30614 0x11/imm32/alloc-id:fake
30615 _string-break-if->/imm32/name
30616 0x11/imm32/alloc-id:fake
30617 Single-lit-var/imm32/inouts
30618 0/imm32/no-outputs
30619 0/imm32/no-outputs
30620 0x11/imm32/alloc-id:fake
30621 _string_0f_8f_jump_label/imm32/subx-name
30622 0/imm32/no-rm32
30623 0/imm32/no-r32
30624 0/imm32/no-imm32
30625 0/imm32/no-imm8
30626 1/imm32/disp32-is-first-inout
30627 0/imm32/no-xm32
30628 0/imm32/no-x32
30629 0x11/imm32/alloc-id:fake
30630 _Primitive-break-named/imm32/next
30631 _Primitive-break-named:
30632 0x11/imm32/alloc-id:fake:payload
30633 0x11/imm32/alloc-id:fake
30634 _string-break/imm32/name
30635 0x11/imm32/alloc-id:fake
30636 Single-lit-var/imm32/inouts
30637 0/imm32/no-outputs
30638 0/imm32/no-outputs
30639 0x11/imm32/alloc-id:fake
30640 _string_e9_jump_label/imm32/subx-name
30641 0/imm32/no-rm32
30642 0/imm32/no-r32
30643 0/imm32/no-imm32
30644 0/imm32/no-imm8
30645 1/imm32/disp32-is-first-inout
30646 0/imm32/no-xm32
30647 0/imm32/no-x32
30648 0x11/imm32/alloc-id:fake
30649 _Primitive-loop-if-addr<-named/imm32/next
30650 _Primitive-loop-if-addr<-named:
30651 0x11/imm32/alloc-id:fake:payload
30652 0x11/imm32/alloc-id:fake
30653 _string-loop-if-addr</imm32/name
30654 0x11/imm32/alloc-id:fake
30655 Single-lit-var/imm32/inouts
30656 0/imm32/no-outputs
30657 0/imm32/no-outputs
30658 0x11/imm32/alloc-id:fake
30659 _string_0f_82_jump_label/imm32/subx-name
30660 0/imm32/no-rm32
30661 0/imm32/no-r32
30662 0/imm32/no-imm32
30663 0/imm32/no-imm8
30664 1/imm32/disp32-is-first-inout
30665 0/imm32/no-xm32
30666 0/imm32/no-x32
30667 0x11/imm32/alloc-id:fake
30668 _Primitive-loop-if-addr>=-named/imm32/next
30669 _Primitive-loop-if-addr>=-named:
30670 0x11/imm32/alloc-id:fake:payload
30671 0x11/imm32/alloc-id:fake
30672 _string-loop-if-addr>=/imm32/name
30673 0x11/imm32/alloc-id:fake
30674 Single-lit-var/imm32/inouts
30675 0/imm32/no-outputs
30676 0/imm32/no-outputs
30677 0x11/imm32/alloc-id:fake
30678 _string_0f_83_jump_label/imm32/subx-name
30679 0/imm32/no-rm32
30680 0/imm32/no-r32
30681 0/imm32/no-imm32
30682 0/imm32/no-imm8
30683 1/imm32/disp32-is-first-inout
30684 0/imm32/no-xm32
30685 0/imm32/no-x32
30686 0x11/imm32/alloc-id:fake
30687 _Primitive-loop-if-=-named/imm32/next
30688 _Primitive-loop-if-=-named:
30689 0x11/imm32/alloc-id:fake:payload
30690 0x11/imm32/alloc-id:fake
30691 _string-loop-if-=/imm32/name
30692 0x11/imm32/alloc-id:fake
30693 Single-lit-var/imm32/inouts
30694 0/imm32/no-outputs
30695 0/imm32/no-outputs
30696 0x11/imm32/alloc-id:fake
30697 _string_0f_84_jump_label/imm32/subx-name
30698 0/imm32/no-rm32
30699 0/imm32/no-r32
30700 0/imm32/no-imm32
30701 0/imm32/no-imm8
30702 1/imm32/disp32-is-first-inout
30703 0/imm32/no-xm32
30704 0/imm32/no-x32
30705 0x11/imm32/alloc-id:fake
30706 _Primitive-loop-if-!=-named/imm32/next
30707 _Primitive-loop-if-!=-named:
30708 0x11/imm32/alloc-id:fake:payload
30709 0x11/imm32/alloc-id:fake
30710 _string-loop-if-!=/imm32/name
30711 0x11/imm32/alloc-id:fake
30712 Single-lit-var/imm32/inouts
30713 0/imm32/no-outputs
30714 0/imm32/no-outputs
30715 0x11/imm32/alloc-id:fake
30716 _string_0f_85_jump_label/imm32/subx-name
30717 0/imm32/no-rm32
30718 0/imm32/no-r32
30719 0/imm32/no-imm32
30720 0/imm32/no-imm8
30721 1/imm32/disp32-is-first-inout
30722 0/imm32/no-xm32
30723 0/imm32/no-x32
30724 0x11/imm32/alloc-id:fake
30725 _Primitive-loop-if-addr<=-named/imm32/next
30726 _Primitive-loop-if-addr<=-named:
30727 0x11/imm32/alloc-id:fake:payload
30728 0x11/imm32/alloc-id:fake
30729 _string-loop-if-addr<=/imm32/name
30730 0x11/imm32/alloc-id:fake
30731 Single-lit-var/imm32/inouts
30732 0/imm32/no-outputs
30733 0/imm32/no-outputs
30734 0x11/imm32/alloc-id:fake
30735 _string_0f_86_jump_label/imm32/subx-name
30736 0/imm32/no-rm32
30737 0/imm32/no-r32
30738 0/imm32/no-imm32
30739 0/imm32/no-imm8
30740 1/imm32/disp32-is-first-inout
30741 0/imm32/no-xm32
30742 0/imm32/no-x32
30743 0x11/imm32/alloc-id:fake
30744 _Primitive-loop-if-addr>-named/imm32/next
30745 _Primitive-loop-if-addr>-named:
30746 0x11/imm32/alloc-id:fake:payload
30747 0x11/imm32/alloc-id:fake
30748 _string-loop-if-addr>/imm32/name
30749 0x11/imm32/alloc-id:fake
30750 Single-lit-var/imm32/inouts
30751 0/imm32/no-outputs
30752 0/imm32/no-outputs
30753 0x11/imm32/alloc-id:fake
30754 _string_0f_87_jump_label/imm32/subx-name
30755 0/imm32/no-rm32
30756 0/imm32/no-r32
30757 0/imm32/no-imm32
30758 0/imm32/no-imm8
30759 1/imm32/disp32-is-first-inout
30760 0/imm32/no-xm32
30761 0/imm32/no-x32
30762 0x11/imm32/alloc-id:fake
30763 _Primitive-loop-if-<-named/imm32/next
30764 _Primitive-loop-if-<-named:
30765 0x11/imm32/alloc-id:fake:payload
30766 0x11/imm32/alloc-id:fake
30767 _string-loop-if-</imm32/name
30768 0x11/imm32/alloc-id:fake
30769 Single-lit-var/imm32/inouts
30770 0/imm32/no-outputs
30771 0/imm32/no-outputs
30772 0x11/imm32/alloc-id:fake
30773 _string_0f_8c_jump_label/imm32/subx-name
30774 0/imm32/no-rm32
30775 0/imm32/no-r32
30776 0/imm32/no-imm32
30777 0/imm32/no-imm8
30778 1/imm32/disp32-is-first-inout
30779 0/imm32/no-xm32
30780 0/imm32/no-x32
30781 0x11/imm32/alloc-id:fake
30782 _Primitive-loop-if->=-named/imm32/next
30783 _Primitive-loop-if->=-named:
30784 0x11/imm32/alloc-id:fake:payload
30785 0x11/imm32/alloc-id:fake
30786 _string-loop-if->=/imm32/name
30787 0x11/imm32/alloc-id:fake
30788 Single-lit-var/imm32/inouts
30789 0/imm32/no-outputs
30790 0/imm32/no-outputs
30791 0x11/imm32/alloc-id:fake
30792 _string_0f_8d_jump_label/imm32/subx-name
30793 0/imm32/no-rm32
30794 0/imm32/no-r32
30795 0/imm32/no-imm32
30796 0/imm32/no-imm8
30797 1/imm32/disp32-is-first-inout
30798 0/imm32/no-xm32
30799 0/imm32/no-x32
30800 0x11/imm32/alloc-id:fake
30801 _Primitive-loop-if-<=-named/imm32/next
30802 _Primitive-loop-if-<=-named:
30803 0x11/imm32/alloc-id:fake:payload
30804 0x11/imm32/alloc-id:fake
30805 _string-loop-if-<=/imm32/name
30806 0x11/imm32/alloc-id:fake
30807 Single-lit-var/imm32/inouts
30808 0/imm32/no-outputs
30809 0/imm32/no-outputs
30810 0x11/imm32/alloc-id:fake
30811 _string_0f_8e_jump_label/imm32/subx-name
30812 0/imm32/no-rm32
30813 0/imm32/no-r32
30814 0/imm32/no-imm32
30815 0/imm32/no-imm8
30816 1/imm32/disp32-is-first-inout
30817 0/imm32/no-xm32
30818 0/imm32/no-x32
30819 0x11/imm32/alloc-id:fake
30820 _Primitive-loop-if->-named/imm32/next
30821 _Primitive-loop-if->-named:
30822 0x11/imm32/alloc-id:fake:payload
30823 0x11/imm32/alloc-id:fake
30824 _string-loop-if->/imm32/name
30825 0x11/imm32/alloc-id:fake
30826 Single-lit-var/imm32/inouts
30827 0/imm32/no-outputs
30828 0/imm32/no-outputs
30829 0x11/imm32/alloc-id:fake
30830 _string_0f_8f_jump_label/imm32/subx-name
30831 0/imm32/no-rm32
30832 0/imm32/no-r32
30833 0/imm32/no-imm32
30834 0/imm32/no-imm8
30835 1/imm32/disp32-is-first-inout
30836 0/imm32/no-xm32
30837 0/imm32/no-x32
30838 0x11/imm32/alloc-id:fake
30839 _Primitive-loop-named/imm32/next
30840 _Primitive-loop-named:
30841 0x11/imm32/alloc-id:fake:payload
30842 0x11/imm32/alloc-id:fake
30843 _string-loop/imm32/name
30844 0x11/imm32/alloc-id:fake
30845 Single-lit-var/imm32/inouts
30846 0/imm32/no-outputs
30847 0/imm32/no-outputs
30848 0x11/imm32/alloc-id:fake
30849 _string_e9_jump_label/imm32/subx-name
30850 0/imm32/no-rm32
30851 0/imm32/no-r32
30852 0/imm32/no-imm32
30853 0/imm32/no-imm8
30854 1/imm32/disp32-is-first-inout
30855 0/imm32/no-xm32
30856 0/imm32/no-x32
30857 0x11/imm32/alloc-id:fake
30858 _Primitive-break-if-float</imm32/next
30859
30860 _Primitive-break-if-float<:
30861 0x11/imm32/alloc-id:fake:payload
30862 0x11/imm32/alloc-id:fake
30863 _string-break-if-float</imm32/name
30864 0/imm32/no-inouts
30865 0/imm32/no-inouts
30866 0/imm32/no-outputs
30867 0/imm32/no-outputs
30868 0x11/imm32/alloc-id:fake
30869 _string_0f_82_jump_break/imm32/subx-name
30870 0/imm32/no-rm32
30871 0/imm32/no-r32
30872 0/imm32/no-imm32
30873 0/imm32/no-imm8
30874 0/imm32/no-disp32
30875 0/imm32/no-xm32
30876 0/imm32/no-x32
30877 0x11/imm32/alloc-id:fake
30878 _Primitive-break-if-float>=/imm32/next
30879 _Primitive-break-if-float>=:
30880 0x11/imm32/alloc-id:fake:payload
30881 0x11/imm32/alloc-id:fake
30882 _string-break-if-float>=/imm32/name
30883 0/imm32/no-inouts
30884 0/imm32/no-inouts
30885 0/imm32/no-outputs
30886 0/imm32/no-outputs
30887 0x11/imm32/alloc-id:fake
30888 _string_0f_83_jump_break/imm32/subx-name
30889 0/imm32/no-rm32
30890 0/imm32/no-r32
30891 0/imm32/no-imm32
30892 0/imm32/no-imm8
30893 0/imm32/no-disp32
30894 0/imm32/no-xm32
30895 0/imm32/no-x32
30896 0x11/imm32/alloc-id:fake
30897 _Primitive-break-if-float<=/imm32/next
30898 _Primitive-break-if-float<=:
30899 0x11/imm32/alloc-id:fake:payload
30900 0x11/imm32/alloc-id:fake
30901 _string-break-if-float<=/imm32/name
30902 0/imm32/no-inouts
30903 0/imm32/no-inouts
30904 0/imm32/no-outputs
30905 0/imm32/no-outputs
30906 0x11/imm32/alloc-id:fake
30907 _string_0f_86_jump_break/imm32/subx-name
30908 0/imm32/no-rm32
30909 0/imm32/no-r32
30910 0/imm32/no-imm32
30911 0/imm32/no-imm8
30912 0/imm32/no-disp32
30913 0/imm32/no-xm32
30914 0/imm32/no-x32
30915 0x11/imm32/alloc-id:fake
30916 _Primitive-break-if-float>/imm32/next
30917 _Primitive-break-if-float>:
30918 0x11/imm32/alloc-id:fake:payload
30919 0x11/imm32/alloc-id:fake
30920 _string-break-if-float>/imm32/name
30921 0/imm32/no-inouts
30922 0/imm32/no-inouts
30923 0/imm32/no-outputs
30924 0/imm32/no-outputs
30925 0x11/imm32/alloc-id:fake
30926 _string_0f_87_jump_break/imm32/subx-name
30927 0/imm32/no-rm32
30928 0/imm32/no-r32
30929 0/imm32/no-imm32
30930 0/imm32/no-imm8
30931 0/imm32/no-disp32
30932 0/imm32/no-xm32
30933 0/imm32/no-x32
30934 0x11/imm32/alloc-id:fake
30935 _Primitive-loop-if-float</imm32/next
30936 _Primitive-loop-if-float<:
30937 0x11/imm32/alloc-id:fake:payload
30938 0x11/imm32/alloc-id:fake
30939 _string-loop-if-float</imm32/name
30940 0/imm32/no-inouts
30941 0/imm32/no-inouts
30942 0/imm32/no-outputs
30943 0/imm32/no-outputs
30944 0x11/imm32/alloc-id:fake
30945 _string_0f_82_jump_loop/imm32/subx-name
30946 0/imm32/no-rm32
30947 0/imm32/no-r32
30948 0/imm32/no-imm32
30949 0/imm32/no-imm8
30950 0/imm32/no-disp32
30951 0/imm32/no-xm32
30952 0/imm32/no-x32
30953 0x11/imm32/alloc-id:fake
30954 _Primitive-loop-if-float>=/imm32/next
30955 _Primitive-loop-if-float>=:
30956 0x11/imm32/alloc-id:fake:payload
30957 0x11/imm32/alloc-id:fake
30958 _string-loop-if-float>=/imm32/name
30959 0/imm32/no-inouts
30960 0/imm32/no-inouts
30961 0/imm32/no-outputs
30962 0/imm32/no-outputs
30963 0x11/imm32/alloc-id:fake
30964 _string_0f_83_jump_loop/imm32/subx-name
30965 0/imm32/no-rm32
30966 0/imm32/no-r32
30967 0/imm32/no-imm32
30968 0/imm32/no-imm8
30969 0/imm32/no-disp32
30970 0/imm32/no-xm32
30971 0/imm32/no-x32
30972 0x11/imm32/alloc-id:fake
30973 _Primitive-loop-if-float<=/imm32/next
30974 _Primitive-loop-if-float<=:
30975 0x11/imm32/alloc-id:fake:payload
30976 0x11/imm32/alloc-id:fake
30977 _string-loop-if-float<=/imm32/name
30978 0/imm32/no-inouts
30979 0/imm32/no-inouts
30980 0/imm32/no-outputs
30981 0/imm32/no-outputs
30982 0x11/imm32/alloc-id:fake
30983 _string_0f_86_jump_loop/imm32/subx-name
30984 0/imm32/no-rm32
30985 0/imm32/no-r32
30986 0/imm32/no-imm32
30987 0/imm32/no-imm8
30988 0/imm32/no-disp32
30989 0/imm32/no-xm32
30990 0/imm32/no-x32
30991 0x11/imm32/alloc-id:fake
30992 _Primitive-loop-if-float>/imm32/next
30993 _Primitive-loop-if-float>:
30994 0x11/imm32/alloc-id:fake:payload
30995 0x11/imm32/alloc-id:fake
30996 _string-loop-if-float>/imm32/name
30997 0/imm32/no-inouts
30998 0/imm32/no-inouts
30999 0/imm32/no-outputs
31000 0/imm32/no-outputs
31001 0x11/imm32/alloc-id:fake
31002 _string_0f_87_jump_loop/imm32/subx-name
31003 0/imm32/no-rm32
31004 0/imm32/no-r32
31005 0/imm32/no-imm32
31006 0/imm32/no-imm8
31007 0/imm32/no-disp32
31008 0/imm32/no-xm32
31009 0/imm32/no-x32
31010 0x11/imm32/alloc-id:fake
31011 _Primitive-break-if-float<-named/imm32/next
31012 _Primitive-break-if-float<-named:
31013 0x11/imm32/alloc-id:fake:payload
31014 0x11/imm32/alloc-id:fake
31015 _string-break-if-float</imm32/name
31016 0x11/imm32/alloc-id:fake
31017 Single-lit-var/imm32/inouts
31018 0/imm32/no-outputs
31019 0/imm32/no-outputs
31020 0x11/imm32/alloc-id:fake
31021 _string_0f_82_jump_label/imm32/subx-name
31022 0/imm32/no-rm32
31023 0/imm32/no-r32
31024 0/imm32/no-imm32
31025 0/imm32/no-imm8
31026 1/imm32/disp32-is-first-inout
31027 0/imm32/no-xm32
31028 0/imm32/no-x32
31029 0x11/imm32/alloc-id:fake
31030 _Primitive-break-if-float>=-named/imm32/next
31031 _Primitive-break-if-float>=-named:
31032 0x11/imm32/alloc-id:fake:payload
31033 0x11/imm32/alloc-id:fake
31034 _string-break-if-float>=/imm32/name
31035 0x11/imm32/alloc-id:fake
31036 Single-lit-var/imm32/inouts
31037 0/imm32/no-outputs
31038 0/imm32/no-outputs
31039 0x11/imm32/alloc-id:fake
31040 _string_0f_83_jump_label/imm32/subx-name
31041 0/imm32/no-rm32
31042 0/imm32/no-r32
31043 0/imm32/no-imm32
31044 0/imm32/no-imm8
31045 1/imm32/disp32-is-first-inout
31046 0/imm32/no-xm32
31047 0/imm32/no-x32
31048 0x11/imm32/alloc-id:fake
31049 _Primitive-break-if-float<=-named/imm32/next
31050 _Primitive-break-if-float<=-named:
31051 0x11/imm32/alloc-id:fake:payload
31052 0x11/imm32/alloc-id:fake
31053 _string-break-if-float<=/imm32/name
31054 0x11/imm32/alloc-id:fake
31055 Single-lit-var/imm32/inouts
31056 0/imm32/no-outputs
31057 0/imm32/no-outputs
31058 0x11/imm32/alloc-id:fake
31059 _string_0f_86_jump_label/imm32/subx-name
31060 0/imm32/no-rm32
31061 0/imm32/no-r32
31062 0/imm32/no-imm32
31063 0/imm32/no-imm8
31064 1/imm32/disp32-is-first-inout
31065 0/imm32/no-xm32
31066 0/imm32/no-x32
31067 0x11/imm32/alloc-id:fake
31068 _Primitive-break-if-float>-named/imm32/next
31069 _Primitive-break-if-float>-named:
31070 0x11/imm32/alloc-id:fake:payload
31071 0x11/imm32/alloc-id:fake
31072 _string-break-if-float>/imm32/name
31073 0x11/imm32/alloc-id:fake
31074 Single-lit-var/imm32/inouts
31075 0/imm32/no-outputs
31076 0/imm32/no-outputs
31077 0x11/imm32/alloc-id:fake
31078 _string_0f_87_jump_label/imm32/subx-name
31079 0/imm32/no-rm32
31080 0/imm32/no-r32
31081 0/imm32/no-imm32
31082 0/imm32/no-imm8
31083 1/imm32/disp32-is-first-inout
31084 0/imm32/no-xm32
31085 0/imm32/no-x32
31086 0x11/imm32/alloc-id:fake
31087 _Primitive-loop-if-float<-named/imm32/next
31088 _Primitive-loop-if-float<-named:
31089 0x11/imm32/alloc-id:fake:payload
31090 0x11/imm32/alloc-id:fake
31091 _string-loop-if-float</imm32/name
31092 0x11/imm32/alloc-id:fake
31093 Single-lit-var/imm32/inouts
31094 0/imm32/no-outputs
31095 0/imm32/no-outputs
31096 0x11/imm32/alloc-id:fake
31097 _string_0f_82_jump_label/imm32/subx-name
31098 0/imm32/no-rm32
31099 0/imm32/no-r32
31100 0/imm32/no-imm32
31101 0/imm32/no-imm8
31102 1/imm32/disp32-is-first-inout
31103 0/imm32/no-xm32
31104 0/imm32/no-x32
31105 0x11/imm32/alloc-id:fake
31106 _Primitive-loop-if-float>=-named/imm32/next
31107 _Primitive-loop-if-float>=-named:
31108 0x11/imm32/alloc-id:fake:payload
31109 0x11/imm32/alloc-id:fake
31110 _string-loop-if-float>=/imm32/name
31111 0x11/imm32/alloc-id:fake
31112 Single-lit-var/imm32/inouts
31113 0/imm32/no-outputs
31114 0/imm32/no-outputs
31115 0x11/imm32/alloc-id:fake
31116 _string_0f_83_jump_label/imm32/subx-name
31117 0/imm32/no-rm32
31118 0/imm32/no-r32
31119 0/imm32/no-imm32
31120 0/imm32/no-imm8
31121 1/imm32/disp32-is-first-inout
31122 0/imm32/no-xm32
31123 0/imm32/no-x32
31124 0x11/imm32/alloc-id:fake
31125 _Primitive-loop-if-float<=-named/imm32/next
31126 _Primitive-loop-if-float<=-named:
31127 0x11/imm32/alloc-id:fake:payload
31128 0x11/imm32/alloc-id:fake
31129 _string-loop-if-float<=/imm32/name
31130 0x11/imm32/alloc-id:fake
31131 Single-lit-var/imm32/inouts
31132 0/imm32/no-outputs
31133 0/imm32/no-outputs
31134 0x11/imm32/alloc-id:fake
31135 _string_0f_86_jump_label/imm32/subx-name
31136 0/imm32/no-rm32
31137 0/imm32/no-r32
31138 0/imm32/no-imm32
31139 0/imm32/no-imm8
31140 1/imm32/disp32-is-first-inout
31141 0/imm32/no-xm32
31142 0/imm32/no-x32
31143 0x11/imm32/alloc-id:fake
31144 _Primitive-loop-if-float>-named/imm32/next
31145 _Primitive-loop-if-float>-named:
31146 0x11/imm32/alloc-id:fake:payload
31147 0x11/imm32/alloc-id:fake
31148 _string-loop-if-float>/imm32/name
31149 0x11/imm32/alloc-id:fake
31150 Single-lit-var/imm32/inouts
31151 0/imm32/no-outputs
31152 0/imm32/no-outputs
31153 0x11/imm32/alloc-id:fake
31154 _string_0f_87_jump_label/imm32/subx-name
31155 0/imm32/no-rm32
31156 0/imm32/no-r32
31157 0/imm32/no-imm32
31158 0/imm32/no-imm8
31159 1/imm32/disp32-is-first-inout
31160 0/imm32/no-xm32
31161 0/imm32/no-x32
31162 0/imm32/next
31163 0/imm32/next
31164
31165
31166 _string-add:
31167 0x11/imm32/alloc-id:fake:payload
31168
31169 0x3/imm32/size
31170 0x61/a 0x64/d 0x64/d
31171 _string-address:
31172 0x11/imm32/alloc-id:fake:payload
31173
31174 0x7/imm32/size
31175 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
31176 _string-add-to:
31177 0x11/imm32/alloc-id:fake:payload
31178
31179 0x6/imm32/size
31180 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
31181 _string-and:
31182 0x11/imm32/alloc-id:fake:payload
31183
31184 0x3/imm32/size
31185 0x61/a 0x6e/n 0x64/d
31186 _string-and-with:
31187 0x11/imm32/alloc-id:fake:payload
31188
31189 0x8/imm32/size
31190 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
31191 _string-break:
31192 0x11/imm32/alloc-id:fake:payload
31193
31194 0x5/imm32/size
31195 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k
31196 _string-break-if-<:
31197 0x11/imm32/alloc-id:fake:payload
31198
31199 0xa/imm32/size
31200 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
31201 _string-break-if-<=:
31202 0x11/imm32/alloc-id:fake:payload
31203
31204 0xb/imm32/size
31205 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
31206 _string-break-if-=:
31207 0x11/imm32/alloc-id:fake:payload
31208
31209 0xa/imm32/size
31210 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
31211 _string-break-if->:
31212 0x11/imm32/alloc-id:fake:payload
31213
31214 0xa/imm32/size
31215 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
31216 _string-break-if->=:
31217 0x11/imm32/alloc-id:fake:payload
31218
31219 0xb/imm32/size
31220 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
31221 _string-break-if-!=:
31222 0x11/imm32/alloc-id:fake:payload
31223
31224 0xb/imm32/size
31225 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
31226 _string-break-if-addr<:
31227 0x11/imm32/alloc-id:fake:payload
31228
31229 0xe/imm32/size
31230 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/<
31231 _string-break-if-addr<=:
31232 0x11/imm32/alloc-id:fake:payload
31233
31234 0xf/imm32/size
31235 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/=
31236 _string-break-if-addr>:
31237 0x11/imm32/alloc-id:fake:payload
31238
31239 0xe/imm32/size
31240 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/>
31241 _string-break-if-addr>=:
31242 0x11/imm32/alloc-id:fake:payload
31243
31244 0xf/imm32/size
31245 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/=
31246 _string-break-if-float<:
31247 0x11/imm32/alloc-id:fake:payload
31248
31249 0xf/imm32/size
31250 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/<
31251 _string-break-if-float<=:
31252 0x11/imm32/alloc-id:fake:payload
31253
31254 0x10/imm32/size
31255 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/=
31256 _string-break-if-float>:
31257 0x11/imm32/alloc-id:fake:payload
31258
31259 0xf/imm32/size
31260 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/>
31261 _string-break-if-float>=:
31262 0x11/imm32/alloc-id:fake:payload
31263
31264 0x10/imm32/size
31265 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/=
31266 _string-compare:
31267 0x11/imm32/alloc-id:fake:payload
31268
31269 0x7/imm32/size
31270 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
31271 _string-copy:
31272 0x11/imm32/alloc-id:fake:payload
31273
31274 0x4/imm32/size
31275 0x63/c 0x6f/o 0x70/p 0x79/y
31276 _string-copy-to:
31277 0x11/imm32/alloc-id:fake:payload
31278
31279 0x7/imm32/size
31280 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o
31281 _string-copy-byte:
31282 0x11/imm32/alloc-id:fake:payload
31283
31284 0x9/imm32/size
31285 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e
31286 _string-copy-byte-to:
31287 0x11/imm32/alloc-id:fake:payload
31288
31289 0xc/imm32/size
31290 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x74/t 0x6f/o
31291 _string-decrement:
31292 0x11/imm32/alloc-id:fake:payload
31293
31294 0x9/imm32/size
31295 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
31296 _string-increment:
31297 0x11/imm32/alloc-id:fake:payload
31298
31299 0x9/imm32/size
31300 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
31301 _string-loop:
31302 0x11/imm32/alloc-id:fake:payload
31303
31304 0x4/imm32/size
31305 0x6c/l 0x6f/o 0x6f/o 0x70/p
31306 _string-loop-if-<:
31307 0x11/imm32/alloc-id:fake:payload
31308
31309 0x9/imm32/size
31310 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
31311 _string-loop-if-<=:
31312 0x11/imm32/alloc-id:fake:payload
31313
31314 0xa/imm32/size
31315 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
31316 _string-loop-if-=:
31317 0x11/imm32/alloc-id:fake:payload
31318
31319 0x9/imm32/size
31320 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
31321 _string-loop-if->:
31322 0x11/imm32/alloc-id:fake:payload
31323
31324 0x9/imm32/size
31325 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
31326 _string-loop-if->=:
31327 0x11/imm32/alloc-id:fake:payload
31328
31329 0xa/imm32/size
31330 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
31331 _string-loop-if-!=:
31332 0x11/imm32/alloc-id:fake:payload
31333
31334 0xa/imm32/size
31335 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
31336 _string-loop-if-addr<:
31337 0x11/imm32/alloc-id:fake:payload
31338
31339 0xd/imm32/size
31340 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/<
31341 _string-loop-if-addr<=:
31342 0x11/imm32/alloc-id:fake:payload
31343
31344 0xe/imm32/size
31345 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/=
31346 _string-loop-if-addr>:
31347 0x11/imm32/alloc-id:fake:payload
31348
31349 0xd/imm32/size
31350 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/>
31351 _string-loop-if-addr>=:
31352 0x11/imm32/alloc-id:fake:payload
31353
31354 0xe/imm32/size
31355 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/=
31356 _string-loop-if-float<:
31357 0x11/imm32/alloc-id:fake:payload
31358
31359 0xe/imm32/size
31360 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/<
31361 _string-loop-if-float<=:
31362 0x11/imm32/alloc-id:fake:payload
31363
31364 0xf/imm32/size
31365 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/=
31366 _string-loop-if-float>:
31367 0x11/imm32/alloc-id:fake:payload
31368
31369 0xe/imm32/size
31370 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/>
31371 _string-loop-if-float>=:
31372 0x11/imm32/alloc-id:fake:payload
31373
31374 0xf/imm32/size
31375 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/=
31376 _string-multiply:
31377 0x11/imm32/alloc-id:fake:payload
31378
31379 0x8/imm32/size
31380 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
31381 _string-convert:
31382 0x11/imm32/alloc-id:fake:payload
31383
31384 0x7/imm32/size
31385 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t
31386 _string-truncate:
31387 0x11/imm32/alloc-id:fake:payload
31388
31389 0x8/imm32/size
31390 0x74/t 0x72/r 0x75/u 0x6e/n 0x63/c 0x61/a 0x74/t 0x65/e
31391 _string-reinterpret:
31392 0x11/imm32/alloc-id:fake:payload
31393
31394 0xb/imm32/size
31395 0x72/r 0x65/e 0x69/i 0x6e/n 0x74/t 0x65/e 0x72/r 0x70/p 0x72/r 0x65/e 0x74/t
31396 _string-divide:
31397 0x11/imm32/alloc-id:fake:payload
31398
31399 0x6/imm32/size
31400 0x64/d 0x69/i 0x76/v 0x69/i 0x64/d 0x65/e
31401 _string-max:
31402 0x11/imm32/alloc-id:fake:payload
31403
31404 0x3/imm32/size
31405 0x6d/m 0x61/a 0x78/x
31406 _string-min:
31407 0x11/imm32/alloc-id:fake:payload
31408
31409 0x3/imm32/size
31410 0x6d/m 0x69/i 0x6e/n
31411 _string-reciprocal:
31412 0x11/imm32/alloc-id:fake:payload
31413
31414 0xa/imm32/size
31415 0x72/r 0x65/e 0x63/c 0x69/i 0x70/p 0x72/r 0x6f/o 0x63/c 0x61/a 0x6c/l
31416 _string-square-root:
31417 0x11/imm32/alloc-id:fake:payload
31418
31419 0xb/imm32/size
31420 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/- 0x72/r 0x6f/o 0x6f/o 0x74/t
31421 _string-inverse-square-root:
31422 0x11/imm32/alloc-id:fake:payload
31423
31424 0x13/imm32/size
31425 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
31426 _string-negate:
31427 0x11/imm32/alloc-id:fake:payload
31428
31429 0x6/imm32/size
31430 0x6e/n 0x65/e 0x67/g 0x61/a 0x74/t 0x65/e
31431 _string-or:
31432 0x11/imm32/alloc-id:fake:payload
31433
31434 0x2/imm32/size
31435 0x6f/o 0x72/r
31436 _string-or-with:
31437 0x11/imm32/alloc-id:fake:payload
31438
31439 0x7/imm32/size
31440 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
31441 _string-subtract:
31442 0x11/imm32/alloc-id:fake:payload
31443
31444 0x8/imm32/size
31445 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
31446 _string-subtract-from:
31447 0x11/imm32/alloc-id:fake:payload
31448
31449 0xd/imm32/size
31450 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
31451 _string-xor:
31452 0x11/imm32/alloc-id:fake:payload
31453
31454 0x3/imm32/size
31455 0x78/x 0x6f/o 0x72/r
31456 _string-xor-with:
31457 0x11/imm32/alloc-id:fake:payload
31458
31459 0x8/imm32/size
31460 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
31461 _string-shift-left:
31462 0x11/imm32/alloc-id:fake:payload
31463
31464 0xa/imm32/size
31465 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x6c/l 0x65/e 0x66/f 0x74/t
31466 _string-shift-right:
31467 0x11/imm32/alloc-id:fake:payload
31468
31469 0xb/imm32/size
31470 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t
31471 _string-shift-right-signed:
31472 0x11/imm32/alloc-id:fake:payload
31473
31474 0x12/imm32/size
31475 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
31476
31477
31478 _string_01_add_to:
31479 0x11/imm32/alloc-id:fake:payload
31480
31481 0x9/imm32/size
31482 0x30/0 0x31/1 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
31483 _string_03_add:
31484 0x11/imm32/alloc-id:fake:payload
31485
31486 0x6/imm32/size
31487 0x30/0 0x33/3 0x2f/slash 0x61/a 0x64/d 0x64/d
31488 _string_05_add_to_eax:
31489 0x11/imm32/alloc-id:fake:payload
31490
31491 0xd/imm32/size
31492 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
31493 _string_09_or_with:
31494 0x11/imm32/alloc-id:fake:payload
31495
31496 0xa/imm32/size
31497 0x30/0 0x39/9 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
31498 _string_0b_or:
31499 0x11/imm32/alloc-id:fake:payload
31500
31501 0x5/imm32/size
31502 0x30/0 0x62/b 0x2f/slash 0x6f/o 0x72/r
31503 _string_0d_or_with_eax:
31504 0x11/imm32/alloc-id:fake:payload
31505
31506 0xe/imm32/size
31507 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
31508 _string_0f_82_jump_label:
31509 0x11/imm32/alloc-id:fake:payload
31510
31511 0x13/imm32/size
31512 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/<
31513 _string_0f_82_jump_break:
31514 0x11/imm32/alloc-id:fake:payload
31515
31516 0x20/imm32/size
31517 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
31518 _string_0f_82_jump_loop:
31519 0x11/imm32/alloc-id:fake:payload
31520
31521 0x1f/imm32/size
31522 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
31523 _string_0f_83_jump_label:
31524 0x11/imm32/alloc-id:fake:payload
31525
31526 0x14/imm32/size
31527 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/=
31528 _string_0f_83_jump_break:
31529 0x11/imm32/alloc-id:fake:payload
31530
31531 0x21/imm32/size
31532 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
31533 _string_0f_83_jump_loop:
31534 0x11/imm32/alloc-id:fake:payload
31535
31536 0x20/imm32/size
31537 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
31538 _string_0f_84_jump_label:
31539 0x11/imm32/alloc-id:fake:payload
31540
31541 0xf/imm32/size
31542 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/=
31543 _string_0f_84_jump_break:
31544 0x11/imm32/alloc-id:fake:payload
31545
31546 0x1c/imm32/size
31547 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
31548 _string_0f_84_jump_loop:
31549 0x11/imm32/alloc-id:fake:payload
31550
31551 0x1b/imm32/size
31552 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
31553 _string_0f_85_jump_label:
31554 0x11/imm32/alloc-id:fake:payload
31555
31556 0x10/imm32/size
31557 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/=
31558 _string_0f_85_jump_break:
31559 0x11/imm32/alloc-id:fake:payload
31560
31561 0x1d/imm32/size
31562 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
31563 _string_0f_85_jump_loop:
31564 0x11/imm32/alloc-id:fake:payload
31565
31566 0x1c/imm32/size
31567 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
31568 _string_0f_86_jump_label:
31569 0x11/imm32/alloc-id:fake:payload
31570
31571 0x14/imm32/size
31572 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/=
31573 _string_0f_86_jump_break:
31574 0x11/imm32/alloc-id:fake:payload
31575
31576 0x21/imm32/size
31577 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
31578 _string_0f_86_jump_loop:
31579 0x11/imm32/alloc-id:fake:payload
31580
31581 0x20/imm32/size
31582 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
31583 _string_0f_87_jump_label:
31584 0x11/imm32/alloc-id:fake:payload
31585
31586 0x13/imm32/size
31587 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/>
31588 _string_0f_87_jump_break:
31589 0x11/imm32/alloc-id:fake:payload
31590
31591 0x20/imm32/size
31592 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
31593 _string_0f_87_jump_loop:
31594 0x11/imm32/alloc-id:fake:payload
31595
31596 0x1f/imm32/size
31597 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
31598 _string_0f_8c_jump_label:
31599 0x11/imm32/alloc-id:fake:payload
31600
31601 0xf/imm32/size
31602 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/<
31603 _string_0f_8c_jump_break:
31604 0x11/imm32/alloc-id:fake:payload
31605
31606 0x1c/imm32/size
31607 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
31608 _string_0f_8c_jump_loop:
31609 0x11/imm32/alloc-id:fake:payload
31610
31611 0x1b/imm32/size
31612 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
31613 _string_0f_8d_jump_label:
31614 0x11/imm32/alloc-id:fake:payload
31615
31616 0x10/imm32/size
31617 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/=
31618 _string_0f_8d_jump_break:
31619 0x11/imm32/alloc-id:fake:payload
31620
31621 0x1d/imm32/size
31622 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
31623 _string_0f_8d_jump_loop:
31624 0x11/imm32/alloc-id:fake:payload
31625
31626 0x1c/imm32/size
31627 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
31628 _string_0f_8e_jump_label:
31629 0x11/imm32/alloc-id:fake:payload
31630
31631 0x10/imm32/size
31632 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/=
31633 _string_0f_8e_jump_break:
31634 0x11/imm32/alloc-id:fake:payload
31635
31636 0x1d/imm32/size
31637 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
31638 _string_0f_8e_jump_loop:
31639 0x11/imm32/alloc-id:fake:payload
31640
31641 0x1c/imm32/size
31642 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
31643 _string_0f_8f_jump_label:
31644 0x11/imm32/alloc-id:fake:payload
31645
31646 0xf/imm32/size
31647 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/>
31648 _string_0f_8f_jump_break:
31649 0x11/imm32/alloc-id:fake:payload
31650
31651 0x1c/imm32/size
31652 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
31653 _string_0f_8f_jump_loop:
31654 0x11/imm32/alloc-id:fake:payload
31655
31656 0x1b/imm32/size
31657 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
31658 _string_0f_af_multiply:
31659 0x11/imm32/alloc-id:fake:payload
31660
31661 0xe/imm32/size
31662 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
31663 _string_f3_0f_2a_convert_to_float:
31664 0x11/imm32/alloc-id:fake:payload
31665
31666 0x19/imm32/size
31667 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
31668 _string_f3_0f_2d_convert_to_int:
31669 0x11/imm32/alloc-id:fake:payload
31670
31671 0x17/imm32/size
31672 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
31673 _string_f3_0f_2c_truncate_to_int:
31674 0x11/imm32/alloc-id:fake:payload
31675
31676 0x18/imm32/size
31677 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
31678 _string_f3_0f_58_add:
31679 0x11/imm32/alloc-id:fake:payload
31680
31681 0xc/imm32/size
31682 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x38/8 0x2f/slash 0x61/a 0x64/d 0x64/d
31683 _string_f3_0f_5c_subtract:
31684 0x11/imm32/alloc-id:fake:payload
31685
31686 0x11/imm32/size
31687 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
31688 _string_f3_0f_59_multiply:
31689 0x11/imm32/alloc-id:fake:payload
31690
31691 0x11/imm32/size
31692 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
31693 _string_f3_0f_5e_divide:
31694 0x11/imm32/alloc-id:fake:payload
31695
31696 0xf/imm32/size
31697 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
31698 _string_f3_0f_53_reciprocal:
31699 0x11/imm32/alloc-id:fake:payload
31700
31701 0x13/imm32/size
31702 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
31703 _string_f3_0f_51_square_root:
31704 0x11/imm32/alloc-id:fake:payload
31705
31706 0x14/imm32/size
31707 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
31708 _string_f3_0f_52_inverse_square_root:
31709 0x11/imm32/alloc-id:fake:payload
31710
31711 0x1c/imm32/size
31712 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
31713 _string_f3_0f_5d_min:
31714 0x11/imm32/alloc-id:fake:payload
31715
31716 0xc/imm32/size
31717 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x64/d 0x2f/slash 0x6d/m 0x69/i 0x6e/n
31718 _string_f3_0f_5f_max:
31719 0x11/imm32/alloc-id:fake:payload
31720
31721 0xc/imm32/size
31722 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x66/f 0x2f/slash 0x6d/m 0x61/a 0x78/x
31723 _string_f3_0f_10_copy:
31724 0x11/imm32/alloc-id:fake:payload
31725
31726 0xd/imm32/size
31727 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
31728 _string_f3_0f_11_copy:
31729 0x11/imm32/alloc-id:fake:payload
31730
31731 0xd/imm32/size
31732 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
31733 _string_0f_2f_compare:
31734 0x11/imm32/alloc-id:fake:payload
31735
31736 0xd/imm32/size
31737 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
31738 _string_21_and_with:
31739 0x11/imm32/alloc-id:fake:payload
31740
31741 0xb/imm32/size
31742 0x32/2 0x31/1 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
31743 _string_23_and:
31744 0x11/imm32/alloc-id:fake:payload
31745
31746 0x6/imm32/size
31747 0x32/2 0x33/3 0x2f/slash 0x61/a 0x6e/n 0x64/d
31748 _string_25_and_with_eax:
31749 0x11/imm32/alloc-id:fake:payload
31750
31751 0xf/imm32/size
31752 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
31753 _string_29_subtract_from:
31754 0x11/imm32/alloc-id:fake:payload
31755
31756 0x10/imm32/size
31757 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
31758 _string_2b_subtract:
31759 0x11/imm32/alloc-id:fake:payload
31760
31761 0xb/imm32/size
31762 0x32/2 0x62/b 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
31763 _string_2d_subtract_from_eax:
31764 0x11/imm32/alloc-id:fake:payload
31765
31766 0x14/imm32/size
31767 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
31768 _string_31_xor_with:
31769 0x11/imm32/alloc-id:fake:payload
31770
31771 0xb/imm32/size
31772 0x33/3 0x31/1 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
31773 _string_33_xor:
31774 0x11/imm32/alloc-id:fake:payload
31775
31776 0x6/imm32/size
31777 0x33/3 0x33/3 0x2f/slash 0x78/x 0x6f/o 0x72/r
31778 _string_35_xor_with_eax:
31779 0x11/imm32/alloc-id:fake:payload
31780
31781 0xf/imm32/size
31782 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
31783 _string_39_compare->:
31784 0x11/imm32/alloc-id:fake:payload
31785
31786 0xc/imm32/size
31787 0x33/3 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x3e/>
31788 _string_3b_compare<-:
31789 0x11/imm32/alloc-id:fake:payload
31790
31791 0xc/imm32/size
31792 0x33/3 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x3c/< 0x2d/dash
31793 _string_3d_compare_eax_with:
31794 0x11/imm32/alloc-id:fake:payload
31795
31796 0x13/imm32/size
31797 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
31798 _string_40_increment_eax:
31799 0x11/imm32/alloc-id:fake:payload
31800
31801 0x10/imm32/size
31802 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
31803 _string_41_increment_ecx:
31804 0x11/imm32/alloc-id:fake:payload
31805
31806 0x10/imm32/size
31807 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
31808 _string_42_increment_edx:
31809 0x11/imm32/alloc-id:fake:payload
31810
31811 0x10/imm32/size
31812 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
31813 _string_43_increment_ebx:
31814 0x11/imm32/alloc-id:fake:payload
31815
31816 0x10/imm32/size
31817 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
31818 _string_46_increment_esi:
31819 0x11/imm32/alloc-id:fake:payload
31820
31821 0x10/imm32/size
31822 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
31823 _string_47_increment_edi:
31824 0x11/imm32/alloc-id:fake:payload
31825
31826 0x10/imm32/size
31827 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
31828 _string_48_decrement_eax:
31829 0x11/imm32/alloc-id:fake:payload
31830
31831 0x10/imm32/size
31832 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
31833 _string_49_decrement_ecx:
31834 0x11/imm32/alloc-id:fake:payload
31835
31836 0x10/imm32/size
31837 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
31838 _string_4a_decrement_edx:
31839 0x11/imm32/alloc-id:fake:payload
31840
31841 0x10/imm32/size
31842 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
31843 _string_4b_decrement_ebx:
31844 0x11/imm32/alloc-id:fake:payload
31845
31846 0x10/imm32/size
31847 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
31848 _string_4e_decrement_esi:
31849 0x11/imm32/alloc-id:fake:payload
31850
31851 0x10/imm32/size
31852 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
31853 _string_4f_decrement_edi:
31854 0x11/imm32/alloc-id:fake:payload
31855
31856 0x10/imm32/size
31857 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
31858 _string_81_subop_add:
31859 0x11/imm32/alloc-id:fake:payload
31860
31861 0xe/imm32/size
31862 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
31863 _string_81_subop_or:
31864 0x11/imm32/alloc-id:fake:payload
31865
31866 0xd/imm32/size
31867 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
31868 _string_81_subop_and:
31869 0x11/imm32/alloc-id:fake:payload
31870
31871 0xe/imm32/size
31872 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
31873 _string_81_subop_subtract:
31874 0x11/imm32/alloc-id:fake:payload
31875
31876 0x13/imm32/size
31877 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
31878 _string_81_subop_xor:
31879 0x11/imm32/alloc-id:fake:payload
31880
31881 0xe/imm32/size
31882 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
31883 _string_81_subop_compare:
31884 0x11/imm32/alloc-id:fake:payload
31885
31886 0x12/imm32/size
31887 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
31888 _string_89_<-:
31889 0x11/imm32/alloc-id:fake:payload
31890
31891 0x5/imm32/size
31892 0x38/8 0x39/9 0x2f/slash 0x3c/< 0x2d/dash
31893 _string_8b_->:
31894 0x11/imm32/alloc-id:fake:payload
31895
31896 0x5/imm32/size
31897 0x38/8 0x62/b 0x2f/slash 0x2d/dash 0x3e/>
31898 _string_8a_copy_byte:
31899 0x11/imm32/alloc-id:fake:payload
31900
31901 0x9/imm32/size
31902 0x38/8 0x61/a 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x3e/>
31903 _string_88_copy_byte:
31904 0x11/imm32/alloc-id:fake:payload
31905
31906 0x9/imm32/size
31907 0x38/8 0x38/8 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x3c/< 0x2d/-
31908 _string_8d_copy_address:
31909 0x11/imm32/alloc-id:fake:payload
31910
31911 0xf/imm32/size
31912 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
31913 _string_b8_copy_to_eax:
31914 0x11/imm32/alloc-id:fake:payload
31915
31916 0xe/imm32/size
31917 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
31918 _string_b9_copy_to_ecx:
31919 0x11/imm32/alloc-id:fake:payload
31920
31921 0xe/imm32/size
31922 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
31923 _string_ba_copy_to_edx:
31924 0x11/imm32/alloc-id:fake:payload
31925
31926 0xe/imm32/size
31927 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
31928 _string_bb_copy_to_ebx:
31929 0x11/imm32/alloc-id:fake:payload
31930
31931 0xe/imm32/size
31932 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
31933 _string_be_copy_to_esi:
31934 0x11/imm32/alloc-id:fake:payload
31935
31936 0xe/imm32/size
31937 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
31938 _string_bf_copy_to_edi:
31939 0x11/imm32/alloc-id:fake:payload
31940
31941 0xe/imm32/size
31942 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
31943 _string_c7_subop_copy:
31944 0x11/imm32/alloc-id:fake:payload
31945
31946 0xf/imm32/size
31947 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
31948 _string_e9_jump_label:
31949 0x11/imm32/alloc-id:fake:payload
31950
31951 0x7/imm32/size
31952 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p
31953 _string_e9_jump_break:
31954 0x11/imm32/alloc-id:fake:payload
31955
31956 0x14/imm32/size
31957 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
31958 _string_e9_jump_loop:
31959 0x11/imm32/alloc-id:fake:payload
31960
31961 0x13/imm32/size
31962 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
31963 _string_f7_subop_negate:
31964 0x11/imm32/alloc-id:fake:payload
31965
31966 0x11/imm32/size
31967 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
31968 _string_ff_subop_increment:
31969 0x11/imm32/alloc-id:fake:payload
31970
31971 0x14/imm32/size
31972 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
31973 _string_ff_subop_decrement:
31974 0x11/imm32/alloc-id:fake:payload
31975
31976 0x14/imm32/size
31977 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
31978 _string_c1_subop_shift_left:
31979 0x11/imm32/alloc-id:fake:payload
31980
31981 0x15/imm32/size
31982 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
31983 _string_c1_subop_shift_right_padding_zeroes:
31984 0x11/imm32/alloc-id:fake:payload
31985
31986 0x25/imm32/size
31987 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
31988 _string_c1_subop_shift_right_preserving_sign:
31989 0x11/imm32/alloc-id:fake:payload
31990
31991 0x26/imm32/size
31992 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
31993
31994 Single-int-var-in-mem:
31995 0x11/imm32/alloc-id:fake:payload
31996 0x11/imm32/alloc-id:fake
31997 Int-var-in-mem/imm32
31998 0/imm32/next
31999 0/imm32/next
32000
32001 Int-var-in-mem:
32002 0x11/imm32/alloc-id:fake:payload
32003 0/imm32/name
32004 0/imm32/name
32005 0x11/imm32/alloc-id:fake
32006 Type-int/imm32
32007 1/imm32/some-block-depth
32008 1/imm32/some-stack-offset
32009 0/imm32/no-register
32010 0/imm32/no-register
32011
32012
32013 Single-byte-var-in-mem:
32014 0x11/imm32/alloc-id:fake:payload
32015 0x11/imm32/alloc-id:fake
32016 Byte-var-in-mem/imm32
32017 0/imm32/next
32018 0/imm32/next
32019
32020
32021 Byte-var-in-mem:
32022 0x11/imm32/alloc-id:fake:payload
32023 0/imm32/name
32024 0/imm32/name
32025 0x11/imm32/alloc-id:fake
32026 Type-byte/imm32
32027 1/imm32/some-block-depth
32028 1/imm32/some-stack-offset
32029 0/imm32/no-register
32030 0/imm32/no-register
32031
32032 Two-args-int-stack-int-reg:
32033 0x11/imm32/alloc-id:fake:payload
32034 0x11/imm32/alloc-id:fake
32035 Int-var-in-mem/imm32
32036 0x11/imm32/alloc-id:fake
32037 Single-int-var-in-some-register/imm32/next
32038
32039 Two-int-args-in-regs:
32040 0x11/imm32/alloc-id:fake:payload
32041 0x11/imm32/alloc-id:fake
32042 Int-var-in-some-register/imm32
32043 0x11/imm32/alloc-id:fake
32044 Single-int-var-in-some-register/imm32/next
32045
32046
32047 Two-args-byte-stack-byte-reg:
32048 0x11/imm32/alloc-id:fake:payload
32049 0x11/imm32/alloc-id:fake
32050 Byte-var-in-mem/imm32
32051 0x11/imm32/alloc-id:fake
32052 Single-byte-var-in-some-register/imm32/next
32053
32054 Two-args-int-reg-int-stack:
32055 0x11/imm32/alloc-id:fake:payload
32056 0x11/imm32/alloc-id:fake
32057 Int-var-in-some-register/imm32
32058 0x11/imm32/alloc-id:fake
32059 Single-int-var-in-mem/imm32/next
32060
32061 Two-args-int-eax-int-literal:
32062 0x11/imm32/alloc-id:fake:payload
32063 0x11/imm32/alloc-id:fake
32064 Int-var-in-eax/imm32
32065 0x11/imm32/alloc-id:fake
32066 Single-lit-var/imm32/next
32067
32068 Int-var-and-literal:
32069 0x11/imm32/alloc-id:fake:payload
32070 0x11/imm32/alloc-id:fake
32071 Int-var-in-mem/imm32
32072 0x11/imm32/alloc-id:fake
32073 Single-lit-var/imm32/next
32074
32075 Int-var-in-register-and-literal:
32076 0x11/imm32/alloc-id:fake:payload
32077 0x11/imm32/alloc-id:fake
32078 Int-var-in-some-register/imm32
32079 0x11/imm32/alloc-id:fake
32080 Single-lit-var/imm32/next
32081
32082 Two-float-args-in-regs:
32083 0x11/imm32/alloc-id:fake:payload
32084 0x11/imm32/alloc-id:fake
32085 Float-var-in-some-register/imm32
32086 0x11/imm32/alloc-id:fake
32087 Single-float-var-in-some-register/imm32/next
32088
32089 Two-args-float-reg-float-stack:
32090 0x11/imm32/alloc-id:fake:payload
32091 0x11/imm32/alloc-id:fake
32092 Float-var-in-some-register/imm32
32093 0x11/imm32/alloc-id:fake
32094 Single-float-var-in-mem/imm32/next
32095
32096 Two-args-float-stack-float-reg:
32097 0x11/imm32/alloc-id:fake:payload
32098 0x11/imm32/alloc-id:fake
32099 Float-var-in-mem/imm32
32100 0x11/imm32/alloc-id:fake
32101 Single-float-var-in-some-register/imm32/next
32102
32103 Single-int-var-in-some-register:
32104 0x11/imm32/alloc-id:fake:payload
32105 0x11/imm32/alloc-id:fake
32106 Int-var-in-some-register/imm32
32107 0/imm32/next
32108 0/imm32/next
32109
32110 Single-addr-var-in-some-register:
32111 0x11/imm32/alloc-id:fake:payload
32112 0x11/imm32/alloc-id:fake
32113 Addr-var-in-some-register/imm32
32114 0/imm32/next
32115 0/imm32/next
32116
32117 Single-byte-var-in-some-register:
32118 0x11/imm32/alloc-id:fake:payload
32119 0x11/imm32/alloc-id:fake
32120 Byte-var-in-some-register/imm32
32121 0/imm32/next
32122 0/imm32/next
32123
32124 Int-var-in-some-register:
32125 0x11/imm32/alloc-id:fake:payload
32126 0/imm32/name
32127 0/imm32/name
32128 0x11/imm32/alloc-id:fake
32129 Type-int/imm32
32130 1/imm32/some-block-depth
32131 0/imm32/no-stack-offset
32132 0x11/imm32/alloc-id:fake
32133 Any-register/imm32
32134
32135 Any-register:
32136 0x11/imm32/alloc-id:fake:payload
32137 1/imm32/size
32138
32139 2a/asterisk
32140
32141 Addr-var-in-some-register:
32142 0x11/imm32/alloc-id:fake:payload
32143 0/imm32/name
32144 0/imm32/name
32145 0x11/imm32/alloc-id:fake
32146 Type-addr/imm32
32147 1/imm32/some-block-depth
32148 0/imm32/no-stack-offset
32149 0x11/imm32/alloc-id:fake
32150 Any-register/imm32
32151
32152 Byte-var-in-some-register:
32153 0x11/imm32/alloc-id:fake:payload
32154 0/imm32/name
32155 0/imm32/name
32156 0x11/imm32/alloc-id:fake
32157 Type-byte/imm32
32158 1/imm32/some-block-depth
32159 0/imm32/no-stack-offset
32160 0x11/imm32/alloc-id:fake
32161 Any-register/imm32
32162
32163 Single-int-var-in-eax:
32164 0x11/imm32/alloc-id:fake:payload
32165 0x11/imm32/alloc-id:fake
32166 Int-var-in-eax/imm32
32167 0/imm32/next
32168 0/imm32/next
32169
32170 Int-var-in-eax:
32171 0x11/imm32/alloc-id:fake:payload
32172 0/imm32/name
32173 0/imm32/name
32174 0x11/imm32/alloc-id:fake
32175 Type-int/imm32
32176 1/imm32/some-block-depth
32177 0/imm32/no-stack-offset
32178 0x11/imm32/alloc-id:fake
32179 $Mu-register-eax/imm32
32180
32181 Single-int-var-in-ecx:
32182 0x11/imm32/alloc-id:fake:payload
32183 0x11/imm32/alloc-id:fake
32184 Int-var-in-ecx/imm32
32185 0/imm32/next
32186 0/imm32/next
32187
32188 Int-var-in-ecx:
32189 0x11/imm32/alloc-id:fake:payload
32190 0/imm32/name
32191 0/imm32/name
32192 0x11/imm32/alloc-id:fake
32193 Type-int/imm32
32194 1/imm32/some-block-depth
32195 0/imm32/no-stack-offset
32196 0x11/imm32/alloc-id:fake
32197 $Register-ecx/imm32/register
32198
32199 Single-int-var-in-edx:
32200 0x11/imm32/alloc-id:fake:payload
32201 0x11/imm32/alloc-id:fake
32202 Int-var-in-edx/imm32
32203 0/imm32/next
32204 0/imm32/next
32205
32206 Int-var-in-edx:
32207 0x11/imm32/alloc-id:fake:payload
32208 0/imm32/name
32209 0/imm32/name
32210 0x11/imm32/alloc-id:fake
32211 Type-int/imm32
32212 1/imm32/some-block-depth
32213 0/imm32/no-stack-offset
32214 0x11/imm32/alloc-id:fake
32215 $Register-edx/imm32/register
32216
32217 Single-int-var-in-ebx:
32218 0x11/imm32/alloc-id:fake:payload
32219 0x11/imm32/alloc-id:fake
32220 Int-var-in-ebx/imm32
32221 0/imm32/next
32222 0/imm32/next
32223
32224 Int-var-in-ebx:
32225 0x11/imm32/alloc-id:fake:payload
32226 0/imm32/name
32227 0/imm32/name
32228 0x11/imm32/alloc-id:fake
32229 Type-int/imm32
32230 1/imm32/some-block-depth
32231 0/imm32/no-stack-offset
32232 0x11/imm32/alloc-id:fake
32233 $Register-ebx/imm32/register
32234
32235 Single-int-var-in-esi:
32236 0x11/imm32/alloc-id:fake:payload
32237 0x11/imm32/alloc-id:fake
32238 Int-var-in-esi/imm32
32239 0/imm32/next
32240 0/imm32/next
32241
32242 Int-var-in-esi:
32243 0x11/imm32/alloc-id:fake:payload
32244 0/imm32/name
32245 0/imm32/name
32246 0x11/imm32/alloc-id:fake
32247 Type-int/imm32
32248 1/imm32/some-block-depth
32249 0/imm32/no-stack-offset
32250 0x11/imm32/alloc-id:fake
32251 $Register-esi/imm32/register
32252
32253 Single-int-var-in-edi:
32254 0x11/imm32/alloc-id:fake:payload
32255 0x11/imm32/alloc-id:fake
32256 Int-var-in-edi/imm32
32257 0/imm32/next
32258 0/imm32/next
32259
32260 Int-var-in-edi:
32261 0x11/imm32/alloc-id:fake:payload
32262 0/imm32/name
32263 0/imm32/name
32264 0x11/imm32/alloc-id:fake
32265 Type-int/imm32
32266 1/imm32/some-block-depth
32267 0/imm32/no-stack-offset
32268 0x11/imm32/alloc-id:fake
32269 $Register-edi/imm32/register
32270
32271 Single-lit-var:
32272 0x11/imm32/alloc-id:fake:payload
32273 0x11/imm32/alloc-id:fake
32274 Lit-var/imm32
32275 0/imm32/next
32276 0/imm32/next
32277
32278 Lit-var:
32279 0x11/imm32/alloc-id:fake:payload
32280 0/imm32/name
32281 0/imm32/name
32282 0x11/imm32/alloc-id:fake
32283 Type-literal/imm32
32284 1/imm32/some-block-depth
32285 0/imm32/no-stack-offset
32286 0/imm32/no-register
32287 0/imm32/no-register
32288
32289 Single-float-var-in-mem:
32290 0x11/imm32/alloc-id:fake:payload
32291 0x11/imm32/alloc-id:fake
32292 Float-var-in-mem/imm32
32293 0/imm32/next
32294 0/imm32/next
32295
32296 Float-var-in-mem:
32297 0x11/imm32/alloc-id:fake:payload
32298 0/imm32/name
32299 0/imm32/name
32300 0x11/imm32/alloc-id:fake
32301 Type-float/imm32
32302 1/imm32/some-block-depth
32303 1/imm32/some-stack-offset
32304 0/imm32/no-register
32305 0/imm32/no-register
32306
32307 Single-float-var-in-some-register:
32308 0x11/imm32/alloc-id:fake:payload
32309 0x11/imm32/alloc-id:fake
32310 Float-var-in-some-register/imm32
32311 0/imm32/next
32312 0/imm32/next
32313
32314 Float-var-in-some-register:
32315 0x11/imm32/alloc-id:fake:payload
32316 0/imm32/name
32317 0/imm32/name
32318 0x11/imm32/alloc-id:fake
32319 Type-float/imm32
32320 1/imm32/some-block-depth
32321 0/imm32/no-stack-offset
32322 0x11/imm32/alloc-id:fake
32323 Any-register/imm32
32324
32325 Type-int:
32326 0x11/imm32/alloc-id:fake:payload
32327 1/imm32/is-atom
32328 1/imm32/value:int
32329 0/imm32/left:unused
32330 0/imm32/right:null
32331 0/imm32/right:null
32332
32333 Type-literal:
32334 0x11/imm32/alloc-id:fake:payload
32335 1/imm32/is-atom
32336 0/imm32/value:literal
32337 0/imm32/left:unused
32338 0/imm32/right:null
32339 0/imm32/right:null
32340
32341 Type-addr:
32342 0x11/imm32/alloc-id:fake:payload
32343 1/imm32/is-atom
32344 2/imm32/value:addr
32345 0/imm32/left:unused
32346 0/imm32/right:null
32347 0/imm32/right:null
32348
32349 Type-byte:
32350 0x11/imm32/alloc-id:fake:payload
32351 1/imm32/is-atom
32352 8/imm32/value:byte
32353 0/imm32/left:unused
32354 0/imm32/right:null
32355 0/imm32/right:null
32356
32357 Type-float:
32358 0x11/imm32/alloc-id:fake:payload
32359 1/imm32/is-atom
32360 0xf/imm32/value:float
32361 0/imm32/left:unused
32362 0/imm32/right:null
32363 0/imm32/right:null
32364
32365 == code
32366 emit-subx-primitive:
32367
32368 55/push-ebp
32369 89/<- %ebp 4/r32/esp
32370
32371 50/push-eax
32372 51/push-ecx
32373
32374 8b/-> *(ebp+0x10) 1/r32/ecx
32375
32376 (emit-indent *(ebp+8) *Curr-block-depth)
32377 (lookup *(ecx+0x18) *(ecx+0x1c))
32378 (write-buffered *(ebp+8) %eax)
32379
32380 (emit-subx-rm32 *(ebp+8) *(ecx+0x20) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
32381
32382 (emit-subx-rm32 *(ebp+8) *(ecx+0x34) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
32383
32384 (emit-subx-r32 *(ebp+8) *(ecx+0x24) *(ebp+0xc))
32385
32386 (emit-subx-x32 *(ebp+8) *(ecx+0x38) *(ebp+0xc))
32387
32388 (emit-subx-imm32 *(ebp+8) *(ecx+0x28) *(ebp+0xc))
32389
32390 (emit-subx-imm8 *(ebp+8) *(ecx+0x2c) *(ebp+0xc))
32391
32392 (emit-subx-disp32 *(ebp+8) *(ecx+0x30) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
32393 (write-buffered *(ebp+8) Newline)
32394 $emit-subx-primitive:end:
32395
32396 59/pop-to-ecx
32397 58/pop-to-eax
32398
32399 89/<- %esp 5/r32/ebp
32400 5d/pop-to-ebp
32401 c3/return
32402
32403 emit-subx-rm32:
32404
32405 55/push-ebp
32406 89/<- %ebp 4/r32/esp
32407
32408 50/push-eax
32409
32410 81 7/subop/compare *(ebp+0xc) 0/imm32
32411 74/jump-if-= $emit-subx-rm32:end/disp8
32412
32413 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
32414 (emit-subx-var-as-rm32 *(ebp+8) %eax)
32415 $emit-subx-rm32:end:
32416
32417 58/pop-to-eax
32418
32419 89/<- %esp 5/r32/ebp
32420 5d/pop-to-ebp
32421 c3/return
32422
32423 get-stmt-operand-from-arg-location:
32424
32425 55/push-ebp
32426 89/<- %ebp 4/r32/esp
32427
32428 51/push-ecx
32429
32430 8b/-> *(ebp+0xc) 0/r32/eax
32431
32432 8b/-> *(ebp+8) 1/r32/ecx
32433
32434 {
32435 3d/compare-eax-and 1/imm32
32436 75/jump-if-!= break/disp8
32437 $get-stmt-operand-from-arg-location:1:
32438 (lookup *(ecx+0xc) *(ecx+0x10))
32439 eb/jump $get-stmt-operand-from-arg-location:end/disp8
32440 }
32441
32442 {
32443 3d/compare-eax-and 2/imm32
32444 75/jump-if-!= break/disp8
32445 $get-stmt-operand-from-arg-location:2:
32446 (lookup *(ecx+0xc) *(ecx+0x10))
32447 (lookup *(eax+8) *(eax+0xc))
32448 eb/jump $get-stmt-operand-from-arg-location:end/disp8
32449 }
32450
32451 {
32452 3d/compare-eax-and 3/imm32
32453 75/jump-if-!= break/disp8
32454 $get-stmt-operand-from-arg-location:3:
32455 (lookup *(ecx+0x14) *(ecx+0x18))
32456 eb/jump $get-stmt-operand-from-arg-location:end/disp8
32457 }
32458
32459 e9/jump $get-stmt-operand-from-arg-location:abort/disp32
32460 $get-stmt-operand-from-arg-location:end:
32461
32462 59/pop-to-ecx
32463
32464 89/<- %esp 5/r32/ebp
32465 5d/pop-to-ebp
32466 c3/return
32467
32468 $get-stmt-operand-from-arg-location:abort:
32469
32470 (write-buffered *(ebp+0x10) "invalid arg-location ")
32471 (write-int32-hex-buffered *(ebp+0x10) %eax)
32472 (write-buffered *(ebp+0x10) Newline)
32473 (flush *(ebp+0x10))
32474 (stop *(ebp+0x14) 1)
32475
32476
32477 emit-subx-r32:
32478
32479 55/push-ebp
32480 89/<- %ebp 4/r32/esp
32481
32482 50/push-eax
32483 51/push-ecx
32484
32485 81 7/subop/compare *(ebp+0xc) 0/imm32
32486 0f 84/jump-if-= $emit-subx-r32:end/disp32
32487
32488 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
32489 (lookup *eax *(eax+4))
32490 (lookup *(eax+0x18) *(eax+0x1c))
32491
32492
32493
32494
32495 (maybe-get Mu-registers %eax 0xc)
32496 (write-buffered *(ebp+8) Space)
32497 (write-int32-hex-buffered *(ebp+8) *eax)
32498 (write-buffered *(ebp+8) "/r32")
32499 $emit-subx-r32:end:
32500
32501 59/pop-to-ecx
32502 58/pop-to-eax
32503
32504 89/<- %esp 5/r32/ebp
32505 5d/pop-to-ebp
32506 c3/return
32507
32508 emit-subx-x32:
32509
32510 55/push-ebp
32511 89/<- %ebp 4/r32/esp
32512
32513 50/push-eax
32514 51/push-ecx
32515
32516 81 7/subop/compare *(ebp+0xc) 0/imm32
32517 0f 84/jump-if-= $emit-subx-x32:end/disp32
32518
32519 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
32520 (lookup *eax *(eax+4))
32521 (lookup *(eax+0x18) *(eax+0x1c))
32522
32523
32524
32525
32526 (maybe-get Mu-registers %eax 0xc)
32527 (write-buffered *(ebp+8) Space)
32528 (write-int32-hex-buffered *(ebp+8) *eax)
32529 (write-buffered *(ebp+8) "/x32")
32530 $emit-subx-x32:end:
32531
32532 59/pop-to-ecx
32533 58/pop-to-eax
32534
32535 89/<- %esp 5/r32/ebp
32536 5d/pop-to-ebp
32537 c3/return
32538
32539 emit-subx-imm32:
32540
32541 55/push-ebp
32542 89/<- %ebp 4/r32/esp
32543
32544 50/push-eax
32545 51/push-ecx
32546
32547 81 7/subop/compare *(ebp+0xc) 0/imm32
32548 0f 84/jump-if-= $emit-subx-imm32:end/disp32
32549
32550 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
32551 (lookup *eax *(eax+4))
32552 (lookup *eax *(eax+4))
32553 (write-buffered *(ebp+8) Space)
32554 (write-buffered *(ebp+8) %eax)
32555 (write-buffered *(ebp+8) "/imm32")
32556 $emit-subx-imm32:end:
32557
32558 59/pop-to-ecx
32559 58/pop-to-eax
32560
32561 89/<- %esp 5/r32/ebp
32562 5d/pop-to-ebp
32563 c3/return
32564
32565 emit-subx-imm8:
32566
32567 55/push-ebp
32568 89/<- %ebp 4/r32/esp
32569
32570 50/push-eax
32571 51/push-ecx
32572
32573 81 7/subop/compare *(ebp+0xc) 0/imm32
32574 0f 84/jump-if-= $emit-subx-imm32:end/disp32
32575
32576 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
32577 (lookup *eax *(eax+4))
32578 (lookup *eax *(eax+4))
32579 (write-buffered *(ebp+8) Space)
32580 (write-buffered *(ebp+8) %eax)
32581 (write-buffered *(ebp+8) "/imm8")
32582 $emit-subx-imm8:end:
32583
32584 59/pop-to-ecx
32585 58/pop-to-eax
32586
32587 89/<- %esp 5/r32/ebp
32588 5d/pop-to-ebp
32589 c3/return
32590
32591 emit-subx-disp32:
32592
32593 55/push-ebp
32594 89/<- %ebp 4/r32/esp
32595
32596 50/push-eax
32597 51/push-ecx
32598
32599 81 7/subop/compare *(ebp+0xc) 0/imm32
32600 0f 84/jump-if-= $emit-subx-disp32:end/disp32
32601
32602 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
32603 (lookup *eax *(eax+4))
32604 (lookup *eax *(eax+4))
32605 (write-buffered *(ebp+8) Space)
32606 (write-buffered *(ebp+8) %eax)
32607
32608
32609 8b/-> *(ebp+0x10) 0/r32/eax
32610 (lookup *(eax+4) *(eax+8))
32611 89/<- %ecx 0/r32/eax
32612 {
32613 (string-starts-with? %ecx "break")
32614 3d/compare-eax-and 0/imm32/false
32615 74/jump-if-= break/disp8
32616 (write-buffered *(ebp+8) ":break")
32617 }
32618
32619 {
32620 (string-starts-with? %ecx "loop")
32621 3d/compare-eax-and 0/imm32/false
32622 74/jump-if-= break/disp8
32623 (write-buffered *(ebp+8) ":loop")
32624 }
32625 (write-buffered *(ebp+8) "/disp32")
32626 $emit-subx-disp32:end:
32627
32628 59/pop-to-ecx
32629 58/pop-to-eax
32630
32631 89/<- %esp 5/r32/ebp
32632 5d/pop-to-ebp
32633 c3/return
32634
32635 emit-call:
32636
32637 55/push-ebp
32638 89/<- %ebp 4/r32/esp
32639
32640 50/push-eax
32641 51/push-ecx
32642
32643 (emit-indent *(ebp+8) *Curr-block-depth)
32644 (write-buffered *(ebp+8) "(")
32645
32646 8b/-> *(ebp+0xc) 1/r32/ecx
32647
32648 (lookup *(ecx+4) *(ecx+8))
32649 (write-buffered *(ebp+8) %eax)
32650
32651
32652 (lookup *(ecx+0xc) *(ecx+0x10))
32653 {
32654
32655 3d/compare-eax-and 0/imm32
32656 74/jump-if-= break/disp8
32657
32658 (emit-subx-call-operand *(ebp+8) %eax)
32659
32660 (lookup *(eax+8) *(eax+0xc))
32661 eb/jump loop/disp8
32662 }
32663
32664 (write-buffered *(ebp+8) ")\n")
32665 $emit-call:end:
32666
32667 59/pop-to-ecx
32668 58/pop-to-eax
32669
32670 89/<- %esp 5/r32/ebp
32671 5d/pop-to-ebp
32672 c3/return
32673
32674 emit-subx-call-operand:
32675
32676
32677 55/push-ebp
32678 89/<- %ebp 4/r32/esp
32679
32680 50/push-eax
32681 51/push-ecx
32682 56/push-esi
32683
32684 8b/-> *(ebp+0xc) 1/r32/ecx
32685
32686 (lookup *ecx *(ecx+4))
32687 89/<- %esi 0/r32/eax
32688
32689 {
32690 $emit-subx-call-operand:check-for-register-direct:
32691 81 7/subop/compare *(esi+0x18) 0/imm32
32692 74/jump-if-= break/disp8
32693 81 7/subop/compare *(ecx+0x10) 0/imm32/false
32694 75/jump-if-!= break/disp8
32695 $emit-subx-call-operand:register-direct:
32696 (write-buffered *(ebp+8) " %")
32697 (lookup *(esi+0x18) *(esi+0x1c))
32698 (write-buffered *(ebp+8) %eax)
32699 e9/jump $emit-subx-call-operand:end/disp32
32700 }
32701
32702 {
32703 $emit-subx-call-operand:check-for-register-indirect:
32704 81 7/subop/compare *(esi+0x18) 0/imm32
32705 74/jump-if-= break/disp8
32706 81 7/subop/compare *(ecx+0x10) 0/imm32/false
32707 74/jump-if-= break/disp8
32708 $emit-subx-call-operand:register-indirect:
32709 (emit-subx-call-operand-register-indirect *(ebp+8) %esi)
32710 e9/jump $emit-subx-call-operand:end/disp32
32711 }
32712
32713 {
32714 81 7/subop/compare *(esi+0x14) 0/imm32
32715 74/jump-if-= break/disp8
32716 $emit-subx-call-operand:stack:
32717 (emit-subx-call-operand-stack *(ebp+8) %esi)
32718 e9/jump $emit-subx-call-operand:end/disp32
32719 }
32720
32721 {
32722 (lookup *(esi+8) *(esi+0xc))
32723 81 7/subop/compare *(eax+4) 0/imm32
32724 75/jump-if-!= break/disp8
32725 $emit-subx-call-operand:literal:
32726 (write-buffered *(ebp+8) Space)
32727 (lookup *esi *(esi+4))
32728 (write-buffered *(ebp+8) %eax)
32729 e9/jump $emit-subx-call-operand:end/disp32
32730 }
32731
32732 {
32733 (lookup *(esi+8) *(esi+0xc))
32734 81 7/subop/compare *(eax+4) 0x10/imm32
32735 75/jump-if-!= break/disp8
32736 $emit-subx-call-operand:literal-string:
32737 (write-buffered *(ebp+8) Space)
32738 (lookup *esi *(esi+4))
32739 (write-buffered *(ebp+8) %eax)
32740 }
32741 $emit-subx-call-operand:end:
32742
32743 5e/pop-to-esi
32744 59/pop-to-ecx
32745 58/pop-to-eax
32746
32747 89/<- %esp 5/r32/ebp
32748 5d/pop-to-ebp
32749 c3/return
32750
32751 emit-subx-call-operand-register-indirect:
32752
32753 55/push-ebp
32754 89/<- %ebp 4/r32/esp
32755
32756 50/push-eax
32757 51/push-ecx
32758 56/push-esi
32759
32760 8b/-> *(ebp+0xc) 6/r32/esi
32761
32762 (size-of-deref %esi)
32763 89/<- %ecx 0/r32/eax
32764
32765 (lookup *(esi+0x18) *(esi+0x1c))
32766 89/<- %esi 0/r32/eax
32767
32768
32769 b8/copy-to-eax 0/imm32
32770 {
32771 $emit-subx-call-operand-register-indirect:loop:
32772
32773 39/compare %eax 1/r32/ecx
32774 7d/jump-if->= break/disp8
32775
32776 (write-buffered *(ebp+8) " *(")
32777 (write-buffered *(ebp+8) %esi)
32778 (write-buffered *(ebp+8) "+")
32779 (write-int32-hex-buffered *(ebp+8) %eax)
32780 (write-buffered *(ebp+8) ")")
32781
32782 05/add-to-eax 4/imm32
32783
32784 eb/jump loop/disp8
32785 }
32786 $emit-subx-call-operand-register-indirect:end:
32787
32788 5e/pop-to-esi
32789 59/pop-to-ecx
32790 58/pop-to-eax
32791
32792 89/<- %esp 5/r32/ebp
32793 5d/pop-to-ebp
32794 c3/return
32795
32796 emit-subx-call-operand-stack:
32797
32798 55/push-ebp
32799 89/<- %ebp 4/r32/esp
32800
32801 50/push-eax
32802 51/push-ecx
32803 56/push-esi
32804
32805 8b/-> *(ebp+0xc) 6/r32/esi
32806
32807 8b/-> *(esi+0x14) 1/r32/ecx
32808
32809 (size-of %esi)
32810
32811 01/add-to %eax 1/r32/ecx
32812 {
32813 $emit-subx-call-operand-stack:loop:
32814
32815 39/compare %ecx 0/r32/eax
32816 7d/jump-if->= break/disp8
32817
32818 (write-buffered *(ebp+8) " *(ebp+")
32819 (write-int32-hex-buffered *(ebp+8) %ecx)
32820 (write-buffered *(ebp+8) ")")
32821
32822 81 0/subop/add %ecx 4/imm32
32823
32824 eb/jump loop/disp8
32825 }
32826 $emit-subx-call-operand-stack:end:
32827
32828 5e/pop-to-esi
32829 59/pop-to-ecx
32830 58/pop-to-eax
32831
32832 89/<- %esp 5/r32/ebp
32833 5d/pop-to-ebp
32834 c3/return
32835
32836 emit-subx-var-as-rm32:
32837
32838 55/push-ebp
32839 89/<- %ebp 4/r32/esp
32840
32841 50/push-eax
32842 51/push-ecx
32843 56/push-esi
32844
32845 8b/-> *(ebp+0xc) 1/r32/ecx
32846
32847 (lookup *ecx *(ecx+4))
32848 89/<- %esi 0/r32/eax
32849
32850 {
32851 $emit-subx-var-as-rm32:check-for-register-indirect:
32852 81 7/subop/compare *(esi+0x18) 0/imm32
32853 74/jump-if-= break/disp8
32854 81 7/subop/compare *(ecx+0x10) 0/imm32/false
32855 74/jump-if-= break/disp8
32856 $emit-subx-var-as-rm32:register-indirect:
32857 (write-buffered *(ebp+8) " *")
32858 (lookup *(esi+0x18) *(esi+0x1c))
32859 (write-buffered *(ebp+8) %eax)
32860 e9/jump $emit-subx-var-as-rm32:end/disp32
32861 }
32862
32863 {
32864 $emit-subx-var-as-rm32:check-for-register-direct:
32865 81 7/subop/compare *(esi+0x18) 0/imm32
32866 74/jump-if-= break/disp8
32867 81 7/subop/compare *(ecx+0x10) 0/imm32/false
32868 75/jump-if-!= break/disp8
32869 $emit-subx-var-as-rm32:register-direct:
32870 (write-buffered *(ebp+8) " %")
32871 (lookup *(esi+0x18) *(esi+0x1c))
32872 (write-buffered *(ebp+8) %eax)
32873 e9/jump $emit-subx-var-as-rm32:end/disp32
32874 }
32875
32876 {
32877 81 7/subop/compare *(esi+0x14) 0/imm32
32878 74/jump-if-= break/disp8
32879 $emit-subx-var-as-rm32:stack:
32880 (write-buffered *(ebp+8) Space)
32881 (write-buffered *(ebp+8) "*(ebp+")
32882 (write-int32-hex-buffered *(ebp+8) *(esi+0x14))
32883 (write-buffered *(ebp+8) ")")
32884 }
32885 $emit-subx-var-as-rm32:end:
32886
32887 5e/pop-to-esi
32888 59/pop-to-ecx
32889 58/pop-to-eax
32890
32891 89/<- %esp 5/r32/ebp
32892 5d/pop-to-ebp
32893 c3/return
32894
32895 find-matching-primitive:
32896
32897 55/push-ebp
32898 89/<- %ebp 4/r32/esp
32899
32900 51/push-ecx
32901
32902 8b/-> *(ebp+8) 1/r32/ecx
32903 {
32904 $find-matching-primitive:loop:
32905
32906 81 7/subop/compare %ecx 0/imm32
32907 74/jump-if-= break/disp8
32908
32909 {
32910 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx)
32911 3d/compare-eax-and 0/imm32/false
32912 74/jump-if-= break/disp8
32913 89/<- %eax 1/r32/ecx
32914 eb/jump $find-matching-primitive:end/disp8
32915 }
32916 $find-matching-primitive:next-primitive:
32917
32918 (lookup *(ecx+0x3c) *(ecx+0x40))
32919 89/<- %ecx 0/r32/eax
32920
32921 e9/jump loop/disp32
32922 }
32923
32924 b8/copy-to-eax 0/imm32
32925 $find-matching-primitive:end:
32926
32927 59/pop-to-ecx
32928
32929 89/<- %esp 5/r32/ebp
32930 5d/pop-to-ebp
32931 c3/return
32932
32933 mu-stmt-matches-primitive?:
32934
32935
32936
32937
32938
32939
32940 55/push-ebp
32941 89/<- %ebp 4/r32/esp
32942
32943 51/push-ecx
32944 52/push-edx
32945 53/push-ebx
32946 56/push-esi
32947 57/push-edi
32948
32949 8b/-> *(ebp+8) 1/r32/ecx
32950
32951 8b/-> *(ebp+0xc) 2/r32/edx
32952 {
32953 $mu-stmt-matches-primitive?:check-name:
32954
32955
32956 (lookup *(ecx+4) *(ecx+8))
32957 89/<- %esi 0/r32/eax
32958
32959 (lookup *edx *(edx+4))
32960
32961
32962
32963 89/<- %edi 0/r32/eax
32964 (string-equal? %esi %edi)
32965 3d/compare-eax-and 0/imm32/false
32966 75/jump-if-!= break/disp8
32967 b8/copy-to-eax 0/imm32
32968 e9/jump $mu-stmt-matches-primitive?:end/disp32
32969 }
32970
32971 (lookup *(ecx+0xc) *(ecx+0x10))
32972 89/<- %esi 0/r32/eax
32973
32974 (lookup *(edx+8) *(edx+0xc))
32975 89/<- %edi 0/r32/eax
32976 {
32977 $mu-stmt-matches-primitive?:inouts-loop:
32978
32979 {
32980 $mu-stmt-matches-primitive?:check-both-inouts-null:
32981 81 7/subop/compare %esi 0/imm32
32982 75/jump-if-!= break/disp8
32983 $mu-stmt-matches-primitive?:stmt-inout-null:
32984 81 7/subop/compare %edi 0/imm32
32985 0f 84/jump-if-= $mu-stmt-matches-primitive?:check-outputs/disp32
32986 $mu-stmt-matches-primitive?:stmt-inout-null-and-prim-inout-not-null:
32987
32988 b8/copy-to-eax 0/imm32/false
32989 e9/jump $mu-stmt-matches-primitive?:end/disp32
32990 }
32991
32992 {
32993 $mu-stmt-matches-primitive?:check-prim-inout-null:
32994 81 7/subop/compare %edi 0/imm32
32995 75/jump-if-!= break/disp8
32996 $mu-stmt-matches-primitive?:prim-inout-null:
32997 b8/copy-to-eax 0/imm32/false
32998 e9/jump $mu-stmt-matches-primitive?:end/disp32
32999 }
33000
33001 {
33002 $mu-stmt-matches-primitive?:check-inouts-match:
33003 (lookup *edi *(edi+4))
33004 (operand-matches-primitive? %esi %eax)
33005 3d/compare-eax-and 0/imm32/false
33006 75/jump-if-!= break/disp8
33007 $mu-stmt-matches-primitive?:inouts-match:
33008 b8/copy-to-eax 0/imm32/false
33009 e9/jump $mu-stmt-matches-primitive?:end/disp32
33010 }
33011 $mu-stmt-matches-primitive?:next-inout:
33012
33013 (lookup *(esi+8) *(esi+0xc))
33014 89/<- %esi 0/r32/eax
33015
33016 (lookup *(edi+8) *(edi+0xc))
33017 89/<- %edi 0/r32/eax
33018
33019 e9/jump loop/disp32
33020 }
33021 $mu-stmt-matches-primitive?:check-outputs:
33022
33023 (lookup *(ecx+0x14) *(ecx+0x18))
33024 89/<- %esi 0/r32/eax
33025
33026 (lookup *(edx+0x10) *(edx+0x14))
33027 89/<- %edi 0/r32/eax
33028 {
33029 $mu-stmt-matches-primitive?:outputs-loop:
33030
33031 {
33032 $mu-stmt-matches-primitive?:check-both-outputs-null:
33033 81 7/subop/compare %esi 0/imm32
33034 75/jump-if-!= break/disp8
33035 {
33036 $mu-stmt-matches-primitive?:stmt-output-null:
33037 81 7/subop/compare %edi 0/imm32
33038 75/jump-if-!= break/disp8
33039 $mu-stmt-matches-primitive?:both-outputs-null:
33040
33041 b8/copy-to-eax 1/imm32
33042 e9/jump $mu-stmt-matches-primitive?:end/disp32
33043 }
33044 $mu-stmt-matches-primitive?:stmt-output-null-and-prim-output-not-null:
33045
33046 b8/copy-to-eax 0/imm32
33047 e9/jump $mu-stmt-matches-primitive?:end/disp32
33048 }
33049
33050 {
33051 $mu-stmt-matches-primitive?:check-prim-output-null:
33052 81 7/subop/compare %edi 0/imm32
33053 75/jump-if-!= break/disp8
33054 $mu-stmt-matches-primitive?:prim-output-is-null:
33055 b8/copy-to-eax 0/imm32
33056 e9/jump $mu-stmt-matches-primitive?:end/disp32
33057 }
33058
33059 {
33060 $mu-stmt-matches-primitive?:check-outputs-match:
33061 (lookup *edi *(edi+4))
33062 (operand-matches-primitive? %esi %eax)
33063 3d/compare-eax-and 0/imm32/false
33064 75/jump-if-!= break/disp8
33065 $mu-stmt-matches-primitive?:outputs-match:
33066 b8/copy-to-eax 0/imm32
33067 e9/jump $mu-stmt-matches-primitive?:end/disp32
33068 }
33069 $mu-stmt-matches-primitive?:next-output:
33070
33071 (lookup *(esi+8) *(esi+0xc))
33072 89/<- %esi 0/r32/eax
33073
33074 (lookup *(edi+8) *(edi+0xc))
33075 89/<- %edi 0/r32/eax
33076
33077 e9/jump loop/disp32
33078 }
33079 $mu-stmt-matches-primitive?:return-true:
33080 b8/copy-to-eax 1/imm32
33081 $mu-stmt-matches-primitive?:end:
33082
33083 5f/pop-to-edi
33084 5e/pop-to-esi
33085 5b/pop-to-ebx
33086 5a/pop-to-edx
33087 59/pop-to-ecx
33088
33089 89/<- %esp 5/r32/ebp
33090 5d/pop-to-ebp
33091 c3/return
33092
33093 operand-matches-primitive?:
33094
33095 55/push-ebp
33096 89/<- %ebp 4/r32/esp
33097
33098 51/push-ecx
33099 52/push-edx
33100 53/push-ebx
33101 56/push-esi
33102 57/push-edi
33103
33104 8b/-> *(ebp+8) 1/r32/ecx
33105
33106 (lookup *ecx *(ecx+4))
33107 89/<- %esi 0/r32/eax
33108
33109 8b/-> *(ebp+0xc) 7/r32/edi
33110 $operand-matches-primitive?:check-type:
33111
33112
33113 (lookup *(esi+8) *(esi+0xc))
33114 89/<- %ebx 0/r32/eax
33115
33116 {
33117 81 7/subop/compare *(ecx+0x10) 0/imm32/false
33118 74/jump-if-= break/disp8
33119 $operand-matches-primitive?:is-deref:
33120
33121 (lookup *(ebx+0xc) *(ebx+0x10))
33122
33123 81 7/subop/compare *eax 0/imm32/false
33124 {
33125 75/jump-if-!= break/disp8
33126 (lookup *(eax+4) *(eax+8))
33127 }
33128
33129 89/<- %ebx 0/r32/eax
33130 }
33131
33132 (lookup *(edi+8) *(edi+0xc))
33133 (subx-type-category-match? %ebx %eax)
33134 3d/compare-eax-and 0/imm32/false
33135 0f 84/jump-if-= $operand-matches-primitive?:return-false/disp32
33136 {
33137 $operand-matches-primitive?:check-register:
33138
33139 {
33140 81 7/subop/compare *(edi+0x18) 0/imm32
33141 0f 85/jump-if-!= break/disp32
33142 81 7/subop/compare *(esi+0x18) 0/imm32
33143 74/jump-if-= break/disp8
33144 81 7/subop/compare *(ecx+0x10) 0/imm32/false
33145 74/jump-if-= break/disp8
33146 $operand-matches-primitive?:var-deref-match:
33147 e9/jump $operand-matches-primitive?:return-true/disp32
33148 }
33149
33150 {
33151 81 7/subop/compare *(edi+0x18) 0/imm32
33152 0f 84/jump-if-= break/disp32
33153 81 7/subop/compare *(esi+0x18) 0/imm32
33154 0f 84/jump-if-= break/disp32
33155 81 7/subop/compare *(ecx+0x10) 0/imm32/false
33156 74/jump-if-= break/disp8
33157 $operand-matches-primitive?:var-deref-no-match:
33158 e9/jump $operand-matches-primitive?:return-false/disp32
33159 }
33160
33161 {
33162
33163
33164 (lookup *(esi+0x18) *(esi+0x1c))
33165 89/<- %ebx 0/r32/eax
33166
33167 (lookup *(edi+0x18) *(edi+0x1c))
33168 89/<- %ecx 0/r32/eax
33169
33170 39/compare %ecx 3/r32/ebx
33171 74/jump-if-= break/disp8
33172 $operand-matches-primitive?:var-register-no-match:
33173
33174 81 7/subop/compare %ebx 0/imm32
33175 74/jump-if-= $operand-matches-primitive?:return-false/disp8
33176 81 7/subop/compare %ecx 0/imm32
33177 74/jump-if-= $operand-matches-primitive?:return-false/disp8
33178
33179 (string-equal? %ecx "*")
33180 3d/compare-eax-and 0/imm32/false
33181 75/jump-if-!= break/disp8
33182 $operand-matches-primitive?:wildcard-no-match:
33183
33184 (string-equal? %ecx %ebx)
33185 3d/compare-eax-and 0/imm32/false
33186 74/jump-if-= $operand-matches-primitive?:return-false/disp8
33187 }
33188 }
33189 $operand-matches-primitive?:return-true:
33190 b8/copy-to-eax 1/imm32/true
33191 eb/jump $operand-matches-primitive?:end/disp8
33192 $operand-matches-primitive?:return-false:
33193 b8/copy-to-eax 0/imm32/false
33194 $operand-matches-primitive?:end:
33195
33196 5f/pop-to-edi
33197 5e/pop-to-esi
33198 5b/pop-to-ebx
33199 5a/pop-to-edx
33200 59/pop-to-ecx
33201
33202 89/<- %esp 5/r32/ebp
33203 5d/pop-to-ebp
33204 c3/return
33205
33206 find-matching-function:
33207
33208 55/push-ebp
33209 89/<- %ebp 4/r32/esp
33210
33211 51/push-ecx
33212
33213 8b/-> *(ebp+8) 1/r32/ecx
33214 {
33215
33216 81 7/subop/compare %ecx 0/imm32
33217 74/jump-if-= break/disp8
33218
33219
33220
33221 {
33222 (mu-stmt-matches-function? *(ebp+0xc) %ecx)
33223 3d/compare-eax-and 0/imm32/false
33224 74/jump-if-= break/disp8
33225 89/<- %eax 1/r32/ecx
33226 eb/jump $find-matching-function:end/disp8
33227 }
33228
33229 (lookup *(ecx+0x20) *(ecx+0x24))
33230 89/<- %ecx 0/r32/eax
33231
33232 eb/jump loop/disp8
33233 }
33234
33235 b8/copy-to-eax 0/imm32
33236 $find-matching-function:end:
33237
33238 59/pop-to-ecx
33239
33240 89/<- %esp 5/r32/ebp
33241 5d/pop-to-ebp
33242 c3/return
33243
33244
33245 mu-stmt-matches-function?:
33246
33247 55/push-ebp
33248 89/<- %ebp 4/r32/esp
33249
33250 51/push-ecx
33251
33252
33253 8b/-> *(ebp+8) 0/r32/eax
33254 (lookup *(eax+4) *(eax+8))
33255 89/<- %ecx 0/r32/eax
33256
33257 8b/-> *(ebp+0xc) 0/r32/eax
33258 (lookup *eax *(eax+4))
33259 (string-equal? %eax %ecx)
33260 $mu-stmt-matches-function?:end:
33261
33262 59/pop-to-ecx
33263
33264 89/<- %esp 5/r32/ebp
33265 5d/pop-to-ebp
33266 c3/return
33267
33268
33269
33270 subx-type-category-match?:
33271
33272 55/push-ebp
33273 89/<- %ebp 4/r32/esp
33274
33275 51/push-ecx
33276
33277 (type-category *(ebp+8))
33278 89/<- %ecx 0/r32/eax
33279
33280 (type-category *(ebp+0xc))
33281
33282 39/compare %eax 1/r32/ecx
33283 0f 94/set-byte-if-= %al
33284 81 4/subop/and %eax 0xff/imm32
33285 $subx-type-category-match?:end:
33286
33287 59/pop-to-ecx
33288
33289 89/<- %esp 5/r32/ebp
33290 5d/pop-to-ebp
33291 c3/return
33292
33293 type-category:
33294
33295 55/push-ebp
33296 89/<- %ebp 4/r32/esp
33297
33298 51/push-ecx
33299
33300 (is-simple-mu-type? *(ebp+8) 0)
33301 89/<- %ecx 0/r32/eax
33302
33303 (is-simple-mu-type? *(ebp+8) 0xf)
33304
33305 c1/shift 4/subop/left %ecx 1/imm8
33306 09/or %eax 1/r32/ecx
33307 $type-category:end:
33308
33309 59/pop-to-ecx
33310
33311 89/<- %esp 5/r32/ebp
33312 5d/pop-to-ebp
33313 c3/return
33314
33315 is-simple-mu-type?:
33316
33317 55/push-ebp
33318 89/<- %ebp 4/r32/esp
33319
33320 51/push-ecx
33321
33322 8b/-> *(ebp+0xc) 1/r32/ecx
33323
33324 8b/-> *(ebp+8) 0/r32/eax
33325 39/compare *(eax+4) 1/r32/ecx
33326 0f 94/set-byte-if-= %al
33327 81 4/subop/and %eax 0xff/imm32
33328 $is-simple-mu-type?:end:
33329
33330 59/pop-to-ecx
33331
33332 89/<- %esp 5/r32/ebp
33333 5d/pop-to-ebp
33334 c3/return
33335
33336 is-mu-addr-type?:
33337
33338 55/push-ebp
33339 89/<- %ebp 4/r32/esp
33340
33341 8b/-> *(ebp+8) 0/r32/eax
33342
33343 81 7/subop/compare *eax 0/imm32/false
33344 {
33345 75/jump-if-!= break/disp8
33346 (lookup *(eax+4) *(eax+8))
33347 }
33348
33349 81 7/subop/compare *(eax+4) 2/imm32/addr
33350 0f 94/set-byte-if-= %al
33351 81 4/subop/and %eax 0xff/imm32
33352 $is-mu-addr-type?:end:
33353
33354 89/<- %esp 5/r32/ebp
33355 5d/pop-to-ebp
33356 c3/return
33357
33358 is-mu-array-type?:
33359
33360 55/push-ebp
33361 89/<- %ebp 4/r32/esp
33362
33363 8b/-> *(ebp+8) 0/r32/eax
33364
33365 81 7/subop/compare *eax 0/imm32/false
33366 {
33367 75/jump-if-!= break/disp8
33368 (lookup *(eax+4) *(eax+8))
33369 }
33370
33371 81 7/subop/compare *(eax+4) 3/imm32/array
33372 0f 94/set-byte-if-= %al
33373 81 4/subop/and %eax 0xff/imm32
33374 $is-mu-array-type?:end:
33375
33376 89/<- %esp 5/r32/ebp
33377 5d/pop-to-ebp
33378 c3/return
33379
33380 is-mu-string-type?:
33381
33382 55/push-ebp
33383 89/<- %ebp 4/r32/esp
33384
33385 56/push-esi
33386
33387 8b/-> *(ebp+8) 6/r32/esi
33388
33389 81 7/subop/compare *esi 0/imm32/false
33390 0f 85/jump-if-!= $is-mu-string-type?:return-false/disp32
33391
33392 (is-mu-addr-type? %esi)
33393 3d/compare-eax-with 0/imm32/false
33394 0f 84/jump-if-= $is-mu-string-type?:end/disp32
33395
33396 (lookup *(esi+0xc) *(esi+0x10))
33397 (is-mu-array-type? %eax)
33398 3d/compare-eax-with 0/imm32/false
33399 74/jump-if-= $is-mu-string-type?:end/disp8
33400
33401 (lookup *(esi+0xc) *(esi+0x10))
33402 (lookup *(eax+0xc) *(eax+0x10))
33403
33404 81 7/subop/compare *eax 0/imm32/false
33405 75/jump-if-!= $is-mu-string-type?:return-false/disp8
33406
33407 (lookup *(eax+4) *(eax+8))
33408 (is-simple-mu-type? %eax 8)
33409 eb/jump $is-mu-string-type?:end/disp8
33410 $is-mu-string-type?:return-false:
33411 b8/copy-to-eax 0/imm32/false
33412 $is-mu-string-type?:end:
33413
33414 5e/pop-to-esi
33415
33416 89/<- %esp 5/r32/ebp
33417 5d/pop-to-ebp
33418 c3/return
33419
33420 is-mu-stream-type?:
33421
33422 55/push-ebp
33423 89/<- %ebp 4/r32/esp
33424
33425 8b/-> *(ebp+8) 0/r32/eax
33426
33427 81 7/subop/compare *eax 0/imm32/false
33428 {
33429 75/jump-if-!= break/disp8
33430 (lookup *(eax+4) *(eax+8))
33431 }
33432
33433 81 7/subop/compare *(eax+4) 0xb/imm32/stream
33434 0f 94/set-byte-if-= %al
33435 81 4/subop/and %eax 0xff/imm32
33436 $is-mu-stream-type?:end:
33437
33438 89/<- %esp 5/r32/ebp
33439 5d/pop-to-ebp
33440 c3/return
33441
33442 test-emit-subx-stmt-primitive:
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459 55/push-ebp
33460 89/<- %ebp 4/r32/esp
33461
33462 (clear-stream _test-output-stream)
33463 (clear-stream $_test-output-buffered-file->buffer)
33464
33465 $test-emit-subx-stmt-primitive:initialize-type:
33466
33467 68/push 0/imm32/right:null
33468 68/push 0/imm32/right:null
33469 68/push 0/imm32/left:unused
33470 68/push 1/imm32/value:int
33471 68/push 1/imm32/is-atom?:true
33472 68/push 0x11/imm32/alloc-id:fake:payload
33473 89/<- %ecx 4/r32/esp
33474 $test-emit-subx-stmt-primitive:initialize-var:
33475
33476 68/push 0/imm32/no-register
33477 68/push 0/imm32/no-register
33478 68/push -8/imm32/stack-offset
33479 68/push 1/imm32/block-depth
33480 51/push-ecx/type
33481 68/push 0x11/imm32/alloc-id:fake
33482 68/push 0/imm32/name
33483 68/push 0/imm32/name
33484 68/push 0x11/imm32/alloc-id:fake:payload
33485 89/<- %ecx 4/r32/esp
33486 $test-emit-subx-stmt-primitive:initialize-var-name:
33487
33488 8d/copy-address *(ecx+4) 0/r32/eax
33489 (copy-array Heap "foo" %eax)
33490 $test-emit-subx-stmt-primitive:initialize-stmt-var:
33491
33492 68/push 0/imm32/is-deref:false
33493 68/push 0/imm32/next
33494 68/push 0/imm32/next
33495 51/push-ecx/var-foo
33496 68/push 0x11/imm32/alloc-id:fake
33497 68/push 0x11/imm32/alloc-id:fake:payload
33498 89/<- %ebx 4/r32/esp
33499 $test-emit-subx-stmt-primitive:initialize-stmt:
33500
33501 68/push 0/imm32/no-outputs
33502 68/push 0/imm32/no-outputs
33503 53/push-ebx/inouts
33504 68/push 0x11/imm32/alloc-id:fake
33505 68/push 0/imm32/operation
33506 68/push 0/imm32/operation
33507 68/push 1/imm32/tag
33508 89/<- %esi 4/r32/esp
33509 $test-emit-subx-stmt-primitive:initialize-stmt-operation:
33510
33511 8d/copy-address *(esi+4) 0/r32/eax
33512 (copy-array Heap "increment" %eax)
33513 $test-emit-subx-stmt-primitive:initialize-primitive:
33514
33515 68/push 0/imm32/next
33516 68/push 0/imm32/next
33517 68/push 0/imm32/no-x32
33518 68/push 0/imm32/no-xm32
33519 68/push 0/imm32/no-disp32
33520 68/push 0/imm32/no-imm8
33521 68/push 0/imm32/no-imm32
33522 68/push 0/imm32/no-r32
33523 68/push 1/imm32/rm32-is-first-inout
33524 68/push 0/imm32/subx-name
33525 68/push 0/imm32/subx-name
33526 68/push 0/imm32/no-outputs
33527 68/push 0/imm32/no-outputs
33528 53/push-ebx/inouts
33529 68/push 0x11/imm32/alloc-id:fake
33530 68/push 0/imm32/name
33531 68/push 0/imm32/name
33532 89/<- %ebx 4/r32/esp
33533 $test-emit-subx-stmt-primitive:initialize-primitive-name:
33534
33535 (copy-array Heap "increment" %ebx)
33536 $test-emit-subx-stmt-primitive:initialize-primitive-subx-name:
33537
33538 8d/copy-address *(ebx+0x18) 0/r32/eax
33539 (copy-array Heap "ff 0/subop/increment" %eax)
33540
33541 c7 0/subop/copy *Curr-block-depth 0/imm32
33542 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
33543 (flush _test-output-buffered-file)
33544 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33550
33551 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-stmt-primitive")
33552
33553 89/<- %esp 5/r32/ebp
33554 5d/pop-to-ebp
33555 c3/return
33556
33557 test-emit-subx-stmt-primitive-register:
33558
33559
33560
33561
33562
33563
33564
33565
33566
33567
33568
33569
33570
33571
33572
33573
33574 55/push-ebp
33575 89/<- %ebp 4/r32/esp
33576
33577 (clear-stream _test-output-stream)
33578 (clear-stream $_test-output-buffered-file->buffer)
33579 $test-emit-subx-stmt-primitive-register:initialize-type:
33580
33581 68/push 0/imm32/right:null
33582 68/push 0/imm32/right:null
33583 68/push 0/imm32/left:unused
33584 68/push 1/imm32/value:int
33585 68/push 1/imm32/is-atom?:true
33586 68/push 0x11/imm32/alloc-id:fake:payload
33587 89/<- %ecx 4/r32/esp
33588 $test-emit-subx-stmt-primitive-register:initialize-var:
33589
33590 68/push 0/imm32/register
33591 68/push 0/imm32/register
33592 68/push 0/imm32/no-stack-offset
33593 68/push 1/imm32/block-depth
33594 51/push-ecx
33595 68/push 0x11/imm32/alloc-id:fake
33596 68/push 0/imm32/name
33597 68/push 0/imm32/name
33598 68/push 0x11/imm32/alloc-id:fake:payload
33599 89/<- %ecx 4/r32/esp
33600 $test-emit-subx-stmt-primitive-register:initialize-var-name:
33601
33602 8d/copy-address *(ecx+4) 0/r32/eax
33603 (copy-array Heap "foo" %eax)
33604 $test-emit-subx-stmt-primitive-register:initialize-var-register:
33605
33606 8d/copy-address *(ecx+0x1c) 0/r32/eax
33607 (copy-array Heap "eax" %eax)
33608 $test-emit-subx-stmt-primitive-register:initialize-stmt-var:
33609
33610 68/push 0/imm32/is-deref:false
33611 68/push 0/imm32/next
33612 68/push 0/imm32/next
33613 51/push-ecx/var-foo
33614 68/push 0x11/imm32/alloc-id:fake
33615 68/push 0x11/imm32/alloc-id:fake:payload
33616 89/<- %ebx 4/r32/esp
33617 $test-emit-subx-stmt-primitive-register:initialize-stmt:
33618
33619 53/push-ebx/outputs
33620 68/push 0x11/imm32/alloc-id:fake
33621 68/push 0/imm32/no-inouts
33622 68/push 0/imm32/no-inouts
33623 68/push 0/imm32/operation
33624 68/push 0/imm32/operation
33625 68/push 1/imm32
33626 89/<- %esi 4/r32/esp
33627 $test-emit-subx-stmt-primitive-register:initialize-stmt-operation:
33628
33629 8d/copy-address *(esi+4) 0/r32/eax
33630 (copy-array Heap "increment" %eax)
33631 $test-emit-subx-stmt-primitive-register:initialize-formal-var:
33632
33633 68/push 0/imm32/register
33634 68/push 0/imm32/register
33635 68/push 0/imm32/no-stack-offset
33636 68/push 1/imm32/block-depth
33637 ff 6/subop/push *(ecx+0x10)
33638 68/push 0x11/imm32/alloc-id:fake
33639 68/push 0/imm32/name
33640 68/push 0/imm32/name
33641 68/push 0x11/imm32/alloc-id:fake:payload
33642 89/<- %ebx 4/r32/esp
33643 $test-emit-subx-stmt-primitive-register:initialize-formal-var-name:
33644
33645 8d/copy-address *(ebx+4) 0/r32/eax
33646 (copy-array Heap "dummy" %eax)
33647 $test-emit-subx-stmt-primitive-register:initialize-formal-register:
33648
33649 8d/copy-address *(ebx+0x1c) 0/r32/eax
33650 (copy-array Heap "*" %eax)
33651 $test-emit-subx-stmt-primitive-register:initialize-var-list:
33652
33653 68/push 0/imm32/next
33654 68/push 0/imm32/next
33655 53/push-ebx/formal-var
33656 68/push 0x11/imm32/alloc-id:fake
33657 68/push 0x11/imm32/alloc-id:fake:payload
33658 89/<- %ebx 4/r32/esp
33659 $test-emit-subx-stmt-primitive-register:initialize-primitive:
33660
33661 68/push 0/imm32/next
33662 68/push 0/imm32/next
33663 68/push 0/imm32/no-x32
33664 68/push 0/imm32/no-xm32
33665 68/push 0/imm32/no-disp32
33666 68/push 0/imm32/no-imm8
33667 68/push 0/imm32/no-imm32
33668 68/push 0/imm32/no-r32
33669 68/push 3/imm32/rm32-is-first-output
33670 68/push 0/imm32/subx-name
33671 68/push 0/imm32/subx-name
33672 53/push-ebx/outputs
33673 68/push 0x11/imm32/alloc-id:fake
33674 68/push 0/imm32/no-inouts
33675 68/push 0/imm32/no-inouts
33676 68/push 0/imm32/name
33677 68/push 0/imm32/name
33678 89/<- %ebx 4/r32/esp
33679 $test-emit-subx-stmt-primitive-register:initialize-primitive-name:
33680
33681 (copy-array Heap "increment" %ebx)
33682 $test-emit-subx-stmt-primitive-register:initialize-primitive-subx-name:
33683
33684 8d/copy-address *(ebx+0x18) 0/r32/eax
33685 (copy-array Heap "ff 0/subop/increment" %eax)
33686
33687 c7 0/subop/copy *Curr-block-depth 0/imm32
33688 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
33689 (flush _test-output-buffered-file)
33690 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33696
33697 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-primitive-register")
33698
33699 89/<- %esp 5/r32/ebp
33700 5d/pop-to-ebp
33701 c3/return
33702
33703 test-emit-subx-stmt-select-primitive:
33704
33705
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716
33717
33718
33719
33720
33721
33722
33723 55/push-ebp
33724 89/<- %ebp 4/r32/esp
33725
33726 (clear-stream _test-output-stream)
33727 (clear-stream $_test-output-buffered-file->buffer)
33728 $test-emit-subx-stmt-select-primitive:initialize-type:
33729
33730 68/push 0/imm32/right:null
33731 68/push 0/imm32/right:null
33732 68/push 0/imm32/left:unused
33733 68/push 1/imm32/value:int
33734 68/push 1/imm32/is-atom?:true
33735 68/push 0x11/imm32/alloc-id:fake:payload
33736 89/<- %ecx 4/r32/esp
33737 $test-emit-subx-stmt-select-primitive:initialize-var:
33738
33739 68/push 0/imm32/register
33740 68/push 0/imm32/register
33741 68/push 0/imm32/no-stack-offset
33742 68/push 1/imm32/block-depth
33743 51/push-ecx
33744 68/push 0x11/imm32/alloc-id:fake
33745 68/push 0/imm32/name
33746 68/push 0/imm32/name
33747 68/push 0x11/imm32/alloc-id:fake:payload
33748 89/<- %ecx 4/r32/esp
33749 $test-emit-subx-stmt-select-primitive:initialize-var-name:
33750
33751 8d/copy-address *(ecx+4) 0/r32/eax
33752 (copy-array Heap "foo" %eax)
33753 $test-emit-subx-stmt-select-primitive:initialize-var-register:
33754
33755 8d/copy-address *(ecx+0x1c) 0/r32/eax
33756 (copy-array Heap "eax" %eax)
33757 $test-emit-subx-stmt-select-primitive:initialize-stmt-var:
33758
33759 68/push 0/imm32/is-deref:false
33760 68/push 0/imm32/next
33761 68/push 0/imm32/next
33762 51/push-ecx/var-foo
33763 68/push 0x11/imm32/alloc-id:fake
33764 68/push 0x11/imm32/alloc-id:fake:payload
33765 89/<- %ebx 4/r32/esp
33766 $test-emit-subx-stmt-select-primitive:initialize-stmt:
33767
33768 53/push-ebx/outputs
33769 68/push 0x11/imm32/alloc-id:fake
33770 68/push 0/imm32/no-inouts
33771 68/push 0/imm32/no-inouts
33772 68/push 0/imm32/operation
33773 68/push 0/imm32/operation
33774 68/push 1/imm32
33775 89/<- %esi 4/r32/esp
33776 $test-emit-subx-stmt-select-primitive:initialize-stmt-operation:
33777
33778 8d/copy-address *(esi+4) 0/r32/eax
33779 (copy-array Heap "increment" %eax)
33780 $test-emit-subx-stmt-select-primitive:initialize-formal-var:
33781
33782 68/push 0/imm32/register
33783 68/push 0/imm32/register
33784 68/push 0/imm32/no-stack-offset
33785 68/push 1/imm32/block-depth
33786 ff 6/subop/push *(ecx+0x10)
33787 68/push 0x11/imm32/alloc-id:fake
33788 68/push 0/imm32/name
33789 68/push 0/imm32/name
33790 68/push 0x11/imm32/alloc-id:fake:payload
33791 89/<- %ebx 4/r32/esp
33792 $test-emit-subx-stmt-select-primitive:initialize-formal-var-name:
33793
33794 8d/copy-address *(ebx+4) 0/r32/eax
33795 (copy-array Heap "dummy" %eax)
33796 $test-emit-subx-stmt-select-primitive:initialize-formal-register:
33797
33798 8d/copy-address *(ebx+0x1c) 0/r32/eax
33799 (copy-array Heap "*" %eax)
33800 $test-emit-subx-stmt-select-primitive:initialize-var-list:
33801
33802 68/push 0/imm32/next
33803 68/push 0/imm32/next
33804 53/push-ebx/formal-var
33805 68/push 0x11/imm32/alloc-id:fake
33806 68/push 0x11/imm32/alloc-id:fake:payload
33807 89/<- %ebx 4/r32/esp
33808 $test-emit-subx-stmt-select-primitive:initialize-primitive2:
33809
33810 68/push 0/imm32/next
33811 68/push 0/imm32/next
33812 68/push 0/imm32/no-x32
33813 68/push 0/imm32/no-xm32
33814 68/push 0/imm32/no-disp32
33815 68/push 0/imm32/no-imm8
33816 68/push 0/imm32/no-imm32
33817 68/push 0/imm32/no-r32
33818 68/push 3/imm32/rm32-is-first-output
33819 68/push 0/imm32/subx-name
33820 68/push 0/imm32/subx-name
33821 53/push-ebx/outputs
33822 68/push 0x11/imm32/alloc-id:fake
33823 68/push 0/imm32/no-inouts
33824 68/push 0/imm32/no-inouts
33825 68/push 0/imm32/name
33826 68/push 0/imm32/name
33827 68/push 0x11/imm32/alloc-id:fake:payload
33828 89/<- %edi 4/r32/esp
33829 $test-emit-subx-stmt-select-primitive:initialize-primitive2-name:
33830
33831 8d/copy-address *(edi+4) 0/r32/eax
33832 (copy-array Heap "increment" %eax)
33833 $test-emit-subx-stmt-select-primitive:initialize-primitive2-subx-name:
33834
33835 8d/copy-address *(edi+0x1c) 0/r32/eax
33836 (copy-array Heap "ff 0/subop/increment" %eax)
33837 $test-emit-subx-stmt-select-primitive:initialize-primitive:
33838
33839 57/push-edi
33840 68/push 0x11/imm32/alloc-id:fake
33841 68/push 0/imm32/no-x32
33842 68/push 0/imm32/no-xm32
33843 68/push 0/imm32/no-disp32
33844 68/push 0/imm32/no-imm8
33845 68/push 0/imm32/no-imm32
33846 68/push 0/imm32/no-r32
33847 68/push 1/imm32/rm32-is-first-inout
33848 68/push 0/imm32/subx-name
33849 68/push 0/imm32/subx-name
33850 68/push 0/imm32/no-outputs
33851 68/push 0/imm32/no-outputs
33852 53/push-ebx/inouts
33853 68/push 0x11/imm32/alloc-id:fake
33854 68/push 0/imm32/name
33855 68/push 0/imm32/name
33856 89/<- %ebx 4/r32/esp
33857 $test-emit-subx-stmt-select-primitive:initialize-primitive-name:
33858
33859 (copy-array Heap "increment" %ebx)
33860 $test-emit-subx-stmt-select-primitive:initialize-primitive-subx-name:
33861
33862 8d/copy-address *(ebx+0x18) 0/r32/eax
33863 (copy-array Heap "ff 0/subop/increment" %eax)
33864
33865 c7 0/subop/copy *Curr-block-depth 0/imm32
33866 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
33867 (flush _test-output-buffered-file)
33868 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
33874
33875 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive")
33876
33877 89/<- %esp 5/r32/ebp
33878 5d/pop-to-ebp
33879 c3/return
33880
33881 test-emit-subx-stmt-select-primitive-2:
33882
33883
33884
33885
33886
33887
33888
33889
33890
33891
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901 55/push-ebp
33902 89/<- %ebp 4/r32/esp
33903
33904 (clear-stream _test-output-stream)
33905 (clear-stream $_test-output-buffered-file->buffer)
33906 $test-emit-subx-stmt-select-primitive-2:initialize-type:
33907
33908 68/push 0/imm32/right:null
33909 68/push 0/imm32/right:null
33910 68/push 0/imm32/left:unused
33911 68/push 1/imm32/value:int
33912 68/push 1/imm32/is-atom?:true
33913 68/push 0x11/imm32/alloc-id:fake:payload
33914 89/<- %ecx 4/r32/esp
33915 $test-emit-subx-stmt-select-primitive-2:initialize-var:
33916
33917 68/push 0/imm32/register
33918 68/push 0/imm32/register
33919 68/push 0/imm32/no-stack-offset
33920 68/push 1/imm32/block-depth
33921 51/push-ecx
33922 68/push 0x11/imm32/alloc-id:fake
33923 68/push 0/imm32/name
33924 68/push 0/imm32/name
33925 68/push 0x11/imm32/alloc-id:fake:payload
33926 89/<- %ecx 4/r32/esp
33927 $test-emit-subx-stmt-select-primitive-2:initialize-var-name:
33928
33929 8d/copy-address *(ecx+4) 0/r32/eax
33930 (copy-array Heap "foo" %eax)
33931 $test-emit-subx-stmt-select-primitive-2:initialize-var-register:
33932
33933 8d/copy-address *(ecx+0x1c) 0/r32/eax
33934 (copy-array Heap "eax" %eax)
33935 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-var:
33936
33937 68/push 0/imm32/is-deref:false
33938 68/push 0/imm32/next
33939 68/push 0/imm32/next
33940 51/push-ecx/var-foo
33941 68/push 0x11/imm32/alloc-id:fake
33942 68/push 0x11/imm32/alloc-id:fake:payload
33943 89/<- %ebx 4/r32/esp
33944 $test-emit-subx-stmt-select-primitive-2:initialize-stmt:
33945
33946 68/push 0/imm32/no-outputs
33947 68/push 0/imm32/no-outputs
33948 53/push-ebx/inouts
33949 68/push 0x11/imm32/alloc-id:fake
33950 68/push 0/imm32/operation
33951 68/push 0/imm32/operation
33952 68/push 1/imm32
33953 89/<- %esi 4/r32/esp
33954 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-operation:
33955
33956 8d/copy-address *(esi+4) 0/r32/eax
33957 (copy-array Heap "increment" %eax)
33958 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var:
33959
33960 68/push 0/imm32/register
33961 68/push 0/imm32/register
33962 68/push 0/imm32/no-stack-offset
33963 68/push 1/imm32/block-depth
33964 ff 6/subop/push *(ecx+0x10)
33965 68/push 0x11/imm32/alloc-id:fake
33966 68/push 0/imm32/name
33967 68/push 0/imm32/name
33968 68/push 0x11/imm32/alloc-id:fake:payload
33969 89/<- %ebx 4/r32/esp
33970 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var-name:
33971
33972 8d/copy-address *(ebx+4) 0/r32/eax
33973 (copy-array Heap "dummy" %eax)
33974 $test-emit-subx-stmt-select-primitive-2:initialize-formal-register:
33975
33976 8d/copy-address *(ebx+0x1c) 0/r32/eax
33977 (copy-array Heap "*" %eax)
33978 $test-emit-subx-stmt-select-primitive-2:initialize-var-list:
33979
33980 68/push 0/imm32/next
33981 68/push 0/imm32/next
33982 53/push-ebx/formal-var
33983 68/push 0x11/imm32/alloc-id:fake
33984 68/push 0x11/imm32/alloc-id:fake:payload
33985 89/<- %ebx 4/r32/esp
33986 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2:
33987
33988 68/push 0/imm32/next
33989 68/push 0/imm32/next
33990 68/push 0/imm32/no-x32
33991 68/push 0/imm32/no-xm32
33992 68/push 0/imm32/no-disp32
33993 68/push 0/imm32/no-imm8
33994 68/push 0/imm32/no-imm32
33995 68/push 0/imm32/no-r32
33996 68/push 3/imm32/rm32-is-first-output
33997 68/push 0/imm32/subx-name
33998 68/push 0/imm32/subx-name
33999 53/push-ebx/outputs
34000 68/push 0x11/imm32/alloc-id:fake
34001 68/push 0/imm32/no-inouts
34002 68/push 0/imm32/no-inouts
34003 68/push 0/imm32/name
34004 68/push 0/imm32/name
34005 68/push 0x11/imm32/alloc-id:fake:payload
34006 89/<- %edi 4/r32/esp
34007 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-name:
34008
34009 8d/copy-address *(edi+4) 0/r32/eax
34010 (copy-array Heap "increment" %eax)
34011 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-subx-name:
34012
34013 8d/copy-address *(edi+0x1c) 0/r32/eax
34014 (copy-array Heap "ff 0/subop/increment" %eax)
34015 $test-emit-subx-stmt-select-primitive-2:initialize-primitive:
34016
34017 57/push-edi
34018 68/push 0x11/imm32/alloc-id:fake
34019 68/push 0/imm32/no-x32
34020 68/push 0/imm32/no-xm32
34021 68/push 0/imm32/no-disp32
34022 68/push 0/imm32/no-imm8
34023 68/push 0/imm32/no-imm32
34024 68/push 0/imm32/no-r32
34025 68/push 1/imm32/rm32-is-first-inout
34026 68/push 0/imm32/subx-name
34027 68/push 0/imm32/subx-name
34028 68/push 0/imm32/no-outputs
34029 68/push 0/imm32/no-outputs
34030 53/push-ebx/inouts
34031 68/push 0x11/imm32/alloc-id:fake
34032 68/push 0/imm32/name
34033 68/push 0/imm32/name
34034 89/<- %ebx 4/r32/esp
34035 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-name:
34036
34037 (copy-array Heap "increment" %ebx)
34038 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-subx-name:
34039
34040 8d/copy-address *(ebx+0x18) 0/r32/eax
34041 (copy-array Heap "ff 0/subop/increment" %eax)
34042
34043 c7 0/subop/copy *Curr-block-depth 0/imm32
34044 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
34045 (flush _test-output-buffered-file)
34046 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34052
34053 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive-2")
34054
34055 89/<- %esp 5/r32/ebp
34056 5d/pop-to-ebp
34057 c3/return
34058
34059 test-increment-register:
34060
34061
34062
34063
34064
34065
34066
34067
34068
34069
34070
34071
34072
34073 55/push-ebp
34074 89/<- %ebp 4/r32/esp
34075
34076 (clear-stream _test-output-stream)
34077 (clear-stream $_test-output-buffered-file->buffer)
34078 $test-increment-register:initialize-type:
34079
34080 68/push 0/imm32/right:null
34081 68/push 0/imm32/right:null
34082 68/push 0/imm32/left:unused
34083 68/push 1/imm32/value:int
34084 68/push 1/imm32/is-atom?:true
34085 68/push 0x11/imm32/alloc-id:fake:payload
34086 89/<- %ecx 4/r32/esp
34087 $test-increment-register:initialize-var:
34088
34089 68/push 0/imm32/register
34090 68/push 0/imm32/register
34091 68/push 0/imm32/no-stack-offset
34092 68/push 1/imm32/block-depth
34093 51/push-ecx
34094 68/push 0x11/imm32/alloc-id:fake
34095 68/push 0/imm32/name
34096 68/push 0/imm32/name
34097 68/push 0x11/imm32/alloc-id:fake:payload
34098 89/<- %ecx 4/r32/esp
34099 $test-increment-register:initialize-var-name:
34100
34101 8d/copy-address *(ecx+4) 0/r32/eax
34102 (copy-array Heap "foo" %eax)
34103 $test-increment-register:initialize-var-register:
34104
34105 8d/copy-address *(ecx+0x1c) 0/r32/eax
34106 (copy-array Heap "eax" %eax)
34107 $test-increment-register:initialize-stmt-var:
34108
34109 68/push 0/imm32/is-deref:false
34110 68/push 0/imm32/next
34111 68/push 0/imm32/next
34112 51/push-ecx/var-foo
34113 68/push 0x11/imm32/alloc-id:fake
34114 68/push 0x11/imm32/alloc-id:fake:payload
34115 89/<- %ebx 4/r32/esp
34116 $test-increment-register:initialize-stmt:
34117
34118 53/push-ebx/outputs
34119 68/push 0x11/imm32/alloc-id:fake
34120 68/push 0/imm32/no-inouts
34121 68/push 0/imm32/no-inouts
34122 68/push 0/imm32/operation
34123 68/push 0/imm32/operation
34124 68/push 1/imm32
34125 89/<- %esi 4/r32/esp
34126 $test-increment-register:initialize-stmt-operation:
34127
34128 8d/copy-address *(esi+4) 0/r32/eax
34129 (copy-array Heap "increment" %eax)
34130
34131 c7 0/subop/copy *Curr-block-depth 0/imm32
34132 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34133 (flush _test-output-buffered-file)
34134 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34140
34141 (check-next-stream-line-equal _test-output-stream "40/increment-eax" "F - test-increment-register")
34142
34143 89/<- %esp 5/r32/ebp
34144 5d/pop-to-ebp
34145 c3/return
34146
34147 test-add-reg-to-reg:
34148
34149
34150
34151
34152
34153 55/push-ebp
34154 89/<- %ebp 4/r32/esp
34155
34156 (clear-stream _test-output-stream)
34157 (clear-stream $_test-output-buffered-file->buffer)
34158 $test-add-reg-to-reg:initialize-type:
34159
34160 68/push 0/imm32/right:null
34161 68/push 0/imm32/right:null
34162 68/push 0/imm32/left:unused
34163 68/push 1/imm32/value:int
34164 68/push 1/imm32/is-atom?:true
34165 68/push 0x11/imm32/alloc-id:fake:payload
34166 89/<- %ecx 4/r32/esp
34167 $test-add-reg-to-reg:initialize-var1:
34168
34169 68/push 0/imm32/register
34170 68/push 0/imm32/register
34171 68/push 0/imm32/no-stack-offset
34172 68/push 1/imm32/block-depth
34173 51/push-ecx
34174 68/push 0x11/imm32/alloc-id:fake
34175 68/push 0/imm32/name
34176 68/push 0/imm32/name
34177 68/push 0x11/imm32/alloc-id:fake:payload
34178 89/<- %ecx 4/r32/esp
34179 $test-add-reg-to-reg:initialize-var1-name:
34180
34181 8d/copy-address *(ecx+4) 0/r32/eax
34182 (copy-array Heap "var1" %eax)
34183 $test-add-reg-to-reg:initialize-var1-register:
34184
34185 8d/copy-address *(ecx+0x1c) 0/r32/eax
34186 (copy-array Heap "eax" %eax)
34187 $test-add-reg-to-reg:initialize-var2:
34188
34189 68/push 0/imm32/register
34190 68/push 0/imm32/register
34191 68/push 0/imm32/no-stack-offset
34192 68/push 1/imm32/block-depth
34193 ff 6/subop/push *(ecx+0x10)
34194 68/push 0x11/imm32/alloc-id:fake
34195 68/push 0/imm32/name
34196 68/push 0/imm32/name
34197 68/push 0x11/imm32/alloc-id:fake:payload
34198 89/<- %edx 4/r32/esp
34199 $test-add-reg-to-reg:initialize-var2-name:
34200
34201 8d/copy-address *(edx+4) 0/r32/eax
34202 (copy-array Heap "var2" %eax)
34203 $test-add-reg-to-reg:initialize-var2-register:
34204
34205 8d/copy-address *(edx+0x1c) 0/r32/eax
34206 (copy-array Heap "ecx" %eax)
34207 $test-add-reg-to-reg:initialize-inouts:
34208
34209 68/push 0/imm32/is-deref:false
34210 68/push 0/imm32/next
34211 68/push 0/imm32/next
34212 52/push-edx/var2
34213 68/push 0x11/imm32/alloc-id:fake
34214 68/push 0x11/imm32/alloc-id:fake:payload
34215 89/<- %esi 4/r32/esp
34216 $test-add-reg-to-reg:initialize-outputs:
34217
34218 68/push 0/imm32/is-deref:false
34219 68/push 0/imm32/next
34220 68/push 0/imm32/next
34221 51/push-ecx/var1
34222 68/push 0x11/imm32/alloc-id:fake
34223 68/push 0x11/imm32/alloc-id:fake:payload
34224 89/<- %edi 4/r32/esp
34225 $test-add-reg-to-reg:initialize-stmt:
34226
34227 68/push 0/imm32/next
34228 68/push 0/imm32/next
34229 57/push-edi/outputs
34230 68/push 0x11/imm32/alloc-id:fake
34231 56/push-esi/inouts
34232 68/push 0x11/imm32/alloc-id:fake
34233 68/push 0/imm32/operation
34234 68/push 0/imm32/operation
34235 68/push 1/imm32/tag:stmt1
34236 89/<- %esi 4/r32/esp
34237 $test-add-reg-to-reg:initialize-stmt-operation:
34238
34239 8d/copy-address *(esi+4) 0/r32/eax
34240 (copy-array Heap "add" %eax)
34241
34242 c7 0/subop/copy *Curr-block-depth 0/imm32
34243 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34244 (flush _test-output-buffered-file)
34245 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34251
34252 (check-next-stream-line-equal _test-output-stream "01/add-to %eax 0x00000001/r32" "F - test-add-reg-to-reg")
34253
34254 89/<- %esp 5/r32/ebp
34255 5d/pop-to-ebp
34256 c3/return
34257
34258 test-add-reg-to-mem:
34259
34260
34261
34262
34263
34264 55/push-ebp
34265 89/<- %ebp 4/r32/esp
34266
34267 (clear-stream _test-output-stream)
34268 (clear-stream $_test-output-buffered-file->buffer)
34269 $test-add-reg-to-mem:initialize-type:
34270
34271 68/push 0/imm32/right:null
34272 68/push 0/imm32/right:null
34273 68/push 0/imm32/left:unused
34274 68/push 1/imm32/value:int
34275 68/push 1/imm32/is-atom?:true
34276 68/push 0x11/imm32/alloc-id:fake:payload
34277 89/<- %ecx 4/r32/esp
34278 $test-add-reg-to-mem:initialize-var1:
34279
34280 68/push 0/imm32/register
34281 68/push 0/imm32/register
34282 68/push 8/imm32/stack-offset
34283 68/push 1/imm32/block-depth
34284 51/push-ecx
34285 68/push 0x11/imm32/alloc-id:fake
34286 68/push 0/imm32/name
34287 68/push 0/imm32/name
34288 68/push 0x11/imm32/alloc-id:fake:payload
34289 89/<- %ecx 4/r32/esp
34290 $test-add-reg-to-mem:initialize-var1-name:
34291
34292 8d/copy-address *(ecx+4) 0/r32/eax
34293 (copy-array Heap "var1" %eax)
34294 $test-add-reg-to-mem:initialize-var2:
34295
34296 68/push 0/imm32/register
34297 68/push 0/imm32/register
34298 68/push 0/imm32/no-stack-offset
34299 68/push 1/imm32/block-depth
34300 ff 6/subop/push *(ecx+0x10)
34301 68/push 0x11/imm32/alloc-id:fake
34302 68/push 0/imm32/name
34303 68/push 0/imm32/name
34304 68/push 0x11/imm32/alloc-id:fake:payload
34305 89/<- %edx 4/r32/esp
34306 $test-add-reg-to-mem:initialize-var2-name:
34307
34308 8d/copy-address *(edx+4) 0/r32/eax
34309 (copy-array Heap "var2" %eax)
34310 $test-add-reg-to-mem:initialize-var2-register:
34311
34312 8d/copy-address *(edx+0x1c) 0/r32/eax
34313 (copy-array Heap "ecx" %eax)
34314 $test-add-reg-to-mem:initialize-inouts:
34315
34316 68/push 0/imm32/is-deref:false
34317 68/push 0/imm32/next
34318 68/push 0/imm32/next
34319 52/push-edx/var2
34320 68/push 0x11/imm32/alloc-id:fake
34321 68/push 0x11/imm32/alloc-id:fake:payload
34322 89/<- %esi 4/r32/esp
34323
34324 68/push 0/imm32/is-deref:false
34325 56/push-esi/next
34326 68/push 0x11/imm32/alloc-id:fake
34327 51/push-ecx/var1
34328 68/push 0x11/imm32/alloc-id:fake
34329 68/push 0x11/imm32/alloc-id:fake:payload
34330 89/<- %esi 4/r32/esp
34331 $test-add-reg-to-mem:initialize-stmt:
34332
34333 68/push 0/imm32/next
34334 68/push 0/imm32/next
34335 68/push 0/imm32/outputs
34336 68/push 0/imm32/outputs
34337 56/push-esi/inouts
34338 68/push 0x11/imm32/alloc-id:fake
34339 68/push 0/imm32/operation
34340 68/push 0/imm32/operation
34341 68/push 1/imm32/tag:stmt1
34342 89/<- %esi 4/r32/esp
34343 $test-add-reg-to-mem:initialize-stmt-operation:
34344
34345 8d/copy-address *(esi+4) 0/r32/eax
34346 (copy-array Heap "add-to" %eax)
34347
34348 c7 0/subop/copy *Curr-block-depth 0/imm32
34349 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34350 (flush _test-output-buffered-file)
34351 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34357
34358 (check-next-stream-line-equal _test-output-stream "01/add-to *(ebp+0x00000008) 0x00000001/r32" "F - test-add-reg-to-mem")
34359
34360 89/<- %esp 5/r32/ebp
34361 5d/pop-to-ebp
34362 c3/return
34363
34364 test-add-mem-to-reg:
34365
34366
34367
34368
34369
34370 55/push-ebp
34371 89/<- %ebp 4/r32/esp
34372
34373 (clear-stream _test-output-stream)
34374 (clear-stream $_test-output-buffered-file->buffer)
34375 $test-add-mem-to-reg:initialize-type:
34376
34377 68/push 0/imm32/right:null
34378 68/push 0/imm32/right:null
34379 68/push 0/imm32/left:unused
34380 68/push 1/imm32/value:int
34381 68/push 1/imm32/is-atom?:true
34382 68/push 0x11/imm32/alloc-id:fake:payload
34383 89/<- %ecx 4/r32/esp
34384 $test-add-mem-to-reg:initialize-var:
34385
34386 68/push 0/imm32/register
34387 68/push 0/imm32/register
34388 68/push 0/imm32/no-stack-offset
34389 68/push 1/imm32/block-depth
34390 51/push-ecx
34391 68/push 0x11/imm32/alloc-id:fake
34392 68/push 0/imm32/name
34393 68/push 0/imm32/name
34394 68/push 0x11/imm32/alloc-id:fake:payload
34395 89/<- %ecx 4/r32/esp
34396 $test-add-mem-to-reg:initialize-var-name:
34397
34398 8d/copy-address *(ecx+4) 0/r32/eax
34399 (copy-array Heap "var1" %eax)
34400 $test-add-mem-to-reg:initialize-var-register:
34401
34402 8d/copy-address *(ecx+0x1c) 0/r32/eax
34403 (copy-array Heap "eax" %eax)
34404 $test-add-mem-to-reg:initialize-var2:
34405
34406 68/push 0/imm32/register
34407 68/push 0/imm32/register
34408 68/push 8/imm32/stack-offset
34409 68/push 1/imm32/block-depth
34410 ff 6/subop/push *(ecx+0x10)
34411 68/push 0x11/imm32/alloc-id:fake
34412 68/push 0/imm32/name
34413 68/push 0/imm32/name
34414 68/push 0x11/imm32/alloc-id:fake:payload
34415 89/<- %edx 4/r32/esp
34416 $test-add-mem-to-reg:initialize-var2-name:
34417
34418 8d/copy-address *(edx+4) 0/r32/eax
34419 (copy-array Heap "var2" %eax)
34420 $test-add-mem-to-reg:initialize-inouts:
34421
34422 68/push 0/imm32/is-deref:false
34423 68/push 0/imm32/next
34424 68/push 0/imm32/next
34425 52/push-edx/var2
34426 68/push 0x11/imm32/alloc-id:fake
34427 68/push 0x11/imm32/alloc-id:fake:payload
34428 89/<- %esi 4/r32/esp
34429 $test-add-mem-to-reg:initialize-outputs:
34430
34431 68/push 0/imm32/is-deref:false
34432 68/push 0/imm32/next
34433 68/push 0/imm32/next
34434 51/push-ecx/var1
34435 68/push 0x11/imm32/alloc-id:fake
34436 68/push 0x11/imm32/alloc-id:fake:payload
34437 89/<- %edi 4/r32/esp
34438 $test-add-mem-to-reg:initialize-stmt:
34439
34440 68/push 0/imm32/next
34441 68/push 0/imm32/next
34442 57/push-edi/outputs
34443 68/push 0x11/imm32/alloc-id:fake
34444 56/push-esi/inouts
34445 68/push 0x11/imm32/alloc-id:fake
34446 68/push 0/imm32/operation
34447 68/push 0/imm32/operation
34448 68/push 1/imm32/tag:stmt1
34449 89/<- %esi 4/r32/esp
34450 $test-add-mem-to-reg:initialize-stmt-operation:
34451
34452 8d/copy-address *(esi+4) 0/r32/eax
34453 (copy-array Heap "add" %eax)
34454
34455 c7 0/subop/copy *Curr-block-depth 0/imm32
34456 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34457 (flush _test-output-buffered-file)
34458 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34464
34465 (check-next-stream-line-equal _test-output-stream "03/add *(ebp+0x00000008) 0x00000000/r32" "F - test-add-mem-to-reg")
34466
34467 89/<- %esp 5/r32/ebp
34468 5d/pop-to-ebp
34469 c3/return
34470
34471 test-add-literal-to-eax:
34472
34473
34474
34475
34476
34477 55/push-ebp
34478 89/<- %ebp 4/r32/esp
34479
34480 (clear-stream _test-output-stream)
34481 (clear-stream $_test-output-buffered-file->buffer)
34482 $test-add-literal-to-eax:initialize-var-type:
34483
34484 68/push 0/imm32/right:null
34485 68/push 0/imm32/right:null
34486 68/push 0/imm32/left:unused
34487 68/push 1/imm32/value:int
34488 68/push 1/imm32/is-atom?:true
34489 68/push 0x11/imm32/alloc-id:fake:payload
34490 89/<- %ecx 4/r32/esp
34491 $test-add-literal-to-eax:initialize-var:
34492
34493 68/push 0/imm32/register
34494 68/push 0/imm32/register
34495 68/push 0/imm32/no-stack-offset
34496 68/push 1/imm32/block-depth
34497 51/push-ecx
34498 68/push 0x11/imm32/alloc-id:fake
34499 68/push 0/imm32/name
34500 68/push 0/imm32/name
34501 68/push 0x11/imm32/alloc-id:fake:payload
34502 89/<- %ecx 4/r32/esp
34503 $test-add-literal-to-eax:initialize-var-name:
34504
34505 8d/copy-address *(ecx+4) 0/r32/eax
34506 (copy-array Heap "v" %eax)
34507 $test-add-literal-to-eax:initialize-var-register:
34508
34509 8d/copy-address *(ecx+0x1c) 0/r32/eax
34510 (copy-array Heap "eax" %eax)
34511 $test-add-literal-to-eax:initialize-literal-type:
34512
34513 68/push 0/imm32/right:null
34514 68/push 0/imm32/right:null
34515 68/push 0/imm32/left:unused
34516 68/push 0/imm32/value:literal
34517 68/push 1/imm32/is-atom?:true
34518 68/push 0x11/imm32/alloc-id:fake:payload
34519 89/<- %edx 4/r32/esp
34520 $test-add-literal-to-eax:initialize-literal:
34521
34522 68/push 0/imm32/register
34523 68/push 0/imm32/register
34524 68/push 0/imm32/no-stack-offset
34525 68/push 1/imm32/block-depth
34526 52/push-edx
34527 68/push 0x11/imm32/alloc-id:fake
34528 68/push 0/imm32/name
34529 68/push 0/imm32/name
34530 68/push 0x11/imm32/alloc-id:fake:payload
34531 89/<- %edx 4/r32/esp
34532 $test-add-literal-to-eax:initialize-literal-value:
34533
34534 8d/copy-address *(edx+4) 0/r32/eax
34535 (copy-array Heap "0x34" %eax)
34536 $test-add-literal-to-eax:initialize-inouts:
34537
34538 68/push 0/imm32/is-deref:false
34539 68/push 0/imm32/next
34540 68/push 0/imm32/next
34541 52/push-edx/l
34542 68/push 0x11/imm32/alloc-id:fake
34543 68/push 0x11/imm32/alloc-id:fake:payload
34544 89/<- %esi 4/r32/esp
34545 $test-add-literal-to-eax:initialize-outputs:
34546
34547 68/push 0/imm32/is-deref:false
34548 68/push 0/imm32/next
34549 68/push 0/imm32/next
34550 51/push-ecx/v
34551 68/push 0x11/imm32/alloc-id:fake
34552 68/push 0x11/imm32/alloc-id:fake:payload
34553 89/<- %edi 4/r32/esp
34554 $test-add-literal-to-eax:initialize-stmt:
34555
34556 68/push 0/imm32/next
34557 68/push 0/imm32/next
34558 57/push-edi/outputs
34559 68/push 0x11/imm32/alloc-id:fake
34560 56/push-esi/inouts
34561 68/push 0x11/imm32/alloc-id:fake
34562 68/push 0/imm32/operation
34563 68/push 0/imm32/operation
34564 68/push 1/imm32/tag:stmt1
34565 89/<- %esi 4/r32/esp
34566 $test-add-literal-to-eax:initialize-stmt-operation:
34567
34568 8d/copy-address *(esi+4) 0/r32/eax
34569 (copy-array Heap "add" %eax)
34570
34571 c7 0/subop/copy *Curr-block-depth 0/imm32
34572 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34573 (flush _test-output-buffered-file)
34574 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34580
34581 (check-next-stream-line-equal _test-output-stream "05/add-to-eax 0x34/imm32" "F - test-add-literal-to-eax")
34582
34583 89/<- %esp 5/r32/ebp
34584 5d/pop-to-ebp
34585 c3/return
34586
34587 test-add-literal-to-reg:
34588
34589
34590
34591
34592
34593 55/push-ebp
34594 89/<- %ebp 4/r32/esp
34595
34596 (clear-stream _test-output-stream)
34597 (clear-stream $_test-output-buffered-file->buffer)
34598 $test-add-literal-to-reg:initialize-var-type:
34599
34600 68/push 0/imm32/right:null
34601 68/push 0/imm32/right:null
34602 68/push 0/imm32/left:unused
34603 68/push 1/imm32/value:int
34604 68/push 1/imm32/is-atom?:true
34605 68/push 0x11/imm32/alloc-id:fake:payload
34606 89/<- %ecx 4/r32/esp
34607 $test-add-literal-to-reg:initialize-var:
34608
34609 68/push 0/imm32/register
34610 68/push 0/imm32/register
34611 68/push 0/imm32/no-stack-offset
34612 68/push 1/imm32/block-depth
34613 51/push-ecx
34614 68/push 0x11/imm32/alloc-id:fake
34615 68/push 0/imm32/name
34616 68/push 0/imm32/name
34617 68/push 0x11/imm32/alloc-id:fake:payload
34618 89/<- %ecx 4/r32/esp
34619 $test-add-literal-to-reg:initialize-var-name:
34620
34621 8d/copy-address *(ecx+4) 0/r32/eax
34622 (copy-array Heap "v" %eax)
34623 $test-add-literal-to-reg:initialize-var-register:
34624
34625 8d/copy-address *(ecx+0x1c) 0/r32/eax
34626 (copy-array Heap "ecx" %eax)
34627 $test-add-literal-to-reg:initialize-literal-type:
34628
34629 68/push 0/imm32/right:null
34630 68/push 0/imm32/right:null
34631 68/push 0/imm32/left:unused
34632 68/push 0/imm32/value:literal
34633 68/push 1/imm32/is-atom?:true
34634 68/push 0x11/imm32/alloc-id:fake:payload
34635 89/<- %edx 4/r32/esp
34636 $test-add-literal-to-reg:initialize-literal:
34637
34638 68/push 0/imm32/register
34639 68/push 0/imm32/register
34640 68/push 0/imm32/no-stack-offset
34641 68/push 1/imm32/block-depth
34642 52/push-edx
34643 68/push 0x11/imm32/alloc-id:fake
34644 68/push 0/imm32/name
34645 68/push 0/imm32/name
34646 68/push 0x11/imm32/alloc-id:fake:payload
34647 89/<- %edx 4/r32/esp
34648 $test-add-literal-to-reg:initialize-literal-value:
34649
34650 8d/copy-address *(edx+4) 0/r32/eax
34651 (copy-array Heap "0x34" %eax)
34652 $test-add-literal-to-reg:initialize-inouts:
34653
34654 68/push 0/imm32/is-deref:false
34655 68/push 0/imm32/next
34656 68/push 0/imm32/next
34657 52/push-edx/l
34658 68/push 0x11/imm32/alloc-id:fake
34659 68/push 0x11/imm32/alloc-id:fake:payload
34660 89/<- %esi 4/r32/esp
34661 $test-add-literal-to-reg:initialize-outputs:
34662
34663 68/push 0/imm32/is-deref:false
34664 68/push 0/imm32/next
34665 68/push 0/imm32/next
34666 51/push-ecx/v
34667 68/push 0x11/imm32/alloc-id:fake
34668 68/push 0x11/imm32/alloc-id:fake:payload
34669 89/<- %edi 4/r32/esp
34670 $test-add-literal-to-reg:initialize-stmt:
34671
34672 68/push 0/imm32/next
34673 68/push 0/imm32/next
34674 57/push-edi/outputs
34675 68/push 0x11/imm32/alloc-id:fake
34676 56/push-esi/inouts
34677 68/push 0x11/imm32/alloc-id:fake
34678 68/push 0/imm32/operation
34679 68/push 0/imm32/operation
34680 68/push 1/imm32/tag:stmt1
34681 89/<- %esi 4/r32/esp
34682 $test-add-literal-to-reg:initialize-stmt-operation:
34683
34684 8d/copy-address *(esi+4) 0/r32/eax
34685 (copy-array Heap "add" %eax)
34686
34687 c7 0/subop/copy *Curr-block-depth 0/imm32
34688 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34689 (flush _test-output-buffered-file)
34690 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34696
34697 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %ecx 0x34/imm32" "F - test-add-literal-to-reg")
34698
34699 89/<- %esp 5/r32/ebp
34700 5d/pop-to-ebp
34701 c3/return
34702
34703 test-add-literal-to-mem:
34704
34705
34706
34707
34708
34709 55/push-ebp
34710 89/<- %ebp 4/r32/esp
34711
34712 (clear-stream _test-output-stream)
34713 (clear-stream $_test-output-buffered-file->buffer)
34714 $test-add-literal-to-mem:initialize-type:
34715
34716 68/push 0/imm32/right:null
34717 68/push 0/imm32/right:null
34718 68/push 0/imm32/left:unused
34719 68/push 1/imm32/value:int
34720 68/push 1/imm32/is-atom?:true
34721 68/push 0x11/imm32/alloc-id:fake:payload
34722 89/<- %ecx 4/r32/esp
34723 $test-add-literal-to-mem:initialize-var1:
34724
34725 68/push 0/imm32/register
34726 68/push 0/imm32/register
34727 68/push 8/imm32/stack-offset
34728 68/push 1/imm32/block-depth
34729 51/push-ecx
34730 68/push 0x11/imm32/alloc-id:fake
34731 68/push 0/imm32/name
34732 68/push 0/imm32/name
34733 68/push 0x11/imm32/alloc-id:fake:payload
34734 89/<- %ecx 4/r32/esp
34735 $test-add-literal-to-mem:initialize-var1-name:
34736
34737 8d/copy-address *(ecx+4) 0/r32/eax
34738 (copy-array Heap "var1" %eax)
34739 $test-add-literal-to-mem:initialize-literal-type:
34740
34741 68/push 0/imm32/right:null
34742 68/push 0/imm32/right:null
34743 68/push 0/imm32/left:unused
34744 68/push 0/imm32/value:literal
34745 68/push 1/imm32/is-atom?:true
34746 68/push 0x11/imm32/alloc-id:fake:payload
34747 89/<- %edx 4/r32/esp
34748 $test-add-literal-to-mem:initialize-literal:
34749
34750 68/push 0/imm32/register
34751 68/push 0/imm32/register
34752 68/push 0/imm32/no-stack-offset
34753 68/push 1/imm32/block-depth
34754 52/push-edx
34755 68/push 0x11/imm32/alloc-id:fake
34756 68/push 0/imm32/name
34757 68/push 0/imm32/name
34758 68/push 0x11/imm32/alloc-id:fake:payload
34759 89/<- %edx 4/r32/esp
34760 $test-add-literal-to-mem:initialize-literal-value:
34761
34762 8d/copy-address *(edx+4) 0/r32/eax
34763 (copy-array Heap "0x34" %eax)
34764 $test-add-literal-to-mem:initialize-inouts:
34765
34766 68/push 0/imm32/is-deref:false
34767 68/push 0/imm32/next
34768 68/push 0/imm32/next
34769 52/push-edx/l
34770 68/push 0x11/imm32/alloc-id:fake
34771 68/push 0x11/imm32/alloc-id:fake:payload
34772 89/<- %esi 4/r32/esp
34773
34774 68/push 0/imm32/is-deref:false
34775 56/push-esi/next
34776 68/push 0x11/imm32/alloc-id:fake
34777 51/push-ecx/var1
34778 68/push 0x11/imm32/alloc-id:fake
34779 68/push 0x11/imm32/alloc-id:fake:payload
34780 89/<- %esi 4/r32/esp
34781 $test-add-literal-to-mem:initialize-stmt:
34782
34783 68/push 0/imm32/next
34784 68/push 0/imm32/next
34785 68/push 0/imm32/outputs
34786 68/push 0/imm32/outputs
34787 56/push-esi/inouts
34788 68/push 0x11/imm32/alloc-id:fake
34789 68/push 0/imm32/operation
34790 68/push 0/imm32/operation
34791 68/push 1/imm32/tag:stmt1
34792 89/<- %esi 4/r32/esp
34793 $test-add-literal-to-mem:initialize-stmt-operation:
34794
34795 8d/copy-address *(esi+4) 0/r32/eax
34796 (copy-array Heap "add-to" %eax)
34797
34798 c7 0/subop/copy *Curr-block-depth 0/imm32
34799 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34800 (flush _test-output-buffered-file)
34801 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34807
34808 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem")
34809
34810 89/<- %esp 5/r32/ebp
34811 5d/pop-to-ebp
34812 c3/return
34813
34814 test-shift-reg-by-literal:
34815
34816
34817
34818
34819
34820 55/push-ebp
34821 89/<- %ebp 4/r32/esp
34822
34823 (clear-stream _test-output-stream)
34824 (clear-stream $_test-output-buffered-file->buffer)
34825 $test-shift-reg-by-literal:initialize-var-type:
34826
34827 68/push 0/imm32/right:null
34828 68/push 0/imm32/right:null
34829 68/push 0/imm32/left:unused
34830 68/push 1/imm32/value:int
34831 68/push 1/imm32/is-atom?:true
34832 68/push 0x11/imm32/alloc-id:fake:payload
34833 89/<- %ecx 4/r32/esp
34834 $test-shift-reg-by-literal:initialize-var:
34835
34836 68/push 0/imm32/register
34837 68/push 0/imm32/register
34838 68/push 0/imm32/no-stack-offset
34839 68/push 1/imm32/block-depth
34840 51/push-ecx
34841 68/push 0x11/imm32/alloc-id:fake
34842 68/push 0/imm32/name
34843 68/push 0/imm32/name
34844 68/push 0x11/imm32/alloc-id:fake:payload
34845 89/<- %ecx 4/r32/esp
34846 $test-shift-reg-by-literal:initialize-var-name:
34847
34848 8d/copy-address *(ecx+4) 0/r32/eax
34849 (copy-array Heap "v" %eax)
34850 $test-shift-reg-by-literal:initialize-var-register:
34851
34852 8d/copy-address *(ecx+0x1c) 0/r32/eax
34853 (copy-array Heap "ecx" %eax)
34854 $test-shift-reg-by-literal:initialize-literal-type:
34855
34856 68/push 0/imm32/right:null
34857 68/push 0/imm32/right:null
34858 68/push 0/imm32/left:unused
34859 68/push 0/imm32/value:literal
34860 68/push 1/imm32/is-atom?:true
34861 68/push 0x11/imm32/alloc-id:fake:payload
34862 89/<- %edx 4/r32/esp
34863 $test-shift-reg-by-literal:initialize-literal:
34864
34865 68/push 0/imm32/register
34866 68/push 0/imm32/register
34867 68/push 0/imm32/no-stack-offset
34868 68/push 1/imm32/block-depth
34869 52/push-edx
34870 68/push 0x11/imm32/alloc-id:fake
34871 68/push 0/imm32/name
34872 68/push 0/imm32/name
34873 68/push 0x11/imm32/alloc-id:fake:payload
34874 89/<- %edx 4/r32/esp
34875 $test-shift-reg-by-literal:initialize-literal-value:
34876
34877 8d/copy-address *(edx+4) 0/r32/eax
34878 (copy-array Heap "2" %eax)
34879 $test-shift-reg-by-literal:initialize-inouts:
34880
34881 68/push 0/imm32/is-deref:false
34882 68/push 0/imm32/next
34883 68/push 0/imm32/next
34884 52/push-edx/l
34885 68/push 0x11/imm32/alloc-id:fake
34886 68/push 0x11/imm32/alloc-id:fake:payload
34887 89/<- %esi 4/r32/esp
34888 $test-shift-reg-by-literal:initialize-outputs:
34889
34890 68/push 0/imm32/is-deref:false
34891 68/push 0/imm32/next
34892 68/push 0/imm32/next
34893 51/push-ecx/v
34894 68/push 0x11/imm32/alloc-id:fake
34895 68/push 0x11/imm32/alloc-id:fake:payload
34896 89/<- %edi 4/r32/esp
34897 $test-shift-reg-by-literal:initialize-stmt:
34898
34899 68/push 0/imm32/next
34900 68/push 0/imm32/next
34901 57/push-edi/outputs
34902 68/push 0x11/imm32/alloc-id:fake
34903 56/push-esi/inouts
34904 68/push 0x11/imm32/alloc-id:fake
34905 68/push 0/imm32/operation
34906 68/push 0/imm32/operation
34907 68/push 1/imm32/tag:stmt1
34908 89/<- %esi 4/r32/esp
34909 $test-shift-reg-by-literal:initialize-stmt-operation:
34910
34911 8d/copy-address *(esi+4) 0/r32/eax
34912 (copy-array Heap "shift-left" %eax)
34913
34914 c7 0/subop/copy *Curr-block-depth 0/imm32
34915 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
34916 (flush _test-output-buffered-file)
34917 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
34923
34924 (check-next-stream-line-equal _test-output-stream "c1/shift 4/subop/left %ecx 2/imm8" "F - test-shift-reg-by-literal")
34925
34926 89/<- %esp 5/r32/ebp
34927 5d/pop-to-ebp
34928 c3/return
34929
34930 test-shift-mem-by-literal:
34931
34932
34933
34934
34935
34936 55/push-ebp
34937 89/<- %ebp 4/r32/esp
34938
34939 (clear-stream _test-output-stream)
34940 (clear-stream $_test-output-buffered-file->buffer)
34941 $test-shift-mem-by-literal:initialize-type:
34942
34943 68/push 0/imm32/right:null
34944 68/push 0/imm32/right:null
34945 68/push 0/imm32/left:unused
34946 68/push 1/imm32/value:int
34947 68/push 1/imm32/is-atom?:true
34948 68/push 0x11/imm32/alloc-id:fake:payload
34949 89/<- %ecx 4/r32/esp
34950 $test-shift-mem-by-literal:initialize-var1:
34951
34952 68/push 0/imm32/register
34953 68/push 0/imm32/register
34954 68/push 8/imm32/stack-offset
34955 68/push 1/imm32/block-depth
34956 51/push-ecx
34957 68/push 0x11/imm32/alloc-id:fake
34958 68/push 0/imm32/name
34959 68/push 0/imm32/name
34960 68/push 0x11/imm32/alloc-id:fake:payload
34961 89/<- %ecx 4/r32/esp
34962 $test-shift-mem-by-literal:initialize-var1-name:
34963
34964 8d/copy-address *(ecx+4) 0/r32/eax
34965 (copy-array Heap "var1" %eax)
34966 $test-shift-mem-by-literal:initialize-literal-type:
34967
34968 68/push 0/imm32/right:null
34969 68/push 0/imm32/right:null
34970 68/push 0/imm32/left:unused
34971 68/push 0/imm32/value:literal
34972 68/push 1/imm32/is-atom?:true
34973 68/push 0x11/imm32/alloc-id:fake:payload
34974 89/<- %edx 4/r32/esp
34975 $test-shift-mem-by-literal:initialize-literal:
34976
34977 68/push 0/imm32/register
34978 68/push 0/imm32/register
34979 68/push 0/imm32/no-stack-offset
34980 68/push 1/imm32/block-depth
34981 52/push-edx
34982 68/push 0x11/imm32/alloc-id:fake
34983 68/push 0/imm32/name
34984 68/push 0/imm32/name
34985 68/push 0x11/imm32/alloc-id:fake:payload
34986 89/<- %edx 4/r32/esp
34987 $test-shift-mem-by-literal:initialize-literal-value:
34988
34989 8d/copy-address *(edx+4) 0/r32/eax
34990 (copy-array Heap "3" %eax)
34991 $test-shift-mem-by-literal:initialize-inouts:
34992
34993 68/push 0/imm32/is-deref:false
34994 68/push 0/imm32/next
34995 68/push 0/imm32/next
34996 52/push-edx/l
34997 68/push 0x11/imm32/alloc-id:fake
34998 68/push 0x11/imm32/alloc-id:fake:payload
34999 89/<- %esi 4/r32/esp
35000
35001 68/push 0/imm32/is-deref:false
35002 56/push-esi/next
35003 68/push 0x11/imm32/alloc-id:fake
35004 51/push-ecx/var1
35005 68/push 0x11/imm32/alloc-id:fake
35006 68/push 0x11/imm32/alloc-id:fake:payload
35007 89/<- %esi 4/r32/esp
35008 $test-shift-mem-by-literal:initialize-stmt:
35009
35010 68/push 0/imm32/next
35011 68/push 0/imm32/next
35012 68/push 0/imm32/outputs
35013 68/push 0/imm32/outputs
35014 56/push-esi/inouts
35015 68/push 0x11/imm32/alloc-id:fake
35016 68/push 0/imm32/operation
35017 68/push 0/imm32/operation
35018 68/push 1/imm32/tag:stmt1
35019 89/<- %esi 4/r32/esp
35020 $test-shift-mem-by-literal:initialize-stmt-operation:
35021
35022 8d/copy-address *(esi+4) 0/r32/eax
35023 (copy-array Heap "shift-left" %eax)
35024
35025 c7 0/subop/copy *Curr-block-depth 0/imm32
35026 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
35027 (flush _test-output-buffered-file)
35028 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35034
35035 (check-next-stream-line-equal _test-output-stream "c1/shift 4/subop/left *(ebp+0x00000008) 3/imm8" "F - test-shift-mem-by-literal")
35036
35037 89/<- %esp 5/r32/ebp
35038 5d/pop-to-ebp
35039 c3/return
35040
35041 test-compare-reg-with-reg:
35042
35043
35044
35045
35046
35047 55/push-ebp
35048 89/<- %ebp 4/r32/esp
35049
35050 (clear-stream _test-output-stream)
35051 (clear-stream $_test-output-buffered-file->buffer)
35052 $test-compare-reg-with-reg:initialize-type:
35053
35054 68/push 0/imm32/right:null
35055 68/push 0/imm32/right:null
35056 68/push 0/imm32/left:unused
35057 68/push 1/imm32/value:int
35058 68/push 1/imm32/is-atom?:true
35059 68/push 0x11/imm32/alloc-id:fake:payload
35060 89/<- %ecx 4/r32/esp
35061 $test-compare-reg-with-reg:initialize-var1:
35062
35063 68/push 0/imm32/register
35064 68/push 0/imm32/register
35065 68/push 0/imm32/no-stack-offset
35066 68/push 1/imm32/block-depth
35067 51/push-ecx
35068 68/push 0x11/imm32/alloc-id:fake
35069 68/push 0/imm32/name
35070 68/push 0/imm32/name
35071 68/push 0x11/imm32/alloc-id:fake:payload
35072 89/<- %ecx 4/r32/esp
35073 $test-compare-reg-with-reg:initialize-var1-name:
35074
35075 8d/copy-address *(ecx+4) 0/r32/eax
35076 (copy-array Heap "var1" %eax)
35077 $test-compare-reg-with-reg:initialize-var1-register:
35078
35079 8d/copy-address *(ecx+0x1c) 0/r32/eax
35080 (copy-array Heap "ecx" %eax)
35081 $test-compare-reg-with-reg:initialize-var2:
35082
35083 68/push 0/imm32/register
35084 68/push 0/imm32/register
35085 68/push 0/imm32/no-stack-offset
35086 68/push 1/imm32/block-depth
35087 ff 6/subop/push *(ecx+0x10)
35088 68/push 0x11/imm32/alloc-id:fake
35089 68/push 0/imm32/name
35090 68/push 0/imm32/name
35091 68/push 0x11/imm32/alloc-id:fake:payload
35092 89/<- %edx 4/r32/esp
35093 $test-compare-reg-with-reg:initialize-var2-name:
35094
35095 8d/copy-address *(edx+4) 0/r32/eax
35096 (copy-array Heap "var2" %eax)
35097 $test-compare-reg-with-reg:initialize-var2-register:
35098
35099 8d/copy-address *(edx+0x1c) 0/r32/eax
35100 (copy-array Heap "eax" %eax)
35101 $test-compare-reg-with-reg:initialize-inouts:
35102
35103 68/push 0/imm32/is-deref:false
35104 68/push 0/imm32/next
35105 68/push 0/imm32/next
35106 52/push-edx/var2
35107 68/push 0x11/imm32/alloc-id:fake
35108 68/push 0x11/imm32/alloc-id:fake:payload
35109 89/<- %esi 4/r32/esp
35110
35111 68/push 0/imm32/is-deref:false
35112 56/push-esi/next
35113 68/push 0x11/imm32/alloc-id:fake
35114 51/push-ecx/var1
35115 68/push 0x11/imm32/alloc-id:fake
35116 68/push 0x11/imm32/alloc-id:fake:payload
35117 89/<- %esi 4/r32/esp
35118 $test-compare-reg-with-reg:initialize-stmt:
35119
35120 68/push 0/imm32/next
35121 68/push 0/imm32/next
35122 68/push 0/imm32/outputs
35123 68/push 0/imm32/outputs
35124 56/push-esi/inouts
35125 68/push 0x11/imm32/alloc-id:fake
35126 68/push 0/imm32/operation
35127 68/push 0/imm32/operation
35128 68/push 1/imm32/tag:stmt1
35129 89/<- %esi 4/r32/esp
35130 $test-compare-reg-with-reg:initialize-stmt-operation:
35131
35132 8d/copy-address *(esi+4) 0/r32/eax
35133 (copy-array Heap "compare" %eax)
35134
35135 c7 0/subop/copy *Curr-block-depth 0/imm32
35136 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
35137 (flush _test-output-buffered-file)
35138 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35144
35145 (check-next-stream-line-equal _test-output-stream "39/compare-> %ecx 0x00000000/r32" "F - test-compare-reg-with-reg")
35146
35147 89/<- %esp 5/r32/ebp
35148 5d/pop-to-ebp
35149 c3/return
35150
35151 test-compare-mem-with-reg:
35152
35153
35154
35155
35156
35157 55/push-ebp
35158 89/<- %ebp 4/r32/esp
35159
35160 (clear-stream _test-output-stream)
35161 (clear-stream $_test-output-buffered-file->buffer)
35162 $test-compare-mem-with-reg:initialize-type:
35163
35164 68/push 0/imm32/right:null
35165 68/push 0/imm32/right:null
35166 68/push 0/imm32/left:unused
35167 68/push 1/imm32/value:int
35168 68/push 1/imm32/is-atom?:true
35169 68/push 0x11/imm32/alloc-id:fake:payload
35170 89/<- %ecx 4/r32/esp
35171 $test-compare-mem-with-reg:initialize-var1:
35172
35173 68/push 0/imm32/register
35174 68/push 0/imm32/register
35175 68/push 8/imm32/stack-offset
35176 68/push 1/imm32/block-depth
35177 51/push-ecx
35178 68/push 0x11/imm32/alloc-id:fake
35179 68/push 0/imm32/name
35180 68/push 0/imm32/name
35181 68/push 0x11/imm32/alloc-id:fake:payload
35182 89/<- %ecx 4/r32/esp
35183 $test-compare-mem-with-reg:initialize-var1-name:
35184
35185 8d/copy-address *(ecx+4) 0/r32/eax
35186 (copy-array Heap "var1" %eax)
35187 $test-compare-mem-with-reg:initialize-var2:
35188
35189 68/push 0/imm32/register
35190 68/push 0/imm32/register
35191 68/push 0/imm32/no-stack-offset
35192 68/push 1/imm32/block-depth
35193 ff 6/subop/push *(ecx+0x10)
35194 68/push 0x11/imm32/alloc-id:fake
35195 68/push 0/imm32/name
35196 68/push 0/imm32/name
35197 68/push 0x11/imm32/alloc-id:fake:payload
35198 89/<- %edx 4/r32/esp
35199 $test-compare-mem-with-reg:initialize-var2-name:
35200
35201 8d/copy-address *(edx+4) 0/r32/eax
35202 (copy-array Heap "var2" %eax)
35203 $test-compare-mem-with-reg:initialize-var2-register:
35204
35205 8d/copy-address *(edx+0x1c) 0/r32/eax
35206 (copy-array Heap "eax" %eax)
35207 $test-compare-mem-with-reg:initialize-inouts:
35208
35209 68/push 0/imm32/is-deref:false
35210 68/push 0/imm32/next
35211 68/push 0/imm32/next
35212 52/push-edx/var2
35213 68/push 0x11/imm32/alloc-id:fake
35214 68/push 0x11/imm32/alloc-id:fake:payload
35215 89/<- %esi 4/r32/esp
35216
35217 68/push 0/imm32/is-deref:false
35218 56/push-esi/next
35219 68/push 0x11/imm32/alloc-id:fake
35220 51/push-ecx/var1
35221 68/push 0x11/imm32/alloc-id:fake
35222 68/push 0x11/imm32/alloc-id:fake:payload
35223 89/<- %esi 4/r32/esp
35224 $test-compare-mem-with-reg:initialize-stmt:
35225
35226 68/push 0/imm32/next
35227 68/push 0/imm32/next
35228 68/push 0/imm32/outputs
35229 68/push 0/imm32/outputs
35230 56/push-esi/inouts
35231 68/push 0x11/imm32/alloc-id:fake
35232 68/push 0/imm32/operation
35233 68/push 0/imm32/operation
35234 68/push 1/imm32/tag:stmt1
35235 89/<- %esi 4/r32/esp
35236 $test-compare-mem-with-reg:initialize-stmt-operation:
35237
35238 8d/copy-address *(esi+4) 0/r32/eax
35239 (copy-array Heap "compare" %eax)
35240
35241 c7 0/subop/copy *Curr-block-depth 0/imm32
35242 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
35243 (flush _test-output-buffered-file)
35244 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35250
35251 (check-next-stream-line-equal _test-output-stream "39/compare-> *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-mem-with-reg")
35252
35253 89/<- %esp 5/r32/ebp
35254 5d/pop-to-ebp
35255 c3/return
35256
35257 test-compare-reg-with-mem:
35258
35259
35260
35261
35262
35263 55/push-ebp
35264 89/<- %ebp 4/r32/esp
35265
35266 (clear-stream _test-output-stream)
35267 (clear-stream $_test-output-buffered-file->buffer)
35268 $test-compare-reg-with-mem:initialize-type:
35269
35270 68/push 0/imm32/right:null
35271 68/push 0/imm32/right:null
35272 68/push 0/imm32/left:unused
35273 68/push 1/imm32/value:int
35274 68/push 1/imm32/is-atom?:true
35275 68/push 0x11/imm32/alloc-id:fake:payload
35276 89/<- %ecx 4/r32/esp
35277 $test-compare-reg-with-mem:initialize-var1:
35278
35279 68/push 0/imm32/register
35280 68/push 0/imm32/register
35281 68/push 0/imm32/no-stack-offset
35282 68/push 1/imm32/block-depth
35283 51/push-ecx
35284 68/push 0x11/imm32/alloc-id:fake
35285 68/push 0/imm32/name
35286 68/push 0/imm32/name
35287 68/push 0x11/imm32/alloc-id:fake:payload
35288 89/<- %ecx 4/r32/esp
35289 $test-compare-reg-with-mem:initialize-var1-name:
35290
35291 8d/copy-address *(ecx+4) 0/r32/eax
35292 (copy-array Heap "var1" %eax)
35293 $test-compare-reg-with-mem:initialize-var1-register:
35294
35295 8d/copy-address *(ecx+0x1c) 0/r32/eax
35296 (copy-array Heap "eax" %eax)
35297 $test-compare-reg-with-mem:initialize-var2:
35298
35299 68/push 0/imm32/register
35300 68/push 0/imm32/register
35301 68/push 8/imm32/stack-offset
35302 68/push 1/imm32/block-depth
35303 ff 6/subop/push *(ecx+0x10)
35304 68/push 0x11/imm32/alloc-id:fake
35305 68/push 0/imm32/name
35306 68/push 0/imm32/name
35307 68/push 0x11/imm32/alloc-id:fake:payload
35308 89/<- %edx 4/r32/esp
35309 $test-compare-reg-with-mem:initialize-var2-name:
35310
35311 8d/copy-address *(edx+4) 0/r32/eax
35312 (copy-array Heap "var2" %eax)
35313 $test-compare-reg-with-mem:initialize-inouts:
35314
35315 68/push 0/imm32/is-deref:false
35316 68/push 0/imm32/next
35317 68/push 0/imm32/next
35318 52/push-edx/var2
35319 68/push 0x11/imm32/alloc-id:fake
35320 68/push 0x11/imm32/alloc-id:fake:payload
35321 89/<- %esi 4/r32/esp
35322
35323 68/push 0/imm32/is-deref:false
35324 56/push-esi/next
35325 68/push 0x11/imm32/alloc-id:fake
35326 51/push-ecx/var1
35327 68/push 0x11/imm32/alloc-id:fake
35328 68/push 0x11/imm32/alloc-id:fake:payload
35329 89/<- %esi 4/r32/esp
35330 $test-compare-reg-with-mem:initialize-stmt:
35331
35332 68/push 0/imm32/next
35333 68/push 0/imm32/next
35334 68/push 0/imm32/outputs
35335 68/push 0/imm32/outputs
35336 56/push-esi/inouts
35337 68/push 0x11/imm32/alloc-id:fake
35338 68/push 0/imm32/operation
35339 68/push 0/imm32/operation
35340 68/push 1/imm32/tag:stmt1
35341 89/<- %esi 4/r32/esp
35342 $test-compare-reg-with-mem:initialize-stmt-operation:
35343
35344 8d/copy-address *(esi+4) 0/r32/eax
35345 (copy-array Heap "compare" %eax)
35346
35347 c7 0/subop/copy *Curr-block-depth 0/imm32
35348 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
35349 (flush _test-output-buffered-file)
35350 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35356
35357 (check-next-stream-line-equal _test-output-stream "3b/compare<- *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-reg-with-mem")
35358
35359 89/<- %esp 5/r32/ebp
35360 5d/pop-to-ebp
35361 c3/return
35362
35363 test-compare-mem-with-literal:
35364
35365
35366
35367
35368
35369 55/push-ebp
35370 89/<- %ebp 4/r32/esp
35371
35372 (clear-stream _test-output-stream)
35373 (clear-stream $_test-output-buffered-file->buffer)
35374 $test-compare-mem-with-literal:initialize-type:
35375
35376 68/push 0/imm32/right:null
35377 68/push 0/imm32/right:null
35378 68/push 0/imm32/left:unused
35379 68/push 1/imm32/value:int
35380 68/push 1/imm32/is-atom?:true
35381 68/push 0x11/imm32/alloc-id:fake:payload
35382 89/<- %ecx 4/r32/esp
35383 $test-compare-mem-with-literal:initialize-var1:
35384
35385 68/push 0/imm32/register
35386 68/push 0/imm32/register
35387 68/push 8/imm32/stack-offset
35388 68/push 1/imm32/block-depth
35389 51/push-ecx
35390 68/push 0x11/imm32/alloc-id:fake
35391 68/push 0/imm32/name
35392 68/push 0/imm32/name
35393 68/push 0x11/imm32/alloc-id:fake:payload
35394 89/<- %ecx 4/r32/esp
35395 $test-compare-mem-with-literal:initialize-var1-name:
35396
35397 8d/copy-address *(ecx+4) 0/r32/eax
35398 (copy-array Heap "var1" %eax)
35399 $test-compare-mem-with-literal:initialize-literal-type:
35400
35401 68/push 0/imm32/right:null
35402 68/push 0/imm32/right:null
35403 68/push 0/imm32/left:unused
35404 68/push 0/imm32/value:literal
35405 68/push 1/imm32/is-atom?:true
35406 68/push 0x11/imm32/alloc-id:fake:payload
35407 89/<- %edx 4/r32/esp
35408 $test-compare-mem-with-literal:initialize-literal:
35409
35410 68/push 0/imm32/register
35411 68/push 0/imm32/register
35412 68/push 0/imm32/no-stack-offset
35413 68/push 1/imm32/block-depth
35414 52/push-edx
35415 68/push 0x11/imm32/alloc-id:fake
35416 68/push 0/imm32/name
35417 68/push 0/imm32/name
35418 68/push 0x11/imm32/alloc-id:fake:payload
35419 89/<- %edx 4/r32/esp
35420 $test-compare-mem-with-literal:initialize-literal-value:
35421
35422 8d/copy-address *(edx+4) 0/r32/eax
35423 (copy-array Heap "0x34" %eax)
35424 $test-compare-mem-with-literal:initialize-inouts:
35425
35426 68/push 0/imm32/is-deref:false
35427 68/push 0/imm32/next
35428 68/push 0/imm32/next
35429 52/push-edx/l
35430 68/push 0x11/imm32/alloc-id:fake
35431 68/push 0x11/imm32/alloc-id:fake:payload
35432 89/<- %esi 4/r32/esp
35433
35434 68/push 0/imm32/is-deref:false
35435 56/push-esi/next
35436 68/push 0x11/imm32/alloc-id:fake
35437 51/push-ecx/var1
35438 68/push 0x11/imm32/alloc-id:fake
35439 68/push 0x11/imm32/alloc-id:fake:payload
35440 89/<- %esi 4/r32/esp
35441 $test-compare-mem-with-literal:initialize-stmt:
35442
35443 68/push 0/imm32/next
35444 68/push 0/imm32/next
35445 68/push 0/imm32/outputs
35446 68/push 0/imm32/outputs
35447 56/push-esi/inouts
35448 68/push 0x11/imm32/alloc-id:fake
35449 68/push 0/imm32/operation
35450 68/push 0/imm32/operation
35451 68/push 1/imm32/tag:stmt1
35452 89/<- %esi 4/r32/esp
35453 $test-compare-mem-with-literal:initialize-stmt-operation:
35454
35455 8d/copy-address *(esi+4) 0/r32/eax
35456 (copy-array Heap "compare" %eax)
35457
35458 c7 0/subop/copy *Curr-block-depth 0/imm32
35459 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
35460 (flush _test-output-buffered-file)
35461 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35467
35468 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare *(ebp+0x00000008) 0x34/imm32" "F - test-compare-mem-with-literal")
35469
35470 89/<- %esp 5/r32/ebp
35471 5d/pop-to-ebp
35472 c3/return
35473
35474 test-compare-eax-with-literal:
35475
35476
35477
35478
35479
35480 55/push-ebp
35481 89/<- %ebp 4/r32/esp
35482
35483 (clear-stream _test-output-stream)
35484 (clear-stream $_test-output-buffered-file->buffer)
35485 $test-compare-eax-with-literal:initialize-type:
35486
35487 68/push 0/imm32/right:null
35488 68/push 0/imm32/right:null
35489 68/push 0/imm32/left:unused
35490 68/push 1/imm32/value:int
35491 68/push 1/imm32/is-atom?:true
35492 68/push 0x11/imm32/alloc-id:fake:payload
35493 89/<- %ecx 4/r32/esp
35494 $test-compare-eax-with-literal:initialize-var1:
35495
35496 68/push 0/imm32/register
35497 68/push 0/imm32/register
35498 68/push 0/imm32/no-stack-offset
35499 68/push 1/imm32/block-depth
35500 51/push-ecx
35501 68/push 0x11/imm32/alloc-id:fake
35502 68/push 0/imm32/name
35503 68/push 0/imm32/name
35504 68/push 0x11/imm32/alloc-id:fake:payload
35505 89/<- %ecx 4/r32/esp
35506 $test-compare-eax-with-literal:initialize-var1-name:
35507
35508 8d/copy-address *(ecx+4) 0/r32/eax
35509 (copy-array Heap "var1" %eax)
35510 $test-compare-eax-with-literal:initialize-var1-register:
35511
35512 8d/copy-address *(ecx+0x1c) 0/r32/eax
35513 (copy-array Heap "eax" %eax)
35514 $test-compare-eax-with-literal:initialize-literal-type:
35515
35516 68/push 0/imm32/right:null
35517 68/push 0/imm32/right:null
35518 68/push 0/imm32/left:unused
35519 68/push 0/imm32/value:literal
35520 68/push 1/imm32/is-atom?:true
35521 68/push 0x11/imm32/alloc-id:fake:payload
35522 89/<- %edx 4/r32/esp
35523 $test-compare-eax-with-literal:initialize-literal:
35524
35525 68/push 0/imm32/register
35526 68/push 0/imm32/register
35527 68/push 0/imm32/no-stack-offset
35528 68/push 1/imm32/block-depth
35529 52/push-edx
35530 68/push 0x11/imm32/alloc-id:fake
35531 68/push 0/imm32/name
35532 68/push 0/imm32/name
35533 68/push 0x11/imm32/alloc-id:fake:payload
35534 89/<- %edx 4/r32/esp
35535 $test-compare-eax-with-literal:initialize-literal-value:
35536
35537 8d/copy-address *(edx+4) 0/r32/eax
35538 (copy-array Heap "0x34" %eax)
35539 $test-compare-eax-with-literal:initialize-inouts:
35540
35541 68/push 0/imm32/is-deref:false
35542 68/push 0/imm32/next
35543 68/push 0/imm32/next
35544 52/push-edx/l
35545 68/push 0x11/imm32/alloc-id:fake
35546 68/push 0x11/imm32/alloc-id:fake:payload
35547 89/<- %esi 4/r32/esp
35548
35549 68/push 0/imm32/is-deref:false
35550 56/push-esi/next
35551 68/push 0x11/imm32/alloc-id:fake
35552 51/push-ecx/var1
35553 68/push 0x11/imm32/alloc-id:fake
35554 68/push 0x11/imm32/alloc-id:fake:payload
35555 89/<- %esi 4/r32/esp
35556 $test-compare-eax-with-literal:initialize-stmt:
35557
35558 68/push 0/imm32/next
35559 68/push 0/imm32/next
35560 68/push 0/imm32/outputs
35561 68/push 0/imm32/outputs
35562 56/push-esi/inouts
35563 68/push 0x11/imm32/alloc-id:fake
35564 68/push 0/imm32/operation
35565 68/push 0/imm32/operation
35566 68/push 1/imm32/tag:stmt1
35567 89/<- %esi 4/r32/esp
35568 $test-compare-eax-with-literal:initialize-stmt-operation:
35569
35570 8d/copy-address *(esi+4) 0/r32/eax
35571 (copy-array Heap "compare" %eax)
35572
35573 c7 0/subop/copy *Curr-block-depth 0/imm32
35574 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
35575 (flush _test-output-buffered-file)
35576 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35582
35583 (check-next-stream-line-equal _test-output-stream "3d/compare-eax-with 0x34/imm32" "F - test-compare-eax-with-literal")
35584
35585 89/<- %esp 5/r32/ebp
35586 5d/pop-to-ebp
35587 c3/return
35588
35589 test-compare-reg-with-literal:
35590
35591
35592
35593
35594
35595 55/push-ebp
35596 89/<- %ebp 4/r32/esp
35597
35598 (clear-stream _test-output-stream)
35599 (clear-stream $_test-output-buffered-file->buffer)
35600 $test-compare-reg-with-literal:initialize-type:
35601
35602 68/push 0/imm32/right:null
35603 68/push 0/imm32/right:null
35604 68/push 0/imm32/left:unused
35605 68/push 1/imm32/value:int
35606 68/push 1/imm32/is-atom?:true
35607 68/push 0x11/imm32/alloc-id:fake:payload
35608 89/<- %ecx 4/r32/esp
35609 $test-compare-reg-with-literal:initialize-var1:
35610
35611 68/push 0/imm32/register
35612 68/push 0/imm32/register
35613 68/push 0/imm32/no-stack-offset
35614 68/push 1/imm32/block-depth
35615 51/push-ecx
35616 68/push 0x11/imm32/alloc-id:fake
35617 68/push 0/imm32/name
35618 68/push 0/imm32/name
35619 68/push 0x11/imm32/alloc-id:fake:payload
35620 89/<- %ecx 4/r32/esp
35621 $test-compare-reg-with-literal:initialize-var1-name:
35622
35623 8d/copy-address *(ecx+4) 0/r32/eax
35624 (copy-array Heap "var1" %eax)
35625 $test-compare-reg-with-literal:initialize-var1-register:
35626
35627 8d/copy-address *(ecx+0x1c) 0/r32/eax
35628 (copy-array Heap "ecx" %eax)
35629 $test-compare-reg-with-literal:initialize-literal-type:
35630
35631 68/push 0/imm32/right:null
35632 68/push 0/imm32/right:null
35633 68/push 0/imm32/left:unused
35634 68/push 0/imm32/value:literal
35635 68/push 1/imm32/is-atom?:true
35636 68/push 0x11/imm32/alloc-id:fake:payload
35637 89/<- %edx 4/r32/esp
35638 $test-compare-reg-with-literal:initialize-literal:
35639
35640 68/push 0/imm32/register
35641 68/push 0/imm32/register
35642 68/push 0/imm32/no-stack-offset
35643 68/push 1/imm32/block-depth
35644 52/push-edx
35645 68/push 0x11/imm32/alloc-id:fake
35646 68/push 0/imm32/name
35647 68/push 0/imm32/name
35648 68/push 0x11/imm32/alloc-id:fake:payload
35649 89/<- %edx 4/r32/esp
35650 $test-compare-reg-with-literal:initialize-literal-value:
35651
35652 8d/copy-address *(edx+4) 0/r32/eax
35653 (copy-array Heap "0x34" %eax)
35654 $test-compare-reg-with-literal:initialize-inouts:
35655
35656 68/push 0/imm32/is-deref:false
35657 68/push 0/imm32/next
35658 68/push 0/imm32/next
35659 52/push-edx/l
35660 68/push 0x11/imm32/alloc-id:fake
35661 68/push 0x11/imm32/alloc-id:fake:payload
35662 89/<- %esi 4/r32/esp
35663
35664 68/push 0/imm32/is-deref:false
35665 56/push-esi/next
35666 68/push 0x11/imm32/alloc-id:fake
35667 51/push-ecx/var1
35668 68/push 0x11/imm32/alloc-id:fake
35669 68/push 0x11/imm32/alloc-id:fake:payload
35670 89/<- %esi 4/r32/esp
35671 $test-compare-reg-with-literal:initialize-stmt:
35672
35673 68/push 0/imm32/next
35674 68/push 0/imm32/next
35675 68/push 0/imm32/outputs
35676 68/push 0/imm32/outputs
35677 56/push-esi/inouts
35678 68/push 0x11/imm32/alloc-id:fake
35679 68/push 0/imm32/operation
35680 68/push 0/imm32/operation
35681 68/push 1/imm32/tag:stmt1
35682 89/<- %esi 4/r32/esp
35683 $test-compare-reg-with-literal:initialize-stmt-operation:
35684
35685 8d/copy-address *(esi+4) 0/r32/eax
35686 (copy-array Heap "compare" %eax)
35687
35688 c7 0/subop/copy *Curr-block-depth 0/imm32
35689 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
35690 (flush _test-output-buffered-file)
35691 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35697
35698 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare %ecx 0x34/imm32" "F - test-compare-reg-with-literal")
35699
35700 89/<- %esp 5/r32/ebp
35701 5d/pop-to-ebp
35702 c3/return
35703
35704 test-emit-subx-stmt-function-call:
35705
35706
35707
35708
35709
35710
35711
35712
35713
35714
35715
35716
35717
35718
35719
35720
35721
35722 55/push-ebp
35723 89/<- %ebp 4/r32/esp
35724
35725 (clear-stream _test-output-stream)
35726 (clear-stream $_test-output-buffered-file->buffer)
35727 $test-emit-subx-function-call:initialize-type:
35728
35729 68/push 0/imm32/right:null
35730 68/push 0/imm32/right:null
35731 68/push 0/imm32/left:unused
35732 68/push 1/imm32/value:int
35733 68/push 1/imm32/is-atom?:true
35734 68/push 0x11/imm32/alloc-id:fake:payload
35735 89/<- %ecx 4/r32/esp
35736 $test-emit-subx-function-call:initialize-var:
35737
35738 68/push 0/imm32/no-register
35739 68/push 0/imm32/no-register
35740 68/push -8/imm32/stack-offset
35741 68/push 1/imm32/block-depth
35742 51/push-ecx/type
35743 68/push 0x11/imm32/alloc-id:fake
35744 68/push 0/imm32/name
35745 68/push 0/imm32/name
35746 68/push 0x11/imm32/alloc-id:fake:payload
35747 89/<- %ecx 4/r32/esp
35748 $test-emit-subx-function-call:initialize-var-name:
35749
35750 8d/copy-address *(ecx+4) 0/r32/eax
35751 (copy-array Heap "foo" %eax)
35752 $test-emit-subx-function-call:initialize-stmt-var:
35753
35754 68/push 0/imm32/is-deref:false
35755 68/push 0/imm32/next
35756 68/push 0/imm32/next
35757 51/push-ecx/var-foo
35758 68/push 0x11/imm32/alloc-id:fake
35759 68/push 0x11/imm32/alloc-id:fake:payload
35760 89/<- %ebx 4/r32/esp
35761 $test-emit-subx-function-call:initialize-stmt:
35762
35763 68/push 0/imm32/no-outputs
35764 68/push 0/imm32/no-outputs
35765 53/push-ebx/inouts
35766 68/push 0x11/imm32/alloc-id:fake
35767 68/push 0/imm32/operation
35768 68/push 0/imm32/operation
35769 68/push 1/imm32/tag
35770 89/<- %esi 4/r32/esp
35771 $test-emit-subx-function-call:initialize-stmt-operation:
35772
35773 8d/copy-address *(esi+4) 0/r32/eax
35774 (copy-array Heap "f" %eax)
35775
35776 c7 0/subop/copy *Curr-block-depth 0/imm32
35777 (emit-subx-stmt _test-output-buffered-file %esi 0 Stderr 0)
35778 (flush _test-output-buffered-file)
35779 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35785
35786 (check-next-stream-line-equal _test-output-stream "(f *(ebp+0xfffffff8))" "F - test-emit-subx-stmt-function-call")
35787
35788 89/<- %esp 5/r32/ebp
35789 5d/pop-to-ebp
35790 c3/return
35791
35792 test-emit-subx-stmt-function-call-with-literal-arg:
35793
35794
35795
35796
35797
35798
35799 55/push-ebp
35800 89/<- %ebp 4/r32/esp
35801
35802 (clear-stream _test-output-stream)
35803 (clear-stream $_test-output-buffered-file->buffer)
35804 $test-emit-subx-function-call-with-literal-arg:initialize-type:
35805
35806 68/push 0/imm32/right:null
35807 68/push 0/imm32/right:null
35808 68/push 0/imm32/left:unused
35809 68/push 0/imm32/value:literal
35810 68/push 1/imm32/is-atom?:true
35811 68/push 0x11/imm32/alloc-id:fake:payload
35812 89/<- %ecx 4/r32/esp
35813 $test-emit-subx-function-call-with-literal-arg:initialize-var:
35814
35815 68/push 0/imm32/no-register
35816 68/push 0/imm32/no-register
35817 68/push 0/imm32/no-stack-offset
35818 68/push 1/imm32/block-depth
35819 51/push-ecx/type
35820 68/push 0x11/imm32/alloc-id:fake
35821 68/push 0/imm32/name
35822 68/push 0/imm32/name
35823 68/push 0x11/imm32/alloc-id:fake:payload
35824 89/<- %ecx 4/r32/esp
35825 $test-emit-subx-function-call-with-literal-arg:initialize-var-name:
35826
35827 8d/copy-address *(ecx+4) 0/r32/eax
35828 (copy-array Heap "0x34" %eax)
35829 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-var:
35830
35831 68/push 0/imm32/is-deref:false
35832 68/push 0/imm32/next
35833 68/push 0/imm32/next
35834 51/push-ecx/var-foo
35835 68/push 0x11/imm32/alloc-id:fake
35836 68/push 0x11/imm32/alloc-id:fake:payload
35837 89/<- %ebx 4/r32/esp
35838 $test-emit-subx-function-call-with-literal-arg:initialize-stmt:
35839
35840 68/push 0/imm32/no-outputs
35841 68/push 0/imm32/no-outputs
35842 53/push-ebx/inouts
35843 68/push 0x11/imm32/alloc-id:fake
35844 68/push 0/imm32/operation
35845 68/push 0/imm32/operation
35846 68/push 1/imm32/tag
35847 89/<- %esi 4/r32/esp
35848 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-operation:
35849
35850 8d/copy-address *(esi+4) 0/r32/eax
35851 (copy-array Heap "f" %eax)
35852
35853 c7 0/subop/copy *Curr-block-depth 0/imm32
35854 (emit-subx-stmt _test-output-buffered-file %esi 0 %ebx Stderr 0)
35855 (flush _test-output-buffered-file)
35856 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
35862
35863 (check-next-stream-line-equal _test-output-stream "(f 0x34)" "F - test-emit-subx-stmt-function-call-with-literal-arg")
35864
35865 89/<- %esp 5/r32/ebp
35866 5d/pop-to-ebp
35867 c3/return
35868
35869 emit-indent:
35870
35871 55/push-ebp
35872 89/<- %ebp 4/r32/esp
35873
35874 50/push-eax
35875
35876 8b/-> *(ebp+0xc) 0/r32/eax
35877 {
35878
35879 3d/compare-eax-with 0/imm32
35880 7e/jump-if-<= break/disp8
35881 (write-buffered *(ebp+8) " ")
35882 48/decrement-eax
35883 eb/jump loop/disp8
35884 }
35885 $emit-indent:end:
35886
35887 58/pop-to-eax
35888
35889 89/<- %esp 5/r32/ebp
35890 5d/pop-to-ebp
35891 c3/return
35892
35893 emit-subx-prologue:
35894
35895 55/push-ebp
35896 89/<- %ebp 4/r32/esp
35897
35898 (write-buffered *(ebp+8) " # . prologue\n")
35899 (write-buffered *(ebp+8) " 55/push-ebp\n")
35900 (write-buffered *(ebp+8) " 89/<- %ebp 4/r32/esp\n")
35901 $emit-subx-prologue:end:
35902
35903 89/<- %esp 5/r32/ebp
35904 5d/pop-to-ebp
35905 c3/return
35906
35907 emit-subx-epilogue:
35908
35909 55/push-ebp
35910 89/<- %ebp 4/r32/esp
35911
35912 (write-buffered *(ebp+8) " # . epilogue\n")
35913 (write-buffered *(ebp+8) " 89/<- %esp 5/r32/ebp\n")
35914 (write-buffered *(ebp+8) " 5d/pop-to-ebp\n")
35915 (write-buffered *(ebp+8) " c3/return\n")
35916 $emit-subx-epilogue:end:
35917
35918 89/<- %esp 5/r32/ebp
35919 5d/pop-to-ebp
35920 c3/return