Skip to content

Commit b3ed43e

Browse files
Copilotjackfirth
andcommitted
Optimize syntax-all-properties to avoid redundant computation
Co-authored-by: jackfirth <[email protected]>
1 parent 5e14c08 commit b3ed43e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

private/syntax-property-bundle.rkt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,9 @@
257257
(define (syntax-all-properties stx)
258258
(sequence->syntax-property-bundle
259259
(for*/list ([path (in-syntax-paths stx)]
260-
[key (in-list (syntax-property-symbol-keys (syntax-ref stx path)))])
261-
(define value (syntax-property (syntax-ref stx path) key))
260+
#:do [(define subform (syntax-ref stx path))]
261+
[key (in-list (syntax-property-symbol-keys subform))])
262+
(define value (syntax-property subform key))
262263
(syntax-property-entry path key value))))
263264

264265

0 commit comments

Comments
 (0)