improve some comments and an assertion
This commit is contained in:
parent
2556733359
commit
182d648af6
|
@ -4497,10 +4497,7 @@ compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
|
||||
DO_CHECK_FOR_BREAK(scheme_current_thread, ;);
|
||||
|
||||
#if 1
|
||||
if (!SCHEME_STXP(form))
|
||||
scheme_signal_error("internal error: not syntax");
|
||||
#endif
|
||||
MZ_ASSERT(SCHEME_STXP(form));
|
||||
|
||||
if (rec[drec].comp) {
|
||||
scheme_default_compile_rec(rec, drec);
|
||||
|
|
|
@ -5586,7 +5586,7 @@ static int is_liftable_prim(Scheme_Object *v, int or_escape)
|
|||
|
||||
int scheme_is_liftable(Scheme_Object *o, Scheme_Hash_Tree *exclude_vars, int fuel, int as_rator, int or_escape)
|
||||
/* Can we lift `o` out of a `letrec` to a wrapping `let`? Refences
|
||||
to `exclude_vars` are now allowed, since those are the LHS. */
|
||||
to `exclude_vars` are not allowed, since those are the LHS. */
|
||||
{
|
||||
Scheme_Type t = SCHEME_TYPE(o);
|
||||
|
||||
|
@ -5704,7 +5704,6 @@ int scheme_ir_propagate_ok(Scheme_Object *value, Optimize_Info *info)
|
|||
scheme_optimize_context_to_string(info->context));
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (SAME_TYPE(scheme_case_lambda_sequence_type, SCHEME_TYPE(value))) {
|
||||
|
@ -6309,12 +6308,12 @@ static Scheme_Object *optimize_lets(Scheme_Object *form, Optimize_Info *info, in
|
|||
int try_again;
|
||||
do {
|
||||
try_again = 0;
|
||||
/* (let ([x (let~ ([y M]) N)]) P) => (let~ ([y M]) (let ([x N]) P))
|
||||
/* (let ([x (let ([y M]) N)]) P) => (let ([y M]) (let ([x N]) P))
|
||||
or (let ([x (begin M ... N)]) P) => (begin M ... (let ([x N]) P)) */
|
||||
if (head->num_clauses == 1) {
|
||||
irlv = (Scheme_IR_Let_Value *)head->body; /* ([x ...]) */
|
||||
if (SAME_TYPE(SCHEME_TYPE(irlv->value), scheme_ir_let_header_type)) {
|
||||
Scheme_IR_Let_Header *lh = (Scheme_IR_Let_Header *)irlv->value; /* (let~ ([y ...]) ...) */
|
||||
Scheme_IR_Let_Header *lh = (Scheme_IR_Let_Header *)irlv->value; /* (let ([y ...]) ...) */
|
||||
|
||||
if (!lh->num_clauses) {
|
||||
irlv->value = lh->body;
|
||||
|
|
|
@ -1697,14 +1697,7 @@ resolve_lambda(Scheme_Object *_lam, Resolve_Info *info,
|
|||
can_lift = 0;
|
||||
}
|
||||
|
||||
/* We have to perform a small bit of constant propagation here.
|
||||
Procedures closed only over top-level bindings are lifted during
|
||||
this pass. Some of the captured bindings from this phase may
|
||||
refer to a lifted procedure. In that case, we can replace the
|
||||
lexical reference with a direct reference to the top-level
|
||||
binding, which means that we can drop the binding from the
|
||||
closure. */
|
||||
|
||||
/* Check possibility of unboxing arguments: */
|
||||
closure_size = lam->closure_size;
|
||||
if (cl->arg_types) {
|
||||
int at_least_one = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user