Bug 18624 - SQUIRRELFISH: pass all JavaScriptCore regression tests
Summary: SQUIRRELFISH: pass all JavaScriptCore regression tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Java (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on: 18619 18628 18633 18634 18641 18643 18649 18664 18672 18686 18707 18717 18728 18732 18735 18736 18822 18864
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-19 13:35 PDT by Maciej Stachowiak
Modified: 2008-05-06 14:52 PDT (History)
1 user (show)

See Also:


Attachments
current failures (the "fixed" are probably also failures) (9.27 KB, text/plain)
2008-04-19 13:38 PDT, Maciej Stachowiak
no flags Details
HTML results from running the tests - should give more details of the failures (249.59 KB, text/html)
2008-04-19 13:41 PDT, Maciej Stachowiak
no flags Details
the latest list of failures (4.79 KB, text/plain)
2008-04-21 01:39 PDT, Maciej Stachowiak
no flags Details
latest results file (179.35 KB, text/html)
2008-04-21 01:43 PDT, Maciej Stachowiak
no flags Details
Latest list of failures (2.76 KB, text/plain)
2008-04-21 12:28 PDT, Cameron Zwarich (cpst)
no flags Details
Latest results file (151.66 KB, text/html)
2008-04-21 12:29 PDT, Cameron Zwarich (cpst)
no flags Details
Latest list of failures (1.51 KB, text/plain)
2008-04-22 11:34 PDT, Cameron Zwarich (cpst)
no flags Details
Latest results file (136.69 KB, text/html)
2008-04-22 11:35 PDT, Cameron Zwarich (cpst)
no flags Details
Latest list of failures (1.41 KB, text/plain)
2008-04-23 22:58 PDT, Cameron Zwarich (cpst)
no flags Details
Latest results file (40.13 KB, text/html)
2008-04-23 22:59 PDT, Cameron Zwarich (cpst)
no flags Details
Latest results file (135.93 KB, text/html)
2008-04-23 23:01 PDT, Cameron Zwarich (cpst)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2008-04-19 13:35:47 PDT
Currently the SquirrelFish branch fails (or crashes on) 287 of the JavaScriptCore regression tests. We need to pass them all to be able to land on trunk.

Individual issues that block passing the JSC regression tests should be filed as blockers of this bug.
Comment 1 Maciej Stachowiak 2008-04-19 13:38:21 PDT
Created attachment 20689 [details]
current failures (the "fixed" are probably also failures)
Comment 2 Maciej Stachowiak 2008-04-19 13:41:16 PDT
Created attachment 20690 [details]
HTML results from running the tests - should give more details of the failures
Comment 3 Maciej Stachowiak 2008-04-21 01:38:29 PDT
As of r32291 we only fail 144 of the JSC regression tests, compiling debug.
Comment 4 Maciej Stachowiak 2008-04-21 01:39:40 PDT
Created attachment 20719 [details]
the latest list of failures
Comment 5 Maciej Stachowiak 2008-04-21 01:43:36 PDT
Created attachment 20720 [details]
latest results file
Comment 6 Cameron Zwarich (cpst) 2008-04-21 12:28:21 PDT
Created attachment 20734 [details]
Latest list of failures

Here is the latest list of failures. We only have 79 regressions left, plus 5 possibly dubious fixes.
Comment 7 Cameron Zwarich (cpst) 2008-04-21 12:29:19 PDT
Created attachment 20735 [details]
Latest results file
Comment 8 Maciej Stachowiak 2008-04-22 02:07:32 PDT
Down to 51 regressions now.
Comment 9 Maciej Stachowiak 2008-04-22 03:59:31 PDT
Down to 41.
Comment 10 Cameron Zwarich (cpst) 2008-04-22 11:34:09 PDT
Created attachment 20749 [details]
Latest list of failures

Here is the latest list of failures. There are 44 failures and no 'fixes'. One of the failures is due to my timezone, and for some reason Maciej seems to be seeing less failures than me. In addition to these, some tests still hit assertion failures without affecting the results.
Comment 11 Cameron Zwarich (cpst) 2008-04-22 11:35:25 PDT
Created attachment 20750 [details]
Latest results file
Comment 12 Maciej Stachowiak 2008-04-23 07:59:22 PDT
The driver script was not properly detecting crashes as failures before. When this was fixed we went up to 86 failures. Now we are down to 61 again.
Comment 13 Cameron Zwarich (cpst) 2008-04-23 22:58:47 PDT
Created attachment 20786 [details]
Latest list of failures

I now see 40 regressions, including the one for being in my timezone.
Comment 14 Cameron Zwarich (cpst) 2008-04-23 22:59:31 PDT
Created attachment 20787 [details]
Latest results file
Comment 15 Cameron Zwarich (cpst) 2008-04-23 23:01:48 PDT
Created attachment 20788 [details]
Latest results file

Oops. I uploaded the results from my WebKit tree, not my SquirrelFish tree.
Comment 16 Cameron Zwarich (cpst) 2008-04-23 23:07:03 PDT
All of the remaining test failures are due to the lack of arguments, the lack of a recursion limit, custom valueOf and toString, and getters and setters, except for the following:

ecma/Expressions/11.4.1.js
ecma_3/Expressions/11.9.6-1.js
ecma_3/RegExp/regress-188206.js
js1_2/statements/switch2.js
js1_5/Array/regress-157652.js
js1_5/Regress/regress-118849.js
js1_5/Scope/scope-003.js

We should try to knock these tests off individually.
Comment 17 Maciej Stachowiak 2008-04-24 02:10:44 PDT
ecma/Expressions/11.4.1.js

This test fails because "typeof x" throws an exception when x is undefined, but it should return "undefined". This should be an easy fix. Instead of generating this:

resolve		tr0, x(@id0)
type_of		tr0, tr0

We should generate something like this:

resolve_base		tr0, x(@id0)
get_prop_id tr0, tr0, x(@id0)
type_of		tr0, tr0

That does it with no new opcodes, and while the code is a little worse, typeof performance is not critical.
Comment 18 Maciej Stachowiak 2008-04-24 02:25:46 PDT
ecma_3/Expressions/11.9.6-1.js fails because this: eval('var x = 0') returns 0 instead of undefined. Probably our codegen for "var" is wrong. Though it would be unfortunate to have to write undefined to a register every time var is executed.
Comment 19 Oliver Hunt 2008-04-24 02:30:01 PDT
For scope-003 the problem is that closures appear to get the wrong "this" objet in certain cases -- 
var text = "PASS!!!";

function a()
{
  var text = "FAIL!!!";
  function b()
  {
    alert(this.text);
  }

  this.c = function()
  {
    b();
  }
  b();
}

new a().c();

--
Should print PASS!!! twice, but it prints FAIL the second time as the activation object is being used as the this object.
Comment 20 Maciej Stachowiak 2008-04-24 02:36:03 PDT
In the case of ecma_3/RegExp/regress-188206.js, eval seems to be throwing a syntax error that is uncatchable. In particular, it seems to return the exception instead of throwing it:

try {
    print(eval(' /a**/ '));
} catch (e) {
    print("error");
}


Comment 21 Maciej Stachowiak 2008-04-24 02:42:26 PDT
js1_2/statements/switch2.js seems to be faulty codegen for switch statements without a 'default' block. If no conditions match, we should skip all the case clauses, but instead we fall through to the first.

function f2(i) {
    switch (i) {
    case 0:
    case 1:
        return 1;
    case 2:
        return 2;
    }
    // with no default, control will fall through                                                           
    return 3;
}


[   0] load		tr0, 0(@k0)		
[   3] stricteq		tr0, tr0, lr1
[   7] jtrue		tr0, 21(->30)
[  10] load		tr0, 1(@k1)		
[  13] stricteq		tr0, tr0, lr1
[  17] jtrue		tr0, 11(->30)
[  20] load		tr0, 2(@k2)		
[  23] stricteq		tr0, tr0, lr1
[  27] jtrue		tr0, 6(->35)
[  30] load		tr0, 1(@k1)		
[  33] ret		tr0
[  35] load		tr0, 2(@k2)		
[  38] ret		tr0
[  40] load		tr0, 3(@k3)		
[  43] ret		tr0

Comment 22 Maciej Stachowiak 2008-04-24 02:45:36 PDT
js1_5/Array/regress-157652.js is the undefined typeof issue again.
Comment 23 Oliver Hunt 2008-04-24 02:47:02 PDT
ecma_3/RegExp/regress-188206.js as op_new_regex fails to perform an exception check.  It should be possible to make this "branchless" relatively trivially.
Comment 24 Maciej Stachowiak 2008-04-24 03:03:20 PDT
 js1_5/Regress/regress-118849.js appears to fail because of a missing VM_EXCEPTION_CHECK for op_construct, the following does not print "caught" for instance:

try {
    new Function(123,123);
} catch(e) {
    print("caught");
}


Comment 25 Maciej Stachowiak 2008-04-24 03:05:16 PDT
I believe we now have all test failures diagnosed. Now we just need to fix the bugs.
Comment 26 Oliver Hunt 2008-04-24 03:11:42 PDT
I believe the fix for eval("var n = 0; ") returning 0 willsimply be to modify VarStatementNode::emitCode to *not* pass on the dst register (and simliar for constdecl and the comma variants)


Comment 27 Cameron Zwarich (cpst) 2008-04-24 10:17:22 PDT
We are now down to:

ecma_3/Expressions/11.9.6-1.js
ecma_3/RegExp/regress-188206.js
js1_2/statements/switch2.js
js1_5/Regress/regress-118849.js
js1_5/Scope/scope-003.js
Comment 28 Cameron Zwarich (cpst) 2008-04-24 10:38:12 PDT
r32493 broke the following tests:

ecma/Expressions/11.8.1.js
ecma/Expressions/11.8.2.js
ecma/Expressions/11.8.3.js
ecma/Expressions/11.8.4.js
Comment 29 Cameron Zwarich (cpst) 2008-04-24 16:38:05 PDT
We are now down to:

ecma_3/RegExp/regress-188206.js
js1_2/statements/switch2.js
js1_5/Regress/regress-118849.js
js1_5/Scope/scope-003.js
Comment 30 Cameron Zwarich (cpst) 2008-04-25 11:14:30 PDT
All of the individual test failures are now fixed. All of the remaining test failures are due to the lack of arguments, the lack of a recursion limit, custom valueOf and toString, and getters and setters.
Comment 31 Maciej Stachowiak 2008-05-03 00:45:18 PDT
The only blocker now is f.arguments / f.caller

Comment 32 Geoffrey Garen 2008-05-06 14:52:31 PDT
All Moz JS tests pass now.