Permalink
Browse files

found a workaround by using an artificial set-bang

  • Loading branch information...
1 parent 6323fce commit 6b8bcdaf767efe2294a7dd8d9a5580c5a64c20ff Danny Yoo committed Jan 18, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 lang/js/js.rkt
View
@@ -28,7 +28,8 @@
[impl
(map (compose resolve-implementation-path syntax-e)
(syntax->list #'(javascript-module-name ...)))]
- [(internal-name ...) (generate-temporaries #'(provided-name ...))])
+ [(internal-name ...) (generate-temporaries #'(provided-name ...))]
+ [(set-internal-name! ...) (generate-temporaries #'(provided-name ...))])
(syntax/loc stx
(begin
@@ -47,7 +48,13 @@
))
(require racket-module-name)
- (define internal-name provided-name) ...
+ (begin
+ (define internal-name provided-name)
+ ;; Discouraging constant folding via set! to address issue 74
+ ;; https://github.com/dyoo/whalesong/issues/74
+ (define (set-internal-name! x)
+ (set! internal-name x)))
+ ...
(provide (rename-out [internal-name provided-name] ...)))))]))

0 comments on commit 6b8bcda

Please sign in to comment.