* make the "current-primitive-locations" a procedure that returns a

location instead of an alist.
This commit is contained in:
Abdulaziz Ghuloum 2007-05-04 03:53:39 -04:00
parent 54c48777d7
commit 416f49caf5
2 changed files with 11 additions and 3 deletions

Binary file not shown.

View File

@ -3220,9 +3220,12 @@
(define (primref-loc op)
(unless (symbol? op) (error 'primref-loc "not a symbol ~s" op))
(cond
[(assq op (current-primitive-locations)) =>
[((current-primitive-locations) op) =>
(lambda (x)
(mem (fx- disp-symbol-value symbol-tag) (obj (cdr x))))]
(unless (symbol? x)
(error 'primitive-location
"~s is not a valid location for ~s" x op))
(mem (fx- disp-symbol-value symbol-tag) (obj x)))]
[else
(mem (fx- disp-symbol-system-value symbol-tag)
(obj op))]))
@ -5203,7 +5206,12 @@
(primitive-set! 'assembler-output (make-parameter #f))
(primitive-set! 'current-primitive-locations
(make-parameter '()))
(make-parameter
(lambda (x) #f)
(lambda (x)
(if (procedure? x)
x
(error 'current-primitive-locations "~s is not a procedure" x)))))
(initialize-system)
(primitive-set! 'eval-core