From 33ae2e7fceb7822d4a6f6c29b8dcd30867b8eabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Wed, 3 Feb 2016 23:19:01 +0100 Subject: [PATCH] Fix the source location for vector access optimizations, so that `raco cover` sees them as covered. --- typed-racket-lib/typed-racket/optimizer/vector.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typed-racket-lib/typed-racket/optimizer/vector.rkt b/typed-racket-lib/typed-racket/optimizer/vector.rkt index 424a1548..5e7f9346 100644 --- a/typed-racket-lib/typed-racket/optimizer/vector.rkt +++ b/typed-racket-lib/typed-racket/optimizer/vector.rkt @@ -26,8 +26,8 @@ (define-syntax-class vector-op #:commit ;; we need the non-* versions of these unsafe operations to be chaperone-safe - (pattern :vector-ref^ #:with unsafe #'unsafe-vector-ref #:with unsafe-no-impersonator #'unsafe-vector*-ref) - (pattern :vector-set!^ #:with unsafe #'unsafe-vector-set! #:with unsafe-no-impersonator #'unsafe-vector*-set!)) + (pattern v:vector-ref^ #:with unsafe (syntax/loc #'v unsafe-vector-ref) #:with unsafe-no-impersonator (syntax/loc #'v unsafe-vector*-ref)) + (pattern v:vector-set!^ #:with unsafe (syntax/loc #'v unsafe-vector-set!) #:with unsafe-no-impersonator (syntax/loc #'v unsafe-vector*-set!))) (define-merged-syntax-class flvector-op (flvector-ref^ flvector-set!^ extflvector-ref^ extflvector-set!^)) (define-syntax-class known-length-vector-expr