guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sputnik test result (was Re: ECMAScript support broken?)


From: Kan-Ru Chen
Subject: Sputnik test result (was Re: ECMAScript support broken?)
Date: Tue, 04 Jan 2011 17:23:31 +0800
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Hi,

Noah Lavine <address@hidden> writes:

> If you mean give guile a '.js' file have it interpret that with
> ecmascript, then I think it's not possible right now, although I
> suspect that such a feature could be added easily.

Right, I've cooked a little script to interpret .js files directly.

I ran the sputniktests[1] from google using the attached guile-es-parse
script, which only tests the parser.

  python tools/sputnik.py --full-summary --command ./guile-es-parse|tee log

The result is impressive (full log attached):

  === Summary ===
   - Ran 5246 tests
   - Passed 4410 tests (84.1%)
   - Failed 836 tests (15.9%)

Where the failed tests have

   - 245 unicode errors (unicode literal is not supported)
   - 393 rbrace errors  (see below)
   - 39 Math.LN2 errors (see below)
   - 159 remain to sort out

The rbrace errors are from

   function test() {}
   // Syntax error: unexpected token :  in form rbrace

   function foo() { this.bar = function() { return 0; } };
   // Syntax error: unexpected token :  in form rbrace

I also tried to compile the parsed tests, but halted because too many
errors like

   Object.prototype.toString = function () {return "something";};
   // No applicable method for #<<generic> pput (6)> in call (pput
   // #<unbound> toString #<procedure 1e1c438 ()>)

I thought the tests won't run correctly without this.

[1]: https://code.google.com/p/sputniktests/

Cheers,
Kanru
-- 
A badly written book is only a blunder. A bad translation of a good
book is a crime.
                -- Gilbert Highet

Attachment: guile-es-parse
Description: guile-es-parse

Attachment: guile-es-parser-test-log.gz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]