Changeset 36660 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


Ignore:
Timestamp:
Sep 18, 2008, 11:32:12 PM (17 years ago)
Author:
Darin Adler
Message:

2008-09-18 Darin Adler <Darin Adler>

Reviewed by Maciej Stachowiak.

  • kjs/grammar.y: Get rid of string from the union, and use ident for STRING as well as for IDENT.
  • kjs/lexer.cpp: (JSC::Lexer::lex): Use makeIdentifier instead of makeUString for String.
  • kjs/lexer.h: Remove makeUString.
  • kjs/nodes.h: Changed StringNode to hold an Identifier instead of UString.
  • VM/CodeGenerator.cpp: (JSC::keyForCharacterSwitch): Updated since StringNode now holds an Identifier. (JSC::prepareJumpTableForStringSwitch): Ditto.
  • kjs/nodes.cpp: (JSC::StringNode::emitCode): Ditto. The comment from here is now in the lexer. (JSC::processClauseList): Ditto.
  • kjs/nodes2string.cpp: (JSC::StringNode::streamTo): Ditto.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r36604 r36660  
    254254    if (dst == ignoredResult())
    255255        return 0;
    256 
    257     // We atomize constant strings, in case they're later used in property lookup.
    258     return generator.emitLoad(dst, jsOwnedString(generator.globalExec(), Identifier(generator.globalExec(), m_value).ustring()));
     256    return generator.emitLoad(dst, jsOwnedString(generator.globalExec(), m_value.ustring()));
    259257}
    260258
     
    14951493                break;
    14961494            }
    1497             UString& value = static_cast<StringNode*>(clauseExpression)->value();
     1495            const UString& value = static_cast<StringNode*>(clauseExpression)->value().ustring();
    14981496            if (singleCharacterSwitch &= value.size() == 1) {
    14991497                int32_t intVal = value.rep()->data()[0];
Note: See TracChangeset for help on using the changeset viewer.