Changeset 38133 in webkit for trunk/JavaScriptCore/VM


Ignore:
Timestamp:
Nov 5, 2008, 11:51:35 AM (17 years ago)
Author:
[email protected]
Message:

2008-11-05 Geoffrey Garen <[email protected]>

Suggested by Darin Adler.


Removed two copy constructors that the compiler can generate for us
automatically.

  • VM/LabelID.h: (JSC::LabelID::setLocation): (JSC::LabelID::offsetFrom): (JSC::LabelID::ref): (JSC::LabelID::refCount):
  • kjs/LabelScope.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/LabelID.h

    r36263 r38133  
    4747        }
    4848
    49         // It doesn't really make sense to copy a LabelID, but we need this copy
    50         // constructor to support moving LabelIDs in a Vector.
    51 
    52         LabelID(const LabelID& other)
    53             : m_refCount(other.m_refCount)
    54             , m_location(other.m_location)
    55             , m_codeBlock(other.m_codeBlock)
    56             , m_unresolvedJumps(other.m_unresolvedJumps)
    57         {
    58         #ifndef NDEBUG
    59             const_cast<LabelID&>(other).m_codeBlock = 0;
    60         #endif
    61         }
    62 
    6349        void setLocation(unsigned location)
    6450        {
    65             ASSERT(m_codeBlock);
    6651            m_location = location;
    6752
     
    7762        int offsetFrom(int location) const
    7863        {
    79             ASSERT(m_codeBlock);
    8064            if (m_location == invalidLocation) {
    8165                m_unresolvedJumps.append(location);
     
    8569        }
    8670
    87         void ref()
    88         {
    89             ++m_refCount;
    90         }
    91 
     71        void ref() { ++m_refCount; }
    9272        void deref()
    9373        {
     
    9575            ASSERT(m_refCount >= 0);
    9676        }
    97 
    98         int refCount() const
    99         {
    100             return m_refCount;
    101         }
     77        int refCount() const { return m_refCount; }
    10278
    10379        bool isForwardLabel() const { return m_location == invalidLocation; }
Note: See TracChangeset for help on using the changeset viewer.