2009-08-20 14:39:40 -04:00
|
|
|
! Copyright (C) 2009 Phil Dawes.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
|
|
USING: alien.structs alien.syntax ;
|
|
|
|
IN: vm
|
|
|
|
|
2009-08-20 15:20:35 -04:00
|
|
|
TYPEDEF: void* cell
|
|
|
|
|
|
|
|
C-STRUCT: zone
|
|
|
|
{ "cell" "start" }
|
|
|
|
{ "cell" "here" }
|
|
|
|
{ "cell" "size" }
|
|
|
|
{ "cell" "end" }
|
|
|
|
;
|
|
|
|
|
|
|
|
C-STRUCT: vm
|
|
|
|
{ "context*" "stack_chain" }
|
|
|
|
{ "zone" "nursery" }
|
2009-08-20 15:45:06 -04:00
|
|
|
{ "cell" "cards_offset" }
|
|
|
|
{ "cell" "decks_offset" }
|
2009-08-21 15:13:49 -04:00
|
|
|
{ "cell" "__padding__" }
|
|
|
|
{ "cell[70]" "userenv" }
|
2009-08-20 15:20:35 -04:00
|
|
|
;
|
2009-08-20 14:39:40 -04:00
|
|
|
|
2009-08-20 14:58:39 -04:00
|
|
|
: vm-field-offset ( field -- offset ) "vm" offset-of ;
|