From bc5031f96bc4072e872aa9297c96a842d47c01aa Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Wed, 23 Sep 2009 19:42:00 -0500 Subject: [PATCH] update vm structs --- basis/vm/vm.factor | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/basis/vm/vm.factor b/basis/vm/vm.factor index ab5a98ab3c..3ea501b561 100644 --- a/basis/vm/vm.factor +++ b/basis/vm/vm.factor @@ -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 ; \ No newline at end of file +: vm-field-offset ( field -- offset ) vm offset-of ; inline