Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ChakraCore Servicing update for 2020.08B #6491

Merged
merged 3 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Build/NuGet/.pack-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.20
1.11.21
2 changes: 1 addition & 1 deletion lib/Common/ChakraCoreVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// ChakraCore version number definitions (used in ChakraCore binary metadata)
#define CHAKRA_CORE_MAJOR_VERSION 1
#define CHAKRA_CORE_MINOR_VERSION 11
#define CHAKRA_CORE_PATCH_VERSION 20
#define CHAKRA_CORE_PATCH_VERSION 21
#define CHAKRA_CORE_VERSION_RELEASE_QFE 0 // Redundant with PATCH_VERSION. Keep this value set to 0.

// -------------
Expand Down
2 changes: 1 addition & 1 deletion lib/Runtime/Base/FunctionBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6283,7 +6283,7 @@ namespace Js
Assert(polymorphicInlineCache && polymorphicInlineCache->CanAllocateBigger());
uint16 polymorphicInlineCacheSize = polymorphicInlineCache->GetSize();
uint16 newPolymorphicInlineCacheSize = PolymorphicInlineCache::GetNextSize(polymorphicInlineCacheSize);
Assert(newPolymorphicInlineCacheSize > polymorphicInlineCacheSize);
AssertOrFailFast(newPolymorphicInlineCacheSize > polymorphicInlineCacheSize);
PolymorphicInlineCache * newPolymorphicInlineCache = CreatePolymorphicInlineCache(index, newPolymorphicInlineCacheSize);
polymorphicInlineCache->CopyTo(propertyId, m_scriptContext, newPolymorphicInlineCache);
#ifdef ENABLE_DEBUG_CONFIG_OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion lib/Runtime/Language/CacheOperators.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Js
bool IsAccessor,
bool IsRead,
bool IncludeTypePropertyCache>
static void Cache(const bool isProto, DynamicObject *const objectWithProperty, const bool isRoot, Type *const type, Type *const typeWithoutProperty, const PropertyId propertyId, const PropertyIndex propertyIndex, const bool isInlineSlot, const bool isMissing, const int requiredAuxSlotCapacity, const PropertyValueInfo *const info, ScriptContext *const requestContext);
static void Cache(const bool isProto, DynamicObject *const objectWithProperty, const bool isRoot, Type *const type, Type *const typeWithoutProperty, const PropertyId propertyId, const PropertyIndex propertyIndex, const bool isInlineSlot, const bool isMissing, const int requiredAuxSlotCapacity, PropertyValueInfo *const info, ScriptContext *const requestContext);

template<
bool CheckLocal,
Expand Down
5 changes: 4 additions & 1 deletion lib/Runtime/Language/CacheOperators.inl
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ namespace Js
const bool isInlineSlot,
const bool isMissing,
const int requiredAuxSlotCapacity,
const PropertyValueInfo *const info,
PropertyValueInfo *const info,
ScriptContext *const requestContext)
{
CompileAssert(!IsAccessor || !IncludeTypePropertyCache);
Expand Down Expand Up @@ -375,6 +375,9 @@ namespace Js
: !PHASE_OFF1(Js::TypePropertyCachePhase)
);
bool createTypePropertyCache = false;

// Side-effects may have changed the cache, so make sure the info has the latest.
info->UpdatePolymorphicInlineCache(IsRead);
PolymorphicInlineCache *polymorphicInlineCache = info->GetPolymorphicInlineCache();
if(!polymorphicInlineCache && info->GetFunctionBody())
{
Expand Down
8 changes: 8 additions & 0 deletions lib/Runtime/Types/RecyclableObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ namespace Js
}
}

void PropertyValueInfo::UpdatePolymorphicInlineCache(bool isRead)
{
if (GetPropertyRecordUsageCache())
{
this->polymorphicInlineCache = isRead ? GetPropertyRecordUsageCache()->GetLdElemInlineCache() : GetPropertyRecordUsageCache()->GetStElemInlineCache();
}
}

#if DBG || defined(PROFILE_TYPES)
// Used only by the GlobalObject, because it's typeHandler can't be fully initialized
// with the globalobject which is currently being created.
Expand Down
1 change: 1 addition & 0 deletions lib/Runtime/Types/RecyclableObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ namespace Js {
bool allowResizing);
static void SetCacheInfo(_Out_ PropertyValueInfo* info, _In_ PolymorphicInlineCache *const polymorphicInlineCache, bool allowResizing);
static void ClearCacheInfo(PropertyValueInfo* info);
void UpdatePolymorphicInlineCache(bool isRead);

InlineCache * GetInlineCache() const
{
Expand Down