1 ! Copyright (C) 2009, 2010 Phil Dawes, Slava Pestov.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: classes.struct alien.c-types alien.syntax kernel.private ;
6 TYPEDEF: uintptr_t cell_t
14 { callstack-top cell_t }
15 { callstack-bottom cell_t }
17 { retainstack cell_t }
18 { callstack-save cell_t }
19 { datastack-seg segment* }
20 { retainstack-seg segment* }
21 { callstack-seg segment* }
22 { context-objects cell_t[context-object-count] } ;
30 ! dispatch-statistics should be kept in sync with:
32 STRUCT: dispatch-statistics
33 { megamorphic-cache-hits cell_t }
34 { megamorphic-cache-misses cell_t }
36 { cold-call-to-ic-transitions cell_t }
37 { ic-to-pic-transitions cell_t }
38 { pic-to-mega-transitions cell_t }
40 { pic-tag-count cell_t }
41 { pic-tuple-count cell_t } ;
45 { spare-ctx context* }
47 { cards-offset cell_t }
48 { decks-offset cell_t }
49 { signal-handler-addr cell_t }
51 { special-objects cell_t[special-object-count] }
53 { datastack-size cell_t }
54 { retainstack-size cell_t }
55 { callstack-size cell_t } ;
57 CONSTANT: COLLECT-NURSERY-OP 0
58 CONSTANT: COLLECT-AGING-OP 1
59 CONSTANT: COLLECT-TO-TENURED-OP 2
60 CONSTANT: COLLECT-FULL-OP 3
61 CONSTANT: COLLECT-COMPACT-OP 4
62 CONSTANT: COLLECT-GROWING-DATA-HEAP-OP 5
69 STRUCT: mark-sweep-sizes
73 { contiguous-free cell_t }
74 { free-block-count cell_t } ;
76 STRUCT: data-heap-room
77 { nursery copying-sizes }
78 { aging copying-sizes }
79 { tenured mark-sweep-sizes }
82 { mark-stack cell_t } ;
84 CONSTANT: PHASE-CARD-SCAN 0
85 CONSTANT: PHASE-CODE-SCAN 1
86 CONSTANT: PHASE-DATA-SWEEP 2
87 CONSTANT: PHASE-CODE-SWEEP 3
88 CONSTANT: PHASE-DATA-COMPACTION 4
89 CONSTANT: PHASE-MARKING 5
91 ! gc-event should be kept in sync with:
95 { data-heap-before data-heap-room }
96 { code-heap-before mark-sweep-sizes }
97 { data-heap-after data-heap-room }
98 { code-heap-after mark-sweep-sizes }
99 { cards-scanned cell_t }
100 { decks-scanned cell_t }
101 { code-blocks-scanned cell_t }
102 { start-time ulonglong }
103 { total-time cell_t }
105 { temp-time ulonglong } ;
107 ! gc-info should be kept in sync with:
110 { gc-root-count uint read-only }
111 { derived-root-count uint read-only }
112 { return-address-count uint read-only } ;
114 CONSTANT: CODE-BLOCK-UNOPTIMIZED 0
115 CONSTANT: CODE-BLOCK-OPTIMIZED 1
116 CONSTANT: CODE-BLOCK-PIC 2