Skip to content

Commit e12446b

Browse files
committed
[MERGE #5291 @pleath] Make the engine respect -off:typepropertycache
Merge pull request #5291 from pleath:typepropertycachephase The phase switch was only being used to enable tracing, not to disable the feature.
2 parents 6c2c8a7 + 65493e1 commit e12446b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/Common/ConfigFlagsList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ PHASE(All)
336336
PHASE(ObjectHeaderInliningForObjectLiterals)
337337
PHASE(ObjectHeaderInliningForEmptyObjects)
338338
PHASE(OptUnknownElementName)
339-
#if DBG_DUMP
340339
PHASE(TypePropertyCache)
340+
#if DBG_DUMP
341341
PHASE(InlineSlots)
342342
#endif
343343
PHASE(DynamicProfile)

lib/Runtime/Language/CacheOperators.inl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,13 @@ namespace Js
367367
JavascriptFunction::IsBuiltinProperty(objectWithProperty, propertyId));
368368
}
369369

370-
const bool includeTypePropertyCache = IncludeTypePropertyCache && !isRoot;
370+
const bool includeTypePropertyCache =
371+
IncludeTypePropertyCache &&
372+
!isRoot &&
373+
(info->GetFunctionBody()
374+
? !PHASE_OFF(Js::TypePropertyCachePhase, info->GetFunctionBody())
375+
: !PHASE_OFF1(Js::TypePropertyCachePhase)
376+
);
371377
bool createTypePropertyCache = false;
372378
PolymorphicInlineCache *polymorphicInlineCache = info->GetPolymorphicInlineCache();
373379
if(!polymorphicInlineCache && info->GetFunctionBody())

0 commit comments

Comments
 (0)