Use NON-POINTER-OBJECT? and CAREFUL-OBJECT-DATUM in the compiler.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 28 Aug 2010 20:47:08 +0000 (20:47 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sat, 28 Aug 2010 20:47:08 +0000 (20:47 +0000)
Using OBJECT-NON-POINTER? causes primitives to be put into blocks as
non-marked constants, so that the fasloader fails to renumber them.

src/compiler/machines/svm/lapgen.scm

index 96fa5a22102437ed2d6ff82ddf604cef50cc1464..3bf029f75990f049354625f1086548afd908e03a 100644 (file)
@@ -135,16 +135,11 @@ USA.
 ;;;; Utilities for the rules
 
 (define (load-constant target object)
-  (cond ((object-pointer? object)
-        (inst:load 'WORD
-                   target
-                   (ea:address (constant->label object))))
-       ((object-non-pointer? object)
-        (inst:load-non-pointer target
-                               (object-type object)
-                               (object-datum object)))
-       (else
-        (error:bad-range-argument object 'LOAD-CONSTANT))))
+  (if (non-pointer-object? object)
+      (inst:load-non-pointer target
+                            (object-type object)
+                            (careful-object-datum object))
+      (inst:load 'WORD target (ea:address (constant->label object)))))
 
 (define (simple-branches! condition source1 #!optional source2)
   (if (default-object? source2)