boot-module: primitive-load hack

This commit is contained in:
Jan Nieuwenhuizen 2019-11-15 16:36:50 +01:00 committed by Jan (janneke) Nieuwenhuizen
parent 60dbc22d8a
commit 86744b24db
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 5 additions and 2 deletions

View File

@ -1764,7 +1764,9 @@
(resolve-module dir-hint-module-name #f) (resolve-module dir-hint-module-name #f)
(and (not (autoload-done-or-in-progress? dir-hint name)) (and (not (autoload-done-or-in-progress? dir-hint name))
(let ((didit #f)) (let ((didit #f))
(define (load-file proc file) ;; FIXME: *undefined* here is a terrible hack; it switches
;; toplevel for defines.
(define (load-file *undefined* file)
(save-module-excursion (lambda () (primitive-load file))) (save-module-excursion (lambda () (primitive-load file)))
(set! didit #t)) (set! didit #t))
(dynamic-wind (dynamic-wind

View File

@ -596,7 +596,8 @@ eval:
if (R1->car == cell_symbol_define || R1->car == cell_symbol_define_macro) if (R1->car == cell_symbol_define || R1->car == cell_symbol_define_macro)
{ {
global_p = 0; global_p = 0;
if (R0->car->car != cell_closure) if (R0->car->car != cell_closure
|| R0->cdr->car->car == cell_undefined)
global_p = 1; global_p = 1;
#if 0 #if 0
else if (g_debug > 0) else if (g_debug > 0)