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


Ignore:
Timestamp:
Feb 8, 2008, 5:13:46 PM (17 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

Reviewed by Oliver.

Test: fast/js/continue-break-multiple-labels.html

  • kjs/nodes.h: (KJS::StatementNode::pushLabel): Made this virtual. (KJS::LabelNode::pushLabel): Forward pushLabel calls to the statement inside.

LayoutTests:

  • fast/js/continue-break-multiple-labels-expected.txt: Added.
  • fast/js/continue-break-multiple-labels.html: Added.
File:
1 edited

Legend:

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

    r29836 r30103  
    215215        int lastLine() const KJS_FAST_CALL { return m_lastLine; }
    216216        virtual JSValue* execute(ExecState *exec) KJS_FAST_CALL = 0;
    217         void pushLabel(const Identifier& ident) KJS_FAST_CALL { m_labelStack.push(ident); }
     217        virtual void pushLabel(const Identifier& ident) KJS_FAST_CALL { m_labelStack.push(ident); }
    218218        virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
    219219        virtual bool isEmptyStatement() const KJS_FAST_CALL { return false; }
     
    25682568            : m_label(label)
    25692569            , m_statement(statement)
    2570     {
    2571     }
     2570        {
     2571        }
    25722572
    25732573        virtual void optimizeVariableAccess(const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
    25742574        virtual JSValue* execute(ExecState*) KJS_FAST_CALL;
    25752575        virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     2576        virtual void pushLabel(const Identifier& ident) KJS_FAST_CALL { m_statement->pushLabel(ident); }
    25762577
    25772578    private:
Note: See TracChangeset for help on using the changeset viewer.