mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
Add #:js-inline? and #:js-flatten? debugging options
* module/language/js-il/compile-javascript.scm (compile-javascript): Check for #:js-inline? and #:js-flatten?, and turn off inline-single-calls and flatten-blocks respectively.
This commit is contained in:
parent
602bfb559d
commit
723fc850f6
1 changed files with 6 additions and 2 deletions
|
@ -15,9 +15,13 @@
|
|||
(eqv? obj (pointer->scm (make-pointer unbound-bits))))
|
||||
|
||||
(define (compile-javascript exp env opts)
|
||||
(set! exp (inline-single-calls exp))
|
||||
(match (memq #:js-inline? opts)
|
||||
((#:js-inline? #f _ ...) #f)
|
||||
(_ (set! exp (inline-single-calls exp))))
|
||||
(set! exp (compile-exp exp))
|
||||
(set! exp (flatten-blocks exp))
|
||||
(match (memq #:js-flatten? opts)
|
||||
((#:js-flatten? #f _ ...) #f)
|
||||
(_ (set! exp (flatten-blocks exp))))
|
||||
(values exp env env))
|
||||
|
||||
(define *scheme* (make-id "scheme"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue