Commit 4bc12df4 authored by ggaren@apple.com's avatar ggaren@apple.com

2008-11-05 Geoffrey Garen <ggaren@apple.com>

        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:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 25eca0a4
2008-11-05 Geoffrey Garen <ggaren@apple.com>
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:
2008-11-05 Anders Carlsson <andersca@apple.com>
Fix Snow Leopard build.
......
......@@ -46,23 +46,8 @@ namespace JSC {
{
}
// It doesn't really make sense to copy a LabelID, but we need this copy
// constructor to support moving LabelIDs in a Vector.
LabelID(const LabelID& other)
: m_refCount(other.m_refCount)
, m_location(other.m_location)
, m_codeBlock(other.m_codeBlock)
, m_unresolvedJumps(other.m_unresolvedJumps)
{
#ifndef NDEBUG
const_cast<LabelID&>(other).m_codeBlock = 0;
#endif
}
void setLocation(unsigned location)
{
ASSERT(m_codeBlock);
m_location = location;
unsigned size = m_unresolvedJumps.size();
......@@ -76,7 +61,6 @@ namespace JSC {
int offsetFrom(int location) const
{
ASSERT(m_codeBlock);
if (m_location == invalidLocation) {
m_unresolvedJumps.append(location);
return 0;
......@@ -84,21 +68,13 @@ namespace JSC {
return m_location - location;
}
void ref()
{
++m_refCount;
}
void ref() { ++m_refCount; }
void deref()
{
--m_refCount;
ASSERT(m_refCount >= 0);
}
int refCount() const
{
return m_refCount;
}
int refCount() const { return m_refCount; }
bool isForwardLabel() const { return m_location == invalidLocation; }
......
......@@ -50,19 +50,6 @@ namespace JSC {
{
}
// It doesn't really make sense to copy a LabelScope, but we need this copy
// constructor to support moving LabelScopes in a Vector.
LabelScope(const LabelScope& other)
: m_refCount(other.m_refCount)
, m_type(other.m_type)
, m_name(other.m_name)
, m_scopeDepth(other.m_scopeDepth)
, m_breakTarget(other.m_breakTarget)
, m_continueTarget(other.m_continueTarget)
{
}
void ref() { ++m_refCount; }
void deref()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment