@@ -988,7 +988,7 @@ namespace Js
988
988
Var
989
989
FunctionBody::GetFormalsPropIdArrayOrNullObj ()
990
990
{
991
- Var formalsPropIdArray = this ->GetAuxPtrWithLock ( AuxPointerType::FormalsPropIdArray);
991
+ Var formalsPropIdArray = this ->GetAuxPtrWithLock < AuxPointerType::FormalsPropIdArray>( );
992
992
if (formalsPropIdArray == nullptr )
993
993
{
994
994
return GetScriptContext ()->GetLibrary ()->GetNull ();
@@ -1001,16 +1001,16 @@ namespace Js
1001
1001
{
1002
1002
if (checkForNull)
1003
1003
{
1004
- Assert (this ->GetAuxPtrWithLock ( AuxPointerType::FormalsPropIdArray));
1004
+ Assert (this ->GetAuxPtrWithLock < AuxPointerType::FormalsPropIdArray>( ));
1005
1005
}
1006
- return static_cast <PropertyIdArray*>( this ->GetAuxPtrWithLock ( AuxPointerType::FormalsPropIdArray) );
1006
+ return this ->GetAuxPtrWithLock < AuxPointerType::FormalsPropIdArray>( );
1007
1007
}
1008
1008
1009
1009
void
1010
1010
FunctionBody::SetFormalsPropIdArray (PropertyIdArray * propIdArray)
1011
1011
{
1012
- AssertMsg (propIdArray == nullptr || this ->GetAuxPtrWithLock ( AuxPointerType::FormalsPropIdArray) == nullptr , " Already set?" );
1013
- this ->SetAuxPtr ( AuxPointerType::FormalsPropIdArray, propIdArray);
1012
+ AssertMsg (propIdArray == nullptr || this ->GetAuxPtrWithLock < AuxPointerType::FormalsPropIdArray>( ) == nullptr , " Already set?" );
1013
+ this ->SetAuxPtr < AuxPointerType::FormalsPropIdArray>( propIdArray);
1014
1014
}
1015
1015
1016
1016
ByteBlock*
@@ -1907,7 +1907,7 @@ namespace Js
1907
1907
{
1908
1908
return string;
1909
1909
}
1910
- this ->SetAuxPtr ( AuxPointerType::CachedSourceString, nullptr );
1910
+ this ->SetAuxPtr < AuxPointerType::CachedSourceString>( nullptr );
1911
1911
}
1912
1912
return nullptr ;
1913
1913
}
@@ -1923,13 +1923,13 @@ namespace Js
1923
1923
1924
1924
RecyclerWeakReference<JavascriptString> * ParseableFunctionInfo::GetCachedSourceStringWeakRef ()
1925
1925
{
1926
- return static_cast <RecyclerWeakReference<JavascriptString> *>( this ->GetAuxPtr ( AuxPointerType::CachedSourceString) );
1926
+ return this ->GetAuxPtr < AuxPointerType::CachedSourceString>( );
1927
1927
}
1928
1928
1929
1929
void ParseableFunctionInfo::SetCachedSourceStringWeakRef (RecyclerWeakReference<JavascriptString> * weakRef)
1930
1930
{
1931
1931
Assert (this ->GetCachedSourceString () == nullptr );
1932
- this ->SetAuxPtr ( AuxPointerType::CachedSourceString, weakRef);
1932
+ this ->SetAuxPtr < AuxPointerType::CachedSourceString>( weakRef);
1933
1933
}
1934
1934
1935
1935
FunctionInfoArray ParseableFunctionInfo::GetNestedFuncArray ()
@@ -2053,12 +2053,12 @@ namespace Js
2053
2053
// Function object type list methods
2054
2054
FunctionProxy::FunctionTypeWeakRefList* FunctionProxy::GetFunctionObjectTypeList () const
2055
2055
{
2056
- return static_cast <FunctionTypeWeakRefList*>( this ->GetAuxPtr ( AuxPointerType::FunctionObjectTypeList) );
2056
+ return this ->GetAuxPtr < AuxPointerType::FunctionObjectTypeList>( );
2057
2057
}
2058
2058
2059
2059
void FunctionProxy::SetFunctionObjectTypeList (FunctionProxy::FunctionTypeWeakRefList* list)
2060
2060
{
2061
- this ->SetAuxPtr ( AuxPointerType::FunctionObjectTypeList, list);
2061
+ this ->SetAuxPtr < AuxPointerType::FunctionObjectTypeList>( list);
2062
2062
}
2063
2063
2064
2064
template <typename Fn>
@@ -4036,7 +4036,7 @@ namespace Js
4036
4036
// Assert(CanDoStackNestedFunc());
4037
4037
Assert (parentFunctionBody->DoStackNestedFunc ());
4038
4038
4039
- this ->SetAuxPtr ( AuxPointerType::StackNestedFuncParent, this ->GetScriptContext ()->GetRecycler ()->CreateWeakReferenceHandle (parentFunctionInfo));
4039
+ this ->SetAuxPtr < AuxPointerType::StackNestedFuncParent>( this ->GetScriptContext ()->GetRecycler ()->CreateWeakReferenceHandle (parentFunctionInfo));
4040
4040
}
4041
4041
4042
4042
FunctionInfo * FunctionBody::GetStackNestedFuncParentStrongRef ()
@@ -4047,12 +4047,12 @@ namespace Js
4047
4047
4048
4048
RecyclerWeakReference<FunctionInfo> * FunctionBody::GetStackNestedFuncParent ()
4049
4049
{
4050
- return static_cast <RecyclerWeakReference<FunctionInfo>*>( this ->GetAuxPtr ( AuxPointerType::StackNestedFuncParent) );
4050
+ return this ->GetAuxPtr < AuxPointerType::StackNestedFuncParent>( );
4051
4051
}
4052
4052
4053
4053
FunctionInfo * FunctionBody::GetAndClearStackNestedFuncParent ()
4054
4054
{
4055
- if (this ->GetAuxPtr ( AuxPointerType::StackNestedFuncParent))
4055
+ if (this ->GetAuxPtr < AuxPointerType::StackNestedFuncParent>( ))
4056
4056
{
4057
4057
FunctionInfo * parentFunctionInfo = GetStackNestedFuncParentStrongRef ();
4058
4058
ClearStackNestedFuncParent ();
@@ -4063,7 +4063,7 @@ namespace Js
4063
4063
4064
4064
void FunctionBody::ClearStackNestedFuncParent ()
4065
4065
{
4066
- this ->SetAuxPtr ( AuxPointerType::StackNestedFuncParent, nullptr );
4066
+ this ->SetAuxPtr < AuxPointerType::StackNestedFuncParent>( nullptr );
4067
4067
}
4068
4068
4069
4069
void FunctionBody::CreateCacheIdToPropertyIdMap (uint rootObjectLoadInlineCacheStart, uint rootObjectLoadMethodInlineCacheStart,
@@ -5157,7 +5157,7 @@ namespace Js
5157
5157
5158
5158
// Set other state back to before parse as well
5159
5159
this ->SetStackNestedFunc (false );
5160
- this ->SetAuxPtr ( AuxPointerType::StackNestedFuncParent, nullptr );
5160
+ this ->SetAuxPtr < AuxPointerType::StackNestedFuncParent>( nullptr );
5161
5161
this ->SetReparsed (true );
5162
5162
#if DBG
5163
5163
char16 debugStringBuffer[MAX_FUNCTION_BODY_DEBUG_STRING_SIZE];
@@ -6053,18 +6053,18 @@ namespace Js
6053
6053
{
6054
6054
return ;
6055
6055
}
6056
- this ->SetAuxPtr ( AuxPointerType::ForInCacheArray, AllocatorNewArrayZ (CacheAllocator, this ->GetScriptContext ()->GetEnumeratorAllocator (), EnumeratorCache, profiledForInLoopCount));
6056
+ this ->SetAuxPtr < AuxPointerType::ForInCacheArray>( AllocatorNewArrayZ (CacheAllocator, this ->GetScriptContext ()->GetEnumeratorAllocator (), EnumeratorCache, profiledForInLoopCount));
6057
6057
}
6058
6058
6059
6059
EnumeratorCache * FunctionBody::GetForInCache (uint index)
6060
6060
{
6061
6061
Assert (index < this ->GetProfiledForInLoopCount ());
6062
- return &((EnumeratorCache *) this ->GetAuxPtr ( AuxPointerType::ForInCacheArray) )[index];
6062
+ return &this ->GetAuxPtr < AuxPointerType::ForInCacheArray>( )[index];
6063
6063
}
6064
6064
6065
6065
EnumeratorCache * FunctionBody::GetForInCacheArray ()
6066
6066
{
6067
- return ((EnumeratorCache *) this ->GetAuxPtrWithLock ( AuxPointerType::ForInCacheArray) );
6067
+ return this ->GetAuxPtrWithLock < AuxPointerType::ForInCacheArray>( );
6068
6068
}
6069
6069
6070
6070
void FunctionBody::CleanUpForInCache (bool isShutdown)
@@ -6074,7 +6074,7 @@ namespace Js
6074
6074
{
6075
6075
return ;
6076
6076
}
6077
- EnumeratorCache * forInCacheArray = (EnumeratorCache *) this ->GetAuxPtr ( AuxPointerType::ForInCacheArray);
6077
+ EnumeratorCache * forInCacheArray = this ->GetAuxPtr < AuxPointerType::ForInCacheArray>( );
6078
6078
if (forInCacheArray)
6079
6079
{
6080
6080
if (isShutdown)
@@ -6084,7 +6084,7 @@ namespace Js
6084
6084
else
6085
6085
{
6086
6086
AllocatorDeleteArray (CacheAllocator, this ->GetScriptContext ()->GetEnumeratorAllocator (), profiledForInLoopCount, forInCacheArray);
6087
- this ->SetAuxPtr ( AuxPointerType::ForInCacheArray, nullptr );
6087
+ this ->SetAuxPtr < AuxPointerType::ForInCacheArray>( nullptr );
6088
6088
}
6089
6089
}
6090
6090
}
@@ -6360,15 +6360,15 @@ namespace Js
6360
6360
AsmJsFunctionInfo* FunctionBody::AllocateAsmJsFunctionInfo ()
6361
6361
{
6362
6362
Assert ( !this ->GetAsmJsFunctionInfo () );
6363
- this ->SetAuxPtr ( AuxPointerType::AsmJsFunctionInfo, RecyclerNew ( m_scriptContext->GetRecycler (), AsmJsFunctionInfo));
6363
+ this ->SetAuxPtr < AuxPointerType::AsmJsFunctionInfo>( RecyclerNew ( m_scriptContext->GetRecycler (), AsmJsFunctionInfo));
6364
6364
return this ->GetAsmJsFunctionInfo ();
6365
6365
}
6366
6366
6367
6367
AsmJsModuleInfo* FunctionBody::AllocateAsmJsModuleInfo ()
6368
6368
{
6369
6369
Assert ( !this ->GetAsmJsModuleInfo () );
6370
6370
Recycler* rec = m_scriptContext->GetRecycler ();
6371
- this ->SetAuxPtr ( AuxPointerType::AsmJsModuleInfo, RecyclerNew (rec, AsmJsModuleInfo, rec));
6371
+ this ->SetAuxPtr < AuxPointerType::AsmJsModuleInfo>( RecyclerNew (rec, AsmJsModuleInfo, rec));
6372
6372
return this ->GetAsmJsModuleInfo ();
6373
6373
}
6374
6374
#endif
@@ -6528,11 +6528,11 @@ namespace Js
6528
6528
return runtimeData;
6529
6529
}
6530
6530
6531
+ template <Js::FunctionProxy::AuxPointerType auxType>
6531
6532
FunctionCodeGenRuntimeData * FunctionBody::EnsureCodeGenRuntimeDataCommon (
6532
6533
Recycler *const recycler,
6533
6534
__in_range (0 , profiledCallSiteCount - 1 ) const ProfileId profiledCallSiteId,
6534
- FunctionBody *const inlinee,
6535
- AuxPointerType auxType)
6535
+ FunctionBody *const inlinee)
6536
6536
{
6537
6537
Assert (recycler);
6538
6538
Assert (profiledCallSiteId < profiledCallSiteCount);
@@ -6544,7 +6544,7 @@ namespace Js
6544
6544
this ->SetAuxPtr (auxType, codeGenRuntimeData);
6545
6545
}
6546
6546
6547
- Field (FunctionCodeGenRuntimeData *)* codeGenRuntimeData = static_cast < Field (FunctionCodeGenRuntimeData *)*>( this ->GetAuxPtr ( auxType) );
6547
+ Field (FunctionCodeGenRuntimeData *)* codeGenRuntimeData = this ->GetAuxPtr < auxType>( );
6548
6548
Field (FunctionCodeGenRuntimeData *) const inlineeData = codeGenRuntimeData[profiledCallSiteId];
6549
6549
if (inlineeData == nullptr )
6550
6550
{
@@ -6577,15 +6577,15 @@ namespace Js
6577
6577
__in_range (0 , profiledCallSiteCount - 1 ) const ProfileId profiledCallSiteId,
6578
6578
FunctionBody *const inlinee)
6579
6579
{
6580
- return EnsureCodeGenRuntimeDataCommon (recycler, profiledCallSiteId, inlinee, AuxPointerType::CodeGenRuntimeData );
6580
+ return EnsureCodeGenRuntimeDataCommon<AuxPointerType::CodeGenRuntimeData> (recycler, profiledCallSiteId, inlinee);
6581
6581
}
6582
6582
6583
6583
FunctionCodeGenRuntimeData * FunctionBody::EnsureCallbackInlineeCodeGenRuntimeData (
6584
6584
Recycler *const recycler,
6585
6585
__in_range (0 , profiledCallSiteCount - 1 ) const ProfileId profiledCallSiteId,
6586
6586
FunctionBody *const inlinee)
6587
6587
{
6588
- return EnsureCodeGenRuntimeDataCommon (recycler, profiledCallSiteId, inlinee, AuxPointerType::CodeGenCallbackRuntimeData );
6588
+ return EnsureCodeGenRuntimeDataCommon<AuxPointerType::CodeGenCallbackRuntimeData> (recycler, profiledCallSiteId, inlinee);
6589
6589
}
6590
6590
6591
6591
const FunctionCodeGenRuntimeData *FunctionBody::GetLdFldInlineeCodeGenRuntimeData (const InlineCacheIndex inlineCacheIndex) const
@@ -6740,12 +6740,12 @@ namespace Js
6740
6740
}
6741
6741
FunctionEntryPointInfo *FunctionBody::GetSimpleJitEntryPointInfo () const
6742
6742
{
6743
- return static_cast <FunctionEntryPointInfo *>( this ->GetAuxPtr ( AuxPointerType::SimpleJitEntryPointInfo) );
6743
+ return this ->GetAuxPtr < AuxPointerType::SimpleJitEntryPointInfo>( );
6744
6744
}
6745
6745
6746
6746
void FunctionBody::SetSimpleJitEntryPointInfo (FunctionEntryPointInfo *const entryPointInfo)
6747
6747
{
6748
- this ->SetAuxPtr ( AuxPointerType::SimpleJitEntryPointInfo, entryPointInfo);
6748
+ this ->SetAuxPtr < AuxPointerType::SimpleJitEntryPointInfo>( entryPointInfo);
6749
6749
}
6750
6750
6751
6751
0 commit comments