From 278555962361b3df4502fd0f3d0e32b4b6be2a67 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 28 Aug 2010 20:47:08 +0000 Subject: [PATCH] Use NON-POINTER-OBJECT? and CAREFUL-OBJECT-DATUM in the compiler. 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 | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/compiler/machines/svm/lapgen.scm b/src/compiler/machines/svm/lapgen.scm index 96fa5a221..3bf029f75 100644 --- a/src/compiler/machines/svm/lapgen.scm +++ b/src/compiler/machines/svm/lapgen.scm @@ -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) -- 2.25.1