summaryrefslogtreecommitdiff
path: root/module/language/ecmascript/impl.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-02-19 16:40:22 +0100
committerAndy Wingo <wingo@pobox.com>2009-02-19 16:40:22 +0100
commit7fb4230060462f5169706b42abdc6c48cd6049da (patch)
tree21e525e08d5389b0905722bf3f45ba49f37847d8 /module/language/ecmascript/impl.scm
parent10e1bd278fca5d65fba7fc977a14e4a37a572cc7 (diff)
downloadguile-7fb4230060462f5169706b42abdc6c48cd6049da.tar.gz
property gets and puts implemented, yays
* module/language/ecmascript/compile-ghil.scm (@impl): Ok, don't recurse on args here. (comp): Implement property gets and puts and lexical assignment. (comp-body): Fix scanning of var forms. * module/language/ecmascript/impl.scm (prop-attrs): Allow for the prop attr array to be #f. * module/language/ecmascript/parse.scm (parse-ecmascript): Fix assignment parsing.
Diffstat (limited to 'module/language/ecmascript/impl.scm')
-rw-r--r--module/language/ecmascript/impl.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/language/ecmascript/impl.scm b/module/language/ecmascript/impl.scm
index c335af0b9..65a46fa80 100644
--- a/module/language/ecmascript/impl.scm
+++ b/module/language/ecmascript/impl.scm
@@ -55,7 +55,8 @@
*undefined*)))))
(define-method (prop-attrs (o <js-object>) p)
- (or (hashq-ref (js-prop-attrs o) p)
+ (or (let ((attrs (js-prop-attrs o)))
+ (and attrs (hashq-ref (js-prop-attrs o) p)))
(let ((proto (js-prototype o)))
(if proto
(prop-attrs proto p)