1. 25 Oct, 2013 1 commit
    • oliver@apple.com's avatar
      Improve JSC Parser error messages · 039f9247
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123341
      
      Reviewed by Andreas Kling.
      
      Source/JavaScriptCore:
      
      This patch moves away from the current cludgy mechanisms used to produce
      error messages and moves to something closer to case by case errors.
      
      This results in a large change size as previously we may just have
      'failIfFalse(foo)', but now the logic becomes either
      'failIfFalseWithMessage(foo, "Cannot do blah with ", foo->thing())'
      Or alternatively
      
      if (!foo)
          check for 'interesting' errors, before falling back to generic error
      
      This means that this patch is large, but produces no semantic changes, and
      only hits slow (e.g. error) paths.
      
      * parser/Parser.cpp:
      (JSC::::Parser):
      (JSC::::parseSourceElements):
      (JSC::::parseVarDeclaration):
      (JSC::::parseConstDeclaration):
      (JSC::::parseDoWhileStatement):
      (JSC::::parseWhileStatement):
      (JSC::::parseVarDeclarationList):
      (JSC::::createBindingPattern):
      (JSC::::parseDeconstructionPattern):
      (JSC::::parseConstDeclarationList):
      (JSC::::parseForStatement):
      (JSC::::parseBreakStatement):
      (JSC::::parseContinueStatement):
      (JSC::::parseReturnStatement):
      (JSC::::parseThrowStatement):
      (JSC::::parseWithStatement):
      (JSC::::parseSwitchStatement):
      (JSC::::parseSwitchClauses):
      (JSC::::parseSwitchDefaultClause):
      (JSC::::parseTryStatement):
      (JSC::::parseDebuggerStatement):
      (JSC::::parseBlockStatement):
      (JSC::::parseStatement):
      (JSC::::parseFormalParameters):
      (JSC::::parseFunctionBody):
      (JSC::stringForFunctionMode):
      (JSC::::parseFunctionInfo):
      (JSC::::parseFunctionDeclaration):
      (JSC::::parseExpressionOrLabelStatement):
      (JSC::::parseExpressionStatement):
      (JSC::::parseIfStatement):
      (JSC::::parseExpression):
      (JSC::::parseAssignmentExpression):
      (JSC::::parseConditionalExpression):
      (JSC::::parseBinaryExpression):
      (JSC::::parseProperty):
      (JSC::::parseObjectLiteral):
      (JSC::::parseStrictObjectLiteral):
      (JSC::::parseArrayLiteral):
      (JSC::::parsePrimaryExpression):
      (JSC::::parseArguments):
      (JSC::::parseMemberExpression):
      (JSC::operatorString):
      (JSC::::parseUnaryExpression):
      (JSC::::printUnexpectedTokenText):
      * parser/Parser.h:
      (JSC::Scope::hasDeclaredVariable):
      (JSC::Scope::hasDeclaredParameter):
      (JSC::Parser::hasDeclaredVariable):
      (JSC::Parser::hasDeclaredParameter):
      (JSC::Parser::setErrorMessage):
      
      LayoutTests:
      
      Update a vast array of layout test results
      
      * fast/events/window-onerror5-expected.txt:
      * js/basic-strict-mode-expected.txt:
      * js/break-ASI-expected.txt:
      * js/dom/assign-expected.txt:
      * js/dom/object-extra-comma-expected.txt:
      * js/dom/parse-error-external-script-in-eval-expected.txt:
      * js/dom/parse-error-external-script-in-new-Function-expected.txt:
      * js/dom/reserved-words-as-property-expected.txt:
      * js/function-constructor-error-expected.txt:
      * js/function-declaration-expected.txt:
      * js/function-toString-object-literals-expected.txt:
      * js/function-toString-parentheses-expected.txt:
      * js/js-continue-break-restrictions-expected.txt:
      * js/kde/garbage-n-expected.txt:
      * js/kde/parse-expected.txt:
      * js/no-semi-insertion-at-end-of-script-expected.txt:
      * js/object-literal-syntax-expected.txt:
      * js/parser-xml-close-comment-expected.txt:
      * js/regexp-compile-crash-expected.txt:
      * js/script-tests/function-constructor-error.js:
      * js/script-tests/reserved-words-strict.js:
      (isReserved):
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.1_T2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.1_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.2_T2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.2_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.3_T2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.4_T2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A4_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A4_T4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.10-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.12-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.13-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.14-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.16-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.17-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.20-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.22-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.24-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.25-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.5-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.8-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.9-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.10-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.11-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.16-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.27-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.5-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.6-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.7-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.9-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.2_T2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.3_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.3_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.5_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.5_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.2_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.3_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.3_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.5_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.5_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T7-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T8-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T9-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/7.9.2_Examples/S7.9.2_A1_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/7.9.2_Examples/S7.9.2_A1_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/7.9.2_Examples/S7.9.2_A1_T6-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A10_T4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A10_T8-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A11_T4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A11_T8-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T5-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T6-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T8-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T9-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T5-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T6-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T7-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.4_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A9_T6-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A9_T7-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A9_T8-expected.txt:
      * sputnik/Conformance/08_Types/8.2_The_Null_Type/S8.2_A2-expected.txt:
      * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T3-expected.txt:
      * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T3-expected.txt:
      * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.1_Postfix_Increment_Operator/S11.3.1_A1.1_T1-expected.txt:
      * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.1_Postfix_Increment_Operator/S11.3.1_A1.1_T2-expected.txt:
      * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.1_Postfix_Increment_Operator/S11.3.1_A1.1_T3-expected.txt:
      * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.1_Postfix_Increment_Operator/S11.3.1_A1.1_T4-expected.txt:
      * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.2_Postfix_Decrement_Operator/S11.3.2_A1.1_T1-expected.txt:
      * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.2_Postfix_Decrement_Operator/S11.3.2_A1.1_T2-expected.txt:
      * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.2_Postfix_Decrement_Operator/S11.3.2_A1.1_T3-expected.txt:
      * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.2_Postfix_Decrement_Operator/S11.3.2_A1.1_T4-expected.txt:
      * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A2_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A3_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A3_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A3_T5-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T10-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T11-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T12-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T13-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T14-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T15-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T4-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T5-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T6-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T7-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T8-expected.txt:
      * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T9-expected.txt:
      * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T4-expected.txt:
      * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T5-expected.txt:
      * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T6-expected.txt:
      * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T7-expected.txt:
      * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T8-expected.txt:
      * sputnik/Conformance/12_Statement/12.4_Expression_Statement/S12.4_A1-expected.txt:
      * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A11-expected.txt:
      * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A12-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A15-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T4-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T5-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T6-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A13_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A15-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T4-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T5-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T6-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A11.1_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A11_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A12.1_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A12_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A4.1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A4_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A4_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A7.1_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A7.1_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A7_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A7_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8.1_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8.1_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8.1_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A13_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A1_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A1_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A1_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A1_T4-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A5_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A5_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A5_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A6-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A8_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A8_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A1_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A1_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A1_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A1_T4-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A5_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A5_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A5_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A6-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A8_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A8_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T10-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T4-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T5-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T6-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T7-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T8-expected.txt:
      * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T9-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/15.1.2/15.1.2.1_eval/S15.1.2.1_A2_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/15.3.4.2_Function.prototype.toString/S15.3.4.2_A1_T1-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      039f9247
  2. 04 Oct, 2013 1 commit
  3. 02 Oct, 2013 1 commit
  4. 01 Oct, 2013 1 commit
    • fpizlo@apple.com's avatar
      REGRESSION(156464): 50% regression on SunSpider/string-fasta · 4d456e7b
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122202
      
      Source/JavaScriptCore: 
      
      Unreviewed, roll out r156464.
              
      This is a progression on string-fasta, since it fixes the regression.
      
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedFunctionExecutable::paramString):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::emitExpressionInfo):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ForInNode::emitBytecode):
      (JSC::FuncExprNode::emitBytecode):
      * parser/ASTBuilder.h:
      (JSC::ASTBuilder::createFormalParameterList):
      (JSC::ASTBuilder::createForInLoop):
      (JSC::ASTBuilder::addVar):
      * parser/NodeConstructors.h:
      (JSC::CommaNode::CommaNode):
      (JSC::ParameterNode::ParameterNode):
      (JSC::ForInNode::ForInNode):
      * parser/Nodes.cpp:
      (JSC::FunctionParameters::create):
      (JSC::FunctionParameters::FunctionParameters):
      (JSC::FunctionParameters::~FunctionParameters):
      * parser/Nodes.h:
      (JSC::ExpressionNode::isDotAccessorNode):
      (JSC::CommaNode::append):
      (JSC::ParameterNode::ident):
      (JSC::FunctionParameters::at):
      (JSC::FunctionParameters::identifiers):
      * parser/Parser.cpp:
      (JSC::::Parser):
      (JSC::::parseVarDeclaration):
      (JSC::::parseVarDeclarationList):
      (JSC::::parseForStatement):
      (JSC::::parseFormalParameters):
      (JSC::::parseAssignmentExpression):
      * parser/Parser.h:
      (JSC::Scope::declareParameter):
      (JSC::Parser::declareParameter):
      * parser/SyntaxChecker.h:
      (JSC::SyntaxChecker::createFormalParameterList):
      (JSC::SyntaxChecker::createForInLoop):
      (JSC::SyntaxChecker::operatorStackPop):
      * runtime/JSONObject.cpp:
      * runtime/JSONObject.h:
      
      LayoutTests: 
      
      Unreviewed, roll out r156464.
      
      * js/destructuring-assignment-expected.txt: Removed.
      * js/destructuring-assignment.html: Removed.
      * js/mozilla/strict/13.1-expected.txt:
      * js/mozilla/strict/regress-532254-expected.txt:
      * js/mozilla/strict/script-tests/13.1.js:
      * js/regress/destructuring-arguments-expected.txt: Removed.
      * js/regress/destructuring-arguments-length-expected.txt: Removed.
      * js/regress/destructuring-arguments-length.html: Removed.
      * js/regress/destructuring-arguments.html: Removed.
      * js/regress/destructuring-swap-expected.txt: Removed.
      * js/regress/destructuring-swap.html: Removed.
      * js/regress/script-tests/destructuring-arguments-length.js: Removed.
      * js/regress/script-tests/destructuring-arguments.js: Removed.
      * js/regress/script-tests/destructuring-swap.js: Removed.
      * js/script-tests/destructuring-assignment.js: Removed.
      * sputnik/Conformance/13_Function_Definition/S13_A5.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d456e7b
  5. 26 Sep, 2013 3 commits
    • oliver@apple.com's avatar
      2013-09-25 Oliver Hunt <oliver@apple.com> · f1ae6d11
      oliver@apple.com authored
              Implement prefixed-destructuring assignment
              https://bugs.webkit.org/show_bug.cgi?id=121930
      
              Reviewed by Mark Hahnenberg.
      
              Relanding with fix after rollout
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f1ae6d11
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r156464 and r156480. · c68e9807
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/156464
      http://trac.webkit.org/changeset/156480
      https://bugs.webkit.org/show_bug.cgi?id=121981
      
      Leaking too much and killi
      ng buildbot. (Requested by xenon on
      #webkit).
      
      Source/JavaScriptCore:
      
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedFunctionExecutable::paramString):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::emitExpressionInfo):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ForInNode::emitBytecode):
      (JSC::FuncExprNode::emitBytecode):
      * parser/ASTBuilder.h:
      (JSC::ASTBuilder::createFormalParameterList):
      (JSC::ASTBuilder::createForInLoop):
      (JSC::ASTBuilder::addVar):
      * parser/NodeConstructors.h:
      (JSC::CommaNode::CommaNode):
      (JSC::ParameterNode::ParameterNode):
      (JSC::ForInNode::ForInNode):
      * parser/Nodes.cpp:
      (JSC::FunctionParameters::create):
      (JSC::FunctionParameters::FunctionParameters):
      (JSC::FunctionParameters::~FunctionParameters):
      * parser/Nodes.h:
      (JSC::CommaNode::append):
      (JSC::ParameterNode::ident):
      (JSC::FunctionParameters::at):
      (JSC::FunctionParameters::identifiers):
      * parser/Parser.cpp:
      (JSC::::Parser):
      (JSC::::parseVarDeclaration):
      (JSC::::parseVarDeclarationList):
      (JSC::::parseForStatement):
      (JSC::::parseFormalParameters):
      (JSC::::parseAssignmentExpression):
      * parser/Parser.h:
      (JSC::Scope::declareParameter):
      * parser/SyntaxChecker.h:
      (JSC::SyntaxChecker::createFormalParameterList):
      (JSC::SyntaxChecker::createForInLoop):
      (JSC::SyntaxChecker::operatorStackPop):
      * runtime/JSONObject.cpp:
      * runtime/JSONObject.h:
      
      LayoutTests:
      
      * js/destructuring-assignment-expected.txt: Removed.
      * js/destructuring-assignment.html: Removed.
      * js/mozilla/strict/13.1-expected.txt:
      * js/mozilla/strict/regress-532254-expected.txt:
      * js/mozilla/strict/script-tests/13.1.js:
      * js/regress/destructuring-arguments-expected.txt: Removed.
      * js/regress/destructuring-arguments-length-expected.txt: Removed.
      * js/regress/destructuring-arguments-length.html: Removed.
      * js/regress/destructuring-arguments.html: Removed.
      * js/regress/destructuring-swap-expected.txt: Removed.
      * js/regress/destructuring-swap.html: Removed.
      * js/regress/script-tests/destructuring-arguments-length.js: Removed.
      * js/regress/script-tests/destructuring-arguments.js: Removed.
      * js/regress/script-tests/destructuring-swap.js: Removed.
      * js/script-tests/destructuring-assignment.js: Removed.
      * sputnik/Conformance/13_Function_Definition/S13_A5.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c68e9807
    • oliver@apple.com's avatar
      Implement prefixed-destructuring assignment · aeca5dcd
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121930
      
      Reviewed by Mark Hahnenberg.
      
      Source/JavaScriptCore:
      
      This is mostly simple - the semantics of deconstruction are already
      present in the language, so most of the complexity (if you call it
      that) is addition of new AST nodes, and parsing the syntax.
      
      In order to get correct semantics for the parameter lists, FunctionParameters
      now needs to store refcounted references to the parameter patterns.
      There's also a little work to ensure that variable creation and assignment
      occurs in the correct order while the BytecodeGenerator is being constructed.
      
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedFunctionExecutable::paramString):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::emitExpressionInfo):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ForInNode::emitBytecode):
      (JSC::DeconstructingAssignmentNode::emitBytecode):
      (JSC::DeconstructionPatternNode::~DeconstructionPatternNode):
      (JSC::ArrayPatternNode::emitBytecode):
      (JSC::ArrayPatternNode::emitDirectBinding):
      (JSC::ArrayPatternNode::toString):
      (JSC::ArrayPatternNode::collectBoundIdentifiers):
      (JSC::ObjectPatternNode::toString):
      (JSC::ObjectPatternNode::emitBytecode):
      (JSC::ObjectPatternNode::collectBoundIdentifiers):
      (JSC::BindingNode::emitBytecode):
      (JSC::BindingNode::toString):
      (JSC::BindingNode::collectBoundIdentifiers):
      * parser/ASTBuilder.h:
      (JSC::ASTBuilder::createFormalParameterList):
      (JSC::ASTBuilder::createForInLoop):
      (JSC::ASTBuilder::addVar):
      (JSC::ASTBuilder::createDeconstructingAssignment):
      (JSC::ASTBuilder::createArrayPattern):
      (JSC::ASTBuilder::appendArrayPatternSkipEntry):
      (JSC::ASTBuilder::appendArrayPatternEntry):
      (JSC::ASTBuilder::createObjectPattern):
      (JSC::ASTBuilder::appendObjectPatternEntry):
      (JSC::ASTBuilder::createBindingLocation):
      * parser/NodeConstructors.h:
      (JSC::CommaNode::CommaNode):
      (JSC::ParameterNode::ParameterNode):
      (JSC::ForInNode::ForInNode):
      (JSC::DeconstructionPatternNode::DeconstructionPatternNode):
      (JSC::ArrayPatternNode::ArrayPatternNode):
      (JSC::ArrayPatternNode::create):
      (JSC::ObjectPatternNode::ObjectPatternNode):
      (JSC::ObjectPatternNode::create):
      (JSC::BindingNode::create):
      (JSC::BindingNode::BindingNode):
      (JSC::DeconstructingAssignmentNode::DeconstructingAssignmentNode):
      * parser/Nodes.cpp:
      (JSC::FunctionParameters::create):
      (JSC::FunctionParameters::FunctionParameters):
      (JSC::FunctionParameters::~FunctionParameters):
      * parser/Nodes.h:
      (JSC::ExpressionNode::isDeconstructionNode):
      (JSC::ArrayNode::elements):
      (JSC::CommaNode::append):
      (JSC::ParameterNode::pattern):
      (JSC::FunctionParameters::at):
      (JSC::FunctionParameters::patterns):
      (JSC::DeconstructionPatternNode::isBindingNode):
      (JSC::DeconstructionPatternNode::emitDirectBinding):
      (JSC::ArrayPatternNode::appendIndex):
      (JSC::ObjectPatternNode::appendEntry):
      (JSC::ObjectPatternNode::Entry::Entry):
      (JSC::BindingNode::boundProperty):
      (JSC::BindingNode::isBindingNode):
      (JSC::DeconstructingAssignmentNode::bindings):
      (JSC::DeconstructingAssignmentNode::isLocation):
      (JSC::DeconstructingAssignmentNode::isDeconstructionNode):
      * parser/Parser.cpp:
      (JSC::::Parser):
      (JSC::::parseVarDeclaration):
      (JSC::::parseVarDeclarationList):
      (JSC::::createBindingPattern):
      (JSC::::parseDeconstructionPattern):
      (JSC::::parseForStatement):
      (JSC::::parseFormalParameters):
      (JSC::::parseAssignmentExpression):
      * parser/Parser.h:
      (JSC::Scope::declareBoundParameter):
      (JSC::Parser::declareBoundParameter):
      * parser/SyntaxChecker.h:
      (JSC::SyntaxChecker::createFormalParameterList):
      (JSC::SyntaxChecker::addVar):
      (JSC::SyntaxChecker::operatorStackPop):
      * runtime/JSONObject.cpp:
      (JSC::escapeStringToBuilder):
      * runtime/JSONObject.h:
      
      LayoutTests:
      
      Add enw tests, and update old ones.
      
      * js/destructuring-assignment-expected.txt: Added.
      * js/destructuring-assignment.html: Added.
      * js/mozilla/strict/13.1-expected.txt:
      * js/mozilla/strict/regress-532254-expected.txt:
      * js/mozilla/strict/script-tests/13.1.js:
      * js/regress/destructuring-arguments-expected.txt: Added.
      * js/regress/destructuring-arguments-length-expected.txt: Added.
      * js/regress/destructuring-arguments-length.html: Added.
      * js/regress/destructuring-arguments.html: Added.
      * js/regress/destructuring-swap-expected.txt: Added.
      * js/regress/destructuring-swap.html: Added.
      * js/regress/script-tests/destructuring-arguments-length.js: Added.
      (foo):
      * js/regress/script-tests/destructuring-arguments.js: Added.
      (foo):
      * js/regress/script-tests/destructuring-swap.js: Added.
      (foo):
      * js/script-tests/destructuring-assignment.js: Added.
      (testDestructuring):
      (testDeconstructArgs):
      (testDeconstructArgLength):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aeca5dcd
  6. 24 Jul, 2013 2 commits
    • oliver@apple.com's avatar
      fourthTier: Re-worked non-local variable resolution · 58c86752
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=117375
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore:
      
      This patch has two goals:
      
      (1) Simplicity.
      
          * Net removes 15 opcodes.
          * Net removes 2,000 lines of code.
          * Removes setPair() from the DFG: All DFG nodes have 1 result register now.
      
      (2) Performance.
      
          * 2%-3% speedup on SunSpider (20% in LLInt and Baseline JIT)
          * 2% speedup on v8-spider
          * 10% speedup on js-regress-hashmap*
          * Amusing 2X speedup on js-regress-poly-stricteq
      
      The bytecode now separates the scope chain resolution opcode from the
      scope access opcode.
      
          OLD:
              get_scoped_var  r0, 1, 0
              inc             r0
              put_scoped_var  1, 0, r0
      
          NEW:
              resolve_scope   r0, x(@id0)
              get_from_scope  r1, r0, x(@id0)
              inc             r1
              put_to_scope    r0, x(@id0), r1
      
      Also, we link non-local variable resolution opcodes at CodeBlock link
      time instead of time of first opcode execution.
      
      This means that we can represent all possible non-local variable
      resolutions using just three opcodes, and any optimizations in these
      opcodes naturally apply across-the-board.
      
      * API/JSCTestRunnerUtils.cpp:
      (JSC::numberOfDFGCompiles):
      * GNUmakefile.list.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.order:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri: Build!
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dumpBytecode): Updated for removed things.
      
      (JSC::CodeBlock::CodeBlock): Always provide the full scope chain when
      creating a CodeBlock, so we can perform non-local variable resolution.
      
      Added code to perform linking for these opcodes. This is where we figure
      out which non-local variable resolutions are optimizable, and how.
      
      (JSC::CodeBlock::finalizeUnconditionally):
      (JSC::CodeBlock::noticeIncomingCall):
      (JSC::CodeBlock::optimizeAfterWarmUp):
      (JSC::CodeBlock::optimizeAfterLongWarmUp):
      (JSC::CodeBlock::optimizeSoon): Updated for removed things.
      
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::needsActivation):
      (JSC::GlobalCodeBlock::GlobalCodeBlock):
      (JSC::ProgramCodeBlock::ProgramCodeBlock):
      (JSC::EvalCodeBlock::EvalCodeBlock):
      (JSC::FunctionCodeBlock::FunctionCodeBlock):
      * bytecode/EvalCodeCache.h:
      (JSC::EvalCodeCache::getSlow): Updated for interface changes.
      
      * bytecode/GetByIdStatus.cpp:
      (JSC::GetByIdStatus::computeFor): Treat global object access as
      optimizable even though the global object has a custom property access
      callback. This is what we've always done since, otherwise, we can't
      optimize globals. (In future, we probably want to figure out a more
      targeted policy than "any property access callback means no
      optimization".)
      
      * bytecode/GlobalResolveInfo.h: Removed.
      * bytecode/Instruction.h:
      * bytecode/Opcode.h:
      (JSC::padOpcodeName):
      
      * bytecode/PutByIdStatus.cpp:
      (JSC::PutByIdStatus::computeFor): Like GetByIdStatus.
      
      * bytecode/ResolveGlobalStatus.cpp: Removed.
      * bytecode/ResolveGlobalStatus.h: Removed.
      * bytecode/ResolveOperation.h: Removed.
      
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::generateFunctionCodeBlock):
      (JSC::UnlinkedFunctionExecutable::codeBlockFor):
      (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
      * bytecode/UnlinkedCodeBlock.h: Don't provide a scope chain to unlinked
      code blocks. Giving a scope to an unscoped compilation unit invites
      programming errors.
      
      * bytecode/Watchpoint.h:
      (JSC::WatchpointSet::addressOfIsInvalidated):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::resolveCallee):
      (JSC::BytecodeGenerator::local):
      (JSC::BytecodeGenerator::constLocal):
      (JSC::BytecodeGenerator::resolveType):
      (JSC::BytecodeGenerator::emitResolveScope):
      (JSC::BytecodeGenerator::emitGetFromScope):
      (JSC::BytecodeGenerator::emitPutToScope):
      (JSC::BytecodeGenerator::emitInstanceOf):
      (JSC::BytecodeGenerator::emitPushWithScope):
      (JSC::BytecodeGenerator::emitPopScope):
      (JSC::BytecodeGenerator::pushFinallyContext):
      (JSC::BytecodeGenerator::emitComplexPopScopes):
      (JSC::BytecodeGenerator::popTryAndEmitCatch):
      (JSC::BytecodeGenerator::emitPushNameScope):
      (JSC::BytecodeGenerator::isArgumentNumber):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::Local::Local):
      (JSC::Local::operator bool):
      (JSC::Local::get):
      (JSC::Local::isReadOnly):
      (JSC::BytecodeGenerator::scopeDepth):
      (JSC::BytecodeGenerator::shouldOptimizeLocals):
      (JSC::BytecodeGenerator::canOptimizeNonLocals): Refactored the bytecode
      generator to resolve all variables within local scope, as if there
      were no non-local scope. This helps provide a separation of concerns:
      unlinked bytecode is always scope-free, and the linking stage links
      in the provided scope.
      
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ResolveNode::isPure):
      (JSC::ResolveNode::emitBytecode):
      (JSC::EvalFunctionCallNode::emitBytecode):
      (JSC::FunctionCallResolveNode::emitBytecode):
      (JSC::PostfixNode::emitResolve):
      (JSC::DeleteResolveNode::emitBytecode):
      (JSC::TypeOfResolveNode::emitBytecode):
      (JSC::PrefixNode::emitResolve):
      (JSC::ReadModifyResolveNode::emitBytecode):
      (JSC::AssignResolveNode::emitBytecode):
      (JSC::ConstDeclNode::emitCodeSingle):
      (JSC::ForInNode::emitBytecode): A bunch of this codegen is no longer
      necessary, since it's redundant with the linking stage.
      
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::executeEffects):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::ByteCodeParser):
      (JSC::DFG::ByteCodeParser::cellConstantWithStructureCheck):
      (JSC::DFG::ByteCodeParser::handlePutByOffset):
      (JSC::DFG::ByteCodeParser::handleGetById):
      (JSC::DFG::ByteCodeParser::parseBlock): Updated for interface changes.
      Notably, we can reuse existing DFG nodes -- but the mapping between
      bytecode and DFG nodes has changed, and some nodes and corner cases have
      been removed.
      
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::CSEPhase::scopedVarLoadElimination):
      (JSC::DFG::CSEPhase::varInjectionWatchpointElimination):
      (JSC::DFG::CSEPhase::globalVarStoreElimination):
      (JSC::DFG::CSEPhase::scopedVarStoreElimination):
      (JSC::DFG::CSEPhase::getLocalLoadElimination):
      (JSC::DFG::CSEPhase::setLocalStoreElimination):
      (JSC::DFG::CSEPhase::performNodeCSE): Added CSE for var injection
      watchpoints. Even though watchpoints are "free", they're quite common
      inside code that's subject to var injection, so I figured we'd save a
      little memory.
      
      * dfg/DFGCapabilities.cpp:
      (JSC::DFG::capabilityLevel):
      * dfg/DFGCapabilities.h: Removed detection for old forms.
      
      * dfg/DFGDriver.h:
      (JSC::DFG::tryCompile):
      (JSC::DFG::tryCompileFunction):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGGraph.h:
      * dfg/DFGJITCode.cpp:
      * dfg/DFGNode.h:
      (JSC::DFG::Node::convertToStructureTransitionWatchpoint):
      (JSC::DFG::Node::hasVarNumber):
      (JSC::DFG::Node::hasIdentifierNumberForCheck):
      (JSC::DFG::Node::hasRegisterPointer):
      (JSC::DFG::Node::hasHeapPrediction):
      * dfg/DFGNodeType.h:
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGRepatch.h:
      (JSC::DFG::dfgResetGetByID):
      (JSC::DFG::dfgResetPutByID):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation): Removed some unneeded things,
      and updated for renames.
      
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile): The two primary changes here are:
      
      (1) Use a watchpoint for var injection instead of looping over the scope
      chain and checking. This is more efficient and much easier to model in
      code generation.
      
      (2) I've eliminated the notion of an optimized global assignment that
      needs to check for whether it should fire a watchpiont. Instead, we
      fire pre-emptively at the point of optimization. This removes a bunch
      of edge cases, and it seems like a more honest representation of
      the fact that our new optimization contradicts our old one.
      
      * dfg/DFGTypeCheckHoistingPhase.cpp:
      (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
      (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
      * heap/DFGCodeBlocks.cpp:
      (JSC::DFGCodeBlocks::jettison):
      * interpreter/CallFrame.h:
      (JSC::ExecState::trueCallFrame): Removed stuff that's unused now, and
      fixed the build.
      
      * interpreter/Interpreter.cpp:
      (JSC::eval):
      (JSC::getBytecodeOffsetForCallFrame):
      (JSC::getCallerInfo):
      (JSC::Interpreter::throwException): Updated exception scope tracking
      to match the rest of our linking strategy: The unlinked bytecode compiles
      exception scope as if non-local scope did not exist, and we add in
      non-local scope at link time. This means that we can restore the right
      scope depth based on a simple number, without checking the contents of
      the scope chain.
      
      (JSC::Interpreter::execute): Make sure to establish the full scope chain
      before linking eval code. We now require the full scope chain at link
      time, in order to link non-local variable resolution opcodes.
      
      * jit/JIT.cpp:
      (JSC::JIT::JIT):
      (JSC::JIT::privateCompileMainPass):
      (JSC::JIT::privateCompileSlowCases):
      * jit/JIT.h:
      * jit/JITArithmetic.cpp:
      (JSC::JIT::emit_op_add):
      * jit/JITCode.cpp:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emitSlow_op_bitxor):
      (JSC::JIT::emitSlow_op_bitor):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emitSlow_op_to_primitive):
      (JSC::JIT::emit_op_strcat):
      (JSC::JIT::emitSlow_op_create_this):
      (JSC::JIT::emitSlow_op_to_this):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::emitVarInjectionCheck):
      (JSC::JIT::emitResolveClosure):
      (JSC::JIT::emit_op_resolve_scope):
      (JSC::JIT::emitSlow_op_resolve_scope):
      (JSC::JIT::emitLoadWithStructureCheck):
      (JSC::JIT::emitGetGlobalProperty):
      (JSC::JIT::emitGetGlobalVar):
      (JSC::JIT::emitGetClosureVar):
      (JSC::JIT::emit_op_get_from_scope):
      (JSC::JIT::emitSlow_op_get_from_scope):
      (JSC::JIT::emitPutGlobalProperty):
      (JSC::JIT::emitPutGlobalVar):
      (JSC::JIT::emitPutClosureVar):
      (JSC::JIT::emit_op_put_to_scope):
      (JSC::JIT::emitSlow_op_put_to_scope):
      (JSC::JIT::emit_op_init_global_const):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::emitVarInjectionCheck):
      (JSC::JIT::emitResolveClosure):
      (JSC::JIT::emit_op_resolve_scope):
      (JSC::JIT::emitSlow_op_resolve_scope):
      (JSC::JIT::emitLoadWithStructureCheck):
      (JSC::JIT::emitGetGlobalProperty):
      (JSC::JIT::emitGetGlobalVar):
      (JSC::JIT::emitGetClosureVar):
      (JSC::JIT::emit_op_get_from_scope):
      (JSC::JIT::emitSlow_op_get_from_scope):
      (JSC::JIT::emitPutGlobalProperty):
      (JSC::JIT::emitPutGlobalVar):
      (JSC::JIT::emitPutClosureVar):
      (JSC::JIT::emit_op_put_to_scope):
      (JSC::JIT::emitSlow_op_put_to_scope):
      (JSC::JIT::emit_op_init_global_const):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * jit/JITStubs.h: Re-wrote baseline JIT codegen for our new variable
      resolution model.
      
      * llint/LLIntData.cpp:
      (JSC::LLInt::Data::performAssertions):
      * llint/LLIntSlowPaths.cpp:
      * llint/LLIntSlowPaths.h:
      * llint/LowLevelInterpreter.asm:
      * llint/LowLevelInterpreter.cpp:
      (JSC::CLoop::execute):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm: Ditto for LLInt.
      
      * offlineasm/x86.rb: Fixed a pre-existing encoding bug for a syntactic
      form that we never used before.
      
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncToLocaleString):
      (JSC::arrayProtoFuncJoin):
      (JSC::arrayProtoFuncConcat):
      (JSC::arrayProtoFuncPop):
      (JSC::arrayProtoFuncPush):
      (JSC::arrayProtoFuncReverse):
      (JSC::arrayProtoFuncShift):
      (JSC::arrayProtoFuncSlice):
      (JSC::arrayProtoFuncSort):
      (JSC::arrayProtoFuncSplice):
      (JSC::arrayProtoFuncUnShift):
      (JSC::arrayProtoFuncFilter):
      (JSC::arrayProtoFuncMap):
      (JSC::arrayProtoFuncEvery):
      (JSC::arrayProtoFuncForEach):
      (JSC::arrayProtoFuncSome):
      (JSC::arrayProtoFuncReduce):
      (JSC::arrayProtoFuncReduceRight):
      (JSC::arrayProtoFuncIndexOf):
      (JSC::arrayProtoFuncLastIndexOf): Fixed some pre-existing bugs in
      'this' value conversion, which I made much more common by removing
      special cases in bytecode generation.
      
      These functions need to invoke toThis() because they observe the 'this'
      value. Also, toLocaleString() is specified to accept non-array 'this'
      values.
      
      (Most other host functions don't need this fix because they perform
      strict 'this' checking, which never coerces unexpected types.)
      
      * runtime/CodeCache.cpp:
      (JSC::CodeCache::getCodeBlock):
      (JSC::CodeCache::getProgramCodeBlock):
      (JSC::CodeCache::getEvalCodeBlock):
      * runtime/CodeCache.h: Don't supply a scope to the unlinked code cache.
      Unlinked code is supposed to be scope-free, so let's have the compiler
      help verify that.
      
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      * runtime/CommonSlowPaths.h:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::create):
      (JSC::EvalExecutable::compileInternal):
      (JSC::ProgramExecutable::compileInternal):
      (JSC::FunctionExecutable::produceCodeBlockFor):
      (JSC::FunctionExecutable::compileForCallInternal):
      (JSC::FunctionExecutable::compileForConstructInternal):
      * runtime/Executable.h:
      (JSC::EvalExecutable::numVariables):
      (JSC::EvalExecutable::numberOfFunctionDecls):
      * runtime/ExecutionHarness.h:
      (JSC::prepareForExecutionImpl):
      (JSC::prepareFunctionForExecutionImpl):
      (JSC::installOptimizedCode): Fiddled with executable initialization so
      that we can always generate a full scope chain before we go to link a
      code block. We need this because code block linking now depends on the
      scope chain to link non-local variable resolution opcodes.
      
      * runtime/JSActivation.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::JSGlobalObject):
      (JSC::JSGlobalObject::createEvalCodeBlock):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::varInjectionWatchpoint):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::globalFuncEval):
      * runtime/JSNameScope.h:
      * runtime/JSScope.cpp:
      (JSC::abstractAccess):
      (JSC::JSScope::objectAtScope):
      (JSC::JSScope::depth):
      (JSC::JSScope::resolve):
      (JSC::JSScope::abstractResolve): Updated to match changes explained above.
      
      * runtime/JSScope.h:
      (JSC::makeType):
      (JSC::needsVarInjectionChecks):
      (JSC::ResolveOp::ResolveOp):
      (JSC::ResolveModeAndType::ResolveModeAndType):
      (JSC::ResolveModeAndType::mode):
      (JSC::ResolveModeAndType::type):
      (JSC::ResolveModeAndType::operand): Removed the old variable resolution
      state machine, since it's unused now. Added logic for performing abstract
      variable resolution at link time. This is used by codeblock linking.
      
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncValueOf):
      (JSC::objectProtoFuncHasOwnProperty):
      (JSC::objectProtoFuncIsPrototypeOf):
      (JSC::objectProtoFuncDefineGetter):
      (JSC::objectProtoFuncDefineSetter):
      (JSC::objectProtoFuncLookupGetter):
      (JSC::objectProtoFuncLookupSetter):
      (JSC::objectProtoFuncPropertyIsEnumerable):
      (JSC::objectProtoFuncToLocaleString):
      (JSC::objectProtoFuncToString): Fixed some pre-existing bugs in
      'this' value conversion, which I made much more common by removing
      special cases in bytecode generation.
      
      These functions need to invoke toThis() because they observe the 'this'
      value.
      
      * runtime/StringPrototype.cpp:
      (JSC::checkObjectCoercible):
      (JSC::stringProtoFuncReplace):
      (JSC::stringProtoFuncCharAt):
      (JSC::stringProtoFuncCharCodeAt):
      (JSC::stringProtoFuncConcat):
      (JSC::stringProtoFuncIndexOf):
      (JSC::stringProtoFuncLastIndexOf):
      (JSC::stringProtoFuncMatch):
      (JSC::stringProtoFuncSearch):
      (JSC::stringProtoFuncSlice):
      (JSC::stringProtoFuncSplit):
      (JSC::stringProtoFuncSubstr):
      (JSC::stringProtoFuncSubstring):
      (JSC::stringProtoFuncToLowerCase):
      (JSC::stringProtoFuncToUpperCase):
      (JSC::stringProtoFuncLocaleCompare):
      (JSC::stringProtoFuncBig):
      (JSC::stringProtoFuncSmall):
      (JSC::stringProtoFuncBlink):
      (JSC::stringProtoFuncBold):
      (JSC::stringProtoFuncFixed):
      (JSC::stringProtoFuncItalics):
      (JSC::stringProtoFuncStrike):
      (JSC::stringProtoFuncSub):
      (JSC::stringProtoFuncSup):
      (JSC::stringProtoFuncFontcolor):
      (JSC::stringProtoFuncFontsize):
      (JSC::stringProtoFuncAnchor):
      (JSC::stringProtoFuncLink):
      (JSC::trimString): Fixed some pre-existing bugs in
      'this' value conversion, which I made much more common by removing
      special cases in bytecode generation.
      
      These functions need to invoke toThis() because they observe the 'this'
      value.
      
      * runtime/StructureRareData.cpp:
      * runtime/VM.cpp:
      (JSC::VM::~VM):
      
      * runtime/WriteBarrier.h:
      (JSC::WriteBarrierBase::slot): Modified to reduce casting in client code.
      
      LayoutTests:
      
      This patch removed special-case 'this' resolution from bytecode, making
      some pre-existing edge cases in 'this' value treatment much more common.
      
      I updated the test results below, and added some tests, to match bug
      fixes for these cases.
      
      * fast/js/script-tests/array-functions-non-arrays.js:
      * fast/js/array-functions-non-arrays-expected.txt: As specified, it's
      not an error to pass a non-array to toLocaleString. Our new result
      matches Firefox and Chrome.
      
      * fast/js/array-prototype-properties-expected.txt: Updated for slightly
      clearer error message.
      
      * fast/js/basic-strict-mode-expected.txt: Updated for slightly more
      standard error message.
      
      * fast/js/object-prototype-toString-expected.txt: Added.
      * fast/js/object-prototype-toString.html: Added. This test demonstrates
      why we now fail a Sputnik test below, while Firefox and Chrome pass it.
      (The test doesn't test what it thinks it tests, and this test verifies
      that we get right what it does think it tests.)
      
      * fast/js/string-prototype-function-this-expected.txt: Added.
      * fast/js/string-prototype-function-this.html: Added. This test shows
      that we CheckObjectCoercible in string prototype functions. (We used
      to get this wrong, but Sputnik tests made it seem like we got it right
      because they didn't test the dynamic scope case.)
      
      * sputnik/Conformance/11_Expressions/11.1_Primary_Expressions/11.1.1_The_this_Keyword/S11.1.1_A2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.3_Array_prototype_toLocaleString/S15.4.4.3_A2_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.13_String.prototype.slice/S15.5.4.13_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.15_String.prototype.substring/S15.5.4.15_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.6_String.prototype.concat/S15.5.4.6_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.7_String.prototype.indexOf/S15.5.4.7_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T3-expected.txt:
      
      Updated to show failing results. Firefox and Chrome also fail these
      tests, and the ES5 spec seems to mandate failure. Because these tests
      resolve a String.prototype function at global scope, the 'this' value
      for the call is an environment record. Logically, an environment record
      converts to 'undefined' at the call site, and should then fail the
      CheckObjectCoercible test.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58c86752
    • oliver@apple.com's avatar
      fourthTier: Rationalized 'this' conversion, includes subsequent FTL branch fixes · e2fe4ceb
      oliver@apple.com authored
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore:
      
          Rationalized 'this' value conversion
          https://bugs.webkit.org/show_bug.cgi?id=115542
      
          This fixes a bunch of Sputnik tests, and some bad pointer access.
      
          The new model is that the callee always performs 'this' value conversion.
      
          My ultimate goal is to break up resolve_with_this into single-result
          opcodes. This step avoids having to add a special form of convert_this
          that distinguishes callers vs callees.
      
          Only the callee knows whether it uses 'this' and/or whether 'this'
          conversion should use StrictMode, so it's most natural to perform
          convert_this in the callee.
      
          * API/JSCallbackFunction.cpp:
          (JSC::JSCallbackFunction::call): Perform 'this' value conversion for
          our callee, since it may observe 'this'.
      
          * API/JSCallbackObjectFunctions.h:
          (JSC::::call): Ditto.
      
          * API/JSContextRef.cpp:
          (JSGlobalContextCreateInGroup): Use a proxy 'this' object in global scope
          even when we're not in the browser. This eliminates some odd cases where
          API clients used to be able to get a direct reference to an environment
          record. Now, any reference to an environment record unambiguously means
          that the VM resolved that record in the scope chain.
      
          (JSContextGetGlobalObject): Removed an incorrect comment. Now that JSC
          participates in the proxy 'this' object scheme, the behavior is not
          WebCore-only.
      
          * API/JSObjectRef.cpp:
          (JSObjectSetPrototype):
          (JSObjectCallAsFunction): Don't perform 'this' value conversion in the
          caller; the callee will do it if needed.
      
          * JavaScriptCore.order: Order!
      
          * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
          * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
          What are the chances that this will work?
      
          * bytecode/CodeBlock.cpp:
          (JSC::CodeBlock::dumpBytecode):
          (JSC::CodeBlock::CodeBlock): Renamed convert_this to to_this, to match our
          other conversion opcodes.
      
          * bytecode/CodeOrigin.h:
          (CodeOrigin):
          (InlineCallFrame):
          (JSC::CodeOrigin::codeOriginOwner): Use the more precise type for our
          executable, so compilation can discover where we're in strict mode.
      
          * bytecode/Opcode.h:
          (JSC::padOpcodeName): Updated for rename.
      
          * bytecompiler/BytecodeGenerator.cpp:
          (JSC::BytecodeGenerator::BytecodeGenerator): Always emit to_this when
          'this' is in use -- strict mode still needs to convert environment
          records to 'undefined'.
      
          * dfg/DFGAbstractState.cpp:
          (JSC::DFG::AbstractState::executeEffects):
          * dfg/DFGByteCodeParser.cpp:
          (JSC::DFG::ByteCodeParser::parseBlock):
          * dfg/DFGCapabilities.h:
          (JSC::DFG::canCompileOpcode): Updated for renames.
      
          * dfg/DFGFixupPhase.cpp:
          (JSC::DFG::FixupPhase::fixupNode): Tightened up this code to consider
          strict mode (a new requirement) and to consider the global object (which
          was always a requirement).
      
          * dfg/DFGGraph.h:
          (JSC::DFG::Graph::globalThisObjectFor):
          (JSC::DFG::Graph::executableFor):
          * dfg/DFGNodeType.h:
          * dfg/DFGOperations.cpp:
          * dfg/DFGOperations.h:
          * dfg/DFGPredictionPropagationPhase.cpp:
          (JSC::DFG::PredictionPropagationPhase::propagate):
          * dfg/DFGSpeculativeJIT32_64.cpp:
          (JSC::DFG::SpeculativeJIT::compile):
          * dfg/DFGSpeculativeJIT64.cpp:
          (JSC::DFG::SpeculativeJIT::compile): Ditto.
      
          * interpreter/Interpreter.cpp:
          (JSC::eval):
          (JSC::Interpreter::execute):
          (JSC::Interpreter::executeCall):
          * interpreter/Interpreter.h: Don't ASSERT about 'this' -- it's our job
          to fix it up if needed.
      
          * jit/JIT.cpp:
          (JSC::JIT::privateCompileMainPass):
          (JSC::JIT::privateCompileSlowCases):
          * jit/JIT.h:
          (JIT):
          * jit/JITOpcodes.cpp:
          (JSC::JIT::emit_op_to_this):
          (JSC::JIT::emitSlow_op_to_this):
          * jit/JITOpcodes32_64.cpp:
          (JSC::JIT::emit_op_to_this):
          (JSC::JIT::emitSlow_op_to_this):
          * jit/JITStubs.cpp:
          (JSC::DEFINE_STUB_FUNCTION):
          * jit/JITStubs.h: Removed special-case code for various kinds of
          conversions. The baseline fast path is now final objects only. It hurt
          my brain to think through how to keep the other fast paths working, and
          our benchmarks do not object.
      
          * llint/LLIntData.cpp:
          (JSC::LLInt::Data::performAssertions):
          * llint/LLIntSlowPaths.cpp:
          (JSC::LLInt::LLINT_SLOW_PATH_DECL):
          * llint/LLIntSlowPaths.h:
          (LLInt):
          * llint/LowLevelInterpreter.asm:
          * llint/LowLevelInterpreter32_64.asm:
          * llint/LowLevelInterpreter64.asm: Updated for renames. Removed some
          special case code, as in the JIT above.
      
          * profiler/ProfileGenerator.cpp:
          (JSC::ProfileGenerator::addParentForConsoleStart):
          * runtime/CallData.cpp:
          (JSC::call):
          * runtime/ClassInfo.h:
          (MethodTable):
          * runtime/Completion.cpp:
          (JSC::evaluate):
          * runtime/DatePrototype.cpp:
          (JSC::dateProtoFuncToJSON): The callee performs 'this' conversion, not
          the caller.
      
          * runtime/GetterSetter.cpp:
          (JSC::callGetter):
          (JSC::callSetter):
          * runtime/GetterSetter.h: Added helper functions for invoking getters
          and setters from C++ code, since this was duplicated in a bunch of
          places.
      
          * runtime/JSActivation.cpp:
          (JSC::JSActivation::toThis):
          * runtime/JSActivation.h:
          (JSActivation):
          * runtime/JSCJSValue.cpp:
          (JSC::JSValue::toThisSlowCase):
          (JSC::JSValue::putToPrimitive):
          * runtime/JSCJSValue.h:
          (JSValue):
          * runtime/JSCJSValueInlines.h:
          (JSC::JSValue::toThis):
          * runtime/JSCell.cpp:
          (JSC::JSCell::toThis):
          * runtime/JSCell.h:
          (JSCell):
          * runtime/JSGlobalObject.cpp:
          (JSC::JSGlobalObject::toThis):
          * runtime/JSGlobalObject.h:
          (JSGlobalObject): Filled out runtime support for converting 'this'
          values as needed, according to the appropriate strictness, using
          helper functions where getter/setter code was duplicated.
      
          * runtime/JSGlobalObjectFunctions.cpp:
          (JSC::globalFuncProtoGetter):
          (JSC::globalFuncProtoSetter): Perform 'this' value conversion, since we
          observe 'this'.
      
          * runtime/JSNameScope.cpp:
          (JSC::JSNameScope::toThis):
          * runtime/JSNameScope.h:
          (JSNameScope): Same as JSActivation.
      
          * runtime/JSObject.cpp:
          (JSC::JSObject::put):
          (JSC::JSObject::setPrototypeWithCycleCheck): Bug fix. Don't peform
          'this' value conversion in this helper function. The __proto__
          setter does this for us, since it's the function that logically observes
          'this' -- and we can ASSERT so. Also, the previous code used
          "globalExec()->thisValue()", which is a read past the beginning of a
          buffer! I don't think this ever worked on purpose.
      
          (JSC::JSObject::toThis):
          (JSC::JSObject::fillGetterPropertySlot):
          * runtime/JSObject.h:
          (JSC::JSObject::inlineGetOwnPropertySlot):
          * runtime/JSScope.cpp:
          (JSC::JSScope::resolveWithThis):
          * runtime/JSString.cpp:
          (JSC::JSString::toThis):
          * runtime/JSString.h:
          (JSString):
          * runtime/PropertySlot.cpp:
          (JSC::PropertySlot::functionGetter):
          * runtime/PropertySlot.h:
          (JSC):
          (JSC::PropertySlot::setGetterSlot):
          (JSC::PropertySlot::setCacheableGetterSlot):
          * runtime/SparseArrayValueMap.cpp:
          (JSC::SparseArrayEntry::get):
          (JSC::SparseArrayEntry::put):
          * runtime/StrictEvalActivation.cpp:
          (JSC::StrictEvalActivation::toThis):
          * runtime/StrictEvalActivation.h:
          (StrictEvalActivation): Ditto.
      
      Source/WebCore:
      
          Rationalized 'this' value conversion
          https://bugs.webkit.org/show_bug.cgi?id=115542
      
      Source/WebKit/mac:
      
          Rationalized 'this' value conversion
          https://bugs.webkit.org/show_bug.cgi?id=115542
      
      Source/WebKit2:
      
          Rationalized 'this' value conversion
          https://bugs.webkit.org/show_bug.cgi?id=115542
      
      LayoutTests:
      
          Rationalized 'this' value conversion
          https://bugs.webkit.org/show_bug.cgi?id=115542
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2fe4ceb
  7. 18 Jul, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Fixed ASSERTION FAILED: callFrame == vm->topCallFrame in JSC::Interpreter::addStackTraceIfNecessary · e0c69d5e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=118498
      
      Patch by Chris Curtis <chris_curtis@apple.com> on 2013-07-18
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      * jit/JITStubs.cpp:
      (throwExceptionFromOpCall):
      Created new throwExceptionFromOpCall that takes in a functor that contains
      a function pointer (to create the errorObject) instead of a JSValue. Inside
      of throwExceptionFromOpCall the topCallFrame is being rolled back in order
      to handle the error throw. By passing the function pointer in, we can defer
      the creation of the error object until after topCallFrame has been rolled
      back. This allows the error object to be created with the appropriate top
      frame.
      
      DEFINE_STUB_FUNCTION(void*, stack_check):
      DEFINE_STUB_FUNCTION(void*, op_call_arityCheck):
      DEFINE_STUB_FUNCTION(void*, op_construct_arityCheck):
      DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_NotJSFunction):
      DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct):
      
      (JSC::ErrorFunctor::~ErrorFunctor):
      (JSC::ErrorWithExecFunctor::ErrorWithExecFunctor):
      (JSC::ErrorWithExecFunctor::operator()):
      (JSC::ErrorWithExecAndCalleeFunctor::ErrorWithExecAndCalleeFunctor):
      (JSC::ErrorWithExecAndCalleeFunctor::operator()):
      (JSC::ErrorWithExceptionFunctor::ErrorWithExceptionFunctor):
      (JSC::ErrorWithExceptionFunctor::operator()):
      (JSC::throwExceptionFromOpCall):
      
      In order to eliminate the need to duplicate code, an error functor was
      created for the 3 different throwExceptionFromOpCall handles.
      1. The exception needs to be created, and the function pointer takes 1
          parameter(callFrame->callerFrame()).
      2. The exception needs to be created, and the function pointer takes 2
          parameters (callFrame->callerFrame(), callFrame.calleeAsValue()).
      3. The exception is already created. In this case, At the time when
          the error functor is called, vm.exception is returned.
      
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * runtime/ExceptionHelpers.cpp:
      (JSC::errorDescriptionForValue):
      (JSC::createError):
      (JSC::createInvalidParameterError):
      (JSC::createNotAConstructorError):
      (JSC::createNotAFunctionError):
      (JSC::createNotAnObjectError):
      * runtime/ExceptionHelpers.h:
      
      The function toString() was being used to stringify an object for an exception
      message. If the user wrote a toString() for that object, then the system would
      continue to evaluate that code. A new helper function was created to prevent
      the system to continue execution and exception creation from that execution.
      
      LayoutTests:
      
      New Tests to see if JSC evaluates user code after exception creation
      
      * fast/js/not-a-constructor-to-string-expected.txt: Added.
      * fast/js/not-a-constructor-to-string.html: Added.
      * fast/js/not-a-function-to-string-expected.txt: Added.
      * fast/js/not-a-function-to-string.html: Added.
      
      Modified test output of the object that was being evaluated at the time of the
      error. Only the error message has changed.
      
      * fast/dom/MutationObserver/mutation-record-constructor-expected.txt:
      * fast/dom/NodeList/nodelist-item-call-as-function-expected.txt:
      * fast/dom/Range/getClientRects-expected.txt:
      * fast/dom/SelectorAPI/dumpNodeList-almost-strict-expected.txt:
      * fast/dom/SelectorAPI/dumpNodeList-expected.txt:
      * fast/dom/call-a-constructor-as-a-function-expected.txt:
      * fast/dom/setPrimitiveValue-exceptions-expected.txt:
      * fast/events/window-onerror-exception-in-attr-expected.txt:
      * fast/forms/select-namedItem-expected.txt:
      * fast/js/arguments-expected.txt:
      * fast/js/array-prototype-properties-expected.txt:
      * fast/js/basic-strict-mode-expected.txt:
      * fast/js/date-toisostring-expected.txt:
      * fast/js/delete-getters-setters-expected.txt:
      * fast/js/dfg-check-structure-elimination-for-non-cell-expected.txt:
      * fast/js/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt:
      * fast/js/dfg-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt:
      * fast/js/dfg-inline-arguments-use-from-all-the-places-broken-expected.txt:
      * fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt:
      * fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt:
      * fast/js/exception-expression-offset-expected.txt:
      * fast/js/exception-for-nonobject-expected.txt:
      * fast/js/exception-thrown-from-new-expected.txt:
      * fast/js/function-bind-expected.txt:
      * fast/js/instance-of-immediates-expected.txt:
      * fast/js/object-prototype-properties-expected.txt:
      * fast/regex/cross-frame-callable-expected.txt:
      * fast/xsl/transform-xhr-doc-expected.txt:
      * http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write-expected.txt:
      * http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url-expected.txt:
      * http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt:
      * http/tests/security/document-all-expected.txt:
      * http/tests/security/srcdoc-in-sandbox-cannot-access-parent-expected.txt:
      * http/tests/security/window-named-proto-expected.txt:
      * inspector/console/console-exception-stack-traces-expected.txt:
      * platform/efl/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
      * platform/efl/css3/selectors3/xml/css3-modsel-15c-expected.txt:
      * platform/efl/fast/events/updateLayoutForHitTest-expected.txt:
      * platform/efl/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
      * platform/gtk/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
      * platform/gtk/css3/selectors3/xml/css3-modsel-15c-expected.txt:
      * platform/gtk/fast/events/updateLayoutForHitTest-expected.txt:
      * platform/gtk/svg/custom/createelement-expected.txt:
      * platform/gtk/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
      * platform/mac-wk2/editing/spelling/markers-expected.txt:
      * platform/mac-wk2/plugins/npruntime/object-from-destroyed-plugin-expected.txt: Added.
      * platform/mac-wk2/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: Added.
      * platform/mac/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
      * platform/mac/css3/selectors3/xml/css3-modsel-15c-expected.txt:
      * platform/mac/fast/events/updateLayoutForHitTest-expected.txt:
      * platform/mac/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
      * platform/qt/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
      * platform/qt/css3/selectors3/xml/css3-modsel-15c-expected.txt:
      * platform/qt/svg/custom/createelement-expected.txt:
      * platform/qt/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
      * platform/win/fast/dom/call-a-constructor-as-a-function-expected.txt:
      * plugins/npruntime/object-from-destroyed-plugin-expected.txt:
      * plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt:
      * plugins/npruntime/plugin-scriptable-object-invoke-default-expected.txt:
      * sputnik/Conformance/08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A7-expected.txt:
      * sputnik/Conformance/13_Function_Definition/S13_A17_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A1_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A2_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.2_Object.prototype.toString/S15.2.4.2_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/S15.2.4_A3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/S15.2.4_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/15.3.4.2_Function.prototype.toString/S15.3.4.2_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/S15.3.4_A5-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.13_String.prototype.slice/S15.5.4.13_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.15_String.prototype.substring/S15.5.4.15_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.17_String.prototype.toLocaleLowerCase/S15.5.4.17_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.7_String.prototype.indexOf/S15.5.4.7_A7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A7-expected.txt:
      * svg/custom/createelement-expected.txt:
      * svg/custom/use-nested-missing-target-removed-expected.txt:
      * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e0c69d5e
  8. 04 Jun, 2013 1 commit
    • zandobersek@gmail.com's avatar
      [JSC] Test262 15.5.4.9_3 test is failing · 5dea8eb9
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=116789
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      Bring the String.prototype.localeCompare behavior in line wit ES5 15.9.4.9.
      If method is not given enough arguments, the minimal amount of arguments must be assumed, with their value being undefined.
      The first argument to localeCompare, in its string form, is used as the 'that' string that's used in the comparison.
      Therefor, when calling str.localeCompare() or str.localeCompare(undefined), the first argument is `undefined` and the
      string "undefined" is used as the string to which value of str is compared.
      
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncLocaleCompare): Remove the early return in case of no given arguments to achieve the desired behavior.
      
      LayoutTests: 
      
      Add the 15.5.4.9_3 test from the test262 test suite to cover proper behavior of String.prototype.localeCompare
      when no arguments are passed to it. The test tests that str.localeCompare() and str.localeCompare(undefined) work
      the same way, i.e. using the string 'undefined' as the string with which str is compared (meaning that the first argument
      defaults to 'undefined' when not given).
      
      The test and the rationale behind it originates from bug #1245 in ECMAScript Bugzilla.
      https://bugs.ecmascript.org/show_bug.cgi?id=1245
      
      * fast/js/kde/StringObject-expected.txt: Update the baseline.
      * fast/js/kde/script-tests/StringObject.js: Update the expected return of the localeCompare test case with no arguments. -1 is
      expected as the missing argument defaults to 'undefined' and is then compared to the string on which localeCompare is called.
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.9_String.prototype.localeCompare/S15.5.4.9_3-expected.txt: Added.
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.9_String.prototype.localeCompare/S15.5.4.9_3.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5dea8eb9
  9. 17 May, 2013 1 commit
  10. 21 Apr, 2013 1 commit
    • oliver@apple.com's avatar
      JS Lexer and Parser should be more informative when they encounter errors · 568b48ca
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114924
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore:
      
      Add new tokens to represent the various ways that parsing and lexing have failed.
      This gives us the ability to produce better error messages in some cases,
      and to indicate whether or not the failure was due to invalid source, or simply
      early termination.
      
      The jsc prompt now makes use of this so that you can write functions that
      are more than one line long.
      
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::generate):
      * jsc.cpp:
      (stringFromUTF):
      (jscSource):
      (runInteractive):
      * parser/Lexer.cpp:
      (JSC::::parseFourDigitUnicodeHex):
      (JSC::::parseIdentifierSlowCase):
      (JSC::::parseString):
      (JSC::::parseStringSlowCase):
      (JSC::::lex):
      * parser/Lexer.h:
      (UnicodeHexValue):
      (JSC::Lexer::UnicodeHexValue::UnicodeHexValue):
      (JSC::Lexer::UnicodeHexValue::valueType):
      (JSC::Lexer::UnicodeHexValue::isValid):
      (JSC::Lexer::UnicodeHexValue::value):
      (Lexer):
      * parser/Parser.h:
      (JSC::Parser::getTokenName):
      (JSC::Parser::updateErrorMessageSpecialCase):
      (JSC::::parse):
      * parser/ParserError.h:
      (ParserError):
      (JSC::ParserError::ParserError):
      * parser/ParserTokens.h:
      * runtime/Completion.cpp:
      (JSC):
      (JSC::checkSyntax):
      * runtime/Completion.h:
      (JSC):
      
      LayoutTests:
      
      Update test results to cover improved error messages.
      
      * fast/js/kde/parse-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T5-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T10-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T2-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T3-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T5-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T6-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T7-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T8-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T9-expected.txt:
      * sputnik/Conformance/13_Function_Definition/S13_A7_T3-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      568b48ca
  11. 24 Oct, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Rebaseline some sputnik unicode failed cases. · e76c7567
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99976
      
      Unreviewed rebaseline.
      
      According to BUG 93103, seems these four test cases have different results after libicu 4.6 version.
      As Ubuntu 12.04 installs 4.8 and mac has same result with windows, expected results on BUG 93103 could replace common result file except chromium-mac-snowleopard.
      
      Patch by Kangil Han <kangil.han@samsung.com> on 2012-10-24
      
      * platform/chromium/sputnik/Unicode/Unicode_510/S7.6_A3.1-expected.txt: Removed.
      * platform/chromium/sputnik/Unicode/Unicode_510/S7.6_A3.2-expected.txt: Removed.
      * platform/chromium/sputnik/Unicode/Unicode_510/S7.6_A5.3_T1-expected.txt: Removed.
      * platform/chromium/sputnik/Unicode/Unicode_510/S7.6_A5.3_T2-expected.txt: Removed.
      * platform/efl/TestExpectations:
      * platform/gtk/sputnik/Unicode/Unicode_510/S7.6_A3.2-expected.txt: Removed.
      * platform/gtk/sputnik/Unicode/Unicode_510/S7.6_A5.3_T1-expected.txt: Removed.
      * platform/gtk/sputnik/Unicode/Unicode_510/S7.6_A5.3_T2-expected.txt: Removed.
      * platform/mac-snowleopard/sputnik/Unicode/Unicode_510/S7.6_A3.1-expected.txt: Removed.
      * platform/mac-snowleopard/sputnik/Unicode/Unicode_510/S7.6_A3.2-expected.txt: Removed.
      * platform/mac-snowleopard/sputnik/Unicode/Unicode_510/S7.6_A5.3_T1-expected.txt: Removed.
      * platform/mac-snowleopard/sputnik/Unicode/Unicode_510/S7.6_A5.3_T2-expected.txt: Removed.
      * platform/mac/sputnik/Unicode/Unicode_510/S7.6_A3.1-expected.txt: Removed.
      * platform/mac/sputnik/Unicode/Unicode_510/S7.6_A3.2-expected.txt: Removed.
      * platform/mac/sputnik/Unicode/Unicode_510/S7.6_A5.3_T1-expected.txt: Removed.
      * platform/mac/sputnik/Unicode/Unicode_510/S7.6_A5.3_T2-expected.txt: Removed.
      * sputnik/Unicode/Unicode_510/S7.6_A3.1-expected.txt:
      * sputnik/Unicode/Unicode_510/S7.6_A3.2-expected.txt:
      * sputnik/Unicode/Unicode_510/S7.6_A5.3_T1-expected.txt:
      * sputnik/Unicode/Unicode_510/S7.6_A5.3_T2-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e76c7567
  12. 15 Jun, 2012 2 commits
  13. 17 Apr, 2012 1 commit
    • barraclough@apple.com's avatar
      Array.prototype.toString should be generic · 364138ec
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=81588
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
          - check for join function, use fast case if base object is array & join is present & default.
      * runtime/CommonIdentifiers.h:
          - added 'join'.
      
      LayoutTests: 
      
      * fast/js/array-functions-non-arrays-expected.txt:
          - check in new results
      * fast/js/array-prototype-properties-expected.txt:
          - new more detailed error message.
      * fast/js/script-tests/array-functions-non-arrays.js:
          - added new test cases, fix incorrect one.
      * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.2_Array_prototype_toString/S15.4.4.2_A2_T1-expected.txt:
          - check in failing result (test is wrong)
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      364138ec
  14. 29 Feb, 2012 1 commit
    • barraclough@apple.com's avatar
      Source/JavaScriptCore: RefCounted::deprecatedTurnOffVerifier() should not be deprecated · 39736cd9
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79864
      
      Patch by Filip Pizlo <fpizlo@apple.com> on 2012-02-28
      Reviewed by Oliver Hunt.
              
      Removed the word "deprecated" from the name of this method, since this method
      should not be deprecated. It works just fine as it is, and there is simply no
      alternative to calling this method for many interesting JSC classes.
      
      * parser/SourceProvider.h:
      (JSC::SourceProvider::SourceProvider):
      * runtime/SymbolTable.h:
      (JSC::SharedSymbolTable::SharedSymbolTable):
      * wtf/MetaAllocator.cpp:
      (WTF::MetaAllocatorHandle::MetaAllocatorHandle):
      (WTF::MetaAllocator::allocate):
      * wtf/RefCounted.h:
      (RefCountedBase):
      (WTF::RefCountedBase::turnOffVerifier):
      
      LayoutTests: 'source' property of RegExp instance cannot be ""
      https://bugs.webkit.org/show_bug.cgi?id=79938
      
      Reviewed by Oliver Hunt.
      
      15.10.6.4 specifies that RegExp.prototype.toString must return '/' + source + '/',
      and also states that the result must be a valid RegularExpressionLiteral. '//' is
      not a valid RegularExpressionLiteral (since it is a single line comment), and hence
      source cannot ever validly be "". If the source is empty, return a different Pattern
      that would match the same thing.
      
      * fast/js/kde/RegExp-expected.txt:
      * fast/js/kde/script-tests/RegExp.js:
      * fast/regex/script-tests/toString.js:
      * fast/regex/toString-expected.txt:
          - Update these tests to check for the correct result.
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A3_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A3_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A3_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A3_T4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A3_T5-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A4_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A4_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A4_T5-expected.txt:
          - Check in failing results, these tests are all incorrect.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39736cd9
  15. 26 Feb, 2012 1 commit
    • fpizlo@apple.com's avatar
      Unreviewed, update expectation files due to slight changes in the text · ad870559
      fpizlo@apple.com authored
      of exceptions.
      
      * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8.1_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8.1_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T1-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T2-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T3-expected.txt:
      * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad870559
  16. 24 Feb, 2012 1 commit
    • barraclough@apple.com's avatar
      Should not allow malformed \x escapes · 2f3e1e6c
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79462
      
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore: 
      
      * parser/Lexer.cpp:
      (JSC::::parseString):
      (JSC::::parseStringSlowCase):
          - Prohibit malformed '\x' escapes
      * tests/mozilla/ecma/Array/15.4.5.1-1.js:
      * tests/mozilla/ecma/LexicalConventions/7.7.4.js:
      * tests/mozilla/ecma_2/RegExp/hex-001.js:
      * tests/mozilla/js1_2/regexp/hexadecimal.js:
          - Remove erroneous test cases (correct behaviour is tested by LayoutTests/sputnik).
      
      LayoutTests: 
      
      * fast/regex/script-tests/pcre-test-1.js:
          - Fix bad escapes in test case.
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T6-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.1_T4-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.2_T1-expected.txt:
      * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A6.2_T2-expected.txt:
          - Check in passing results.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f3e1e6c
  17. 23 Feb, 2012 2 commits
    • arv@chromium.org's avatar
      Rename DOMWindow to Window in the bindings · 0c768508
      arv@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=78721
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Covered by existing tests.
      
      * inspector/front-end/DetailedHeapshotGridNodes.js:
      (WebInspector.HeapSnapshotGenericObjectNode):
      (WebInspector.HeapSnapshotGenericObjectNode.prototype.isWindow):
      * inspector/front-end/HeapSnapshot.js:
      (WebInspector.HeapSnapshotNode.prototype.get isWindow):
      (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
      (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
      * page/DOMWindow.idl:
      
      LayoutTests:
      
      * fast/dom/Window/atob-btoa-expected.txt:
      * fast/dom/Window/atob-btoa.html:
      * fast/dom/Window/window-lookup-precedence-expected.txt:
      * fast/dom/Window/window-lookup-precedence.html:
      * fast/dom/Window/window-postmessage-args-expected.txt:
      * fast/dom/Window/window-properties-expected.txt:
      * fast/dom/Window/window-property-descriptors-expected.txt:
      * fast/dom/dom-constructors-expected.txt:
      * fast/dom/dom-constructors.html:
      * fast/dom/prototype-inheritance-2-expected.txt:
      * fast/dom/script-tests/prototype-inheritance-2.js:
      (pushPropertyValuesWithUnseenTypes):
      * fast/dom/wrapper-classes-expected.txt:
      * fast/dom/wrapper-classes.html:
      * fast/events/device-orientation-crash-expected.txt:
      * fast/events/device-orientation-crash.html:
      * fast/events/event-trace-expected.txt:
      * fast/events/event-view-toString-expected.txt:
      * fast/events/popup-blocked-to-post-blank-expected.txt:
      * fast/events/popup-blocked-to-post-blank.html:
      * fast/js/eval-cross-window-expected.txt:
      * fast/js/eval-keyword-vs-function-expected.txt:
      * fast/js/function-bind-expected.txt:
      * fast/js/mozilla/strict/10.4.3-expected.txt:
      * fast/js/mozilla/strict/15.3.4.5-expected.txt:
      * fast/js/mozilla/strict/this-for-function-expression-recursion-expected.txt:
      * fast/js/script-tests/function-bind.js:
      * fast/js/toString-and-valueOf-override-expected.txt:
      * http/tests/inspector-enabled/console-clear-arguments-on-frame-remove-expected.txt:
      * http/tests/security/cross-frame-access-custom-expected.txt:
      * http/tests/security/cross-frame-access-custom.html:
      * http/tests/security/cross-frame-access-put-expected.txt:
      * http/tests/security/document-all-expected.txt:
      * inspector/console/console-dir-global-expected.txt:
      * inspector/debugger/debugger-expand-scope-expected.txt:
      * inspector/profiler/heap-snapshot-test.js:
      (initialize_HeapSnapshotTest.InspectorTest.createHeapSnapshotMockWithDOM):
      (initialize_HeapSnapshotTest):
      * inspector/profiler/heap-snapshot.html:
      * java/lc3/JSObject/ToJSObject-001-expected.txt:
      * java/lc3/JSObject/ToObject-001-expected.txt:
      * java/lc3/JSObject/ToString-001-expected.txt:
      * platform/chromium-mac/fast/events/event-view-toString-expected.txt:
      * platform/chromium-win/fast/events/event-view-toString-expected.txt:
      * platform/chromium-win/fast/js/README:
      * platform/chromium/fast/dom/Window/window-lookup-precedence-expected.txt:
      * platform/chromium/fast/dom/Window/window-postmessage-args-expected.txt:
      * platform/chromium/fast/dom/wrapper-classes-expected.txt:
      * platform/chromium/fast/js/mozilla/strict/15.3.4.5-expected.txt:
      * platform/chromium/fast/js/toString-and-valueOf-override-expected.txt:
      * platform/chromium/http/tests/security/cross-frame-access-call-expected.txt:
      * platform/chromium/http/tests/security/cross-frame-access-put-expected.txt:
      * platform/chromium/inspector/console/console-dir-global-expected.txt:
      * platform/chromium/inspector/debugger/debugger-expand-scope-expected.txt:
      * platform/gtk/fast/dom/Window/window-properties-expected.txt:
      * platform/gtk/fast/dom/prototype-inheritance-2-expected.txt:
      * platform/gtk/fast/js/global-constructors-expected.txt:
      * platform/gtk/http/tests/security/cross-frame-access-put-expected.txt:
      * platform/mac/fast/dom/Window/window-properties-expected.txt:
      * platform/mac/fast/dom/Window/window-property-descriptors-expected.txt:
      * platform/mac/fast/dom/prototype-inheritance-2-expected.txt:
      * platform/mac/fast/dom/wrapper-classes-objc.html:
      * platform/mac/fast/js/global-constructors-expected.txt:
      * platform/qt-5.0-wk2/fast/dom/Window/window-properties-expected.txt:
      * platform/qt-5.0-wk2/fast/dom/Window/window-property-descriptors-expected.txt:
      * platform/qt-5.0-wk2/fast/dom/prototype-inheritance-2-expected.txt:
      * platform/qt-arm/fast/dom/Window/window-property-descriptors-expected.txt:
      * platform/qt/fast/dom/Window/window-properties-expected.txt:
      * platform/qt/fast/dom/prototype-inheritance-2-expected.txt:
      * platform/qt/fast/js/global-constructors-expected.txt:
      * platform/qt/http/tests/security/cross-frame-access-put-expected.txt:
      * platform/win/fast/dom/Window/window-properties-expected.txt:
      * platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
      * platform/win/fast/dom/prototype-inheritance-2-expected.txt:
      * sputnik/Conformance/11_Expressions/11.1_Primary_Expressions/11.1.1_The_this_Keyword/S11.1.1_A2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A1_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A2_T1-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c768508
    • barraclough@apple.com's avatar
      pop of array hole should get from the prototype chain · 30ddfb17
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79338
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::pop):
          - If the fast fast vector case fails, more closely follow the spec.
      
      LayoutTests: 
      
      * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.6_Array_prototype_pop/S15.4.4.6_A4_T1-expected.txt:
          - Checking passing test result.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30ddfb17
  18. 02 Jan, 2012 1 commit
  19. 17 Oct, 2011 2 commits
    • barraclough@apple.com's avatar
      Exception ordering in String.prototype.replace · fd80706b
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70290
      
      Source/JavaScriptCore: 
      
      If pattern is not a regexp, it should be converted toString before the replacement value has it's toString conversion called.
      
      Reviewed by Oliver Hunt.
      
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncReplace):
      
      LayoutTests: 
      
      Reviewed by Oliver Hunt.
      
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T11-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T12-expected.txt:
          - Check in passing results.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd80706b
    • barraclough@apple.com's avatar
      Incorrect behavior from String match/search & undefined pattern · 2f9824a2
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70286
      
      Reviewed by Sam weinig.
      
      Source/JavaScriptCore: 
      
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncMatch):
          - In case of undefined, pattern is "".
      (JSC::stringProtoFuncSearch):
          - In case of undefined, pattern is "".
      
      LayoutTests: 
      
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T6-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T8-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T9-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T4-expected.txt:
          - Check in passing results.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f9824a2
  20. 14 Oct, 2011 1 commit
    • barraclough@apple.com's avatar
      Most built-in properties are not deletable · dfe18a56
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=61014
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore: 
      
      Our static hash tables don't allow for deleting properties.
      This is the cause of a bunch of expected failures in LayoutTests/sputnik.
      
      This fixes the problem by reifying all static functions immediately prior
      to the first deletion.  Reification is tracked by a flag on the structure,
      so properties will no longer 'bounce-back' on later access.
      
      Theoretically there could probably also be an issue with custom accessor
      properties, but we probably do not really require any of these to be
      Configurable anyway. I'll follow up with a separate patch to address this.
      
      * runtime/ClassInfo.h:
      (JSC::ClassInfo::hasStaticProperties):
          - detects static property tables.
      * runtime/JSObject.cpp:
      (JSC::JSObject::deleteProperty):
          - call reifyStaticFunctions before deletion.
      (JSC::JSObject::reifyStaticFunctions):
          - If the class has static functions, set them up now.
      * runtime/JSObject.h:
      (JSC::JSObject::staticFunctionsReified):
          - returns true if static functions have been reified,
            and as such should no longer be added.
      * runtime/Lookup.cpp:
      (JSC::setUpStaticFunctionSlot):
          - If static functions have been reified do not add.
      * runtime/Lookup.h:
      (JSC::HashTable::ConstIterator::ConstIterator):
      (JSC::HashTable::ConstIterator::operator->):
      (JSC::HashTable::ConstIterator::operator*):
      (JSC::HashTable::ConstIterator::operator!=):
      (JSC::HashTable::ConstIterator::operator++):
      (JSC::HashTable::ConstIterator::skipInvalidKeys):
      (JSC::HashTable::begin):
      (JSC::HashTable::end):
      (JSC::getStaticPropertySlot):
      (JSC::getStaticPropertyDescriptor):
      (JSC::getStaticFunctionSlot):
      (JSC::getStaticFunctionDescriptor):
          - setUpStaticFunctionSlot may not add, returns a bool.
      (JSC::lookupPut):
          - remove redundant branch.
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
          - initialize new flag in constructors.
      * runtime/Structure.h:
      (JSC::Structure::staticFunctionsReified):
      (JSC::Structure::setStaticFunctionsReified):
          - added flag
      
      LayoutTests: 
      
      Mostly checking in passing results, added a couple of extra test cases to fast/js/delete-syntax.
      
      * fast/js/delete-syntax-expected.txt:
      * fast/js/script-tests/delete-syntax.js:
      * ietestcenter/Javascript/11.4.1-4.a-10-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/S15.4.4_A1.1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/S15.5.4.1_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/S15.5.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/S15.5.4_A3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.2/S15.6.2.1_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.3/15.6.3.1_Boolean.prototype/S15.6.3.1_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.4/S15.6.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.2/S15.7.2.1_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.3/15.7.3.1_Number.prototype/S15.7.3.1_A2_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.4/S15.7.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.4/15.9.4.2_Date.parse/S15.9.4.2_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.4/15.9.4.3_Date.UTC/S15.9.4.3_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.10_Date.prototype.getFullYear/S15.9.5.10_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.11_Date.prototype.getUTCFullYear/S15.9.5.11_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.12_Date.prototype.getMonth/S15.9.5.12_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.13_Date.prototype.getUTCMonth/S15.9.5.13_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.14_Date.prototype.getDate/S15.9.5.14_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.15_Date.prototype.getUTCDate/S15.9.5.15_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.16_Date.prototype.getDay/S15.9.5.16_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.17_Date.prototype.getUTCDay/S15.9.5.17_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.18_Date.prototype.getHours/S15.9.5.18_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.19_Date.prototype.getUTCHours/S15.9.5.19_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.20_Date.prototype.getMinutes/S15.9.5.20_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.21_Date.prototype.getUTCMinutes/S15.9.5.21_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.22_Date.prototype.getSeconds/S15.9.5.22_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.23_Date.prototype.getUTCSeconds/S15.9.5.23_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.24_Date.prototype.getMilliseconds/S15.9.5.24_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.25_Date.prototype.getUTCMilliseconds/S15.9.5.25_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.26_Date.prototype.getTimezoneOffset/S15.9.5.26_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.27_Date.prototype.setTime/S15.9.5.27_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.28_Date.prototype.setMilliseconds/S15.9.5.28_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.29_Date.prototype.setUTCMilliseconds/S15.9.5.29_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.2_Date.prototype.toString/S15.9.5.2_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.30_Date.prototype.setSeconds/S15.9.5.30_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.31_Date.prototype.setUTCSeconds/S15.9.5.31_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.32_Date.prototype.setMinutes/S15.9.5.32_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.33_Date.prototype.setUTCMinutes/S15.9.5.33_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.34_Date.prototype.setHours/S15.9.5.34_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.35_Date.prototype.setUTCHours/S15.9.5.35_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.36_Date.prototype.setDate/S15.9.5.36_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.37_Date.prototype.setUTCDate/S15.9.5.37_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.38_Date.prototype.setMonth/S15.9.5.38_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.39_Date.prototype.setUTCMonth/S15.9.5.39_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.3_Date.prototype.toDateString/S15.9.5.3_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.40_Date.prototype.setFullYear/S15.9.5.40_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.41_Date.prototype.setUTCFullYear/S15.9.5.41_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.42_Date.prototype.toUTCString/S15.9.5.42_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.4_Date.prototype.toTimeString/S15.9.5.4_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.5_Date.prototype.toLocaleString/S15.9.5.5_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.6_Date.prototype.toLocaleDateString/S15.9.5.6_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.7_Date.prototype.toLocaleTimeString/S15.9.5.7_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.8_Date.prototype.valueOf/S15.9.5.8_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.9_Date.prototype.getTime/S15.9.5.9_A1_T2-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dfe18a56
  21. 19 Sep, 2011 1 commit
    • barraclough@apple.com's avatar
      String#split is buggy · 83df0075
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68348
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      * runtime/StringPrototype.cpp:
      (JSC::jsStringWithReuse):
          - added helper function to reuse original JSString value.
      (JSC::stringProtoFuncSplit):
          - Rewritten from the spec.
      * tests/mozilla/ecma/String/15.5.4.8-2.js:
      (getTestCases):
          - This test is not ES5 compliant.
      
      LayoutTests: 
      
      * fast/js/script-tests/string-split-conformance.js: Added.
      * fast/js/string-split-conformance-expected.txt: Added.
      * fast/js/string-split-conformance.html: Added.
          - Added new Layout test based on:
              http://stevenlevithan.com/demo/split.cfm
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T6-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T8-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T9-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A2_T7-expected.txt:
          - Check in failing results for these 5 tests; they are all wrong
            (see https://bugs.ecmascript.org/show_bug.cgi?id=61).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83df0075
  22. 28 Jul, 2011 1 commit
  23. 21 Jul, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=64900 · 4f1989c2
      barraclough@apple.com authored
      Function.prototype.apply should accept an array-like object as its second argument
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/FunctionPrototype.cpp:
      (JSC::functionProtoFuncApply):
          - Remove the type error if object is not an array.
      
      LayoutTests: 
      
      * fast/js/function-apply-expected.txt:
      * fast/js/script-tests/function-apply.js:
          - Add a test for array-like objects.
      * sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/15.3.4.3_Function.prototype.apply/S15.3.4.3_A6_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/15.3.4.3_Function.prototype.apply/S15.3.4.3_A6_T4-expected.txt:
          - These tests are incorrect & assert ES3 behaviour.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f1989c2
  24. 20 Jul, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=64678 · 1c6f95dd
      barraclough@apple.com authored
      Fix bugs in Object.prototype this handling.
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore: 
      
      Fix ES5.1 correctness issues identified by Mads Ager.
      
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncToString):
          - ES5.1 expects toString of undefined/null to produce "[object Undefined]"/"[object Null]".
      
      LayoutTests: 
      
      * fast/js/object-prototype-properties-expected.txt:
      * fast/js/script-tests/object-prototype-properties.js:
          - Fix these tests to check Object.prototype explicitly, not the Global Object, and expect ES5.1 correct results.
      * sputnik/Conformance/11_Expressions/11.1_Primary_Expressions/11.1.1_The_this_Keyword/S11.1.1_A2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.13_String.prototype.slice/S15.5.4.13_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.15_String.prototype.substring/S15.5.4.15_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.4_String.prototype.charAt/S15.5.4.4_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.5_String.prototype.charCodeAt/S15.5.4.5_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.6_String.prototype.concat/S15.5.4.6_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.7_String.prototype.indexOf/S15.5.4.7_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T3-expected.txt:
          - Slight change in expected results, these tests are all incorrect, were all FAILing, and are still all FAILing.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c6f95dd
  25. 18 Jul, 2011 1 commit
  26. 15 Jul, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=64250 · 19afeced
      barraclough@apple.com authored
      Global strict mode function leaking global object as "this".
      
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore: 
      
      The root problem here is that we pass the wrong values into
      calls, and then try to fix them up in the callee. Correct
      behaviour per the spec is to pass in the value undefined,
      as this unless either (1) the function call is based on an
      explicit property access or (2) the base of the call comes
      directly from a 'with'.
      
      This change does away with the need for this conversion of
      objects (non strict code should only box primitives), and
      does away with all this conversion for strict functions.
      
      This patch may have web compatibility ramifications, and may
      require some advocacy.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dump):
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * bytecode/Opcode.h:
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::emitResolveWithThis):
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * bytecompiler/BytecodeGenerator.h:
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * bytecompiler/NodesCodegen.cpp:
      (JSC::EvalFunctionCallNode::emitBytecode):
      (JSC::FunctionCallResolveNode::emitBytecode):
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
          - Change NeedsThisConversion check to test for JSString's vptr
            (objects no longer need conversion).
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::resolveThisAndProperty):
          - Based on resolveBaseAndProperty, but produce correct this value.
      (JSC::Interpreter::privateExecute):
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * interpreter/Interpreter.h:
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileMainPass):
      (JSC::JIT::privateCompileSlowCases):
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * jit/JIT.h:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_resolve_with_this):
          - Removed op_convert_this_strict, added op_resolve_with_this.
      (JSC::JIT::emit_op_convert_this):
      (JSC::JIT::emitSlow_op_convert_this):
          - Change NeedsThisConversion check to test for JSString's vptr
            (objects no longer need conversion).
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_resolve_with_this):
          - Removed op_convert_this_strict, added op_resolve_with_this.
      (JSC::JIT::emit_op_convert_this):
      (JSC::JIT::emitSlow_op_convert_this):
          - Change NeedsThisConversion check to test for JSString's vptr
            (objects no longer need conversion).
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * jit/JITStubs.h:
          - Removed op_convert_this_strict, added op_resolve_with_this.
      * runtime/JSActivation.h:
          - removed NeedsThisConversion flag, added IsEnvironmentRecord.
      * runtime/JSStaticScopeObject.h:
          - removed NeedsThisConversion flag, added IsEnvironmentRecord.
      * runtime/JSString.h:
      (JSC::RopeBuilder::createStructure):
          - removed NeedsThisConversion.
      * runtime/JSTypeInfo.h:
      (JSC::TypeInfo::isEnvironmentRecord):
      (JSC::TypeInfo::overridesHasInstance):
          - removed NeedsThisConversion flag, added IsEnvironmentRecord.
      * runtime/JSValue.h:
          - removed NeedsThisConversion.
      * runtime/JSVariableObject.h:
          - Corrected StructureFlags inheritance.
      * runtime/StrictEvalActivation.h:
      (JSC::StrictEvalActivation::createStructure):
          - Added IsEnvironmentRecord to StructureFlags, addded createStructure.
      * runtime/Structure.h:
          - removed NeedsThisConversion.
      * tests/mozilla/ecma/String/15.5.4.6-2.js:
      (getTestCases):
          - Removed invalid test case.
      
      Source/WebCore: 
      
      * bindings/js/JSMainThreadExecState.h:
      (WebCore::JSMainThreadExecState::call):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
          - Change call to pass DOM Window shell, instead of the global varaible object.
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::invoke):
      (WebKit::NetscapePluginInstanceProxy::invokeDefault):
          - Change call to pass DOM Window shell, instead of the global varaible object.
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/NPJSObject.cpp:
      (WebKit::NPJSObject::invoke):
          - Change call to pass DOM Window shell, instead of the global varaible object.
      
      LayoutTests: 
      
      Add test case / update test results.
      
      * fast/js/call-base-resolution-expected.txt: Added.
      * fast/js/call-base-resolution.html: Added.
          - Add test for ES5 correct this value resolution in calls.
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.13_String.prototype.slice/S15.5.4.13_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.15_String.prototype.substring/S15.5.4.15_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.4_String.prototype.charAt/S15.5.4.4_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.5_String.prototype.charCodeAt/S15.5.4.5_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.6_String.prototype.concat/S15.5.4.6_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.7_String.prototype.indexOf/S15.5.4.7_A1_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T3-expected.txt:
          - Check in failing results for these tests - these tests were asserting incorrect behaviour,
            and have since been fixed in test-262, see https://bugs.ecmascript.org/show_bug.cgi?id=117
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19afeced
  27. 06 Jul, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-07-06 Juan C. Montemayor <jmont@apple.com> · 5b9747e8
      commit-queue@webkit.org authored
              ASSERT_NOT_REACHED running test 262
              https://bugs.webkit.org/show_bug.cgi?id=63951
      
              Added a test to check compliance with reserved words in strict mode.
              Updated test results.
      
              Reviewed by Gavin Barraclough.
      
              * fast/js/kde/parse-expected.txt:
              * fast/js/reserved-words-as-property-expected.txt:
              * fast/js/reserved-words-strict-expected.txt: Added.
              * fast/js/reserved-words-strict.html: Added.
              * fast/js/script-tests/reserved-words-strict.js: Added.
              (isReserved):
              * platform/chromium/fast/js/reserved-words-strict-expected.txt: Added.
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T13-expected.txt:
      2011-07-06  Juan C. Montemayor  <jmont@apple.com>
      
              ASSERT_NOT_REACHED running test 262
              https://bugs.webkit.org/show_bug.cgi?id=63951
      
              Added a case to the switch statement where the code was failing. Fixed
              some logic as well that gave faulty error messages.
      
              Reviewed by Gavin Barraclough.
      
              * parser/JSParser.cpp:
              (JSC::JSParser::getTokenName):
              (JSC::JSParser::updateErrorMessageSpecialCase):
              (JSC::JSParser::updateErrorMessage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b9747e8
  28. 05 Jul, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=63880 · 8a8aab64
      barraclough@apple.com authored
      Evaluation order of conversions of operands to >, >= incorrect.
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      Add 'leftFirst' parameter to jsLess, jsLessEq matching that described in the ES5
      spec. This allows these methods to be reused to perform >, >= relational compares
      with correct ordering of type conversions.
      
      * dfg/DFGOperations.cpp:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/Operations.h:
      (JSC::jsLess):
      (JSC::jsLessEq):
      
      LayoutTests: 
      
      Updated layout test results. Two of these tests now pass, however for
      the third we now need to check in failing results, since the test is
      incorrect!
      
      The problem if that the test author has made the mistake of thinking
      that the evaluation order for the operands to '>' is RHS then LHS.
      This is due to a quirk in the way the spec is written. The greater
      than opeator is defined to call the abstract relational comparison
      algorithm with 'leftFirst' set to false, and as such conversion is
      performed on the second operand ('y') first (see 11.8.5). However
      the abstract relational comparison algorith is performing a less
      than comaprison, and the greater than operator calls this algorithm
      with the operands to the greater than operator reversed (see 11.8.2).
      As such, the second operand to the abstract comaparison is the LHS
      of the greater than. This bug also affects the corresponding less
      than or equals test, where we already we have failing results checked
      in, and again it is the test that is wrong (for the same reason).
      
      * fast/js/exception-sequencing-binops2-expected.txt:
      * sputnik/Conformance/11_Expressions/11.8_Relational_Operators/11.8.2_The_Greater_than_Operator/S11.8.2_A2.3_T1-expected.txt:
      * sputnik/Conformance/11_Expressions/11.8_Relational_Operators/11.8.4_The_Grater_than_or_equal_Operator/S11.8.4_A2.3_T1-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a8aab64
  29. 01 Jul, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-07-01 Juan C. Montemayor <jmont@apple.com> · 3d5ab959
      commit-queue@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Lexer error messages are currently appalling
              https://bugs.webkit.org/show_bug.cgi?id=63340
      
              Updated expected test results.
      
              * fast/js/basic-strict-mode-expected.txt:
              * fast/js/kde/parse-expected.txt:
              * fast/js/kde/string-1-n-expected.txt:
              * fast/js/kde/string-2-n-expected.txt:
              * fast/js/numeric-escapes-in-string-literals-expected.txt:
              * fast/js/removing-Cf-characters-expected.txt:
              * fast/regex/non-pattern-characters-expected.txt:
              * http/tests/websocket/tests/bad-sub-protocol-control-chars-expected.txt:
              * loader/reload-subresource-when-type-changes-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.1_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.2_T1-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T1-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T2-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T1-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T2-expected.txt:
      2011-07-01  Juan C. Montemayor  <jmont@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Lexer error messages are currently appalling
              https://bugs.webkit.org/show_bug.cgi?id=63340
      
              Added error messages for the Lexer. These messages will be displayed
              instead of the lexer error messages from the parser that are currently
              shown.
      
              * parser/Lexer.cpp:
              (JSC::Lexer::getInvalidCharMessage):
              (JSC::Lexer::setCode):
              (JSC::Lexer::parseString):
              (JSC::Lexer::lex):
              (JSC::Lexer::clear):
              * parser/Lexer.h:
              (JSC::Lexer::getErrorMessage):
              (JSC::Lexer::setOffset):
              * parser/Parser.cpp:
              (JSC::Parser::parse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3d5ab959
  30. 20 Jun, 2011 1 commit
    • oliver@apple.com's avatar
      2011-06-20 Juan C. Montemayor <jmont@apple.com> · 1b61eb07
      oliver@apple.com authored
              Reviewed by Oliver Hunt.
      
              No context for javascript parse errors.
              https://bugs.webkit.org/show_bug.cgi?id=62613
      
              Ran 'run-webkit-tests --reset' with 'fast/js/' and 'sputnik' to update
              those tests with the new parser error messages.
      
              The test 'fast/js/script-tests/parser-syntax-check.js' was fixed to
              not fail with the new parser error messages.
      
              * fast/dom/SelectorAPI/unknown-pseudo-expected.txt:
              * fast/dom/javascript-url-exception-isolation-expected.txt:
              * fast/encoding/meta-in-script-expected.txt:
              * fast/events/window-onerror5-expected.txt:
              * fast/events/window-onerror6-expected.txt:
              * fast/js/assign-expected.txt:
              * fast/js/basic-strict-mode-expected.txt:
              * fast/js/break-ASI-expected.txt:
              * fast/js/function-declaration-expected.txt:
              * fast/js/function-toString-object-literals-expected.txt:
              * fast/js/function-toString-parentheses-expected.txt:
              * fast/js/js-continue-break-restrictions-expected.txt:
              * fast/js/kde/garbage-n-expected.txt:
              * fast/js/kde/parse-expected.txt:
              * fast/js/kde/string-1-n-expected.txt:
              * fast/js/kde/string-2-n-expected.txt:
              * fast/js/mozilla/strict/12.14.1-expected.txt:
              * fast/js/mozilla/strict/13.1-expected.txt:
              * fast/js/mozilla/strict/regress-532254-expected.txt:
              * fast/js/no-semi-insertion-at-end-of-script-expected.txt:
              * fast/js/numeric-escapes-in-string-literals-expected.txt:
              * fast/js/object-extra-comma-expected.txt:
              * fast/js/object-literal-syntax-expected.txt:
              * fast/js/parser-xml-close-comment-expected.txt:
              * fast/js/postfix-syntax-expected.txt:
              * fast/js/regexp-compile-crash-expected.txt:
              * fast/js/removing-Cf-characters-expected.txt:
              * fast/js/reserved-words-as-property-expected.txt:
              * fast/js/script-tests/parser-syntax-check.js:
              (runTest):
              * fast/parser/entity-end-script-tag-expected.txt:
              * fast/regex/non-pattern-characters-expected.txt:
              * html5lib/runner-expected.txt:
              * http/tests/websocket/tests/bad-sub-protocol-control-chars-expected.txt:
              * http/tests/workers/shared-worker-importScripts-expected.txt:
              * http/tests/workers/worker-importScripts-expected.txt:
              * inspector/console/console-log-syntax-error-expected.txt:
              * inspector/debugger/debugger-autocontinue-on-syntax-error-expected.txt:
              * java/lc3/JavaObject/JavaObjectToBoolean-001-n-expected.txt:
              * loader/reload-subresource-when-type-changes-expected.txt:
              * platform/mac/fast/tokenizer/002-expected.txt:
              * platform/mac/fast/tokenizer/external-script-document-write_2-expected.txt:
              * platform/mac/fast/tokenizer/script_extra_close-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.2_White_Space/S7.2_A5_T5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.1_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.2_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.3_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A3.4_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A6_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A4_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A4_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.10-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.11-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.12-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.13-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.14-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.15-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.16-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.17-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.19-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.20-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.21-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.22-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.23-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.24-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.25-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.7-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.8-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.2_Keywords/S7.5.2_A1.9-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.10-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.11-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.16-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.27-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.7-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.9-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T10-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T7-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T8-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.7_Punctuators/S7.7_A2_T9-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.1_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.1_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.2_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.2_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.3_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.3_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.5_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.5_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.3_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.3_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.5_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.5_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T7-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T8-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A3.1_T9-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/7.9.2_Examples/S7.9.2_A1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/7.9.2_Examples/S7.9.2_A1_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/7.9.2_Examples/S7.9.2_A1_T6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A10_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A10_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A10_T6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A10_T8-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A11_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A11_T8-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A5.1_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A5.3_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T10-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T7-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T8-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.2_T9-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T3-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T4-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T5-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.3_T7-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.4_T1-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A6.4_T2-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A9_T6-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A9_T7-expected.txt:
              * sputnik/Conformance/07_Lexical_Conventions/7.9_Automatic_Semicolon_Insertion/S7.9_A9_T8-expected.txt:
              * sputnik/Conformance/08_Types/8.2_The_Null_Type/S8.2_A2-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T1-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T2-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T3-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T1-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T2-expected.txt:
              * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T3-expected.txt:
              * sputnik/Conformance/11_Expressions/11.2_Left_Hand_Side_Expressions/11.2.4_Argument_Lists/S11.2.4_A1.3_T1-expected.txt:
              * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.1_Postfix_Increment_Operator/S11.3.1_A1.1_T1-expected.txt:
              * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.1_Postfix_Increment_Operator/S11.3.1_A1.1_T2-expected.txt:
              * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.1_Postfix_Increment_Operator/S11.3.1_A1.1_T3-expected.txt:
              * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.1_Postfix_Increment_Operator/S11.3.1_A1.1_T4-expected.txt:
              * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.2_Postfix_Decrement_Operator/S11.3.2_A1.1_T1-expected.txt:
              * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.2_Postfix_Decrement_Operator/S11.3.2_A1.1_T2-expected.txt:
              * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.2_Postfix_Decrement_Operator/S11.3.2_A1.1_T3-expected.txt:
              * sputnik/Conformance/11_Expressions/11.3_PostfixExpressions/11.3.2_Postfix_Decrement_Operator/S11.3.2_A1.1_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A2_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A3_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A3_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A3_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A3_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.11_The_switch_Statement/S12.11_A3_T5-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T10-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T11-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T12-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T13-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T14-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T15-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T5-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T6-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T7-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T8-expected.txt:
              * sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T9-expected.txt:
              * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T5-expected.txt:
              * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T6-expected.txt:
              * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T7-expected.txt:
              * sputnik/Conformance/12_Statement/12.2_Variable_Statement/S12.2_A8_T8-expected.txt:
              * sputnik/Conformance/12_Statement/12.4_Expression_Statement/S12.4_A1-expected.txt:
              * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A11-expected.txt:
              * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A6_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A8-expected.txt:
              * sputnik/Conformance/12_Statement/12.5_The_if_Statement/S12.5_A9_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A12-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A15-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T5-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A6_T6-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A13_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A15-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T5-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.2_The_while_statement/S12.6.2_A6_T6-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A11.1_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A11_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A12.1_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A12_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A4.1-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A4_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A4_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A7.1_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A7.1_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A7_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A7_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8.1_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8.1_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8.1_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A8_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A13_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A1_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A1_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A1_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A1_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A5_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A5_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A5_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A6-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A8_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.7_The_continue_Statement/S12.7_A8_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A1_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A1_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A1_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A1_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A5_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A5_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A5_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A6-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A8_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.8_The_break_Statement/S12.8_A8_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T1-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T10-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T2-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T3-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T4-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T5-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T6-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T7-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T8-expected.txt:
              * sputnik/Conformance/12_Statement/12.9_The_return_Statement/S12.9_A1_T9-expected.txt:
              * sputnik/Conformance/13_Function_Definition/S13_A7_T3-expected.txt:
              * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/15.1.2/15.1.2.1_eval/S15.1.2.1_A2_T2-expected.txt:
              * sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/15.3.4.2_Function.prototype.toString/S15.3.4.2_A1_T1-expected.txt:
      2011-06-20  Juan C. Montemayor  <jmont@apple.com>
      
              Reviewed by Oliver Hunt.
      
              No context for javascript parse errors.
              https://bugs.webkit.org/show_bug.cgi?id=62613
      
              Parse errors now show more details like:
              "Unexpected token: ]"
              or
              "Expected token: while"
      
              For reserved names, numbers, indentifiers, strings, lexer errors,
              and EOFs, the following error messages are printed:
      
              "Use of reserved word: super"
              "Unexpected number: 42"
              "Unexpected identifier: "
              "Unexpected string: "foobar""
              "Invalid token character sequence: \u4023"
              "Unexpected EOF"
      
              * parser/JSParser.cpp:
              (JSC::JSParser::consume):
              (JSC::JSParser::getToken):
              (JSC::JSParser::getTokenName):
              (JSC::JSParser::updateErrorMessageSpecialCase):
              (JSC::JSParser::updateErrorMessage):
              (JSC::JSParser::updateErrorWithNameAndMessage):
              (JSC::jsParse):
              (JSC::JSParser::JSParser):
              (JSC::JSParser::parseProgram):
              (JSC::JSParser::parseVarDeclarationList):
              (JSC::JSParser::parseForStatement):
              (JSC::JSParser::parseBreakStatement):
              (JSC::JSParser::parseContinueStatement):
              (JSC::JSParser::parseWithStatement):
              (JSC::JSParser::parseTryStatement):
              (JSC::JSParser::parseStatement):
              (JSC::JSParser::parseFormalParameters):
              (JSC::JSParser::parseFunctionInfo):
              (JSC::JSParser::parseAssignmentExpression):
              (JSC::JSParser::parsePrimaryExpression):
              (JSC::JSParser::parseMemberExpression):
              (JSC::JSParser::parseUnaryExpression):
              * parser/JSParser.h:
              * parser/Lexer.cpp:
              (JSC::Lexer::lex):
              * parser/Parser.cpp:
              (JSC::Parser::parse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b61eb07
  31. 09 Jun, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 62405 - Fix integer overflow in Array.prototype.push · 404b4006
      barraclough@apple.com authored
      Reviewed by Oliver Hunt.
      
      There are three integer overflows here, leading to safe (not a security risk)
      but incorrect (non-spec-compliant) behaviour.
      
      Two overflows occur when calculating the new length after pushing (one in the
      fast version of push in JSArray, one in the generic version in ArrayPrototype).
      The other occurs calculating indices to write to when multiple items are pushed.
      
      These errors result in three test-262 failures.
      
      Source/JavaScriptCore: 
      
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncPush):
      * runtime/JSArray.cpp:
      (JSC::JSArray::put):
      (JSC::JSArray::push):
      
      LayoutTests: 
      
      * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.7_Array_prototype_push/S15.4.4.7_A3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.7_Array_prototype_push/S15.4.4.7_A4_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.7_Array_prototype_push/S15.4.4.7_A4_T3-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      404b4006
  32. 17 May, 2011 1 commit
    • ggaren@apple.com's avatar
      Source/JavaScriptCore: Rolling back in r86653 with build fixed. · 19fe5092
      ggaren@apple.com authored
      Reviewed by Gavin Barraclough and Oliver Hunt.
      
      Global object initialization is expensive
      https://bugs.webkit.org/show_bug.cgi?id=60933
              
      Changed a bunch of globals to allocate their properties lazily, and changed
      the global object to allocate a bunch of its globals lazily.
              
      This reduces the footprint of a global object from 287 objects with 58
      functions for 24K to 173 objects with 20 functions for 15K.
      
      Large patch, but it's all mechanical.
      
      * DerivedSources.make:
      * JavaScriptCore.exp: Build!
      
      * create_hash_table: Added a special case for fromCharCode, since it uses
      a custom "thunk generator".
      
      * heap/Heap.cpp:
      (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
      overcount objects that were owned through more than one mechanism because
      it was getting in the way of counting the results for this patch.
      
      * interpreter/CallFrame.h:
      (JSC::ExecState::arrayConstructorTable):
      (JSC::ExecState::arrayPrototypeTable):
      (JSC::ExecState::booleanPrototypeTable):
      (JSC::ExecState::dateConstructorTable):
      (JSC::ExecState::errorPrototypeTable):
      (JSC::ExecState::globalObjectTable):
      (JSC::ExecState::numberConstructorTable):
      (JSC::ExecState::numberPrototypeTable):
      (JSC::ExecState::objectPrototypeTable):
      (JSC::ExecState::regExpPrototypeTable):
      (JSC::ExecState::stringConstructorTable): Added new tables.
      
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::getOwnPropertySlot):
      (JSC::ArrayConstructor::getOwnPropertyDescriptor):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::createStructure):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::getOwnPropertySlot):
      (JSC::ArrayPrototype::getOwnPropertyDescriptor):
      * runtime/ArrayPrototype.h:
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::getOwnPropertySlot):
      (JSC::BooleanPrototype::getOwnPropertyDescriptor):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::createStructure):
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::getOwnPropertySlot):
      (JSC::DateConstructor::getOwnPropertyDescriptor):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::createStructure):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      (JSC::ErrorPrototype::getOwnPropertySlot):
      (JSC::ErrorPrototype::getOwnPropertyDescriptor):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::createStructure): Standardized these objects
      to use static tables for function properties.
      
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::~JSGlobalData):
      * runtime/JSGlobalData.h: Added new tables.
      
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::addStaticGlobals):
      (JSC::JSGlobalObject::getOwnPropertySlot):
      (JSC::JSGlobalObject::getOwnPropertyDescriptor):
      * runtime/JSGlobalObject.h:
      * runtime/JSGlobalObjectFunctions.cpp:
      * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
      static table for its global functions. This required uninlining some
      things to avoid a circular header dependency. However, those things
      probably shouldn't have been inlined in the first place.
              
      Even more global object properties can be made lazy, but that requires
      more in-depth changes.
      
      * runtime/MathObject.cpp:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getOwnPropertySlot):
      (JSC::NumberConstructor::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::getOwnPropertySlot):
      (JSC::NumberPrototype::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::ObjectPrototype):
      (JSC::ObjectPrototype::put):
      (JSC::ObjectPrototype::getOwnPropertySlot):
      (JSC::ObjectPrototype::getOwnPropertyDescriptor):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::createStructure):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      (JSC::RegExpPrototype::getOwnPropertySlot):
      (JSC::RegExpPrototype::getOwnPropertyDescriptor):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::createStructure):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::getOwnPropertySlot):
      (JSC::StringConstructor::getOwnPropertyDescriptor):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::createStructure): Standardized these objects
      to use static tables for function properties.
      
      LayoutTests: Global object initialization is expensive
      https://bugs.webkit.org/show_bug.cgi?id=60933
              
      Reviewed by Gavin Barraclough.
      
      Added a few more expected failures, now that more code uses static hash
      tables.
              
      The fact that built-ins are not deletable, but should be, is covered by
      https://bugs.webkit.org/show_bug.cgi?id=61014
      
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.2/S15.6.2.1_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.3/15.6.3.1_Boolean.prototype/S15.6.3.1_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.4/S15.6.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.2/S15.7.2.1_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.3/15.7.3.1_Number.prototype/S15.7.3.1_A2_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.4/S15.7.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.4/15.9.4.2_Date.parse/S15.9.4.2_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.4/15.9.4.3_Date.UTC/S15.9.4.3_A1_T2-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19fe5092
  33. 10 Mar, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 56077 - ES5 conformance issues with RegExp.prototype · fc9d6415
      barraclough@apple.com authored
      Reviewed by Oliver Hunt.
      
      There are three issues causing test failures in sputnik.
      
      (1) lastIndex should be converted at the point it is used, not the point it is set (this is visible if valueOf is overridden).
      (2) The 'length' property of the test/exec functions should be 1.
      (3) If no input is specified, the input to test()/exec() is "undefined" (i.e. ToString(undefined)) - not RegExp.input.
      
      Source/JavaScriptCore: 
      
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::markChildren):
          - Added to mark lastIndex
      (JSC::regExpObjectLastIndex):
      (JSC::setRegExpObjectLastIndex):
          - lastIndex is now stored as a JSValue.
      (JSC::RegExpObject::match):
          - Use accessor methods to get/set lastIndex, add fast case for isUInt32 (don't convert to double).
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::setLastIndex):
      (JSC::RegExpObject::setLastIndex):
          - Set lastIndex, either from a size_t or a JSValue.
      (JSC::RegExpObject::getLastIndex):
          - Get lastIndex.
      (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
          - Initialize as a JSValue.
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
          - Add test/exec properties with length 1.
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncMatch):
      (JSC::stringProtoFuncSearch):
          - Do not read RegExp.input if none is provided.
      * tests/mozilla/js1_2/regexp/RegExp_input.js:
      * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js:
          - Update these tests (they relied on non-ES5 behaviour).
      
      LayoutTests: 
      
      * fast/js/kde/function_length-expected.txt:
      * fast/js/kde/script-tests/function_length.js:
          - 'length' of RexExp.test/RexExp.exec is 1
      * fast/js/regexp-caching-expected.txt:
      * fast/js/regexp-test-null-string-expected.txt:
      * fast/js/regexp-test-null-string.html:
          - test() is equivalent to test("undefined")
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A11-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A1_T16-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A4_T11-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/15.10.6.3_RegExp.prototype.test/S15.10.6.3_A11-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/15.10.6.3_RegExp.prototype.test/S15.10.6.3_A1_T16-expected.txt:
          - These tests now pass!
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc9d6415
  34. 09 Mar, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 56041 - RexExp constructor should only accept flags "gim" · 1281293b
      barraclough@apple.com authored
      We also should be passing the flags around as a bitfield rather than a string,
      and should not have redundant, incompatible code for converting the string to a bitfield!
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore: 
      
      * JavaScriptCore.exp:
      * bytecompiler/NodesCodegen.cpp:
      (JSC::RegExpNode::emitBytecode):
          - Need to parse flags string to enum.
      * runtime/RegExp.cpp:
      (JSC::regExpFlags):
      (JSC::RegExp::RegExp):
      (JSC::RegExp::create):
          - Add method to parse flags string to enum, change constructor/create args to take enum.
      * runtime/RegExp.h:
      (JSC::RegExp::global):
      (JSC::RegExp::ignoreCase):
      (JSC::RegExp::multiline):
          - Change to use new enum values.
      * runtime/RegExpCache.cpp:
      (JSC::RegExpCache::lookupOrCreate):
      (JSC::RegExpCache::create):
      * runtime/RegExpCache.h:
          - Changed to use regExpFlags enum instead of int/const UString&.
      * runtime/RegExpConstructor.cpp:
      (JSC::constructRegExp):
          - Add use new enum parsing, check for error.
      * runtime/RegExpKey.h:
      (JSC::RegExpKey::RegExpKey):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
          - Pass NoFlags value instead of empty string.
      (JSC::regExpProtoFuncCompile):
          - Add use new enum parsing, check for error.
      * runtime/StringPrototype.cpp:
      (JSC::stringProtoFuncMatch):
      (JSC::stringProtoFuncSearch):
          - Pass NoFlags value instead of empty string.
      
      Source/WebCore: 
      
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneDeserializer::readTerminal):
          - Need to parse flags string back to enum.
      
      LayoutTests: 
      
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T3-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T5-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T6-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T7-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T8-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A5_T9-expected.txt:
          - Check in passing results!
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1281293b