diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index 2e70834cdd..72b55c1296 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,7 +1,7 @@ Version 5.3.0.12 racket/base: added impersonate-continuation-mark-key, -chaperone-continuation-mark-key, make-continuation-mark-key, -continuation-mark-key? + chaperone-continuation-mark-key, make-continuation-mark-key, + continuation-mark-key? racket/contract: added prompt-tag/c and continuation-mark-key/c Version 5.3.0.11 diff --git a/src/racket/src/compenv.c b/src/racket/src/compenv.c index 42ff80c419..d8ce188d20 100644 --- a/src/racket/src/compenv.c +++ b/src/racket/src/compenv.c @@ -1888,9 +1888,12 @@ scheme_lookup_binding(Scheme_Object *find_id, Scheme_Comp_Env *env, int flags, } if (!genv) { - scheme_wrong_syntax("require", NULL, src_find_id, - "namespace mismatch; reference (phase %d) to a module" - " %D that is not available (phase level %d)", + 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; } diff --git a/src/racket/src/eval.c b/src/racket/src/eval.c index 8ab55ebd70..468eff879c 100644 --- a/src/racket/src/eval.c +++ b/src/racket/src/eval.c @@ -813,9 +813,12 @@ static Scheme_Object *link_module_variable(Scheme_Object *modidx, if (!menv) { scheme_wrong_syntax("link", NULL, varname, - "namespace mismatch; reference (phase %d) to a module" - " %D that is not available (phase level %d); reference" - " appears in module: %D", + "namespace mismatch;\n" + " reference to a module that is not available\n" + " reference phase: %d\n" + " referenced module: %D\n" + " referenced phase level: %d\n" + " reference in module: %D", env->phase, modname, mod_phase, @@ -834,10 +837,11 @@ static Scheme_Object *link_module_variable(Scheme_Object *modidx, if (self) { exprs[which] = varname; } else { + Scheme_Object *v = modname; if (mod_phase != 0) - modname = scheme_make_pair(modname, scheme_make_integer(mod_phase)); - modname = scheme_make_pair(varname, modname); - exprs[which] = modname; + v = scheme_make_pair(v, scheme_make_integer(mod_phase)); + v = scheme_make_pair(varname, v); + exprs[which] = v; } } @@ -845,14 +849,18 @@ static Scheme_Object *link_module_variable(Scheme_Object *modidx, if (!self) { if (!bkt->val) { scheme_wrong_syntax("link", NULL, varname, - "reference (phase %d) to a variable in module" - " %D that is uninitialized (phase level %d); reference" - " appears in module: %D", + "bad variable linkage;\n" + " reference to a variable that is uninitialized\n" + " reference phase level: %d\n" + " variable module: %D\n" + " variable phase: %d\n" + " reference in module: %D", env->phase, - exprs ? SCHEME_CDR(modname) : modname, + modname, mod_phase, - env->module ? env->module->modsrc : scheme_false); + env->module ? env->module->modsrc : scheme_false); } + if (!(((Scheme_Bucket_With_Flags *)bkt)->flags & (GLOB_IS_IMMUTATED | GLOB_IS_LINKED))) ((Scheme_Bucket_With_Flags *)bkt)->flags |= GLOB_IS_LINKED; } diff --git a/src/racket/src/optimize.c b/src/racket/src/optimize.c index 805226005b..6486ad140f 100644 --- a/src/racket/src/optimize.c +++ b/src/racket/src/optimize.c @@ -208,7 +208,10 @@ int scheme_omittable_expr(Scheme_Object *o, int vals, int fuel, int resolved, -1 for vals means that any return count is ok. Also used with fully resolved expression by `module' to check for "functional" bodies. - If warn_info is supplied, complain when a mismatch is detected. */ + If warn_info is supplied, complain when a mismatch is detected. + If no_id is 1, then an identifier doesn't count as omittable, + unless the identifier is a consistent top-level; currently, this + is used to imply the absece of a continuation-mark impersonator. */ { Scheme_Type vtype; diff --git a/src/racket/src/startup.inc b/src/racket/src/startup.inc index 42cad0cc74..ee8e223ac3 100644 --- a/src/racket/src/startup.inc +++ b/src/racket/src/startup.inc @@ -618,7 +618,9 @@ "(read-bytes(max 0(- end start))))))))" "(p(open-input-bytes s)))" "(let loop()" -"(let((e(parameterize((read-accept-compiled #t))" +"(let((e(parameterize((read-accept-compiled #t)" +"(read-accept-reader #t)" +"(read-accept-lang #t))" "(read p))))" "(unless(eof-object? e)" "(eval e)"