summaryrefslogtreecommitdiff
path: root/module/language/tree-il/inline.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-10-23 15:51:00 +0200
committerAndy Wingo <wingo@pobox.com>2009-10-23 16:48:05 +0200
commitb0c8c187d96a7a4c7905465f4156eeb7e5bfc51e (patch)
treea7350bda5932507d6445611d548fc9a2c23e44a8 /module/language/tree-il/inline.scm
parent7ab42fa20cd997ce6ccb4f3f59bb400e04d2d666 (diff)
downloadguile-b0c8c187d96a7a4c7905465f4156eeb7e5bfc51e.tar.gz
separate "inits" field in <lambda-case>; compile fixes for inits, kwargs
* module/language/tree-il.scm (<lambda-case>): Add "inits" field, so we don't have to parse it out of opt and kw. Adapt the traversal procedures. * module/language/tree-il/analyze.scm (analyze-lexicals): Analyze lexicals in the <lambda-case> init expressions as well. Fix keyword allocation. * module/language/tree-il/compile-glil.scm (compile-glil): Adapt to make-lambda-case change. (flatten): Adapt to "inits" slot, actually init uninitialized args, and fix bugs related to keyword arguments. * module/language/tree-il/inline.scm (inline!): Adapt a little bit -- but with no effect. * module/language/glil/compile-assembly.scm (glil->assembly): Flesh out <glil-kw-prelude> compilation some more. Add a "bound?" op for <glil-lexical>, which will push #t if the local is bound. * module/ice-9/psyntax.scm (build-simple-lambda, build-lambda-case): Update for new signature of make-lambda-case. * module/ice-9/psyntax-pp.scm: Regenerated. * module/language/brainfuck/compile-tree-il.scm (compile-body): * module/language/ecmascript/compile-tree-il.scm (comp): * test-suite/tests/tree-il.test ("lambda"): Update for new lambda-case syntax.
Diffstat (limited to 'module/language/tree-il/inline.scm')
-rw-r--r--module/language/tree-il/inline.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/language/tree-il/inline.scm b/module/language/tree-il/inline.scm
index d596a7bcf..9b53ec68f 100644
--- a/module/language/tree-il/inline.scm
+++ b/module/language/tree-il/inline.scm
@@ -44,8 +44,9 @@
(let lp ((lcase body))
(and lcase
(record-case lcase
- ((<lambda-case> req opt rest kw vars predicate body else)
- (if (and (= (length vars) (length req) (length args)))
+ ((<lambda-case> req opt rest kw inits vars predicate body else)
+ (if (and (= (length vars) (length req) (length args))
+ (not predicate))
(let ((x (make-let src req vars args body)))
(or (inline1 x) x))
(lp else)))))))