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


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.h

    r36417 r36660  
    314314    class StringNode : public ExpressionNode {
    315315    public:
    316         StringNode(JSGlobalData* globalData, const UString* v) JSC_FAST_CALL
     316        StringNode(JSGlobalData* globalData, const Identifier& v) JSC_FAST_CALL
    317317            : ExpressionNode(globalData, StringType)
    318             , m_value(*v)
     318            , m_value(v)
    319319        {
    320320        }
     
    323323       
    324324        virtual bool isString() const JSC_FAST_CALL { return true; }
    325         UString& value() { return m_value; }
     325        const Identifier& value() { return m_value; }
    326326        virtual bool isPure(CodeGenerator&) const JSC_FAST_CALL { return true; }
    327327        virtual void streamTo(SourceStream&) const JSC_FAST_CALL;
     
    329329
    330330    private:
    331         UString m_value;
     331        Identifier m_value;
    332332    };
    333333   
Note: See TracChangeset for help on using the changeset viewer.