misc clean-up

This commit is contained in:
Matthew Flatt 2012-06-26 22:14:41 -06:00
parent edce1b0406
commit 307ebebcbe
5 changed files with 34 additions and 18 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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)"