summaryrefslogtreecommitdiff
path: root/module/language/ecmascript/base.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/language/ecmascript/base.scm')
-rw-r--r--module/language/ecmascript/base.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/language/ecmascript/base.scm b/module/language/ecmascript/base.scm
index 42a659895..b7604a366 100644
--- a/module/language/ecmascript/base.scm
+++ b/module/language/ecmascript/base.scm
@@ -23,6 +23,7 @@
#:use-module (oop goops)
#:export (*undefined* *this*
<js-object> *object-prototype*
+ js-prototype js-props js-prop-attrs js-value js-constructor js-class
pget prop-attrs prop-has-attr? pput has-property? pdel
object->string object->number object->value/string
@@ -31,7 +32,7 @@
->primitive ->boolean ->number ->integer ->int32 ->uint32
->uint16 ->string ->object
- call/this lambda/this define-js-method
+ call/this* call/this lambda/this define-js-method
new-object))
@@ -82,8 +83,11 @@
(pput o p *undefined*)
#t))))
+(define (call/this* this f)
+ (with-fluid* *this* this f))
+
(define-macro (call/this this f . args)
- `(with-fluid* *this* ,this (lambda () (f . ,args))))
+ `(with-fluid* *this* ,this (lambda () (,f . ,args))))
(define-macro (lambda/this formals . body)
`(lambda ,formals (let ((this (fluid-ref *this*))) . ,body)))
(define-macro (define-js-method object name-and-args . body)