[webkit-changes] cvs commit: WebCore/layout-tests/fast/js const-expected.txt const.html eval-var-decl-expected.txt eval-var-decl.html

Maciej mjs at opensource.apple.com
Tue Jun 21 01:25:27 PDT 2005


mjs         05/06/21 01:25:27

  Modified:    .        ChangeLog
               kjs      function.cpp grammar.y keywords.table nodes.cpp
                        nodes.h
               tests/mozilla expected.html
               .        ChangeLog
  Added:       layout-tests/fast/js const-expected.txt const.html
                        eval-var-decl-expected.txt eval-var-decl.html
  Log:
  JavaScriptCore:
  
          Reviewed by Darin(first pass) and Hyatt.
  
          - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3576
          (roll in support for "const" keyword from KDE tree)
          - make processVarDecls handle deletability of variables declared
          in an eval block the same as evaluate would
          - make eval() call processVarDecls - needed to match mozilla and
          to make the second change testable
  
          I started with the KDE implementation of const but I ended up changing it a bit
          to avoid the use of a global variable. Now instead of the global variable it distinguishes
          const and var at the grammar level so the appropriate node can know the right kind of
          declaration.
  
          Test cases:
          * tests/mozilla/expected.html: Updated for one new test that is
          failing - we used to bail on it entirely because it checks for
          const support before starting.
          - see also test cases added in WebCore
  
          * kjs/grammar.y: Add rules for const declarations.
          * kjs/keywords.table: Add const keyword.
          * kjs/nodes.cpp:
          (VarDeclNode::VarDeclNode): Add parameter.
          (VarDeclNode::evaluate): Add const support.
          (VarDeclNode::processVarDecls): Add const support.
          (VarStatementNode::execute): Irrelevant change.
          (ForInNode::ForInNode): Tell our variable node that it's a variable.
          * kjs/nodes.h:
          (KJS::VarDeclNode::): Add declaration of type enum, extra constructor parameter.
          (KJS::VarStatementNode::VarStatementNode): Irrelevant change.
          * kjs/function.cpp:
          (KJS::GlobalFuncImp::call): Process var decls before evaluating.
  
  WebCore:
  
          Reviewed by Darin(first pass) and Hyatt.
  
          - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3576
          (roll in support for "const" keyword from KDE tree)
          - make processVarDecls handle deletability of variables declared
          in an eval block the same as evaluate would
          - make eval() call processVarDecls - needed to match mozilla and
          to make the second change testable
  
  	Test cases only, fix is in JavaScriptCore
  
          Test cases added:
          * layout-tests/fast/js/const-expected.txt: Added.
          * layout-tests/fast/js/const.html: Added.
          * layout-tests/fast/js/eval-var-decl-expected.txt: Added.
          * layout-tests/fast/js/eval-var-decl.html: Added.
  
  Revision  Changes    Path
  1.716     +36 -0     JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.715
  retrieving revision 1.716
  diff -u -r1.715 -r1.716
  --- ChangeLog	20 Jun 2005 21:59:29 -0000	1.715
  +++ ChangeLog	21 Jun 2005 08:25:21 -0000	1.716
  @@ -1,5 +1,41 @@
   2005-06-20  Maciej Stachowiak  <mjs at apple.com>
   
  +        Reviewed by Darin(first pass) and Hyatt.
  +
  +        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3576
  +        (roll in support for "const" keyword from KDE tree)
  +        - make processVarDecls handle deletability of variables declared
  +        in an eval block the same as evaluate would
  +        - make eval() call processVarDecls - needed to match mozilla and
  +        to make the second change testable
  +
  +        I started with the KDE implementation of const but I ended up changing it a bit
  +        to avoid the use of a global variable. Now instead of the global variable it distinguishes
  +        const and var at the grammar level so the appropriate node can know the right kind of
  +        declaration.
  +
  +        Test cases:
  +        * tests/mozilla/expected.html: Updated for one new test that is
  +        failing - we used to bail on it entirely because it checks for
  +        const support before starting.
  +        - see also test cases added in WebCore
  +
  +        * kjs/grammar.y: Add rules for const declarations.
  +        * kjs/keywords.table: Add const keyword.
  +        * kjs/nodes.cpp:
  +        (VarDeclNode::VarDeclNode): Add parameter.
  +        (VarDeclNode::evaluate): Add const support.
  +        (VarDeclNode::processVarDecls): Add const support.
  +        (VarStatementNode::execute): Irrelevant change.
  +        (ForInNode::ForInNode): Tell our variable node that it's a variable.
  +        * kjs/nodes.h:
  +        (KJS::VarDeclNode::): Add declaration of type enum, extra constructor parameter.
  +        (KJS::VarStatementNode::VarStatementNode): Irrelevant change.
  +        * kjs/function.cpp:
  +        (KJS::GlobalFuncImp::call): Process var decls before evaluating.
  +
  +2005-06-20  Maciej Stachowiak  <mjs at apple.com>
  +
           Patch from Mark Rowe <opendarwin.org at bdash.net.nz>, reviewed by me.
   
   	- fixed http://bugzilla.opendarwin.org/attachment.cgi?id=2483
  
  
  
  1.41      +1 -0      JavaScriptCore/kjs/function.cpp
  
  Index: function.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/function.cpp,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- function.cpp	20 Jun 2005 21:59:31 -0000	1.40
  +++ function.cpp	21 Jun 2005 08:25:22 -0000	1.41
  @@ -659,6 +659,7 @@
         newExec.setException(exec->exception()); // could be null
   
         // execute the code
  +      progNode->processVarDecls(&newExec);
         Completion c = progNode->execute(&newExec);
   
         // if an exception occured, propogate it back to the previous execution object
  
  
  
  1.20      +30 -6     JavaScriptCore/kjs/grammar.y
  
  Index: grammar.y
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/grammar.y,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- grammar.y	7 Jun 2005 15:55:08 -0000	1.19
  +++ grammar.y	21 Jun 2005 08:25:22 -0000	1.20
  @@ -92,7 +92,7 @@
   %token STRING NUMBER
   
   /* keywords */
  -%token BREAK CASE DEFAULT FOR NEW VAR CONTINUE
  +%token BREAK CASE DEFAULT FOR NEW VAR CONST CONTINUE
   %token FUNCTION RETURN VOID DELETE
   %token IF THIS DO WHILE ELSE IN INSTANCEOF TYPEOF
   %token SWITCH WITH RESERVED
  @@ -136,7 +136,7 @@
   %type <fnode> Finally
   
   %type <stat>  Statement Block
  -%type <stat>  VariableStatement EmptyStatement ExprStatement
  +%type <stat>  VariableStatement ConstStatement EmptyStatement ExprStatement
   %type <stat>  IfStatement IterationStatement ContinueStatement
   %type <stat>  BreakStatement ReturnStatement WithStatement
   %type <stat>  SwitchStatement LabelledStatement
  @@ -153,8 +153,8 @@
   %type <prog>  Program
   %type <args>  Arguments
   %type <alist> ArgumentList
  -%type <vlist> VariableDeclarationList
  -%type <decl>  VariableDeclaration
  +%type <vlist> VariableDeclarationList ConstDeclarationList
  +%type <decl>  VariableDeclaration ConstDeclaration
   %type <cblk>  CaseBlock
   %type <ccl>   CaseClause DefaultClause
   %type <clist> CaseClauses  CaseClausesOpt
  @@ -386,6 +386,7 @@
   Statement:
       Block
     | VariableStatement
  +  | ConstStatement
     | EmptyStatement
     | ExprStatement
     | IfStatement
  @@ -429,8 +430,31 @@
   ;
   
   VariableDeclaration:
  -    IDENT                          { $$ = new VarDeclNode(*$1, 0); }
  -  | IDENT Initializer              { $$ = new VarDeclNode(*$1, $2); }
  +    IDENT                          { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Variable); }
  +  | IDENT Initializer              { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Variable); }
  +;
  +
  +ConstStatement:
  +    CONST ConstDeclarationList ';' { $$ = new VarStatementNode($2);
  +                                      DBG($$, @1, @3); }
  +  | CONST ConstDeclarationList error { if (automatic()) {
  +                                          $$ = new VarStatementNode($2);
  +					  DBG($$, @1, @2);
  +                                        } else {
  +					  YYABORT;
  +					}
  +                                      }
  +;
  +
  +ConstDeclarationList:
  +    ConstDeclaration            { $$ = new VarDeclListNode($1); }
  +  | ConstDeclarationList ',' VariableDeclaration
  +                                   { $$ = new VarDeclListNode($1, $3); }
  +;
  +
  +ConstDeclaration:
  +    IDENT                          { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Constant); }
  +  | IDENT Initializer              { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Constant); }
   ;
   
   Initializer:
  
  
  
  1.4       +1 -1      JavaScriptCore/kjs/keywords.table
  
  Index: keywords.table
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/keywords.table,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- keywords.table	22 Mar 2002 00:31:23 -0000	1.3
  +++ keywords.table	21 Jun 2005 08:25:22 -0000	1.4
  @@ -8,6 +8,7 @@
   break		BREAK
   case		CASE
   catch		CATCH
  +const		CONST
   default		DEFAULT
   finally		FINALLY
   for		FOR
  @@ -36,7 +37,6 @@
   byte		RESERVED
   char		RESERVED
   class		RESERVED
  -const		RESERVED
   debugger	RESERVED
   double		RESERVED
   enum		RESERVED
  
  
  
  1.59      +18 -11    JavaScriptCore/kjs/nodes.cpp
  
  Index: nodes.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/nodes.cpp,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- nodes.cpp	17 Jun 2005 00:57:37 -0000	1.58
  +++ nodes.cpp	21 Jun 2005 08:25:22 -0000	1.59
  @@ -1587,8 +1587,9 @@
   
   // ------------------------------ VarDeclNode ----------------------------------
   
  -VarDeclNode::VarDeclNode(const Identifier &id, AssignExprNode *in)
  -    : ident(id), init(in)
  +    
  +VarDeclNode::VarDeclNode(const Identifier &id, AssignExprNode *in, Type t)
  +    : varType(t), ident(id), init(in)
   {
   }
   
  @@ -1628,12 +1629,13 @@
   #endif
     // We use Internal to bypass all checks in derived objects, e.g. so that
     // "var location" creates a dynamic property instead of activating window.location.
  -  if (exec->context().imp()->codeType() == EvalCode) {
  -      // ECMA 10.2.2
  -      variable.put(exec, ident, val, Internal); 
  -  } else {
  -      variable.put(exec, ident, val, DontDelete | Internal);
  -  }
  +  int flags = Internal;
  +  if (exec->context().imp()->codeType() != EvalCode)
  +    flags |= DontDelete;
  +  if (varType == VarDeclNode::Constant)
  +    flags |= ReadOnly;
  +  variable.put(exec, ident, val, flags);
  +
     return ident.ustring();
   }
   
  @@ -1644,7 +1646,12 @@
     // If a variable by this name already exists, don't clobber it -
     // it might be a function parameter
     if (!variable.hasProperty(exec, ident)) {
  -    variable.put(exec,ident, Undefined(), DontDelete);
  +    int flags = Internal;
  +    if (exec->context().imp()->codeType() != EvalCode)
  +      flags |= DontDelete;
  +    if (varType == VarDeclNode::Constant)
  +      flags |= ReadOnly;
  +    variable.put(exec, ident, Undefined(), flags);
     }
   }
   
  @@ -1710,7 +1717,7 @@
   {
     KJS_BREAKPOINT;
   
  -  (void) list->evaluate(exec); // returns 0L
  +  (void) list->evaluate(exec);
     KJS_CHECKEXCEPTION
   
     return Completion(Normal);
  @@ -2050,7 +2057,7 @@
     : ident(i), init(in), expr(e), statement(s)
   {
     // for( var foo = bar in baz )
  -  varDecl = new VarDeclNode(ident, init);
  +  varDecl = new VarDeclNode(ident, init, VarDeclNode::Variable);
     lexpr = new ResolveNode(ident);
   }
   
  
  
  
  1.22      +4 -3      JavaScriptCore/kjs/nodes.h
  
  Index: nodes.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/nodes.h,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- nodes.h	10 Jun 2005 18:02:33 -0000	1.21
  +++ nodes.h	21 Jun 2005 08:25:22 -0000	1.22
  @@ -633,13 +633,15 @@
   
     class VarDeclNode : public Node {
     public:
  -    VarDeclNode(const Identifier &id, AssignExprNode *in);
  +    enum Type { Variable, Constant };
  +    VarDeclNode(const Identifier &id, AssignExprNode *in, Type t);
       virtual void ref();
       virtual bool deref();
       Value evaluate(ExecState *exec);
       virtual void processVarDecls(ExecState *exec);
       virtual void streamTo(SourceStream &s) const;
     private:
  +    Type varType;
       Identifier ident;
       AssignExprNode *init;
     };
  @@ -664,8 +666,7 @@
   
     class VarStatementNode : public StatementNode {
     public:
  -    VarStatementNode(VarDeclListNode *l)
  -      : list(l->list) { l->list = 0; }
  +    VarStatementNode(VarDeclListNode *l) : list(l->list) { l->list = 0; }
       virtual void ref();
       virtual bool deref();
       virtual Completion execute(ExecState *exec);
  
  
  
  1.16      +54 -37    JavaScriptCore/tests/mozilla/expected.html
  
  Index: expected.html
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/tests/mozilla/expected.html,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- expected.html	20 Jun 2005 21:59:33 -0000	1.15
  +++ expected.html	21 Jun 2005 08:25:22 -0000	1.16
  @@ -7,11 +7,11 @@
   <p class='results_summary'>
   Test List: All tests<br>
   Skip List: ecma/Date<br>
  -967 test(s) selected, 962 test(s) completed, 125 failures reported (12.99% failed)<br>
  +967 test(s) selected, 962 test(s) completed, 126 failures reported (13.09% failed)<br>
   Engine command line: /Users/mjs/Work/symroots/testkjs <br>
  -OS type: Darwin maciej-stachowiaks-powerbook-g4-17.local 8.0.0 Darwin Kernel Version 8.0.0: Sat Mar 26 14:15:22 PST 2005; root:xnu-792.obj~1/RELEASE_PPC Power Macintosh powerpc<br>
  -Testcase execution time: 2 minutes, 25 seconds.<br>
  -Tests completed on Mon Jun 20 01:31:55 2005.<br><br>
  +OS type: Darwin il0204a-dhcp15.apple.com 8.0.0 Darwin Kernel Version 8.0.0: Sat Mar 26 14:15:22 PST 2005; root:xnu-792.obj~1/RELEASE_PPC Power Macintosh powerpc<br>
  +Testcase execution time: 2 minutes, 29 seconds.<br>
  +Tests completed on Mon Jun 20 18:33:32 2005.<br><br>
   [ <a href='#fail_detail'>Failure Details</a> | <a href='#retest_list'>Retest List</a> | <a href='menu.html'>Test Selection Page</a> ]<br>
   <hr>
   <a name='fail_detail'></a>
  @@ -192,8 +192,8 @@
   --> (Mon Feb 28 2000 16:00:00 GMT-0800).toLocaleTimeString() = 4:00:00 PM PST FAILED! expected: 16:00:00<br>
   --> (Mon Feb 28 2000 15:59:59 GMT-0800).toLocaleTimeString() = 3:59:59 PM PST FAILED! expected: 15:59:59<br>
   --> (Tue Feb 29 2000 00:00:00 GMT-0800).toLocaleTimeString() = 12:00:00 AM PST FAILED! expected: 00:00:00<br>
  ---> (Mon Jun 20 2005 01:31:11 GMT-0700).toLocaleTimeString() = 1:31:11 AM PDT FAILED! expected: 01:31:11<br>
  ---> (Mon Jun 20 2005 09:31:11 GMT-0700).toLocaleTimeString() = 9:31:11 AM PDT FAILED! expected: 09:31:11<br>
  +--> (Mon Jun 20 2005 18:32:42 GMT-0700).toLocaleTimeString() = 6:32:42 PM PDT FAILED! expected: 18:32:42<br>
  +--> (Tue Jun 21 2005 02:32:42 GMT-0700).toLocaleTimeString() = 2:32:42 AM PDT FAILED! expected: 02:32:42<br>
   --> (Fri Dec 31 2004 16:00:00 GMT-0800).toLocaleTimeString() = 4:00:00 PM PST FAILED! expected: 16:00:00<br>
   --> (Fri Dec 31 2004 15:59:59 GMT-0800).toLocaleTimeString() = 3:59:59 PM PST FAILED! expected: 15:59:59<br>
   --> (Sat Jan 01 2005 00:00:00 GMT-0800).toLocaleTimeString() = 12:00:00 AM PST FAILED! expected: 00:00:00<br>
  @@ -1562,29 +1562,40 @@
   Complete testcase output was:<br>
   Exception, line 50: TypeError - Object  (result of expression uneval) does not allow calls.<br>
   </tt><br>
  -<a name='failure113'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-104077.js'>js1_5/Regress/regress-104077.js</a> failed</b> <br>
  +<a name='failure113'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-103602.js'>js1_5/Regress/regress-103602.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=103602' target='other_window'>Bug Number 103602</a><br>
    [ <a href='#failure112'>Previous Failure</a> | <a href='#failure114'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<tt>--> STATUS: Reassignment to a const is NOT an error per ECMA<br>
  +Failure messages were:<br>
  +--> FAILED!: [reported from test()] Section 1 of test -<br>
  +--> FAILED!: [reported from test()] Expected value '', Actual value 'Redeclaration of a const FAILED to cause an error'<br>
  +--> FAILED!: [reported from test()] <br>
  +--> FAILED!: [reported from test()] Section 3 of test -<br>
  +--> FAILED!: [reported from test()] Expected value '1', Actual value '2'<br>
  +--> FAILED!: [reported from test()] <br>
  +</tt><br>
  +<a name='failure114'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-104077.js'>js1_5/Regress/regress-104077.js</a> failed</b> <br>
  + [ <a href='#failure113'>Previous Failure</a> | <a href='#failure115'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>Expected exit code 0, got 3<br>
   Testcase terminated with signal 0<br>
   Complete testcase output was:<br>
   Exception, line 351: SyntaxError - Parse error<br>
   </tt><br>
  -<a name='failure114'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-127557.js'>js1_5/Regress/regress-127557.js</a> failed</b> <br>
  - [ <a href='#failure113'>Previous Failure</a> | <a href='#failure115'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure115'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-127557.js'>js1_5/Regress/regress-127557.js</a> failed</b> <br>
  + [ <a href='#failure114'>Previous Failure</a> | <a href='#failure116'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>Expected exit code 0, got 3<br>
   Testcase terminated with signal 0<br>
   Complete testcase output was:<br>
   Exception, line 76: TypeError - Object  (result of expression clone) does not allow calls.<br>
   </tt><br>
  -<a name='failure115'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-156354.js'>js1_5/Regress/regress-156354.js</a> failed</b> <br>
  - [ <a href='#failure114'>Previous Failure</a> | <a href='#failure116'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure116'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-156354.js'>js1_5/Regress/regress-156354.js</a> failed</b> <br>
  + [ <a href='#failure115'>Previous Failure</a> | <a href='#failure117'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>Expected exit code 0, got 3<br>
   Testcase terminated with signal 0<br>
   Complete testcase output was:<br>
   Exception, line 56: TypeError - Value undefined (result of expression this.propertyIsEnumerable) is not object.<br>
   </tt><br>
  -<a name='failure116'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-168347.js'>js1_5/Regress/regress-168347.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=168347' target='other_window'>Bug Number 168347</a><br>
  - [ <a href='#failure115'>Previous Failure</a> | <a href='#failure117'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure117'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-168347.js'>js1_5/Regress/regress-168347.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=168347' target='other_window'>Bug Number 168347</a><br>
  + [ <a href='#failure116'>Previous Failure</a> | <a href='#failure118'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>--> STATUS: Testing F.toString()<br>
   Failure messages were:<br>
   --> FAILED!: [reported from test()] Section 2 of test -<br>
  @@ -1594,15 +1605,15 @@
   --> FAILED!: [reported from test()] Expected value '{--f.i;print("--isucceededi="+f.i);}catch(e){print("--ifailedwith"+e+"i="+f.i);}try{f.i--;print("i--', Actual value '{f.i--;print("--isucceededi="+f.i);}catch(e){print("--ifailedwith"+e+"i="+f.i);}try{f.i--;print("i--'<br>
   --> FAILED!: [reported from test()] <br>
   </tt><br>
  -<a name='failure117'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-172699.js'>js1_5/Regress/regress-172699.js</a> failed</b> <br>
  - [ <a href='#failure116'>Previous Failure</a> | <a href='#failure118'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure118'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-172699.js'>js1_5/Regress/regress-172699.js</a> failed</b> <br>
  + [ <a href='#failure117'>Previous Failure</a> | <a href='#failure119'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>Expected exit code 0, got 3<br>
   Testcase terminated with signal 0<br>
   Complete testcase output was:<br>
   Exception, line 62: URIError - URI error<br>
   </tt><br>
  -<a name='failure118'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-179524.js'>js1_5/Regress/regress-179524.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=179524' target='other_window'>Bug Number 179524</a><br>
  - [ <a href='#failure117'>Previous Failure</a> | <a href='#failure119'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure119'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-179524.js'>js1_5/Regress/regress-179524.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=179524' target='other_window'>Bug Number 179524</a><br>
  + [ <a href='#failure118'>Previous Failure</a> | <a href='#failure120'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>--> STATUS: Don't crash on extraneous arguments to str.match(), etc.<br>
   Failure messages were:<br>
   --> FAILED!: [reported from test()] Section 14 of test -<br>
  @@ -1652,16 +1663,16 @@
   --> FAILED!: [reported from test()] Expected value 'SHOULD HAVE FALLEN INTO CATCH-BLOCK!', Actual value 'ABC Zbc'<br>
   --> FAILED!: [reported from test()] <br>
   </tt><br>
  -<a name='failure119'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-185165.js'>js1_5/Regress/regress-185165.js</a> failed</b> <br>
  - [ <a href='#failure118'>Previous Failure</a> | <a href='#failure120'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure120'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-185165.js'>js1_5/Regress/regress-185165.js</a> failed</b> <br>
  + [ <a href='#failure119'>Previous Failure</a> | <a href='#failure121'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>Expected exit code 0, got 3<br>
   Testcase terminated with signal 0<br>
   Complete testcase output was:<br>
   yylex: ERROR.<br>
   Exception, line 3: SyntaxError - Parse error<br>
   </tt><br>
  -<a name='failure120'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-44009.js'>js1_5/Regress/regress-44009.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=44009' target='other_window'>Bug Number 44009</a><br>
  - [ <a href='#failure119'>Previous Failure</a> | <a href='#failure121'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure121'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-44009.js'>js1_5/Regress/regress-44009.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=44009' target='other_window'>Bug Number 44009</a><br>
  + [ <a href='#failure120'>Previous Failure</a> | <a href='#failure122'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>Expected exit code 0, got 3<br>
   Testcase terminated with signal 0<br>
   Complete testcase output was:<br>
  @@ -1669,8 +1680,8 @@
   --> STATUS: Testing that we don't crash on obj.toSource()<br>
   Exception, line 61: TypeError - Value undefined (result of expression obj.toSource) is not object.<br>
   </tt><br>
  -<a name='failure121'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-68498-003.js'>js1_5/Regress/regress-68498-003.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=68498' target='other_window'>Bug Number 68498</a><br>
  - [ <a href='#failure120'>Previous Failure</a> | <a href='#failure122'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure122'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-68498-003.js'>js1_5/Regress/regress-68498-003.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=68498' target='other_window'>Bug Number 68498</a><br>
  + [ <a href='#failure121'>Previous Failure</a> | <a href='#failure123'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>--> STATUS: Testing calling obj.eval(str)<br>
   Failure messages were:<br>
   --> FAILED!: [reported from test()] Testing calling obj.eval(str); currently at expect[1] within test -<br>
  @@ -1678,16 +1689,16 @@
   --> FAILED!: [reported from test()] Expected value '43', Actual value 'false'<br>
   --> FAILED!: [reported from test()] <br>
   </tt><br>
  -<a name='failure122'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-96128-n.js'>js1_5/Regress/regress-96128-n.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=96128' target='other_window'>Bug Number 96128</a><br>
  - [ <a href='#failure121'>Previous Failure</a> | <a href='#failure123'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure123'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-96128-n.js'>js1_5/Regress/regress-96128-n.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=96128' target='other_window'>Bug Number 96128</a><br>
  + [ <a href='#failure122'>Previous Failure</a> | <a href='#failure124'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>Expected exit code 3, got 0<br>
   Testcase terminated with signal 11<br>
   Complete testcase output was:<br>
   --> BUGNUMBER: 96128<br>
   --> STATUS: Testing that JS infinite recursion protection works<br>
   </tt><br>
  -<a name='failure123'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Scope/regress-185485.js'>js1_5/Scope/regress-185485.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=185485' target='other_window'>Bug Number 185485</a><br>
  - [ <a href='#failure122'>Previous Failure</a> | <a href='#failure124'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure124'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Scope/regress-185485.js'>js1_5/Scope/regress-185485.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=185485' target='other_window'>Bug Number 185485</a><br>
  + [ <a href='#failure123'>Previous Failure</a> | <a href='#failure125'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>--> STATUS: Testing |with (x) {function f() {}}| when |x.f| already exists<br>
   Failure messages were:<br>
   --> FAILED!: [reported from test()] Section 2 of test -<br>
  @@ -1702,19 +1713,24 @@
   --> FAILED!: [reported from test()] }', Actual value '0'<br>
   --> FAILED!: [reported from test()] <br>
   </tt><br>
  -<a name='failure124'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Scope/regress-220584.js'>js1_5/Scope/regress-220584.js</a> failed</b> <br>
  - [ <a href='#failure123'>Previous Failure</a> | <a href='#failure125'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<a name='failure125'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Scope/regress-220584.js'>js1_5/Scope/regress-220584.js</a> failed</b> <br>
  + [ <a href='#failure124'>Previous Failure</a> | <a href='#failure126'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
   <tt>Expected exit code 0, got 3<br>
   Testcase terminated with signal 0<br>
   Complete testcase output was:<br>
   Exception, line 57: TypeError - Object  (result of expression Script) does not allow calls.<br>
   </tt><br>
  -<a name='failure125'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Scope/scope-001.js'>js1_5/Scope/scope-001.js</a> failed</b> <br>
  - [ <a href='#failure124'>Previous Failure</a> | <a href='#failure126'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  -<tt>Expected exit code 0, got 3<br>
  -Testcase terminated with signal 0<br>
  -Complete testcase output was:<br>
  -Exception, line 40: SyntaxError - Parse error<br>
  +<a name='failure126'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Scope/scope-001.js'>js1_5/Scope/scope-001.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=53268' target='other_window'>Bug Number 53268</a><br>
  + [ <a href='#failure125'>Previous Failure</a> | <a href='#failure127'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
  +<tt>--> STATUS: Testing scope after changing obj.__proto__<br>
  +Failure messages were:<br>
  +--> FAILED!: [reported from test()] Step 1:  setting obj.__proto__ = global object<br>
  +--> FAILED!: [reported from test()] Expected value '5', Actual value '1'<br>
  +--> FAILED!: [reported from test()] <br>
  +--> FAILED!: [reported from test()] Step 2:  setting obj.__proto__ = null<br>
  +--> FAILED!: [reported from test()] Type mismatch, expected type undefined, actual type number<br>
  +--> FAILED!: [reported from test()] Expected value 'undefined', Actual value '1'<br>
  +--> FAILED!: [reported from test()] <br>
   </tt><br>
   </dl>
   [ <a href='#tippy_top'>Top of Page</a> | <a href='#fail_detail'>Top of Failures</a> ]<br>
  @@ -1722,9 +1738,9 @@
   <pre>
   <a name='retest_list'></a>
   <h2>Retest List</h2><br>
  -# Retest List, kjs, generated Mon Jun 20 01:31:55 2005.
  +# Retest List, kjs, generated Mon Jun 20 18:33:32 2005.
   # Original test base was: All tests.
  -# 962 of 967 test(s) were completed, 125 failures reported.
  +# 962 of 967 test(s) were completed, 126 failures reported.
   ecma/GlobalObject/15.1.2.2-2.js
   ecma/LexicalConventions/7.7.3-1.js
   ecma/Statements/12.7-1-n.js
  @@ -1837,6 +1853,7 @@
   js1_5/Object/regress-90596-002.js
   js1_5/Object/regress-96284-001.js
   js1_5/Object/regress-96284-002.js
  +js1_5/Regress/regress-103602.js
   js1_5/Regress/regress-104077.js
   js1_5/Regress/regress-127557.js
   js1_5/Regress/regress-156354.js
  
  
  
  1.4289    +19 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4288
  retrieving revision 1.4289
  diff -u -r1.4288 -r1.4289
  --- ChangeLog	20 Jun 2005 21:59:34 -0000	1.4288
  +++ ChangeLog	21 Jun 2005 08:25:23 -0000	1.4289
  @@ -1,5 +1,24 @@
   2005-06-20  Maciej Stachowiak  <mjs at apple.com>
   
  +        Reviewed by Darin(first pass) and Hyatt.
  +
  +        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3576
  +        (roll in support for "const" keyword from KDE tree)
  +        - make processVarDecls handle deletability of variables declared
  +        in an eval block the same as evaluate would
  +        - make eval() call processVarDecls - needed to match mozilla and
  +        to make the second change testable
  +
  +	Test cases only, fix is in JavaScriptCore
  +	
  +        Test cases added:
  +        * layout-tests/fast/js/const-expected.txt: Added.
  +        * layout-tests/fast/js/const.html: Added.
  +        * layout-tests/fast/js/eval-var-decl-expected.txt: Added.
  +        * layout-tests/fast/js/eval-var-decl.html: Added.
  +
  +2005-06-20  Maciej Stachowiak  <mjs at apple.com>
  +
           Patch from Mark Rowe <opendarwin.org at bdash.net.nz>, reviewed by me.
   
   	- fixed http://bugzilla.opendarwin.org/attachment.cgi?id=2483
  
  
  
  1.1                  WebCore/layout-tests/fast/js/const-expected.txt
  
  Index: const-expected.txt
  ===================================================================
  This test checks that const declarations in JavaScript work and are readonly. The text below should say RIGHT.
  
  RIGHT
  
  
  
  1.1                  WebCore/layout-tests/fast/js/const.html
  
  Index: const.html
  ===================================================================
  <div>
  This test checks that const declarations in JavaScript work and are readonly. The text below should say RIGHT.
  </div>
  <br>
  <div>
  <script>
  if (window.layoutTestController) {
     layoutTestController.dumpAsText();
  }
  
  try {
      const x = "RIGHT";
      x = "WRONG";
      document.write(x);
  } catch (exc) {
     document.write("EXCEPTION");
  }
  </script>
  </div>
  
  
  1.1                  WebCore/layout-tests/fast/js/eval-var-decl-expected.txt
  
  Index: eval-var-decl-expected.txt
  ===================================================================
  This test case checks whether variables cause properties to be defined even before reaching the declaration statement in various cases. It should print true true true false on separate lines.
  
  true
  true
  true
  false
  
  
  
  
  1.1                  WebCore/layout-tests/fast/js/eval-var-decl.html
  
  Index: eval-var-decl.html
  ===================================================================
  <div> 
  This test case checks whether variables cause properties to be
  defined even before reaching the declaration statement in various
  cases. It should print true true true false on separate lines.
  </div>
  <br>
  <div>
  <script>
  if (window.layoutTestController) {
     layoutTestController.dumpAsText();
  }
  
  document.write(window.hasOwnProperty('foo') + '<br>');
  var foo = 3;
  
  delete bar;
  document.write(window.hasOwnProperty('bar') + '<br>');
  var bar = 3;
  
  eval("document.write(window.hasOwnProperty('y') + '<br>'); var y = 3;");
  eval("delete x; document.write(window.hasOwnProperty('x') + '<br>'); var x = 3;");
  
  </script>
  </div>
  
  



More information about the webkit-changes mailing list