From 1f642ab303cba03bdd0f94ffa633cf9037a9f4f9 Mon Sep 17 00:00:00 2001 From: Phil Dawes Date: Wed, 2 Sep 2009 08:06:00 +0100 Subject: [PATCH] converted box_* integer functions to use vm (x86 windows) --- vm/alien.cpp | 8 +++----- vm/cpu-x86.32.hpp | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/vm/alien.cpp b/vm/alien.cpp index e2298630e1..6c83f87182 100755 --- a/vm/alien.cpp +++ b/vm/alien.cpp @@ -103,14 +103,12 @@ void *alien_pointer() #define DEFINE_ALIEN_ACCESSOR(name,type,boxer,to) \ PRIMITIVE(alien_##name) \ { \ - factorvm *myvm = PRIMITIVE_GETVM(); \ - myvm->boxer(*(type*)myvm->alien_pointer()); \ + PRIMITIVE_GETVM()->boxer(*(type*)PRIMITIVE_GETVM()->alien_pointer()); \ } \ PRIMITIVE(set_alien_##name) \ { \ - factorvm *myvm = PRIMITIVE_GETVM(); \ - type *ptr = (type *)myvm->alien_pointer(); \ - type value = myvm->to(dpop()); \ + type *ptr = (type *)PRIMITIVE_GETVM()->alien_pointer(); \ + type value = PRIMITIVE_GETVM()->to(dpop()); \ *ptr = value; \ } diff --git a/vm/cpu-x86.32.hpp b/vm/cpu-x86.32.hpp index f9895cefbd..351865f776 100644 --- a/vm/cpu-x86.32.hpp +++ b/vm/cpu-x86.32.hpp @@ -7,8 +7,4 @@ register cell ds asm("esi"); register cell rs asm("edi"); #define VM_ASM_API VM_C_API __attribute__ ((regparm (2))) -#undef VM_PTR -#define VM_PTR myvm -#undef ASSERTVM -#define ASSERTVM() assert(vm==myvm) }