diff --git a/lib/Common/Memory/RecyclerPointers.h b/lib/Common/Memory/RecyclerPointers.h index 3217e3565bc..af23cd8780b 100644 --- a/lib/Common/Memory/RecyclerPointers.h +++ b/lib/Common/Memory/RecyclerPointers.h @@ -46,7 +46,7 @@ class NoWriteBarrierPtr T** operator&() { return &value; } // Setters - NoWriteBarrierPtr& operator=(T const& value) + NoWriteBarrierPtr& operator=(T * value) { this->value = value; return *this; @@ -98,15 +98,15 @@ class WriteBarrierPtr T const** AddressOf() const { return &ptr; } T** AddressOf() { return &ptr; } - T const** operator&() const - { - static_assert(false, "Might need to set barrier for this operation, and use AddressOf instead."); - return &ptr; + T const** operator&() const + { + static_assert(false, "Might need to set barrier for this operation, and use AddressOf instead."); + return &ptr; } - T** operator&() + T** operator&() { - static_assert(false, "Might need to set barrier for this operation, and use AddressOf instead."); - return &ptr; + static_assert(false, "Might need to set barrier for this operation, and use AddressOf instead."); + return &ptr; } // Setters diff --git a/lib/Runtime/Base/FunctionBody.cpp b/lib/Runtime/Base/FunctionBody.cpp index 27762eac42c..bb2922780fc 100644 --- a/lib/Runtime/Base/FunctionBody.cpp +++ b/lib/Runtime/Base/FunctionBody.cpp @@ -4308,7 +4308,7 @@ namespace Js #if DYNAMIC_INTERPRETER_THUNK if (m_isAsmJsFunction && m_dynamicInterpreterThunk) { - m_scriptContext->ReleaseDynamicAsmJsInterpreterThunk((BYTE*)this->m_dynamicInterpreterThunk, true); + m_scriptContext->ReleaseDynamicAsmJsInterpreterThunk(this->m_dynamicInterpreterThunk, true); this->m_dynamicInterpreterThunk = nullptr; } #endif @@ -7329,11 +7329,11 @@ namespace Js { if (m_isAsmJsFunction) { - m_scriptContext->ReleaseDynamicAsmJsInterpreterThunk((BYTE*)this->m_dynamicInterpreterThunk, /*addtoFreeList*/!isScriptContextClosing); + m_scriptContext->ReleaseDynamicAsmJsInterpreterThunk(this->m_dynamicInterpreterThunk, /*addtoFreeList*/!isScriptContextClosing); } else { - m_scriptContext->ReleaseDynamicInterpreterThunk((BYTE*)this->m_dynamicInterpreterThunk, /*addtoFreeList*/!isScriptContextClosing); + m_scriptContext->ReleaseDynamicInterpreterThunk(this->m_dynamicInterpreterThunk, /*addtoFreeList*/!isScriptContextClosing); } } } diff --git a/lib/Runtime/Base/FunctionBody.h b/lib/Runtime/Base/FunctionBody.h index c5a62b8a7e1..a551003f40e 100644 --- a/lib/Runtime/Base/FunctionBody.h +++ b/lib/Runtime/Base/FunctionBody.h @@ -1771,7 +1771,7 @@ namespace Js Field(bool) m_utf8SourceHasBeenSet; // start of UTF8-encoded source Field(uint) m_sourceIndex; // index into the scriptContext's list of saved sources #if DYNAMIC_INTERPRETER_THUNK - void* m_dynamicInterpreterThunk; // Unique 'thunk' for every interpreted function - used for ETW symbol decoding. + PointerNoBarrier(void) m_dynamicInterpreterThunk; // Unique 'thunk' for every interpreted function - used for ETW symbol decoding. #endif Field(uint) m_cbStartOffset; // pUtf8Source is this many bytes from the start of the scriptContext's source buffer. @@ -2699,16 +2699,16 @@ namespace Js uint GetForInLoopDepth() const { return this->GetCountField(CounterFields::ForInLoopDepth); } uint SetForInLoopDepth(uint count) { return this->SetCountField(CounterFields::ForInLoopDepth, count); } - bool AllocProfiledForInLoopCount(ProfileId* profileId) + bool AllocProfiledForInLoopCount(ProfileId* profileId) { - ProfileId profiledForInLoopCount = this->GetProfiledForInLoopCount(); - if (profiledForInLoopCount != Constants::NoProfileId) - { - *profileId = profiledForInLoopCount; - this->IncreaseCountField(CounterFields::ProfiledForInLoopCount); - return true; - } - return false; + ProfileId profiledForInLoopCount = this->GetProfiledForInLoopCount(); + if (profiledForInLoopCount != Constants::NoProfileId) + { + *profileId = profiledForInLoopCount; + this->IncreaseCountField(CounterFields::ProfiledForInLoopCount); + return true; + } + return false; } ProfileId GetProfiledForInLoopCount() const { return (ProfileId)this->GetCountField(CounterFields::ProfiledForInLoopCount); } void SetProfiledForInLoopCount(ProfileId count) { this->SetCountField(CounterFields::ProfiledForInLoopCount, count); } @@ -3029,7 +3029,7 @@ namespace Js ForInCache * GetForInCacheArray(); void CleanUpForInCache(bool isShutdown); - void AllocateInlineCache(); + void AllocateInlineCache(); InlineCache * GetInlineCache(uint index); bool CanFunctionObjectHaveInlineCaches(); void** GetInlineCaches(); @@ -3040,8 +3040,8 @@ namespace Js IsInstInlineCache * GetIsInstInlineCache(uint index); PolymorphicInlineCache * GetPolymorphicInlineCache(uint index); PolymorphicInlineCache * CreateNewPolymorphicInlineCache(uint index, PropertyId propertyId, InlineCache * inlineCache); - PolymorphicInlineCache * CreateBiggerPolymorphicInlineCache(uint index, PropertyId propertyId); - private: + PolymorphicInlineCache * CreateBiggerPolymorphicInlineCache(uint index, PropertyId propertyId); + private: void ResetInlineCaches(); PolymorphicInlineCache * CreatePolymorphicInlineCache(uint index, uint16 size); diff --git a/lib/Runtime/Base/ScriptContext.cpp b/lib/Runtime/Base/ScriptContext.cpp index 1c8b87a5112..e0ead07fd3f 100644 --- a/lib/Runtime/Base/ScriptContext.cpp +++ b/lib/Runtime/Base/ScriptContext.cpp @@ -4853,15 +4853,15 @@ void ScriptContext::RegisterPrototypeChainEnsuredToHaveOnlyWritableDataPropertie return this->interpreterThunkEmitter->IsInHeap((void*)address); } - void ScriptContext::ReleaseDynamicInterpreterThunk(BYTE* address, bool addtoFreeList) + void ScriptContext::ReleaseDynamicInterpreterThunk(void* address, bool addtoFreeList) { - this->interpreterThunkEmitter->Release(address, addtoFreeList); + this->interpreterThunkEmitter->Release((BYTE*)address, addtoFreeList); } - void ScriptContext::ReleaseDynamicAsmJsInterpreterThunk(BYTE* address, bool addtoFreeList) + void ScriptContext::ReleaseDynamicAsmJsInterpreterThunk(void* address, bool addtoFreeList) { #ifdef ASMJS_PLAT - this->asmJsInterpreterThunkEmitter->Release(address, addtoFreeList); + this->asmJsInterpreterThunkEmitter->Release((BYTE*)address, addtoFreeList); #else Assert(UNREACHED); #endif diff --git a/lib/Runtime/Base/ScriptContext.h b/lib/Runtime/Base/ScriptContext.h index 099d0d41819..63b2ffe5699 100644 --- a/lib/Runtime/Base/ScriptContext.h +++ b/lib/Runtime/Base/ScriptContext.h @@ -910,7 +910,7 @@ namespace Js void SetDirectHostTypeId(TypeId typeId) {directHostTypeId = typeId; } TypeId GetDirectHostTypeId() const { return directHostTypeId; } - intptr_t GetRemoteScriptAddr() + intptr_t GetRemoteScriptAddr() { #if ENABLE_OOP_NATIVE_CODEGEN if (!m_remoteScriptContextAddr) @@ -918,7 +918,7 @@ namespace Js InitializeRemoteScriptContext(); } #endif - return m_remoteScriptContextAddr; + return m_remoteScriptContextAddr; } char16 const * GetUrl() const { return url; } @@ -1657,8 +1657,8 @@ namespace Js JavascriptMethod GetNextDynamicAsmJsInterpreterThunk(PVOID* ppDynamicInterpreterThunk); JavascriptMethod GetNextDynamicInterpreterThunk(PVOID* ppDynamicInterpreterThunk); BOOL IsDynamicInterpreterThunk(JavascriptMethod address); - void ReleaseDynamicInterpreterThunk(BYTE* address, bool addtoFreeList); - void ReleaseDynamicAsmJsInterpreterThunk(BYTE* address, bool addtoFreeList); + void ReleaseDynamicInterpreterThunk(void* address, bool addtoFreeList); + void ReleaseDynamicAsmJsInterpreterThunk(void* address, bool addtoFreeList); #endif static Var DebugProfileProbeThunk(RecyclableObject* function, CallInfo callInfo, ...); @@ -1770,7 +1770,7 @@ namespace Js virtual bool IsRecyclerVerifyEnabled() const override; virtual uint GetRecyclerVerifyPad() const override; - + virtual Js::Var* GetModuleExportSlotArrayAddress(uint moduleIndex, uint slotIndex) override; Js::SourceTextModuleRecord* GetModuleRecord(uint moduleId) const