]> gitweb.factorcode.org Git - factor.git/blob - basis/vm/vm.factor
Merge Phil Dawes' VM work
[factor.git] / basis / vm / vm.factor
1 ! Copyright (C) 2009 Phil Dawes.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.structs alien.syntax ;
4 IN: vm
5
6 TYPEDEF: void* cell
7
8 C-STRUCT: zone
9     { "cell" "start" }
10     { "cell" "here" }
11     { "cell" "size" }
12     { "cell" "end" }
13     ;
14
15 C-STRUCT: vm
16     { "context*" "stack_chain" }
17     { "zone" "nursery" }
18     { "cell" "cards_offset" }
19     { "cell" "decks_offset" }
20     { "cell[70]" "userenv" }
21     ;
22
23 : vm-field-offset ( field -- offset ) "vm" offset-of ;