Ignore:
Timestamp:
Jul 25, 2011, 3:59:19 PM (14 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r91686.
http://trac.webkit.org/changeset/91686
https://bugs.webkit.org/show_bug.cgi?id=65144

1.5% regression in JSC (Requested by jmontemayor on #webkit).

Patch by Sheriff Bot <[email protected]> on 2011-07-25

Source/JavaScriptCore:

  • runtime/JSONObject.cpp:

(JSC::JSONProtoFuncParse):

  • runtime/LiteralParser.cpp:

(JSC::LiteralParser::Lexer::lex):
(JSC::LiteralParser::Lexer::lexString):
(JSC::LiteralParser::Lexer::lexNumber):
(JSC::LiteralParser::parse):

  • runtime/LiteralParser.h:

LayoutTests:

  • fast/js/JSON-parse-expected.txt:
  • platform/chromium/fast/js/JSON-parse-expected.txt: Removed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/LiteralParser.h

    r91686 r91715  
    4242            , m_mode(mode)
    4343        {
    44         }
    45        
    46         UString getErrorMessage()
    47         {
    48             if (m_parseErrorMessage.isEmpty())
    49                 m_parseErrorMessage = "Unable to parse JSON string";
    50             UString errorMessage = m_lexer.sawError() ?  m_lexer.getErrorMessage() : m_parseErrorMessage;
    51             return String::format("JSON Parse error: %s", errorMessage.ascii().data()).impl();
    5244        }
    5345       
     
    121113            }
    122114           
    123             bool sawError() { return !m_lexErrorMessage.isEmpty(); }
    124             UString getErrorMessage() { return m_lexErrorMessage; }
    125            
    126115        private:
    127             UString m_lexErrorMessage;
    128116            template <ParserMode mode> TokenType lex(LiteralParserToken&);
    129117            template <ParserMode mode, UChar terminator> ALWAYS_INLINE TokenType lexString(LiteralParserToken&);
     
    142130        LiteralParser::Lexer m_lexer;
    143131        ParserMode m_mode;
    144         UString m_parseErrorMessage;
    145132        static unsigned const MaximumCachableCharacter = 128;
    146133        FixedArray<Identifier, MaximumCachableCharacter> m_shortIdentifiers;
Note: See TracChangeset for help on using the changeset viewer.