fix problems with references to bindings at higher phases
This commit is contained in:
parent
307ebebcbe
commit
577cf4592e
|
@ -610,7 +610,8 @@
|
||||||
(out-anything modidx out)
|
(out-anything modidx out)
|
||||||
(out-anything sym out)
|
(out-anything sym out)
|
||||||
(unless (zero? phase)
|
(unless (zero? phase)
|
||||||
(out-number -2 out))
|
(out-number -2 out)
|
||||||
|
(out-number phase out))
|
||||||
(out-number pos out)]
|
(out-number pos out)]
|
||||||
[(struct closure (lam gen-id))
|
[(struct closure (lam gen-id))
|
||||||
(out-byte CPT_CLOSURE out)
|
(out-byte CPT_CLOSURE out)
|
||||||
|
|
|
@ -859,7 +859,7 @@
|
||||||
[pos (read-compact-number cp)])
|
[pos (read-compact-number cp)])
|
||||||
(let-values ([(mod-phase pos)
|
(let-values ([(mod-phase pos)
|
||||||
(if (= pos -2)
|
(if (= pos -2)
|
||||||
(values 1 (read-compact-number cp))
|
(values (read-compact-number cp) (read-compact-number cp))
|
||||||
(values 0 pos))])
|
(values 0 pos))])
|
||||||
(make-module-variable mod var pos mod-phase)))]
|
(make-module-variable mod var pos mod-phase)))]
|
||||||
[(local-unbox)
|
[(local-unbox)
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
(define-form-struct module-variable ([modidx module-path-index?]
|
(define-form-struct module-variable ([modidx module-path-index?]
|
||||||
[sym symbol?]
|
[sym symbol?]
|
||||||
[pos exact-integer?]
|
[pos exact-integer?]
|
||||||
[phase (or/c 0 1)])) ; direct access to exported id
|
[phase exact-nonnegative-integer?]))
|
||||||
|
|
||||||
;; Syntax object
|
;; Syntax object
|
||||||
(define ((alist/c k? v?) l)
|
(define ((alist/c k? v?) l)
|
||||||
|
|
|
@ -72,7 +72,7 @@ structures that are produced by @racket[zo-parse] and consumed by
|
||||||
([modidx module-path-index?]
|
([modidx module-path-index?]
|
||||||
[sym symbol?]
|
[sym symbol?]
|
||||||
[pos exact-integer?]
|
[pos exact-integer?]
|
||||||
[phase (or/c 0 1)])]{
|
[phase exact-nonnegative-integer?])]{
|
||||||
Represents a top-level variable, and used only in a @racket[prefix].
|
Represents a top-level variable, and used only in a @racket[prefix].
|
||||||
The @racket[pos] may record the variable's offset within its module,
|
The @racket[pos] may record the variable's offset within its module,
|
||||||
or it can be @racket[-1] if the variable is always located by name.
|
or it can be @racket[-1] if the variable is always located by name.
|
||||||
|
|
|
@ -788,6 +788,37 @@
|
||||||
|
|
||||||
(require 'uses-uses-variable-reference->namespace)
|
(require 'uses-uses-variable-reference->namespace)
|
||||||
|
|
||||||
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Check reference to phase-2 definition:
|
||||||
|
|
||||||
|
(let ()
|
||||||
|
(define m1-expr
|
||||||
|
'(module m1 racket/base
|
||||||
|
(require (for-syntax racket/base))
|
||||||
|
(begin-for-syntax
|
||||||
|
(require (for-syntax racket/base))
|
||||||
|
(begin-for-syntax
|
||||||
|
(define m1 2)
|
||||||
|
(provide m1)))))
|
||||||
|
|
||||||
|
(define m2-expr
|
||||||
|
'(module m2 racket/base
|
||||||
|
(require (for-meta -2 'm1))
|
||||||
|
m1))
|
||||||
|
|
||||||
|
(parameterize ([current-namespace (make-base-namespace)])
|
||||||
|
(eval m1-expr)
|
||||||
|
(eval m2-expr))
|
||||||
|
|
||||||
|
(parameterize ([current-namespace (make-base-namespace)])
|
||||||
|
(define (compile-eval e)
|
||||||
|
(define-values (i o) (make-pipe))
|
||||||
|
(write (compile e) o)
|
||||||
|
(parameterize ([read-accept-compiled #t])
|
||||||
|
(eval (read i))))
|
||||||
|
(compile-eval m1-expr)
|
||||||
|
(compile-eval m2-expr)))
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(report-errs)
|
(report-errs)
|
||||||
|
|
|
@ -1879,24 +1879,13 @@ scheme_lookup_binding(Scheme_Object *find_id, Scheme_Comp_Env *env, int flags,
|
||||||
genv = scheme_module_access(modname, env->genv, SCHEME_INT_VAL(mod_defn_phase));
|
genv = scheme_module_access(modname, env->genv, SCHEME_INT_VAL(mod_defn_phase));
|
||||||
|
|
||||||
if (!genv) {
|
if (!genv) {
|
||||||
if (env->genv->phase) {
|
scheme_wrong_syntax("require", NULL, src_find_id,
|
||||||
/* The failure might be due a laziness in required-syntax
|
"namespace mismatch;\n"
|
||||||
execution. Force all laziness at the prior level
|
" reference to a module that is not available\n"
|
||||||
and try again. */
|
" reference phase: %d\n"
|
||||||
scheme_module_force_lazy(env->genv, 1);
|
" referenced module: %D\n"
|
||||||
genv = scheme_module_access(modname, env->genv, SCHEME_INT_VAL(mod_defn_phase));
|
" referenced phase level: %d",
|
||||||
}
|
env->genv->phase, modname, SCHEME_INT_VAL(mod_defn_phase));
|
||||||
|
|
||||||
if (!genv) {
|
|
||||||
scheme_wrong_syntax("require", NULL, src_find_id,
|
|
||||||
"namespace mismatch;\n"
|
|
||||||
" reference to a module that is not available\n"
|
|
||||||
" reference phase: %d\n"
|
|
||||||
" referenced module: %D\n"
|
|
||||||
" referenced phase level: %d",
|
|
||||||
env->genv->phase, modname, SCHEME_INT_VAL(mod_defn_phase));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,50,84,0,0,0,0,0,0,0,0,0,
|
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,51,84,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,51,0,0,0,1,0,0,10,0,14,
|
0,0,0,0,0,0,0,0,0,0,0,51,0,0,0,1,0,0,10,0,14,
|
||||||
0,21,0,26,0,30,0,33,0,38,0,45,0,58,0,62,0,67,0,74,0,
|
0,19,0,26,0,29,0,36,0,43,0,47,0,60,0,65,0,69,0,74,0,
|
||||||
83,0,87,0,93,0,107,0,121,0,124,0,130,0,134,0,136,0,147,0,149,
|
83,0,87,0,93,0,107,0,121,0,124,0,130,0,134,0,136,0,147,0,149,
|
||||||
0,163,0,170,0,192,0,194,0,208,0,19,1,48,1,59,1,70,1,96,1,
|
0,163,0,170,0,192,0,194,0,208,0,19,1,48,1,59,1,70,1,96,1,
|
||||||
129,1,162,1,221,1,21,2,99,2,155,2,160,2,180,2,73,3,93,3,145,
|
129,1,162,1,221,1,21,2,99,2,155,2,160,2,180,2,73,3,93,3,145,
|
||||||
3,211,3,100,4,242,4,40,5,51,5,130,5,0,0,92,7,0,0,69,35,
|
3,211,3,100,4,242,4,40,5,51,5,130,5,0,0,92,7,0,0,69,35,
|
||||||
37,109,105,110,45,115,116,120,29,11,11,11,66,108,101,116,114,101,99,64,108,
|
37,109,105,110,45,115,116,120,29,11,11,11,64,99,111,110,100,66,108,101,116,
|
||||||
101,116,42,63,97,110,100,62,111,114,64,119,104,101,110,66,100,101,102,105,110,
|
114,101,99,62,111,114,66,117,110,108,101,115,115,66,100,101,102,105,110,101,63,
|
||||||
101,72,112,97,114,97,109,101,116,101,114,105,122,101,63,108,101,116,64,99,111,
|
97,110,100,72,112,97,114,97,109,101,116,101,114,105,122,101,64,108,101,116,42,
|
||||||
110,100,66,117,110,108,101,115,115,68,104,101,114,101,45,115,116,120,29,11,11,
|
63,108,101,116,64,119,104,101,110,68,104,101,114,101,45,115,116,120,29,11,11,
|
||||||
11,65,113,117,111,116,101,29,94,2,15,68,35,37,107,101,114,110,101,108,11,
|
11,65,113,117,111,116,101,29,94,2,15,68,35,37,107,101,114,110,101,108,11,
|
||||||
29,94,2,15,68,35,37,112,97,114,97,109,122,11,62,105,102,65,98,101,103,
|
29,94,2,15,68,35,37,112,97,114,97,109,122,11,62,105,102,65,98,101,103,
|
||||||
105,110,63,115,116,120,61,115,70,108,101,116,45,118,97,108,117,101,115,61,120,
|
105,110,63,115,116,120,61,115,70,108,101,116,45,118,97,108,117,101,115,61,120,
|
||||||
|
@ -17,10 +17,10 @@
|
||||||
1,20,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,45,107,101,
|
1,20,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,45,107,101,
|
||||||
121,61,118,73,100,101,102,105,110,101,45,118,97,108,117,101,115,97,36,11,8,
|
121,61,118,73,100,101,102,105,110,101,45,118,97,108,117,101,115,97,36,11,8,
|
||||||
240,230,83,0,0,95,159,2,17,36,36,159,2,16,36,36,159,2,16,36,36,
|
240,230,83,0,0,95,159,2,17,36,36,159,2,16,36,36,159,2,16,36,36,
|
||||||
16,20,2,3,2,2,2,4,2,2,2,5,2,2,2,6,2,2,2,7,2,
|
16,20,2,10,2,2,2,3,2,2,2,5,2,2,2,6,2,2,2,7,2,
|
||||||
2,2,8,2,2,2,11,2,2,2,10,2,2,2,9,2,2,2,12,2,2,
|
2,2,8,2,2,2,9,2,2,2,4,2,2,2,11,2,2,2,12,2,2,
|
||||||
97,37,11,8,240,230,83,0,0,93,159,2,16,36,37,16,2,2,13,161,2,
|
97,37,11,8,240,230,83,0,0,93,159,2,16,36,37,16,2,2,13,161,2,
|
||||||
2,37,2,13,2,2,2,13,96,11,11,8,240,230,83,0,0,16,0,96,38,
|
2,37,2,13,2,2,2,13,96,38,11,8,240,230,83,0,0,16,0,96,11,
|
||||||
11,8,240,230,83,0,0,16,0,18,98,64,104,101,114,101,13,16,6,36,2,
|
11,8,240,230,83,0,0,16,0,18,98,64,104,101,114,101,13,16,6,36,2,
|
||||||
14,2,2,11,11,11,8,32,8,31,8,30,8,29,27,248,22,163,4,195,249,
|
14,2,2,11,11,11,8,32,8,31,8,30,8,29,27,248,22,163,4,195,249,
|
||||||
22,156,4,80,158,39,36,251,22,89,2,18,248,22,104,199,12,249,22,79,2,
|
22,156,4,80,158,39,36,251,22,89,2,18,248,22,104,199,12,249,22,79,2,
|
||||||
|
@ -28,13 +28,13 @@
|
||||||
89,2,18,248,22,104,199,249,22,79,2,19,248,22,106,201,12,27,248,22,81,
|
89,2,18,248,22,104,199,249,22,79,2,19,248,22,106,201,12,27,248,22,81,
|
||||||
248,22,163,4,196,28,248,22,87,193,20,14,159,37,36,37,28,248,22,87,248,
|
248,22,163,4,196,28,248,22,87,193,20,14,159,37,36,37,28,248,22,87,248,
|
||||||
22,81,194,248,22,80,193,249,22,156,4,80,158,39,36,251,22,89,2,18,248,
|
22,81,194,248,22,80,193,249,22,156,4,80,158,39,36,251,22,89,2,18,248,
|
||||||
22,80,199,249,22,79,2,5,248,22,81,201,11,18,100,10,13,16,6,36,2,
|
22,80,199,249,22,79,2,8,248,22,81,201,11,18,100,10,13,16,6,36,2,
|
||||||
14,2,2,11,11,11,8,32,8,31,8,30,8,29,16,4,11,11,2,20,3,
|
14,2,2,11,11,11,8,32,8,31,8,30,8,29,16,4,11,11,2,20,3,
|
||||||
1,8,101,110,118,49,53,56,50,48,16,4,11,11,2,21,3,1,8,101,110,
|
1,8,101,110,118,49,53,56,50,48,16,4,11,11,2,21,3,1,8,101,110,
|
||||||
118,49,53,56,50,49,27,248,22,81,248,22,163,4,196,28,248,22,87,193,20,
|
118,49,53,56,50,49,27,248,22,81,248,22,163,4,196,28,248,22,87,193,20,
|
||||||
14,159,37,36,37,28,248,22,87,248,22,81,194,248,22,80,193,249,22,156,4,
|
14,159,37,36,37,28,248,22,87,248,22,81,194,248,22,80,193,249,22,156,4,
|
||||||
80,158,39,36,250,22,89,2,22,248,22,89,249,22,89,248,22,89,2,23,248,
|
80,158,39,36,250,22,89,2,22,248,22,89,249,22,89,248,22,89,2,23,248,
|
||||||
22,80,201,251,22,89,2,18,2,23,2,23,249,22,79,2,6,248,22,81,204,
|
22,80,201,251,22,89,2,18,2,23,2,23,249,22,79,2,5,248,22,81,204,
|
||||||
18,100,11,13,16,6,36,2,14,2,2,11,11,11,8,32,8,31,8,30,8,
|
18,100,11,13,16,6,36,2,14,2,2,11,11,11,8,32,8,31,8,30,8,
|
||||||
29,16,4,11,11,2,20,3,1,8,101,110,118,49,53,56,50,51,16,4,11,
|
29,16,4,11,11,2,20,3,1,8,101,110,118,49,53,56,50,51,16,4,11,
|
||||||
11,2,21,3,1,8,101,110,118,49,53,56,50,52,248,22,163,4,193,27,248,
|
11,2,21,3,1,8,101,110,118,49,53,56,50,52,248,22,163,4,193,27,248,
|
||||||
|
@ -51,8 +51,8 @@
|
||||||
24,249,22,2,32,0,88,163,8,36,37,47,11,9,222,33,43,248,22,163,4,
|
24,249,22,2,32,0,88,163,8,36,37,47,11,9,222,33,43,248,22,163,4,
|
||||||
248,22,80,201,248,22,81,198,27,248,22,81,248,22,163,4,196,27,248,22,163,
|
248,22,80,201,248,22,81,198,27,248,22,81,248,22,163,4,196,27,248,22,163,
|
||||||
4,248,22,80,195,249,22,156,4,80,158,40,36,28,248,22,87,195,250,22,90,
|
4,248,22,80,195,249,22,156,4,80,158,40,36,28,248,22,87,195,250,22,90,
|
||||||
2,22,9,248,22,81,199,250,22,89,2,10,248,22,89,248,22,80,199,250,22,
|
2,22,9,248,22,81,199,250,22,89,2,11,248,22,89,248,22,80,199,250,22,
|
||||||
90,2,4,248,22,81,201,248,22,81,202,27,248,22,81,248,22,163,4,23,197,
|
90,2,10,248,22,81,201,248,22,81,202,27,248,22,81,248,22,163,4,23,197,
|
||||||
1,27,249,22,1,22,93,249,22,2,22,163,4,248,22,163,4,248,22,80,199,
|
1,27,249,22,1,22,93,249,22,2,22,163,4,248,22,163,4,248,22,80,199,
|
||||||
248,22,183,4,249,22,156,4,80,158,41,36,251,22,89,1,22,119,105,116,104,
|
248,22,183,4,249,22,156,4,80,158,41,36,251,22,89,1,22,119,105,116,104,
|
||||||
45,99,111,110,116,105,110,117,97,116,105,111,110,45,109,97,114,107,2,26,250,
|
45,99,111,110,116,105,110,117,97,116,105,111,110,45,109,97,114,107,2,26,250,
|
||||||
|
@ -63,9 +63,9 @@
|
||||||
87,193,20,14,159,37,36,37,249,22,156,4,80,158,39,36,27,248,22,163,4,
|
87,193,20,14,159,37,36,37,249,22,156,4,80,158,39,36,27,248,22,163,4,
|
||||||
248,22,80,197,28,249,22,151,9,62,61,62,248,22,157,4,248,22,104,196,250,
|
248,22,80,197,28,249,22,151,9,62,61,62,248,22,157,4,248,22,104,196,250,
|
||||||
22,89,2,22,248,22,89,249,22,89,21,93,2,27,248,22,80,199,250,22,90,
|
22,89,2,22,248,22,89,249,22,89,21,93,2,27,248,22,80,199,250,22,90,
|
||||||
2,11,249,22,89,2,27,249,22,89,248,22,113,203,2,27,248,22,81,202,251,
|
2,3,249,22,89,2,27,249,22,89,248,22,113,203,2,27,248,22,81,202,251,
|
||||||
22,89,2,18,28,249,22,151,9,248,22,157,4,248,22,80,200,64,101,108,115,
|
22,89,2,18,28,249,22,151,9,248,22,157,4,248,22,80,200,64,101,108,115,
|
||||||
101,10,248,22,80,197,250,22,90,2,22,9,248,22,81,200,249,22,79,2,11,
|
101,10,248,22,80,197,250,22,90,2,22,9,248,22,81,200,249,22,79,2,3,
|
||||||
248,22,81,202,99,13,16,6,36,2,14,2,2,11,11,11,8,32,8,31,8,
|
248,22,81,202,99,13,16,6,36,2,14,2,2,11,11,11,8,32,8,31,8,
|
||||||
30,8,29,16,4,11,11,2,20,3,1,8,101,110,118,49,53,56,52,54,16,
|
30,8,29,16,4,11,11,2,20,3,1,8,101,110,118,49,53,56,52,54,16,
|
||||||
4,11,11,2,21,3,1,8,101,110,118,49,53,56,52,55,18,158,94,10,64,
|
4,11,11,2,21,3,1,8,101,110,118,49,53,56,52,55,18,158,94,10,64,
|
||||||
|
@ -81,25 +81,25 @@
|
||||||
2,11,2,12,36,46,37,16,0,36,16,1,2,13,37,11,11,11,16,0,16,
|
2,11,2,12,36,46,37,16,0,36,16,1,2,13,37,11,11,11,16,0,16,
|
||||||
0,16,0,36,36,11,12,11,11,16,0,16,0,16,0,36,36,16,11,16,5,
|
0,16,0,36,36,11,12,11,11,16,0,16,0,16,0,36,36,16,11,16,5,
|
||||||
11,20,15,16,2,20,14,159,36,36,37,80,158,36,36,36,20,113,159,36,16,
|
11,20,15,16,2,20,14,159,36,36,37,80,158,36,36,36,20,113,159,36,16,
|
||||||
1,2,13,16,1,33,33,10,16,5,2,12,88,163,8,36,37,53,37,9,223,
|
1,2,13,16,1,33,33,10,16,5,2,6,88,163,8,36,37,53,37,9,223,
|
||||||
0,33,34,36,20,113,159,36,16,1,2,13,16,0,11,16,5,2,7,88,163,
|
0,33,34,36,20,113,159,36,16,1,2,13,16,0,11,16,5,2,12,88,163,
|
||||||
8,36,37,53,37,9,223,0,33,35,36,20,113,159,36,16,1,2,13,16,0,
|
8,36,37,53,37,9,223,0,33,35,36,20,113,159,36,16,1,2,13,16,0,
|
||||||
11,16,5,2,5,88,163,8,36,37,53,37,9,223,0,33,36,36,20,113,159,
|
11,16,5,2,8,88,163,8,36,37,53,37,9,223,0,33,36,36,20,113,159,
|
||||||
36,16,1,2,13,16,1,33,37,11,16,5,2,6,88,163,8,36,37,56,37,
|
36,16,1,2,13,16,1,33,37,11,16,5,2,5,88,163,8,36,37,56,37,
|
||||||
9,223,0,33,38,36,20,113,159,36,16,1,2,13,16,1,33,39,11,16,5,
|
9,223,0,33,38,36,20,113,159,36,16,1,2,13,16,1,33,39,11,16,5,
|
||||||
2,10,88,163,8,36,37,58,37,9,223,0,33,42,36,20,113,159,36,16,1,
|
2,11,88,163,8,36,37,58,37,9,223,0,33,42,36,20,113,159,36,16,1,
|
||||||
2,13,16,0,11,16,5,2,3,88,163,8,36,37,53,37,9,223,0,33,44,
|
2,13,16,0,11,16,5,2,4,88,163,8,36,37,53,37,9,223,0,33,44,
|
||||||
36,20,113,159,36,16,1,2,13,16,0,11,16,5,2,4,88,163,8,36,37,
|
36,20,113,159,36,16,1,2,13,16,0,11,16,5,2,10,88,163,8,36,37,
|
||||||
54,37,9,223,0,33,45,36,20,113,159,36,16,1,2,13,16,0,11,16,5,
|
54,37,9,223,0,33,45,36,20,113,159,36,16,1,2,13,16,0,11,16,5,
|
||||||
2,9,88,163,8,36,37,56,37,9,223,0,33,46,36,20,113,159,36,16,1,
|
2,9,88,163,8,36,37,56,37,9,223,0,33,46,36,20,113,159,36,16,1,
|
||||||
2,13,16,0,11,16,5,2,11,88,163,8,36,37,58,37,9,223,0,33,47,
|
2,13,16,0,11,16,5,2,3,88,163,8,36,37,58,37,9,223,0,33,47,
|
||||||
36,20,113,159,36,16,1,2,13,16,1,33,49,11,16,5,2,8,88,163,8,
|
36,20,113,159,36,16,1,2,13,16,1,33,49,11,16,5,2,7,88,163,8,
|
||||||
36,37,54,37,9,223,0,33,50,36,20,113,159,36,16,1,2,13,16,0,11,
|
36,37,54,37,9,223,0,33,50,36,20,113,159,36,16,1,2,13,16,0,11,
|
||||||
16,0,94,2,16,2,17,93,2,16,9,9,36,0};
|
16,0,94,2,16,2,17,93,2,16,9,9,36,0};
|
||||||
EVAL_ONE_SIZED_STR((char *)expr, 2029);
|
EVAL_ONE_SIZED_STR((char *)expr, 2029);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,50,84,0,0,0,0,0,0,0,0,0,
|
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,51,84,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,115,0,0,0,1,0,0,8,0,21,
|
0,0,0,0,0,0,0,0,0,0,0,115,0,0,0,1,0,0,8,0,21,
|
||||||
0,26,0,43,0,65,0,94,0,109,0,127,0,139,0,155,0,169,0,191,0,
|
0,26,0,43,0,65,0,94,0,109,0,127,0,139,0,155,0,169,0,191,0,
|
||||||
207,0,224,0,246,0,1,1,7,1,16,1,23,1,30,1,42,1,58,1,82,
|
207,0,224,0,246,0,1,1,7,1,16,1,23,1,30,1,42,1,58,1,82,
|
||||||
|
@ -362,7 +362,7 @@
|
||||||
22,164,2,195,88,163,8,36,38,48,11,9,223,3,33,89,28,197,86,94,20,
|
22,164,2,195,88,163,8,36,38,48,11,9,223,3,33,89,28,197,86,94,20,
|
||||||
18,159,11,80,158,42,48,193,20,18,159,11,80,158,42,49,196,86,94,20,18,
|
18,159,11,80,158,42,48,193,20,18,159,11,80,158,42,49,196,86,94,20,18,
|
||||||
159,11,80,158,42,54,193,20,18,159,11,80,158,42,55,196,193,28,193,80,158,
|
159,11,80,158,42,54,193,20,18,159,11,80,158,42,55,196,193,28,193,80,158,
|
||||||
38,48,80,158,38,54,248,22,9,88,163,8,32,37,8,40,8,240,0,120,47,
|
38,48,80,158,38,54,248,22,8,88,163,8,32,37,8,40,8,240,0,120,47,
|
||||||
0,9,224,1,2,33,90,0,7,35,114,120,34,47,43,34,28,248,22,141,7,
|
0,9,224,1,2,33,90,0,7,35,114,120,34,47,43,34,28,248,22,141,7,
|
||||||
23,195,2,27,249,22,166,15,2,92,196,28,192,28,249,22,191,3,248,22,103,
|
23,195,2,27,249,22,166,15,2,92,196,28,192,28,249,22,191,3,248,22,103,
|
||||||
195,248,22,181,3,248,22,144,7,198,249,22,7,250,22,163,7,199,36,248,22,
|
195,248,22,181,3,248,22,144,7,198,249,22,7,250,22,163,7,199,36,248,22,
|
||||||
|
@ -529,7 +529,7 @@
|
||||||
EVAL_ONE_SIZED_STR((char *)expr, 8952);
|
EVAL_ONE_SIZED_STR((char *)expr, 8952);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,50,84,0,0,0,0,0,0,0,0,0,
|
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,51,84,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,1,0,0,15,0,40,
|
0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,1,0,0,15,0,40,
|
||||||
0,57,0,75,0,97,0,120,0,140,0,162,0,169,0,176,0,183,0,0,0,
|
0,57,0,75,0,97,0,120,0,140,0,162,0,169,0,176,0,183,0,0,0,
|
||||||
179,1,0,0,74,35,37,112,108,97,99,101,45,115,116,114,117,99,116,1,23,
|
179,1,0,0,74,35,37,112,108,97,99,101,45,115,116,114,117,99,116,1,23,
|
||||||
|
@ -556,7 +556,7 @@
|
||||||
EVAL_ONE_SIZED_STR((char *)expr, 502);
|
EVAL_ONE_SIZED_STR((char *)expr, 502);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,50,84,0,0,0,0,0,0,0,0,0,
|
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,51,84,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,82,0,0,0,1,0,0,7,0,18,
|
0,0,0,0,0,0,0,0,0,0,0,82,0,0,0,1,0,0,7,0,18,
|
||||||
0,45,0,51,0,64,0,73,0,80,0,102,0,124,0,150,0,158,0,170,0,
|
0,45,0,51,0,64,0,73,0,80,0,102,0,124,0,150,0,158,0,170,0,
|
||||||
185,0,201,0,219,0,239,0,251,0,11,1,34,1,46,1,77,1,84,1,89,
|
185,0,201,0,219,0,239,0,251,0,11,1,34,1,46,1,77,1,84,1,89,
|
||||||
|
@ -915,7 +915,7 @@
|
||||||
EVAL_ONE_SIZED_STR((char *)expr, 7461);
|
EVAL_ONE_SIZED_STR((char *)expr, 7461);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,50,84,0,0,0,0,0,0,0,0,0,
|
SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,53,46,51,46,48,46,49,51,84,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,1,0,0,10,0,16,
|
0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,1,0,0,10,0,16,
|
||||||
0,29,0,44,0,58,0,78,0,90,0,104,0,118,0,170,0,0,0,98,1,
|
0,29,0,44,0,58,0,78,0,90,0,104,0,118,0,170,0,0,0,98,1,
|
||||||
0,0,69,35,37,98,117,105,108,116,105,110,65,113,117,111,116,101,29,94,2,
|
0,0,69,35,37,98,117,105,108,116,105,110,65,113,117,111,116,101,29,94,2,
|
||||||
|
|
|
@ -803,14 +803,6 @@ static Scheme_Object *link_module_variable(Scheme_Object *modidx,
|
||||||
} else {
|
} else {
|
||||||
menv = scheme_module_access(modname, env, mod_phase);
|
menv = scheme_module_access(modname, env, mod_phase);
|
||||||
|
|
||||||
if (!menv && env->phase) {
|
|
||||||
/* The failure might be due a laziness in required-syntax
|
|
||||||
execution. Force all laziness at the prior level
|
|
||||||
and try again. */
|
|
||||||
scheme_module_force_lazy(env, 1);
|
|
||||||
menv = scheme_module_access(modname, env, mod_phase);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!menv) {
|
if (!menv) {
|
||||||
scheme_wrong_syntax("link", NULL, varname,
|
scheme_wrong_syntax("link", NULL, varname,
|
||||||
"namespace mismatch;\n"
|
"namespace mismatch;\n"
|
||||||
|
|
|
@ -4428,11 +4428,6 @@ Scheme_Object *scheme_module_syntax(Scheme_Object *modname, Scheme_Env *env,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void scheme_module_force_lazy(Scheme_Env *env, int previous)
|
|
||||||
{
|
|
||||||
/* not anymore */
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wait_registry(Scheme_Env *env)
|
static int wait_registry(Scheme_Env *env)
|
||||||
{
|
{
|
||||||
Scheme_Object *lock, *a[2];
|
Scheme_Object *lock, *a[2];
|
||||||
|
@ -4904,23 +4899,53 @@ static Scheme_Env *instantiate_module(Scheme_Module *m, Scheme_Env *env, int res
|
||||||
setup_accessible_table(m);
|
setup_accessible_table(m);
|
||||||
|
|
||||||
/* Create provided global variables: */
|
/* Create provided global variables: */
|
||||||
{
|
if ((menv->phase <= 0)
|
||||||
|
&& ((menv->phase + m->num_phases) > 0)) {
|
||||||
|
Scheme_Module_Phase_Exports *pt;
|
||||||
Scheme_Object **exss, **exsns;
|
Scheme_Object **exss, **exsns;
|
||||||
int i, count;
|
int i, count;
|
||||||
|
Scheme_Env *menv2 = menv;
|
||||||
|
int pl;
|
||||||
|
|
||||||
exsns = m->me->rt->provide_src_names;
|
pl = -menv->phase;
|
||||||
exss = m->me->rt->provide_srcs;
|
|
||||||
count = m->me->rt->num_var_provides;
|
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < pl; i++) {
|
||||||
if (SCHEME_FALSEP(exss[i]))
|
scheme_prepare_exp_env(menv2);
|
||||||
scheme_add_to_table(menv->toplevel, (const char *)exsns[i], NULL, 0);
|
menv2 = menv2->exp_env;
|
||||||
}
|
}
|
||||||
|
|
||||||
count = m->exp_infos[0]->num_indirect_provides;
|
switch(pl) {
|
||||||
exsns = m->exp_infos[0]->indirect_provides;
|
case 0:
|
||||||
for (i = 0; i < count; i++) {
|
pt = m->me->rt;
|
||||||
scheme_add_to_table(menv->toplevel, (const char *)exsns[i], NULL, 0);
|
break;
|
||||||
|
case 1:
|
||||||
|
pt = m->me->et;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (m->me->other_phases)
|
||||||
|
pt = (Scheme_Module_Phase_Exports *)scheme_hash_get(m->me->other_phases, scheme_make_integer(pl));
|
||||||
|
else
|
||||||
|
pt = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pt) {
|
||||||
|
exsns = pt->provide_src_names;
|
||||||
|
exss = pt->provide_srcs;
|
||||||
|
count = pt->num_var_provides;
|
||||||
|
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
|
if (SCHEME_FALSEP(exss[i]))
|
||||||
|
scheme_add_to_table(menv2->toplevel, (const char *)exsns[i], NULL, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m->exp_infos[pl]) {
|
||||||
|
count = m->exp_infos[pl]->num_indirect_provides;
|
||||||
|
exsns = m->exp_infos[pl]->indirect_provides;
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
|
scheme_add_to_table(menv2->toplevel, (const char *)exsns[i], NULL, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5124,7 +5149,7 @@ static void start_module(Scheme_Module *m, Scheme_Env *env, int restart,
|
||||||
for (i = menv->module->num_phases; i-- ; ) {
|
for (i = menv->module->num_phases; i-- ; ) {
|
||||||
if (env->phase + i == base_phase) {
|
if (env->phase + i == base_phase) {
|
||||||
if (eval_exp) {
|
if (eval_exp) {
|
||||||
if (base_phase < menv->module->num_phases) {
|
if (i + 1 < menv->module->num_phases) {
|
||||||
if (eval_exp > 0) {
|
if (eval_exp > 0) {
|
||||||
show("exp=", menv, eval_exp, eval_run, i, base_phase);
|
show("exp=", menv, eval_exp, eval_run, i, base_phase);
|
||||||
expstart_module(menv, env, i+1, restart);
|
expstart_module(menv, env, i+1, restart);
|
||||||
|
|
|
@ -2896,8 +2896,8 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht,
|
||||||
}
|
}
|
||||||
print(mv->sym, notdisplay, 1, ht, mt, pp);
|
print(mv->sym, notdisplay, 1, ht, mt, pp);
|
||||||
if (((Module_Variable *)obj)->mod_phase) {
|
if (((Module_Variable *)obj)->mod_phase) {
|
||||||
/* mod_phase must be 1 */
|
|
||||||
print_compact_number(pp, -2);
|
print_compact_number(pp, -2);
|
||||||
|
print_compact_number(pp, mv->mod_phase);
|
||||||
}
|
}
|
||||||
print_compact_number(pp, mv->pos);
|
print_compact_number(pp, mv->pos);
|
||||||
|
|
||||||
|
|
|
@ -4706,7 +4706,8 @@ static Scheme_Object *read_compact(CPort *port, int use_stack)
|
||||||
mv->modidx = mod;
|
mv->modidx = mod;
|
||||||
mv->sym = var;
|
mv->sym = var;
|
||||||
if (pos == -2) {
|
if (pos == -2) {
|
||||||
mv->mod_phase = 1;
|
pos = read_compact_number(port);
|
||||||
|
mv->mod_phase = pos;
|
||||||
pos = read_compact_number(port);
|
pos = read_compact_number(port);
|
||||||
mv->pos = pos;
|
mv->pos = pos;
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -3228,7 +3228,6 @@ int scheme_is_module_env(Scheme_Comp_Env *env);
|
||||||
|
|
||||||
Scheme_Object *scheme_module_resolve(Scheme_Object *modidx, int load_it);
|
Scheme_Object *scheme_module_resolve(Scheme_Object *modidx, int load_it);
|
||||||
Scheme_Env *scheme_module_access(Scheme_Object *modname, Scheme_Env *env, intptr_t rev_mod_phase);
|
Scheme_Env *scheme_module_access(Scheme_Object *modname, Scheme_Env *env, intptr_t rev_mod_phase);
|
||||||
void scheme_module_force_lazy(Scheme_Env *env, int previous);
|
|
||||||
|
|
||||||
int scheme_module_export_position(Scheme_Object *modname, Scheme_Env *env, Scheme_Object *varname);
|
int scheme_module_export_position(Scheme_Object *modname, Scheme_Env *env, Scheme_Object *varname);
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
consistently.)
|
consistently.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MZSCHEME_VERSION "5.3.0.12"
|
#define MZSCHEME_VERSION "5.3.0.13"
|
||||||
|
|
||||||
#define MZSCHEME_VERSION_X 5
|
#define MZSCHEME_VERSION_X 5
|
||||||
#define MZSCHEME_VERSION_Y 3
|
#define MZSCHEME_VERSION_Y 3
|
||||||
#define MZSCHEME_VERSION_Z 0
|
#define MZSCHEME_VERSION_Z 0
|
||||||
#define MZSCHEME_VERSION_W 12
|
#define MZSCHEME_VERSION_W 13
|
||||||
|
|
||||||
#define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y)
|
#define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y)
|
||||||
#define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W)
|
#define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user