diff options
author | Andy Wingo <wingo@pobox.com> | 2010-12-10 16:31:14 +0100 |
---|---|---|
committer | Ian Price <ianprice90@googlemail.com> | 2013-09-09 17:01:23 +0100 |
commit | ae037892f0008c9d05f9c0a090618d013a6dcfbb (patch) | |
tree | 4c32a57e0c11e286a1dc70c303a2dbee76bab946 /module/language/lua/compile-tree-il.scm | |
parent | 48f7c66a40f9357e10691caafac87355a17a3dec (diff) | |
download | guile-ae037892f0008c9d05f9c0a090618d013a6dcfbb.tar.gz |
remove true? and false?; lua's truthiness and falsehood is guile's.
* module/language/lua/runtime.scm (true?, false?): Remove, now that #nil
is false.
* module/language/lua/compile-tree-il.scm: Don't emit calls to true? or
false?.
Diffstat (limited to 'module/language/lua/compile-tree-il.scm')
-rw-r--r-- | module/language/lua/compile-tree-il.scm | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/module/language/lua/compile-tree-il.scm b/module/language/lua/compile-tree-il.scm index 41f86e5a6..cd79e76ef 100644 --- a/module/language/lua/compile-tree-il.scm +++ b/module/language/lua/compile-tree-il.scm @@ -44,10 +44,6 @@ "Apply a function in the (language lua runtime) module" (make-application src (ref-runtime src name) arguments)) -(define (make-lua-conditional src condition then else) - "Generate a conditional with (@ (language lua runtime) true?)" - (make-conditional src (make-runtime-application src 'true? (list condition)) then else)) - (define (make-table-ref src table index) (make-runtime-application src 'index (list table (if (symbol? index) (make-const src (symbol->string index)) index)))) @@ -78,7 +74,7 @@ (apply-named-lua-function src "while" (lambda (loop) - (make-lua-conditional + (make-conditional src condition (make-sequence src @@ -300,9 +296,9 @@ (begin ;; if not (var and limit and step) then error() end (if (apply (primitive not) - (if (apply (@ (language lua runtime) true?) (lexical variable ,gs-variable)) - (if (apply (@ (language lua runtime) true?) (lexical limit ,gs-limit)) - (if (apply (@ (language lua runtime) true?) (lexical step ,gs-step)) + (if (lexical variable ,gs-variable) + (if (lexical limit ,gs-limit) + (if (lexical step ,gs-step) (const #t) (const #f)) (const #f)) @@ -377,13 +373,13 @@ (list left right))))) result)) ((#:or) - (make-lua-conditional + (make-conditional src left left right)) ((#:and) - (make-lua-conditional + (make-conditional src left right |