[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 08/99: conditional->branch
From: |
Christopher Allan Webber |
Subject: |
[Guile-commits] 08/99: conditional->branch |
Date: |
Sun, 10 Oct 2021 21:50:42 -0400 (EDT) |
cwebber pushed a commit to branch compile-to-js-merge
in repository guile.
commit f8618a522fbaa732144548f4da556bbf8b2636e1
Author: Ian Price <ianprice90@googlemail.com>
AuthorDate: Sun Jun 7 17:00:48 2015 +0100
conditional->branch
---
module/language/javascript.scm | 8 ++++----
module/language/js-il/compile-javascript.scm | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/module/language/javascript.scm b/module/language/javascript.scm
index 18ce0f0..0a30db3 100644
--- a/module/language/javascript.scm
+++ b/module/language/javascript.scm
@@ -12,7 +12,7 @@
make-new new
make-id id
make-refine refine
- make-conditional conditional
+ make-branch branch
make-var var
print-statement))
@@ -55,7 +55,7 @@
(define-js-type new expr)
(define-js-type id name)
(define-js-type refine id field)
-(define-js-type conditional test then else)
+(define-js-type branch test then else)
(define-js-type var id exp)
(define (unparse-js exp)
@@ -76,7 +76,7 @@
`(id ,name))
(($ refine id field)
`(refine ,(unparse-js id) ,(unparse-js field)))
- (($ conditional test then else)
+ (($ branch test then else)
`(if ,(unparse-js test)
(block ,@(map unparse-js then))
(block ,@(map unparse-js else))))
@@ -134,7 +134,7 @@
(print-exp exp port)
(format port ";"))
- (($ conditional test then else)
+ (($ branch test then else)
(format port "if (")
(print-exp test port)
(format port ") {")
diff --git a/module/language/js-il/compile-javascript.scm
b/module/language/js-il/compile-javascript.scm
index a0427cc..373d5a9 100644
--- a/module/language/js-il/compile-javascript.scm
+++ b/module/language/js-il/compile-javascript.scm
@@ -47,10 +47,10 @@
(make-return (make-call (name->id k) (map compile-exp exps))))
(($ il:branch test then else)
- (make-conditional (make-call (make-refine *scheme* (make-const "is_true"))
- (list (compile-exp test)))
- (list (compile-exp then))
- (list (compile-exp else))))
+ (make-branch (make-call (make-refine *scheme* (make-const "is_true"))
+ (list (compile-exp test)))
+ (list (compile-exp then))
+ (list (compile-exp else))))
(($ il:const c)
(compile-const c))
- [Guile-commits] branch compile-to-js-merge created (now 6f112d5), Christopher Allan Webber, 2021/10/10
- [Guile-commits] 02/99: Replace values object with values passed as continuation arguments, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 01/99: Temp commit, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 09/99: get rid of unused match case, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 03/99: Remove jscall type, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 04/99: fix makefile, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 05/99: separate js-il functions into actual functions and those for continuations, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 06/99: Get rid of comments and dead branches, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 07/99: Simple inlining of immediate calls, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 08/99: conditional->branch,
Christopher Allan Webber <=
- [Guile-commits] 10/99: fix makefile, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 11/99: Compile rest args, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 16/99: Remove superfluous space, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 20/99: Implement keyword argument parsing, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 12/99: Compile string constants, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 13/99: Mangle js identifiers, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 15/99: Handle case-lambda via a jump table, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 19/99: Simplify output Javascript, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 21/99: Primitives should return Scheme Booleans, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 23/99: Compile cps $prompt form to javascript, Christopher Allan Webber, 2021/10/10