Changeset 10646 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Sep 28, 2005, 11:51:15 AM (20 years ago)
Author:
darin
Message:

Reviewed by Maciej.

  • update grammar to fix conflicts; fixes one of our test cases because it resolves the relationship between function expressions and declarations in the way required by the ECMA specification
  • kjs/grammar.y: Added lots of new grammar rules so we have no conflicts. A new set of rules for "no bracket or function at start of expression" and another set of rules for "no in anywhere in expression". Also simplified the handling of try to use only a single node and used operator precedence to get rid of the conflict in handling of if and else. Also used a macro to streamline the handling of automatic semicolons and changed parenthesis handling to use a virtual function.
  • kjs/nodes.h: Added nodeInsideAllParens, removed unused abortStatement. (KJS::TryNode::TryNode): Updated to hold catch and finally blocks directly instead of using a special node for each.
  • kjs/nodes.cpp: (Node::createErrorCompletion): Added. Used instead of throwError when creating errors that should not be in a completion rather than an ExecState. (Node::throwUndefinedVariableError): Added. Sets source location unlike the call it replaces. (Node::nodeInsideAllParens): Added. (GroupNode::nodeInsideAllParens): Added. (StatListNode::execute): Removed code to move exceptions into completion objects; that's now done solely by the KJS_CHECKEXCEPTION macro. (TryNode::execute): Include execution of catch and finally here rather than using separate nodes. (FuncDeclNode::execute): Moved here, no longer inline.
  • kjs/nodes2string.cpp: (TryNode::streamTo): Updated for change. (FuncDeclNode::streamTo): Ditto. (FuncExprNode::streamTo): Ditto.
  • kjs/kjs-test: Removed. Was part of "make check".
  • kjs/kjs-test.chk: Ditto.
  • kjs/test.js: Ditto.
  • tests/mozilla/expected.html: Updated because one more test succeeds.
