Changeset 38133 in webkit for trunk/JavaScriptCore
- Timestamp:
- Nov 5, 2008, 11:51:35 AM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r38128 r38133 1 2008-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 1 15 2008-11-05 Anders Carlsson <[email protected]> 2 16 -
trunk/JavaScriptCore/VM/LabelID.h
r36263 r38133 47 47 } 48 48 49 // It doesn't really make sense to copy a LabelID, but we need this copy50 // 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 NDEBUG59 const_cast<LabelID&>(other).m_codeBlock = 0;60 #endif61 }62 63 49 void setLocation(unsigned location) 64 50 { 65 ASSERT(m_codeBlock);66 51 m_location = location; 67 52 … … 77 62 int offsetFrom(int location) const 78 63 { 79 ASSERT(m_codeBlock);80 64 if (m_location == invalidLocation) { 81 65 m_unresolvedJumps.append(location); … … 85 69 } 86 70 87 void ref() 88 { 89 ++m_refCount; 90 } 91 71 void ref() { ++m_refCount; } 92 72 void deref() 93 73 { … … 95 75 ASSERT(m_refCount >= 0); 96 76 } 97 98 int refCount() const 99 { 100 return m_refCount; 101 } 77 int refCount() const { return m_refCount; } 102 78 103 79 bool isForwardLabel() const { return m_location == invalidLocation; } -
trunk/JavaScriptCore/kjs/LabelScope.h
r38047 r38133 51 51 } 52 52 53 // It doesn't really make sense to copy a LabelScope, but we need this copy54 // 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 66 53 void ref() { ++m_refCount; } 67 54 void deref()
Note:
See TracChangeset
for help on using the changeset viewer.