fix bug in procedure? test optimization

svn: r8225
This commit is contained in:
Matthew Flatt 2008-01-05 17:31:44 +00:00
parent 7f3a5c13c2
commit 8f87430c49
2 changed files with 7 additions and 2 deletions

View File

@ -2385,7 +2385,9 @@ static Scheme_Object *optimize_application2(Scheme_Object *o, Optimize_Info *inf
} }
if (SAME_TYPE(SCHEME_TYPE(app->rand), scheme_local_type)) { if (SAME_TYPE(SCHEME_TYPE(app->rand), scheme_local_type)) {
int offset; int offset;
if (scheme_optimize_info_lookup(info, SCHEME_LOCAL_POS(app->rand), &offset)) { Scheme_Object *expr;
expr = scheme_optimize_reverse(info, SCHEME_LOCAL_POS(app->rand), 0);
if (scheme_optimize_info_lookup(info, SCHEME_LOCAL_POS(expr), &offset)) {
info->preserves_marks = 1; info->preserves_marks = 1;
info->single_result = 1; info->single_result = 1;
return scheme_true; return scheme_true;

View File

@ -1001,6 +1001,9 @@ Scheme_Object *scheme_clone_closure_compilation(int dup_ok, Scheme_Object *_data
memcpy(cl, data->closure_map, sizeof(Closure_Info)); memcpy(cl, data->closure_map, sizeof(Closure_Info));
data2->closure_map = (mzshort *)cl; data2->closure_map = (mzshort *)cl;
/* We don't have to update base_closure_map, because
it will get re-computed as the closure is re-optimized. */
sz = sizeof(int) * data2->num_params; sz = sizeof(int) * data2->num_params;
flags = (int *)scheme_malloc_atomic(sz); flags = (int *)scheme_malloc_atomic(sz);
memcpy(flags, cl->local_flags, sz); memcpy(flags, cl->local_flags, sz);