update vm structs

db4
Joe Groff 2009-09-23 19:42:00 -05:00
parent cba071c969
commit bc5031f96b
1 changed files with 13 additions and 15 deletions

View File

@ -1,23 +1,21 @@
! Copyright (C) 2009 Phil Dawes.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.structs alien.syntax ;
USING: classes.struct alien.syntax ;
IN: vm
TYPEDEF: void* cell
C-STRUCT: zone
{ "cell" "start" }
{ "cell" "here" }
{ "cell" "size" }
{ "cell" "end" }
;
STRUCT: zone
{ start cell }
{ here cell }
{ size cell }
{ end cell } ;
C-STRUCT: vm
{ "context*" "stack_chain" }
{ "zone" "nursery" }
{ "cell" "cards_offset" }
{ "cell" "decks_offset" }
{ "cell[70]" "userenv" }
;
STRUCT: vm
{ stack_chain context* }
{ nursery zone }
{ cards_offset cell }
{ decks_offset cell }
{ userenv cell[70] } ;
: vm-field-offset ( field -- offset ) "vm" offset-of ;
: vm-field-offset ( field -- offset ) vm offset-of ; inline