]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/instructions/instructions.factor
cf51510b66eb4815aa0c2ccd50bdd2261bf8b650
[factor.git] / basis / compiler / cfg / instructions / instructions.factor
1 ! Copyright (C) 2008, 2011 Slava Pestov.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: accessors compiler.cfg.instructions.syntax kernel math
4 namespaces ;
5 IN: compiler.cfg.instructions
6
7 <<
8 SYMBOL: insn-classes
9 V{ } clone insn-classes set-global
10 >>
11
12 : new-insn ( ... class -- insn ) f swap boa ; inline
13
14 TUPLE: insn ;
15
16 TUPLE: vreg-insn < insn ;
17
18 TUPLE: flushable-insn < vreg-insn ;
19
20 TUPLE: foldable-insn < flushable-insn ;
21
22 ! Constants
23 FOLDABLE-INSN: ##load-integer
24 def: dst/int-rep
25 literal: val ;
26
27 FOLDABLE-INSN: ##load-reference
28 def: dst/tagged-rep
29 literal: obj ;
30
31 ! These four are inserted by representation selection
32 FLUSHABLE-INSN: ##load-tagged
33 def: dst/tagged-rep
34 literal: val ;
35
36 FLUSHABLE-INSN: ##load-float
37 def: dst/float-rep
38 literal: val ;
39
40 FLUSHABLE-INSN: ##load-double
41 def: dst/double-rep
42 literal: val ;
43
44 FLUSHABLE-INSN: ##load-vector
45 def: dst
46 literal: val rep ;
47
48 ! Stack operations
49 FLUSHABLE-INSN: ##peek
50 def: dst/tagged-rep
51 literal: loc ;
52
53 VREG-INSN: ##replace
54 use: src/tagged-rep
55 literal: loc ;
56
57 INSN: ##replace-imm
58 literal: src loc ;
59
60 INSN: ##clear
61 literal: loc ;
62
63 INSN: ##inc
64 literal: loc ;
65
66 ! Subroutine calls
67 INSN: ##call
68 literal: word ;
69
70 INSN: ##jump
71 literal: word ;
72
73 INSN: ##prologue ;
74
75 INSN: ##epilogue ;
76
77 INSN: ##return ;
78
79 INSN: ##safepoint ;
80
81 INSN: ##no-tco ;
82
83 ! Jump tables
84 VREG-INSN: ##dispatch
85 use: src/int-rep
86 temp: temp/int-rep ;
87
88 ! Slot access
89 FLUSHABLE-INSN: ##slot
90 def: dst/tagged-rep
91 use: obj/tagged-rep slot/int-rep
92 literal: scale tag ;
93
94 FLUSHABLE-INSN: ##slot-imm
95 def: dst/tagged-rep
96 use: obj/tagged-rep
97 literal: slot tag ;
98
99 VREG-INSN: ##set-slot
100 use: src/tagged-rep obj/tagged-rep slot/int-rep
101 literal: scale tag ;
102
103 VREG-INSN: ##set-slot-imm
104 use: src/tagged-rep obj/tagged-rep
105 literal: slot tag ;
106
107 ! Register transfers
108 FOLDABLE-INSN: ##copy
109 def: dst
110 use: src
111 literal: rep ;
112
113 ! Only used by compiler.cfg.cssa
114 FLUSHABLE-INSN: ##parallel-copy
115 literal: values ;
116
117 FOLDABLE-INSN: ##tagged>integer
118 def: dst/int-rep
119 use: src/tagged-rep ;
120
121 ! Integer arithmetic
122 FOLDABLE-INSN: ##add
123 def: dst/int-rep
124 use: src1/int-rep src2/int-rep ;
125
126 FOLDABLE-INSN: ##add-imm
127 def: dst/int-rep
128 use: src1/int-rep
129 literal: src2 ;
130
131 FOLDABLE-INSN: ##sub
132 def: dst/int-rep
133 use: src1/int-rep src2/int-rep ;
134
135 FOLDABLE-INSN: ##sub-imm
136 def: dst/int-rep
137 use: src1/int-rep
138 literal: src2 ;
139
140 FOLDABLE-INSN: ##mul
141 def: dst/int-rep
142 use: src1/int-rep src2/int-rep ;
143
144 FOLDABLE-INSN: ##mul-imm
145 def: dst/int-rep
146 use: src1/int-rep
147 literal: src2 ;
148
149 FOLDABLE-INSN: ##and
150 def: dst/int-rep
151 use: src1/int-rep src2/int-rep ;
152
153 FOLDABLE-INSN: ##and-imm
154 def: dst/int-rep
155 use: src1/int-rep
156 literal: src2 ;
157
158 FOLDABLE-INSN: ##or
159 def: dst/int-rep
160 use: src1/int-rep src2/int-rep ;
161
162 FOLDABLE-INSN: ##or-imm
163 def: dst/int-rep
164 use: src1/int-rep
165 literal: src2 ;
166
167 FOLDABLE-INSN: ##xor
168 def: dst/int-rep
169 use: src1/int-rep src2/int-rep ;
170
171 FOLDABLE-INSN: ##xor-imm
172 def: dst/int-rep
173 use: src1/int-rep
174 literal: src2 ;
175
176 FOLDABLE-INSN: ##shl
177 def: dst/int-rep
178 use: src1/int-rep src2/int-rep ;
179
180 FOLDABLE-INSN: ##shl-imm
181 def: dst/int-rep
182 use: src1/int-rep
183 literal: src2 ;
184
185 FOLDABLE-INSN: ##shr
186 def: dst/int-rep
187 use: src1/int-rep src2/int-rep ;
188
189 FOLDABLE-INSN: ##shr-imm
190 def: dst/int-rep
191 use: src1/int-rep
192 literal: src2 ;
193
194 FOLDABLE-INSN: ##sar
195 def: dst/int-rep
196 use: src1/int-rep src2/int-rep ;
197
198 FOLDABLE-INSN: ##sar-imm
199 def: dst/int-rep
200 use: src1/int-rep
201 literal: src2 ;
202
203 FOLDABLE-INSN: ##min
204 def: dst/int-rep
205 use: src1/int-rep src2/int-rep ;
206
207 FOLDABLE-INSN: ##max
208 def: dst/int-rep
209 use: src1/int-rep src2/int-rep ;
210
211 FOLDABLE-INSN: ##not
212 def: dst/int-rep
213 use: src/int-rep ;
214
215 FOLDABLE-INSN: ##neg
216 def: dst/int-rep
217 use: src/int-rep ;
218
219 FOLDABLE-INSN: ##log2
220 def: dst/int-rep
221 use: src/int-rep ;
222
223 FOLDABLE-INSN: ##bit-count
224 def: dst/int-rep
225 use: src/int-rep ;
226
227 FOLDABLE-INSN: ##bit-test
228 def: dst/tagged-rep
229 use: src1/int-rep src2/int-rep
230 temp: temp/int-rep ;
231
232 ! Float arithmetic
233 FOLDABLE-INSN: ##add-float
234 def: dst/double-rep
235 use: src1/double-rep src2/double-rep ;
236
237 FOLDABLE-INSN: ##sub-float
238 def: dst/double-rep
239 use: src1/double-rep src2/double-rep ;
240
241 FOLDABLE-INSN: ##mul-float
242 def: dst/double-rep
243 use: src1/double-rep src2/double-rep ;
244
245 FOLDABLE-INSN: ##div-float
246 def: dst/double-rep
247 use: src1/double-rep src2/double-rep ;
248
249 FOLDABLE-INSN: ##min-float
250 def: dst/double-rep
251 use: src1/double-rep src2/double-rep ;
252
253 FOLDABLE-INSN: ##max-float
254 def: dst/double-rep
255 use: src1/double-rep src2/double-rep ;
256
257 FOLDABLE-INSN: ##sqrt
258 def: dst/double-rep
259 use: src/double-rep ;
260
261 ! Single/double float conversion
262 FOLDABLE-INSN: ##single>double-float
263 def: dst/double-rep
264 use: src/float-rep ;
265
266 FOLDABLE-INSN: ##double>single-float
267 def: dst/float-rep
268 use: src/double-rep ;
269
270 ! Float/integer conversion
271 FOLDABLE-INSN: ##float>integer
272 def: dst/int-rep
273 use: src/double-rep ;
274
275 FOLDABLE-INSN: ##integer>float
276 def: dst/double-rep
277 use: src/int-rep ;
278
279 ! SIMD operations
280 FOLDABLE-INSN: ##zero-vector
281 def: dst
282 literal: rep ;
283
284 FOLDABLE-INSN: ##fill-vector
285 def: dst
286 literal: rep ;
287
288 FOLDABLE-INSN: ##gather-vector-2
289 def: dst
290 use: src1/scalar-rep src2/scalar-rep
291 literal: rep ;
292
293 FOLDABLE-INSN: ##gather-int-vector-2
294 def: dst
295 use: src1/int-rep src2/int-rep
296 literal: rep ;
297
298 FOLDABLE-INSN: ##gather-vector-4
299 def: dst
300 use: src1/scalar-rep src2/scalar-rep src3/scalar-rep src4/scalar-rep
301 literal: rep ;
302
303 FOLDABLE-INSN: ##gather-int-vector-4
304 def: dst
305 use: src1/int-rep src2/int-rep src3/int-rep src4/int-rep
306 literal: rep ;
307
308 FOLDABLE-INSN: ##select-vector
309 def: dst/int-rep
310 use: src
311 literal: n rep ;
312
313 FOLDABLE-INSN: ##shuffle-vector
314 def: dst
315 use: src shuffle
316 literal: rep ;
317
318 FOLDABLE-INSN: ##shuffle-vector-halves-imm
319 def: dst
320 use: src1 src2
321 literal: shuffle rep ;
322
323 FOLDABLE-INSN: ##shuffle-vector-imm
324 def: dst
325 use: src
326 literal: shuffle rep ;
327
328 FOLDABLE-INSN: ##tail>head-vector
329 def: dst
330 use: src
331 literal: rep ;
332
333 FOLDABLE-INSN: ##merge-vector-head
334 def: dst
335 use: src1 src2
336 literal: rep ;
337
338 FOLDABLE-INSN: ##merge-vector-tail
339 def: dst
340 use: src1 src2
341 literal: rep ;
342
343 FOLDABLE-INSN: ##float-pack-vector
344 def: dst
345 use: src
346 literal: rep ;
347
348 FOLDABLE-INSN: ##signed-pack-vector
349 def: dst
350 use: src1 src2
351 literal: rep ;
352
353 FOLDABLE-INSN: ##unsigned-pack-vector
354 def: dst
355 use: src1 src2
356 literal: rep ;
357
358 FOLDABLE-INSN: ##unpack-vector-head
359 def: dst
360 use: src
361 literal: rep ;
362
363 FOLDABLE-INSN: ##unpack-vector-tail
364 def: dst
365 use: src
366 literal: rep ;
367
368 FOLDABLE-INSN: ##integer>float-vector
369 def: dst
370 use: src
371 literal: rep ;
372
373 FOLDABLE-INSN: ##float>integer-vector
374 def: dst
375 use: src
376 literal: rep ;
377
378 FOLDABLE-INSN: ##compare-vector
379 def: dst
380 use: src1 src2
381 literal: rep cc ;
382
383 FOLDABLE-INSN: ##move-vector-mask
384 def: dst/int-rep
385 use: src
386 literal: rep ;
387
388 FOLDABLE-INSN: ##test-vector
389 def: dst/tagged-rep
390 use: src1
391 temp: temp/int-rep
392 literal: rep vcc ;
393
394 VREG-INSN: ##test-vector-branch
395 use: src1
396 temp: temp/int-rep
397 literal: rep vcc ;
398
399 FOLDABLE-INSN: ##add-vector
400 def: dst
401 use: src1 src2
402 literal: rep ;
403
404 FOLDABLE-INSN: ##saturated-add-vector
405 def: dst
406 use: src1 src2
407 literal: rep ;
408
409 FOLDABLE-INSN: ##add-sub-vector
410 def: dst
411 use: src1 src2
412 literal: rep ;
413
414 FOLDABLE-INSN: ##sub-vector
415 def: dst
416 use: src1 src2
417 literal: rep ;
418
419 FOLDABLE-INSN: ##saturated-sub-vector
420 def: dst
421 use: src1 src2
422 literal: rep ;
423
424 FOLDABLE-INSN: ##mul-vector
425 def: dst
426 use: src1 src2
427 literal: rep ;
428
429 FOLDABLE-INSN: ##mul-high-vector
430 def: dst
431 use: src1 src2
432 literal: rep ;
433
434 FOLDABLE-INSN: ##mul-horizontal-add-vector
435 def: dst
436 use: src1 src2
437 literal: rep ;
438
439 FOLDABLE-INSN: ##saturated-mul-vector
440 def: dst
441 use: src1 src2
442 literal: rep ;
443
444 FOLDABLE-INSN: ##div-vector
445 def: dst
446 use: src1 src2
447 literal: rep ;
448
449 FOLDABLE-INSN: ##min-vector
450 def: dst
451 use: src1 src2
452 literal: rep ;
453
454 FOLDABLE-INSN: ##max-vector
455 def: dst
456 use: src1 src2
457 literal: rep ;
458
459 FOLDABLE-INSN: ##avg-vector
460 def: dst
461 use: src1 src2
462 literal: rep ;
463
464 FOLDABLE-INSN: ##dot-vector
465 def: dst/scalar-rep
466 use: src1 src2
467 literal: rep ;
468
469 FOLDABLE-INSN: ##sad-vector
470 def: dst
471 use: src1 src2
472 literal: rep ;
473
474 FOLDABLE-INSN: ##horizontal-add-vector
475 def: dst
476 use: src1 src2
477 literal: rep ;
478
479 FOLDABLE-INSN: ##horizontal-sub-vector
480 def: dst
481 use: src1 src2
482 literal: rep ;
483
484 FOLDABLE-INSN: ##horizontal-shl-vector-imm
485 def: dst
486 use: src1
487 literal: src2 rep ;
488
489 FOLDABLE-INSN: ##horizontal-shr-vector-imm
490 def: dst
491 use: src1
492 literal: src2 rep ;
493
494 FOLDABLE-INSN: ##abs-vector
495 def: dst
496 use: src
497 literal: rep ;
498
499 FOLDABLE-INSN: ##sqrt-vector
500 def: dst
501 use: src
502 literal: rep ;
503
504 FOLDABLE-INSN: ##and-vector
505 def: dst
506 use: src1 src2
507 literal: rep ;
508
509 FOLDABLE-INSN: ##andn-vector
510 def: dst
511 use: src1 src2
512 literal: rep ;
513
514 FOLDABLE-INSN: ##or-vector
515 def: dst
516 use: src1 src2
517 literal: rep ;
518
519 FOLDABLE-INSN: ##xor-vector
520 def: dst
521 use: src1 src2
522 literal: rep ;
523
524 FOLDABLE-INSN: ##not-vector
525 def: dst
526 use: src
527 literal: rep ;
528
529 FOLDABLE-INSN: ##shl-vector-imm
530 def: dst
531 use: src1
532 literal: src2 rep ;
533
534 FOLDABLE-INSN: ##shr-vector-imm
535 def: dst
536 use: src1
537 literal: src2 rep ;
538
539 FOLDABLE-INSN: ##shl-vector
540 def: dst
541 use: src1 src2/int-scalar-rep
542 literal: rep ;
543
544 FOLDABLE-INSN: ##shr-vector
545 def: dst
546 use: src1 src2/int-scalar-rep
547 literal: rep ;
548
549 ! Scalar/vector conversion
550 FOLDABLE-INSN: ##scalar>integer
551 def: dst/int-rep
552 use: src
553 literal: rep ;
554
555 FOLDABLE-INSN: ##integer>scalar
556 def: dst
557 use: src/int-rep
558 literal: rep ;
559
560 FOLDABLE-INSN: ##vector>scalar
561 def: dst/scalar-rep
562 use: src
563 literal: rep ;
564
565 FOLDABLE-INSN: ##scalar>vector
566 def: dst
567 use: src/scalar-rep
568 literal: rep ;
569
570 ! Boxing and unboxing aliens
571 FOLDABLE-INSN: ##box-alien
572 def: dst/tagged-rep
573 use: src/int-rep
574 temp: temp/int-rep ;
575
576 FOLDABLE-INSN: ##box-displaced-alien
577 def: dst/tagged-rep
578 use: displacement/int-rep base/tagged-rep
579 temp: temp/int-rep
580 literal: base-class ;
581
582 FOLDABLE-INSN: ##unbox-any-c-ptr
583 def: dst/int-rep
584 use: src/tagged-rep ;
585
586 FOLDABLE-INSN: ##unbox-alien
587 def: dst/int-rep
588 use: src/tagged-rep ;
589
590 ! Zero-extending and sign-extending integers
591 FOLDABLE-INSN: ##convert-integer
592 def: dst/int-rep
593 use: src/int-rep
594 literal: c-type ;
595
596 ! Raw memory accessors
597 FLUSHABLE-INSN: ##load-memory
598 def: dst
599 use: base/int-rep displacement/int-rep
600 literal: scale offset rep c-type ;
601
602 FLUSHABLE-INSN: ##load-memory-imm
603 def: dst
604 use: base/int-rep
605 literal: offset rep c-type ;
606
607 VREG-INSN: ##store-memory
608 use: src base/int-rep displacement/int-rep
609 literal: scale offset rep c-type ;
610
611 VREG-INSN: ##store-memory-imm
612 use: src base/int-rep
613 literal: offset rep c-type ;
614
615 ! Memory allocation
616 FLUSHABLE-INSN: ##allot
617 def: dst/tagged-rep
618 literal: size class-of
619 temp: temp/int-rep ;
620
621 VREG-INSN: ##write-barrier
622 use: src/tagged-rep slot/int-rep
623 literal: scale tag
624 temp: temp1/int-rep temp2/int-rep ;
625
626 VREG-INSN: ##write-barrier-imm
627 use: src/tagged-rep
628 literal: slot tag
629 temp: temp1/int-rep temp2/int-rep ;
630
631 FLUSHABLE-INSN: ##alien-global
632 def: dst/int-rep
633 literal: symbol library ;
634
635 FLUSHABLE-INSN: ##vm-field
636 def: dst/tagged-rep
637 literal: offset ;
638
639 VREG-INSN: ##set-vm-field
640 use: src/tagged-rep
641 literal: offset ;
642
643 ! FFI
644 FOLDABLE-INSN: ##unbox
645 def: dst
646 use: src/tagged-rep
647 literal: unboxer rep ;
648
649 FOLDABLE-INSN: ##unbox-long-long
650 def: dst1/int-rep dst2/int-rep
651 use: src/tagged-rep
652 literal: unboxer ;
653
654 FLUSHABLE-INSN: ##local-allot
655 def: dst/int-rep
656 literal: size align offset ;
657
658 FOLDABLE-INSN: ##box
659 def: dst/tagged-rep
660 use: src
661 literal: boxer rep gc-map ;
662
663 FOLDABLE-INSN: ##box-long-long
664 def: dst/tagged-rep
665 use: src1/int-rep src2/int-rep
666 literal: boxer gc-map ;
667
668 ! Alien call inputs and outputs are arrays of triples with shape
669 ! { vreg rep stack#/reg }
670
671 VREG-INSN: ##alien-invoke
672 literal: varargs? reg-inputs stack-inputs reg-outputs dead-outputs cleanup stack-size symbols dll gc-map ;
673
674 VREG-INSN: ##alien-indirect
675 use: src/int-rep
676 literal: varargs? reg-inputs stack-inputs reg-outputs dead-outputs cleanup stack-size gc-map ;
677
678 VREG-INSN: ##alien-assembly
679 literal: varargs? reg-inputs stack-inputs reg-outputs dead-outputs cleanup stack-size quot ;
680
681 VREG-INSN: ##callback-inputs
682 literal: reg-outputs stack-outputs ;
683
684 VREG-INSN: ##callback-outputs
685 literal: reg-inputs ;
686
687 ! Control flow
688 FLUSHABLE-INSN: ##phi
689 def: dst
690 literal: inputs ;
691
692 INSN: ##branch ;
693
694 ! Tagged conditionals
695 VREG-INSN: ##compare-branch
696 use: src1/tagged-rep src2/tagged-rep
697 literal: cc ;
698
699 VREG-INSN: ##compare-imm-branch
700 use: src1/tagged-rep
701 literal: src2 cc ;
702
703 FOLDABLE-INSN: ##compare
704 def: dst/tagged-rep
705 use: src1/tagged-rep src2/tagged-rep
706 literal: cc
707 temp: temp/int-rep ;
708
709 FOLDABLE-INSN: ##compare-imm
710 def: dst/tagged-rep
711 use: src1/tagged-rep
712 literal: src2 cc
713 temp: temp/int-rep ;
714
715 ! Integer conditionals
716 VREG-INSN: ##compare-integer-branch
717 use: src1/int-rep src2/int-rep
718 literal: cc ;
719
720 VREG-INSN: ##compare-integer-imm-branch
721 use: src1/int-rep
722 literal: src2 cc ;
723
724 VREG-INSN: ##test-branch
725 use: src1/int-rep src2/int-rep
726 literal: cc ;
727
728 VREG-INSN: ##test-imm-branch
729 use: src1/int-rep
730 literal: src2 cc ;
731
732 FOLDABLE-INSN: ##compare-integer
733 def: dst/tagged-rep
734 use: src1/int-rep src2/int-rep
735 literal: cc
736 temp: temp/int-rep ;
737
738 FOLDABLE-INSN: ##compare-integer-imm
739 def: dst/tagged-rep
740 use: src1/int-rep
741 literal: src2 cc
742 temp: temp/int-rep ;
743
744 FOLDABLE-INSN: ##test
745 def: dst/tagged-rep
746 use: src1/int-rep src2/int-rep
747 literal: cc
748 temp: temp/int-rep ;
749
750 FOLDABLE-INSN: ##test-imm
751 def: dst/tagged-rep
752 use: src1/int-rep
753 literal: src2 cc
754 temp: temp/int-rep ;
755
756 ! Float conditionals
757 VREG-INSN: ##compare-float-ordered-branch
758 use: src1/double-rep src2/double-rep
759 literal: cc ;
760
761 VREG-INSN: ##compare-float-unordered-branch
762 use: src1/double-rep src2/double-rep
763 literal: cc ;
764
765 FOLDABLE-INSN: ##compare-float-ordered
766 def: dst/tagged-rep
767 use: src1/double-rep src2/double-rep
768 literal: cc
769 temp: temp/int-rep ;
770
771 FOLDABLE-INSN: ##compare-float-unordered
772 def: dst/tagged-rep
773 use: src1/double-rep src2/double-rep
774 literal: cc
775 temp: temp/int-rep ;
776
777 ! Overflowing arithmetic
778 VREG-INSN: ##fixnum-add
779 def: dst/tagged-rep
780 use: src1/tagged-rep src2/tagged-rep
781 literal: cc ;
782
783 VREG-INSN: ##fixnum-sub
784 def: dst/tagged-rep
785 use: src1/tagged-rep src2/tagged-rep
786 literal: cc ;
787
788 VREG-INSN: ##fixnum-mul
789 def: dst/tagged-rep
790 use: src1/tagged-rep src2/int-rep
791 literal: cc ;
792
793 VREG-INSN: ##save-context
794 temp: temp1/int-rep temp2/int-rep ;
795
796 ! GC checks
797 VREG-INSN: ##check-nursery-branch
798 literal: size cc
799 temp: temp1/int-rep temp2/int-rep ;
800
801 INSN: ##call-gc
802 literal: gc-map ;
803
804 ! Spills and reloads, inserted by register allocator
805 TUPLE: spill-slot { n integer } ;
806 C: <spill-slot> spill-slot
807
808 VREG-INSN: ##spill
809 use: src
810 literal: rep dst ;
811
812 VREG-INSN: ##reload
813 def: dst
814 literal: rep src ;
815
816 UNION: allocation-insn
817     ##allot
818     ##box-alien
819     ##box-displaced-alien ;
820
821 UNION: conditional-branch-insn
822     ##compare-branch
823     ##compare-imm-branch
824     ##compare-integer-branch
825     ##compare-integer-imm-branch
826     ##test-branch
827     ##test-imm-branch
828     ##compare-float-ordered-branch
829     ##compare-float-unordered-branch
830     ##test-vector-branch
831     ##check-nursery-branch
832     ##fixnum-add
833     ##fixnum-sub
834     ##fixnum-mul ;
835
836 ! For alias analysis
837 UNION: read-insn ##slot ##slot-imm ##vm-field ##alien-global ;
838 UNION: write-insn ##set-slot ##set-slot-imm ##set-vm-field ;
839
840 UNION: alien-call-insn
841     ##alien-assembly
842     ##alien-indirect
843     ##alien-invoke ;
844
845 UNION: gc-map-insn
846     ##call-gc
847     ##box
848     ##box-long-long
849     ##alien-indirect
850     ##alien-invoke ;
851
852 M: gc-map-insn clone call-next-method [ clone ] change-gc-map ;
853
854 TUPLE: gc-map gc-roots derived-roots ;
855
856 : <gc-map> ( -- gc-map ) gc-map new ;
857
858 UNION: def-is-use-insn
859     ##box-alien
860     ##box-displaced-alien
861     ##unbox-any-c-ptr ;