Changeset 38133 in webkit for trunk/JavaScriptCore


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:
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r38128 r38133  
     12008-11-05  Geoffrey Garen  <[email protected]>
     2
     3        Suggested by Darin Adler.
     4       
     5        Removed two copy constructors that the compiler can generate for us
     6        automatically.
     7
     8        * VM/LabelID.h:
     9        (JSC::LabelID::setLocation):
     10        (JSC::LabelID::offsetFrom):
     11        (JSC::LabelID::ref):
     12        (JSC::LabelID::refCount):
     13        * kjs/LabelScope.h:
     14
    1152008-11-05  Anders Carlsson  <[email protected]>
    216
  • 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; }
  • trunk/JavaScriptCore/kjs/LabelScope.h

    r38047 r38133  
    5151        }
    5252
    53         // It doesn't really make sense to copy a LabelScope, but we need this copy
    54         // constructor to support moving LabelScopes in a Vector.
    55 
    56         LabelScope(const LabelScope& other)
    57             : m_refCount(other.m_refCount)
    58             , m_type(other.m_type)
    59             , m_name(other.m_name)
    60             , m_scopeDepth(other.m_scopeDepth)
    61             , m_breakTarget(other.m_breakTarget)
    62             , m_continueTarget(other.m_continueTarget)
    63         {
    64         }
    65 
    6653        void ref() { ++m_refCount; }
    6754        void deref()
Note: See TracChangeset for help on using the changeset viewer.