Fix test for values
, and simplify test case. (#1525)
Repairs 7c22c42c7
.
This commit is contained in:
parent
4902b5e10c
commit
c5cce7aa7b
|
@ -6394,32 +6394,15 @@
|
|||
;; Regression test to check that `values` is
|
||||
;; handled correctly for estimating clock advances
|
||||
|
||||
(module triggers-optimizer-clock-estimation racket/base
|
||||
(require (for-syntax racket/base))
|
||||
(module triggers-optimizer-clock-estimation '#%kernel
|
||||
|
||||
(define (in-naturals0 n)
|
||||
(in-naturals n))
|
||||
(define-values (make-sequence) (lambda (_) 3))
|
||||
|
||||
;; restrict for/xyz to simple form and name it for/xyz0
|
||||
(define-syntax (define-for stx)
|
||||
(syntax-case stx ()
|
||||
[(_ for/xyz0 for/xyz cleanup)
|
||||
#'(define-syntax (for/xyz0 stx)
|
||||
(syntax-case stx ()
|
||||
[(_ ((clause0.x clause0.range)) body)
|
||||
#`(cleanup
|
||||
(for/xyz ((clause0.x (string> clause0.range)))
|
||||
;; the following line exists only so that coverage doesn't hilite x0 x ...
|
||||
clause0.x
|
||||
body))]))]))
|
||||
(define-values (string>) (lambda (s) s))
|
||||
|
||||
(define-for for/list0 for/list values)
|
||||
|
||||
(define (string> s)
|
||||
(if (string? s) (string->list s) s))
|
||||
|
||||
(void
|
||||
(for/list0 ((dropping-which-one (in-naturals0))) 1)))
|
||||
(values
|
||||
(let-values (((_1 _2) (make-sequence (string>))))
|
||||
(void))))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
|
|
@ -2815,7 +2815,7 @@ static int is_noncapturing_primitive(Scheme_Object *rator, int n)
|
|||
t = (((Scheme_Primitive_Proc *)rator)->pp.flags & SCHEME_PRIM_OTHER_TYPE_MASK);
|
||||
if (!n && (t == SCHEME_PRIM_TYPE_PARAMETER))
|
||||
return 1;
|
||||
if (SAME_TYPE(rator, scheme_values_proc))
|
||||
if (SAME_OBJ(rator, scheme_values_proc))
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2829,7 +2829,7 @@ static int is_nonsaving_primitive(Scheme_Object *rator, int n)
|
|||
opt = ((Scheme_Prim_Proc_Header *)rator)->flags & SCHEME_PRIM_OPT_MASK;
|
||||
if (opt >= SCHEME_PRIM_OPT_IMMEDIATE)
|
||||
return 1;
|
||||
if (SAME_TYPE(rator, scheme_values_proc))
|
||||
if (SAME_OBJ(rator, scheme_values_proc))
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user