From: Taylor R Campbell Date: Sat, 28 Aug 2010 20:47:08 +0000 (+0000) Subject: Use NON-POINTER-OBJECT? and CAREFUL-OBJECT-DATUM in the compiler. X-Git-Tag: 20101212-Gtk~85 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=278555962361b3df4502fd0f3d0e32b4b6be2a67;p=mit-scheme.git 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. --- 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)