[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:08:37 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 2131347d41fe86dde32682d64c2eb09ada9d51d4
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Nov 2 22:51:46 2003 +0000

            Reviewed by Maciej.
    
            - changed list manipulation to use Harri Porten's idea of a circular
              linked list that is built from head to tail rather than building the
              list backwards and reversing the list when done
    
            * kjs/grammar.y: Handle CatchNode and FinallyNode in a type-safe way.
            Change many places that passed 0L to pass nothing at all, or to pass 0.
    
            * kjs/nodes.h:
            (KJS::ElementNode::ElementNode): Build a circular list instead of a 0-terminated
            backwards list.
            (KJS::ArrayNode::ArrayNode): Break the circular list instead of reversing the list.
            (KJS::PropertyValueNode::PropertyValueNode): Moved before ObjectLiteralNode so the
            inline code in ObjectLiteralNode works. Build a circular list instead of a 0-terminated
            backwards list. Made the case for the first node separate so we don't need a nil check.
            (KJS::ObjectLiteralNode::ObjectLiteralNode): Break the circular list instead of
            reversing the list.
            (KJS::ArgumentListNode::ArgumentListNode): Build a circular list instead of a 0-terminated
            backwards list. Also, made the constructors inline (moved here from .cpp file).
            (KJS::ArgumentsNode::ArgumentsNode): Break the circular list instead of
            reversing the list.
            (KJS::NewExprNode::NewExprNode): Changed a 0L to 0.
            (KJS::StatListNode::StatListNode): Make this constructor no longer inline (moved into
            .cpp file). The one in the .cpp file builds a circular list instead of a 0-terminated
            backwards list.
            (KJS::VarDeclListNode::VarDeclListNode): Build a circular list instead of a 0-terminated
            backwards list.
            (KJS::VarStatementNode::VarStatementNode): Break the circular list instead of reversing
            the list.
            (KJS::BlockNode::BlockNode): Make this constructor no longer inline (moved into .cpp file).
            The one in the .cpp file breaks the list instead of reversing it.
            (KJS::ForNode::ForNode): Break the circular list instead of reversing the list.
            (KJS::CaseClauseNode::CaseClauseNode): Break the circular list instead of reversing the
            list.
            (KJS::ClauseListNode::ClauseListNode): Build a circular list instead of a 0-terminated
            backwards list.
            (KJS::CaseBlockNode::CaseBlockNode): Make this constructor no longer inline (moved into
            .cpp file). The one in the .cpp file breaks the list instead of reversing it.
            (KJS::TryNode::TryNode): Changed constructor to take typed parameters for the catch and
            finally nodes rather than just Node.
            (KJS::ParameterNode::ParameterNode): Build a circular list instead of a 0-terminated
            backwards list.
            (KJS::FuncDeclNode::FuncDeclNode): Break the circular list instead of reversing the
            list.
            (KJS::FuncExprNode::FuncExprNode): Break the circular list instead of reversing the
            list.
    
            * kjs/nodes.cpp:
            (StatListNode::StatListNode): Moved this constructor here, no longer inline.
            Did the "break circular list" thing instead of the "reverse list" thing.
            Added setLoc calls to match KJS in the KDE tree; since we don't currently
            use the JavaScript debugging support, it's unclear whether there's any benefit, but
            later we might be using it and it's good to be as close as possible.
            (BlockNode::BlockNode): Moved this constructor here, no longer inline.
            Did the "break circular list" thing instead of the "reverse list" thing.
            Added setLoc calls.
            (CaseBlockNode::CaseBlockNode): Moved this constructor here, no longer inline.
            Did the "break circular list" thing instead of the "reverse list" thing.
            (SourceElementsNode::SourceElementsNode): Moved this constructor here, no longer inline.
            Did the "break circular list" thing instead of the "reverse list" thing.
            Added setLoc calls.
    
            * kjs/grammar.cpp: Regenerated.
            * kjs/grammar.cpp.h: Regenerated.
            * kjs/grammar.h: Regenerated.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5356 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 9e603d7..6ad0072 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,72 @@
+2003-11-02  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        - changed list manipulation to use Harri Porten's idea of a circular
+          linked list that is built from head to tail rather than building the
+          list backwards and reversing the list when done
+
+        * kjs/grammar.y: Handle CatchNode and FinallyNode in a type-safe way.
+        Change many places that passed 0L to pass nothing at all, or to pass 0.
+
+        * kjs/nodes.h:
+        (KJS::ElementNode::ElementNode): Build a circular list instead of a 0-terminated
+        backwards list.
+        (KJS::ArrayNode::ArrayNode): Break the circular list instead of reversing the list.
+        (KJS::PropertyValueNode::PropertyValueNode): Moved before ObjectLiteralNode so the
+        inline code in ObjectLiteralNode works. Build a circular list instead of a 0-terminated
+        backwards list. Made the case for the first node separate so we don't need a nil check.
+        (KJS::ObjectLiteralNode::ObjectLiteralNode): Break the circular list instead of
+        reversing the list.
+        (KJS::ArgumentListNode::ArgumentListNode): Build a circular list instead of a 0-terminated
+        backwards list. Also, made the constructors inline (moved here from .cpp file).
+        (KJS::ArgumentsNode::ArgumentsNode): Break the circular list instead of
+        reversing the list.
+        (KJS::NewExprNode::NewExprNode): Changed a 0L to 0.
+        (KJS::StatListNode::StatListNode): Make this constructor no longer inline (moved into
+        .cpp file). The one in the .cpp file builds a circular list instead of a 0-terminated
+        backwards list.
+        (KJS::VarDeclListNode::VarDeclListNode): Build a circular list instead of a 0-terminated
+        backwards list.
+        (KJS::VarStatementNode::VarStatementNode): Break the circular list instead of reversing
+        the list.
+        (KJS::BlockNode::BlockNode): Make this constructor no longer inline (moved into .cpp file).
+        The one in the .cpp file breaks the list instead of reversing it.
+        (KJS::ForNode::ForNode): Break the circular list instead of reversing the list.
+        (KJS::CaseClauseNode::CaseClauseNode): Break the circular list instead of reversing the
+        list.
+        (KJS::ClauseListNode::ClauseListNode): Build a circular list instead of a 0-terminated
+        backwards list.
+        (KJS::CaseBlockNode::CaseBlockNode): Make this constructor no longer inline (moved into
+        .cpp file). The one in the .cpp file breaks the list instead of reversing it.
+        (KJS::TryNode::TryNode): Changed constructor to take typed parameters for the catch and
+        finally nodes rather than just Node.
+        (KJS::ParameterNode::ParameterNode): Build a circular list instead of a 0-terminated
+        backwards list.
+        (KJS::FuncDeclNode::FuncDeclNode): Break the circular list instead of reversing the
+        list.
+        (KJS::FuncExprNode::FuncExprNode): Break the circular list instead of reversing the
+        list.
+
+        * kjs/nodes.cpp:
+        (StatListNode::StatListNode): Moved this constructor here, no longer inline.
+        Did the "break circular list" thing instead of the "reverse list" thing.
+        Added setLoc calls to match KJS in the KDE tree; since we don't currently
+        use the JavaScript debugging support, it's unclear whether there's any benefit, but
+        later we might be using it and it's good to be as close as possible.
+        (BlockNode::BlockNode): Moved this constructor here, no longer inline.
+        Did the "break circular list" thing instead of the "reverse list" thing.
+        Added setLoc calls.
+        (CaseBlockNode::CaseBlockNode): Moved this constructor here, no longer inline.
+        Did the "break circular list" thing instead of the "reverse list" thing.
+        (SourceElementsNode::SourceElementsNode): Moved this constructor here, no longer inline.
+        Did the "break circular list" thing instead of the "reverse list" thing.
+        Added setLoc calls.
+
+        * kjs/grammar.cpp: Regenerated.
+        * kjs/grammar.cpp.h: Regenerated.
+        * kjs/grammar.h: Regenerated.
+
 === Safari-112 ===
 
 2003-10-30  Maciej Stachowiak  <mjs at apple.com>
diff --git a/JavaScriptCore/kjs/grammar.cpp b/JavaScriptCore/kjs/grammar.cpp
index d8aa73e..97353c5 100644
--- a/JavaScriptCore/kjs/grammar.cpp
+++ b/JavaScriptCore/kjs/grammar.cpp
@@ -152,6 +152,8 @@ typedef union {
   Operator            op;
   PropertyValueNode   *plist;
   PropertyNode        *pnode;
+  CatchNode           *cnode;
+  FinallyNode         *fnode;
 } YYSTYPE;
 
 #ifndef YYLTYPE
@@ -317,26 +319,26 @@ static const short yyrhs[] = {     3,
 
 #if YYDEBUG != 0
 static const short yyrline[] = { 0,
-   165,   167,   168,   169,   170,   171,   174,   180,   182,   183,
-   184,   185,   186,   187,   190,   192,   193,   196,   198,   202,
-   204,   207,   209,   212,   214,   218,   220,   221,   224,   226,
-   227,   228,   229,   232,   234,   237,   239,   240,   241,   244,
-   246,   249,   251,   254,   256,   259,   261,   262,   265,   267,
-   268,   269,   270,   271,   272,   273,   274,   275,   276,   277,
-   280,   282,   283,   284,   287,   289,   290,   293,   295,   296,
-   297,   300,   302,   304,   306,   308,   310,   312,   316,   318,
-   319,   320,   321,   324,   326,   329,   331,   334,   336,   339,
-   341,   345,   347,   351,   353,   357,   359,   363,   365,   366,
-   367,   368,   369,   370,   371,   372,   373,   374,   375,   378,
-   380,   383,   385,   386,   387,   388,   389,   390,   391,   392,
-   393,   394,   395,   396,   397,   400,   402,   405,   407,   410,
-   413,   422,   424,   428,   430,   433,   437,   441,   444,   451,
-   453,   457,   459,   460,   463,   466,   469,   472,   477,   479,
-   482,   484,   488,   489,   495,   497,   501,   502,   509,   511,
-   515,   516,   522,   527,   532,   534,   538,   540,   543,   545,
-   548,   550,   553,   555,   558,   563,   567,   569,   570,   573,
-   577,   581,   583,   586,   588,   593,   595,   598,   601,   605,
-   608,   612,   614,   617,   619
+   169,   171,   172,   173,   174,   175,   178,   184,   186,   187,
+   188,   189,   190,   191,   194,   196,   197,   200,   202,   206,
+   208,   211,   213,   216,   218,   222,   224,   225,   228,   230,
+   231,   232,   233,   236,   238,   241,   243,   244,   245,   248,
+   250,   253,   255,   258,   260,   263,   265,   266,   269,   271,
+   272,   273,   274,   275,   276,   277,   278,   279,   280,   281,
+   284,   286,   287,   288,   291,   293,   294,   297,   299,   300,
+   301,   304,   306,   308,   310,   312,   314,   316,   320,   322,
+   323,   324,   325,   328,   330,   333,   335,   338,   340,   343,
+   345,   349,   351,   355,   357,   361,   363,   367,   369,   370,
+   371,   372,   373,   374,   375,   376,   377,   378,   379,   382,
+   384,   387,   389,   390,   391,   392,   393,   394,   395,   396,
+   397,   398,   399,   400,   401,   404,   406,   409,   411,   414,
+   417,   426,   428,   432,   434,   437,   441,   445,   448,   455,
+   457,   461,   463,   464,   467,   470,   473,   476,   481,   483,
+   486,   488,   492,   493,   499,   501,   505,   506,   513,   515,
+   519,   520,   526,   531,   536,   538,   542,   544,   547,   549,
+   552,   554,   557,   559,   562,   567,   571,   573,   574,   577,
+   581,   585,   587,   590,   592,   597,   599,   602,   605,   609,
+   612,   616,   618,   621,   623
 };
 #endif
 
@@ -1331,384 +1333,384 @@ yyreduce:
   switch (yyn) {
 
 case 1:
-#line 166 "grammar.y"
+#line 170 "grammar.y"
 { yyval.node = new NullNode(); ;
     break;}
 case 2:
-#line 167 "grammar.y"
+#line 171 "grammar.y"
 { yyval.node = new BooleanNode(true); ;
     break;}
 case 3:
-#line 168 "grammar.y"
+#line 172 "grammar.y"
 { yyval.node = new BooleanNode(false); ;
     break;}
 case 4:
-#line 169 "grammar.y"
+#line 173 "grammar.y"
 { yyval.node = new NumberNode(yyvsp[0].dval); ;
     break;}
 case 5:
-#line 170 "grammar.y"
+#line 174 "grammar.y"
 { yyval.node = new StringNode(yyvsp[0].ustr); ;
     break;}
 case 6:
-#line 171 "grammar.y"
+#line 175 "grammar.y"
 { Lexer *l = Lexer::curr();
                                      if (!l->scanRegExp()) YYABORT;
                                      yyval.node = new RegExpNode(l->pattern,l->flags);;
     break;}
 case 7:
-#line 175 "grammar.y"
+#line 179 "grammar.y"
 { Lexer *l = Lexer::curr();
                                      if (!l->scanRegExp()) YYABORT;
                                      yyval.node = new RegExpNode(UString('=')+l->pattern,l->flags);;
     break;}
 case 8:
-#line 181 "grammar.y"
+#line 185 "grammar.y"
 { yyval.node = new ThisNode(); ;
     break;}
 case 9:
-#line 182 "grammar.y"
+#line 186 "grammar.y"
 { yyval.node = new ResolveNode(*yyvsp[0].ident); ;
     break;}
 case 12:
-#line 185 "grammar.y"
+#line 189 "grammar.y"
 { yyval.node = new GroupNode(yyvsp[-1].node); ;
     break;}
 case 13:
-#line 186 "grammar.y"
-{ yyval.node = new ObjectLiteralNode(0L); ;
+#line 190 "grammar.y"
+{ yyval.node = new ObjectLiteralNode(); ;
     break;}
 case 14:
-#line 187 "grammar.y"
+#line 191 "grammar.y"
 { yyval.node = new ObjectLiteralNode(yyvsp[-1].plist); ;
     break;}
 case 15:
-#line 191 "grammar.y"
+#line 195 "grammar.y"
 { yyval.node = new ArrayNode(yyvsp[-1].ival); ;
     break;}
 case 16:
-#line 192 "grammar.y"
+#line 196 "grammar.y"
 { yyval.node = new ArrayNode(yyvsp[-1].elm); ;
     break;}
 case 17:
-#line 193 "grammar.y"
+#line 197 "grammar.y"
 { yyval.node = new ArrayNode(yyvsp[-1].ival, yyvsp[-3].elm); ;
     break;}
 case 18:
-#line 197 "grammar.y"
+#line 201 "grammar.y"
 { yyval.elm = new ElementNode(yyvsp[-1].ival, yyvsp[0].node); ;
     break;}
 case 19:
-#line 199 "grammar.y"
+#line 203 "grammar.y"
 { yyval.elm = new ElementNode(yyvsp[-3].elm, yyvsp[-1].ival, yyvsp[0].node); ;
     break;}
 case 20:
-#line 203 "grammar.y"
+#line 207 "grammar.y"
 { yyval.ival = 0; ;
     break;}
 case 22:
-#line 208 "grammar.y"
+#line 212 "grammar.y"
 { yyval.ival = 1; ;
     break;}
 case 23:
-#line 209 "grammar.y"
+#line 213 "grammar.y"
 { yyval.ival = yyvsp[-1].ival + 1; ;
     break;}
 case 24:
-#line 213 "grammar.y"
+#line 217 "grammar.y"
 { yyval.plist = new PropertyValueNode(yyvsp[-2].pnode, yyvsp[0].node); ;
     break;}
 case 25:
-#line 215 "grammar.y"
+#line 219 "grammar.y"
 { yyval.plist = new PropertyValueNode(yyvsp[-2].pnode, yyvsp[0].node, yyvsp[-4].plist); ;
     break;}
 case 26:
-#line 219 "grammar.y"
+#line 223 "grammar.y"
 { yyval.pnode = new PropertyNode(*yyvsp[0].ident); ;
     break;}
 case 27:
-#line 220 "grammar.y"
+#line 224 "grammar.y"
 { yyval.pnode = new PropertyNode(Identifier(*yyvsp[0].ustr)); ;
     break;}
 case 28:
-#line 221 "grammar.y"
+#line 225 "grammar.y"
 { yyval.pnode = new PropertyNode(yyvsp[0].dval); ;
     break;}
 case 31:
-#line 227 "grammar.y"
+#line 231 "grammar.y"
 { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
     break;}
 case 32:
-#line 228 "grammar.y"
+#line 232 "grammar.y"
 { yyval.node = new AccessorNode2(yyvsp[-2].node, *yyvsp[0].ident); ;
     break;}
 case 33:
-#line 229 "grammar.y"
+#line 233 "grammar.y"
 { yyval.node = new NewExprNode(yyvsp[-1].node, yyvsp[0].args); ;
     break;}
 case 35:
-#line 234 "grammar.y"
+#line 238 "grammar.y"
 { yyval.node = new NewExprNode(yyvsp[0].node); ;
     break;}
 case 36:
-#line 238 "grammar.y"
+#line 242 "grammar.y"
 { yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
     break;}
 case 37:
-#line 239 "grammar.y"
+#line 243 "grammar.y"
 { yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
     break;}
 case 38:
-#line 240 "grammar.y"
+#line 244 "grammar.y"
 { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
     break;}
 case 39:
-#line 241 "grammar.y"
+#line 245 "grammar.y"
 { yyval.node = new AccessorNode2(yyvsp[-2].node, *yyvsp[0].ident); ;
     break;}
 case 40:
-#line 245 "grammar.y"
-{ yyval.args = new ArgumentsNode(0L); ;
+#line 249 "grammar.y"
+{ yyval.args = new ArgumentsNode(); ;
     break;}
 case 41:
-#line 246 "grammar.y"
+#line 250 "grammar.y"
 { yyval.args = new ArgumentsNode(yyvsp[-1].alist); ;
     break;}
 case 42:
-#line 250 "grammar.y"
+#line 254 "grammar.y"
 { yyval.alist = new ArgumentListNode(yyvsp[0].node); ;
     break;}
 case 43:
-#line 251 "grammar.y"
+#line 255 "grammar.y"
 { yyval.alist = new ArgumentListNode(yyvsp[-2].alist, yyvsp[0].node); ;
     break;}
 case 47:
-#line 261 "grammar.y"
+#line 265 "grammar.y"
 { yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ;
     break;}
 case 48:
-#line 262 "grammar.y"
+#line 266 "grammar.y"
 { yyval.node = new PostfixNode(yyvsp[-1].node, OpMinusMinus); ;
     break;}
 case 50:
-#line 267 "grammar.y"
+#line 271 "grammar.y"
 { yyval.node = new DeleteNode(yyvsp[0].node); ;
     break;}
 case 51:
-#line 268 "grammar.y"
+#line 272 "grammar.y"
 { yyval.node = new VoidNode(yyvsp[0].node); ;
     break;}
 case 52:
-#line 269 "grammar.y"
+#line 273 "grammar.y"
 { yyval.node = new TypeOfNode(yyvsp[0].node); ;
     break;}
 case 53:
-#line 270 "grammar.y"
+#line 274 "grammar.y"
 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
     break;}
 case 54:
-#line 271 "grammar.y"
+#line 275 "grammar.y"
 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
     break;}
 case 55:
-#line 272 "grammar.y"
+#line 276 "grammar.y"
 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
     break;}
 case 56:
-#line 273 "grammar.y"
+#line 277 "grammar.y"
 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
     break;}
 case 57:
-#line 274 "grammar.y"
+#line 278 "grammar.y"
 { yyval.node = new UnaryPlusNode(yyvsp[0].node); ;
     break;}
 case 58:
-#line 275 "grammar.y"
+#line 279 "grammar.y"
 { yyval.node = new NegateNode(yyvsp[0].node); ;
     break;}
 case 59:
-#line 276 "grammar.y"
+#line 280 "grammar.y"
 { yyval.node = new BitwiseNotNode(yyvsp[0].node); ;
     break;}
 case 60:
-#line 277 "grammar.y"
+#line 281 "grammar.y"
 { yyval.node = new LogicalNotNode(yyvsp[0].node); ;
     break;}
 case 62:
-#line 282 "grammar.y"
+#line 286 "grammar.y"
 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ;
     break;}
 case 63:
