Ignore:
Timestamp:
Feb 8, 2010, 2:26:59 PM (15 years ago)
Author:
[email protected]
Message:

Use an empty identifier instead of a null identifier for parse
tokens without an identifier.

Reviewed by Sam Weinig.

This helps encapsulate the null UStringImpl within UString.

  • parser/Grammar.y:
  • parser/NodeConstructors.h:

(JSC::ContinueNode::ContinueNode):
(JSC::BreakNode::BreakNode):
(JSC::ForInNode::ForInNode):

  • runtime/CommonIdentifiers.cpp:

(JSC::CommonIdentifiers::CommonIdentifiers):

  • runtime/CommonIdentifiers.h:
  • runtime/FunctionPrototype.cpp:

(JSC::FunctionPrototype::FunctionPrototype):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Identifier.cpp

    r54464 r54510  
    124124PassRefPtr<UString::Rep> Identifier::add(JSGlobalData* globalData, const char* c)
    125125{
    126     if (!c) {
    127         UString::Rep* rep = UString::null().rep();
    128         rep->hash();
    129         return rep;
    130     }
     126    ASSERT(c);
     127
    131128    if (!c[0]) {
    132129        UString::Rep::empty().hash();
Note: See TracChangeset for help on using the changeset viewer.