fix problem initializing tail buffer; fix JIT checking of unsafe-f{l,64}vector-ref unboxing; fix error message for unbound variables (merge to 4.2.4)

svn: r17788
This commit is contained in:
Matthew Flatt 2010-01-23 22:37:07 +00:00
parent 3c1d7e9aca
commit bfa543bd11
3 changed files with 11 additions and 5 deletions

View File

@ -6994,7 +6994,7 @@ static Scheme_Object *check_top(const char *when, Scheme_Object *form, Scheme_Co
if (bad || !scheme_lookup_in_table(env->genv->toplevel, (const char *)SCHEME_STX_SYM(c))) {
GC_CAN_IGNORE const char *reason;
if (env->genv->phase == 1) {
reason = "unbound identifier in module (transformer environment)";
reason = "unbound identifier in module (in phase 1, transformer environment)";
/* Check in the run-time environment */
if (scheme_lookup_in_table(env->genv->template_env->toplevel, (const char *)SCHEME_STX_SYM(c))) {
reason = ("unbound identifier in module (in the transformer environment, which does"
@ -7004,9 +7004,11 @@ static Scheme_Object *check_top(const char *when, Scheme_Object *form, Scheme_Co
reason = ("unbound identifier in module (in the transformer environment, which does"
" not include the macro definition that is visible to run-time expressions)");
}
} else
} else if (env->genv->phase == 0)
reason = "unbound identifier in module";
scheme_wrong_syntax(when, NULL, c, reason);
else
reason = "unbound identifier in module (in phase %d)";
scheme_wrong_syntax(when, NULL, c, reason, env->genv->phase);
}
}
}

View File

@ -4217,8 +4217,9 @@ static int can_unbox_inline(Scheme_Object *obj, int fuel, int regs, int unsafely
Scheme_App3_Rec *app = (Scheme_App3_Rec *)obj;
if (!is_inline_unboxable_op(app->rator, SCHEME_PRIM_IS_BINARY_INLINED, unsafely, 0))
return 0;
if (IS_NAMED_PRIM(app->rator, "unsafe-f64vector-ref")
|| IS_NAMED_PRIM(app->rator, "unsafe-flvector-ref")) {
if ((SCHEME_PRIM_PROC_FLAGS(app->rator) & SCHEME_PRIM_IS_BINARY_INLINED)
&& (IS_NAMED_PRIM(app->rator, "unsafe-f64vector-ref")
|| IS_NAMED_PRIM(app->rator, "unsafe-flvector-ref"))) {
if (is_unboxing_immediate(app->rand1, 1)
&& is_unboxing_immediate(app->rand1, 2)) {
return 1;

View File

@ -2296,6 +2296,9 @@ static Scheme_Thread *make_thread(Scheme_Config *config,
scheme_first_thread = process;
}
if (!buffer_init_size) /* => before place init */
buffer_init_size = INIT_TB_SIZE;
{
Scheme_Object **tb;
tb = MALLOC_N(Scheme_Object *, buffer_init_size);