-#line 283 "grammar.y"
+#line 287 "grammar.y"
 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ;
     break;}
 case 64:
-#line 284 "grammar.y"
+#line 288 "grammar.y"
 { yyval.node = new MultNode(yyvsp[-2].node,yyvsp[0].node,'%'); ;
     break;}
 case 66:
-#line 289 "grammar.y"
+#line 293 "grammar.y"
 { yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '+'); ;
     break;}
 case 67:
-#line 290 "grammar.y"
+#line 294 "grammar.y"
 { yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '-'); ;
     break;}
 case 69:
-#line 295 "grammar.y"
+#line 299 "grammar.y"
 { yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ;
     break;}
 case 70:
-#line 296 "grammar.y"
+#line 300 "grammar.y"
 { yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ;
     break;}
 case 71:
-#line 297 "grammar.y"
+#line 301 "grammar.y"
 { yyval.node = new ShiftNode(yyvsp[-2].node, OpURShift, yyvsp[0].node); ;
     break;}
 case 73:
-#line 303 "grammar.y"
+#line 307 "grammar.y"
 { yyval.node = new RelationalNode(yyvsp[-2].node, OpLess, yyvsp[0].node); ;
     break;}
 case 74:
-#line 305 "grammar.y"
+#line 309 "grammar.y"
 { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreater, yyvsp[0].node); ;
     break;}
 case 75:
