diff options
author | Andy Wingo <wingo@pobox.com> | 2009-02-22 11:06:13 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-02-22 11:06:13 +0100 |
commit | af6c20b731c66397ab3886e162d6b6252d810cbb (patch) | |
tree | 3c39c5c35910f76e37f83af0cb05ef82d8211982 /module/language/ecmascript/compile-ghil.scm | |
parent | 8c306808c25fb1f353dca2b1d6a1356193e72dea (diff) | |
download | guile-af6c20b731c66397ab3886e162d6b6252d810cbb.tar.gz |
more arithmetic on non-numbers
* module/language/ecmascript/compile-ghil.scm (comp): Convert to number
on unary +.
* module/language/ecmascript/impl.scm: Define -, *, /, <, <=, >=, >
operations on non-numbers.
Diffstat (limited to 'module/language/ecmascript/compile-ghil.scm')
-rw-r--r-- | module/language/ecmascript/compile-ghil.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/language/ecmascript/compile-ghil.scm b/module/language/ecmascript/compile-ghil.scm index 1d1a94c69..3aa007a7e 100644 --- a/module/language/ecmascript/compile-ghil.scm +++ b/module/language/ecmascript/compile-ghil.scm @@ -89,7 +89,8 @@ (this (@impl e l get-this '())) ((+ ,a) - (make-ghil-inline e l 'add (list (comp a e) (make-ghil-quote e l 0)))) + (make-ghil-inline e l 'add (list (@impl e l ->number (list (comp a e))) + (make-ghil-quote e l 0)))) ((- ,a) (make-ghil-inline e l 'sub (list (make-ghil-quote e l 0) (comp a e)))) ((~ ,a) |