diff --git a/hphp/runtime/base/array-data.h b/hphp/runtime/base/array-data.h index 123f48705..400e25305 100644 --- a/hphp/runtime/base/array-data.h +++ b/hphp/runtime/base/array-data.h @@ -599,7 +599,7 @@ struct ArrayFunctions { extern const ArrayFunctions g_array_funcs; -ALWAYS_INLINE inline +ALWAYS_INLINE void decRefArr(ArrayData* arr) { if (arr->decRefCount() == 0) arr->release(); } diff --git a/hphp/runtime/base/array-iterator.cpp b/hphp/runtime/base/array-iterator.cpp index 2467b91c1..18e0c3c24 100644 --- a/hphp/runtime/base/array-iterator.cpp +++ b/hphp/runtime/base/array-iterator.cpp @@ -391,13 +391,13 @@ ArrayIter::ArrayIter(Mappish* coll, VersionableSparse) } template -inline ALWAYS_INLINE +ALWAYS_INLINE bool ArrayIter::iterNext(Fixed) { return ++m_pos < static_cast(getObject())->size(); } template -inline ALWAYS_INLINE +ALWAYS_INLINE bool ArrayIter::iterNext(Versionable) { Vectorish* vec = static_cast(getObject()); if (UNLIKELY(m_version != vec->getVersion())) { @@ -407,7 +407,7 @@ bool ArrayIter::iterNext(Versionable) { } template -inline ALWAYS_INLINE +ALWAYS_INLINE bool ArrayIter::iterNext(VersionableSparse) { Mappish* coll = static_cast(getObject()); if (UNLIKELY(m_version != coll->getVersion())) { @@ -418,37 +418,37 @@ bool ArrayIter::iterNext(VersionableSparse) { } template -inline ALWAYS_INLINE +ALWAYS_INLINE Variant ArrayIter::iterKey(Fixed) { return m_pos; } template -inline ALWAYS_INLINE +ALWAYS_INLINE Variant ArrayIter::iterKey(Versionable) { return m_pos; } template -inline ALWAYS_INLINE +ALWAYS_INLINE Variant ArrayIter::iterKey(VersionableSparse) { return static_cast(getObject())->iter_key(m_pos); } template -inline ALWAYS_INLINE +ALWAYS_INLINE Variant ArrayIter::iterValue(Fixed) { return tvAsCVarRef(static_cast(getObject())->get(m_pos)); } template -inline ALWAYS_INLINE +ALWAYS_INLINE Variant ArrayIter::iterValue(Versionable) { return tvAsCVarRef(static_cast(getObject())->get(m_pos)); } template -inline ALWAYS_INLINE +ALWAYS_INLINE Variant ArrayIter::iterValue(VersionableSparse) { return tvAsCVarRef(static_cast(getObject())->iter_value(m_pos)); } diff --git a/hphp/runtime/base/datatype.h b/hphp/runtime/base/datatype.h index 051e8295d..cf650e153 100644 --- a/hphp/runtime/base/datatype.h +++ b/hphp/runtime/base/datatype.h @@ -233,7 +233,7 @@ const unsigned int kDestrTableSize = 6; #define TYPE_TO_DESTR_IDX(t) ((t) >> kShiftDataTypeToDestrIndex) -inline ALWAYS_INLINE unsigned typeToDestrIndex(DataType t) { +ALWAYS_INLINE unsigned typeToDestrIndex(DataType t) { assert(t == KindOfString || t == KindOfArray || t == KindOfObject || t == KindOfResource || t == KindOfRef); return TYPE_TO_DESTR_IDX(t); diff --git a/hphp/runtime/base/hphp-array-defs.h b/hphp/runtime/base/hphp-array-defs.h index ccf99ef63..990e8ca25 100644 --- a/hphp/runtime/base/hphp-array-defs.h +++ b/hphp/runtime/base/hphp-array-defs.h @@ -44,7 +44,7 @@ inline void HphpArray::initHash(size_t tableSize) { m_hLoad = 0; } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray::ElmInd* HphpArray::findForNewInsert(size_t h0) const { assert(!isPacked()); size_t tableMask = m_tableMask; @@ -71,7 +71,7 @@ inline void HphpArray::getElmKey(const Elm& e, TypedValue* out) { str->incRefCount(); } -template inline ALWAYS_INLINE +template ALWAYS_INLINE void HphpArray::getArrayElm(ssize_t pos, TypedValue* valOut, TypedValue* keyOut) const { assert(size_t(pos) < m_used); diff --git a/hphp/runtime/base/hphp-array.cpp b/hphp/runtime/base/hphp-array.cpp index 48a6521a0..665fadb3b 100644 --- a/hphp/runtime/base/hphp-array.cpp +++ b/hphp/runtime/base/hphp-array.cpp @@ -135,7 +135,7 @@ HphpArray::HphpArray(EmptyMode) } // for internal use by nonSmartCopy() and copyPacked() -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray::HphpArray(const HphpArray& other, AllocationMode mode, ClonePacked) : ArrayData(other.m_kind, mode, other.m_size) , m_used(other.m_used) @@ -153,7 +153,7 @@ HphpArray::HphpArray(const HphpArray& other, AllocationMode mode, ClonePacked) } // For internal use by nonSmartCopy() and copyMixed() -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray::HphpArray(const HphpArray& other, AllocationMode mode, CloneMixed) : ArrayData(other.m_kind, mode, other.m_size) , m_used(other.m_used) @@ -455,7 +455,7 @@ static bool hitIntKey(const HphpArray::Elm& e, int64_t ki) { // 2, this guarantees a probe sequence of length tableSize that probes all // table elements exactly once. -template inline ALWAYS_INLINE +template ALWAYS_INLINE HphpArray::ElmInd HphpArray::findBody(size_t h0, Hit hit) const { // tableMask, probeIndex, and pos are explicitly 64-bit, because performance // regressed when they were 32-bit types via auto. Test carefully. @@ -516,7 +516,7 @@ HphpArray::ElmInd* warnUnbalanced(size_t n, HphpArray::ElmInd* ei) { return ei; } -template inline ALWAYS_INLINE +template ALWAYS_INLINE HphpArray::ElmInd* HphpArray::findForInsertBody(size_t h0, Hit hit) const { // tableMask, probeIndex, and pos are explicitly 64-bit, because performance // regressed when they were 32-bit types via auto. Test carefully. @@ -612,14 +612,14 @@ bool HphpArray::ExistsStr(const ArrayData* ad, const StringData* k) { //============================================================================= // Append/insert/update. -inline ALWAYS_INLINE bool HphpArray::isFull() const { +ALWAYS_INLINE bool HphpArray::isFull() const { assert(!isPacked()); assert(m_used <= m_cap); assert(m_hLoad <= m_cap); return m_used == m_cap || m_hLoad == m_cap; } -inline ALWAYS_INLINE HphpArray::Elm* HphpArray::allocElm(ElmInd* ei) { +ALWAYS_INLINE HphpArray::Elm* HphpArray::allocElm(ElmInd* ei) { assert(!validElmInd(*ei) && !isFull()); assert(m_size != 0 || m_used == 0); ++m_size; @@ -631,7 +631,7 @@ inline ALWAYS_INLINE HphpArray::Elm* HphpArray::allocElm(ElmInd* ei) { return &m_data[i]; } -inline ALWAYS_INLINE TypedValue& HphpArray::allocNextElm(uint32_t i) { +ALWAYS_INLINE TypedValue& HphpArray::allocNextElm(uint32_t i) { assert(isPacked() && i == m_size); if (i == m_cap) growPacked(); auto next = i + 1; @@ -640,7 +640,7 @@ inline ALWAYS_INLINE TypedValue& HphpArray::allocNextElm(uint32_t i) { return m_data[i].data; } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray::Elm* HphpArray::newElm(ElmInd* ei, size_t h0) { if (isFull()) return newElmGrow(h0); return allocElm(ei); @@ -652,45 +652,45 @@ HphpArray::Elm* HphpArray::newElmGrow(size_t h0) { return allocElm(findForNewInsert(h0)); } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray* HphpArray::initVal(TypedValue& tv, CVarRef v) { tvAsUninitializedVariant(&tv).constructValHelper(v); return this; } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray* HphpArray::initRef(TypedValue& tv, CVarRef v) { tvAsUninitializedVariant(&tv).constructRefHelper(v); return this; } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray* HphpArray::getLval(TypedValue& tv, Variant*& ret) { ret = &tvAsVariant(&tv); return this; } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray* HphpArray::initLval(TypedValue& tv, Variant*& ret) { tvWriteNull(&tv); ret = &tvAsVariant(&tv); return this; } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray* HphpArray::initWithRef(TypedValue& tv, CVarRef v) { tvWriteNull(&tv); tvAsVariant(&tv).setWithRef(v); return this; } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray* HphpArray::setVal(TypedValue& tv, CVarRef v) { tvAsVariant(&tv).assignValHelper(v); return this; } -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray* HphpArray::setRef(TypedValue& tv, CVarRef v) { tvAsVariant(&tv).assignRefHelper(v); return this; @@ -700,7 +700,7 @@ HphpArray* HphpArray::setRef(TypedValue& tv, CVarRef v) { * This is a streamlined copy of Variant.constructValHelper() * with no incref+decref because we're moving v to this array. */ -inline ALWAYS_INLINE +ALWAYS_INLINE HphpArray* HphpArray::moveVal(TypedValue& tv, TypedValue v) { tv.m_type = typeInitNull(v.m_type); tv.m_data.num = v.m_data.num; @@ -740,7 +740,7 @@ HphpArray::ElmInd* HphpArray::reallocData(size_t maxElms, size_t tableSize) { (ElmInd*)(uintptr_t(m_data) + dataSize); } -inline ALWAYS_INLINE void HphpArray::resizeIfNeeded() { +ALWAYS_INLINE void HphpArray::resizeIfNeeded() { if (isFull()) resize(); } @@ -990,7 +990,7 @@ inline ArrayData* HphpArray::addValWithRef(StringData* key, CVarRef data) { return this; } -inline INLINE_SINGLE_CALLER +INLINE_SINGLE_CALLER ArrayData* HphpArray::update(int64_t ki, CVarRef data) { ElmInd* ei = findForInsert(ki); if (validElmInd(*ei)) { @@ -1002,7 +1002,7 @@ ArrayData* HphpArray::update(int64_t ki, CVarRef data) { return initVal(e->data, data); } -inline INLINE_SINGLE_CALLER +INLINE_SINGLE_CALLER ArrayData* HphpArray::update(StringData* key, CVarRef data) { strhash_t h = key->hash(); ElmInd* ei = findForInsert(key, h); diff --git a/hphp/runtime/base/memory-manager-inl.h b/hphp/runtime/base/memory-manager-inl.h index 37307a710..afedc6df5 100644 --- a/hphp/runtime/base/memory-manager-inl.h +++ b/hphp/runtime/base/memory-manager-inl.h @@ -81,7 +81,7 @@ inline void MemoryManager::smartFreeSize(void* ptr, uint32_t bytes) { FTRACE(1, "smartFreeSize: {} ({} bytes)\n", ptr, bytes); } -inline ALWAYS_INLINE +ALWAYS_INLINE void* MemoryManager::smartMallocSizeBig(size_t bytes) { m_stats.usage += bytes; // TODO(#2831116): we only add sizeof(SmallNode) so smartMallocBig @@ -91,7 +91,7 @@ void* MemoryManager::smartMallocSizeBig(size_t bytes) { return ptr; } -inline ALWAYS_INLINE +ALWAYS_INLINE void MemoryManager::smartFreeSizeBig(void* vp, size_t bytes) { m_stats.usage -= bytes; FTRACE(1, "smartFreeBig: {} ({} bytes)\n", vp, bytes); diff --git a/hphp/runtime/base/object-data.cpp b/hphp/runtime/base/object-data.cpp index c46b1074b..b5dfe2bf1 100644 --- a/hphp/runtime/base/object-data.cpp +++ b/hphp/runtime/base/object-data.cpp @@ -266,7 +266,7 @@ Variant ObjectData::o_get(CStrRef propName, bool error /* = true */, } template -inline ALWAYS_INLINE Variant ObjectData::o_setImpl(CStrRef propName, T v, +ALWAYS_INLINE Variant ObjectData::o_setImpl(CStrRef propName, T v, CStrRef context) { if (UNLIKELY(!*propName.data())) { throw_invalid_property_name(propName); diff --git a/hphp/runtime/base/object-data.h b/hphp/runtime/base/object-data.h index cbd08639a..765cbcb40 100644 --- a/hphp/runtime/base/object-data.h +++ b/hphp/runtime/base/object-data.h @@ -478,7 +478,7 @@ private: ObjectData* m_o; }; -ALWAYS_INLINE inline void decRefObj(ObjectData* obj) { +ALWAYS_INLINE void decRefObj(ObjectData* obj) { if (obj->decRefCount() == 0) obj->release(); } diff --git a/hphp/runtime/base/ref-data.h b/hphp/runtime/base/ref-data.h index 9a3f999f7..d3c88afea 100644 --- a/hphp/runtime/base/ref-data.h +++ b/hphp/runtime/base/ref-data.h @@ -115,7 +115,7 @@ public: #endif }; -ALWAYS_INLINE inline void decRefRef(RefData* ref) { +ALWAYS_INLINE void decRefRef(RefData* ref) { if (ref->decRefCount() == 0) ref->release(); } diff --git a/hphp/runtime/base/resource-data.h b/hphp/runtime/base/resource-data.h index 7118c6c0a..74e92a8f2 100644 --- a/hphp/runtime/base/resource-data.h +++ b/hphp/runtime/base/resource-data.h @@ -198,7 +198,7 @@ typedef std::map ResourceMapMap; // ResourceData. template<> inline SmartPtr::~SmartPtr() {} -ALWAYS_INLINE inline void decRefRes(ResourceData* res) { +ALWAYS_INLINE void decRefRes(ResourceData* res) { if (res->decRefCount() == 0) res->release(); } diff --git a/hphp/runtime/base/smart-allocator.h b/hphp/runtime/base/smart-allocator.h index b6fb4a22f..4ef13683b 100644 --- a/hphp/runtime/base/smart-allocator.h +++ b/hphp/runtime/base/smart-allocator.h @@ -213,7 +213,7 @@ void *SmartAllocatorInitSetup() { #define DECLARE_RESOURCE_ALLOCATION_NO_SWEEP(T) \ public: \ - inline ALWAYS_INLINE void operator delete(void* p) { \ + ALWAYS_INLINE void operator delete(void* p) { \ static_assert(std::is_base_of::value, ""); \ assert(sizeof(T) <= MemoryManager::kMaxSmartSize); \ MM().smartFreeSize(p, sizeof(T)); \ diff --git a/hphp/runtime/base/string-data.cpp b/hphp/runtime/base/string-data.cpp index 316d46d9c..fc48962a8 100644 --- a/hphp/runtime/base/string-data.cpp +++ b/hphp/runtime/base/string-data.cpp @@ -156,7 +156,8 @@ std::pair allocFlatForLen(uint32_t len) { return std::make_pair(sd, cap); } -ALWAYS_INLINE void freeForSize(void* vp, uint32_t size) { +ALWAYS_INLINE +void freeForSize(void* vp, uint32_t size) { if (LIKELY(size <= MemoryManager::kMaxSmartSize)) { return MM().smartFreeSize(vp, size); } diff --git a/hphp/runtime/base/string-data.h b/hphp/runtime/base/string-data.h index 271f092a7..94c4c5534 100644 --- a/hphp/runtime/base/string-data.h +++ b/hphp/runtime/base/string-data.h @@ -505,7 +505,7 @@ private: */ const uint32_t SmallStringReserve = 64 - sizeof(StringData) - 1; -ALWAYS_INLINE inline void decRefStr(StringData* s) { +ALWAYS_INLINE void decRefStr(StringData* s) { if (s->decRefCount() == 0) s->release(); } diff --git a/hphp/runtime/base/tv-helpers.h b/hphp/runtime/base/tv-helpers.h index 3773918e8..e1ee13665 100644 --- a/hphp/runtime/base/tv-helpers.h +++ b/hphp/runtime/base/tv-helpers.h @@ -114,14 +114,14 @@ inline void tvDecRef(TypedValue* tv) { } // Assumes 'tv' is live -ALWAYS_INLINE inline void tvRefcountedDecRef(TypedValue* tv) { +ALWAYS_INLINE void tvRefcountedDecRef(TypedValue* tv) { if (IS_REFCOUNTED_TYPE(tv->m_type)) { tvDecRef(tv); } } // decref when the count is known not to reach zero -ALWAYS_INLINE inline void tvDecRefOnly(TypedValue* tv) { +ALWAYS_INLINE void tvDecRefOnly(TypedValue* tv) { assert(!tvWillBeReleased(tv)); if (IS_REFCOUNTED_TYPE(tv->m_type)) { tv->m_data.pstr->decRefCount(); @@ -151,7 +151,7 @@ inline void tvIncRef(TypedValue* tv) { tv->m_data.pstr->incRefCount(); } -ALWAYS_INLINE inline void tvRefcountedIncRef(TypedValue* tv) { +ALWAYS_INLINE void tvRefcountedIncRef(TypedValue* tv) { assert(tvIsPlausible(*tv)); if (IS_REFCOUNTED_TYPE(tv->m_type)) { tvIncRef(tv); diff --git a/hphp/runtime/base/type-array.cpp b/hphp/runtime/base/type-array.cpp index 6f7076ff0..6b0163e82 100644 --- a/hphp/runtime/base/type-array.cpp +++ b/hphp/runtime/base/type-array.cpp @@ -510,7 +510,7 @@ Variant &Array::lvalAt(CVarRef key, ACCESSPARAMS_IMPL) { } template -inline ALWAYS_INLINE +ALWAYS_INLINE void Array::setImpl(const T &key, CVarRef v) { if (!m_px) { ArrayData *data = ArrayData::Create(key, v); @@ -522,7 +522,7 @@ void Array::setImpl(const T &key, CVarRef v) { } template -inline ALWAYS_INLINE +ALWAYS_INLINE void Array::setRefImpl(const T &key, CVarRef v) { if (!m_px) { ArrayData *data = ArrayData::CreateRef(key, v); @@ -535,7 +535,7 @@ void Array::setRefImpl(const T &key, CVarRef v) { } template -inline ALWAYS_INLINE +ALWAYS_INLINE void Array::addImpl(const T &key, CVarRef v) { if (!m_px) { ArrayData *data = ArrayData::Create(key, v); diff --git a/hphp/runtime/base/type-variant.cpp b/hphp/runtime/base/type-variant.cpp index c02ca43a4..1c3fd1993 100644 --- a/hphp/runtime/base/type-variant.cpp +++ b/hphp/runtime/base/type-variant.cpp @@ -252,7 +252,8 @@ const RawDestructor g_destructors[] = { (RawDestructor)getMethodPtr(&RefData::release), }; -inline ALWAYS_INLINE void Variant::destructDataImpl(RefData* data, DataType t) { +ALWAYS_INLINE +void Variant::destructDataImpl(RefData* data, DataType t) { assert(IS_REFCOUNTED_TYPE(t)); assert(IS_REAL_TYPE(t)); if (data->decRefCount() == 0) { @@ -263,7 +264,8 @@ inline ALWAYS_INLINE void Variant::destructDataImpl(RefData* data, DataType t) { } } -inline ALWAYS_INLINE void Variant::destructImpl() { +ALWAYS_INLINE +void Variant::destructImpl() { destructDataImpl(m_data.pref, m_type); } @@ -1228,8 +1230,8 @@ Variant &Variant::lvalBlackHole() { } template -inline ALWAYS_INLINE CVarRef Variant::SetImpl(Variant *self, T key, - CVarRef v, bool isKey) { +ALWAYS_INLINE +CVarRef Variant::SetImpl(Variant *self, T key, CVarRef v, bool isKey) { retry: if (LIKELY(self->m_type == KindOfArray)) { ArrayData *escalated; @@ -1353,8 +1355,8 @@ CVarRef Variant::append(CVarRef v) { } template -inline ALWAYS_INLINE CVarRef Variant::SetRefImpl(Variant *self, T key, - CVarRef v, bool isKey) { +ALWAYS_INLINE +CVarRef Variant::SetRefImpl(Variant *self, T key, CVarRef v, bool isKey) { retry: if (LIKELY(self->m_type == KindOfArray)) { ArrayData *escalated; diff --git a/hphp/runtime/base/type-variant.h b/hphp/runtime/base/type-variant.h index 975f3242c..eebaf918d 100644 --- a/hphp/runtime/base/type-variant.h +++ b/hphp/runtime/base/type-variant.h @@ -216,11 +216,11 @@ class Variant : private TypedValue { } #ifdef INLINE_VARIANT_HELPER - inline ALWAYS_INLINE + ALWAYS_INLINE /* implicit */ Variant(CVarRef v) { constructValHelper(v); } - inline ALWAYS_INLINE + ALWAYS_INLINE /* implicit */ Variant(CVarStrongBind v) { constructRefHelper(variant(v)); } - inline ALWAYS_INLINE + ALWAYS_INLINE /* implicit */ Variant(CVarWithRefBind v) { constructWithRefHelper(variant(v)); } @@ -276,8 +276,8 @@ class Variant : private TypedValue { } private: - inline ALWAYS_INLINE void destructImpl(); - inline ALWAYS_INLINE static void destructDataImpl(RefData* d, DataType t); + ALWAYS_INLINE void destructImpl(); + ALWAYS_INLINE static void destructDataImpl(RefData* d, DataType t); friend class VarNR; public: @@ -312,12 +312,12 @@ class Variant : private TypedValue { /////////////////////////////////////////////////////////////////////////////// // int64 - inline ALWAYS_INLINE int64_t asInt64Val() const { + ALWAYS_INLINE int64_t asInt64Val() const { assert(m_type == KindOfInt64); return m_data.num; } - inline ALWAYS_INLINE int64_t toInt64Val() const { + ALWAYS_INLINE int64_t toInt64Val() const { assert(is(KindOfInt64)); return LIKELY(m_type == KindOfInt64) ? @@ -327,12 +327,12 @@ class Variant : private TypedValue { /////////////////////////////////////////////////////////////////////////////// // double - inline ALWAYS_INLINE double asDoubleVal() const { + ALWAYS_INLINE double asDoubleVal() const { assert(m_type == KindOfDouble); return m_data.dbl; } - inline ALWAYS_INLINE double toDoubleVal() const { + ALWAYS_INLINE double toDoubleVal() const { assert(is(KindOfDouble)); return LIKELY(m_type == KindOfDouble) ? @@ -342,12 +342,12 @@ class Variant : private TypedValue { /////////////////////////////////////////////////////////////////////////////// // boolean - inline ALWAYS_INLINE bool asBooleanVal() const { + ALWAYS_INLINE bool asBooleanVal() const { assert(m_type == KindOfBoolean); return m_data.num; } - inline ALWAYS_INLINE bool toBooleanVal() const { + ALWAYS_INLINE bool toBooleanVal() const { assert(is(KindOfBoolean)); return LIKELY(m_type == KindOfBoolean) ? @@ -357,24 +357,24 @@ class Variant : private TypedValue { /////////////////////////////////////////////////////////////////////////////// // string - inline ALWAYS_INLINE const String& asCStrRef() const { + ALWAYS_INLINE const String& asCStrRef() const { assert(IS_STRING_TYPE(m_type) && m_data.pstr); return *reinterpret_cast(&m_data.pstr); } - inline ALWAYS_INLINE const String& toCStrRef() const { + ALWAYS_INLINE const String& toCStrRef() const { assert(is(KindOfString) || is(KindOfStaticString)); assert(m_type == KindOfRef ? m_data.pref->var()->m_data.pstr : m_data.pstr); return *reinterpret_cast(LIKELY(IS_STRING_TYPE(m_type)) ? &m_data.pstr : &m_data.pref->tv()->m_data.pstr); } - inline ALWAYS_INLINE String& asStrRef() { + ALWAYS_INLINE String& asStrRef() { assert(IS_STRING_TYPE(m_type) && m_data.pstr); return *reinterpret_cast(&m_data.pstr); } - inline ALWAYS_INLINE String& toStrRef() { + ALWAYS_INLINE String& toStrRef() { assert(is(KindOfString) || is(KindOfStaticString)); assert(m_type == KindOfRef ? m_data.pref->var()->m_data.pstr : m_data.pstr); return *reinterpret_cast(LIKELY(IS_STRING_TYPE(m_type)) ? @@ -384,24 +384,24 @@ class Variant : private TypedValue { /////////////////////////////////////////////////////////////////////////////// // array - inline ALWAYS_INLINE const Array& asCArrRef() const { + ALWAYS_INLINE const Array& asCArrRef() const { assert(m_type == KindOfArray && m_data.parr); return *reinterpret_cast(&m_data.parr); } - inline ALWAYS_INLINE const Array& toCArrRef() const { + ALWAYS_INLINE const Array& toCArrRef() const { assert(is(KindOfArray)); assert(m_type == KindOfRef ? m_data.pref->var()->m_data.parr : m_data.parr); return *reinterpret_cast(LIKELY(m_type == KindOfArray) ? &m_data.parr : &m_data.pref->tv()->m_data.parr); } - inline ALWAYS_INLINE Array& asArrRef() { + ALWAYS_INLINE Array& asArrRef() { assert(m_type == KindOfArray && m_data.parr); return *reinterpret_cast(&m_data.parr); } - inline ALWAYS_INLINE Array& toArrRef() { + ALWAYS_INLINE Array& toArrRef() { assert(is(KindOfArray)); assert(m_type == KindOfRef ? m_data.pref->var()->m_data.parr : m_data.parr); return *reinterpret_cast(LIKELY(m_type == KindOfArray) ? @@ -411,34 +411,34 @@ class Variant : private TypedValue { /////////////////////////////////////////////////////////////////////////////// // object - inline ALWAYS_INLINE const Object& asCObjRef() const { + ALWAYS_INLINE const Object& asCObjRef() const { assert(m_type == KindOfObject && m_data.pobj); return *reinterpret_cast(&m_data.pobj); } - inline ALWAYS_INLINE const Object& toCObjRef() const { + ALWAYS_INLINE const Object& toCObjRef() const { assert(is(KindOfObject)); assert(m_type == KindOfRef ? m_data.pref->var()->m_data.pobj : m_data.pobj); return *reinterpret_cast(LIKELY(m_type == KindOfObject) ? &m_data.pobj : &m_data.pref->tv()->m_data.pobj); } - inline ALWAYS_INLINE Object & asObjRef() { + ALWAYS_INLINE Object & asObjRef() { assert(m_type == KindOfObject && m_data.pobj); return *reinterpret_cast(&m_data.pobj); } - inline ALWAYS_INLINE const Resource& asCResRef() const { + ALWAYS_INLINE const Resource& asCResRef() const { assert(m_type == KindOfResource && m_data.pobj); return *reinterpret_cast(&m_data.pobj); } - inline ALWAYS_INLINE Resource & asResRef() { + ALWAYS_INLINE Resource & asResRef() { assert(m_type == KindOfResource && m_data.pres); return *reinterpret_cast(&m_data.pres); } - inline ALWAYS_INLINE Object& toObjRef() { + ALWAYS_INLINE Object& toObjRef() { assert(is(KindOfObject)); assert(m_type == KindOfRef ? m_data.pref->var()->m_data.pobj : m_data.pobj); return *reinterpret_cast(LIKELY(m_type == KindOfObject) ? @@ -825,12 +825,12 @@ class Variant : private TypedValue { Variant &lvalRef(CVarRef key, Variant& tmp, ACCESSPARAMS_DECL); template - inline ALWAYS_INLINE static CVarRef SetImpl( - Variant *self, T key, CVarRef v, bool isKey); + ALWAYS_INLINE static CVarRef SetImpl(Variant *self, T key, CVarRef v, + bool isKey); template - inline ALWAYS_INLINE static CVarRef SetRefImpl( - Variant *self, T key, CVarRef v, bool isKey); + ALWAYS_INLINE static CVarRef SetRefImpl(Variant *self, T key, CVarRef v, + bool isKey); CVarRef set(int key, CVarRef v) { return set((int64_t)key, v); } CVarRef set(int64_t key, CVarRef v); @@ -1022,7 +1022,7 @@ class Variant : private TypedValue { // only called from constructor void init(ObjectData *v); - static inline ALWAYS_INLINE + static ALWAYS_INLINE void AssignValHelper(Variant *self, const Variant *other) { if (UNLIKELY(self->m_type == KindOfRef)) self = self->m_data.pref->var(); if (UNLIKELY(other->m_type == KindOfRef)) other = other->m_data.pref->var(); @@ -1048,7 +1048,7 @@ class Variant : private TypedValue { #ifdef INLINE_VARIANT_HELPER public: #endif - static inline ALWAYS_INLINE void PromoteToRef(CVarRef v) { + static ALWAYS_INLINE void PromoteToRef(CVarRef v) { assert(&v != &null_variant); if (v.m_type != KindOfRef) { RefData *ref = NEW(RefData)(v.m_type, v.m_data.num); @@ -1057,11 +1057,11 @@ public: } } - inline ALWAYS_INLINE void assignValHelper(CVarRef v) { + ALWAYS_INLINE void assignValHelper(CVarRef v) { AssignValHelper(this, &v); } - inline ALWAYS_INLINE void assignRefHelper(CVarRef v) { + ALWAYS_INLINE void assignRefHelper(CVarRef v) { PromoteToRef(v); RefData* r = v.m_data.pref; r->incRefCount(); // in case destruct() triggers deletion of v @@ -1074,14 +1074,14 @@ public: } public: - inline ALWAYS_INLINE void constructRefHelper(CVarRef v) { + ALWAYS_INLINE void constructRefHelper(CVarRef v) { PromoteToRef(v); v.m_data.pref->incRefCount(); m_data.pref = v.m_data.pref; m_type = KindOfRef; } - inline ALWAYS_INLINE void constructValHelper(CVarRef v) { + ALWAYS_INLINE void constructValHelper(CVarRef v) { const Variant *other = UNLIKELY(v.m_type == KindOfRef) ? v.m_data.pref->var() : &v; assert(this != other); @@ -1103,7 +1103,7 @@ public: v.reset(); } - inline ALWAYS_INLINE + ALWAYS_INLINE void setWithRefHelper(CVarRef v, bool destroy) { assert(this != &v); @@ -1122,7 +1122,7 @@ public: if (destroy) destructData(d, t); } - inline ALWAYS_INLINE + ALWAYS_INLINE void constructWithRefHelper(CVarRef v) { setWithRefHelper(v, false); } @@ -1132,11 +1132,11 @@ private: #endif template - static inline ALWAYS_INLINE Variant &LvalAtImpl0( - Variant *self, T key, Variant *tmp, bool blackHole, ACCESSPARAMS_DECL); + static ALWAYS_INLINE Variant &LvalAtImpl0(Variant *self, T key, Variant *tmp, + bool blackHole, ACCESSPARAMS_DECL); template - inline ALWAYS_INLINE Variant &lvalAtImpl(T key, ACCESSPARAMS_DECL); + ALWAYS_INLINE Variant &lvalAtImpl(T key, ACCESSPARAMS_DECL); private: /** diff --git a/hphp/runtime/ext/ext_collections.cpp b/hphp/runtime/ext/ext_collections.cpp index 2fda52337..844ead619 100644 --- a/hphp/runtime/ext/ext_collections.cpp +++ b/hphp/runtime/ext/ext_collections.cpp @@ -1706,9 +1706,8 @@ void c_Map::add(TypedValue* val) { #define STRING_HASH(x) (int32_t(x) | 0x80000000) -bool inline hitStringKey(const c_Map::Bucket* p, const char* k, - int len, int32_t hash) ALWAYS_INLINE; -bool inline hitStringKey(const c_Map::Bucket* p, const char* k, +ALWAYS_INLINE +bool hitStringKey(const c_Map::Bucket* p, const char* k, int len, int32_t hash) { assert(p->validValue()); if (p->hasIntKey()) return false; @@ -1718,8 +1717,8 @@ bool inline hitStringKey(const c_Map::Bucket* p, const char* k, memcmp(data, k, len) == 0); } -bool inline hitIntKey(const c_Map::Bucket* p, int64_t ki) ALWAYS_INLINE; -bool inline hitIntKey(const c_Map::Bucket* p, int64_t ki) { +ALWAYS_INLINE +bool hitIntKey(const c_Map::Bucket* p, int64_t ki) { assert(p->validValue()); return p->ikey == ki && p->hasIntKey(); } @@ -1794,7 +1793,7 @@ c_Map::Bucket* c_Map::findForInsert(const char* k, int len, // findForNewInsert() is only safe to use if you know for sure that the // key is not already present in the Map. -inline ALWAYS_INLINE +ALWAYS_INLINE c_Map::Bucket* c_Map::findForNewInsert(size_t h0) const { size_t tableMask = m_nLastSlot; size_t probeIndex = h0 & tableMask; @@ -2883,10 +2882,9 @@ void c_StableMap::add(TypedValue* val) { } } -bool inline sm_hit_string_key(const c_StableMap::Bucket* p, - const char* k, int len, int32_t hash) ALWAYS_INLINE; -bool inline sm_hit_string_key(const c_StableMap::Bucket* p, - const char* k, int len, int32_t hash) { +ALWAYS_INLINE +bool sm_hit_string_key(const c_StableMap::Bucket* p, const char* k, + int len, int32_t hash) { if (p->hasIntKey()) return false; const char* data = p->skey->data(); return data == k || (p->hash() == hash && @@ -3835,9 +3833,8 @@ void c_Set::add(TypedValue* val) { #define STRING_HASH(x) (int32_t(x) | 0x80000000) -bool inline hitString(const c_Set::Bucket* p, const char* k, - int len, int32_t hash) ALWAYS_INLINE; -bool inline hitString(const c_Set::Bucket* p, const char* k, +ALWAYS_INLINE +bool hitString(const c_Set::Bucket* p, const char* k, int len, int32_t hash) { assert(p->validValue()); if (p->hasInt()) return false; @@ -3847,8 +3844,8 @@ bool inline hitString(const c_Set::Bucket* p, const char* k, memcmp(data, k, len) == 0); } -bool inline hitInt(const c_Set::Bucket* p, int64_t ki) ALWAYS_INLINE; -bool inline hitInt(const c_Set::Bucket* p, int64_t ki) { +ALWAYS_INLINE +bool hitInt(const c_Set::Bucket* p, int64_t ki) { assert(p->validValue()); return p->hasInt() && p->data.m_data.num == ki; } @@ -3923,7 +3920,7 @@ c_Set::Bucket* c_Set::findForInsert(const char* k, int len, // findForNewInsert() is only safe to use if you know for sure that the // value is not already present in the Set. -inline ALWAYS_INLINE +ALWAYS_INLINE c_Set::Bucket* c_Set::findForNewInsert(size_t h0) const { size_t tableMask = m_nLastSlot; size_t probeIndex = h0 & tableMask; diff --git a/hphp/runtime/ext/ext_string.cpp b/hphp/runtime/ext/ext_string.cpp index 53ec3147a..eb5c2964d 100644 --- a/hphp/runtime/ext/ext_string.cpp +++ b/hphp/runtime/ext/ext_string.cpp @@ -33,7 +33,7 @@ namespace HPHP { static Mutex s_mutex; /////////////////////////////////////////////////////////////////////////////// -template inline ALWAYS_INLINE +template ALWAYS_INLINE String stringForEachBuffered(uint32_t bufLen, CStrRef str, Op action) { StringBuffer sb(bufLen); StringSlice sl = str.slice(); @@ -47,7 +47,7 @@ String stringForEachBuffered(uint32_t bufLen, CStrRef str, Op action) { return sb.detach(); } -template inline ALWAYS_INLINE +template ALWAYS_INLINE String stringForEach(uint32_t len, CStrRef str, Op action) { String ret = mutate ? str : String(len, ReserveString); @@ -67,7 +67,7 @@ String stringForEach(uint32_t len, CStrRef str, Op action) { return ret; } -template inline ALWAYS_INLINE +template ALWAYS_INLINE String stringForEachFast(CStrRef str, Op action) { if (str.empty()) { return str; @@ -343,7 +343,7 @@ String f_strtoupper(CStrRef str) { return stringForEachFast(str, toupper); } -template inline ALWAYS_INLINE +template ALWAYS_INLINE String stringToCaseFirst(CStrRef str, OpTo tocase, OpIs iscase) { if (str.empty() || iscase(str[0])) { return str; @@ -383,7 +383,7 @@ String f_strip_tags(CStrRef str, CStrRef allowable_tags /* = "" */) { return StringUtil::StripHTMLTags(str, allowable_tags); } -template inline ALWAYS_INLINE +template ALWAYS_INLINE String stringTrim(CStrRef str, CStrRef charlist) { char flags[256]; string_charmask(charlist.c_str(), charlist.size(), flags); diff --git a/hphp/runtime/vm/bytecode.cpp b/hphp/runtime/vm/bytecode.cpp index b4d4bdfd7..b2e399447 100644 --- a/hphp/runtime/vm/bytecode.cpp +++ b/hphp/runtime/vm/bytecode.cpp @@ -2942,7 +2942,7 @@ static inline void ratchetRefs(TypedValue*& result, TypedValue& tvRef, template -inline void OPTBLD_INLINE VMExecutionContext::getHelperPre( +OPTBLD_INLINE void VMExecutionContext::getHelperPre( PC& pc, unsigned& ndiscard, TypedValue*& base, @@ -2958,7 +2958,7 @@ inline void OPTBLD_INLINE VMExecutionContext::getHelperPre( #define GETHELPERPOST_ARGS ndiscard, tvRet, tvScratch, tvRef, tvRef2 template -inline void OPTBLD_INLINE VMExecutionContext::getHelperPost( +OPTBLD_INLINE void VMExecutionContext::getHelperPost( unsigned ndiscard, TypedValue*& tvRet, TypedValue& tvScratch, Variant& tvRef, Variant& tvRef2) { // Clean up all ndiscard elements on the stack. Actually discard @@ -2986,7 +2986,7 @@ inline void OPTBLD_INLINE VMExecutionContext::getHelperPost( #define GETHELPER_ARGS \ pc, ndiscard, tvRet, base, tvScratch, tvLiteral, \ tvRef, tvRef2, mcode, curMember -inline void OPTBLD_INLINE +OPTBLD_INLINE void VMExecutionContext::getHelper(PC& pc, unsigned& ndiscard, TypedValue*& tvRet, @@ -3009,7 +3009,7 @@ template -inline bool OPTBLD_INLINE VMExecutionContext::memberHelperPre( +OPTBLD_INLINE bool VMExecutionContext::memberHelperPre( PC& pc, unsigned& ndiscard, TypedValue*& base, TypedValue& tvScratch, TypedValue& tvLiteral, TypedValue& tvRef, TypedValue& tvRef2, @@ -3263,7 +3263,7 @@ template -inline bool OPTBLD_INLINE VMExecutionContext::setHelperPre( +OPTBLD_INLINE bool VMExecutionContext::setHelperPre( PC& pc, unsigned& ndiscard, TypedValue*& base, TypedValue& tvScratch, TypedValue& tvLiteral, TypedValue& tvRef, TypedValue& tvRef2, @@ -3274,7 +3274,7 @@ inline bool OPTBLD_INLINE VMExecutionContext::setHelperPre( #define SETHELPERPOST_ARGS ndiscard, tvRef, tvRef2 template -inline void OPTBLD_INLINE VMExecutionContext::setHelperPost( +OPTBLD_INLINE void VMExecutionContext::setHelperPost( unsigned ndiscard, Variant& tvRef, Variant& tvRef2) { // Clean up the stack. Decref all the elements for the vector, but // leave the first mdepth (they are not part of the vector data). @@ -3302,26 +3302,26 @@ inline void OPTBLD_INLINE VMExecutionContext::setHelperPost( m_stack.ndiscard(ndiscard); } -inline void OPTBLD_INLINE VMExecutionContext::iopLowInvalid(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopLowInvalid(PC& pc) { fprintf(stderr, "invalid bytecode executed\n"); abort(); } -inline void OPTBLD_INLINE VMExecutionContext::iopNop(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNop(PC& pc) { NEXT(); } -inline void OPTBLD_INLINE VMExecutionContext::iopPopC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopPopC(PC& pc) { NEXT(); m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopPopV(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopPopV(PC& pc) { NEXT(); m_stack.popV(); } -inline void OPTBLD_INLINE VMExecutionContext::iopPopR(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopPopR(PC& pc) { NEXT(); if (m_stack.topTV()->m_type != KindOfRef) { m_stack.popC(); @@ -3330,22 +3330,22 @@ inline void OPTBLD_INLINE VMExecutionContext::iopPopR(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopDup(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDup(PC& pc) { NEXT(); m_stack.dup(); } -inline void OPTBLD_INLINE VMExecutionContext::iopBox(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBox(PC& pc) { NEXT(); m_stack.box(); } -inline void OPTBLD_INLINE VMExecutionContext::iopUnbox(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopUnbox(PC& pc) { NEXT(); m_stack.unbox(); } -inline void OPTBLD_INLINE VMExecutionContext::iopBoxR(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBoxR(PC& pc) { NEXT(); TypedValue* tv = m_stack.topTV(); if (tv->m_type != KindOfRef) { @@ -3353,77 +3353,77 @@ inline void OPTBLD_INLINE VMExecutionContext::iopBoxR(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopUnboxR(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopUnboxR(PC& pc) { NEXT(); if (m_stack.topTV()->m_type == KindOfRef) { m_stack.unbox(); } } -inline void OPTBLD_INLINE VMExecutionContext::iopNull(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNull(PC& pc) { NEXT(); m_stack.pushNull(); } -inline void OPTBLD_INLINE VMExecutionContext::iopNullUninit(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNullUninit(PC& pc) { NEXT(); m_stack.pushNullUninit(); } -inline void OPTBLD_INLINE VMExecutionContext::iopTrue(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopTrue(PC& pc) { NEXT(); m_stack.pushTrue(); } -inline void OPTBLD_INLINE VMExecutionContext::iopFalse(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFalse(PC& pc) { NEXT(); m_stack.pushFalse(); } -inline void OPTBLD_INLINE VMExecutionContext::iopFile(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFile(PC& pc) { NEXT(); const StringData* s = m_fp->m_func->unit()->filepath(); m_stack.pushStaticString(const_cast(s)); } -inline void OPTBLD_INLINE VMExecutionContext::iopDir(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDir(PC& pc) { NEXT(); const StringData* s = m_fp->m_func->unit()->dirpath(); m_stack.pushStaticString(const_cast(s)); } -inline void OPTBLD_INLINE VMExecutionContext::iopInt(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopInt(PC& pc) { NEXT(); DECODE(int64_t, i); m_stack.pushInt(i); } -inline void OPTBLD_INLINE VMExecutionContext::iopDouble(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDouble(PC& pc) { NEXT(); DECODE(double, d); m_stack.pushDouble(d); } -inline void OPTBLD_INLINE VMExecutionContext::iopString(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopString(PC& pc) { NEXT(); DECODE_LITSTR(s); m_stack.pushStaticString(s); } -inline void OPTBLD_INLINE VMExecutionContext::iopArray(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopArray(PC& pc) { NEXT(); DECODE(Id, id); ArrayData* a = m_fp->m_func->unit()->lookupArrayId(id); m_stack.pushStaticArray(a); } -inline void OPTBLD_INLINE VMExecutionContext::iopNewArray(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNewArray(PC& pc) { NEXT(); auto arr = ArrayData::MakeReserve(HphpArray::SmallSize); m_stack.pushArrayNoRc(arr); } -inline void OPTBLD_INLINE VMExecutionContext::iopNewTuple(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNewTuple(PC& pc) { NEXT(); DECODE_IVA(n); // This constructor moves values, no inc/decref is necessary. @@ -3432,7 +3432,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopNewTuple(PC& pc) { m_stack.pushArrayNoRc(a); } -inline void OPTBLD_INLINE VMExecutionContext::iopAddElemC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAddElemC(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); Cell* c2 = m_stack.indC(1); @@ -3449,7 +3449,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopAddElemC(PC& pc) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopAddElemV(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAddElemV(PC& pc) { NEXT(); Ref* r1 = m_stack.topV(); Cell* c2 = m_stack.indC(1); @@ -3466,7 +3466,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopAddElemV(PC& pc) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopAddNewElemC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAddNewElemC(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); Cell* c2 = m_stack.indC(1); @@ -3477,7 +3477,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopAddNewElemC(PC& pc) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopAddNewElemV(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAddNewElemV(PC& pc) { NEXT(); Ref* r1 = m_stack.topV(); Cell* c2 = m_stack.indC(1); @@ -3488,7 +3488,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopAddNewElemV(PC& pc) { m_stack.popV(); } -inline void OPTBLD_INLINE VMExecutionContext::iopNewCol(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNewCol(PC& pc) { NEXT(); DECODE_IVA(cType); DECODE_IVA(nElms); @@ -3511,7 +3511,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopNewCol(PC& pc) { m_stack.pushObject(obj); } -inline void OPTBLD_INLINE VMExecutionContext::iopColAddNewElemC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopColAddNewElemC(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); Cell* c2 = m_stack.indC(1); @@ -3523,7 +3523,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopColAddNewElemC(PC& pc) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopColAddElemC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopColAddElemC(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); Cell* c2 = m_stack.indC(1); @@ -3537,7 +3537,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopColAddElemC(PC& pc) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopCns(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCns(PC& pc) { NEXT(); DECODE_LITSTR(s); TypedValue* cns = Unit::loadCns(s); @@ -3550,7 +3550,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCns(PC& pc) { cellDup(*cns, *c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopCnsE(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCnsE(PC& pc) { NEXT(); DECODE_LITSTR(s); TypedValue* cns = Unit::loadCns(s); @@ -3561,7 +3561,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCnsE(PC& pc) { cellDup(*cns, *c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopCnsU(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCnsU(PC& pc) { NEXT(); DECODE_LITSTR(name); DECODE_LITSTR(fallback); @@ -3582,14 +3582,14 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCnsU(PC& pc) { cellDup(*cns, *c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopDefCns(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDefCns(PC& pc) { NEXT(); DECODE_LITSTR(s); TypedValue* tv = m_stack.topTV(); tvAsVariant(tv) = Unit::defCns(s, tv); } -inline void OPTBLD_INLINE VMExecutionContext::iopClsCns(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopClsCns(PC& pc) { NEXT(); DECODE_LITSTR(clsCnsName); TypedValue* tv = m_stack.topTV(); @@ -3604,7 +3604,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopClsCns(PC& pc) { cellDup(*clsCns, *tv); } -inline void OPTBLD_INLINE VMExecutionContext::iopClsCnsD(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopClsCnsD(PC& pc) { NEXT(); DECODE_LITSTR(clsCnsName); DECODE(Id, classId); @@ -3618,7 +3618,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopClsCnsD(PC& pc) { cellDup(*clsCns, *c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopConcat(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopConcat(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); Cell* c2 = m_stack.indC(1); @@ -3633,14 +3633,14 @@ inline void OPTBLD_INLINE VMExecutionContext::iopConcat(PC& pc) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopNot(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNot(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); cellAsVariant(*c1) = !cellAsVariant(*c1).toBoolean(); } -inline void OPTBLD_INLINE VMExecutionContext::iopAbs(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAbs(PC& pc) { NEXT(); auto c1 = m_stack.topC(); @@ -3648,7 +3648,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopAbs(PC& pc) { } template -inline void OPTBLD_INLINE VMExecutionContext::implCellBinOp(PC& pc, Op op) { +OPTBLD_INLINE void VMExecutionContext::implCellBinOp(PC& pc, Op op) { NEXT(); auto const c1 = m_stack.topC(); auto const c2 = m_stack.indC(1); @@ -3659,7 +3659,7 @@ inline void OPTBLD_INLINE VMExecutionContext::implCellBinOp(PC& pc, Op op) { } template -inline void OPTBLD_INLINE VMExecutionContext::implCellBinOpBool(PC& pc, Op op) { +OPTBLD_INLINE void VMExecutionContext::implCellBinOpBool(PC& pc, Op op) { NEXT(); auto const c1 = m_stack.topC(); auto const c2 = m_stack.indC(1); @@ -3669,99 +3669,99 @@ inline void OPTBLD_INLINE VMExecutionContext::implCellBinOpBool(PC& pc, Op op) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopAdd(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAdd(PC& pc) { implCellBinOp(pc, cellAdd); } -inline void OPTBLD_INLINE VMExecutionContext::iopSub(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSub(PC& pc) { implCellBinOp(pc, cellSub); } -inline void OPTBLD_INLINE VMExecutionContext::iopMul(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopMul(PC& pc) { implCellBinOp(pc, cellMul); } -inline void OPTBLD_INLINE VMExecutionContext::iopDiv(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDiv(PC& pc) { implCellBinOp(pc, cellDiv); } -inline void OPTBLD_INLINE VMExecutionContext::iopMod(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopMod(PC& pc) { implCellBinOp(pc, cellMod); } -inline void OPTBLD_INLINE VMExecutionContext::iopBitAnd(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBitAnd(PC& pc) { implCellBinOp(pc, cellBitAnd); } -inline void OPTBLD_INLINE VMExecutionContext::iopBitOr(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBitOr(PC& pc) { implCellBinOp(pc, cellBitOr); } -inline void OPTBLD_INLINE VMExecutionContext::iopBitXor(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBitXor(PC& pc) { implCellBinOp(pc, cellBitXor); } -inline void OPTBLD_INLINE VMExecutionContext::iopXor(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopXor(PC& pc) { implCellBinOpBool(pc, [&] (Cell c1, Cell c2) -> bool { return cellToBool(c1) ^ cellToBool(c2); }); } -inline void OPTBLD_INLINE VMExecutionContext::iopSame(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSame(PC& pc) { implCellBinOpBool(pc, cellSame); } -inline void OPTBLD_INLINE VMExecutionContext::iopNSame(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNSame(PC& pc) { implCellBinOpBool(pc, [&] (Cell c1, Cell c2) { return !cellSame(c1, c2); }); } -inline void OPTBLD_INLINE VMExecutionContext::iopEq(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopEq(PC& pc) { implCellBinOpBool(pc, [&] (Cell c1, Cell c2) { return cellEqual(c1, c2); }); } -inline void OPTBLD_INLINE VMExecutionContext::iopNeq(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNeq(PC& pc) { implCellBinOpBool(pc, [&] (Cell c1, Cell c2) { return !cellEqual(c1, c2); }); } -inline void OPTBLD_INLINE VMExecutionContext::iopLt(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopLt(PC& pc) { implCellBinOpBool(pc, [&] (Cell c1, Cell c2) { return cellLess(c1, c2); }); } -inline void OPTBLD_INLINE VMExecutionContext::iopLte(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopLte(PC& pc) { implCellBinOpBool(pc, cellLessOrEqual); } -inline void OPTBLD_INLINE VMExecutionContext::iopGt(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopGt(PC& pc) { implCellBinOpBool(pc, [&] (Cell c1, Cell c2) { return cellGreater(c1, c2); }); } -inline void OPTBLD_INLINE VMExecutionContext::iopGte(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopGte(PC& pc) { implCellBinOpBool(pc, cellGreaterOrEqual); } -inline void OPTBLD_INLINE VMExecutionContext::iopShl(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopShl(PC& pc) { implCellBinOp(pc, [&] (Cell c1, Cell c2) { return make_tv(cellToInt(c1) << cellToInt(c2)); }); } -inline void OPTBLD_INLINE VMExecutionContext::iopShr(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopShr(PC& pc) { implCellBinOp(pc, [&] (Cell c1, Cell c2) { return make_tv(cellToInt(c1) >> cellToInt(c2)); }); } -inline void OPTBLD_INLINE VMExecutionContext::iopSqrt(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSqrt(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); @@ -3789,48 +3789,48 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSqrt(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopBitNot(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBitNot(PC& pc) { NEXT(); cellBitNot(*m_stack.topC()); } -inline void OPTBLD_INLINE VMExecutionContext::iopCastBool(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCastBool(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); tvCastToBooleanInPlace(c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopCastInt(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCastInt(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); tvCastToInt64InPlace(c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopCastDouble(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCastDouble(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); tvCastToDoubleInPlace(c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopCastString(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCastString(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); tvCastToStringInPlace(c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopCastArray(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCastArray(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); tvCastToArrayInPlace(c1); } -inline void OPTBLD_INLINE VMExecutionContext::iopCastObject(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCastObject(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); tvCastToObjectInPlace(c1); } -inline bool OPTBLD_INLINE VMExecutionContext::cellInstanceOf( +OPTBLD_INLINE bool VMExecutionContext::cellInstanceOf( TypedValue* tv, const NamedEntity* ne) { assert(tv->m_type != KindOfRef); Class* cls = nullptr; @@ -3870,7 +3870,7 @@ inline bool OPTBLD_INLINE VMExecutionContext::cellInstanceOf( return false; } -inline ALWAYS_INLINE +ALWAYS_INLINE bool VMExecutionContext::iopInstanceOfHelper(const StringData* str1, Cell* c2) { const NamedEntity* rhs = Unit::GetNamedEntity(str1, false); // Because of other codepaths, an un-normalized name might enter the @@ -3888,7 +3888,7 @@ bool VMExecutionContext::iopInstanceOfHelper(const StringData* str1, Cell* c2) { return false; } -inline void OPTBLD_INLINE VMExecutionContext::iopInstanceOf(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopInstanceOf(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); // c2 instanceof c1 Cell* c2 = m_stack.indC(1); @@ -3910,7 +3910,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopInstanceOf(PC& pc) { c2->m_type = KindOfBoolean; } -inline void OPTBLD_INLINE VMExecutionContext::iopInstanceOfD(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopInstanceOfD(PC& pc) { NEXT(); DECODE(Id, id); if (shouldProfile()) { @@ -3924,7 +3924,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopInstanceOfD(PC& pc) { c1->m_type = KindOfBoolean; } -inline void OPTBLD_INLINE VMExecutionContext::iopPrint(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopPrint(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); echo(cellAsVariant(*c1).toString()); @@ -3933,7 +3933,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopPrint(PC& pc) { c1->m_data.num = 1; } -inline void OPTBLD_INLINE VMExecutionContext::iopClone(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopClone(PC& pc) { NEXT(); TypedValue* tv = m_stack.topTV(); if (tv->m_type != KindOfObject) { @@ -3948,7 +3948,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopClone(PC& pc) { tv->m_data.pobj = newobj; } -inline void OPTBLD_INLINE VMExecutionContext::iopExit(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopExit(PC& pc) { NEXT(); int exitCode = 0; Cell* c1 = m_stack.topC(); @@ -3962,7 +3962,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopExit(PC& pc) { throw ExitException(exitCode); } -inline void OPTBLD_INLINE VMExecutionContext::iopFatal(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFatal(PC& pc) { NEXT(); TypedValue* top = m_stack.topTV(); std::string msg; @@ -3980,13 +3980,13 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFatal(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::jmpSurpriseCheck(Offset offset) { +OPTBLD_INLINE void VMExecutionContext::jmpSurpriseCheck(Offset offset) { if (offset <= 0 && UNLIKELY(Transl::TargetCache::loadConditionFlags())) { EventHook::CheckSurprise(); } } -inline void OPTBLD_INLINE VMExecutionContext::iopJmp(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopJmp(PC& pc) { NEXT(); DECODE_JMP(Offset, offset); jmpSurpriseCheck(offset); @@ -3995,7 +3995,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopJmp(PC& pc) { } template -inline void OPTBLD_INLINE VMExecutionContext::jmpOpImpl(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::jmpOpImpl(PC& pc) { static_assert(op == OpJmpZ || op == OpJmpNZ, "jmpOpImpl should only be used by JmpZ and JmpNZ"); NEXT(); @@ -4024,11 +4024,11 @@ inline void OPTBLD_INLINE VMExecutionContext::jmpOpImpl(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopJmpZ(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopJmpZ(PC& pc) { jmpOpImpl(pc); } -inline void OPTBLD_INLINE VMExecutionContext::iopJmpNZ(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopJmpNZ(PC& pc) { jmpOpImpl(pc); } @@ -4048,7 +4048,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopJmpNZ(PC& pc) { } \ } while(0) -inline void OPTBLD_INLINE VMExecutionContext::iopIterBreak(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIterBreak(PC& pc) { PC savedPc = pc; NEXT(); DECODE_ITER_LIST(iterTypeList, iterIdList, veclen); @@ -4078,7 +4078,7 @@ static SwitchMatch doubleCheck(double d, int64_t& out) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopSwitch(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSwitch(PC& pc) { PC origPC = pc; NEXT(); DECODE(int32_t, veclen); @@ -4186,7 +4186,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSwitch(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopSSwitch(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSSwitch(PC& pc) { PC origPC = pc; NEXT(); DECODE(int32_t, veclen); @@ -4213,7 +4213,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSSwitch(PC& pc) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopRetC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopRetC(PC& pc) { NEXT(); uint soff = m_fp->m_soff; assert(!m_fp->m_func->isGenerator()); @@ -4250,17 +4250,17 @@ inline void OPTBLD_INLINE VMExecutionContext::iopRetC(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopRetV(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopRetV(PC& pc) { iopRetC(pc); } -inline void OPTBLD_INLINE VMExecutionContext::iopUnwind(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopUnwind(PC& pc) { assert(!m_faults.empty()); assert(m_faults.back().m_savedRaiseOffset != kInvalidOffset); throw VMPrepareUnwind(); } -inline void OPTBLD_INLINE VMExecutionContext::iopThrow(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopThrow(PC& pc) { Cell* c1 = m_stack.topC(); if (c1->m_type != KindOfObject || !c1->m_data.pobj->instanceof(SystemLib::s_ExceptionClass)) { @@ -4274,13 +4274,13 @@ inline void OPTBLD_INLINE VMExecutionContext::iopThrow(PC& pc) { throw obj; } -inline void OPTBLD_INLINE VMExecutionContext::iopAGetC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAGetC(PC& pc) { NEXT(); TypedValue* tv = m_stack.topTV(); lookupClsRef(tv, tv, true); } -inline void OPTBLD_INLINE VMExecutionContext::iopAGetL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAGetL(PC& pc) { NEXT(); DECODE_HA(local); TypedValue* top = m_stack.allocTV(); @@ -4313,7 +4313,7 @@ static inline void cgetl_body(ActRec* fp, } } -inline void OPTBLD_INLINE VMExecutionContext::iopCGetL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCGetL(PC& pc) { NEXT(); DECODE_HA(local); Cell* to = m_stack.allocC(); @@ -4321,7 +4321,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCGetL(PC& pc) { cgetl_body(m_fp, fr, to, local); } -inline void OPTBLD_INLINE VMExecutionContext::iopCGetL2(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCGetL2(PC& pc) { NEXT(); DECODE_HA(local); TypedValue* oldTop = m_stack.topTV(); @@ -4332,7 +4332,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCGetL2(PC& pc) { cgetl_body(m_fp, fr, to, local); } -inline void OPTBLD_INLINE VMExecutionContext::iopCGetL3(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCGetL3(PC& pc) { NEXT(); DECODE_HA(local); TypedValue* oldTop = m_stack.topTV(); @@ -4344,7 +4344,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCGetL3(PC& pc) { cgetl_body(m_fp, fr, to, local); } -inline void OPTBLD_INLINE VMExecutionContext::iopCGetN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCGetN(PC& pc) { NEXT(); StringData* name; TypedValue* to = m_stack.topTV(); @@ -4361,7 +4361,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCGetN(PC& pc) { decRefStr(name); // TODO(#1146727): leaks during exceptions } -inline void OPTBLD_INLINE VMExecutionContext::iopCGetG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCGetG(PC& pc) { NEXT(); StringData* name; TypedValue* to = m_stack.topTV(); @@ -4416,7 +4416,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCGetG(PC& pc) { SPROP_OP_POSTLUDE \ } while (0) -inline void OPTBLD_INLINE VMExecutionContext::iopCGetS(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCGetS(PC& pc) { StringData* name; GETS(false); if (shouldProfile() && name && name->isStatic()) { @@ -4425,7 +4425,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCGetS(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopCGetM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCGetM(PC& pc) { PC oldPC = pc; NEXT(); DECLARE_GETHELPER_ARGS @@ -4449,7 +4449,7 @@ static inline void vgetl_body(TypedValue* fr, TypedValue* to) { refDup(*fr, *to); } -inline void OPTBLD_INLINE VMExecutionContext::iopVGetL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopVGetL(PC& pc) { NEXT(); DECODE_HA(local); Ref* to = m_stack.allocV(); @@ -4457,7 +4457,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopVGetL(PC& pc) { vgetl_body(fr, to); } -inline void OPTBLD_INLINE VMExecutionContext::iopVGetN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopVGetN(PC& pc) { NEXT(); StringData* name; TypedValue* to = m_stack.topTV(); @@ -4469,7 +4469,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopVGetN(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopVGetG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopVGetG(PC& pc) { NEXT(); StringData* name; TypedValue* to = m_stack.topTV(); @@ -4481,13 +4481,13 @@ inline void OPTBLD_INLINE VMExecutionContext::iopVGetG(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopVGetS(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopVGetS(PC& pc) { StringData* name; GETS(true); } #undef GETS -inline void OPTBLD_INLINE VMExecutionContext::iopVGetM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopVGetM(PC& pc) { NEXT(); DECLARE_SETHELPER_ARGS TypedValue* tv1 = m_stack.allocTV(); @@ -4505,7 +4505,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopVGetM(PC& pc) { setHelperPost<1>(SETHELPERPOST_ARGS); } -inline void OPTBLD_INLINE VMExecutionContext::iopIssetN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIssetN(PC& pc) { NEXT(); StringData* name; TypedValue* tv1 = m_stack.topTV(); @@ -4523,7 +4523,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIssetN(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopIssetG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIssetG(PC& pc) { NEXT(); StringData* name; TypedValue* tv1 = m_stack.topTV(); @@ -4541,7 +4541,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIssetG(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopIssetS(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIssetS(PC& pc) { StringData* name; SPROP_OP_PRELUDE bool e; @@ -4557,7 +4557,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIssetS(PC& pc) { } template -inline void OPTBLD_INLINE VMExecutionContext::isSetEmptyM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::isSetEmptyM(PC& pc) { NEXT(); DECLARE_GETHELPER_ARGS getHelperPre(MEMBERHELPERPRE_ARGS); @@ -4587,12 +4587,12 @@ inline void OPTBLD_INLINE VMExecutionContext::isSetEmptyM(PC& pc) { tvRet->m_type = KindOfBoolean; } -inline void OPTBLD_INLINE VMExecutionContext::iopIssetM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIssetM(PC& pc) { isSetEmptyM(pc); } #define IOP_TYPE_CHECK_INSTR_L(checkInit, what, predicate) \ -inline void OPTBLD_INLINE VMExecutionContext::iopIs ## what ## L(PC& pc) { \ +OPTBLD_INLINE void VMExecutionContext::iopIs ## what ## L(PC& pc) { \ NEXT(); \ DECODE_HA(local); \ TypedValue* tv = frame_local(m_fp, local); \ @@ -4606,10 +4606,10 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIs ## what ## L(PC& pc) { \ } \ #define IOP_TYPE_CHECK_INSTR_C(checkInit, what, predicate) \ -inline void OPTBLD_INLINE VMExecutionContext::iopIs ## what ## C(PC& pc) { \ +OPTBLD_INLINE void VMExecutionContext::iopIs ## what ## C(PC& pc) { \ NEXT(); \ TypedValue* topTv = m_stack.topTV(); \ - assert(topTv->m_type != KindOfRef); \ + assert(topTv->m_type != KindOfRef); \ bool ret = predicate(tvAsCVarRef(topTv)); \ tvRefcountedDecRefCell(topTv); \ topTv->m_data.num = ret; \ @@ -4630,7 +4630,7 @@ IOP_TYPE_CHECK_INSTR(true, Double, is_double) IOP_TYPE_CHECK_INSTR(true, Bool, is_bool) #undef IOP_TYPE_CHECK_INSTR -inline void OPTBLD_INLINE VMExecutionContext::iopEmptyL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopEmptyL(PC& pc) { NEXT(); DECODE_HA(local); TypedValue* loc = frame_local(m_fp, local); @@ -4640,7 +4640,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopEmptyL(PC& pc) { tv1->m_type = KindOfBoolean; } -inline void OPTBLD_INLINE VMExecutionContext::iopEmptyN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopEmptyN(PC& pc) { NEXT(); StringData* name; TypedValue* tv1 = m_stack.topTV(); @@ -4658,7 +4658,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopEmptyN(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopEmptyG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopEmptyG(PC& pc) { NEXT(); StringData* name; TypedValue* tv1 = m_stack.topTV(); @@ -4676,7 +4676,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopEmptyG(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopEmptyS(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopEmptyS(PC& pc) { StringData* name; SPROP_OP_PRELUDE bool e; @@ -4691,11 +4691,11 @@ inline void OPTBLD_INLINE VMExecutionContext::iopEmptyS(PC& pc) { SPROP_OP_POSTLUDE } -inline void OPTBLD_INLINE VMExecutionContext::iopEmptyM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopEmptyM(PC& pc) { isSetEmptyM(pc); } -inline void OPTBLD_INLINE VMExecutionContext::iopAKExists(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopAKExists(PC& pc) { NEXT(); TypedValue* arr = m_stack.topTV(); TypedValue* key = arr + 1; @@ -4706,7 +4706,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopAKExists(PC& pc) { key->m_type = KindOfBoolean; } -inline void OPTBLD_INLINE VMExecutionContext::iopArrayIdx(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopArrayIdx(PC& pc) { NEXT(); TypedValue* def = m_stack.topTV(); TypedValue* arr = m_stack.indTV(1); @@ -4720,7 +4720,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopArrayIdx(PC& pc) { tvAsVariant(key) = result; } -inline void OPTBLD_INLINE VMExecutionContext::iopSetL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSetL(PC& pc) { NEXT(); DECODE_HA(local); assert(local < m_fp->m_func->numLocals()); @@ -4729,7 +4729,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSetL(PC& pc) { tvSet(*fr, *to); } -inline void OPTBLD_INLINE VMExecutionContext::iopSetN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSetN(PC& pc) { NEXT(); StringData* name; Cell* fr = m_stack.topC(); @@ -4743,7 +4743,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSetN(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopSetG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSetG(PC& pc) { NEXT(); StringData* name; Cell* fr = m_stack.topC(); @@ -4757,7 +4757,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSetG(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopSetS(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSetS(PC& pc) { NEXT(); TypedValue* tv1 = m_stack.topTV(); TypedValue* classref = m_stack.indTV(1); @@ -4779,7 +4779,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSetS(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopSetM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSetM(PC& pc) { NEXT(); DECLARE_SETHELPER_ARGS if (!setHelperPre(SETHELPERPOST_ARGS); } -inline void OPTBLD_INLINE VMExecutionContext::iopSetWithRefLM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSetWithRefLM(PC& pc) { NEXT(); DECLARE_SETHELPER_ARGS bool skip = setHelperPre(SETHELPERPOST_ARGS); } -inline void OPTBLD_INLINE VMExecutionContext::iopSetWithRefRM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSetWithRefRM(PC& pc) { NEXT(); DECLARE_SETHELPER_ARGS bool skip = setHelperPre(SETHELPERPOST_ARGS); } -inline void OPTBLD_INLINE VMExecutionContext::iopIncDecL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIncDecL(PC& pc) { NEXT(); DECODE_HA(local); DECODE(unsigned char, op); @@ -4963,7 +4963,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIncDecL(PC& pc) { IncDecBody(op, fr, to); } -inline void OPTBLD_INLINE VMExecutionContext::iopIncDecN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIncDecN(PC& pc) { NEXT(); DECODE(unsigned char, op); StringData* name; @@ -4976,7 +4976,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIncDecN(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopIncDecG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIncDecG(PC& pc) { NEXT(); DECODE(unsigned char, op); StringData* name; @@ -4989,7 +4989,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIncDecG(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopIncDecS(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIncDecS(PC& pc) { StringData* name; SPROP_OP_PRELUDE DECODE(unsigned char, op); @@ -5004,7 +5004,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIncDecS(PC& pc) { SPROP_OP_POSTLUDE } -inline void OPTBLD_INLINE VMExecutionContext::iopIncDecM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIncDecM(PC& pc) { NEXT(); DECODE(unsigned char, op); DECLARE_SETHELPER_ARGS @@ -5040,7 +5040,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIncDecM(PC& pc) { memcpy(c1, &to, sizeof(TypedValue)); } -inline void OPTBLD_INLINE VMExecutionContext::iopBindL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBindL(PC& pc) { NEXT(); DECODE_HA(local); Ref* fr = m_stack.topV(); @@ -5048,7 +5048,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopBindL(PC& pc) { tvBind(fr, to); } -inline void OPTBLD_INLINE VMExecutionContext::iopBindN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBindN(PC& pc) { NEXT(); StringData* name; TypedValue* fr = m_stack.topTV(); @@ -5062,7 +5062,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopBindN(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopBindG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBindG(PC& pc) { NEXT(); StringData* name; TypedValue* fr = m_stack.topTV(); @@ -5076,7 +5076,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopBindG(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopBindS(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBindS(PC& pc) { NEXT(); TypedValue* fr = m_stack.topTV(); TypedValue* classref = m_stack.indTV(1); @@ -5098,7 +5098,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopBindS(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopBindM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBindM(PC& pc) { NEXT(); DECLARE_SETHELPER_ARGS TypedValue* tv1 = m_stack.topTV(); @@ -5110,7 +5110,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopBindM(PC& pc) { setHelperPost<1>(SETHELPERPOST_ARGS); } -inline void OPTBLD_INLINE VMExecutionContext::iopUnsetL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopUnsetL(PC& pc) { NEXT(); DECODE_HA(local); assert(local < m_fp->m_func->numLocals()); @@ -5119,7 +5119,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopUnsetL(PC& pc) { tvWriteUninit(tv); } -inline void OPTBLD_INLINE VMExecutionContext::iopUnsetN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopUnsetN(PC& pc) { NEXT(); StringData* name; TypedValue* tv1 = m_stack.topTV(); @@ -5134,7 +5134,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopUnsetN(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopUnsetG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopUnsetG(PC& pc) { NEXT(); TypedValue* tv1 = m_stack.topTV(); StringData* name = lookup_name(tv1); @@ -5145,7 +5145,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopUnsetG(PC& pc) { decRefStr(name); } -inline void OPTBLD_INLINE VMExecutionContext::iopUnsetM(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopUnsetM(PC& pc) { NEXT(); DECLARE_SETHELPER_ARGS if (!setHelperPre(SETHELPERPOST_ARGS); } -inline ActRec* OPTBLD_INLINE VMExecutionContext::fPushFuncImpl( +OPTBLD_INLINE ActRec* VMExecutionContext::fPushFuncImpl( const Func* func, int numArgs) { DEBUGGER_IF(phpBreakpointEnabled(func->name()->data())); @@ -5182,7 +5182,7 @@ inline ActRec* OPTBLD_INLINE VMExecutionContext::fPushFuncImpl( return ar; } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushFunc(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushFunc(PC& pc) { NEXT(); DECODE_IVA(numArgs); Cell* c1 = m_stack.topC(); @@ -5228,7 +5228,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushFunc(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushFuncD(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushFuncD(PC& pc) { NEXT(); DECODE_IVA(numArgs); DECODE(Id, id); @@ -5242,7 +5242,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushFuncD(PC& pc) { ar->setThis(nullptr); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushFuncU(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushFuncU(PC& pc) { NEXT(); DECODE_IVA(numArgs); DECODE(Id, nsFunc); @@ -5289,7 +5289,7 @@ void VMExecutionContext::fPushObjMethodImpl( } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushObjMethod(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushObjMethod(PC& pc) { NEXT(); DECODE_IVA(numArgs); Cell* c1 = m_stack.topC(); // Method name. @@ -5308,7 +5308,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushObjMethod(PC& pc) { fPushObjMethodImpl(cls, name, obj, numArgs); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushObjMethodD(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushObjMethodD(PC& pc) { NEXT(); DECODE_IVA(numArgs); DECODE_LITSTR(name); @@ -5370,7 +5370,7 @@ void VMExecutionContext::pushClsMethodImpl(Class* cls, } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushClsMethod(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushClsMethod(PC& pc) { NEXT(); DECODE_IVA(numArgs); Cell* c1 = m_stack.indC(1); // Method name. @@ -5388,7 +5388,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushClsMethod(PC& pc) { pushClsMethodImpl(cls, name, obj, numArgs); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushClsMethodD(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushClsMethodD(PC& pc) { NEXT(); DECODE_IVA(numArgs); DECODE_LITSTR(name); @@ -5403,7 +5403,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushClsMethodD(PC& pc) { pushClsMethodImpl(cls, name, obj, numArgs); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushClsMethodF(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushClsMethodF(PC& pc) { NEXT(); DECODE_IVA(numArgs); Cell* c1 = m_stack.indC(1); // Method name. @@ -5421,7 +5421,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushClsMethodF(PC& pc) { pushClsMethodImpl(cls, name, obj, numArgs); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushCtor(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushCtor(PC& pc) { NEXT(); DECODE_IVA(numArgs); TypedValue* tv = m_stack.topTV(); @@ -5450,7 +5450,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushCtor(PC& pc) { ar->setVarEnv(nullptr); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushCtorD(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushCtorD(PC& pc) { NEXT(); DECODE_IVA(numArgs); DECODE(Id, id); @@ -5480,7 +5480,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushCtorD(PC& pc) { ar->setVarEnv(nullptr); } -inline void OPTBLD_INLINE VMExecutionContext::iopDecodeCufIter(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDecodeCufIter(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -5518,7 +5518,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopDecodeCufIter(PC& pc) { m_stack.popC(); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushCufIter(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushCufIter(PC& pc) { NEXT(); DECODE_IVA(numArgs); DECODE_IA(itId); @@ -5543,9 +5543,8 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushCufIter(PC& pc) { ar->initNumArgs(numArgs, false /* isFPushCtor */); } -inline void OPTBLD_INLINE VMExecutionContext::doFPushCuf(PC& pc, - bool forward, - bool safe) { +OPTBLD_INLINE void VMExecutionContext::doFPushCuf(PC& pc, + bool forward, bool safe) { NEXT(); DECODE_IVA(numArgs); @@ -5591,15 +5590,15 @@ inline void OPTBLD_INLINE VMExecutionContext::doFPushCuf(PC& pc, tvRefcountedDecRef(&func); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushCuf(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushCuf(PC& pc) { doFPushCuf(pc, false, false); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushCufF(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushCufF(PC& pc) { doFPushCuf(pc, true, false); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPushCufSafe(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPushCufSafe(PC& pc) { doFPushCuf(pc, false, true); } @@ -5607,7 +5606,7 @@ static inline ActRec* arFromInstr(TypedValue* sp, const Op* pc) { return arFromSpOffset((ActRec*)sp, instrSpToArDelta(pc)); } -inline void OPTBLD_INLINE VMExecutionContext::iopFPassC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassC(PC& pc) { #ifdef DEBUG ActRec* ar = arFromInstr(m_stack.top(), (Op*)pc); #endif @@ -5625,7 +5624,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPassC(PC& pc) { assert(paramId < ar->numArgs()); \ const Func* func = ar->m_func; -inline void OPTBLD_INLINE VMExecutionContext::iopFPassCW(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassCW(PC& pc) { FPASSC_CHECKED_PRELUDE if (func->mustBeRef(paramId)) { TRACE(1, "FPassCW: function %s(%d) param %d is by reference, " @@ -5636,7 +5635,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPassCW(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPassCE(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassCE(PC& pc) { FPASSC_CHECKED_PRELUDE if (func->mustBeRef(paramId)) { TRACE(1, "FPassCE: function %s(%d) param %d is by reference, " @@ -5649,7 +5648,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPassCE(PC& pc) { #undef FPASSC_CHECKED_PRELUDE -inline void OPTBLD_INLINE VMExecutionContext::iopFPassV(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassV(PC& pc) { ActRec* ar = arFromInstr(m_stack.top(), (Op*)pc); NEXT(); DECODE_IVA(paramId); @@ -5660,7 +5659,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPassV(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPassR(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassR(PC& pc) { ActRec* ar = arFromInstr(m_stack.top(), (Op*)pc); NEXT(); DECODE_IVA(paramId); @@ -5678,7 +5677,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPassR(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPassL(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassL(PC& pc) { ActRec* ar = arFromInstr(m_stack.top(), (Op*)pc); NEXT(); DECODE_IVA(paramId); @@ -5693,7 +5692,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPassL(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPassN(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassN(PC& pc) { ActRec* ar = arFromInstr(m_stack.top(), (Op*)pc); PC origPc = pc; NEXT(); @@ -5706,7 +5705,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPassN(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPassG(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassG(PC& pc) { ActRec* ar = arFromInstr(m_stack.top(), (Op*)pc); PC origPc = pc; NEXT(); @@ -5719,7 +5718,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPassG(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopFPassS(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFPassS(PC& pc) { ActRec* ar = arFromInstr(m_stack.top(), (Op*)pc); PC origPc = pc; NEXT(); @@ -5779,7 +5778,7 @@ bool VMExecutionContext::doFCall(ActRec* ar, PC& pc) { return false; } -inline void OPTBLD_INLINE VMExecutionContext::iopFCall(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFCall(PC& pc) { ActRec* ar = arFromInstr(m_stack.top(), (Op*)pc); NEXT(); DECODE_IVA(numArgs); @@ -5788,7 +5787,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFCall(PC& pc) { doFCall(ar, pc); } -inline void OPTBLD_INLINE VMExecutionContext::iopFCallBuiltin(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFCallBuiltin(PC& pc) { NEXT(); DECODE_IVA(numArgs); DECODE_IVA(numNonDefault); @@ -5959,12 +5958,12 @@ bool VMExecutionContext::doFCallArrayTC(PC pc) { return ret; } -inline void OPTBLD_INLINE VMExecutionContext::iopFCallArray(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFCallArray(PC& pc) { NEXT(); (void)doFCallArray(pc); } -inline void OPTBLD_INLINE VMExecutionContext::iopCufSafeArray(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCufSafeArray(PC& pc) { NEXT(); Array ret; ret.append(tvAsVariant(m_stack.top() + 1)); @@ -5974,7 +5973,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCufSafeArray(PC& pc) { tvAsVariant(m_stack.top()) = ret; } -inline void OPTBLD_INLINE VMExecutionContext::iopCufSafeReturn(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCufSafeReturn(PC& pc) { NEXT(); bool ok = cellToBool(*tvToCell(m_stack.top() + 1)); tvRefcountedDecRef(m_stack.top() + 1); @@ -5993,7 +5992,7 @@ inline bool VMExecutionContext::initIterator(PC& pc, PC& origPc, Iter* it, return hasElems; } -inline void OPTBLD_INLINE VMExecutionContext::iopIterInit(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIterInit(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6007,7 +6006,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIterInit(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopIterInitK(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIterInitK(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6024,7 +6023,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIterInitK(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopWIterInit(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopWIterInit(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6038,7 +6037,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopWIterInit(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopWIterInitK(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopWIterInitK(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6079,7 +6078,7 @@ inline bool VMExecutionContext::initIteratorM(PC& pc, PC& origPc, Iter* it, return hasElems; } -inline void OPTBLD_INLINE VMExecutionContext::iopMIterInit(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopMIterInit(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6092,7 +6091,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopMIterInit(PC& pc) { initIteratorM(pc, origPc, it, offset, r1, tv1, nullptr); } -inline void OPTBLD_INLINE VMExecutionContext::iopMIterInitK(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopMIterInitK(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6107,7 +6106,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopMIterInitK(PC& pc) { initIteratorM(pc, origPc, it, offset, r1, tv1, tv2); } -inline void OPTBLD_INLINE VMExecutionContext::iopIterNext(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIterNext(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6121,7 +6120,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIterNext(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopIterNextK(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIterNextK(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6138,7 +6137,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopIterNextK(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopWIterNext(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopWIterNext(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6152,7 +6151,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopWIterNext(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopWIterNextK(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopWIterNextK(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6169,7 +6168,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopWIterNextK(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopMIterNext(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopMIterNext(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6182,7 +6181,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopMIterNext(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopMIterNextK(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopMIterNextK(PC& pc) { PC origPc = pc; NEXT(); DECODE_IA(itId); @@ -6197,29 +6196,28 @@ inline void OPTBLD_INLINE VMExecutionContext::iopMIterNextK(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopIterFree(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIterFree(PC& pc) { NEXT(); DECODE_IA(itId); Iter* it = frame_iter(m_fp, itId); it->free(); } -inline void OPTBLD_INLINE VMExecutionContext::iopMIterFree(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopMIterFree(PC& pc) { NEXT(); DECODE_IA(itId); Iter* it = frame_iter(m_fp, itId); it->mfree(); } -inline void OPTBLD_INLINE VMExecutionContext::iopCIterFree(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCIterFree(PC& pc) { NEXT(); DECODE_IA(itId); Iter* it = frame_iter(m_fp, itId); it->cfree(); } -inline void OPTBLD_INLINE inclOp(VMExecutionContext *ec, PC &pc, - InclOpFlags flags) { +OPTBLD_INLINE void inclOp(VMExecutionContext *ec, PC &pc, InclOpFlags flags) { NEXT(); Cell* c1 = ec->m_stack.topC(); String path(prepareKey(c1)); @@ -6251,27 +6249,27 @@ inline void OPTBLD_INLINE inclOp(VMExecutionContext *ec, PC &pc, } } -inline void OPTBLD_INLINE VMExecutionContext::iopIncl(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIncl(PC& pc) { inclOp(this, pc, InclOpDefault); } -inline void OPTBLD_INLINE VMExecutionContext::iopInclOnce(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopInclOnce(PC& pc) { inclOp(this, pc, InclOpOnce); } -inline void OPTBLD_INLINE VMExecutionContext::iopReq(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopReq(PC& pc) { inclOp(this, pc, InclOpFatal); } -inline void OPTBLD_INLINE VMExecutionContext::iopReqOnce(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopReqOnce(PC& pc) { inclOp(this, pc, InclOpFatal | InclOpOnce); } -inline void OPTBLD_INLINE VMExecutionContext::iopReqDoc(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopReqDoc(PC& pc) { inclOp(this, pc, InclOpFatal | InclOpOnce | InclOpDocRoot); } -inline void OPTBLD_INLINE VMExecutionContext::iopEval(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopEval(PC& pc) { NEXT(); Cell* c1 = m_stack.topC(); String code(prepareKey(c1)); @@ -6284,21 +6282,21 @@ inline void OPTBLD_INLINE VMExecutionContext::iopEval(PC& pc) { evalUnit(unit, pc, EventHook::Eval); } -inline void OPTBLD_INLINE VMExecutionContext::iopDefFunc(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDefFunc(PC& pc) { NEXT(); DECODE_IVA(fid); Func* f = m_fp->m_func->unit()->lookupFuncId(fid); f->setCached(); } -inline void OPTBLD_INLINE VMExecutionContext::iopDefCls(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDefCls(PC& pc) { NEXT(); DECODE_IVA(cid); PreClass* c = m_fp->m_func->unit()->lookupPreClassId(cid); Unit::defClass(c); } -inline void OPTBLD_INLINE VMExecutionContext::iopDefTypedef(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopDefTypedef(PC& pc) { NEXT(); DECODE_IVA(tid); m_fp->m_func->unit()->defTypedef(tid); @@ -6310,14 +6308,14 @@ static inline void checkThis(ActRec* fp) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopThis(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopThis(PC& pc) { NEXT(); checkThis(m_fp); ObjectData* this_ = m_fp->getThis(); m_stack.pushObject(this_); } -inline void OPTBLD_INLINE VMExecutionContext::iopBareThis(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopBareThis(PC& pc) { NEXT(); DECODE(unsigned char, notice); if (m_fp->hasThis()) { @@ -6329,12 +6327,12 @@ inline void OPTBLD_INLINE VMExecutionContext::iopBareThis(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopCheckThis(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCheckThis(PC& pc) { NEXT(); checkThis(m_fp); } -inline void OPTBLD_INLINE VMExecutionContext::iopInitThisLoc(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopInitThisLoc(PC& pc) { NEXT(); DECODE_IVA(id); TypedValue* thisLoc = frame_local(m_fp, id); @@ -6369,7 +6367,7 @@ lookupStatic(StringData* name, } } -inline void OPTBLD_INLINE VMExecutionContext::iopStaticLoc(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopStaticLoc(PC& pc) { NEXT(); DECODE_IVA(localId); DECODE_LITSTR(var); @@ -6390,7 +6388,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopStaticLoc(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopStaticLocInit(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopStaticLocInit(PC& pc) { NEXT(); DECODE_IVA(localId); DECODE_LITSTR(var); @@ -6411,7 +6409,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopStaticLocInit(PC& pc) { m_stack.discard(); } -inline void OPTBLD_INLINE VMExecutionContext::iopCatch(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCatch(PC& pc) { NEXT(); assert(m_faults.size() > 0); Fault fault = m_faults.back(); @@ -6420,7 +6418,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCatch(PC& pc) { m_stack.pushObjectNoRc(fault.m_userException); } -inline void OPTBLD_INLINE VMExecutionContext::iopLateBoundCls(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopLateBoundCls(PC& pc) { NEXT(); Class* cls = frameStaticClass(m_fp); if (!cls) { @@ -6429,7 +6427,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopLateBoundCls(PC& pc) { m_stack.pushClass(cls); } -inline void OPTBLD_INLINE VMExecutionContext::iopVerifyParamType(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopVerifyParamType(PC& pc) { SYNC(); // We might need m_pc to be updated to throw. NEXT(); @@ -6447,7 +6445,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopVerifyParamType(PC& pc) { tc.verify(tv, func, param); } -inline void OPTBLD_INLINE VMExecutionContext::iopNativeImpl(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopNativeImpl(PC& pc) { NEXT(); uint soff = m_fp->m_soff; BuiltinFunction func = m_fp->m_func->builtinFuncPtr(); @@ -6481,12 +6479,12 @@ inline void OPTBLD_INLINE VMExecutionContext::iopNativeImpl(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopHighInvalid(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopHighInvalid(PC& pc) { fprintf(stderr, "invalid bytecode executed\n"); abort(); } -inline void OPTBLD_INLINE VMExecutionContext::iopSelf(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopSelf(PC& pc) { NEXT(); Class* clss = arGetContextClass(m_fp); if (!clss) { @@ -6495,7 +6493,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopSelf(PC& pc) { m_stack.pushClass(clss); } -inline void OPTBLD_INLINE VMExecutionContext::iopParent(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopParent(PC& pc) { NEXT(); Class* clss = arGetContextClass(m_fp); if (!clss) { @@ -6508,7 +6506,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopParent(PC& pc) { m_stack.pushClass(parent); } -inline void OPTBLD_INLINE VMExecutionContext::iopCreateCl(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCreateCl(PC& pc) { NEXT(); DECODE_IVA(numArgs); DECODE_LITSTR(clsName); @@ -6628,7 +6626,7 @@ void VMExecutionContext::fillContinuationVars(ActRec* origFp, } } -inline void OPTBLD_INLINE VMExecutionContext::iopCreateCont(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCreateCont(PC& pc) { NEXT(); DECODE_LITSTR(genName); @@ -6647,7 +6645,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopCreateCont(PC& pc) { ret->m_data.pobj = cont; } -inline void OPTBLD_INLINE VMExecutionContext::iopCreateAsync(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCreateAsync(PC& pc) { NEXT(); DECODE_LITSTR(genName); DECODE_IVA(label); @@ -6713,7 +6711,7 @@ void VMExecutionContext::iopContEnter(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopUnpackCont(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopUnpackCont(PC& pc) { NEXT(); c_Continuation* cont = frame_continuation(m_fp); @@ -6726,7 +6724,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopUnpackCont(PC& pc) { label->m_data.num = cont->m_label; } -inline void OPTBLD_INLINE VMExecutionContext::iopContSuspend(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContSuspend(PC& pc) { NEXT(); DECODE_IVA(label); c_Continuation* cont = frame_continuation(m_fp); @@ -6740,7 +6738,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopContSuspend(PC& pc) { m_fp = prevFp; } -inline void OPTBLD_INLINE VMExecutionContext::iopContSuspendK(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContSuspendK(PC& pc) { NEXT(); DECODE_IVA(label); c_Continuation* cont = frame_continuation(m_fp); @@ -6757,7 +6755,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopContSuspendK(PC& pc) { m_fp = prevFp; } -inline void OPTBLD_INLINE VMExecutionContext::iopContRetC(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContRetC(PC& pc) { NEXT(); c_Continuation* cont = frame_continuation(m_fp); cont->setDone(); @@ -6770,7 +6768,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopContRetC(PC& pc) { m_fp = prevFp; } -inline void OPTBLD_INLINE VMExecutionContext::iopContCheck(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContCheck(PC& pc) { NEXT(); DECODE_IVA(check_started); c_Continuation* cont = this_continuation(m_fp); @@ -6780,21 +6778,21 @@ inline void OPTBLD_INLINE VMExecutionContext::iopContCheck(PC& pc) { cont->preNext(); } -inline void OPTBLD_INLINE VMExecutionContext::iopContRaise(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContRaise(PC& pc) { NEXT(); c_Continuation* cont = this_continuation(m_fp); assert(cont->m_label); --cont->m_label; } -inline void OPTBLD_INLINE VMExecutionContext::iopContValid(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContValid(PC& pc) { NEXT(); TypedValue* tv = m_stack.allocTV(); tvWriteUninit(tv); tvAsVariant(tv) = !this_continuation(m_fp)->done(); } -inline void OPTBLD_INLINE VMExecutionContext::iopContKey(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContKey(PC& pc) { NEXT(); c_Continuation* cont = this_continuation(m_fp); cont->startedCheck(); @@ -6804,7 +6802,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopContKey(PC& pc) { tvAsVariant(tv) = cont->m_key; } -inline void OPTBLD_INLINE VMExecutionContext::iopContCurrent(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContCurrent(PC& pc) { NEXT(); c_Continuation* cont = this_continuation(m_fp); cont->startedCheck(); @@ -6814,12 +6812,12 @@ inline void OPTBLD_INLINE VMExecutionContext::iopContCurrent(PC& pc) { tvAsVariant(tv) = cont->m_value; } -inline void OPTBLD_INLINE VMExecutionContext::iopContStopped(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContStopped(PC& pc) { NEXT(); this_continuation(m_fp)->setStopped(); } -inline void OPTBLD_INLINE VMExecutionContext::iopContHandle(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopContHandle(PC& pc) { NEXT(); c_Continuation* cont = this_continuation(m_fp); cont->setDone(); @@ -6832,24 +6830,24 @@ inline void OPTBLD_INLINE VMExecutionContext::iopContHandle(PC& pc) { } template -inline void OPTBLD_INLINE VMExecutionContext::roundOpImpl(Op op) { +OPTBLD_INLINE void VMExecutionContext::roundOpImpl(Op op) { TypedValue* val = m_stack.topTV(); tvCastToDoubleInPlace(val); val->m_data.dbl = op(val->m_data.dbl); } -inline void OPTBLD_INLINE VMExecutionContext::iopFloor(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopFloor(PC& pc) { NEXT(); roundOpImpl(floor); } -inline void OPTBLD_INLINE VMExecutionContext::iopCeil(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopCeil(PC& pc) { NEXT(); roundOpImpl(ceil); } -inline void OPTBLD_INLINE VMExecutionContext::iopStrlen(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopStrlen(PC& pc) { NEXT(); TypedValue* subj = m_stack.topTV(); if (LIKELY(IS_STRING_TYPE(subj->m_type))) { @@ -6863,7 +6861,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopStrlen(PC& pc) { } } -inline void OPTBLD_INLINE VMExecutionContext::iopIncStat(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopIncStat(PC& pc) { NEXT(); DECODE_IVA(counter); DECODE_IVA(value); @@ -6885,15 +6883,15 @@ void VMExecutionContext::classExistsImpl(PC& pc, Attr typeAttr) { tvAsVariant(name) = Unit::classExists(name->m_data.pstr, autoload, typeAttr); } -inline void OPTBLD_INLINE VMExecutionContext::iopClassExists(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopClassExists(PC& pc) { classExistsImpl(pc, AttrNone); } -inline void OPTBLD_INLINE VMExecutionContext::iopInterfaceExists(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopInterfaceExists(PC& pc) { classExistsImpl(pc, AttrInterface); } -inline void OPTBLD_INLINE VMExecutionContext::iopTraitExists(PC& pc) { +OPTBLD_INLINE void VMExecutionContext::iopTraitExists(PC& pc) { classExistsImpl(pc, AttrTrait); } diff --git a/hphp/runtime/vm/bytecode.h b/hphp/runtime/vm/bytecode.h index 167618060..93c460f22 100644 --- a/hphp/runtime/vm/bytecode.h +++ b/hphp/runtime/vm/bytecode.h @@ -34,7 +34,7 @@ namespace HPHP { -inline ALWAYS_INLINE +ALWAYS_INLINE void SETOP_BODY_CELL(Cell* lhs, unsigned char op, Cell* rhs) { assert(cellIsPlausible(*lhs)); assert(cellIsPlausible(*rhs)); @@ -65,7 +65,7 @@ void SETOP_BODY_CELL(Cell* lhs, unsigned char op, Cell* rhs) { } } -inline ALWAYS_INLINE +ALWAYS_INLINE void SETOP_BODY(TypedValue* lhs, unsigned char op, Cell* rhs) { SETOP_BODY_CELL(tvToCell(lhs), op, rhs); } @@ -558,39 +558,45 @@ public: static TypedValue* frameStackBase(const ActRec* fp); static TypedValue* generatorStackBase(const ActRec* fp); - inline size_t ALWAYS_INLINE count() const { + ALWAYS_INLINE + size_t count() const { return ((uintptr_t)m_base - (uintptr_t)m_top) / sizeof(TypedValue); } // Same as discard(), but meant to replace popC() iff the interpreter knows // for certain that decrementing a refcount is unnecessary. - inline void ALWAYS_INLINE popX() { + ALWAYS_INLINE + void popX() { assert(m_top != m_base); assert(!IS_REFCOUNTED_TYPE(m_top->m_type)); m_top++; } - inline void ALWAYS_INLINE popC() { + ALWAYS_INLINE + void popC() { assert(m_top != m_base); assert(cellIsPlausible(*m_top)); tvRefcountedDecRefCell(m_top); m_top++; } - inline void ALWAYS_INLINE popA() { + ALWAYS_INLINE + void popA() { assert(m_top != m_base); assert(m_top->m_type == KindOfClass); m_top++; } - inline void ALWAYS_INLINE popV() { + ALWAYS_INLINE + void popV() { assert(m_top != m_base); assert(refIsPlausible(*m_top)); tvDecRefRef(m_top); m_top++; } - inline void ALWAYS_INLINE popTV() { + ALWAYS_INLINE + void popTV() { assert(m_top != m_base); assert(m_top->m_type == KindOfClass || tvIsPlausible(*m_top)); tvRefcountedDecRef(m_top); @@ -600,7 +606,8 @@ public: // popAR() should only be used to tear down a pre-live ActRec. Once // an ActRec is live, it should be torn down using frame_free_locals() // followed by discardAR() or ret(). - inline void ALWAYS_INLINE popAR() { + ALWAYS_INLINE + void popAR() { assert(m_top != m_base); ActRec* ar = (ActRec*)m_top; if (ar->hasThis()) decRefObj(ar->getThis()); @@ -614,30 +621,35 @@ public: assert((uintptr_t)m_top <= (uintptr_t)m_base); } - inline void ALWAYS_INLINE discardAR() { + ALWAYS_INLINE + void discardAR() { assert(m_top != m_base); m_top += kNumActRecCells; assert((uintptr_t)m_top <= (uintptr_t)m_base); } - inline void ALWAYS_INLINE ret() { + ALWAYS_INLINE + void ret() { // Leave part of the activation on the stack, since the return value now // resides there. m_top += kNumActRecCells - 1; assert((uintptr_t)m_top <= (uintptr_t)m_base); } - inline void ALWAYS_INLINE discard() { + ALWAYS_INLINE + void discard() { assert(m_top != m_base); m_top++; } - inline void ALWAYS_INLINE ndiscard(size_t n) { + ALWAYS_INLINE + void ndiscard(size_t n) { assert((uintptr_t)&m_top[n] <= (uintptr_t)m_base); m_top += n; } - inline void ALWAYS_INLINE dup() { + ALWAYS_INLINE + void dup() { assert(m_top != m_base); assert(m_top != m_elms); assert(m_top->m_type != KindOfRef); @@ -647,30 +659,35 @@ public: cellDup(*fr, *to); } - inline void ALWAYS_INLINE box() { + ALWAYS_INLINE + void box() { assert(m_top != m_base); assert(m_top->m_type != KindOfRef); tvBox(m_top); } - inline void ALWAYS_INLINE unbox() { + ALWAYS_INLINE + void unbox() { assert(m_top != m_base); tvUnbox(m_top); } - inline void ALWAYS_INLINE pushUninit() { + ALWAYS_INLINE + void pushUninit() { assert(m_top != m_elms); m_top--; tvWriteUninit(m_top); } - inline void ALWAYS_INLINE pushNull() { + ALWAYS_INLINE + void pushNull() { assert(m_top != m_elms); m_top--; tvWriteNull(m_top); } - inline void ALWAYS_INLINE pushNullUninit() { + ALWAYS_INLINE + void pushNullUninit() { assert(m_top != m_elms); m_top--; m_top->m_data.num = 0; @@ -678,7 +695,7 @@ public: } #define PUSH_METHOD(name, type, field, value) \ - inline void ALWAYS_INLINE push##name() { \ + ALWAYS_INLINE void push##name() { \ assert(m_top != m_elms); \ m_top--; \ m_top->m_data.field = value; \ @@ -688,7 +705,7 @@ public: PUSH_METHOD(False, KindOfBoolean, num, 0) #define PUSH_METHOD_ARG(name, type, field, argtype, arg) \ - inline void ALWAYS_INLINE push##name(argtype arg) { \ + ALWAYS_INLINE void push##name(argtype arg) { \ assert(m_top != m_elms); \ m_top--; \ m_top->m_data.field = arg; \ @@ -699,116 +716,136 @@ public: // This should only be called directly when the caller has // already adjusted the refcount appropriately - inline void ALWAYS_INLINE pushStringNoRc(StringData* s) { + ALWAYS_INLINE + void pushStringNoRc(StringData* s) { assert(m_top != m_elms); m_top--; m_top->m_data.pstr = s; m_top->m_type = KindOfString; } - inline void ALWAYS_INLINE pushStaticString(StringData* s) { + ALWAYS_INLINE + void pushStaticString(StringData* s) { assert(s->isStatic()); // No need to call s->incRefCount(). pushStringNoRc(s); } // This should only be called directly when the caller has // already adjusted the refcount appropriately - inline void ALWAYS_INLINE pushArrayNoRc(ArrayData* a) { + ALWAYS_INLINE + void pushArrayNoRc(ArrayData* a) { assert(m_top != m_elms); m_top--; m_top->m_data.parr = a; m_top->m_type = KindOfArray; } - inline void ALWAYS_INLINE pushArray(ArrayData* a) { + ALWAYS_INLINE + void pushArray(ArrayData* a) { assert(a); pushArrayNoRc(a); a->incRefCount(); } - inline void ALWAYS_INLINE pushStaticArray(ArrayData* a) { + ALWAYS_INLINE + void pushStaticArray(ArrayData* a) { assert(a->isStatic()); // No need to call a->incRefCount(). pushArrayNoRc(a); } // This should only be called directly when the caller has // already adjusted the refcount appropriately - inline void ALWAYS_INLINE pushObjectNoRc(ObjectData* o) { + ALWAYS_INLINE + void pushObjectNoRc(ObjectData* o) { assert(m_top != m_elms); m_top--; m_top->m_data.pobj = o; m_top->m_type = KindOfObject; } - inline void ALWAYS_INLINE pushObject(ObjectData* o) { + ALWAYS_INLINE + void pushObject(ObjectData* o) { pushObjectNoRc(o); o->incRefCount(); } - inline void ALWAYS_INLINE nalloc(size_t n) { + ALWAYS_INLINE + void nalloc(size_t n) { assert((uintptr_t)&m_top[-n] <= (uintptr_t)m_base); m_top -= n; } - inline Cell* ALWAYS_INLINE allocC() { + ALWAYS_INLINE + Cell* allocC() { assert(m_top != m_elms); m_top--; return (Cell*)m_top; } - inline Ref* ALWAYS_INLINE allocV() { + ALWAYS_INLINE + Ref* allocV() { assert(m_top != m_elms); m_top--; return (Ref*)m_top; } - inline TypedValue* ALWAYS_INLINE allocTV() { + ALWAYS_INLINE + TypedValue* allocTV() { assert(m_top != m_elms); m_top--; return m_top; } - inline ActRec* ALWAYS_INLINE allocA() { + ALWAYS_INLINE + ActRec* allocA() { assert((uintptr_t)&m_top[-kNumActRecCells] >= (uintptr_t)m_elms); assert(kNumActRecCells * sizeof(Cell) == sizeof(ActRec)); m_top -= kNumActRecCells; return (ActRec*)m_top; } - inline void ALWAYS_INLINE allocI() { + ALWAYS_INLINE + void allocI() { assert(kNumIterCells * sizeof(Cell) == sizeof(Iter)); assert((uintptr_t)&m_top[-kNumIterCells] >= (uintptr_t)m_elms); m_top -= kNumIterCells; } - inline Cell* ALWAYS_INLINE topC() { + ALWAYS_INLINE + Cell* topC() { assert(m_top != m_base); assert(m_top->m_type != KindOfRef); return (Cell*)m_top; } - inline Ref* ALWAYS_INLINE topV() { + ALWAYS_INLINE + Ref* topV() { assert(m_top != m_base); assert(m_top->m_type == KindOfRef); return (Ref*)m_top; } - inline TypedValue* ALWAYS_INLINE topTV() { + ALWAYS_INLINE + TypedValue* topTV() { assert(m_top != m_base); return m_top; } - inline Cell* ALWAYS_INLINE indC(size_t ind) { + ALWAYS_INLINE + Cell* indC(size_t ind) { assert(m_top != m_base); assert(m_top[ind].m_type != KindOfRef); return (Cell*)(&m_top[ind]); } - inline TypedValue* ALWAYS_INLINE indTV(size_t ind) { + ALWAYS_INLINE + TypedValue* indTV(size_t ind) { assert(m_top != m_base); return &m_top[ind]; } - inline void ALWAYS_INLINE pushClass(Class* clss) { + + ALWAYS_INLINE + void pushClass(Class* clss) { assert(m_top != m_elms); m_top--; m_top->m_data.pcls = clss; diff --git a/hphp/runtime/vm/func-inline.h b/hphp/runtime/vm/func-inline.h index 513ec1f03..727229707 100644 --- a/hphp/runtime/vm/func-inline.h +++ b/hphp/runtime/vm/func-inline.h @@ -19,12 +19,12 @@ namespace HPHP { -inline ALWAYS_INLINE Func** getCachedFuncAddr(unsigned offset) { +ALWAYS_INLINE Func** getCachedFuncAddr(unsigned offset) { assert(offset != 0u); return (Func**)Transl::TargetCache::handleToPtr(offset); } -inline ALWAYS_INLINE void setCachedFunc(Func* func, bool debugger) { +ALWAYS_INLINE void setCachedFunc(Func* func, bool debugger) { assert(!func->isMethod()); Func** funcAddr = getCachedFuncAddr(func->getCachedOffset()); if (UNLIKELY(*funcAddr != nullptr)) { diff --git a/hphp/runtime/vm/jit/code-gen-helpers.cpp b/hphp/runtime/vm/jit/code-gen-helpers.cpp index eb5868c1d..ba3e7ac68 100644 --- a/hphp/runtime/vm/jit/code-gen-helpers.cpp +++ b/hphp/runtime/vm/jit/code-gen-helpers.cpp @@ -21,7 +21,7 @@ namespace HPHP { namespace JIT { -inline ALWAYS_INLINE +ALWAYS_INLINE int64_t ak_exist_string_impl(ArrayData* arr, StringData* key) { int64_t n; if (key->isStrictlyInteger(n)) { @@ -61,7 +61,7 @@ int64_t ak_exist_int_obj(ObjectData* obj, int64_t key) { return res; } -inline ALWAYS_INLINE +ALWAYS_INLINE TypedValue& getDefaultIfNullCell(TypedValue* tv, TypedValue& def) { if (UNLIKELY(nullptr == tv)) { // refcount is already correct since def was never decrefed diff --git a/hphp/runtime/vm/member-operations.h b/hphp/runtime/vm/member-operations.h index 7bf9f4766..14978e005 100644 --- a/hphp/runtime/vm/member-operations.h +++ b/hphp/runtime/vm/member-operations.h @@ -161,7 +161,7 @@ inline void releaseKey(StringData* keySD) { } // Post: base is a Cell* -inline ALWAYS_INLINE void opPre(TypedValue*& base, DataType& type) { +ALWAYS_INLINE void opPre(TypedValue*& base, DataType& type) { // Get inner variant if necessary. type = base->m_type; if (type == KindOfRef) { diff --git a/hphp/runtime/vm/runtime.h b/hphp/runtime/vm/runtime.h index 2bc32bc11..c55ac28ad 100644 --- a/hphp/runtime/vm/runtime.h +++ b/hphp/runtime/vm/runtime.h @@ -94,7 +94,7 @@ frame_continuation(const ActRec* fp) { */ template -inline void ALWAYS_INLINE +void ALWAYS_INLINE frame_free_locals_helper_inl(ActRec* fp, int numLocals) { assert(numLocals == fp->m_func->numLocals()); assert(!fp->hasInvName()); @@ -128,7 +128,7 @@ frame_free_locals_helper_inl(ActRec* fp, int numLocals) { } template -inline void ALWAYS_INLINE +void ALWAYS_INLINE frame_free_locals_inl_no_hook(ActRec* fp, int numLocals) { if (fp->hasThis()) { ObjectData* this_ = fp->getThis(); @@ -140,26 +140,26 @@ frame_free_locals_inl_no_hook(ActRec* fp, int numLocals) { frame_free_locals_helper_inl(fp, numLocals); } -inline void ALWAYS_INLINE +void ALWAYS_INLINE frame_free_locals_inl(ActRec* fp, int numLocals) { frame_free_locals_inl_no_hook(fp, numLocals); EventHook::FunctionExit(fp); } -inline void ALWAYS_INLINE +void ALWAYS_INLINE frame_free_locals_unwind(ActRec* fp, int numLocals) { frame_free_locals_inl_no_hook(fp, numLocals); EventHook::FunctionExit(fp); } -inline void ALWAYS_INLINE +void ALWAYS_INLINE frame_free_locals_no_this_inl(ActRec* fp, int numLocals) { frame_free_locals_helper_inl(fp, numLocals); EventHook::FunctionExit(fp); } // Helper for iopFCallBuiltin. -inline void ALWAYS_INLINE +void ALWAYS_INLINE frame_free_args(TypedValue* args, int count) { for (int i = 0; i < count; i++) { TypedValue* loc = args - i; diff --git a/hphp/runtime/vm/unit.h b/hphp/runtime/vm/unit.h index fa1a1962e..1745c34ad 100644 --- a/hphp/runtime/vm/unit.h +++ b/hphp/runtime/vm/unit.h @@ -70,7 +70,8 @@ enum UnitMergeState { UnitMergeStateEmpty = 32 }; -inline bool ALWAYS_INLINE isMergeKindReq(UnitMergeKind k) { +ALWAYS_INLINE +bool isMergeKindReq(UnitMergeKind k) { return k == UnitMergeKindReqDoc; } diff --git a/hphp/util/asm-x64.h b/hphp/util/asm-x64.h index 8b71b7257..e8bd60591 100644 --- a/hphp/util/asm-x64.h +++ b/hphp/util/asm-x64.h @@ -1249,9 +1249,8 @@ public: // ------ // Restrictions: // r cannot be set to 'none' - void emitCR(X64Instr op, int jcond, - RegNumber regN, - int opSz = sz::qword) ALWAYS_INLINE { + ALWAYS_INLINE + void emitCR(X64Instr op, int jcond, RegNumber regN, int opSz = sz::qword) { assert(regN != reg::noreg); int r = int(regN); @@ -1288,16 +1287,18 @@ public: emitModrm(3, rval, r); } - void emitR(X64Instr op, RegNumber r, int opSz = sz::qword) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitR(X64Instr op, RegNumber r, int opSz = sz::qword) { emitCR(op, 0, r, opSz); } - void emitR32(X64Instr op, RegNumber r) ALWAYS_INLINE { + ALWAYS_INLINE + void emitR32(X64Instr op, RegNumber r) { emitCR(op, 0, r, sz::dword); } - void emitR16(X64Instr op, RegNumber r) ALWAYS_INLINE { + ALWAYS_INLINE + void emitR16(X64Instr op, RegNumber r) { emitCR(op, 0, r, sz::word); } @@ -1306,9 +1307,9 @@ public: // Restrictions: // r1 cannot be set to 'reg::noreg' // r2 cannot be set to 'reg::noreg' - void emitCRR(X64Instr op, int jcond, RegNumber rn1, - RegNumber rn2, int opSz = sz::qword) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitCRR(X64Instr op, int jcond, RegNumber rn1, RegNumber rn2, + int opSz = sz::qword) { assert(rn1 != reg::noreg && rn2 != reg::noreg); int r1 = int(rn1); int r2 = int(rn2); @@ -1372,28 +1373,27 @@ public: } } - void emitCRR32(X64Instr op, int jcond, RegNumber r1, - RegNumber r2) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitCRR32(X64Instr op, int jcond, RegNumber r1, RegNumber r2) { emitCRR(op, jcond, r1, r2, sz::dword); } - void emitRR(X64Instr op, RegNumber r1, RegNumber r2, - int opSz = sz::qword) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitRR(X64Instr op, RegNumber r1, RegNumber r2, int opSz = sz::qword) { emitCRR(op, 0, r1, r2, opSz); } - void emitRR32(X64Instr op, RegNumber r1, - RegNumber r2) ALWAYS_INLINE { + ALWAYS_INLINE + void emitRR32(X64Instr op, RegNumber r1, RegNumber r2) { emitCRR(op, 0, r1, r2, sz::dword); } - void emitRR16(X64Instr op, RegNumber r1, - RegNumber r2) ALWAYS_INLINE { + ALWAYS_INLINE + void emitRR16(X64Instr op, RegNumber r1, RegNumber r2) { emitCRR(op, 0, r1, r2, sz::word); } + ALWAYS_INLINE void emitRR8(X64Instr op, RegNumber r1, RegNumber r2) { emitCRR(op, 0, r1, r2, sz::byte); } @@ -1402,9 +1402,9 @@ public: // ----------- // Restrictions: // r cannot be set to 'reg::noreg' + ALWAYS_INLINE void emitIR(X64Instr op, RegNumber rname, ssize_t imm, - int opSz = sz::qword) - ALWAYS_INLINE { + int opSz = sz::qword) { assert(rname != reg::noreg); int r = int(rname); // Opsize prefix @@ -1464,16 +1464,17 @@ public: emitImmediate(op, imm, immSize); } - void emitIR32(X64Instr op, RegNumber r, ssize_t imm) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitIR32(X64Instr op, RegNumber r, ssize_t imm) { emitIR(op, r, imm, sz::dword); } - void emitIR16(X64Instr op, RegNumber r, ssize_t imm) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitIR16(X64Instr op, RegNumber r, ssize_t imm) { emitIR(op, r, safe_cast(imm), sz::word); } + ALWAYS_INLINE void emitIR8(X64Instr op, RegNumber r, ssize_t imm) { emitIR(op, r, safe_cast(imm), sz::byte); } @@ -1483,9 +1484,9 @@ public: // Restrictions: // r1 cannot be set to 'reg::noreg' // r2 cannot be set to 'reg::noreg' - void emitIRR(X64Instr op, RegNumber rn1, RegNumber rn2, - ssize_t imm, int opSz = sz::qword) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitIRR(X64Instr op, RegNumber rn1, RegNumber rn2, ssize_t imm, + int opSz = sz::qword) { assert(rn1 != reg::noreg && rn2 != reg::noreg); int r1 = int(rn1); int r2 = int(rn2); @@ -1526,8 +1527,8 @@ public: emitImmediate(op, imm, immSize); } - void emitCI(X64Instr op, int jcond, ssize_t imm, int opSz = sz::qword) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitCI(X64Instr op, int jcond, ssize_t imm, int opSz = sz::qword) { // Opsize prefix prefixBytes(op.flags, opSz); // REX @@ -1553,13 +1554,13 @@ public: emitImmediate(op, imm, immSize); } - void emitI(X64Instr op, ssize_t imm, int opSz = sz::qword) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitI(X64Instr op, ssize_t imm, int opSz = sz::qword) { emitCI(op, 0, imm, opSz); } - void emitJ8(X64Instr op, ssize_t imm) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitJ8(X64Instr op, ssize_t imm) { assert((op.flags & IF_JCC) == 0); ssize_t delta = imm - ((ssize_t)codeBlock.frontier() + 2); // Emit opcode and 8-bit immediate @@ -1567,8 +1568,8 @@ public: byte(safe_cast(delta)); } - void emitCJ8(X64Instr op, int jcond, ssize_t imm) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitCJ8(X64Instr op, int jcond, ssize_t imm) { // this is for jcc only assert(op.flags & IF_JCC); ssize_t delta = imm - ((ssize_t)codeBlock.frontier() + 2); @@ -1578,7 +1579,8 @@ public: byte(safe_cast(delta)); } - void emitJ32(X64Instr op, ssize_t imm) ALWAYS_INLINE { + ALWAYS_INLINE + void emitJ32(X64Instr op, ssize_t imm) { // call and jmp are supported, jcc is not supported assert((op.flags & IF_JCC) == 0); int32_t delta = @@ -1589,8 +1591,8 @@ public: bytes(5, instr); } - void emitCJ32(X64Instr op, int jcond, ssize_t imm) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitCJ32(X64Instr op, int jcond, ssize_t imm) { // jcc is supported, call and jmp are not supported assert(op.flags & IF_JCC); int32_t delta = @@ -1616,14 +1618,15 @@ public: // ----------------------------------------------------------------- // Restrictions: // ir cannot be set to 'sp' - void emitCMX(X64Instr op, int jcond, RegNumber brName, - RegNumber irName, int s, int disp, + ALWAYS_INLINE + void emitCMX(X64Instr op, int jcond, RegNumber brName, RegNumber irName, + int s, int disp, RegNumber rName, bool reverse = false, ssize_t imm = 0, bool hasImmediate = false, int opSz = sz::qword, - bool ripRelative = false) ALWAYS_INLINE { + bool ripRelative = false) { assert(irName != reg::rsp); int ir = int(irName); @@ -1758,115 +1761,123 @@ public: } } - void emitIM(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp, ssize_t imm, int opSz = sz::qword) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitIM(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + ssize_t imm, int opSz = sz::qword) { emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, imm, true, opSz); } - void emitIM8(X64Instr op, RegNumber br, RegNumber ir, int s, - int disp, ssize_t imm) ALWAYS_INLINE { + ALWAYS_INLINE + void emitIM8(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + ssize_t imm) { emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, imm, true, sz::byte); } - void emitIM16(X64Instr op, RegNumber br, RegNumber ir, int s, - int disp, ssize_t imm) ALWAYS_INLINE { + ALWAYS_INLINE + void emitIM16(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + ssize_t imm) { emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, imm, true, sz::word); } - void emitIM32(X64Instr op, RegNumber br, RegNumber ir, int s, - int disp, ssize_t imm) ALWAYS_INLINE { - emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, imm, true, - sz::dword); + ALWAYS_INLINE + void emitIM32(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + ssize_t imm) { + emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, imm, true, sz::dword); } - void emitRM(X64Instr op, RegNumber br, RegNumber ir, int s, - int disp, RegNumber r, int opSz = sz::qword) - ALWAYS_INLINE { + ALWAYS_INLINE + void emitRM(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r, int opSz = sz::qword) { emitCMX(op, 0, br, ir, s, disp, r, false, 0, false, opSz); } - void emitRM32(X64Instr op, RegNumber br, RegNumber ir, int s, - int disp, RegNumber r) ALWAYS_INLINE { + ALWAYS_INLINE + void emitRM32(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r) { emitCMX(op, 0, br, ir, s, disp, r, false, 0, false, sz::dword); } - void emitRM16(X64Instr op, RegNumber br, RegNumber ir, int s, - int disp, RegNumber r) ALWAYS_INLINE { + ALWAYS_INLINE + void emitRM16(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r) { emitCMX(op, 0, br, ir, s, disp, r, false, 0, false, sz::word); } - void emitRM8(X64Instr op, RegNumber br, RegNumber ir, int s, - int disp, RegNumber r) { + ALWAYS_INLINE + void emitRM8(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r) { emitCMX(op, 0, br, ir, s, disp, r, false, 0, false, sz::byte); } - void emitCMR(X64Instr op, int jcond, RegNumber br, - RegNumber ir, int s, int disp, RegNumber r, - int opSz = sz::qword) ALWAYS_INLINE { + ALWAYS_INLINE + void emitCMR(X64Instr op, int jcond, RegNumber br, RegNumber ir, + int s, int disp, RegNumber r, int opSz = sz::qword) { emitCMX(op, jcond, br, ir, s, disp, r, true, 0, false, opSz); } - void emitMR(X64Instr op, RegNumber br, RegNumber ir, int s, - int disp, RegNumber r, int opSz = sz::qword, - bool ripRelative = false) ALWAYS_INLINE { + ALWAYS_INLINE + void emitMR(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r, int opSz = sz::qword, bool ripRelative = false) { emitCMX(op, 0, br, ir, s, disp, r, true, 0, false, opSz, ripRelative); } - void emitMR32(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp, RegNumber r) ALWAYS_INLINE { + ALWAYS_INLINE + void emitMR32(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r) { emitCMX(op, 0, br, ir, s, disp, r, true, 0, false, sz::dword); } - void emitMR16(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp, RegNumber r) ALWAYS_INLINE { + ALWAYS_INLINE + void emitMR16(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r) { emitCMX(op, 0, br, ir, s, disp, r, true, 0, false, sz::word); } - void emitMR8(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp, RegNumber r) ALWAYS_INLINE { + ALWAYS_INLINE + void emitMR8(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r) { emitCMX(op, 0, br, ir, s, disp, r, true, 0, false, sz::byte); } - void emitIRM(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp, RegNumber r, ssize_t imm, - int opSz = sz::qword) ALWAYS_INLINE { + ALWAYS_INLINE + void emitIRM(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r, ssize_t imm, int opSz = sz::qword) { emitCMX(op, 0, br, ir, s, disp, r, false, imm, true, opSz); } - void emitIMR(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp, RegNumber r, ssize_t imm, - int opSz = sz::qword) ALWAYS_INLINE { + ALWAYS_INLINE + void emitIMR(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + RegNumber r, ssize_t imm, int opSz = sz::qword) { emitCMX(op, 0, br, ir, s, disp, r, true, imm, true, opSz); } - void emitM(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp, int opSz = sz::qword) ALWAYS_INLINE { + ALWAYS_INLINE + void emitM(X64Instr op, RegNumber br, RegNumber ir, int s, int disp, + int opSz = sz::qword) { emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, 0, false, opSz); } - void emitM32(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp) ALWAYS_INLINE { - emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, 0, false, - sz::dword); + ALWAYS_INLINE + void emitM32(X64Instr op, RegNumber br, RegNumber ir, int s, int disp) { + emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, 0, false, sz::dword); } - void emitM16(X64Instr op, RegNumber br, RegNumber ir, - int s, int disp) ALWAYS_INLINE { - emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, 0, false, - sz::word); + ALWAYS_INLINE + void emitM16(X64Instr op, RegNumber br, RegNumber ir, int s, int disp) { + emitCMX(op, 0, br, ir, s, disp, reg::noreg, false, 0, false, sz::word); } + ALWAYS_INLINE void emitCM(X64Instr op, int jcond, RegNumber br, - RegNumber ir, int s, int disp, int opSz = sz::qword) - ALWAYS_INLINE { + RegNumber ir, int s, int disp, int opSz = sz::qword) { emitCMX(op, jcond, br, ir, s, disp, reg::noreg, false, 0, false, opSz); } // emit (with no arguments) - void emit(X64Instr op) ALWAYS_INLINE { + ALWAYS_INLINE + void emit(X64Instr op) { if ((op.flags & IF_NO_REXW) == 0) { byte(0x48); } diff --git a/hphp/util/hash.h b/hphp/util/hash.h index bfab12593..78019ac88 100644 --- a/hphp/util/hash.h +++ b/hphp/util/hash.h @@ -69,16 +69,16 @@ const bool useHash128 = true; #define ROTL64(x,y) rotl64(x,y) #define BIG_CONSTANT(x) (x##LLU) -inline ALWAYS_INLINE uint64_t rotl64(uint64_t x, int8_t r) { +ALWAYS_INLINE uint64_t rotl64(uint64_t x, int8_t r) { return (x << r) | (x >> (64 - r)); } -inline ALWAYS_INLINE uint32_t rotl32(uint32_t x, int8_t r) { +ALWAYS_INLINE uint32_t rotl32(uint32_t x, int8_t r) { return (x << r) | (x >> (32 - r)); } template -inline ALWAYS_INLINE uint64_t getblock64(const uint64_t *p, int i) { +ALWAYS_INLINE uint64_t getblock64(const uint64_t *p, int i) { uint64_t block = p[i]; if (!caseSensitive) { block &= 0xdfdfdfdfdfdfdfdfLLU; // a-z => A-Z @@ -87,7 +87,7 @@ inline ALWAYS_INLINE uint64_t getblock64(const uint64_t *p, int i) { } template -inline ALWAYS_INLINE uint32_t getblock32(const uint32_t *p, int i) { +ALWAYS_INLINE uint32_t getblock32(const uint32_t *p, int i) { uint32_t block = p[i]; if (!caseSensitive) { block &= 0xdfdfdfdfU; // a-z => A-Z @@ -96,7 +96,7 @@ inline ALWAYS_INLINE uint32_t getblock32(const uint32_t *p, int i) { } template -inline ALWAYS_INLINE uint8_t getblock8(const uint8_t *p, int i) { +ALWAYS_INLINE uint8_t getblock8(const uint8_t *p, int i) { uint8_t block = p[i]; if (!caseSensitive) { block &= 0xdfU; // a-z => A-Z @@ -106,7 +106,7 @@ inline ALWAYS_INLINE uint8_t getblock8(const uint8_t *p, int i) { //----------------------------------------------------------------------------- // Finalization mix - force all bits of a hash block to avalanche -inline ALWAYS_INLINE uint64_t fmix64(uint64_t k) { +ALWAYS_INLINE uint64_t fmix64(uint64_t k) { k ^= k >> 33; k *= BIG_CONSTANT(0xff51afd7ed558ccd); k ^= k >> 33; @@ -115,7 +115,7 @@ inline ALWAYS_INLINE uint64_t fmix64(uint64_t k) { return k; } -inline ALWAYS_INLINE uint32_t fmix32(uint32_t h) { +ALWAYS_INLINE uint32_t fmix32(uint32_t h) { h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; @@ -125,8 +125,7 @@ inline ALWAYS_INLINE uint32_t fmix32(uint32_t h) { } template -inline ALWAYS_INLINE uint32_t hash32(const void *key, size_t len, - uint32_t seed) { +ALWAYS_INLINE uint32_t hash32(const void *key, size_t len, uint32_t seed) { const uint8_t *data = (const uint8_t *)key; const size_t nblocks = len / 4; uint32_t h1 = seed; @@ -168,8 +167,8 @@ inline ALWAYS_INLINE uint32_t hash32(const void *key, size_t len, // Optimized for 64-bit architectures. MurmurHash3 also implements a 128-bit // hash that is optimized for 32-bit architectures (omitted here). template -inline ALWAYS_INLINE void hash128(const void *key, size_t len, uint64_t seed, - uint64_t out[2]) { +ALWAYS_INLINE void hash128(const void *key, size_t len, uint64_t seed, + uint64_t out[2]) { const uint8_t *data = (const uint8_t *)key; const size_t nblocks = len / 16; uint64_t h1 = seed; diff --git a/hphp/util/util.h b/hphp/util/util.h index 1f1a84c84..f713f576a 100644 --- a/hphp/util/util.h +++ b/hphp/util/util.h @@ -67,7 +67,7 @@ namespace HPHP { namespace Util { #pragma GCC diagnostic error "-Wunused-variable" #endif -#define ALWAYS_INLINE __attribute__((always_inline)) +#define ALWAYS_INLINE inline __attribute__((always_inline)) #define NEVER_INLINE __attribute__((noinline)) #define INLINE_SINGLE_CALLER ALWAYS_INLINE #define UNUSED __attribute__((unused)) diff --git a/hphp/util/vdso.cpp b/hphp/util/vdso.cpp index 10bf685e2..4ec92d2db 100644 --- a/hphp/util/vdso.cpp +++ b/hphp/util/vdso.cpp @@ -51,13 +51,13 @@ int Vdso::ClockGetTime(int clk_id, timespec *ts) { return s_vdso.clockGetTime(clk_id, ts); } -inline ALWAYS_INLINE int64_t Vdso::clockGetTimeNS(int clk_id) { +ALWAYS_INLINE int64_t Vdso::clockGetTimeNS(int clk_id) { if (m_clock_gettime_ns) return m_clock_gettime_ns(clk_id); return -1; } -inline ALWAYS_INLINE int Vdso::clockGetTime(int clk_id, timespec *ts) { +ALWAYS_INLINE int Vdso::clockGetTime(int clk_id, timespec *ts) { if (m_clock_gettime) { memset(ts, 0, sizeof(*ts)); return m_clock_gettime(clk_id, ts); diff --git a/hphp/util/vdso.h b/hphp/util/vdso.h index cf438cb13..d88be09da 100644 --- a/hphp/util/vdso.h +++ b/hphp/util/vdso.h @@ -32,8 +32,8 @@ public: static int64_t ClockGetTimeNS(int clk_id); static int ClockGetTime(int clk_id, timespec *ts); - inline ALWAYS_INLINE int clockGetTime(int clk_id, timespec *ts); - inline ALWAYS_INLINE int64_t clockGetTimeNS(int clk_id); + ALWAYS_INLINE int clockGetTime(int clk_id, timespec *ts); + ALWAYS_INLINE int64_t clockGetTimeNS(int clk_id); private: void *m_handle; diff --git a/hphp/util/word-same.h b/hphp/util/word-same.h index d1bcb804e..277a72aad 100644 --- a/hphp/util/word-same.h +++ b/hphp/util/word-same.h @@ -32,7 +32,7 @@ namespace HPHP { * allocated memory). The final word compare is adjusted to handle * the slack in lenBytes so only the bytes we care about are compared. */ -inline ALWAYS_INLINE +ALWAYS_INLINE bool wordsame(const void* mem1, const void* mem2, size_t lenBytes) { auto p1 = reinterpret_cast(mem1); auto p2 = reinterpret_cast(mem2);