-#line 307 "grammar.y"
+#line 311 "grammar.y"
 { yyval.node = new RelationalNode(yyvsp[-2].node, OpLessEq, yyvsp[0].node); ;
     break;}
 case 76:
-#line 309 "grammar.y"
+#line 313 "grammar.y"
 { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreaterEq, yyvsp[0].node); ;
     break;}
 case 77:
-#line 311 "grammar.y"
+#line 315 "grammar.y"
 { yyval.node = new RelationalNode(yyvsp[-2].node, OpInstanceOf, yyvsp[0].node); ;
     break;}
 case 78:
-#line 313 "grammar.y"
+#line 317 "grammar.y"
 { yyval.node = new RelationalNode(yyvsp[-2].node, OpIn, yyvsp[0].node); ;
     break;}
 case 80:
-#line 318 "grammar.y"
+#line 322 "grammar.y"
 { yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ;
     break;}
 case 81:
-#line 319 "grammar.y"
+#line 323 "grammar.y"
 { yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ;
     break;}
 case 82:
-#line 320 "grammar.y"
+#line 324 "grammar.y"
 { yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ;
     break;}
 case 83:
-#line 321 "grammar.y"
+#line 325 "grammar.y"
 { yyval.node = new EqualNode(yyvsp[-2].node, OpStrNEq, yyvsp[0].node);;
     break;}
 case 85:
-#line 326 "grammar.y"
+#line 330 "grammar.y"
 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitAnd, yyvsp[0].node); ;
     break;}
 case 87:
-#line 331 "grammar.y"
+#line 335 "grammar.y"
 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitXOr, yyvsp[0].node); ;
     break;}
 case 89:
-#line 336 "grammar.y"
+#line 340 "grammar.y"
 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitOr, yyvsp[0].node); ;
     break;}
 case 91:
-#line 342 "grammar.y"
+#line 346 "grammar.y"
 { yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpAnd, yyvsp[0].node); ;
     break;}
 case 93:
-#line 348 "grammar.y"
+#line 352 "grammar.y"
 { yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpOr, yyvsp[0].node); ;
     break;}
 case 95:
-#line 354 "grammar.y"
+#line 358 "grammar.y"
 { yyval.node = new ConditionalNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
     break;}
 case 97:
-#line 360 "grammar.y"
+#line 364 "grammar.y"
 { yyval.node = new AssignNode(yyvsp[-2].node, yyvsp[-1].op, yyvsp[0].node);;
     break;}
 case 98:
-#line 364 "grammar.y"
+#line 368 "grammar.y"
 { yyval.op = OpEqual; ;
     break;}
 case 99:
-#line 365 "grammar.y"
+#line 369 "grammar.y"
 { yyval.op = OpPlusEq; ;
     break;}
 case 100:
-#line 366 "grammar.y"
+#line 370 "grammar.y"
 { yyval.op = OpMinusEq; ;
     break;}
 case 101:
-#line 367 "grammar.y"
+#line 371 "grammar.y"
 { yyval.op = OpMultEq; ;
     break;}
 case 102:
-#line 368 "grammar.y"
+#line 372 "grammar.y"
 { yyval.op = OpDivEq; ;
     break;}
 case 103:
-#line 369 "grammar.y"
+#line 373 "grammar.y"
 { yyval.op = OpLShift; ;
     break;}
 case 104:
-#line 370 "grammar.y"
+#line 374 "grammar.y"
 { yyval.op = OpRShift; ;
     break;}
 case 105:
-#line 371 "grammar.y"
+#line 375 "grammar.y"
 { yyval.op = OpURShift; ;
     break;}
 case 106:
-#line 372 "grammar.y"
+#line 376 "grammar.y"
 { yyval.op = OpAndEq; ;
     break;}
 case 107:
-#line 373 "grammar.y"
+#line 377 "grammar.y"
 { yyval.op = OpXOrEq; ;
     break;}
 case 108:
-#line 374 "grammar.y"
+#line 378 "grammar.y"
 { yyval.op = OpOrEq; ;
     break;}
 case 109:
-#line 375 "grammar.y"
+#line 379 "grammar.y"
 { yyval.op = OpModEq; ;
     break;}
 case 111:
-#line 380 "grammar.y"
+#line 384 "grammar.y"
 { yyval.node = new CommaNode(yyvsp[-2].node, yyvsp[0].node); ;
     break;}
 case 126:
