fix wcm on error in let's
Repairs a problem with 8190a7730d
, which can incorerctly
move an erroring experssion into tail position.
This commit is contained in:
parent
8190a7730d
commit
d1ba9fbb6e
|
@ -3893,6 +3893,20 @@
|
||||||
(test-comp '(letrec-values ([(x y) (error "oops")]) 11)
|
(test-comp '(letrec-values ([(x y) (error "oops")]) 11)
|
||||||
'(error "oops"))
|
'(error "oops"))
|
||||||
|
|
||||||
|
(test-comp '(with-continuation-mark
|
||||||
|
'x 'y
|
||||||
|
(let-values ([() (with-continuation-mark
|
||||||
|
'x 'z
|
||||||
|
(error "oops"))])
|
||||||
|
11))
|
||||||
|
'(with-continuation-mark
|
||||||
|
'x 'y
|
||||||
|
(begin0
|
||||||
|
(with-continuation-mark
|
||||||
|
'x 'z
|
||||||
|
(error "oops"))
|
||||||
|
(void))))
|
||||||
|
|
||||||
(test-comp `(module m racket/base
|
(test-comp `(module m racket/base
|
||||||
(define x 5)
|
(define x 5)
|
||||||
(set! x 3)
|
(set! x 3)
|
||||||
|
|
|
@ -7850,7 +7850,7 @@ static Scheme_Object *optimize_lets(Scheme_Object *form, Optimize_Info *info, in
|
||||||
if (!found_escapes) {
|
if (!found_escapes) {
|
||||||
body = scheme_optimize_expr(body, body_info, scheme_optimize_tail_context(context));
|
body = scheme_optimize_expr(body, body_info, scheme_optimize_tail_context(context));
|
||||||
} else {
|
} else {
|
||||||
body = escape_body;
|
body = ensure_noncm(escape_body);
|
||||||
body_info->single_result = 1;
|
body_info->single_result = 1;
|
||||||
body_info->preserves_marks = 1;
|
body_info->preserves_marks = 1;
|
||||||
body_info->escapes = 1;
|
body_info->escapes = 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user