]> gitweb.factorcode.org Git - factor.git/blob - extra/tools/image-analyzer/vm/vm.factor
tools.image-analyzer.*: fix the loading of the .32 and .64 vocabs
[factor.git] / extra / tools / image-analyzer / vm / vm.factor
1 USING: alien.c-types assocs classes.struct kernel kernel.private vm ;
2 IN: tools.image-analyzer.vm
3
4 ! These structs and words correspond to vm/image.hpp
5 STRUCT: image-header
6     { magic cell }
7     { version cell }
8     { data-relocation-base cell }
9     { data-size cell }
10     { code-relocation-base cell }
11     { code-size cell }
12     { true-object cell }
13     { bignum-zero cell }
14     { bignum-pos-one cell }
15     { bignum-neg-one cell }
16     { special-objects cell[special-object-count] } ;
17
18 ! These structs and words correspond to vm/layouts.hpp
19 STRUCT: object
20     { header cell } ;
21
22 STRUCT: alien
23     { header cell }
24     { base cell }
25     { expired cell }
26     { displacement cell }
27     { address cell } ;
28
29 STRUCT: array
30     { header cell }
31     { capacity cell } ;
32
33 STRUCT: bignum
34     { header cell }
35     { capacity cell } ;
36
37
38 STRUCT: callstack
39     { header cell }
40     { length cell } ;
41
42 STRUCT: dll
43     { header cell }
44     { path cell }
45     { handle void* } ;
46
47 STRUCT: quotation
48     { header cell }
49     { array cell }
50     { cached_effect cell }
51     { cache_counter cell }
52     { entry_point cell } ;
53
54 STRUCT: string
55     { header cell }
56     { length cell }
57     { aux cell }
58     { hashcode cell } ;
59
60 STRUCT: tuple
61     { header cell }
62     { layout cell } ;
63
64 STRUCT: tuple-layout
65     { header cell }
66     { capacity cell }
67     { klass cell }
68     { size cell }
69     { echelon cell } ;
70
71 STRUCT: word
72     { header cell }
73     { hashcode cell }
74     { name cell }
75     { vocabulary cell }
76     { def cell }
77     { props cell }
78     { pic_def cell }
79     { pic_tail_def cell }
80     { subprimitive cell }
81     { entry_point cell } ;
82
83 STRUCT: wrapper
84     { header cell }
85     { object cell } ;
86
87 ! These structs and words correspond to vm/code_blocks.hpp
88 STRUCT: code-block
89     { header cell }
90     { owner cell }
91     { parameters cell }
92     { relocation cell } ;