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


Ignore:
Timestamp:
Jun 14, 2008, 10:24:21 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-14 Cameron Zwarich <[email protected]>

Reviewed by Maciej.

Make code generation not use a temporary for the left-hand side of an
expression if the right-hand side is a local variable.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::isLocal):
  • VM/CodeGenerator.h: (KJS::CodeGenerator::leftHandSideNeedsCopy): (KJS::CodeGenerator::emitNodeForLeftHandSide):
  • kjs/nodes.cpp: (KJS::ResolveNode::isPure): (KJS::BracketAccessorNode::emitCode): (KJS::AddNode::emitCode): (KJS::SubNode::emitCode): (KJS::ReadModifyResolveNode::emitCode): (KJS::AssignDotNode::emitCode): (KJS::ReadModifyDotNode::emitCode): (KJS::AssignBracketNode::emitCode): (KJS::ReadModifyBracketNode::emitCode):
  • kjs/nodes.h: (KJS::ExpressionNode::): (KJS::BooleanNode::): (KJS::NumberNode::): (KJS::StringNode::):
File:
1 edited

Legend:

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

    r34544 r34555  
    209209
    210210        virtual bool isNumber() const KJS_FAST_CALL { return false; }
    211         virtual bool isConstant() const KJS_FAST_CALL { return false; }       
     211        virtual bool isPure(CodeGenerator&) const KJS_FAST_CALL { return false; }       
    212212        virtual bool isLocation() const KJS_FAST_CALL { return false; }
    213213        virtual bool isResolveNode() const KJS_FAST_CALL { return false; }
     
    262262        virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
    263263
    264         virtual bool isConstant() const KJS_FAST_CALL { return true; }
     264        virtual bool isPure(CodeGenerator&) const KJS_FAST_CALL { return true; }
    265265        virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
    266266        virtual Precedence precedence() const { return PrecPrimary; }
     
    284284
    285285        virtual bool isNumber() const KJS_FAST_CALL { return true; }
    286         virtual bool isConstant() const KJS_FAST_CALL { return true; }
     286        virtual bool isPure(CodeGenerator&) const KJS_FAST_CALL { return true; }
    287287        double value() const KJS_FAST_CALL { return m_double; }
    288288        virtual void setValue(double d) KJS_FAST_CALL { m_double = d; }
     
    317317        virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
    318318
    319         virtual bool isConstant() const KJS_FAST_CALL { return true; }
     319        virtual bool isPure(CodeGenerator&) const KJS_FAST_CALL { return true; }
    320320        virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
    321321        virtual Precedence precedence() const { return PrecPrimary; }
     
    372372        virtual Precedence precedence() const { return PrecPrimary; }
    373373
     374        virtual bool isPure(CodeGenerator&) const KJS_FAST_CALL;
    374375        virtual bool isLocation() const KJS_FAST_CALL { return true; }
    375376        virtual bool isResolveNode() const KJS_FAST_CALL { return true; }
Note: See TracChangeset for help on using the changeset viewer.