Location:
trunk/JavaScriptCore
Files:
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r10641 r10646  
     12005-09-27  Darin Adler  <[email protected]>
     2
     3        Reviewed by Maciej.
     4
     5        - update grammar to fix conflicts; fixes one of our test cases
     6          because it resolves the relationship between function expressions
     7          and declarations in the way required by the ECMA specification
     8
     9        * kjs/grammar.y: Added lots of new grammar rules so we have no conflicts.
     10        A new set of rules for "no bracket or function at start of expression" and
     11        another set of rules for "no in anywhere in expression". Also simplified the
     12        handling of try to use only a single node and used operator precedence to
     13        get rid of the conflict in handling of if and else. Also used a macro to
     14        streamline the handling of automatic semicolons and changed parenthesis
     15        handling to use a virtual function.
     16
     17        * kjs/nodes.h: Added nodeInsideAllParens, removed unused abortStatement.
     18        (KJS::TryNode::TryNode): Updated to hold catch and finally blocks directly instead
     19        of using a special node for each.
     20        * kjs/nodes.cpp:
     21        (Node::createErrorCompletion): Added. Used instead of throwError when creating errors
     22        that should not be in a completion rather than an ExecState.
     23        (Node::throwUndefinedVariableError): Added. Sets source location unlike the call it
     24        replaces.
     25        (Node::nodeInsideAllParens): Added.
     26        (GroupNode::nodeInsideAllParens): Added.
     27        (StatListNode::execute): Removed code to move exceptions into completion objects;
     28        that's now done solely by the KJS_CHECKEXCEPTION macro.
     29        (TryNode::execute): Include execution of catch and finally here rather than using
     30        separate nodes.
     31        (FuncDeclNode::execute): Moved here, no longer inline.
     32        * kjs/nodes2string.cpp:
     33        (TryNode::streamTo): Updated for change.
     34        (FuncDeclNode::streamTo): Ditto.
     35        (FuncExprNode::streamTo): Ditto.
     36
     37        * kjs/kjs-test: Removed. Was part of "make check".
     38        * kjs/kjs-test.chk: Ditto.
     39        * kjs/test.js: Ditto.
     40
     41        * tests/mozilla/expected.html: Updated because one more test succeeds.
     42
    1432005-09-27  Adele Peterson  <[email protected]>
    244
  • trunk/JavaScriptCore/kjs/grammar.y

    r10621 r10646  
    4242#define YYERROR_VERBOSE
    4343#endif
    44 #define DBG(l, s, e) { l->setLoc(s.first_line, e.last_line, Parser::sid); } // location
    4544
    4645extern int kjsyylex();
    4746int kjsyyerror(const char *);
    48 static bool automatic();
     47static bool allowAutomaticSemicolon();
     48
     49#define AUTO_SEMICOLON do { if (!allowAutomaticSemicolon()) YYABORT; } while (0)
     50#define DBG(l, s, e) (l)->setLoc((s).first_line, (e).last_line, Parser::sid)
    4951
    5052using namespace KJS;
     
    8587  PropertyValueNode   *plist;
    8688  PropertyNode        *pnode;
    87   CatchNode           *cnode;
    88   FinallyNode         *fnode;
    8989}
    9090
    9191%start Program
    92 
    93 /* expect a shift/reduce conflict from the "dangling else" problem
    94    when using bison the warning can be supressed */
    95 // %expect 1
    9692
    9793/* literals */
     
    10298%token BREAK CASE DEFAULT FOR NEW VAR CONST CONTINUE
    10399%token FUNCTION RETURN VOID DELETE
    104 %token IF THIS DO WHILE ELSE IN INSTANCEOF TYPEOF
     100%token IF THIS DO WHILE IN INSTANCEOF TYPEOF
    105101%token SWITCH WITH RESERVED
    106102%token THROW TRY CATCH FINALLY
     103
     104/* give an if without an else higher precedence than an else to resolve the ambiguity */
     105%nonassoc IF_WITHOUT_ELSE
     106%nonassoc ELSE
    107107
    108108/* punctuators */
     
    130130
    131131/* non-terminal types */
    132 %type <node>  Literal PrimaryExpr Expr MemberExpr NewExpr CallExpr
    133 %type <node>  ArrayLiteral
    134 %type <node>  LeftHandSideExpr PostfixExpr UnaryExpr
    135 %type <node>  MultiplicativeExpr AdditiveExpr
    136 %type <node>  ShiftExpr RelationalExpr EqualityExpr
    137 %type <node>  BitwiseANDExpr BitwiseXORExpr BitwiseORExpr
    138 %type <node>  LogicalANDExpr LogicalORExpr
    139 %type <node>  ConditionalExpr AssignmentExpr
    140 %type <node>  ExprOpt
    141 
    142 %type <cnode> Catch
    143 %type <fnode> Finally
     132%type <node>  Literal ArrayLiteral
     133
     134%type <node>  PrimaryExpr PrimaryExprNoBrace
     135%type <node>  MemberExpr MemberExprNoBF /* BF => brace or function */
     136%type <node>  NewExpr NewExprNoBF
     137%type <node>  CallExpr CallExprNoBF
     138%type <node>  LeftHandSideExpr LeftHandSideExprNoBF
     139%type <node>  PostfixExpr PostfixExprNoBF
     140%type <node>  UnaryExpr UnaryExprNoBF UnaryExprCommon
     141%type <node>  MultiplicativeExpr MultiplicativeExprNoBF
     142%type <node>  AdditiveExpr AdditiveExprNoBF
     143%type <node>  ShiftExpr ShiftExprNoBF
     144%type <node>  RelationalExpr RelationalExprNoIn RelationalExprNoBF
     145%type <node>  EqualityExpr EqualityExprNoIn EqualityExprNoBF
     146%type <node>  BitwiseANDExpr BitwiseANDExprNoIn BitwiseANDExprNoBF
     147%type <node>  BitwiseXORExpr BitwiseXORExprNoIn BitwiseXORExprNoBF
     148%type <node>  BitwiseORExpr BitwiseORExprNoIn BitwiseORExprNoBF
     149%type <node>  LogicalANDExpr LogicalANDExprNoIn LogicalANDExprNoBF
     150%type <node>  LogicalORExpr LogicalORExprNoIn LogicalORExprNoBF
     151%type <node>  ConditionalExpr ConditionalExprNoIn ConditionalExprNoBF
     152%type <node>  AssignmentExpr AssignmentExprNoIn AssignmentExprNoBF
     153%type <node>  Expr ExprNoIn ExprNoBF
     154
     155%type <node>  ExprOpt ExprNoInOpt
    144156
    145157%type <stat>  Statement Block
     
    152164
    153165%type <slist> StatementList
    154 %type <init>  Initializer
     166%type <init>  Initializer InitializerNoIn
    155167%type <func>  FunctionDeclaration
    156168%type <funcExpr>  FunctionExpr
     
    159171%type <param> FormalParameterList
    160172%type <op>    AssignmentOperator
    161 %type <prog>  Program
    162173%type <args>  Arguments
    163174%type <alist> ArgumentList
    164 %type <vlist> VariableDeclarationList ConstDeclarationList
    165 %type <decl>  VariableDeclaration ConstDeclaration
     175%type <vlist> VariableDeclarationList VariableDeclarationListNoIn ConstDeclarationList
     176%type <decl>  VariableDeclaration VariableDeclarationNoIn ConstDeclaration
    166177%type <cblk>  CaseBlock
    167178%type <ccl>   CaseClause DefaultClause
     
    175186
    176187Literal:
    177     NULLTOKEN                      { $$ = new NullNode(); }
    178   | TRUETOKEN                      { $$ = new BooleanNode(true); }
    179   | FALSETOKEN                     { $$ = new BooleanNode(false); }
    180   | NUMBER                         { $$ = new NumberNode($1); }
    181   | STRING                         { $$ = new StringNode($1); }
    182   | '/'       /* a RegExp ? */     { Lexer *l = Lexer::curr();
    183                                      if (!l->scanRegExp()) YYABORT;
    184                                      $$ = new RegExpNode(l->pattern,l->flags);}
    185   | DIVEQUAL /* a RegExp starting with /= ! */
    186                                    { Lexer *l = Lexer::curr();
    187                                      if (!l->scanRegExp()) YYABORT;
    188                                      $$ = new RegExpNode(UString('=')+l->pattern,l->flags);}
     188    NULLTOKEN                           { $$ = new NullNode(); }
     189  | TRUETOKEN                           { $$ = new BooleanNode(true); }
     190  | FALSETOKEN                          { $$ = new BooleanNode(false); }
     191  | NUMBER                              { $$ = new NumberNode($1); }
     192  | STRING                              { $$ = new StringNode($1); }
     193  | '/' /* regexp */                    {
     194                                            Lexer *l = Lexer::curr();
     195                                            if (!l->scanRegExp()) YYABORT;
     196                                            $$ = new RegExpNode(l->pattern, l->flags);
     197                                        }
     198  | DIVEQUAL /* regexp with /= */       {
     199                                            Lexer *l = Lexer::curr();
     200                                            if (!l->scanRegExp()) YYABORT;
     201                                            $$ = new RegExpNode(UString('=') + l->pattern, l->flags);
     202                                        }
    189203;
    190204
    191205PrimaryExpr:
    192     THIS                           { $$ = new ThisNode(); }
     206    PrimaryExprNoBrace
     207  | '{' '}'                             { $$ = new ObjectLiteralNode(); }
     208  | '{' PropertyNameAndValueList '}'    { $$ = new ObjectLiteralNode($2); }
     209;
     210
     211PrimaryExprNoBrace:
     212    THIS                                { $$ = new ThisNode(); }
    193213  | Literal
    194214  | ArrayLiteral
    195   | IDENT                          { $$ = new ResolveNode(*$1); }
    196   | '(' Expr ')'                   { if ($2->isResolveNode()) $$ = $2; else $$ = new GroupNode($2); }
    197   | '{' '}'                        { $$ = new ObjectLiteralNode(); }
    198   | '{' PropertyNameAndValueList '}'   { $$ = new ObjectLiteralNode($2); }
     215  | IDENT                               { $$ = new ResolveNode(*$1); }
     216  | '(' Expr ')'                        { $$ = $2->isResolveNode() ? $2 : new GroupNode($2); }
    199217;
    200218
    201219ArrayLiteral:
    202     '[' ElisionOpt ']'                 { $$ = new ArrayNode($2); }
    203   | '[' ElementList ']'                { $$ = new ArrayNode($2); }
    204   | '[' ElementList ',' ElisionOpt ']' { $$ = new ArrayNode($4, $2); }
     220    '[' ElisionOpt ']'                  { $$ = new ArrayNode($2); }
     221  | '[' ElementList ']'                 { $$ = new ArrayNode($2); }
     222  | '[' ElementList ',' ElisionOpt ']'  { $$ = new ArrayNode($4, $2); }
    205223;
    206224
    207225ElementList:
    208     ElisionOpt AssignmentExpr      { $$ = new ElementNode($1, $2); }
     226    ElisionOpt AssignmentExpr           { $$ = new ElementNode($1, $2); }
    209227  | ElementList ',' ElisionOpt AssignmentExpr
    210                                    { $$ = new ElementNode($1, $3, $4); }
     228                                        { $$ = new ElementNode($1, $3, $4); }
    211229;
    212230
    213231ElisionOpt:
    214     /* nothing */                  { $$ = 0; }
     232    /* nothing */                       { $$ = 0; }
    215233  | Elision
    216234;
    217235
    218236Elision:
    219     ','                            { $$ = 1; }
    220   | Elision ','                    { $$ = $1 + 1; }
     237    ','                                 { $$ = 1; }
     238  | Elision ','                         { $$ = $1 + 1; }
    221239;
    222240
     
    224242    PropertyName ':' AssignmentExpr     { $$ = new PropertyValueNode($1, $3); }
    225243  | PropertyNameAndValueList ',' PropertyName ':' AssignmentExpr
    226                                    { $$ = new PropertyValueNode($3, $5, $1); }
     244                                        { $$ = new PropertyValueNode($3, $5, $1); }
    227245;
    228246
    229247PropertyName:
    230     IDENT                          { $$ = new PropertyNode(*$1); }
    231   | STRING                         { $$ = new PropertyNode(Identifier(*$1)); }
    232   | NUMBER                         { $$ = new PropertyNode($1); }
     248    IDENT                               { $$ = new PropertyNode(*$1); }
     249  | STRING                              { $$ = new PropertyNode(Identifier(*$1)); }
     250  | NUMBER                              { $$ = new PropertyNode($1); }
    233251;
    234252
    235253MemberExpr:
    236254    PrimaryExpr
    237   | FunctionExpr                   { $$ = $1; }
    238   | MemberExpr '[' Expr ']'        { $$ = new BracketAccessorNode($1, $3); }
    239   | MemberExpr '.' IDENT           { $$ = new DotAccessorNode($1, *$3); }
    240   | NEW MemberExpr Arguments       { $$ = new NewExprNode($2, $3); }
     255  | FunctionExpr                        { $$ = $1; }
     256  | MemberExpr '[' Expr ']'             { $$ = new BracketAccessorNode($1, $3); }
     257  | MemberExpr '.' IDENT                { $$ = new DotAccessorNode($1, *$3); }
     258  | NEW MemberExpr Arguments            { $$ = new NewExprNode($2, $3); }
     259;
     260
     261MemberExprNoBF:
     262    PrimaryExprNoBrace
     263  | MemberExprNoBF '[' Expr ']'         { $$ = new BracketAccessorNode($1, $3); }
     264  | MemberExprNoBF '.' IDENT            { $$ = new DotAccessorNode($1, *$3); }
     265  | NEW MemberExpr Arguments            { $$ = new NewExprNode($2, $3); }
    241266;
    242267
    243268NewExpr:
    244269    MemberExpr
    245   | NEW NewExpr                    { $$ = new NewExprNode($2); }
     270  | NEW NewExpr                         { $$ = new NewExprNode($2); }
     271;
     272
     273NewExprNoBF:
     274    MemberExprNoBF
     275  | NEW NewExpr                         { $$ = new NewExprNode($2); }
    246276;
    247277
    248278CallExpr:
    249     MemberExpr Arguments { $$ = makeFunctionCallNode($1, $2); }
    250   | CallExpr Arguments   { $$ = makeFunctionCallNode($1, $2); }
    251   | CallExpr '[' Expr ']'  { $$ = new BracketAccessorNode($1, $3); }
    252   | CallExpr '.' IDENT     { $$ = new DotAccessorNode($1, *$3); }
     279    MemberExpr Arguments                { $$ = makeFunctionCallNode($1, $2); }
     280  | CallExpr Arguments                  { $$ = makeFunctionCallNode($1, $2); }
     281  | CallExpr '[' Expr ']'               { $$ = new BracketAccessorNode($1, $3); }
     282  | CallExpr '.' IDENT                  { $$ = new DotAccessorNode($1, *$3); }
     283;
     284
     285CallExprNoBF:
     286    MemberExprNoBF Arguments            { $$ = makeFunctionCallNode($1, $2); }
     287  | CallExprNoBF Arguments              { $$ = makeFunctionCallNode($1, $2); }
     288  | CallExprNoBF '[' Expr ']'           { $$ = new BracketAccessorNode($1, $3); }
     289  | CallExprNoBF '.' IDENT              { $$ = new DotAccessorNode($1, *$3); }
    253290;
    254291
    255292Arguments:
    256     '(' ')'                        { $$ = new ArgumentsNode(); }
    257   | '(' ArgumentList ')'           { $$ = new ArgumentsNode($2); }
     293    '(' ')'                             { $$ = new ArgumentsNode(); }
     294  | '(' ArgumentList ')'                { $$ = new ArgumentsNode($2); }
    258295;
    259296
    260297ArgumentList:
    261     AssignmentExpr                  { $$ = new ArgumentListNode($1); }
    262   | ArgumentList ',' AssignmentExpr { $$ = new ArgumentListNode($1, $3); }
     298    AssignmentExpr                      { $$ = new ArgumentListNode($1); }
     299  | ArgumentList ',' AssignmentExpr     { $$ = new ArgumentListNode($1, $3); }
    263300;
    264301
     
    268305;
    269306
    270 PostfixExpr:    /* TODO: no line terminator here */
     307LeftHandSideExprNoBF:
     308    NewExprNoBF
     309  | CallExprNoBF
     310;
     311
     312PostfixExpr:
    271313    LeftHandSideExpr
    272   | LeftHandSideExpr PLUSPLUS      { if (!makePostfixNode($$, $1, OpPlusPlus)) YYABORT; }
    273   | LeftHandSideExpr MINUSMINUS    { if (!makePostfixNode($$, $1, OpMinusMinus)) YYABORT; }
    274 ;
     314  | LeftHandSideExpr PLUSPLUS           { if (!makePostfixNode($$, $1, OpPlusPlus)) YYABORT; }
     315  | LeftHandSideExpr MINUSMINUS         { if (!makePostfixNode($$, $1, OpMinusMinus)) YYABORT; }
     316;
     317
     318PostfixExprNoBF:
     319    LeftHandSideExprNoBF
     320  | LeftHandSideExprNoBF PLUSPLUS       { if (!makePostfixNode($$, $1, OpPlusPlus)) YYABORT; }
     321  | LeftHandSideExprNoBF MINUSMINUS     { if (!makePostfixNode($$, $1, OpMinusMinus)) YYABORT; }
     322;
     323
     324UnaryExprCommon:
     325    DELETE UnaryExpr                    { $$ = makeDeleteNode($2); }
     326  | VOID UnaryExpr                      { $$ = new VoidNode($2); }
     327  | TYPEOF UnaryExpr                    { $$ = makeTypeOfNode($2); }
     328  | PLUSPLUS UnaryExpr                  { if (!makePrefixNode($$, $2, OpPlusPlus)) YYABORT; }
     329  | AUTOPLUSPLUS UnaryExpr              { if (!makePrefixNode($$, $2, OpPlusPlus)) YYABORT; }
     330  | MINUSMINUS UnaryExpr                { if (!makePrefixNode($$, $2, OpMinusMinus)) YYABORT; }
     331  | AUTOMINUSMINUS UnaryExpr            { if (!makePrefixNode($$, $2, OpMinusMinus)) YYABORT; }
     332  | '+' UnaryExpr                       { $$ = new UnaryPlusNode($2); }
     333  | '-' UnaryExpr                       { $$ = new NegateNode($2); }
     334  | '~' UnaryExpr                       { $$ = new BitwiseNotNode($2); }
     335  | '!' UnaryExpr                       { $$ = new LogicalNotNode($2); }
    275336
    276337UnaryExpr:
    277338    PostfixExpr
    278   | DELETE UnaryExpr               { $$ = makeDeleteNode($2); }
    279   | VOID UnaryExpr                 { $$ = new VoidNode($2); }
    280   | TYPEOF UnaryExpr               { $$ = makeTypeOfNode($2); }
    281   | PLUSPLUS UnaryExpr             { if (!makePrefixNode($$, $2, OpPlusPlus)) YYABORT; }
    282   | AUTOPLUSPLUS UnaryExpr         { if (!makePrefixNode($$, $2, OpPlusPlus)) YYABORT; }
    283   | MINUSMINUS UnaryExpr           { if (!makePrefixNode($$, $2, OpMinusMinus)) YYABORT; }
    284   | AUTOMINUSMINUS UnaryExpr       { if (!makePrefixNode($$, $2, OpMinusMinus)) YYABORT; }
    285   | '+' UnaryExpr                  { $$ = new UnaryPlusNode($2); }
    286   | '-' UnaryExpr                  { $$ = new NegateNode($2); }
    287   | '~' UnaryExpr                  { $$ = new BitwiseNotNode($2); }
    288   | '!' UnaryExpr                  { $$ = new LogicalNotNode($2); }
     339  | UnaryExprCommon
     340;
     341
     342UnaryExprNoBF:
     343    PostfixExprNoBF
     344  | UnaryExprCommon
    289345;
    290346
    291347MultiplicativeExpr:
    292348    UnaryExpr
    293   | MultiplicativeExpr '*' UnaryExpr { $$ = new MultNode($1, $3, '*'); }
    294   | MultiplicativeExpr '/' UnaryExpr { $$ = new MultNode($1, $3, '/'); }
    295   | MultiplicativeExpr '%' UnaryExpr { $$ = new MultNode($1,$3,'%'); }
     349  | MultiplicativeExpr '*' UnaryExpr    { $$ = new MultNode($1, $3, '*'); }
     350  | MultiplicativeExpr '/' UnaryExpr    { $$ = new MultNode($1, $3, '/'); }
     351  | MultiplicativeExpr '%' UnaryExpr    { $$ = new MultNode($1, $3,'%'); }
     352;
     353
     354MultiplicativeExprNoBF:
     355    UnaryExprNoBF
     356  | MultiplicativeExprNoBF '*' UnaryExpr
     357                                        { $$ = new MultNode($1, $3, '*'); }
     358  | MultiplicativeExprNoBF '/' UnaryExpr
     359                                        { $$ = new MultNode($1, $3, '/'); }
     360  | MultiplicativeExprNoBF '%' UnaryExpr
     361                                        { $$ = new MultNode($1, $3,'%'); }
    296362;
    297363
     
    302368;
    303369
     370AdditiveExprNoBF:
     371    MultiplicativeExprNoBF
     372  | AdditiveExprNoBF '+' MultiplicativeExpr
     373                                        { $$ = new AddNode($1, $3, '+'); }
     374  | AdditiveExprNoBF '-' MultiplicativeExpr
     375                                        { $$ = new AddNode($1, $3, '-'); }
     376;
     377
    304378ShiftExpr:
    305379    AdditiveExpr
    306   | ShiftExpr LSHIFT AdditiveExpr  { $$ = new ShiftNode($1, OpLShift, $3); }
    307   | ShiftExpr RSHIFT AdditiveExpr  { $$ = new ShiftNode($1, OpRShift, $3); }
    308   | ShiftExpr URSHIFT AdditiveExpr { $$ = new ShiftNode($1, OpURShift, $3); }
     380  | ShiftExpr LSHIFT AdditiveExpr       { $$ = new ShiftNode($1, OpLShift, $3); }
     381  | ShiftExpr RSHIFT AdditiveExpr       { $$ = new ShiftNode($1, OpRShift, $3); }
     382  | ShiftExpr URSHIFT AdditiveExpr      { $$ = new ShiftNode($1, OpURShift, $3); }
     383;
     384
     385ShiftExprNoBF:
     386    AdditiveExprNoBF
     387  | ShiftExprNoBF LSHIFT AdditiveExpr   { $$ = new ShiftNode($1, OpLShift, $3); }
     388  | ShiftExprNoBF RSHIFT AdditiveExpr   { $$ = new ShiftNode($1, OpRShift, $3); }
     389  | ShiftExprNoBF URSHIFT AdditiveExpr  { $$ = new ShiftNode($1, OpURShift, $3); }
    309390;
    310391
    311392RelationalExpr:
    312393    ShiftExpr
    313   | RelationalExpr '<' ShiftExpr
    314                            { $$ = new RelationalNode($1, OpLess, $3); }
    315   | RelationalExpr '>' ShiftExpr
    316                            { $$ = new RelationalNode($1, OpGreater, $3); }
    317   | RelationalExpr LE ShiftExpr
    318                            { $$ = new RelationalNode($1, OpLessEq, $3); }
    319   | RelationalExpr GE ShiftExpr
    320                            { $$ = new RelationalNode($1, OpGreaterEq, $3); }
    321   | RelationalExpr INSTANCEOF ShiftExpr
    322                            { $$ = new RelationalNode($1, OpInstanceOf, $3); }
    323   | RelationalExpr IN ShiftExpr
    324                            { $$ = new RelationalNode($1, OpIn, $3); }
     394  | RelationalExpr '<' ShiftExpr        { $$ = new RelationalNode($1, OpLess, $3); }
     395  | RelationalExpr '>' ShiftExpr        { $$ = new RelationalNode($1, OpGreater, $3); }
     396  | RelationalExpr LE ShiftExpr         { $$ = new RelationalNode($1, OpLessEq, $3); }
     397  | RelationalExpr GE ShiftExpr         { $$ = new RelationalNode($1, OpGreaterEq, $3); }
     398  | RelationalExpr INSTANCEOF ShiftExpr { $$ = new RelationalNode($1, OpInstanceOf, $3); }
     399  | RelationalExpr IN ShiftExpr         { $$ = new RelationalNode($1, OpIn, $3); }
     400;
     401
     402RelationalExprNoIn:
     403    ShiftExpr
     404  | RelationalExprNoIn '<' ShiftExpr    { $$ = new RelationalNode($1, OpLess, $3); }
     405  | RelationalExprNoIn '>' ShiftExpr    { $$ = new RelationalNode($1, OpGreater, $3); }
     406  | RelationalExprNoIn LE ShiftExpr     { $$ = new RelationalNode($1, OpLessEq, $3); }
     407  | RelationalExprNoIn GE ShiftExpr     { $$ = new RelationalNode($1, OpGreaterEq, $3); }
     408  | RelationalExprNoIn INSTANCEOF ShiftExpr
     409                                        { $$ = new RelationalNode($1, OpInstanceOf, $3); }
     410;
     411
     412RelationalExprNoBF:
     413    ShiftExprNoBF
     414  | RelationalExprNoBF '<' ShiftExpr    { $$ = new RelationalNode($1, OpLess, $3); }
     415  | RelationalExprNoBF '>' ShiftExpr    { $$ = new RelationalNode($1, OpGreater, $3); }
     416  | RelationalExprNoBF LE ShiftExpr     { $$ = new RelationalNode($1, OpLessEq, $3); }
     417  | RelationalExprNoBF GE ShiftExpr     { $$ = new RelationalNode($1, OpGreaterEq, $3); }
     418  | RelationalExprNoBF INSTANCEOF ShiftExpr
     419                                        { $$ = new RelationalNode($1, OpInstanceOf, $3); }
     420  | RelationalExprNoBF IN ShiftExpr     { $$ = new RelationalNode($1, OpIn, $3); }
    325421;
    326422
    327423EqualityExpr:
    328424    RelationalExpr
    329   | EqualityExpr EQEQ RelationalExpr   { $$ = new EqualNode($1, OpEqEq, $3); }
    330   | EqualityExpr NE RelationalExpr     { $$ = new EqualNode($1, OpNotEq, $3); }
    331   | EqualityExpr STREQ RelationalExpr  { $$ = new EqualNode($1, OpStrEq, $3); }
    332   | EqualityExpr STRNEQ RelationalExpr { $$ = new EqualNode($1, OpStrNEq, $3);}
     425  | EqualityExpr EQEQ RelationalExpr    { $$ = new EqualNode($1, OpEqEq, $3); }
     426  | EqualityExpr NE RelationalExpr      { $$ = new EqualNode($1, OpNotEq, $3); }
     427  | EqualityExpr STREQ RelationalExpr   { $$ = new EqualNode($1, OpStrEq, $3); }
     428  | EqualityExpr STRNEQ RelationalExpr  { $$ = new EqualNode($1, OpStrNEq, $3);}
     429;
     430
     431EqualityExprNoIn:
     432    RelationalExprNoIn
     433  | EqualityExprNoIn EQEQ RelationalExprNoIn
     434                                        { $$ = new EqualNode($1, OpEqEq, $3); }
     435  | EqualityExprNoIn NE RelationalExprNoIn
     436                                        { $$ = new EqualNode($1, OpNotEq, $3); }
     437  | EqualityExprNoIn STREQ RelationalExprNoIn
     438                                        { $$ = new EqualNode($1, OpStrEq, $3); }
     439  | EqualityExprNoIn STRNEQ RelationalExprNoIn
     440                                        { $$ = new EqualNode($1, OpStrNEq, $3);}
     441;
     442
     443EqualityExprNoBF:
     444    RelationalExprNoBF
     445  | EqualityExprNoBF EQEQ RelationalExpr
     446                                        { $$ = new EqualNode($1, OpEqEq, $3); }
     447  | EqualityExprNoBF NE RelationalExpr  { $$ = new EqualNode($1, OpNotEq, $3); }
     448  | EqualityExprNoBF STREQ RelationalExpr
     449                                        { $$ = new EqualNode($1, OpStrEq, $3); }
     450  | EqualityExprNoBF STRNEQ RelationalExpr
     451                                        { $$ = new EqualNode($1, OpStrNEq, $3);}
    333452;
    334453
    335454BitwiseANDExpr:
    336455    EqualityExpr
    337   | BitwiseANDExpr '&' EqualityExpr { $$ = new BitOperNode($1, OpBitAnd, $3); }
     456  | BitwiseANDExpr '&' EqualityExpr     { $$ = new BitOperNode($1, OpBitAnd, $3); }
     457;
     458
     459BitwiseANDExprNoIn:
     460    EqualityExprNoIn
     461  | BitwiseANDExprNoIn '&' EqualityExprNoIn
     462                                        { $$ = new BitOperNode($1, OpBitAnd, $3); }
     463;
     464
     465BitwiseANDExprNoBF:
     466    EqualityExprNoBF
     467  | BitwiseANDExprNoBF '&' EqualityExpr { $$ = new BitOperNode($1, OpBitAnd, $3); }
    338468;
    339469
    340470BitwiseXORExpr:
    341471    BitwiseANDExpr
    342   | BitwiseXORExpr '^' BitwiseANDExpr { $$ = new BitOperNode($1, OpBitXOr, $3); }
     472  | BitwiseXORExpr '^' BitwiseANDExpr   { $$ = new BitOperNode($1, OpBitXOr, $3); }
     473;
     474
     475BitwiseXORExprNoIn:
     476    BitwiseANDExprNoIn
     477  | BitwiseXORExprNoIn '^' BitwiseANDExprNoIn
     478                                        { $$ = new BitOperNode($1, OpBitXOr, $3); }
     479;
     480
     481BitwiseXORExprNoBF:
     482    BitwiseANDExprNoBF
     483  | BitwiseXORExprNoBF '^' BitwiseANDExpr
     484                                        { $$ = new BitOperNode($1, OpBitXOr, $3); }
    343485;
    344486
    345487BitwiseORExpr:
    346488    BitwiseXORExpr
    347   | BitwiseORExpr '|' BitwiseXORExpr { $$ = new BitOperNode($1, OpBitOr, $3); }
     489  | BitwiseORExpr '|' BitwiseXORExpr    { $$ = new BitOperNode($1, OpBitOr, $3); }
     490;
     491
     492BitwiseORExprNoIn:
     493    BitwiseXORExprNoIn
     494  | BitwiseORExprNoIn '|' BitwiseXORExprNoIn
     495                                        { $$ = new BitOperNode($1, OpBitOr, $3); }
     496;
     497
     498BitwiseORExprNoBF:
     499    BitwiseXORExprNoBF
     500  | BitwiseORExprNoBF '|' BitwiseXORExpr
     501                                        { $$ = new BitOperNode($1, OpBitOr, $3); }
    348502;
    349503
    350504LogicalANDExpr:
    351505    BitwiseORExpr
    352   | LogicalANDExpr AND BitwiseORExpr
    353                            { $$ = new BinaryLogicalNode($1, OpAnd, $3); }
     506  | LogicalANDExpr AND BitwiseORExpr    { $$ = new BinaryLogicalNode($1, OpAnd, $3); }
     507;
     508
     509LogicalANDExprNoIn:
     510    BitwiseORExprNoIn
     511  | LogicalANDExprNoIn AND BitwiseORExprNoIn
     512                                        { $$ = new BinaryLogicalNode($1, OpAnd, $3); }
     513;
     514
     515LogicalANDExprNoBF:
     516    BitwiseORExprNoBF
     517  | LogicalANDExprNoBF AND BitwiseORExpr
     518                                        { $$ = new BinaryLogicalNode($1, OpAnd, $3); }
    354519;
    355520
    356521LogicalORExpr:
    357522    LogicalANDExpr
    358   | LogicalORExpr OR LogicalANDExpr
    359                            { $$ = new BinaryLogicalNode($1, OpOr, $3); }
     523  | LogicalORExpr OR LogicalANDExpr     { $$ = new BinaryLogicalNode($1, OpOr, $3); }
     524;
     525
     526LogicalORExprNoIn:
     527    LogicalANDExprNoIn
     528  | LogicalORExprNoIn OR LogicalANDExprNoIn
     529                                        { $$ = new BinaryLogicalNode($1, OpOr, $3); }
     530;
     531
     532LogicalORExprNoBF:
     533    LogicalANDExprNoBF
     534  | LogicalORExprNoBF OR LogicalANDExpr { $$ = new BinaryLogicalNode($1, OpOr, $3); }
    360535;
    361536
     
    363538    LogicalORExpr
    364539  | LogicalORExpr '?' AssignmentExpr ':' AssignmentExpr
    365                            { $$ = new ConditionalNode($1, $3, $5); }
     540                                        { $$ = new ConditionalNode($1, $3, $5); }
     541;
     542
     543ConditionalExprNoIn:
     544    LogicalORExprNoIn
     545  | LogicalORExprNoIn '?' AssignmentExprNoIn ':' AssignmentExprNoIn
     546                                        { $$ = new ConditionalNode($1, $3, $5); }
     547;
     548
     549ConditionalExprNoBF:
     550    LogicalORExprNoBF
     551  | LogicalORExprNoBF '?' AssignmentExpr ':' AssignmentExpr
     552                                        { $$ = new ConditionalNode($1, $3, $5); }
    366553;
    367554
     
    369556    ConditionalExpr
    370557  | LeftHandSideExpr AssignmentOperator AssignmentExpr
    371                            { if (!makeAssignNode($$, $1, $2, $3)) YYABORT; }
     558                                        { if (!makeAssignNode($$, $1, $2, $3)) YYABORT; }
     559;
     560
     561AssignmentExprNoIn:
     562    ConditionalExprNoIn
     563  | LeftHandSideExpr AssignmentOperator AssignmentExprNoIn
     564                                        { if (!makeAssignNode($$, $1, $2, $3)) YYABORT; }
     565;
     566
     567AssignmentExprNoBF:
     568    ConditionalExprNoBF
     569  | LeftHandSideExprNoBF AssignmentOperator AssignmentExpr
     570                                        { if (!makeAssignNode($$, $1, $2, $3)) YYABORT; }
    372571;
    373572
    374573AssignmentOperator:
    375     '='                            { $$ = OpEqual; }
    376   | PLUSEQUAL                      { $$ = OpPlusEq; }
    377   | MINUSEQUAL                     { $$ = OpMinusEq; }
    378   | MULTEQUAL                      { $$ = OpMultEq; }
    379   | DIVEQUAL                       { $$ = OpDivEq; }
    380   | LSHIFTEQUAL                    { $$ = OpLShift; }
    381   | RSHIFTEQUAL                    { $$ = OpRShift; }
    382   | URSHIFTEQUAL                   { $$ = OpURShift; }
    383   | ANDEQUAL                       { $$ = OpAndEq; }
    384   | XOREQUAL                       { $$ = OpXOrEq; }
    385   | OREQUAL                        { $$ = OpOrEq; }
    386   | MODEQUAL                       { $$ = OpModEq; }
     574    '='                                 { $$ = OpEqual; }
     575  | PLUSEQUAL                           { $$ = OpPlusEq; }
     576  | MINUSEQUAL                          { $$ = OpMinusEq; }
     577  | MULTEQUAL                           { $$ = OpMultEq; }
     578  | DIVEQUAL                            { $$ = OpDivEq; }
     579  | LSHIFTEQUAL                         { $$ = OpLShift; }
     580  | RSHIFTEQUAL                         { $$ = OpRShift; }
     581  | URSHIFTEQUAL                        { $$ = OpURShift; }
     582  | ANDEQUAL                            { $$ = OpAndEq; }
     583  | XOREQUAL                            { $$ = OpXOrEq; }
     584  | OREQUAL                             { $$ = OpOrEq; }
     585  | MODEQUAL                            { $$ = OpModEq; }
    387586;
    388587
    389588Expr:
    390589    AssignmentExpr
    391   | Expr ',' AssignmentExpr        { $$ = new CommaNode($1, $3); }
     590  | Expr ',' AssignmentExpr             { $$ = new CommaNode($1, $3); }
     591;
     592
     593ExprNoIn:
     594    AssignmentExprNoIn
     595  | ExprNoIn ',' AssignmentExprNoIn     { $$ = new CommaNode($1, $3); }
     596;
     597
     598ExprNoBF:
     599    AssignmentExprNoBF
     600  | ExprNoBF ',' AssignmentExpr         { $$ = new CommaNode($1, $3); }
    392601;
    393602
     
    411620
    412621Block:
    413     '{' '}'                        { $$ = new BlockNode(0); DBG($$, @2, @2); }
    414   | '{' SourceElements '}'          { $$ = new BlockNode($2); DBG($$, @3, @3); }
     622    '{' '}'                             { $$ = new BlockNode(0); DBG($$, @2, @2); }
     623  | '{' SourceElements '}'              { $$ = new BlockNode($2); DBG($$, @3, @3); }
    415624;
    416625
    417626StatementList:
    418     Statement                      { $$ = new StatListNode($1); }
    419   | StatementList Statement        { $$ = new StatListNode($1, $2); }
     627    Statement                           { $$ = new StatListNode($1); }
     628  | StatementList Statement             { $$ = new StatListNode($1, $2); }
    420629;
    421630
    422631VariableStatement:
    423     VAR VariableDeclarationList ';' { $$ = new VarStatementNode($2);
    424                                       DBG($$, @1, @3); }
    425   | VAR VariableDeclarationList error { if (automatic()) {
    426                                           $$ = new VarStatementNode($2);
    427                                           DBG($$, @1, @2);
    428                                         } else {
    429                                           YYABORT;
    430                                         }
    431                                       }
     632    VAR VariableDeclarationList ';'     { $$ = new VarStatementNode($2); DBG($$, @1, @3); }
     633  | VAR VariableDeclarationList error   { $$ = new VarStatementNode($2); DBG($$, @1, @2); AUTO_SEMICOLON; }
    432634;
    433635
    434636VariableDeclarationList:
    435     VariableDeclaration            { $$ = new VarDeclListNode($1); }
     637    VariableDeclaration                 { $$ = new VarDeclListNode($1); }
    436638  | VariableDeclarationList ',' VariableDeclaration
    437                                    { $$ = new VarDeclListNode($1, $3); }
     639                                        { $$ = new VarDeclListNode($1, $3); }
     640;
     641
     642VariableDeclarationListNoIn:
     643    VariableDeclarationNoIn             { $$ = new VarDeclListNode($1); }
     644  | VariableDeclarationListNoIn ',' VariableDeclarationNoIn
     645                                        { $$ = new VarDeclListNode($1, $3); }
    438646;
    439647
    440648VariableDeclaration:
    441     IDENT                          { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Variable); }
    442   | IDENT Initializer              { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Variable); }
     649    IDENT                               { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Variable); }
     650  | IDENT Initializer                   { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Variable); }
     651;
     652
     653VariableDeclarationNoIn:
     654    IDENT                               { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Variable); }
     655  | IDENT InitializerNoIn               { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Variable); }
    443656;
    444657
    445658ConstStatement:
    446     CONST ConstDeclarationList ';' { $$ = new VarStatementNode($2);
    447                                       DBG($$, @1, @3); }
    448   | CONST ConstDeclarationList error { if (automatic()) {
    449                                           $$ = new VarStatementNode($2);
    450                                           DBG($$, @1, @2);
    451                                         } else {
    452                                           YYABORT;
    453                                         }
    454                                       }
     659    CONST ConstDeclarationList ';'      { $$ = new VarStatementNode($2); DBG($$, @1, @3); }
     660  | CONST ConstDeclarationList error    { $$ = new VarStatementNode($2); DBG($$, @1, @2); AUTO_SEMICOLON; }
    455661;
    456662
    457663ConstDeclarationList:
    458     ConstDeclaration            { $$ = new VarDeclListNode($1); }
    459   | ConstDeclarationList ',' VariableDeclaration
    460                                    { $$ = new VarDeclListNode($1, $3); }
     664    ConstDeclaration                    { $$ = new VarDeclListNode($1); }
     665  | ConstDeclarationList ',' ConstDeclaration
     666                                        { $$ = new VarDeclListNode($1, $3); }
    461667;
    462668
    463669ConstDeclaration:
    464     IDENT                          { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Constant); }
    465   | IDENT Initializer              { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Constant); }
     670    IDENT                               { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Constant); }
     671  | IDENT Initializer                   { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Constant); }
    466672;
    467673
    468674Initializer:
    469     '=' AssignmentExpr             { $$ = new AssignExprNode($2); }
     675    '=' AssignmentExpr                  { $$ = new AssignExprNode($2); }
     676;
     677
     678InitializerNoIn:
     679    '=' AssignmentExprNoIn              { $$ = new AssignExprNode($2); }
    470680;
    471681
    472682EmptyStatement:
    473     ';'                            { $$ = new EmptyStatementNode(); }
     683    ';'                                 { $$ = new EmptyStatementNode(); }
    474684;
    475685
    476686ExprStatement:
    477     Expr ';'                       { $$ = new ExprStatementNode($1);
    478                                      DBG($$, @1, @2); }
    479   | Expr error                     { if (automatic()) {
    480                                        $$ = new ExprStatementNode($1);
    481                                        DBG($$, @1, @1);
    482                                      } else
    483                                        YYABORT; }
    484 ;
    485 
    486 IfStatement: /* shift/reduce conflict due to dangling else */
    487     IF '(' Expr ')' Statement      { $$ = new IfNode($3,$5,0);DBG($$,@1,@4); }
     687    ExprNoBF ';'                        { $$ = new ExprStatementNode($1); DBG($$, @1, @2); }
     688  | ExprNoBF error                      { $$ = new ExprStatementNode($1); DBG($$, @1, @1); AUTO_SEMICOLON; }
     689;
     690
     691IfStatement:
     692    IF '(' Expr ')' Statement %prec IF_WITHOUT_ELSE
     693                                        { $$ = new IfNode($3, $5, 0); DBG($$, @1, @4); }
    488694  | IF '(' Expr ')' Statement ELSE Statement
    489                                    { $$ = new IfNode($3,$5,$7);DBG($$,@1,@4); }
     695                                        { $$ = new IfNode($3, $5, $7); DBG($$, @1, @4); }
    490696;
    491697
    492698IterationStatement:
    493     DO Statement WHILE '(' Expr ')' { $$=new DoWhileNode($2,$5);DBG($$,@1,@3);}
    494   | WHILE '(' Expr ')' Statement   { $$ = new WhileNode($3,$5);DBG($$,@1,@4); }
    495   | FOR '(' ExprOpt ';' ExprOpt ';' ExprOpt ')'
    496             Statement              { $$ = new ForNode($3,$5,$7,$9);
    497                                      DBG($$,@1,@8); }
    498   | FOR '(' VAR VariableDeclarationList ';' ExprOpt ';' ExprOpt ')'
    499             Statement              { $$ = new ForNode($4,$6,$8,$10);
    500                                      DBG($$,@1,@9); }
    501   | FOR '(' LeftHandSideExpr IN Expr ')'
    502             Statement              {
    503                                      Node *n = $3;
    504                                      bool paren = n->isGroupNode();
    505                                      if (paren)
    506                                          n = static_cast<GroupNode *>(n)->nodeInsideAllParens();
    507                                      
    508                                      if (!n->isLocation())
    509                                          YYABORT;
    510 
    511                                      $$ = new ForInNode(n, $5, $7);
    512                                      DBG($$,@1,@6);
    513                                    }
    514   | FOR '(' VAR IDENT IN Expr ')'
    515             Statement              { $$ = new ForInNode(*$4,0,$6,$8);
    516                                      DBG($$,@1,@7); }
    517   | FOR '(' VAR IDENT Initializer IN Expr ')'
    518             Statement              { $$ = new ForInNode(*$4,$5,$7,$9);
    519                                      DBG($$,@1,@8); }
     699    DO Statement WHILE '(' Expr ')'     { $$ = new DoWhileNode($2, $5); DBG($$, @1, @3);}
     700  | WHILE '(' Expr ')' Statement        { $$ = new WhileNode($3, $5); DBG($$, @1, @4); }
     701  | FOR '(' ExprNoInOpt ';' ExprOpt ';' ExprOpt ')' Statement
     702                                        { $$ = new ForNode($3, $5, $7, $9); DBG($$, @1, @8); }
     703  | FOR '(' VAR VariableDeclarationListNoIn ';' ExprOpt ';' ExprOpt ')' Statement
     704                                        { $$ = new ForNode($4, $6, $8, $10); DBG($$, @1, @9); }
     705  | FOR '(' LeftHandSideExpr IN Expr ')' Statement
     706                                        {
     707                                            Node *n = $3->nodeInsideAllParens();
     708                                            if (!n->isLocation())
     709                                                YYABORT;
     710                                            $$ = new ForInNode(n, $5, $7);
     711                                            DBG($$, @1, @6);
     712                                        }
     713  | FOR '(' VAR IDENT IN Expr ')' Statement
     714                                        { $$ = new ForInNode(*$4, 0, $6, $8); DBG($$, @1, @7); }
     715  | FOR '(' VAR IDENT InitializerNoIn IN Expr ')' Statement
     716                                        { $$ = new ForInNode(*$4, $5, $7, $9); DBG($$, @1, @8); }
    520717;
    521718
    522719ExprOpt:
    523     /* nothing */                  { $$ = 0; }
     720    /* nothing */                       { $$ = 0; }
    524721  | Expr
    525722;
    526723
     724ExprNoInOpt:
     725    /* nothing */                       { $$ = 0; }
     726  | ExprNoIn
     727;
     728
    527729ContinueStatement:
    528     CONTINUE ';'                   { $$ = new ContinueNode(); DBG($$,@1,@2); }
    529   | CONTINUE error                 { if (automatic()) {
    530                                        $$ = new ContinueNode(); DBG($$,@1,@1);
    531                                      } else
    532                                        YYABORT; }
    533   | CONTINUE IDENT ';'             { $$ = new ContinueNode(*$2); DBG($$,@1,@3); }
    534   | CONTINUE IDENT error           { if (automatic()) {
    535                                        $$ = new ContinueNode(*$2);DBG($$,@1,@2);
    536                                      } else
    537                                        YYABORT; }
     730    CONTINUE ';'                        { $$ = new ContinueNode(); DBG($$, @1, @2); }
     731  | CONTINUE error                      { $$ = new ContinueNode(); DBG($$, @1, @1); AUTO_SEMICOLON; }
     732  | CONTINUE IDENT ';'                  { $$ = new ContinueNode(*$2); DBG($$, @1, @3); }
     733  | CONTINUE IDENT error                { $$ = new ContinueNode(*$2); DBG($$, @1, @2); AUTO_SEMICOLON; }
    538734;
    539735
    540736BreakStatement:
    541     BREAK ';'                      { $$ = new BreakNode();DBG($$,@1,@2); }
    542   | BREAK error                    { if (automatic()) {
    543                                        $$ = new BreakNode(); DBG($$,@1,@1);
    544                                      } else
    545                                        YYABORT; }
    546   | BREAK IDENT ';'                { $$ = new BreakNode(*$2); DBG($$,@1,@3); }
    547   | BREAK IDENT error              { if (automatic()) {
    548                                        $$ = new BreakNode(*$2); DBG($$,@1,@2);
    549                                      } else
    550                                        YYABORT;
    551                                    }
     737    BREAK ';'                           { $$ = new BreakNode(); DBG($$, @1, @2); }
     738  | BREAK error                         { $$ = new BreakNode(); DBG($$, @1, @1); AUTO_SEMICOLON; }
     739  | BREAK IDENT ';'                     { $$ = new BreakNode(*$2); DBG($$, @1, @3); }
     740  | BREAK IDENT error                   { $$ = new BreakNode(*$2); DBG($$, @1, @2); AUTO_SEMICOLON; }
    552741;
    553742
    554743ReturnStatement:
    555     RETURN ';'                     { $$ = new ReturnNode(0); DBG($$,@1,@2); }
    556   | RETURN error                   { if (automatic()) {
    557                                        $$ = new ReturnNode(0); DBG($$,@1,@1);
    558                                      } else
    559                                        YYABORT; }
    560   | RETURN Expr ';'                { $$ = new ReturnNode($2); DBG($$,@1,@3); }
    561   | RETURN Expr error              { if (automatic()) {
    562                                        $$ = new ReturnNode($2); DBG($$,@1,@2);
    563                                      } else
    564                                        YYABORT; }
     744    RETURN ';'                          { $$ = new ReturnNode(0); DBG($$, @1, @2); }
     745  | RETURN error                        { $$ = new ReturnNode(0); DBG($$, @1, @1); AUTO_SEMICOLON; }
     746  | RETURN Expr ';'                     { $$ = new ReturnNode($2); DBG($$, @1, @3); }
     747  | RETURN Expr error                   { $$ = new ReturnNode($2); DBG($$, @1, @2); AUTO_SEMICOLON; }
    565748;
    566749
    567750WithStatement:
    568     WITH '(' Expr ')' Statement    { $$ = new WithNode($3,$5);
    569                                      DBG($$, @1, @4); }
     751    WITH '(' Expr ')' Statement         { $$ = new WithNode($3, $5); DBG($$, @1, @4); }
    570752;
    571753
    572754SwitchStatement:
    573     SWITCH '(' Expr ')' CaseBlock  { $$ = new SwitchNode($3, $5);
    574                                      DBG($$, @1, @4); }
     755    SWITCH '(' Expr ')' CaseBlock       { $$ = new SwitchNode($3, $5); DBG($$, @1, @4); }
    575756;
    576757
    577758CaseBlock:
    578     '{' CaseClausesOpt '}'         { $$ = new CaseBlockNode($2, 0, 0); }
     759    '{' CaseClausesOpt '}'              { $$ = new CaseBlockNode($2, 0, 0); }
    579760  | '{' CaseClausesOpt DefaultClause CaseClausesOpt '}'
    580                                    { $$ = new CaseBlockNode($2, $3, $4); }
     761                                        { $$ = new CaseBlockNode($2, $3, $4); }
    581762;
    582763
    583764CaseClausesOpt:
    584     /* nothing */                  { $$ = 0; }
     765    /* nothing */                       { $$ = 0; }
    585766  | CaseClauses
    586767;
    587768
    588769CaseClauses:
    589     CaseClause                     { $$ = new ClauseListNode($1); }
    590   | CaseClauses CaseClause         { $$ = new ClauseListNode($1, $2); }
     770    CaseClause                          { $$ = new ClauseListNode($1); }
     771  | CaseClauses CaseClause              { $$ = new ClauseListNode($1, $2); }
    591772;
    592773
    593774CaseClause:
    594     CASE Expr ':'                  { $$ = new CaseClauseNode($2); }
    595   | CASE Expr ':' StatementList    { $$ = new CaseClauseNode($2, $4); }
     775    CASE Expr ':'                       { $$ = new CaseClauseNode($2); }
     776  | CASE Expr ':' StatementList         { $$ = new CaseClauseNode($2, $4); }
    596777;
    597778
    598779DefaultClause:
    599     DEFAULT ':'                    { $$ = new CaseClauseNode(0); }
    600   | DEFAULT ':' StatementList      { $$ = new CaseClauseNode(0, $3); }
     780    DEFAULT ':'                         { $$ = new CaseClauseNode(0); }
     781  | DEFAULT ':' StatementList           { $$ = new CaseClauseNode(0, $3); }
    601782;
    602783
    603784LabelledStatement:
    604     IDENT ':' Statement            { $3->pushLabel(*$1);
    605                                      $$ = new LabelNode(*$1, $3); }
     785    IDENT ':' Statement                 { $3->pushLabel(*$1); $$ = new LabelNode(*$1, $3); }
    606786;
    607787
    608788ThrowStatement:
    609     THROW Expr ';'                 { $$ = new ThrowNode($2); DBG($$,@1,@3); }
    610   | THROW Expr error               { if (automatic()) { $$ = new ThrowNode($2); DBG($$,@1,@2); } else YYABORT; }
     789    THROW Expr ';'                      { $$ = new ThrowNode($2); DBG($$, @1, @3); }
     790  | THROW Expr error                    { $$ = new ThrowNode($2); DBG($$, @1, @2); AUTO_SEMICOLON; }
    611791;
    612792
    613793TryStatement:
    614     TRY Block Catch                { $$ = new TryNode($2, $3); DBG($$,@1,@2); }
    615   | TRY Block Finally              { $$ = new TryNode($2, $3); DBG($$,@1,@2); }
    616   | TRY Block Catch Finally        { $$ = new TryNode($2, $3, $4); DBG($$,@1,@2); }
    617 ;
    618 
    619 Catch:
    620     CATCH '(' IDENT ')' Block      { $$ = new CatchNode(*$3, $5); }
    621 ;
    622 
    623 Finally:
    624     FINALLY Block                  { $$ = new FinallyNode($2); }
     794    TRY Block FINALLY Block             { $$ = new TryNode($2, Identifier::null(), 0, $4); DBG($$, @1, @2); }
     795  | TRY Block CATCH '(' IDENT ')' Block { $$ = new TryNode($2, *$5, $7, 0); DBG($$, @1, @2); }
     796  | TRY Block CATCH '(' IDENT ')' Block FINALLY Block
     797                                        { $$ = new TryNode($2, *$5, $7, $9); DBG($$, @1, @2); }
    625798;
    626799
    627800FunctionDeclaration:
    628     FUNCTION '(' ')' FunctionBody  { YYABORT; }
     801    FUNCTION IDENT '(' ')' FunctionBody { $$ = new FuncDeclNode(*$2, $5); }
     802  | FUNCTION IDENT '(' FormalParameterList ')' FunctionBody
     803                                        { $$ = new FuncDeclNode(*$2, $4, $6); }
     804;
     805
     806FunctionExpr:
     807    FUNCTION '(' ')' FunctionBody       { $$ = new FuncExprNode(Identifier::null(), $4); }
    629808  | FUNCTION '(' FormalParameterList ')' FunctionBody
    630                                    { YYABORT; }
    631   | FUNCTION IDENT '(' ')' FunctionBody
    632                                    { $$ = new FuncDeclNode(*$2, $5); }
     809                                        { $$ = new FuncExprNode(Identifier::null(), $3, $5); }
     810  | FUNCTION IDENT '(' ')' FunctionBody { $$ = new FuncExprNode(*$2, $5); }
    633811  | FUNCTION IDENT '(' FormalParameterList ')' FunctionBody
    634                                    { $$ = new FuncDeclNode(*$2, $4, $6); }
    635 ;
    636 
    637 FunctionExpr:
    638     FUNCTION '(' ')' FunctionBody  { $$ = new FuncExprNode(Identifier::null(), $4); }
    639   | FUNCTION '(' FormalParameterList ')' FunctionBody
    640                                    { $$ = new FuncExprNode(Identifier::null(), $3, $5); }
    641   | FUNCTION IDENT '(' ')' FunctionBody
    642                                    { $$ = new FuncExprNode(*$2, $5); }
    643   | FUNCTION IDENT '(' FormalParameterList ')' FunctionBody
    644                                    { $$ = new FuncExprNode(*$2, $4, $6); }
     812                                        { $$ = new FuncExprNode(*$2, $4, $6); }
    645813;
    646814
    647815FormalParameterList:
    648     IDENT                          { $$ = new ParameterNode(*$1); }
    649   | FormalParameterList ',' IDENT  { $$ = new ParameterNode($1, *$3); }
     816    IDENT                               { $$ = new ParameterNode(*$1); }
     817  | FormalParameterList ',' IDENT       { $$ = new ParameterNode($1, *$3); }
    650818;
    651819
    652820FunctionBody:
    653     '{' '}'  /* TODO: spec ??? */  { $$ = new FunctionBodyNode(0);
    654                                      DBG($$, @1, @2);}
    655   | '{' SourceElements '}'         { $$ = new FunctionBodyNode($2);
    656                                      DBG($$, @1, @3);}
     821    '{' '}' /* not in spec */           { $$ = new FunctionBodyNode(0); DBG($$, @1, @2); }
     822  | '{' SourceElements '}'              { $$ = new FunctionBodyNode($2); DBG($$, @1, @3); }
    657823;
    658824
    659825Program:
    660     /* nothing, empty script */      { $$ = new ProgramNode(0);
    661                                      Parser::accept($$); }
    662     | SourceElements                 { $$ = new ProgramNode($1);
    663                                      Parser::accept($$); }
     826    /* not in spec */                   { Parser::accept(new ProgramNode(0)); }
     827    | SourceElements                    { Parser::accept(new ProgramNode($1)); }
    664828;
    665829
    666830SourceElements:
    667     SourceElement                  { $$ = new SourceElementsNode($1); }
    668   | SourceElements SourceElement   { $$ = new SourceElementsNode($1, $2); }
     831    SourceElement                       { $$ = new SourceElementsNode($1); }
     832  | SourceElements SourceElement        { $$ = new SourceElementsNode($1, $2); }
    669833;
    670834
    671835SourceElement:
    672     FunctionDeclaration            { $$ = $1; }
    673   | Statement                      { $$ = $1; }
    674 ;
    675 
     836    FunctionDeclaration                 { $$ = $1; }
     837  | Statement                           { $$ = $1; }
     838;
     839 
    676840%%
    677841
    678842static bool makeAssignNode(Node*& result, Node *loc, Operator op, Node *expr)
    679843{
    680     Node *n = loc;
    681     bool paren = n->isGroupNode();
    682     if (paren)
    683         n = static_cast<GroupNode *>(n)->nodeInsideAllParens();
     844    Node *n = loc->nodeInsideAllParens();
    684845
    685846    if (!n->isLocation())
     
    703864static bool makePrefixNode(Node*& result, Node *expr, Operator op)
    704865{
    705     Node *n = expr;
    706     bool paren = n->isGroupNode();
    707     if (paren)
    708         n = static_cast<GroupNode *>(n)->nodeInsideAllParens();
     866    Node *n = expr->nodeInsideAllParens();
    709867
    710868    if (!n->isLocation())
     
    728886static bool makePostfixNode(Node*& result, Node *expr, Operator op)
    729887{
    730     Node *n = expr;
    731     bool paren = n->isGroupNode();
    732     if (paren)
    733         n = static_cast<GroupNode *>(n)->nodeInsideAllParens();
     888    Node *n = expr->nodeInsideAllParens();
    734889
    735890    if (!n->isLocation())
     
    753908static Node *makeFunctionCallNode(Node *func, ArgumentsNode *args)
    754909{
    755     Node *n = func;
    756     bool paren = n->isGroupNode();
    757     if (paren)
    758         n = static_cast<GroupNode *>(n)->nodeInsideAllParens();
     910    Node *n = func->nodeInsideAllParens();
    759911   
    760912    if (!n->isLocation())
     
    765917    } else if (n->isBracketAccessorNode()) {
    766918        BracketAccessorNode *bracket = static_cast<BracketAccessorNode *>(n);
    767         if (paren)
     919        if (n != func)
    768920            return new FunctionCallParenBracketNode(bracket->base(), bracket->subscript(), args);
    769921        else
     
    772924        assert(n->isDotAccessorNode());
    773925        DotAccessorNode *dot = static_cast<DotAccessorNode *>(n);
    774         if (paren)
     926        if (n != func)
    775927            return new FunctionCallParenDotNode(dot->base(), dot->identifier(), args);
    776928        else
     
    781933static Node *makeTypeOfNode(Node *expr)
    782934{
    783     Node *n = expr;
    784     bool paren = n->isGroupNode();
    785     if (paren)
    786         n = static_cast<GroupNode *>(n)->nodeInsideAllParens();
     935    Node *n = expr->nodeInsideAllParens();
    787936
    788937    if (n->isResolveNode()) {
     
    795944static Node *makeDeleteNode(Node *expr)
    796945{
    797     Node *n = expr;
    798     bool paren = n->isGroupNode();
    799     if (paren)
    800         n = static_cast<GroupNode *>(n)->nodeInsideAllParens();
     946    Node *n = expr->nodeInsideAllParens();
    801947   
    802948    if (!n->isLocation())
     
    815961}
    816962
    817 int yyerror (const char * /* s */)  /* Called by yyparse on error */
     963int yyerror(const char * /* s */)  /* Called by yyparse on error */
    818964{
    819   // fprintf(stderr, "ERROR: %s at line %d\n",
    820   //      s, KJS::Lexer::curr()->lineNo());
     965  // fprintf(stderr, "ERROR: %s at line %d\n", s, KJS::Lexer::curr()->lineNo());
    821966  return 1;
    822967}
    823968
    824969/* may we automatically insert a semicolon ? */
    825 bool automatic()
     970static bool allowAutomaticSemicolon()
    826971{
    827   if (yychar == '}' || yychar == 0)
    828     return true;
    829   else if (Lexer::curr()->prevTerminator())
    830     return true;
    831 
    832   return false;
     972    return yychar == '}' || yychar == 0 || Lexer::curr()->prevTerminator();
    833973}
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r10636 r10646  
    6060  if (exec->hadException()) { \
    6161    setExceptionDetailsIfNeeded(exec); \
    62     return Completion(Throw, exec->exception()); \
     62    ValueImp *ex = exec->exception(); \
     63    exec->clearException(); \
     64    return Completion(Throw, ex); \
    6365  } \
    6466  if (Collector::outOfMemory()) \
     
    6870  if (exec->hadException()) { \
    6971    setExceptionDetailsIfNeeded(exec); \
    70     return exec->exception(); \
     72    return Undefined(); \
    7173  } \
    7274  if (Collector::outOfMemory()) \
     
    8183    return List(); // will be picked up by KJS_CHECKEXCEPTION
    8284
    83 #ifdef KJS_DEBUG_MEM
    84 std::list<Node *> * Node::s_nodes = 0L;
    85 #endif
    86 
    8785// ------------------------------ Node -----------------------------------------
    8886
     
    9997}
    10098
    101 #ifdef KJS_DEBUG_MEM
    102 void Node::finalCheck()
    103 {
    104   fprintf( stderr, "Node::finalCheck(): list count       : %d\n", (int)s_nodes.size() );
    105   std::list<Node *>::iterator it = s_nodes->begin();
    106   for ( unsigned i = 0; it != s_nodes->end() ; ++it, ++i )
    107     fprintf( stderr, "[%d] Still having node %p (%s) (refcount %d)\n", i, (void*)*it, typeid( **it ).name(), (*it)->refcount );
    108   delete s_nodes;
    109   s_nodes = 0L;
    110 }
    111 #endif
    112 
    113 ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg)
    114 {
    115     return KJS::throwError(exec, e, msg, lineNo(), sourceId(), &sourceURL);
    116 }
    117 
    11899static void substitute(UString &string, const UString &substring)
    119100{
     
    121102    assert(position != -1);
    122103    string = string.substr(0, position) + substring + string.substr(position + 2);
     104}
     105
     106Completion Node::createErrorCompletion(ExecState *exec, ErrorType e, const char *msg)
     107{
     108    return Completion(Throw, Error::create(exec, e, msg, lineNo(), sourceId(), &sourceURL));
     109}
     110
     111Completion Node::createErrorCompletion(ExecState *exec, ErrorType e, const char *msg, const Identifier &ident)
     112{
     113    UString message = msg;
     114    substitute(message, ident.ustring());
     115    return Completion(Throw, Error::create(exec, e, message, lineNo(), sourceId(), &sourceURL));
     116}
     117
     118ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg)
     119{
     120    return KJS::throwError(exec, e, msg, lineNo(), sourceId(), &sourceURL);
    123121}
    124122
     
    163161    substitute(message, label.ustring());
    164162    return KJS::throwError(exec, e, message, lineNo(), sourceId(), &sourceURL);
     163}
     164
     165ValueImp *Node::throwUndefinedVariableError(ExecState *exec, const Identifier &ident)
     166{
     167    return throwError(exec, ReferenceError, "Can't find variable: %s", ident);
    165168}
    166169
     
    177180}
    178181
     182Node *Node::nodeInsideAllParens()
     183{
     184    return this;
     185}
     186
    179187// ------------------------------ StatementNode --------------------------------
    180188
     
    200208}
    201209
    202 // return true if the debugger wants us to stop at this point
    203 bool StatementNode::abortStatement(ExecState *exec)
    204 {
    205   Debugger *dbg = exec->dynamicInterpreter()->imp()->debugger();
    206   if (dbg)
    207     return dbg->imp()->aborted();
    208   else
    209     return false;
    210 }
    211 
    212210void StatementNode::processFuncDecl(ExecState *exec)
    213211{
     
    216214// ------------------------------ NullNode -------------------------------------
    217215
    218 ValueImp *NullNode::evaluate(ExecState */*exec*/)
     216ValueImp *NullNode::evaluate(ExecState *)
    219217{
    220218  return Null();
     
    223221// ------------------------------ BooleanNode ----------------------------------
    224222
    225 ValueImp *BooleanNode::evaluate(ExecState */*exec*/)
     223ValueImp *BooleanNode::evaluate(ExecState *)
    226224{
    227225  return jsBoolean(value);
     
    230228// ------------------------------ NumberNode -----------------------------------
    231229
    232 ValueImp *NumberNode::evaluate(ExecState */*exec*/)
     230ValueImp *NumberNode::evaluate(ExecState *)
    233231{
    234232  return jsNumber(value);
     
    237235// ------------------------------ StringNode -----------------------------------
    238236
    239 ValueImp *StringNode::evaluate(ExecState */*exec*/)
     237ValueImp *StringNode::evaluate(ExecState *)
    240238{
    241239  return jsString(value);
     
    263261
    264262// ------------------------------ ResolveNode ----------------------------------
    265 
    266 static ValueImp *undefinedVariableError(ExecState *exec, const Identifier &ident)
    267 {
    268     return throwError(exec, ReferenceError, "Can't find variable: " + ident.ustring());
    269 }
    270263
    271264// ECMA 11.1.2 & 10.1.4
     
    289282  } while (iter != end);
    290283
    291   return undefinedVariableError(exec, ident);
     284  return throwUndefinedVariableError(exec, ident);
    292285}
    293286
     
    298291{
    299292  return group->evaluate(exec);
     293}
     294
     295Node *GroupNode::nodeInsideAllParens()
     296{
     297    Node *n = this;
     298    do
     299        n = static_cast<GroupNode *>(n)->group.get();
     300    while (n->isGroupNode());
     301    return n;
    300302}
    301303
     
    373375
    374376// ECMA 11.1.5
    375 ValueImp *PropertyNode::evaluate(ExecState */*exec*/)
     377ValueImp *PropertyNode::evaluate(ExecState *)
    376378{
    377379  ValueImp *s;
     
    415417// ------------------------------ ArgumentListNode -----------------------------
    416418
    417 ValueImp *ArgumentListNode::evaluate(ExecState */*exec*/)
     419ValueImp *ArgumentListNode::evaluate(ExecState *)
    418420{
    419421  assert(0);
    420   return NULL; // dummy, see evaluateList()
     422  return 0; // dummy, see evaluateList()
    421423}
    422424
     
    437439// ------------------------------ ArgumentsNode --------------------------------
    438440
    439 ValueImp *ArgumentsNode::evaluate(ExecState */*exec*/)
     441ValueImp *ArgumentsNode::evaluate(ExecState *)
    440442{
    441443  assert(0);
    442   return NULL; // dummy, see evaluateList()
     444  return 0; // dummy, see evaluateList()
    443445}
    444446
     
    549551  } while (iter != end);
    550552 
    551   return undefinedVariableError(exec, ident);
     553  return throwUndefinedVariableError(exec, ident);
    552554}
    553555
     
    672674  } while (iter != end);
    673675
    674   return undefinedVariableError(exec, m_ident);
     676  return throwUndefinedVariableError(exec, m_ident);
    675677}
    676678
     
    903905  } while (iter != end);
    904906
    905   return undefinedVariableError(exec, m_ident);
     907  return throwUndefinedVariableError(exec, m_ident);
    906908}
    907909
     
    978980  KJS_CHECKEXCEPTIONVALUE
    979981
    980   return jsNumber(v->toNumber(exec)); /* TODO: optimize */
     982  return jsNumber(v->toNumber(exec));
    981983}
    982984
     
    12921294
    12931295  if (m_oper != OpEqual)
    1294     return undefinedVariableError(exec, m_ident);
     1296    return throwUndefinedVariableError(exec, m_ident);
    12951297
    12961298 found:
     
    14201422  Completion c = statement->execute(exec);
    14211423  KJS_ABORTPOINT
    1422   if (exec->hadException()) {
    1423     ValueImp *ex = exec->exception();
    1424     exec->clearException();
    1425     return Completion(Throw, ex);
    1426   }
    1427 
    14281424  if (c.complType() != Normal)
    14291425    return c;
     
    14371433      return c2;
    14381434
    1439     if (exec->hadException()) {
    1440       ValueImp *ex = exec->exception();
    1441       exec->clearException();
    1442       return Completion(Throw, ex);
    1443     }
    1444 
    14451435    if (c2.isValueCompletion())
    14461436      v = c2.value();
     
    14861476      // built-in properties of the global object with var declarations.
    14871477      if (variable->getDirect(ident))
    1488           return NULL;
     1478          return 0;
    14891479      val = Undefined();
    14901480  }
     
    15901580
    15911581// ECMA 12.3
    1592 Completion EmptyStatementNode::execute(ExecState */*exec*/)
     1582Completion EmptyStatementNode::execute(ExecState *)
    15931583{
    15941584  return Completion(Normal);
     
    16581648    if (!((c.complType() == Continue) && ls.contains(c.target()))) {
    16591649      if ((c.complType() == Break) && ls.contains(c.target()))
    1660         return Completion(Normal, NULL);
     1650        return Completion(Normal, 0);
    16611651      if (c.complType() != Normal)
    16621652        return c;
     
    16661656  } while (bv->toBoolean(exec));
    16671657
    1668   return Completion(Normal, NULL);
     1658  return Completion(Normal, 0);
    16691659}
    16701660
     
    16841674  Completion c;
    16851675  bool b(false);
    1686   ValueImp *value = NULL;
     1676  ValueImp *value = 0;
    16871677
    16881678  while (1) {
     
    17241714Completion ForNode::execute(ExecState *exec)
    17251715{
    1726   ValueImp *v, *cval = NULL;
     1716  ValueImp *v, *cval = 0;
    17271717
    17281718  if (expr1) {
     
    17871777{
    17881778  ValueImp *e;
    1789   ValueImp *retval = NULL;
     1779  ValueImp *retval = 0;
    17901780  ObjectImp *v;
    17911781  Completion c;
     
    18041794  // access any property.
    18051795  if (e->isUndefinedOrNull()) {
    1806     return Completion(Normal, NULL);
     1796    return Completion(Normal, 0);
    18071797  }
    18081798
     
    19031893
    19041894  if (ident.isEmpty() && !exec->context().imp()->seenLabels()->inIteration())
    1905     return Completion(Throw,
    1906                       throwError(exec, SyntaxError, "Invalid continue statement."));
     1895    return createErrorCompletion(exec, SyntaxError, "Invalid continue statement.");
    19071896  else if (!ident.isEmpty() && !exec->context().imp()->seenLabels()->contains(ident))
    1908     return Completion(Throw,
    1909                       throwError(exec, SyntaxError, "Label %s not found.", ident));
     1897    return createErrorCompletion(exec, SyntaxError, "Label %s not found.", ident);
    19101898  else
    1911     return Completion(Continue, NULL, ident);
     1899    return Completion(Continue, 0, ident);
    19121900}
    19131901
     
    19211909  if (ident.isEmpty() && !exec->context().imp()->seenLabels()->inIteration() &&
    19221910      !exec->context().imp()->seenLabels()->inSwitch())
    1923     return Completion(Throw,
    1924                       throwError(exec, SyntaxError, "Invalid break statement."));
     1911    return createErrorCompletion(exec, SyntaxError, "Invalid break statement.");
    19251912  else if (!ident.isEmpty() && !exec->context().imp()->seenLabels()->contains(ident))
    1926     return Completion(Throw,
    1927                       throwError(exec, SyntaxError, "Label %s not found.", ident));
     1913    return createErrorCompletion(exec, SyntaxError, "Label %s not found.");
    19281914  else
    1929     return Completion(Break, NULL, ident);
     1915    return Completion(Break, 0, ident);
    19301916}
    19311917
     
    19391925  CodeType codeType = exec->context().imp()->codeType();
    19401926  if (codeType != FunctionCode && codeType != AnonymousCode ) {
    1941     return Completion(Throw, throwError(exec, SyntaxError, "Invalid return statement."));   
     1927    return createErrorCompletion(exec, SyntaxError, "Invalid return statement.");
    19421928  }
    19431929
     
    20021988// ------------------------------ ClauseListNode -------------------------------
    20031989
    2004 ValueImp *ClauseListNode::evaluate(ExecState */*exec*/)
    2005 {
    2006   /* should never be called */
     1990ValueImp *ClauseListNode::evaluate(ExecState *)
     1991{
     1992  // should never be called
    20071993  assert(false);
    2008   return NULL;
     1994  return 0;
    20091995}
    20101996
     
    20392025}
    20402026 
    2041 ValueImp *CaseBlockNode::evaluate(ExecState */*exec*/)
    2042 {
    2043   /* should never be called */
     2027ValueImp *CaseBlockNode::evaluate(ExecState *)
     2028{
     2029  // should never be called
    20442030  assert(false);
    2045   return NULL;
     2031  return 0;
    20462032}
    20472033
     
    21482134Completion LabelNode::execute(ExecState *exec)
    21492135{
    2150   Completion e;
    2151 
    2152   if (!exec->context().imp()->seenLabels()->push(label)) {
    2153     return Completion( Throw,
    2154                        throwError(exec, SyntaxError, "Duplicated label %s found.", label));
    2155   };
    2156   e = statement->execute(exec);
     2136  if (!exec->context().imp()->seenLabels()->push(label))
     2137    return createErrorCompletion(exec, SyntaxError, "Duplicated label %s found.", label);
     2138  Completion e = statement->execute(exec);
    21572139  exec->context().imp()->seenLabels()->pop();
    21582140
     
    21802162}
    21812163
    2182 // ------------------------------ CatchNode ------------------------------------
    2183 
    2184 Completion CatchNode::execute(ExecState */*exec*/)
    2185 {
    2186   // should never be reached. execute(exec, arg) is used instead
    2187   assert(0L);
    2188   return Completion();
    2189 }
    2190 
    2191 // ECMA 12.14
    2192 Completion CatchNode::execute(ExecState *exec, ValueImp *arg)
    2193 {
    2194   /* TODO: correct ? Not part of the spec */
    2195 
    2196   exec->clearException();
    2197 
    2198   ObjectImp *obj(new ObjectImp());
    2199   obj->put(exec, ident, arg, DontDelete);
    2200   exec->context().imp()->pushScope(obj);
    2201   Completion c = block->execute(exec);
    2202   exec->context().imp()->popScope();
    2203 
    2204   return c;
    2205 }
    2206 
    2207 void CatchNode::processVarDecls(ExecState *exec)
    2208 {
    2209   block->processVarDecls(exec);
    2210 }
    2211 
    2212 // ------------------------------ FinallyNode ----------------------------------
    2213 
    2214 // ECMA 12.14
    2215 Completion FinallyNode::execute(ExecState *exec)
    2216 {
    2217   return block->execute(exec);
    2218 }
    2219 
    2220 void FinallyNode::processVarDecls(ExecState *exec)
    2221 {
    2222   block->processVarDecls(exec);
    2223 }
    2224 
    22252164// ------------------------------ TryNode --------------------------------------
    22262165
     
    22302169  KJS_BREAKPOINT;
    22312170
    2232   Completion c, c2;
    2233 
    2234   c = block->execute(exec);
    2235 
    2236   if (!_final) {
    2237     if (c.complType() != Throw)
    2238       return c;
    2239     return _catch->execute(exec,c.value());
    2240   }
    2241 
    2242   if (!_catch) {
    2243     ValueImp *lastException = exec->exception();
    2244     exec->clearException();
    2245    
    2246     c2 = _final->execute(exec);
    2247    
    2248     if (!exec->hadException())
    2249       exec->setException(lastException);
    2250    
    2251     return (c2.complType() == Normal) ? c : c2;
    2252   }
    2253 
    2254   if (c.complType() == Throw)
    2255     c = _catch->execute(exec,c.value());
    2256 
    2257   c2 = _final->execute(exec);
    2258   return (c2.complType() == Normal) ? c : c2;
     2171  Completion c = tryBlock->execute(exec);
     2172
     2173  if (catchBlock && c.complType() == Throw) {
     2174    ObjectImp *obj = new ObjectImp;
     2175    obj->put(exec, exceptionIdent, c.value(), DontDelete);
     2176    exec->context().imp()->pushScope(obj);
     2177    c = catchBlock->execute(exec);
     2178    exec->context().imp()->popScope();
     2179  }
     2180
     2181  if (finallyBlock) {
     2182    Completion c2 = finallyBlock->execute(exec);
     2183    if (c2.complType() != Normal)
     2184      c = c2;
     2185  }
     2186
     2187  return c;
    22592188}
    22602189
    22612190void TryNode::processVarDecls(ExecState *exec)
    22622191{
    2263   block->processVarDecls(exec);
    2264   if (_final)
    2265     _final->processVarDecls(exec);
    2266   if (_catch)
    2267     _catch->processVarDecls(exec);
     2192  tryBlock->processVarDecls(exec);
     2193  if (catchBlock)
     2194    catchBlock->processVarDecls(exec);
     2195  if (finallyBlock)
     2196    finallyBlock->processVarDecls(exec);
    22682197}
    22692198
     
    22712200
    22722201// ECMA 13
    2273 ValueImp *ParameterNode::evaluate(ExecState */*exec*/)
     2202ValueImp *ParameterNode::evaluate(ExecState *)
    22742203{
    22752204  return Undefined();
     
    22822211{
    22832212  setLoc(-1, -1, -1);
    2284   //fprintf(stderr,"FunctionBodyNode::FunctionBodyNode %p\n",this);
    22852213}
    22862214
     
    22992227
    23002228  // TODO: let this be an object with [[Class]] property "Function"
    2301   FunctionImp *fimp = new DeclaredFunctionImp(exec, ident, body.get(), context->scopeChain());
    2302   ObjectImp *func(fimp); // protect from GC
     2229  FunctionImp *func = new DeclaredFunctionImp(exec, ident, body.get(), context->scopeChain());
    23032230
    23042231  ObjectImp *proto = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty());
     
    23082235  int plen = 0;
    23092236  for(ParameterNode *p = param.get(); p != 0L; p = p->nextParam(), plen++)
    2310     fimp->addParameter(p->ident());
     2237    func->addParameter(p->ident());
    23112238
    23122239  func->put(exec, lengthPropertyName, Number(plen), ReadOnly|DontDelete|DontEnum);
     
    23272254}
    23282255
     2256Completion FuncDeclNode::execute(ExecState *)
     2257{
     2258    return Completion(Normal);
     2259}
     2260
    23292261// ------------------------------ FuncExprNode ---------------------------------
    23302262
     
    23342266  ContextImp *context = exec->context().imp();
    23352267  bool named = !ident.isNull();
    2336   ObjectImp *functionScopeObject = NULL;
     2268  ObjectImp *functionScopeObject = 0;
    23372269
    23382270  if (named) {
     
    23442276  }
    23452277
    2346   FunctionImp *fimp = new DeclaredFunctionImp(exec, ident, body.get(), context->scopeChain());
    2347   ValueImp *ret(fimp);
     2278  FunctionImp *func = new DeclaredFunctionImp(exec, ident, body.get(), context->scopeChain());
    23482279  ObjectImp *proto = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty());
    2349   proto->put(exec, constructorPropertyName, ret, ReadOnly|DontDelete|DontEnum);
    2350   fimp->put(exec, prototypePropertyName, proto, Internal|DontDelete);
     2280  proto->put(exec, constructorPropertyName, func, ReadOnly|DontDelete|DontEnum);
     2281  func->put(exec, prototypePropertyName, proto, Internal|DontDelete);
    23512282
    23522283  int plen = 0;
    23532284  for(ParameterNode *p = param.get(); p != 0L; p = p->nextParam(), plen++)
    2354     fimp->addParameter(p->ident());
     2285    func->addParameter(p->ident());
    23552286
    23562287  if (named) {
    2357     functionScopeObject->put(exec, ident, ret, Internal | ReadOnly | (context->codeType() == EvalCode ? 0 : DontDelete));
     2288    functionScopeObject->put(exec, ident, func, Internal | ReadOnly | (context->codeType() == EvalCode ? 0 : DontDelete));
    23582289    context->popScope();
    23592290  }
    23602291
    2361   return ret;
     2292  return func;
    23622293}
    23632294
  • trunk/JavaScriptCore/kjs/nodes.h

    r10634 r10646  
    3030
    3131#include "internal.h"
    32 //#include "debugger.h"
    33 #ifndef NDEBUG
    34 #ifndef __osf__
    35 #include <list>
    36 #endif
    37 #endif
    3832
    3933namespace KJS {
     
    8680    UString toString() const;
    8781    virtual void streamTo(SourceStream &s) const = 0;
    88     virtual void processVarDecls(ExecState */*exec*/) {}
     82    virtual void processVarDecls(ExecState *) {}
    8983    int lineNo() const { return line; }
    9084
    91   public:
    9285    // reference counting mechanism
    9386    void ref() { ++m_refcount; }
     
    9588    unsigned int refcount() { return m_refcount; }
    9689
    97     virtual bool isGroupNode() const { return false; }
     90    virtual Node *nodeInsideAllParens();
    9891
    9992    virtual bool isLocation() const { return false; }
     
    10194    virtual bool isBracketAccessorNode() const { return false; }
    10295    virtual bool isDotAccessorNode() const { return false; }
     96    virtual bool isGroupNode() const { return false; }
    10397
    10498  protected:
    105     ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg);
    106     ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *, Node *);
    107     ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, const Identifier &);
    108     ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *, const Identifier &);
    109     ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *, Node *, Node *);
    110     ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *, Node *, const Identifier &);
    111 
    112     void setExceptionDetailsIfNeeded(ExecState *exec);
     99    Completion createErrorCompletion(ExecState *, ErrorType, const char *msg);
     100    Completion createErrorCompletion(ExecState *, ErrorType, const char *msg, const Identifier &);
     101
     102    ValueImp *throwError(ExecState *, ErrorType, const char *msg);
     103    ValueImp *throwError(ExecState *, ErrorType, const char *msg, ValueImp *, Node *);
     104    ValueImp *throwError(ExecState *, ErrorType, const char *msg, const Identifier &);
     105    ValueImp *throwError(ExecState *, ErrorType, const char *msg, ValueImp *, const Identifier &);
     106    ValueImp *throwError(ExecState *, ErrorType, const char *msg, ValueImp *, Node *, Node *);
     107    ValueImp *throwError(ExecState *, ErrorType, const char *msg, ValueImp *, Node *, const Identifier &);
     108
     109    ValueImp *throwUndefinedVariableError(ExecState *, const Identifier &);
     110
     111    void setExceptionDetailsIfNeeded(ExecState *);
     112
    113113    int line;
    114114    UString sourceURL;
    115115    unsigned int m_refcount;
    116116    virtual int sourceId() const { return -1; }
     117
    117118  private:
    118119    // disallow assignment
     
    129130    int sourceId() const { return sid; }
    130131    bool hitStatement(ExecState *exec);
    131     bool abortStatement(ExecState *exec);
    132132    virtual Completion execute(ExecState *exec) = 0;
    133133    void pushLabel(const Identifier &id) { ls.push(id); }
     
    211211    GroupNode(Node *g) : group(g) { }
    212212    virtual ValueImp *evaluate(ExecState *exec);
    213     virtual void streamTo(SourceStream &s) const;
    214 
     213    virtual Node *nodeInsideAllParens();
     214    virtual void streamTo(SourceStream &s) const;
    215215    virtual bool isGroupNode() const { return true; }
    216     Node *nodeInsideAllParens()
    217     {
    218         Node *n = group.get();
    219         while (n->isGroupNode()) {
    220             n = static_cast<GroupNode *>(n)->group.get();
    221         }
    222         return n;
    223     }
    224        
    225216  private:
    226217    SharedPtr<Node> group;
     
    1001992  };
    1002993
    1003   class CatchNode : public StatementNode {
    1004   public:
    1005     CatchNode(const Identifier &i, StatementNode *b) : ident(i), block(b) {}
    1006     virtual Completion execute(ExecState *exec);
    1007     Completion execute(ExecState *exec, ValueImp *arg);
    1008     virtual void processVarDecls(ExecState *exec);
    1009     virtual void streamTo(SourceStream &s) const;
    1010   private:
    1011     Identifier ident;
    1012     SharedPtr<StatementNode> block;
    1013   };
    1014 
    1015   class FinallyNode : public StatementNode {
    1016   public:
    1017     FinallyNode(StatementNode *b) : block(b) {}
    1018     virtual Completion execute(ExecState *exec);
    1019     virtual void processVarDecls(ExecState *exec);
    1020     virtual void streamTo(SourceStream &s) const;
    1021   private:
    1022     SharedPtr<StatementNode> block;
    1023   };
    1024 
    1025994  class TryNode : public StatementNode {
    1026995  public:
    1027     TryNode(StatementNode *b, CatchNode *c)
    1028       : block(b), _catch(c), _final(0) {}
    1029     TryNode(StatementNode *b, FinallyNode *f)
    1030       : block(b), _catch(0), _final(f) {}
    1031     TryNode(StatementNode *b, CatchNode *c, FinallyNode *f)
    1032       : block(b), _catch(c), _final(f) {}
    1033     virtual Completion execute(ExecState *exec);
    1034     virtual void processVarDecls(ExecState *exec);
    1035     virtual void streamTo(SourceStream &s) const;
    1036   private:
    1037     SharedPtr<StatementNode> block;
    1038     SharedPtr<CatchNode> _catch;
    1039     SharedPtr<FinallyNode> _final;
     996    TryNode(StatementNode *b, const Identifier &e, StatementNode *c, StatementNode *f)
     997      : tryBlock(b), exceptionIdent(e), catchBlock(c), finallyBlock(f) { }
     998    virtual Completion execute(ExecState *exec);
     999    virtual void processVarDecls(ExecState *exec);
     1000    virtual void streamTo(SourceStream &s) const;
     1001  private:
     1002    SharedPtr<StatementNode> tryBlock;
     1003    Identifier exceptionIdent;
     1004    SharedPtr<StatementNode> catchBlock;
     1005    SharedPtr<StatementNode> finallyBlock;
    10401006  };
    10411007
     
    10701036    FuncExprNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b)
    10711037      : ident(i), param(p->next), body(b) { p->next = 0; }
    1072     ValueImp *evaluate(ExecState *exec);
    1073     virtual void streamTo(SourceStream &s) const;
    1074 
    1075   private:
    1076     friend class FuncDeclNode;
    1077 
     1038    virtual ValueImp *evaluate(ExecState *);
     1039    virtual void streamTo(SourceStream &) const;
     1040  private:
    10781041    Identifier ident;
    10791042    SharedPtr<ParameterNode> param;
     
    10871050    FuncDeclNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b)
    10881051      : ident(i), param(p->next), body(b) { p->next = 0; }
    1089     Completion execute(ExecState */*exec*/)
    1090       { /* empty */ return Completion(); }
    1091     void processFuncDecl(ExecState *exec);
    1092     virtual void streamTo(SourceStream &s) const;
     1052    virtual Completion execute(ExecState *);
     1053    virtual void processFuncDecl(ExecState *);
     1054    virtual void streamTo(SourceStream &) const;
    10931055  private:
    10941056    Identifier ident;
  • trunk/JavaScriptCore/kjs/nodes2string.cpp

    r10634 r10646  
    1 // -*- c-basic-offset: 2 -*-
    21/*
    32 *  This file is part of the KDE libraries
     
    665664}
    666665
    667 void CatchNode::streamTo(SourceStream &s) const
    668 {
    669   s << SourceStream::Endl << "catch (" << ident << ")" << block;
    670 }
    671 
    672 void FinallyNode::streamTo(SourceStream &s) const
    673 {
    674   s << SourceStream::Endl << "finally " << block;
    675 }
    676 
    677666void TryNode::streamTo(SourceStream &s) const
    678667{
    679   s << "try " << block
    680     << _catch
    681     << _final;
     668  s << "try " << tryBlock;
     669  if (catchBlock)
     670    s << SourceStream::Endl << "catch (" << exceptionIdent << ")" << catchBlock;
     671  if (finallyBlock)
     672    s << SourceStream::Endl << "finally " << finallyBlock;
    682673}
    683674
     
    689680}
    690681
    691 void FuncDeclNode::streamTo(SourceStream &s) const {
    692   s << "function " << ident << "(";
    693   if (param)
    694     s << param;
    695   s << ")" << body;
     682void FuncDeclNode::streamTo(SourceStream &s) const
     683{
     684  s << "function " << ident << "(" << param << ")" << body;
    696685}
    697686
    698687void FuncExprNode::streamTo(SourceStream &s) const
    699688{
    700   s << "function " << "("
    701     << param
    702     << ")" << body;
     689  s << "function " << ident << "(" << param << ")" << body;
    703690}
    704691
     
    708695    s << n->element;
    709696}
    710 
  • trunk/JavaScriptCore/tests/mozilla/expected.html

    r10621 r10646  
    88Test List: All tests<br>
    99Skip List: (none)<br>
    10 1116 test(s) selected, 1111 test(s) completed, 94 failures reported (8.46% failed)<br>
    11 Engine command line: /Users/mjs/Work/symroots/Development/testkjs <br>
    12 OS type: Darwin maciej-stachowiaks-powerbook-g4-17.local 8.3.0 Darwin Kernel Version 8.3.0: Fri Sep 16 11:56:43 PDT 2005; root:xnu-792.6.17.obj~1/RELEASE_PPC Power Macintosh powerpc<br>
    13 Testcase execution time: 5 minutes, 56 seconds.<br>
    14 Tests completed on Thu Sep 22 23:37:42 2005.<br><br>
     101116 test(s) selected, 1111 test(s) completed, 93 failures reported (8.37% failed)<br>
     11Engine command line: /Users/darin/symroots/Development/testkjs <br>
     12OS type: Darwin ap0101m-dhcp90.apple.com 8.3.0 Darwin Kernel Version 8.3.0: Fri Sep 16 11:56:43 PDT 2005; root:xnu-792.6.17.obj~1/RELEASE_PPC Power Macintosh powerpc<br>
     13Testcase execution time: 7 minutes, 54 seconds.<br>
     14Tests completed on Wed Sep 28 10:24:02 2005.<br><br>
    1515[ <a href='#fail_detail'>Failure Details</a> | <a href='#retest_list'>Retest List</a> | <a href='menu.html'>Test Selection Page</a> ]<br>
    1616<hr>
     
    106106--> (Mon Feb 28 2000 15:59:59 GMT-0800).toLocaleTimeString() = 3:59:59 PM PST FAILED! expected: 15:59:59<br>
    107107--> (Tue Feb 29 2000 00:00:00 GMT-0800).toLocaleTimeString() = 12:00:00 AM PST FAILED! expected: 00:00:00<br>
    108 --> (Thu Sep 22 2005 23:37:00 GMT-0700).toLocaleTimeString() = 11:37:00 PM PDT FAILED! expected: 23:37:00<br>
    109 --> (Fri Sep 23 2005 07:37:00 GMT-0700).toLocaleTimeString() = 7:37:00 AM PDT FAILED! expected: 07:37:00<br>
     108--> (Wed Sep 28 2005 10:22:52 GMT-0700).toLocaleTimeString() = 10:22:52 AM PDT FAILED! expected: 10:22:52<br>
     109--> (Wed Sep 28 2005 18:22:52 GMT-0700).toLocaleTimeString() = 6:22:52 PM PDT FAILED! expected: 18:22:52<br>
    110110--> (Fri Dec 31 2004 16:00:00 GMT-0800).toLocaleTimeString() = 4:00:00 PM PST FAILED! expected: 16:00:00<br>
    111111--> (Fri Dec 31 2004 15:59:59 GMT-0800).toLocaleTimeString() = 3:59:59 PM PST FAILED! expected: 15:59:59<br>
     
    117117Testcase terminated with signal 0<br>
    118118Complete testcase output was:<br>
    119 --> STATUS: Function Expression Statements basic test.<br>
    120 Exception, line 35: ReferenceError: Can't find variable: f<br>
     119Exception, line 26: SyntaxError: Parse error<br>
    121120</tt><br>
    122121<a name='failure10'></a><dd><b>Testcase <a target='other_window' href='./ecma_3/Function/regress-58274.js'>ecma_3/Function/regress-58274.js</a> failed</b> <br>
     
    352351--> FAILED!: Section 4 of test -<br>
    353352--> FAILED!: regexp = /[        ]*(?:\([^\\€-ÿ<br>
    354 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    355 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    356 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    357 --> FAILED!: ()]*)*\)[  ]*)*(?:(?:[^( <>@,;:".\\\[\]<br>
    358 --> FAILED!: "]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    359 --> FAILED!: "]*)*")[^()<>@,;:".\\\[\]€-ÿ<br>
     353--> FAILED!:
     354()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     355--> FAILED!:
     356()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     357--> FAILED!:
     358()]*)*\))[^\\€-ÿ<br>
     359--> FAILED!:
     360()]*)*\)[       ]*)*(?:(?:[^( <>@,;:".\\\[\]<br>
     361--> FAILED!:
     362"]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     363--> FAILED!:
     364"]*)*")[^()<>@,;:".\\\[\]€-ÿ<br>
    360365--> FAILED!: -]*(?:(?:\([^\\€-ÿ<br>
    361 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    362 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    363 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    364 --> FAILED!: ()]*)*\)|"[^\\€-ÿ<br>
    365 --> FAILED!: "]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    366 --> FAILED!: "]*)*")[^()<>@,;:".\\\[\]€-ÿ<br>
     366--> FAILED!:
     367()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     368--> FAILED!:
     369()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     370--> FAILED!:
     371()]*)*\))[^\\€-ÿ<br>
     372--> FAILED!:
     373()]*)*\)|"[^\\€-ÿ<br>
     374--> FAILED!:
     375"]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     376--> FAILED!:
     377"]*)*")[^()<>@,;:".\\\[\]€-ÿ<br>
    367378--> FAILED!: -]*)*<[   ]*(?:\([^\\€-ÿ<br>
    368 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    369 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    370 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    371 --> FAILED!: ()]*)*\)[  ]*)*(?:@[       ]*(?:\([^\\€-ÿ<br>
    372 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    373 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    374 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    375 --> FAILED!: ()]*)*\)[  ]*)*(?:[^( <>@,;:".\\\[\]<br>
    376 --> FAILED!: \[\]]|\\[^€-ÿ])*\])[       ]*(?:\([^\\€-ÿ<br>
    377 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    378 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    379 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    380 --> FAILED!: ()]*)*\)[  ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
    381 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    382 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    383 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    384 --> FAILED!: ()]*)*\)[  ]*)*(?:[^( <>@,;:".\\\[\]<br>
    385 --> FAILED!: \[\]]|\\[^€-ÿ])*\])[       ]*(?:\([^\\€-ÿ<br>
    386 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    387 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    388 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    389 --> FAILED!: ()]*)*\)[  ]*)*)*(?:,[     ]*(?:\([^\\€-ÿ<br>
    390 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    391 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    392 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    393 --> FAILED!: ()]*)*\)[  ]*)*@[  ]*(?:\([^\\€-ÿ<br>
    394 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    395 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    396 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    397 --> FAILED!: ()]*)*\)[  ]*)*(?:[^( <>@,;:".\\\[\]<br>
    398 --> FAILED!: \[\]]|\\[^€-ÿ])*\])[       ]*(?:\([^\\€-ÿ<br>
    399 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    400 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    401 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    402 --> FAILED!: ()]*)*\)[  ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
    403 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    404 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    405 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    406 --> FAILED!: ()]*)*\)[  ]*)*(?:[^( <>@,;:".\\\[\]<br>
    407 --> FAILED!: \[\]]|\\[^€-ÿ])*\])[       ]*(?:\([^\\€-ÿ<br>
    408 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    409 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    410 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    411 --> FAILED!: ()]*)*\)[  ]*)*)*)*:[      ]*(?:\([^\\€-ÿ<br>
    412 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    413 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    414 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    415 --> FAILED!: ()]*)*\)[  ]*)*)?(?:[^( <>@,;:".\\\[\]<br>
    416 --> FAILED!: "]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    417 --> FAILED!: "]*)*")[   ]*(?:\([^\\€-ÿ<br>
    418 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    419 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    420 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    421 --> FAILED!: ()]*)*\)[  ]*)*@[  ]*(?:\([^\\€-ÿ<br>
    422 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    423 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    424 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    425 --> FAILED!: ()]*)*\)[  ]*)*(?:[^( <>@,;:".\\\[\]<br>
    426 --> FAILED!: \[\]]|\\[^€-ÿ])*\])[       ]*(?:\([^\\€-ÿ<br>
    427 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    428 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    429 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    430 --> FAILED!: ()]*)*\)[  ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
    431 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    432 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    433 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    434 --> FAILED!: ()]*)*\)[  ]*)*(?:[^( <>@,;:".\\\[\]<br>
    435 --> FAILED!: \[\]]|\\[^€-ÿ])*\])[       ]*(?:\([^\\€-ÿ<br>
    436 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    437 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    438 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    439 --> FAILED!: ()]*)*\)[  ]*)*)*>|(?:[^( <>@,;:".\\\[\]<br>
    440 --> FAILED!: "]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    441 --> FAILED!: "]*)*")[   ]*(?:\([^\\€-ÿ<br>
    442 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    443 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    444 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    445 --> FAILED!: ()]*)*\)[  ]*)*@[  ]*(?:\([^\\€-ÿ<br>
    446 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    447 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    448 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    449 --> FAILED!: ()]*)*\)[  ]*)*(?:[^( <>@,;:".\\\[\]<br>
    450 --> FAILED!: \[\]]|\\[^€-ÿ])*\])[       ]*(?:\([^\\€-ÿ<br>
    451 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    452 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    453 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    454 --> FAILED!: ()]*)*\)[  ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
    455 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    456 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    457 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    458 --> FAILED!: ()]*)*\)[  ]*)*(?:[^( <>@,;:".\\\[\]<br>
    459 --> FAILED!: \[\]]|\\[^€-ÿ])*\])[       ]*(?:\([^\\€-ÿ<br>
    460 --> FAILED!: ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    461 --> FAILED!: ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    462 --> FAILED!: ()]*)*\))[^\\€-ÿ<br>
    463 --> FAILED!: ()]*)*\)[  ]*)*)*)/g<br>
     379--> FAILED!:
     380()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     381--> FAILED!:
     382()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     383--> FAILED!:
     384()]*)*\))[^\\€-ÿ<br>
     385--> FAILED!:
     386()]*)*\)[       ]*)*(?:@[       ]*(?:\([^\\€-ÿ<br>
     387--> FAILED!:
     388()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     389--> FAILED!:
     390()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     391--> FAILED!:
     392()]*)*\))[^\\€-ÿ<br>
     393--> FAILED!:
     394()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
     395--> FAILED!:
     396\[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
     397--> FAILED!:
     398()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     399--> FAILED!:
     400()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     401--> FAILED!:
     402()]*)*\))[^\\€-ÿ<br>
     403--> FAILED!:
     404()]*)*\)[       ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
     405--> FAILED!:
     406()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     407--> FAILED!:
     408()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     409--> FAILED!:
     410()]*)*\))[^\\€-ÿ<br>
     411--> FAILED!:
     412()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
     413--> FAILED!:
     414\[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
     415--> FAILED!:
     416()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     417--> FAILED!:
     418()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     419--> FAILED!:
     420()]*)*\))[^\\€-ÿ<br>
     421--> FAILED!:
     422()]*)*\)[       ]*)*)*(?:,[     ]*(?:\([^\\€-ÿ<br>
     423--> FAILED!:
     424()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     425--> FAILED!:
     426()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     427--> FAILED!:
     428()]*)*\))[^\\€-ÿ<br>
     429--> FAILED!:
     430()]*)*\)[       ]*)*@[  ]*(?:\([^\\€-ÿ<br>
     431--> FAILED!:
     432()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     433--> FAILED!:
     434()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     435--> FAILED!:
     436()]*)*\))[^\\€-ÿ<br>
     437--> FAILED!:
     438()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
     439--> FAILED!:
     440\[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
     441--> FAILED!:
     442()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     443--> FAILED!:
     444()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     445--> FAILED!:
     446()]*)*\))[^\\€-ÿ<br>
     447--> FAILED!:
     448()]*)*\)[       ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
     449--> FAILED!:
     450()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     451--> FAILED!:
     452()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     453--> FAILED!:
     454()]*)*\))[^\\€-ÿ<br>
     455--> FAILED!:
     456()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
     457--> FAILED!:
     458\[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
     459--> FAILED!:
     460()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     461--> FAILED!:
     462()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     463--> FAILED!:
     464()]*)*\))[^\\€-ÿ<br>
     465--> FAILED!:
     466()]*)*\)[       ]*)*)*)*:[      ]*(?:\([^\\€-ÿ<br>
     467--> FAILED!:
     468()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     469--> FAILED!:
     470()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     471--> FAILED!:
     472()]*)*\))[^\\€-ÿ<br>
     473--> FAILED!:
     474()]*)*\)[       ]*)*)?(?:[^( <>@,;:".\\\[\]<br>
     475--> FAILED!:
     476"]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     477--> FAILED!:
     478"]*)*")[        ]*(?:\([^\\€-ÿ<br>
     479--> FAILED!:
     480()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     481--> FAILED!:
     482()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     483--> FAILED!:
     484()]*)*\))[^\\€-ÿ<br>
     485--> FAILED!:
     486()]*)*\)[       ]*)*@[  ]*(?:\([^\\€-ÿ<br>
     487--> FAILED!:
     488()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     489--> FAILED!:
     490()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     491--> FAILED!:
     492()]*)*\))[^\\€-ÿ<br>
     493--> FAILED!:
     494()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
     495--> FAILED!:
     496\[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
     497--> FAILED!:
     498()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     499--> FAILED!:
     500()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     501--> FAILED!:
     502()]*)*\))[^\\€-ÿ<br>
     503--> FAILED!:
     504()]*)*\)[       ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
     505--> FAILED!:
     506()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     507--> FAILED!:
     508()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     509--> FAILED!:
     510()]*)*\))[^\\€-ÿ<br>
     511--> FAILED!:
     512()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
     513--> FAILED!:
     514\[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
     515--> FAILED!:
     516()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     517--> FAILED!:
     518()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     519--> FAILED!:
     520()]*)*\))[^\\€-ÿ<br>
     521--> FAILED!:
     522()]*)*\)[       ]*)*)*>|(?:[^( <>@,;:".\\\[\]<br>
     523--> FAILED!:
     524"]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     525--> FAILED!:
     526"]*)*")[        ]*(?:\([^\\€-ÿ<br>
     527--> FAILED!:
     528()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     529--> FAILED!:
     530()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     531--> FAILED!:
     532()]*)*\))[^\\€-ÿ<br>
     533--> FAILED!:
     534()]*)*\)[       ]*)*@[  ]*(?:\([^\\€-ÿ<br>
     535--> FAILED!:
     536()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     537--> FAILED!:
     538()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     539--> FAILED!:
     540()]*)*\))[^\\€-ÿ<br>
     541--> FAILED!:
     542()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
     543--> FAILED!:
     544\[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
     545--> FAILED!:
     546()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     547--> FAILED!:
     548()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     549--> FAILED!:
     550()]*)*\))[^\\€-ÿ<br>
     551--> FAILED!:
     552()]*)*\)[       ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
     553--> FAILED!:
     554()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     555--> FAILED!:
     556()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     557--> FAILED!:
     558()]*)*\))[^\\€-ÿ<br>
     559--> FAILED!:
     560()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
     561--> FAILED!:
     562\[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
     563--> FAILED!:
     564()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
     565--> FAILED!:
     566()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
     567--> FAILED!:
     568()]*)*\))[^\\€-ÿ<br>
     569--> FAILED!:
     570()]*)*\)[       ]*)*)*)/g<br>
    464571--> FAILED!: string = 'Jeffy<"That Tall Guy"@ora.com (this address is no longer acti\ve)>'<br>
    465572--> FAILED!: ERROR !!! regexp FAILED to match anything !!!<br>
     
    672779--> FAILED!: [reported from test()] Actual: ["1.000,00", "", ",00"]<br>
    673780--> FAILED!: [reported from test()] <br>
    674 </tt><br>
    675 <a name='failure21'></a><dd><b>Testcase <a target='other_window' href='./ecma_3/RegExp/regress-72964.js'>ecma_3/RegExp/regress-72964.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=72964' target='other_window'>Bug Number 72964</a><br>
    676  [ <a href='#failure20'>Previous Failure</a> | <a href='#failure22'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    677 <tt>--> STATUS: Testing regular expressions containing non-Latin1 characters<br>
    678 Failure messages were:<br>
    679 --> FAILED!: [reported from test()] Section 3 of test -<br>
    680 --> FAILED!: [reported from test()] regexp = /[\S]+/<br>
    681 --> FAILED!: [reported from test()] string = '<br>
    682 --> FAILED!: [reported from test()] ERROR !!! regexp FAILED to match anything !!!<br>
    683 --> FAILED!: [reported from test()] Expect: ["<br>
    684 --> FAILED!: [reported from test()] Actual: null<br>
    685 --> FAILED!: [reported from test()] <br>
    686 --> FAILED!: [reported from test()] Section 4 of test -<br>
    687 --> FAILED!: [reported from test()] regexp = /[\S]+/<br>
    688 --> FAILED!: [reported from test()] string = '<br>
    689 --> FAILED!: [reported from test()] ERROR !!! regexp FAILED to match anything !!!<br>
    690 --> FAILED!: [reported from test()] Expect: ["<br>
    691 --> FAILED!: [reported from test()] Actual: null<br>
    692 --> FAILED!: [reported from test()] <br>
    693 </tt><br>
    694 <a name='failure22'></a><dd><b>Testcase <a target='other_window' href='./ecma_3/RegExp/regress-78156.js'>ecma_3/RegExp/regress-78156.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=78156' target='other_window'>Bug Number 78156</a><br>
    695  [ <a href='#failure21'>Previous Failure</a> | <a href='#failure23'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    696 <tt>--> STATUS: Testing regular expressions with  ^, $, and the m flag -<br>
    697 Failure messages were:<br>
    698 --> FAILED!: [reported from test()] Section 2 of test -<br>
    699 --> FAILED!: [reported from test()] regexp = /\d$/gm<br>
    700 --> FAILED!: [reported from test()] string = 'aaa\n789\r\nccc\r\n345'<br>
    701 --> FAILED!: [reported from test()] ERROR !!! match arrays have different lengths:<br>
    702 --> FAILED!: [reported from test()] Expect: ["9", "5"]<br>
    703 --> FAILED!: [reported from test()] Actual: ["5"]<br>
    704 --> FAILED!: [reported from test()] <br>
    705 --> FAILED!: [reported from test()] Section 4 of test -<br>
    706 --> FAILED!: [reported from test()] regexp = /\d$/gm<br>
    707 --> FAILED!: [reported from test()] string = 'aaa\n789\r\nccc\r\nddd'<br>
    708 --> FAILED!: [reported from test()] ERROR !!! regexp FAILED to match anything !!!<br>
    709 --> FAILED!: [reported from test()] Expect: ["9"]<br>
    710 --> FAILED!: [reported from test()] Actual: null<br>
    711 --> FAILED!: [reported from test()] <br>
    712 </tt><br>
    713 <a name='failure23'></a><dd><b>Testcase <a target='other_window' href='./ecma_3/RegExp/regress-85721.js'>ecma_3/RegExp/regress-85721.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=85721' target='other_window'>Bug Number 85721</a><br>
    714  [ <a href='#failure22'>Previous Failure</a> | <a href='#failure24'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    715 <tt>--> STATUS: Performance: execution of regular expression<br>
    716 Failure messages were:<br>
    717 --> FAILED!: Section 4 of test -<br>
    718 --> FAILED!: regexp = /[        ]*(?:\([^\\€-ÿ<br>
    719 --> FAILED!:
    720 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    721 --> FAILED!:
    722 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    723 --> FAILED!:
    724 ()]*)*\))[^\\€-ÿ<br>
    725 --> FAILED!:
    726 ()]*)*\)[       ]*)*(?:(?:[^( <>@,;:".\\\[\]<br>
    727 --> FAILED!:
    728 "]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    729 --> FAILED!:
    730 "]*)*")[^()<>@,;:".\\\[\]€-ÿ<br>
    731 --> FAILED!: -]*(?:(?:\([^\\€-ÿ<br>
    732 --> FAILED!:
    733 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    734 --> FAILED!:
    735 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    736 --> FAILED!:
    737 ()]*)*\))[^\\€-ÿ<br>
    738 --> FAILED!:
    739 ()]*)*\)|"[^\\€-ÿ<br>
    740 --> FAILED!:
    741 "]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    742 --> FAILED!:
    743 "]*)*")[^()<>@,;:".\\\[\]€-ÿ<br>
    744 --> FAILED!: -]*)*<[   ]*(?:\([^\\€-ÿ<br>
    745 --> FAILED!:
    746 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    747 --> FAILED!:
    748 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    749 --> FAILED!:
    750 ()]*)*\))[^\\€-ÿ<br>
    751 --> FAILED!:
    752 ()]*)*\)[       ]*)*(?:@[       ]*(?:\([^\\€-ÿ<br>
    753 --> FAILED!:
    754 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    755 --> FAILED!:
    756 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    757 --> FAILED!:
    758 ()]*)*\))[^\\€-ÿ<br>
    759 --> FAILED!:
    760 ()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
    761 --> FAILED!:
    762 \[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
    763 --> FAILED!:
    764 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    765 --> FAILED!:
    766 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    767 --> FAILED!:
    768 ()]*)*\))[^\\€-ÿ<br>
    769 --> FAILED!:
    770 ()]*)*\)[       ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
    771 --> FAILED!:
    772 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    773 --> FAILED!:
    774 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    775 --> FAILED!:
    776 ()]*)*\))[^\\€-ÿ<br>
    777 --> FAILED!:
    778 ()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
    779 --> FAILED!:
    780 \[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
    781 --> FAILED!:
    782 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    783 --> FAILED!:
    784 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    785 --> FAILED!:
    786 ()]*)*\))[^\\€-ÿ<br>
    787 --> FAILED!:
    788 ()]*)*\)[       ]*)*)*(?:,[     ]*(?:\([^\\€-ÿ<br>
    789 --> FAILED!:
    790 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    791 --> FAILED!:
    792 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    793 --> FAILED!:
    794 ()]*)*\))[^\\€-ÿ<br>
    795 --> FAILED!:
    796 ()]*)*\)[       ]*)*@[  ]*(?:\([^\\€-ÿ<br>
    797 --> FAILED!:
    798 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    799 --> FAILED!:
    800 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    801 --> FAILED!:
    802 ()]*)*\))[^\\€-ÿ<br>
    803 --> FAILED!:
    804 ()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
    805 --> FAILED!:
    806 \[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
    807 --> FAILED!:
    808 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    809 --> FAILED!:
    810 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    811 --> FAILED!:
    812 ()]*)*\))[^\\€-ÿ<br>
    813 --> FAILED!:
    814 ()]*)*\)[       ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
    815 --> FAILED!:
    816 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    817 --> FAILED!:
    818 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    819 --> FAILED!:
    820 ()]*)*\))[^\\€-ÿ<br>
    821 --> FAILED!:
    822 ()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
    823 --> FAILED!:
    824 \[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
    825 --> FAILED!:
    826 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    827 --> FAILED!:
    828 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    829 --> FAILED!:
    830 ()]*)*\))[^\\€-ÿ<br>
    831 --> FAILED!:
    832 ()]*)*\)[       ]*)*)*)*:[      ]*(?:\([^\\€-ÿ<br>
    833 --> FAILED!:
    834 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    835 --> FAILED!:
    836 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    837 --> FAILED!:
    838 ()]*)*\))[^\\€-ÿ<br>
    839 --> FAILED!:
    840 ()]*)*\)[       ]*)*)?(?:[^( <>@,;:".\\\[\]<br>
    841 --> FAILED!:
    842 "]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    843 --> FAILED!:
    844 "]*)*")[        ]*(?:\([^\\€-ÿ<br>
    845 --> FAILED!:
    846 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    847 --> FAILED!:
    848 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    849 --> FAILED!:
    850 ()]*)*\))[^\\€-ÿ<br>
    851 --> FAILED!:
    852 ()]*)*\)[       ]*)*@[  ]*(?:\([^\\€-ÿ<br>
    853 --> FAILED!:
    854 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    855 --> FAILED!:
    856 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    857 --> FAILED!:
    858 ()]*)*\))[^\\€-ÿ<br>
    859 --> FAILED!:
    860 ()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
    861 --> FAILED!:
    862 \[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
    863 --> FAILED!:
    864 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    865 --> FAILED!:
    866 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    867 --> FAILED!:
    868 ()]*)*\))[^\\€-ÿ<br>
    869 --> FAILED!:
    870 ()]*)*\)[       ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
    871 --> FAILED!:
    872 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    873 --> FAILED!:
    874 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    875 --> FAILED!:
    876 ()]*)*\))[^\\€-ÿ<br>
    877 --> FAILED!:
    878 ()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
    879 --> FAILED!:
    880 \[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
    881 --> FAILED!:
    882 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    883 --> FAILED!:
    884 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    885 --> FAILED!:
    886 ()]*)*\))[^\\€-ÿ<br>
    887 --> FAILED!:
    888 ()]*)*\)[       ]*)*)*>|(?:[^( <>@,;:".\\\[\]<br>
    889 --> FAILED!:
    890 "]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    891 --> FAILED!:
    892 "]*)*")[        ]*(?:\([^\\€-ÿ<br>
    893 --> FAILED!:
    894 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    895 --> FAILED!:
    896 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    897 --> FAILED!:
    898 ()]*)*\))[^\\€-ÿ<br>
    899 --> FAILED!:
    900 ()]*)*\)[       ]*)*@[  ]*(?:\([^\\€-ÿ<br>
    901 --> FAILED!:
    902 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    903 --> FAILED!:
    904 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    905 --> FAILED!:
    906 ()]*)*\))[^\\€-ÿ<br>
    907 --> FAILED!:
    908 ()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
    909 --> FAILED!:
    910 \[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
    911 --> FAILED!:
    912 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    913 --> FAILED!:
    914 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    915 --> FAILED!:
    916 ()]*)*\))[^\\€-ÿ<br>
    917 --> FAILED!:
    918 ()]*)*\)[       ]*)*(?:.[       ]*(?:\([^\\€-ÿ<br>
    919 --> FAILED!:
    920 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    921 --> FAILED!:
    922 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    923 --> FAILED!:
    924 ()]*)*\))[^\\€-ÿ<br>
    925 --> FAILED!:
    926 ()]*)*\)[       ]*)*(?:[^( <>@,;:".\\\[\]<br>
    927 --> FAILED!:
    928 \[\]]|\\[^€-ÿ])*\])[    ]*(?:\([^\\€-ÿ<br>
    929 --> FAILED!:
    930 ()]*(?:(?:\\[^€-ÿ]|\([^\\€-ÿ<br>
    931 --> FAILED!:
    932 ()]*(?:\\[^€-ÿ][^\\€-ÿ<br>
    933 --> FAILED!:
    934 ()]*)*\))[^\\€-ÿ<br>
    935 --> FAILED!:
    936 ()]*)*\)[       ]*)*)*)/g<br>
    937 --> FAILED!: string = 'Jeffy<"That Tall Guy"@ora.com (this address is no longer acti\ve)>'<br>
    938 --> FAILED!: ERROR !!! regexp FAILED to match anything !!!<br>
    939 --> FAILED!: Expect: ["Jeffy<"That Tall Guy"@ora.com (this address is no longer active)>"]<br>
    940 --> FAILED!: Actual: null<br>
    941 --> FAILED!: <br>
    942781</tt><br>
    943782<a name='failure24'></a><dd><b>Testcase <a target='other_window' href='./ecma_3/Statements/regress-194364.js'>ecma_3/Statements/regress-194364.js</a> failed</b> <br>
     
    14781317Exception, line 351: SyntaxError: Parse error<br>
    14791318</tt><br>
    1480 <a name='failure86'></a><dd><b>Testcase <a target='other_window' href='./js1_5/Regress/regress-114491.js'>js1_5/Regress/regress-114491.js</a> failed</b> <a href='http://bugzilla.mozilla.org/show_bug.cgi?id=114491' target='other_window'>Bug Number 114491</a><br>
     1319<a name='failure86'></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>
    14811320 [ <a href='#failure85'>Previous Failure</a> | <a href='#failure87'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    1482 <tt>--> STATUS: Regression test for bug 114491<br>
    1483 Failure messages were:<br>
    1484 --> FAILED!: [reported from test()] Section 1 of test -<br>
    1485 --> FAILED!: [reported from test()] Expected value 'Program execution fell into into catch-block', Actual value 'Program execution did NOT fall into catch-block'<br>
    1486 --> FAILED!: [reported from test()] <br>
    1487 </tt><br>
    1488 <a name='failure87'></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>
     1321<tt>Expected exit code 0, got 3<br>
     1322Testcase terminated with signal 0<br>
     1323Complete testcase output was:<br>
     1324Exception, line 76: ReferenceError: Can't find variable: clone<br>
     1325</tt><br>
     1326<a name='failure87'></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>
    14891327 [ <a href='#failure86'>Previous Failure</a> | <a href='#failure88'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    14901328<tt>Expected exit code 0, got 3<br>
    14911329Testcase terminated with signal 0<br>
    14921330Complete testcase output was:<br>
    1493 Exception, line 76: ReferenceError: Can't find variable: clone<br>
    1494 </tt><br>
    1495 <a name='failure88'></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>
     1331Exception, line 56: TypeError: Value undefined (result of expression this.propertyIsEnumerable) is not object.<br>
     1332</tt><br>
     1333<a name='failure88'></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>
    14961334 [ <a href='#failure87'>Previous Failure</a> | <a href='#failure89'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    14971335<tt>Expected exit code 0, got 3<br>
    14981336Testcase terminated with signal 0<br>
    14991337Complete testcase output was:<br>
    1500 Exception, line 56: TypeError: Value undefined (result of expression this.propertyIsEnumerable) is not object.<br>
    1501 </tt><br>
    1502 <a name='failure89'></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>
     1338Exception, line 62: URIError: URI error<br>
     1339</tt><br>
     1340<a name='failure89'></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>
    15031341 [ <a href='#failure88'>Previous Failure</a> | <a href='#failure90'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    1504 <tt>Expected exit code 0, got 3<br>
    1505 Testcase terminated with signal 0<br>
    1506 Complete testcase output was:<br>
    1507 Exception, line 62: URIError: URI error<br>
    1508 </tt><br>
    1509 <a name='failure90'></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>
    1510  [ <a href='#failure89'>Previous Failure</a> | <a href='#failure91'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    15111342<tt>--> STATUS: Don't crash on extraneous arguments to str.match(), etc.<br>
    15121343Failure messages were:<br>
     
    15581389--> FAILED!: [reported from test()] <br>
    15591390</tt><br>
    1560 <a name='failure91'></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>
    1561  [ <a href='#failure90'>Previous Failure</a> | <a href='#failure92'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
     1391<a name='failure90'></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>
     1392 [ <a href='#failure89'>Previous Failure</a> | <a href='#failure91'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    15621393<tt>Expected exit code 0, got 3<br>
    15631394Testcase terminated with signal 0<br>
     
    15661397Exception, line 3: SyntaxError: Parse error<br>
    15671398</tt><br>
    1568 <a name='failure92'></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>
    1569  [ <a href='#failure91'>Previous Failure</a> | <a href='#failure93'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
     1399<a name='failure91'></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>
     1400 [ <a href='#failure90'>Previous Failure</a> | <a href='#failure92'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    15701401<tt>--> STATUS: Testing |with (x) {function f() {}}| when |x.f| already exists<br>
    15711402Failure messages were:<br>
     
    15821413--> FAILED!: [reported from test()] <br>
    15831414</tt><br>
    1584 <a name='failure93'></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>
     1415<a name='failure92'></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>
     1416 [ <a href='#failure91'>Previous Failure</a> | <a href='#failure93'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
     1417<tt>Expected exit code 0, got 3<br>
     1418Testcase terminated with signal 0<br>
     1419Complete testcase output was:<br>
     1420Exception, line 57: ReferenceError: Can't find variable: Script<br>
     1421</tt><br>
     1422<a name='failure93'></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>
    15851423 [ <a href='#failure92'>Previous Failure</a> | <a href='#failure94'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    1586 <tt>Expected exit code 0, got 3<br>
    1587 Testcase terminated with signal 0<br>
    1588 Complete testcase output was:<br>
    1589 Exception, line 57: ReferenceError: Can't find variable: Script<br>
    1590 </tt><br>
    1591 <a name='failure94'></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>
    1592  [ <a href='#failure93'>Previous Failure</a> | <a href='#failure95'>Next Failure</a> | <a href='#tippy_top'>Top of Page</a> ]<br>
    15931424<tt>--> STATUS: Testing scope after changing obj.__proto__<br>
    15941425Failure messages were:<br>
     
    16071438<a name='retest_list'></a>
    16081439<h2>Retest List</h2><br>
    1609 # Retest List, kjs, generated Thu Sep 22 23:37:42 2005.
     1440# Retest List, kjs, generated Wed Sep 28 10:24:02 2005.
    16101441# Original test base was: All tests.
    1611 # 1111 of 1116 test(s) were completed, 94 failures reported.
     1442# 1111 of 1116 test(s) were completed, 93 failures reported.
    16121443ecma/Date/15.9.5.28-1.js
    16131444ecma/GlobalObject/15.1.2.2-2.js
     
    16951526js1_5/Regress/regress-103602.js
    16961527js1_5/Regress/regress-104077.js
    1697 js1_5/Regress/regress-114491.js
    16981528js1_5/Regress/regress-127557.js
    16991529js1_5/Regress/regress-156354.js
Note: See TracChangeset for help on using the changeset viewer.