unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#10623: Bugs in ecmascript/base.scm
@ 2012-01-27  8:31 Mark H Weaver
  2012-05-21 18:50 ` bug#10623: [PATCH] Fixed unbound variables and unbound values Sjoerd van Leent
  0 siblings, 1 reply; 4+ messages in thread
From: Mark H Weaver @ 2012-01-27  8:31 UTC (permalink / raw)
  To: 10623

These are genuine bugs:

language/ecmascript/base.scm:179:31: warning: wrong number of arguments to `object->number'
language/ecmascript/base.scm:95:6: warning: possibly unbound variable `v'
language/ecmascript/base.scm:181:14: warning: possibly unbound variable `o'

     Mark





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10623: [PATCH] Fixed unbound variables and unbound values
  2012-01-27  8:31 bug#10623: Bugs in ecmascript/base.scm Mark H Weaver
@ 2012-05-21 18:50 ` Sjoerd van Leent
  2012-05-21 18:50   ` bug#10623: [PATCH] Fixed unbound variables and unbound values for the ecmascript base Guile scheme file Sjoerd van Leent
  0 siblings, 1 reply; 4+ messages in thread
From: Sjoerd van Leent @ 2012-05-21 18:50 UTC (permalink / raw)
  To: 10623; +Cc: Sjoerd van Leent

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]



Fixed unbound variables and unbound values for the ecmascript base Guile scheme file.

Afftected are:
  module/langyage/ecmascript/base.scm:

  - has-property? should check against the value p instead of v when
    handling hashq-get-handle

  - When x is of type <js-object> on line 179, it should be appending #t to
    the call to object->number, as object->number requires it

  - Within the same bit, a few lines later, A TypeError should be thrown
    using the value x instead of the non-existant value o

Sjoerd van Leent (1):
  Fixed unbound variables and unbound values for the ecmascript base
    Guile scheme file.

 module/language/ecmascript/base.scm |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10623: [PATCH] Fixed unbound variables and unbound values for the ecmascript base Guile scheme file.
  2012-05-21 18:50 ` bug#10623: [PATCH] Fixed unbound variables and unbound values Sjoerd van Leent
@ 2012-05-21 18:50   ` Sjoerd van Leent
  2012-07-04 19:00     ` Andy Wingo
  0 siblings, 1 reply; 4+ messages in thread
From: Sjoerd van Leent @ 2012-05-21 18:50 UTC (permalink / raw)
  To: 10623; +Cc: Sjoerd van Leent

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]


Afftected are:
  module/langyage/ecmascript/base.scm:

  - has-property? should check against the value p instead of v when
    handling hashq-get-handle

  - When x is of type <js-object> on line 179, it should be appending #t to
    the call to object->number, as object->number requires it

  - Within the same bit, a few lines later, A TypeError should be thrown
    using the value x instead of the non-existant value o
---
 module/language/ecmascript/base.scm |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fixed-unbound-variables-and-unbound-values-for-the-e.patch --]
[-- Type: text/x-patch; name="0001-Fixed-unbound-variables-and-unbound-values-for-the-e.patch", Size: 868 bytes --]

diff --git a/module/language/ecmascript/base.scm b/module/language/ecmascript/base.scm
index b244bec..6f5c65b 100644
--- a/module/language/ecmascript/base.scm
+++ b/module/language/ecmascript/base.scm
@@ -92,7 +92,7 @@
   (pdel o (string->symbol p)))
 
 (define-method (has-property? (o <js-object>) p)
-  (if (hashq-get-handle (js-props o) v)
+  (if (hashq-get-handle (js-props o) p)
       #t
       (let ((proto (js-prototype o)))
         (if proto
@@ -176,9 +176,9 @@
         ((boolean? x) (if x 1 0))
         ((null? x) 0)
         ((eq? x *undefined*) +nan.0)
-        ((is-a? x <js-object>) (object->number x))
+        ((is-a? x <js-object>) (object->number x #t))
         ((string? x) (string->number x))
-        (else (throw 'TypeError o '->number))))
+        (else (throw 'TypeError x '->number))))
 
 (define (->integer x)
   (let ((n (->number x)))

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#10623: [PATCH] Fixed unbound variables and unbound values for the ecmascript base Guile scheme file.
  2012-05-21 18:50   ` bug#10623: [PATCH] Fixed unbound variables and unbound values for the ecmascript base Guile scheme file Sjoerd van Leent
@ 2012-07-04 19:00     ` Andy Wingo
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2012-07-04 19:00 UTC (permalink / raw)
  To: Sjoerd van Leent; +Cc: 10623-done

Fixed in 6b5e918e4f3cf011713e699c6af1c4e364bfae36.  Thanks, and thanks
to Noah for applying.

Andy
-- 
http://wingolog.org/





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-04 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-27  8:31 bug#10623: Bugs in ecmascript/base.scm Mark H Weaver
2012-05-21 18:50 ` bug#10623: [PATCH] Fixed unbound variables and unbound values Sjoerd van Leent
2012-05-21 18:50   ` bug#10623: [PATCH] Fixed unbound variables and unbound values for the ecmascript base Guile scheme file Sjoerd van Leent
2012-07-04 19:00     ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).