-#line 401 "grammar.y"
-{ yyval.stat = new BlockNode(0L); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
+#line 405 "grammar.y"
+{ yyval.stat = new BlockNode(0); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
     break;}
 case 127:
-#line 402 "grammar.y"
+#line 406 "grammar.y"
 { yyval.stat = new BlockNode(yyvsp[-1].srcs); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
     break;}
 case 128:
-#line 406 "grammar.y"
+#line 410 "grammar.y"
 { yyval.slist = new StatListNode(yyvsp[0].stat); ;
     break;}
 case 129:
-#line 407 "grammar.y"
+#line 411 "grammar.y"
 { yyval.slist = new StatListNode(yyvsp[-1].slist, yyvsp[0].stat); ;
     break;}
 case 130:
-#line 411 "grammar.y"
+#line 415 "grammar.y"
 { yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
                                       DBG(yyval.stat, yylsp[-2], yylsp[0]); ;
     break;}
 case 131:
-#line 413 "grammar.y"
+#line 417 "grammar.y"
 { if (automatic()) {
                                           yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
 					  DBG(yyval.stat, yylsp[-2], yylsp[-1]);
@@ -1718,36 +1720,36 @@ case 131:
                                       ;
     break;}
 case 132:
-#line 423 "grammar.y"
+#line 427 "grammar.y"
 { yyval.vlist = new VarDeclListNode(yyvsp[0].decl); ;
     break;}
 case 133:
-#line 425 "grammar.y"
+#line 429 "grammar.y"
 { yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ;
     break;}
 case 134:
-#line 429 "grammar.y"
+#line 433 "grammar.y"
 { yyval.decl = new VarDeclNode(*yyvsp[0].ident, 0); ;
     break;}
 case 135:
-#line 430 "grammar.y"
+#line 434 "grammar.y"
 { yyval.decl = new VarDeclNode(*yyvsp[-1].ident, yyvsp[0].init); ;
     break;}
 case 136:
-#line 434 "grammar.y"
+#line 438 "grammar.y"
 { yyval.init = new AssignExprNode(yyvsp[0].node); ;
     break;}
 case 137:
-#line 438 "grammar.y"
+#line 442 "grammar.y"
 { yyval.stat = new EmptyStatementNode(); ;
     break;}
 case 138:
-#line 442 "grammar.y"
+#line 446 "grammar.y"
 { yyval.stat = new ExprStatementNode(yyvsp[-1].node);
                                      DBG(yyval.stat, yylsp[-1], yylsp[0]); ;
     break;}
 case 139:
-#line 444 "grammar.y"
+#line 448 "grammar.y"
 { if (automatic()) {
                                        yyval.stat = new ExprStatementNode(yyvsp[-1].node);
 				       DBG(yyval.stat, yylsp[-1], yylsp[-1]);
@@ -1755,89 +1757,89 @@ case 139:
 				       YYABORT; ;
     break;}
 case 140:
-#line 452 "grammar.y"
-{ yyval.stat = new IfNode(yyvsp[-2].node,yyvsp[0].stat,0L);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
+#line 456 "grammar.y"
+{ yyval.stat = new IfNode(yyvsp[-2].node,yyvsp[0].stat,0);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
     break;}
 case 141:
-#line 454 "grammar.y"
+#line 458 "grammar.y"
 { yyval.stat = new IfNode(yyvsp[-4].node,yyvsp[-2].stat,yyvsp[0].stat);DBG(yyval.stat,yylsp[-6],yylsp[-3]); ;
     break;}
 case 142:
-#line 458 "grammar.y"
+#line 462 "grammar.y"
 { yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);;
     break;}
 case 143:
-#line 459 "grammar.y"
+#line 463 "grammar.y"
 { yyval.stat = new WhileNode(yyvsp[-2].node,yyvsp[0].stat);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
     break;}
 case 144:
-#line 461 "grammar.y"
+#line 465 "grammar.y"
 { yyval.stat = new ForNode(yyvsp[-6].node,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
 	                             DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;
     break;}
 case 145:
-#line 464 "grammar.y"
+#line 468 "grammar.y"
 { yyval.stat = new ForNode(yyvsp[-6].vlist,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
 	                             DBG(yyval.stat,yylsp[-9],yylsp[-1]); ;
     break;}
 case 146:
-#line 467 "grammar.y"
+#line 471 "grammar.y"
 { yyval.stat = new ForInNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].stat);
 	                             DBG(yyval.stat,yylsp[-6],yylsp[-1]); ;
     break;}
 case 147:
-#line 470 "grammar.y"
-{ yyval.stat = new ForInNode(*yyvsp[-4].ident,0L,yyvsp[-2].node,yyvsp[0].stat);
+#line 474 "grammar.y"
+{ yyval.stat = new ForInNode(*yyvsp[-4].ident,0,yyvsp[-2].node,yyvsp[0].stat);
 	                             DBG(yyval.stat,yylsp[-7],yylsp[-1]); ;
     break;}
 case 148:
-#line 473 "grammar.y"
+#line 477 "grammar.y"
 { yyval.stat = new ForInNode(*yyvsp[-5].ident,yyvsp[-4].init,yyvsp[-2].node,yyvsp[0].stat);
 	                             DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;
     break;}
 case 149:
-#line 478 "grammar.y"
-{ yyval.node = 0L; ;
+#line 482 "grammar.y"
+{ yyval.node = 0; ;
     break;}
 case 151:
-#line 483 "grammar.y"
+#line 487 "grammar.y"
 { yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     break;}
 case 152:
-#line 484 "grammar.y"
+#line 488 "grammar.y"
 { if (automatic()) {
                                        yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]);
                                      } else
 				       YYABORT; ;
     break;}
 case 153:
-#line 488 "grammar.y"
+#line 492 "grammar.y"
 { yyval.stat = new ContinueNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[0]); ;
     break;}
 case 154:
-#line 489 "grammar.y"
+#line 493 "grammar.y"
 { if (automatic()) {
                                        yyval.stat = new ContinueNode(*yyvsp[-1].ident);DBG(yyval.stat,yylsp[-2],yylsp[-1]);
                                      } else
 				       YYABORT; ;
     break;}
 case 155:
-#line 496 "grammar.y"
+#line 500 "grammar.y"
 { yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     break;}
 case 156:
-#line 497 "grammar.y"
+#line 501 "grammar.y"
 { if (automatic()) {
                                        yyval.stat = new BreakNode(); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
                                      } else
 				       YYABORT; ;
     break;}
 case 157:
-#line 501 "grammar.y"
+#line 505 "grammar.y"
 { yyval.stat = new BreakNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[0]); ;
     break;}
 case 158:
-#line 502 "grammar.y"
+#line 506 "grammar.y"
 { if (automatic()) {
                                        yyval.stat = new BreakNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[-1]);
                                      } else
@@ -1845,160 +1847,160 @@ case 158:
                                    ;
     break;}
 case 159:
-#line 510 "grammar.y"
-{ yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
+#line 514 "grammar.y"
+{ yyval.stat = new ReturnNode(0); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     break;}
 case 160:
-#line 511 "grammar.y"
+#line 515 "grammar.y"
 { if (automatic()) {
-                                       yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
+                                       yyval.stat = new ReturnNode(0); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
                                      } else
 				       YYABORT; ;
     break;}
 case 161:
-#line 515 "grammar.y"
+#line 519 "grammar.y"
 { yyval.stat = new ReturnNode(yyvsp[-1].node); ;
     break;}
 case 162:
-#line 516 "grammar.y"
+#line 520 "grammar.y"
 { if (automatic())
                                        yyval.stat = new ReturnNode(yyvsp[-1].node);
                                      else
 				       YYABORT; ;
     break;}
 case 163:
-#line 523 "grammar.y"
+#line 527 "grammar.y"
 { yyval.stat = new WithNode(yyvsp[-2].node,yyvsp[0].stat);
                                      DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
     break;}
 case 164:
-#line 528 "grammar.y"
+#line 532 "grammar.y"
 { yyval.stat = new SwitchNode(yyvsp[-2].node, yyvsp[0].cblk);
                                      DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
     break;}
 case 165:
-#line 533 "grammar.y"
-{ yyval.cblk = new CaseBlockNode(yyvsp[-1].clist, 0L, 0L); ;
+#line 537 "grammar.y"
+{ yyval.cblk = new CaseBlockNode(yyvsp[-1].clist, 0, 0); ;
     break;}
 case 166:
-#line 535 "grammar.y"
+#line 539 "grammar.y"
 { yyval.cblk = new CaseBlockNode(yyvsp[-3].clist, yyvsp[-2].ccl, yyvsp[-1].clist); ;
     break;}
 case 167:
-#line 539 "grammar.y"
-{ yyval.clist = 0L; ;
+#line 543 "grammar.y"
+{ yyval.clist = 0; ;
     break;}
 case 169:
-#line 544 "grammar.y"
+#line 548 "grammar.y"
 { yyval.clist = new ClauseListNode(yyvsp[0].ccl); ;
     break;}
 case 170:
-#line 545 "grammar.y"
+#line 549 "grammar.y"
 { yyval.clist = new ClauseListNode(yyvsp[-1].clist, yyvsp[0].ccl); ;
     break;}
 case 171:
-#line 549 "grammar.y"
-{ yyval.ccl = new CaseClauseNode(yyvsp[-1].node, 0L); ;
+#line 553 "grammar.y"
+{ yyval.ccl = new CaseClauseNode(yyvsp[-1].node); ;
     break;}
 case 172:
-#line 550 "grammar.y"
+#line 554 "grammar.y"
 { yyval.ccl = new CaseClauseNode(yyvsp[-2].node, yyvsp[0].slist); ;
     break;}
 case 173:
-#line 554 "grammar.y"
-{ yyval.ccl = new CaseClauseNode(0L, 0L);; ;
+#line 558 "grammar.y"
+{ yyval.ccl = new CaseClauseNode(0); ;
     break;}
 case 174:
-#line 555 "grammar.y"
-{ yyval.ccl = new CaseClauseNode(0L, yyvsp[0].slist); ;
+#line 559 "grammar.y"
+{ yyval.ccl = new CaseClauseNode(0, yyvsp[0].slist); ;
     break;}
 case 175:
-#line 559 "grammar.y"
+#line 563 "grammar.y"
 { yyvsp[0].stat->pushLabel(*yyvsp[-2].ident);
                                      yyval.stat = new LabelNode(*yyvsp[-2].ident, yyvsp[0].stat); ;
     break;}
 case 176:
-#line 564 "grammar.y"
+#line 568 "grammar.y"
 { yyval.stat = new ThrowNode(yyvsp[-1].node); ;
     break;}
 case 177:
-#line 568 "grammar.y"
-{ yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].node); ;
+#line 572 "grammar.y"
+{ yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].cnode); ;
     break;}
 case 178:
-#line 569 "grammar.y"
-{ yyval.stat = new TryNode(yyvsp[-1].stat, 0L, yyvsp[0].node); ;
+#line 573 "grammar.y"
+{ yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].fnode); ;
     break;}
 case 179:
-#line 570 "grammar.y"
-{ yyval.stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].node, yyvsp[0].node); ;
+#line 574 "grammar.y"
+{ yyval.stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].cnode, yyvsp[0].fnode); ;
     break;}
 case 180:
