Remove unused ArrayData param for setWithRefHelper

Mark said this used to do something related to avoiding a
recursive array, but I don't quite understand it and it's unused now.
Esse commit está contido em:
Jordan DeLong
2013-07-03 12:27:48 -07:00
commit de Sara Golemon
commit 42bab0c57f
2 arquivos alterados com 10 adições e 11 exclusões
+3 -3
Ver Arquivo
@@ -196,7 +196,7 @@ Variant::Variant(CVarStrongBind v) {
}
Variant::Variant(CVarWithRefBind v) {
constructWithRefHelper(variant(v), 0);
constructWithRefHelper(variant(v));
}
/*
@@ -272,8 +272,8 @@ Variant &Variant::assignRef(CVarRef v) {
}
HOT_FUNC
Variant &Variant::setWithRef(CVarRef v, const ArrayData *arr /* = NULL */) {
setWithRefHelper(v, arr, IS_REFCOUNTED_TYPE(m_type));
Variant &Variant::setWithRef(CVarRef v) {
setWithRefHelper(v, IS_REFCOUNTED_TYPE(m_type));
return *this;
}
+7 -8
Ver Arquivo
@@ -207,7 +207,7 @@ class Variant : private TypedValue {
/* implicit */ Variant(CVarStrongBind v) { constructRefHelper(variant(v)); }
inline ALWAYS_INLINE
/* implicit */ Variant(CVarWithRefBind v) {
constructWithRefHelper(variant(v), 0);
constructWithRefHelper(variant(v));
}
#else
/* implicit */ Variant(CVarRef v);
@@ -287,7 +287,7 @@ class Variant : private TypedValue {
* In order to correctly copy circular arrays, even if v is the only
* strong reference to arr, we still keep the reference.
*/
Variant &setWithRef(CVarRef v, const ArrayData *arr = nullptr);
Variant &setWithRef(CVarRef v);
/**
* Fast accessors that can be used by generated code when type inference can
@@ -1076,12 +1076,11 @@ public:
}
inline ALWAYS_INLINE
void setWithRefHelper(CVarRef v, const ArrayData *arr, bool destroy) {
void setWithRefHelper(CVarRef v, bool destroy) {
assert(this != &v);
CVarRef rhs = v.m_type == KindOfRef && v.m_data.pref->getCount() <= 1 &&
(!arr || v.m_data.pref->var()->m_data.parr != arr) ?
*v.m_data.pref->var() : v;
CVarRef rhs = v.m_type == KindOfRef && v.m_data.pref->getCount() <= 1
? *v.m_data.pref->var() : v;
if (IS_REFCOUNTED_TYPE(rhs.m_type)) {
assert(rhs.m_data.pstr);
rhs.m_data.pstr->incRefCount();
@@ -1096,8 +1095,8 @@ public:
}
inline ALWAYS_INLINE
void constructWithRefHelper(CVarRef v, const ArrayData *arr) {
setWithRefHelper(v, arr, false);
void constructWithRefHelper(CVarRef v) {
setWithRefHelper(v, false);
}
#ifdef INLINE_VARIANT_HELPER