[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 45/99: Add #:js-inline? and #:js-flatten? debugging opti
From: |
Christopher Allan Webber |
Subject: |
[Guile-commits] 45/99: Add #:js-inline? and #:js-flatten? debugging options |
Date: |
Sun, 10 Oct 2021 21:50:55 -0400 (EDT) |
cwebber pushed a commit to branch compile-to-js-merge
in repository guile.
commit 723fc850f604addee991b01b075efcfe16b0bdab
Author: Ian Price <ianprice90@googlemail.com>
AuthorDate: Thu Jun 15 22:34:39 2017 +0100
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.
---
module/language/js-il/compile-javascript.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/module/language/js-il/compile-javascript.scm
b/module/language/js-il/compile-javascript.scm
index 67a3492..ed76441 100644
--- a/module/language/js-il/compile-javascript.scm
+++ b/module/language/js-il/compile-javascript.scm
@@ -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"))
- [Guile-commits] 36/99: Handle more identifier characters, (continued)
- [Guile-commits] 36/99: Handle more identifier characters, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 47/99: Add some primitives to runtime.js, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 50/99: Add more variables to no-values-primitives, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 55/99: Implement immediate version of vector primitives., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 62/99: scm_struct_init skips hidden fields., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 59/99: Implement built-in string procedures., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 60/99: Implement struct built-ins., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 70/99: Add `guild jslink' to bundle JS programs, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 75/99: scheme.HashTable uses ES6 Map objects, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 41/99: Fix build of (language cps compile-js), Christopher Allan Webber, 2021/10/10
- [Guile-commits] 45/99: Add #:js-inline? and #:js-flatten? debugging options,
Christopher Allan Webber <=
- [Guile-commits] 54/99: Implement structs in runtime.js, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 25/99: Implement call-with-values, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 52/99: Add macro type in runtime.js, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 51/99: Implement cached-module-box, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 48/99: Rebuild nested scopes for js continuations, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 18/99: Add more types of constants, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 17/99: Implement Optional arguments, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 27/99: values takes multiple arguments, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 28/99: Implement apply correctly, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 38/99: Explicitly test for undefined arguments to handle false values like 0, Christopher Allan Webber, 2021/10/10