[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/11: Fix sub/- primcall bug
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/11: Fix sub/- primcall bug |
Date: |
Wed, 20 May 2015 17:32:53 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit fa7df5ed3afebb34e509f3642fb9b4a839cb2131
Author: Andy Wingo <address@hidden>
Date: Wed May 20 19:18:35 2015 +0200
Fix sub/- primcall bug
* module/language/tree-il/compile-cps2.scm (convert): Fix bug
in (apply - ...), because the instruction for "-" is "sub", and
"sub" lookup was failing. Caught by numbers.test. Really I would
like to get rid of $prim, somehow.
---
module/language/tree-il/compile-cps2.scm | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/module/language/tree-il/compile-cps2.scm
b/module/language/tree-il/compile-cps2.scm
index 2f25451..4ec99c4 100644
--- a/module/language/tree-il/compile-cps2.scm
+++ b/module/language/tree-il/compile-cps2.scm
@@ -657,7 +657,7 @@
(letk ktail ($kargs ('tail) (tail) ,body))
($ (lp args ktail)))))))))))
((prim-instruction name)
- => (lambda (name)
+ => (lambda (instruction)
(convert-args cps args
(lambda (cps args)
;; Tree-IL primcalls are sloppy, in that it could be
@@ -665,14 +665,14 @@
;; arguments. In CPS we are more strict and only
;; residualize a $primcall if the argument count
;; matches.
- (match (prim-arity name)
+ (match (prim-arity instruction)
((out . in)
(if (= in (length args))
(with-cps cps
(let$ k (adapt-arity k src out))
(build-term
($continue k src
- ($primcall name args))))
+ ($primcall instruction args))))
(with-cps cps
(letv prim)
(letk kprim ($kargs ('prim) (prim)
- [Guile-commits] branch master updated (ef5f2fc -> 48b2f19), Andy Wingo, 2015/05/20
- [Guile-commits] 04/11: Add two-argument fixpoint arity, Andy Wingo, 2015/05/20
- [Guile-commits] 02/11: Fix fixpoint, Andy Wingo, 2015/05/20
- [Guile-commits] 01/11: Fix sub/- primcall bug,
Andy Wingo <=
- [Guile-commits] 03/11: Fix bug compiling fixpoint combinator, Andy Wingo, 2015/05/20
- [Guile-commits] 07/11: Add arity to worklist-fold, Andy Wingo, 2015/05/20
- [Guile-commits] 06/11: Variadic intset-fold, intmap-fold, Andy Wingo, 2015/05/20
- [Guile-commits] 08/11: intmaps and intsets print with abbreviated key ranges, Andy Wingo, 2015/05/20
- [Guile-commits] 09/11: Fix bug in CPS2 simplify's "transform-conts", Andy Wingo, 2015/05/20
- [Guile-commits] 05/11: Intmaps do not treat #f specially as a value, Andy Wingo, 2015/05/20
- [Guile-commits] 10/11: Port effects analysis to CPS2, Andy Wingo, 2015/05/20
- [Guile-commits] 11/11: Port dead code elimination (DCE) pass to CPS2, Andy Wingo, 2015/05/20