-#line 574 "grammar.y"
-{ yyval.node = new CatchNode(*yyvsp[-2].ident, yyvsp[0].stat); ;
+#line 578 "grammar.y"
+{ yyval.cnode = new CatchNode(*yyvsp[-2].ident, yyvsp[0].stat); ;
     break;}
 case 181:
-#line 578 "grammar.y"
-{ yyval.node = new FinallyNode(yyvsp[0].stat); ;
+#line 582 "grammar.y"
+{ yyval.fnode = new FinallyNode(yyvsp[0].stat); ;
     break;}
 case 182:
-#line 582 "grammar.y"
-{ yyval.func = new FuncDeclNode(*yyvsp[-3].ident, 0L, yyvsp[0].body); ;
+#line 586 "grammar.y"
+{ yyval.func = new FuncDeclNode(*yyvsp[-3].ident, yyvsp[0].body); ;
     break;}
 case 183:
-#line 584 "grammar.y"
+#line 588 "grammar.y"
 { yyval.func = new FuncDeclNode(*yyvsp[-4].ident, yyvsp[-2].param, yyvsp[0].body); ;
     break;}
 case 184:
-#line 587 "grammar.y"
-{ yyval.node = new FuncExprNode(0L, yyvsp[0].body); ;
+#line 591 "grammar.y"
+{ yyval.node = new FuncExprNode(yyvsp[0].body); ;
     break;}
 case 185:
-#line 589 "grammar.y"
+#line 593 "grammar.y"
 { yyval.node = new FuncExprNode(yyvsp[-2].param, yyvsp[0].body); ;
     break;}
 case 186:
-#line 594 "grammar.y"
+#line 598 "grammar.y"
 { yyval.param = new ParameterNode(*yyvsp[0].ident); ;
     break;}
 case 187:
-#line 595 "grammar.y"
+#line 599 "grammar.y"
 { yyval.param = new ParameterNode(yyvsp[-2].param, *yyvsp[0].ident); ;
     break;}
 case 188:
-#line 599 "grammar.y"
-{ yyval.body = new FunctionBodyNode(0L);
+#line 603 "grammar.y"
+{ yyval.body = new FunctionBodyNode(0);
 	                             DBG(yyval.body, yylsp[-1], yylsp[0]);;
     break;}
 case 189:
-#line 601 "grammar.y"
+#line 605 "grammar.y"
 { yyval.body = new FunctionBodyNode(yyvsp[-1].srcs);
 	                             DBG(yyval.body, yylsp[-2], yylsp[0]);;
     break;}
 case 190:
-#line 606 "grammar.y"
-{ yyval.prog = new ProgramNode(0L);
+#line 610 "grammar.y"
+{ yyval.prog = new ProgramNode(0);
                                      Parser::progNode = yyval.prog; ;
     break;}
 case 191:
-#line 608 "grammar.y"
+#line 612 "grammar.y"
 { yyval.prog = new ProgramNode(yyvsp[0].srcs);
                                      Parser::progNode = yyval.prog; ;
     break;}
 case 192:
-#line 613 "grammar.y"
+#line 617 "grammar.y"
 { yyval.srcs = new SourceElementsNode(yyvsp[0].stat); ;
     break;}
 case 193:
-#line 614 "grammar.y"
+#line 618 "grammar.y"
 { yyval.srcs = new SourceElementsNode(yyvsp[-1].srcs, yyvsp[0].stat); ;
     break;}
 case 194:
-#line 618 "grammar.y"
+#line 622 "grammar.y"
 { yyval.stat = yyvsp[0].stat; ;
     break;}
 case 195:
-#line 619 "grammar.y"
+#line 623 "grammar.y"
 { yyval.stat = yyvsp[0].func; ;
     break;}
 }
@@ -2223,7 +2225,7 @@ yyerrhandle:
     }
   return 1;
 }
-#line 622 "grammar.y"
+#line 626 "grammar.y"
 
 
 int yyerror (const char * /* s */)  /* Called by yyparse on error */
diff --git a/JavaScriptCore/kjs/grammar.cpp.h b/JavaScriptCore/kjs/grammar.cpp.h
index cd63e82..73bef9f 100644
--- a/JavaScriptCore/kjs/grammar.cpp.h
+++ b/JavaScriptCore/kjs/grammar.cpp.h
@@ -23,6 +23,8 @@ typedef union {
   Operator            op;
   PropertyValueNode   *plist;
   PropertyNode        *pnode;
+  CatchNode           *cnode;
+  FinallyNode         *fnode;
 } YYSTYPE;
 
 #ifndef YYLTYPE
diff --git a/JavaScriptCore/kjs/grammar.h b/JavaScriptCore/kjs/grammar.h
index cd63e82..73bef9f 100644
--- a/JavaScriptCore/kjs/grammar.h
+++ b/JavaScriptCore/kjs/grammar.h
@@ -23,6 +23,8 @@ typedef union {
   Operator            op;
   PropertyValueNode   *plist;
   PropertyNode        *pnode;
+  CatchNode           *cnode;
+  FinallyNode         *fnode;
 } YYSTYPE;
 
 #ifndef YYLTYPE
diff --git a/JavaScriptCore/kjs/grammar.y b/JavaScriptCore/kjs/grammar.y
index 06d36af..c46b850 100644
--- a/JavaScriptCore/kjs/grammar.y
+++ b/JavaScriptCore/kjs/grammar.y
@@ -77,6 +77,8 @@ using namespace KJS;
   Operator            op;
   PropertyValueNode   *plist;
   PropertyNode        *pnode;
+  CatchNode           *cnode;
+  FinallyNode         *fnode;
 }
 
 %start Program
@@ -130,7 +132,9 @@ using namespace KJS;
 %type <node>  ConditionalExpr AssignmentExpr
 %type <node>  ExprOpt
 %type <node>  CallExpr
-%type <node>  Catch Finally
+
+%type <cnode> Catch
+%type <fnode> Finally
 
 %type <stat>  Statement Block
 %type <stat>  VariableStatement EmptyStatement ExprStatement
@@ -183,7 +187,7 @@ PrimaryExpr:
   | Literal
   | ArrayLiteral
   | '(' Expr ')'                   { $$ = new GroupNode($2); }
-  | '{' '}'                        { $$ = new ObjectLiteralNode(0L); }
+  | '{' '}'                        { $$ = new ObjectLiteralNode(); }
   | '{' PropertyNameAndValueList '}'   { $$ = new ObjectLiteralNode($2); }
 ;
 
@@ -242,7 +246,7 @@ CallExpr:
 ;
 
 Arguments:
-    '(' ')'                        { $$ = new ArgumentsNode(0L); }
+    '(' ')'                        { $$ = new ArgumentsNode(); }
   | '(' ArgumentList ')'           { $$ = new ArgumentsNode($2); }
 ;
 
@@ -398,7 +402,7 @@ Statement:
 ;
 
 Block:
-    '{' '}'                        { $$ = new BlockNode(0L); DBG($$, @2, @2); }
+    '{' '}'                        { $$ = new BlockNode(0); DBG($$, @2, @2); }
   | '{' SourceElements '}'          { $$ = new BlockNode($2); DBG($$, @3, @3); }
 ;
 
@@ -449,7 +453,7 @@ ExprStatement:
 ;
 
 IfStatement: /* shift/reduce conflict due to dangling else */
-    IF '(' Expr ')' Statement      { $$ = new IfNode($3,$5,0L);DBG($$, at 1, at 4); }
+    IF '(' Expr ')' Statement      { $$ = new IfNode($3,$5,0);DBG($$, at 1, at 4); }
   | IF '(' Expr ')' Statement ELSE Statement
                                    { $$ = new IfNode($3,$5,$7);DBG($$, at 1, at 4); }
 ;
@@ -467,7 +471,7 @@ IterationStatement:
             Statement              { $$ = new ForInNode($3, $5, $7);
 	                             DBG($$, at 1, at 6); }
   | FOR '(' VAR IDENT IN Expr ')'
-            Statement              { $$ = new ForInNode(*$4,0L,$6,$8);
+            Statement              { $$ = new ForInNode(*$4,0,$6,$8);
 	                             DBG($$, at 1, at 7); }
   | FOR '(' VAR IDENT Initializer IN Expr ')'
             Statement              { $$ = new ForInNode(*$4,$5,$7,$9);
@@ -475,7 +479,7 @@ IterationStatement:
 ;
 
 ExprOpt:
-    /* nothing */                  { $$ = 0L; }
+    /* nothing */                  { $$ = 0; }
   | Expr
 ;
 
@@ -507,9 +511,9 @@ BreakStatement:
 ;
 
 ReturnStatement:
-    RETURN ';'                     { $$ = new ReturnNode(0L); DBG($$, at 1, at 2); }
+    RETURN ';'                     { $$ = new ReturnNode(0); DBG($$, at 1, at 2); }
   | RETURN error                   { if (automatic()) {
-                                       $$ = new ReturnNode(0L); DBG($$, at 1, at 1);
+                                       $$ = new ReturnNode(0); DBG($$, at 1, at 1);
                                      } else
 				       YYABORT; }
   | RETURN Expr ';'                { $$ = new ReturnNode($2); }
@@ -530,13 +534,13 @@ SwitchStatement:
 ;
 
 CaseBlock:
-    '{' CaseClausesOpt '}'         { $$ = new CaseBlockNode($2, 0L, 0L); }
+    '{' CaseClausesOpt '}'         { $$ = new CaseBlockNode($2, 0, 0); }
   | '{' CaseClausesOpt DefaultClause CaseClausesOpt '}'
                                    { $$ = new CaseBlockNode($2, $3, $4); }
 ;
 
 CaseClausesOpt:
-    /* nothing */                  { $$ = 0L; }
+    /* nothing */                  { $$ = 0; }
   | CaseClauses
 ;
 
@@ -546,13 +550,13 @@ CaseClauses:
 ;
 
 CaseClause:
-    CASE Expr ':'                  { $$ = new CaseClauseNode($2, 0L); }
+    CASE Expr ':'                  { $$ = new CaseClauseNode($2); }
   | CASE Expr ':' StatementList    { $$ = new CaseClauseNode($2, $4); }
 ;
 
 DefaultClause:
-    DEFAULT ':'                    { $$ = new CaseClauseNode(0L, 0L);; }
-  | DEFAULT ':' StatementList      { $$ = new CaseClauseNode(0L, $3); }
+    DEFAULT ':'                    { $$ = new CaseClauseNode(0); }
+  | DEFAULT ':' StatementList      { $$ = new CaseClauseNode(0, $3); }
 ;
 
 LabelledStatement:
@@ -566,7 +570,7 @@ ThrowStatement:
 
 TryStatement:
     TRY Block Catch                { $$ = new TryNode($2, $3); }
-  | TRY Block Finally              { $$ = new TryNode($2, 0L, $3); }
+  | TRY Block Finally              { $$ = new TryNode($2, $3); }
   | TRY Block Catch Finally        { $$ = new TryNode($2, $3, $4); }
 ;
 
@@ -579,12 +583,12 @@ Finally:
 ;
 
 FunctionDeclaration:
-    FUNCTION IDENT '(' ')' FunctionBody    { $$ = new FuncDeclNode(*$2, 0L, $5); }
+    FUNCTION IDENT '(' ')' FunctionBody    { $$ = new FuncDeclNode(*$2, $5); }
   | FUNCTION IDENT '(' FormalParameterList ')' FunctionBody
                                    { $$ = new FuncDeclNode(*$2, $4, $6); }
 
 FunctionExpr:
-    FUNCTION '(' ')' FunctionBody  { $$ = new FuncExprNode(0L, $4); }
+    FUNCTION '(' ')' FunctionBody  { $$ = new FuncExprNode($4); }
   | FUNCTION '(' FormalParameterList ')' FunctionBody
                                    { $$ = new FuncExprNode($3, $5); }
 
@@ -596,14 +600,14 @@ FormalParameterList:
 ;
 
 FunctionBody:
-    '{' '}'  /* TODO: spec ??? */  { $$ = new FunctionBodyNode(0L);
+    '{' '}'  /* TODO: spec ??? */  { $$ = new FunctionBodyNode(0);
 	                             DBG($$, @1, @2);}
   | '{' SourceElements '}'         { $$ = new FunctionBodyNode($2);
 	                             DBG($$, @1, @3);}
 ;
 
 Program:
-    /* nothing, empty script */      { $$ = new ProgramNode(0L);
+    /* nothing, empty script */      { $$ = new ProgramNode(0);
                                      Parser::progNode = $$; }
     | SourceElements                 { $$ = new ProgramNode($1);
                                      Parser::progNode = $$; }
diff --git a/JavaScriptCore/kjs/nodes.cpp b/JavaScriptCore/kjs/nodes.cpp
index d0b3fed..19c72b3 100644
--- a/JavaScriptCore/kjs/nodes.cpp
+++ b/JavaScriptCore/kjs/nodes.cpp
@@ -341,18 +341,6 @@ Value ElementNode::evaluate(ExecState *exec)
 
 // ------------------------------ ArrayNode ------------------------------------
 
-void ArrayNode::reverseElementList()
-{
-  ElementNode *head = 0;
-  ElementNode *next;
-  for (ElementNode *n = element; n; n = next) {
-    next = n->list;
-    n->list = head;
-    head = n;
-  }
-  element = head;
-}
-
 void ArrayNode::ref()
 {
   Node::ref();
@@ -391,18 +379,6 @@ Value ArrayNode::evaluate(ExecState *exec)
 
 // ------------------------------ ObjectLiteralNode ----------------------------
 
-void ObjectLiteralNode::reverseList()
-{
-  PropertyValueNode *head = 0;
-  PropertyValueNode *next;
-  for (PropertyValueNode *n = list; n; n = next) {
-    next = n->list;
-    n->list = head;
-    head = n;
-  }
-  list = head;
-}
-
 void ObjectLiteralNode::ref()
 {
   Node::ref();
@@ -560,15 +536,6 @@ Reference AccessorNode2::evaluateReference(ExecState *exec)
 
 // ------------------------------ ArgumentListNode -----------------------------
 
-ArgumentListNode::ArgumentListNode(Node *e) : list(0L), expr(e)
-{
-}
-
-ArgumentListNode::ArgumentListNode(ArgumentListNode *l, Node *e)
-  : list(l), expr(e)
-{
-}
-
 void ArgumentListNode::ref()
 {
   for (ArgumentListNode *n = this; n; n = n->list) {
@@ -613,18 +580,6 @@ List ArgumentListNode::evaluateList(ExecState *exec)
 
 // ------------------------------ ArgumentsNode --------------------------------
 
-void ArgumentsNode::reverseList()
-{
-  ArgumentListNode *head = 0;
-  ArgumentListNode *next;
-  for (ArgumentListNode *n = list; n; n = next) {
-    next = n->list;
-    n->list = head;
-    head = n;
-  }
-  list = head;
-}
-
 void ArgumentsNode::ref()
 {
   Node::ref();
@@ -1512,6 +1467,19 @@ Value CommaNode::evaluate(ExecState *exec)
 
 // ------------------------------ StatListNode ---------------------------------
 
+StatListNode::StatListNode(StatementNode *s)
+  : statement(s), list(this)
+{
+  setLoc(s->firstLine(), s->lastLine(), s->sourceId());
+}
+ 
+StatListNode::StatListNode(StatListNode *l, StatementNode *s)
+  : statement(s), list(l->list)
+{
+  l->list = this;
+  setLoc(l->firstLine(), s->lastLine(), l->sourceId());
+}
+
 void StatListNode::ref()
 {
   for (StatListNode *n = this; n; n = n->list) {
@@ -1700,18 +1668,6 @@ void VarDeclListNode::processVarDecls(ExecState *exec)
 
 // ------------------------------ VarStatementNode -----------------------------
 
-void VarStatementNode::reverseList()
-{
-  VarDeclListNode *head = 0;
-  VarDeclListNode *next;
-  for (VarDeclListNode *n = list; n; n = next) {
-    next = n->list;
-    n->list = head;
-    head = n;
-  }
-  list = head;
-}
-
 void VarStatementNode::ref()
 {
   Node::ref();
@@ -1744,16 +1700,15 @@ void VarStatementNode::processVarDecls(ExecState *exec)
 
 // ------------------------------ BlockNode ------------------------------------
 
-void BlockNode::reverseList()
+BlockNode::BlockNode(SourceElementsNode *s)
 {
-  SourceElementsNode *head = 0;
-  SourceElementsNode *next;
-  for (SourceElementsNode *n = source; n; n = next) {
-    next = n->elements;
-    n->elements = head;
-    head = n;
+  if (s) {
+    source = s->elements;
+    s->elements = 0;
+    setLoc(s->firstLine(), s->lastLine(), s->sourceId());
+  } else {
+    source = 0;
   }
-  source = head;
 }
 
 void BlockNode::ref()
@@ -1988,18 +1943,6 @@ void WhileNode::processVarDecls(ExecState *exec)
 
 // ------------------------------ ForNode --------------------------------------
 
-VarDeclListNode *ForNode::reverseList(VarDeclListNode *list)
-{
-  VarDeclListNode *head = 0;
-  VarDeclListNode *next;
-  for (VarDeclListNode *n = list; n; n = next) {
-    next = n->list;
-    n->list = head;
-    head = n;
-  }
-  return head;
-}
-
 void ForNode::ref()
 {
   Node::ref();
@@ -2274,18 +2217,6 @@ void WithNode::processVarDecls(ExecState *exec)
 
 // ------------------------------ CaseClauseNode -------------------------------
 
-void CaseClauseNode::reverseList()
-{
-  StatListNode *head = 0;
-  StatListNode *next;
-  for (StatListNode *n = list; n; n = next) {
-    next = n->list;
-    n->list = head;
-    head = n;
-  }
-  list = head;
-}
-
 void CaseClauseNode::ref()
 {
   Node::ref();
@@ -2369,26 +2300,26 @@ void ClauseListNode::processVarDecls(ExecState *exec)
 
 // ------------------------------ CaseBlockNode --------------------------------
 
-void CaseBlockNode::reverseLists()
+CaseBlockNode::CaseBlockNode(ClauseListNode *l1, CaseClauseNode *d,
+                             ClauseListNode *l2)
 {
-  ClauseListNode *head = 0;
-  ClauseListNode *next;
-  for (ClauseListNode *n = list1; n; n = next) {
-    next = n->nx;
-    n->nx = head;
-    head = n;
+  if (l1) {
+    list1 = l1->nx;
+    l1->nx = 0;
+  } else {
+    list1 = 0;
   }
-  list1 = head;
-  
-  head = 0;
-  for (ClauseListNode *n = list2; n; n = next) {
-    next = n->nx;
-    n->nx = head;
-    head = n;
+
+  def = d;
+
+  if (l2) {
+    list2 = l2->nx;
+    l2->nx = 0;
+  } else {
+    list2 = 0;
   }
-  list2 = head;
 }
-
+ 
 void CaseBlockNode::ref()
 {
   Node::ref();
@@ -2772,18 +2703,6 @@ void FunctionBodyNode::processFuncDecl(ExecState *exec)
 
 // ------------------------------ FuncDeclNode ---------------------------------
 
-void FuncDeclNode::reverseParameterList()
-{
-  ParameterNode *head = 0;
-  ParameterNode *next;
-  for (ParameterNode *n = param; n; n = next) {
-    next = n->next;
-    n->next = head;
-    head = n;
-  }
-  param = head;
-}
-
 void FuncDeclNode::ref()
 {
   Node::ref();
@@ -2837,18 +2756,6 @@ void FuncDeclNode::processFuncDecl(ExecState *exec)
 
 // ------------------------------ FuncExprNode ---------------------------------
 
-void FuncExprNode::reverseParameterList()
-{
-  ParameterNode *head = 0;
-  ParameterNode *next;
-  for (ParameterNode *n = param; n; n = next) {
-    next = n->next;
-    n->next = head;
-    head = n;
-  }
-  param = head;
-}
-
 void FuncExprNode::ref()
 {
   Node::ref();
@@ -2886,6 +2793,19 @@ Value FuncExprNode::evaluate(ExecState *exec)
 
 // ------------------------------ SourceElementsNode ---------------------------
 
+SourceElementsNode::SourceElementsNode(StatementNode *s1)
+  : element(s1), elements(this)
+{
+  setLoc(s1->firstLine(), s1->lastLine(), s1->sourceId());
+}
+ 
+SourceElementsNode::SourceElementsNode(SourceElementsNode *s1, StatementNode *s2)
+  : element(s2), elements(s1->elements)
+{
+  s1->elements = this;
+  setLoc(s1->firstLine(), s2->lastLine(), s1->sourceId());
+}
+
 void SourceElementsNode::ref()
 {
   for (SourceElementsNode *n = this; n; n = n->elements) {
diff --git a/JavaScriptCore/kjs/nodes.h b/JavaScriptCore/kjs/nodes.h
index 6b3dee1..9d52751 100644
--- a/JavaScriptCore/kjs/nodes.h
+++ b/JavaScriptCore/kjs/nodes.h
@@ -209,9 +209,10 @@ namespace KJS {
 
   class ElementNode : public Node {
   public:
-    ElementNode(int e, Node *n) : list(0L), elision(e), node(n) { }
+    // list pointer is tail of a circular list, cracked in the ArrayNode ctor
+    ElementNode(int e, Node *n) : list(this), elision(e), node(n) { }
     ElementNode(ElementNode *l, int e, Node *n)
-      : list(l), elision(e), node(n) { }
+      : list(l->list), elision(e), node(n) { l->list = this; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
@@ -225,46 +226,48 @@ namespace KJS {
 
   class ArrayNode : public Node {
   public:
-    ArrayNode(int e) : element(0L), elision(e), opt(true) { }
+    ArrayNode(int e) : element(0), elision(e), opt(true) { }
     ArrayNode(ElementNode *ele)
-      : element(ele), elision(0), opt(false) { reverseElementList(); }
+      : element(ele->list), elision(0), opt(false) { ele->list = 0; }
     ArrayNode(int eli, ElementNode *ele)
-      : element(ele), elision(eli), opt(true) { reverseElementList(); }
+      : element(ele->list), elision(eli), opt(true) { ele->list = 0; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    void reverseElementList();
     ElementNode *element;
     int elision;
     bool opt;
   };
 
-  class ObjectLiteralNode : public Node {
+  class PropertyValueNode : public Node {
   public:
-    ObjectLiteralNode(PropertyValueNode *l) : list(l) { reverseList(); }
+    // list pointer is tail of a circular list, cracked in the ObjectLiteralNode ctor
+    PropertyValueNode(PropertyNode *n, Node *a)
+      : name(n), assign(a), list(this) { }
+    PropertyValueNode(PropertyNode *n, Node *a, PropertyValueNode *l)
+      : name(n), assign(a), list(l->list) { l->list = this; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    void reverseList();
+    friend class ObjectLiteralNode;
+    PropertyNode *name;
+    Node *assign;
     PropertyValueNode *list;
   };
 
-  class PropertyValueNode : public Node {
+  class ObjectLiteralNode : public Node {
   public:
-    PropertyValueNode(PropertyNode *n, Node *a, PropertyValueNode *l = 0L)
-      : name(n), assign(a), list(l) { }
+    ObjectLiteralNode() : list(0) { }
+    ObjectLiteralNode(PropertyValueNode *l) : list(l->list) { l->list = 0; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    friend class ObjectLiteralNode;
-    PropertyNode *name;
-    Node *assign;
     PropertyValueNode *list;
   };
 
@@ -307,8 +310,10 @@ namespace KJS {
 
   class ArgumentListNode : public Node {
   public:
-    ArgumentListNode(Node *e);
-    ArgumentListNode(ArgumentListNode *l, Node *e);
+    // list pointer is tail of a circular list, cracked in the ArgumentsNode ctor
+    ArgumentListNode(Node *e) : list(this), expr(e) { }
+    ArgumentListNode(ArgumentListNode *l, Node *e)
+      : list(l->list), expr(e) { l->list = this; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
@@ -322,20 +327,21 @@ namespace KJS {
 
   class ArgumentsNode : public Node {
   public:
-    ArgumentsNode(ArgumentListNode *l) : list(l) { reverseList(); }
+    ArgumentsNode() : list(0) { }
+    ArgumentsNode(ArgumentListNode *l)
+      : list(l->list) { l->list = 0; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
     List evaluateList(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    void reverseList();
     ArgumentListNode *list;
   };
 
   class NewExprNode : public Node {
   public:
-    NewExprNode(Node *e) : expr(e), args(0L) {}
+    NewExprNode(Node *e) : expr(e), args(0) {}
     NewExprNode(Node *e, ArgumentsNode *a) : expr(e), args(a) {}
     virtual void ref();
     virtual bool deref();
@@ -592,8 +598,9 @@ namespace KJS {
 
   class StatListNode : public StatementNode {
   public:
-    StatListNode(StatementNode *s) : statement(s), list(0L) { }
-    StatListNode(StatListNode *l, StatementNode *s) : statement(s), list(l) { }
+    // list pointer is tail of a circular list, cracked in the CaseClauseNode ctor
+    StatListNode(StatementNode *s);
+    StatListNode(StatListNode *l, StatementNode *s);
     virtual void ref();
     virtual bool deref();
     virtual Completion execute(ExecState *exec);
@@ -631,8 +638,10 @@ namespace KJS {
 
   class VarDeclListNode : public Node {
   public:
-    VarDeclListNode(VarDeclNode *v) : list(0L), var(v) {}
-    VarDeclListNode(VarDeclListNode *l, VarDeclNode *v) : list(l), var(v) {}
+    // list pointer is tail of a circular list, cracked in the ForNode/VarStatementNode ctor
+    VarDeclListNode(VarDeclNode *v) : list(this), var(v) {}
+    VarDeclListNode(VarDeclListNode *l, VarDeclNode *v)
+      : list(l->list), var(v) { l->list = this; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
@@ -647,27 +656,26 @@ namespace KJS {
 
   class VarStatementNode : public StatementNode {
   public:
-    VarStatementNode(VarDeclListNode *l) : list(l) { reverseList(); }
+    VarStatementNode(VarDeclListNode *l)
+      : list(l->list) { l->list = 0; }
     virtual void ref();
     virtual bool deref();
     virtual Completion execute(ExecState *exec);
     virtual void processVarDecls(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    void reverseList();
     VarDeclListNode *list;
   };
 
   class BlockNode : public StatementNode {
   public:
-    BlockNode(SourceElementsNode *s) : source(s) { reverseList(); }
+    BlockNode(SourceElementsNode *s);
     virtual void ref();
     virtual bool deref();
     virtual Completion execute(ExecState *exec);
     virtual void processVarDecls(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   protected:
-    void reverseList();
     SourceElementsNode *source;
   };
 
@@ -734,14 +742,13 @@ namespace KJS {
     ForNode(Node *e1, Node *e2, Node *e3, StatementNode *s) :
       expr1(e1), expr2(e2), expr3(e3), statement(s) {}
     ForNode(VarDeclListNode *e1, Node *e2, Node *e3, StatementNode *s) :
-      expr1(reverseList(e1)), expr2(e2), expr3(e3), statement(s) {}
+      expr1(e1->list), expr2(e2), expr3(e3), statement(s) { e1->list = 0; }
     virtual void ref();
     virtual bool deref();
     virtual Completion execute(ExecState *exec);
     virtual void processVarDecls(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    static VarDeclListNode *reverseList(VarDeclListNode *);
     Node *expr1, *expr2, *expr3;
     StatementNode *statement;
   };
@@ -807,9 +814,11 @@ namespace KJS {
     StatementNode *statement;
   };
 
-  class CaseClauseNode: public Node {
+  class CaseClauseNode : public Node {
   public:
-    CaseClauseNode(Node *e, StatListNode *l) : expr(e), list(l) { reverseList(); }
+    CaseClauseNode(Node *e) : expr(e), list(0) { }
+    CaseClauseNode(Node *e, StatListNode *l)
+      : expr(e), list(l->list) { l->list = 0; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
@@ -817,15 +826,16 @@ namespace KJS {
     virtual void processVarDecls(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    void reverseList();
     Node *expr;
     StatListNode *list;
   };
 
   class ClauseListNode : public Node {
   public:
-    ClauseListNode(CaseClauseNode *c) : cl(c), nx(0L) { }
-    ClauseListNode(ClauseListNode *n, CaseClauseNode *c) : cl(c), nx(n) { }
+    // list pointer is tail of a circular list, cracked in the CaseBlockNode ctor
+    ClauseListNode(CaseClauseNode *c) : cl(c), nx(this) { }
+    ClauseListNode(ClauseListNode *n, CaseClauseNode *c)
+      : cl(c), nx(n->nx) { n->nx = this; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
@@ -839,10 +849,9 @@ namespace KJS {
     ClauseListNode *nx;
   };
 
-  class CaseBlockNode: public Node {
+  class CaseBlockNode : public Node {
   public:
-    CaseBlockNode(ClauseListNode *l1, CaseClauseNode *d, ClauseListNode *l2)
-      : list1(l1), def(d), list2(l2) { reverseLists(); }
+    CaseBlockNode(ClauseListNode *l1, CaseClauseNode *d, ClauseListNode *l2);
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
@@ -850,7 +859,6 @@ namespace KJS {
     virtual void processVarDecls(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    void reverseLists();
     ClauseListNode *list1;
     CaseClauseNode *def;
     ClauseListNode *list2;
@@ -921,8 +929,12 @@ namespace KJS {
 
   class TryNode : public StatementNode {
   public:
-    TryNode(StatementNode *b, Node *c = 0L, Node *f = 0L)
-      : block(b), _catch((CatchNode*)c), _final((FinallyNode*)f) {}
+    TryNode(StatementNode *b, CatchNode *c)
+      : block(b), _catch(c), _final(0) {}
+    TryNode(StatementNode *b, FinallyNode *f)
+      : block(b), _catch(0), _final(f) {}
+    TryNode(StatementNode *b, CatchNode *c, FinallyNode *f)
+      : block(b), _catch(c), _final(f) {}
     virtual void ref();
     virtual bool deref();
     virtual Completion execute(ExecState *exec);
@@ -936,8 +948,10 @@ namespace KJS {
 
   class ParameterNode : public Node {
   public:
-    ParameterNode(const Identifier &i) : id(i), next(0L) { }
-    ParameterNode(ParameterNode *list, const Identifier &i) : id(i), next(list) { }
+    // list pointer is tail of a circular list, cracked in the FuncDeclNode/FuncExprNode ctor
+    ParameterNode(const Identifier &i) : id(i), next(this) { }
+    ParameterNode(ParameterNode *list, const Identifier &i)
+      : id(i), next(list->next) { list->next = this; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
@@ -960,8 +974,10 @@ namespace KJS {
 
   class FuncDeclNode : public StatementNode {
   public:
+    FuncDeclNode(const Identifier &i, FunctionBodyNode *b)
+      : ident(i), param(0), body(b) { }
     FuncDeclNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b)
-      : ident(i), param(p), body(b) { reverseParameterList(); }
+      : ident(i), param(p->next), body(b) { p->next = 0; }
     virtual void ref();
     virtual bool deref();
     Completion execute(ExecState */*exec*/)
@@ -969,7 +985,6 @@ namespace KJS {
     void processFuncDecl(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    void reverseParameterList();
     Identifier ident;
     ParameterNode *param;
     FunctionBodyNode *body;
@@ -977,14 +992,14 @@ namespace KJS {
 
   class FuncExprNode : public Node {
   public:
+    FuncExprNode(FunctionBodyNode *b) : param(0), body(b) { }
     FuncExprNode(ParameterNode *p, FunctionBodyNode *b)
-	: param(p), body(b) { reverseParameterList(); }
+      : param(p->next), body(b) { p->next = 0; }
     virtual void ref();
     virtual bool deref();
     Value evaluate(ExecState *exec);
     virtual void streamTo(SourceStream &s) const;
   private:
-    void reverseParameterList();
     ParameterNode *param;
     FunctionBodyNode *body;
   };
@@ -992,9 +1007,9 @@ namespace KJS {
   // A linked list of source element nodes
   class SourceElementsNode : public StatementNode {
   public:
-    SourceElementsNode(StatementNode *s1) { element = s1; elements = 0L; }
-    SourceElementsNode(SourceElementsNode *s1, StatementNode *s2)
-      { elements = s1; element = s2; }
+    // list pointer is tail of a circular list, cracked in the BlockNode (or subclass) ctor
+    SourceElementsNode(StatementNode *s1);
+    SourceElementsNode(SourceElementsNode *s1, StatementNode *s2);
     virtual void ref();
     virtual bool deref();
     Completion execute(ExecState *exec);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list