0.9.2.39:
[sbcl.git] / src / runtime / parse.c
index 8a2d9e3..d007193 100644 (file)
@@ -15,8 +15,8 @@
 #include <ctype.h>
 #include <signal.h>
 
-#include "runtime.h"
 #include "sbcl.h"
+#include "runtime.h"
 
 #if defined(LISP_FEATURE_SB_LDB)
 
@@ -27,6 +27,7 @@
 #include "interrupt.h"
 #include "lispregs.h"
 #include "monitor.h"
+#include "validate.h"
 #include "arch.h"
 #include "search.h"
 #include "thread.h"
@@ -257,15 +258,12 @@ static boolean lookup_symbol(char *name, lispobj *result)
     }
 
     /* Search dynamic space. */
-    headerptr = (lispobj *)DYNAMIC_SPACE_START;
-#if !defined(LISP_FEATURE_X86)
-    count =
-       dynamic_space_free_pointer -
-       (lispobj *)DYNAMIC_SPACE_START;
+#ifndef LISP_FEATURE_GENCGC
+    headerptr = (lispobj *)current_dynamic_space;
+    count = dynamic_space_free_pointer - headerptr;
 #else
-    count =
-       (lispobj *)SymbolValue(ALLOCATION_POINTER,0) -
-       (lispobj *)DYNAMIC_SPACE_START;
+    headerptr = (lispobj *)DYNAMIC_SPACE_START;
+    count = ((lispobj *)SymbolValue(ALLOCATION_POINTER,0)) - headerptr;
 #endif
     if (search_for_symbol(name, &headerptr, &count)) {
         *result = make_lispobj(headerptr, OTHER_POINTER_LOWTAG);