@@ -1739,7 +1739,7 @@ namespace Js
17391739 // Also we might want to throw here instead of checking it again in the caller
17401740 if (value && !requestContext->IsUndeclBlockVar (*value) && !WithScopeObject::Is (object))
17411741 {
1742- CacheOperators::CachePropertyRead (instance , object, isRoot, propertyId, false , info, requestContext);
1742+ CacheOperators::CachePropertyRead (propertyObject , object, isRoot, propertyId, false , info, requestContext);
17431743 }
17441744#ifdef TELEMETRY_JSO
17451745 if (TELEMETRY_PROPERTY_OPCODE_FILTER (propertyId))
@@ -1779,7 +1779,7 @@ namespace Js
17791779 }
17801780
17811781 PropertyValueInfo::Set (info, requestContext->GetLibrary ()->GetMissingPropertyHolder (), 0 );
1782- CacheOperators::CachePropertyRead (instance , requestContext->GetLibrary ()->GetMissingPropertyHolder (), isRoot, propertyId, true , info, requestContext);
1782+ CacheOperators::CachePropertyRead (propertyObject , requestContext->GetLibrary ()->GetMissingPropertyHolder (), isRoot, propertyId, true , info, requestContext);
17831783 }
17841784#if defined(TELEMETRY_JSO) || defined(TELEMETRY_AddToCache) // enabled for `TELEMETRY_AddToCache`, because this is the property-not-found codepath where the normal TELEMETRY_AddToCache code wouldn't be executed.
17851785 if (TELEMETRY_PROPERTY_OPCODE_FILTER (propertyId))
@@ -7282,7 +7282,7 @@ namespace Js
72827282 PropertyValueInfo::SetCacheInfo (&info, functionBody, inlineCache, inlineCacheIndex, !IsFromFullJit);
72837283 Var value;
72847284 if (CacheOperators::TryGetProperty<true , true , true , true , true , true , !TInlineCache::IsPolymorphic, TInlineCache::IsPolymorphic, false >(
7285- thisInstance , false , object, propertyId, &value, scriptContext, nullptr , &info))
7285+ instance , false , object, propertyId, &value, scriptContext, nullptr , &info))
72867286 {
72877287 return value;
72887288 }
@@ -7938,55 +7938,7 @@ namespace Js
79387938 template <bool IsFromFullJit, class TInlineCache >
79397939 inline void JavascriptOperators::PatchPutValueNoLocalFastPath (FunctionBody *const functionBody, TInlineCache *const inlineCache, const InlineCacheIndex inlineCacheIndex, Var instance, PropertyId propertyId, Var newValue, PropertyOperationFlags flags)
79407940 {
7941- ScriptContext *const scriptContext = functionBody->GetScriptContext ();
7942-
7943- if (TaggedNumber::Is (instance))
7944- {
7945- JavascriptOperators::SetPropertyOnTaggedNumber (instance,
7946- nullptr ,
7947- propertyId,
7948- newValue,
7949- scriptContext,
7950- flags);
7951- return ;
7952- }
7953- #if ENABLE_COPYONACCESS_ARRAY
7954- JavascriptLibrary::CheckAndConvertCopyOnAccessNativeIntArray<Var>(instance);
7955- #endif
7956- RecyclableObject *object = RecyclableObject::FromVar (instance);
7957-
7958- PropertyValueInfo info;
7959- PropertyValueInfo::SetCacheInfo (&info, functionBody, inlineCache, inlineCacheIndex, !IsFromFullJit);
7960- if (CacheOperators::TrySetProperty<!TInlineCache::IsPolymorphic, true , true , true , true , !TInlineCache::IsPolymorphic, TInlineCache::IsPolymorphic, false >(
7961- object, false , propertyId, newValue, scriptContext, flags, nullptr , &info))
7962- {
7963- return ;
7964- }
7965-
7966- #if DBG_DUMP
7967- if (PHASE_VERBOSE_TRACE1 (Js::InlineCachePhase))
7968- {
7969- CacheOperators::TraceCache (inlineCache, _u (" PatchPutValueNoLocalFastPath" ), propertyId, scriptContext, object);
7970- }
7971- #endif
7972-
7973- ImplicitCallFlags prevImplicitCallFlags = ImplicitCall_None;
7974- ImplicitCallFlags currImplicitCallFlags = ImplicitCall_None;
7975- bool hasThisOnlyStatements = functionBody->GetHasOnlyThisStmts ();
7976- if (hasThisOnlyStatements)
7977- {
7978- prevImplicitCallFlags = CacheAndClearImplicitBit (scriptContext);
7979- }
7980- if (!JavascriptOperators::OP_SetProperty (instance, propertyId, newValue, scriptContext, &info, flags))
7981- {
7982- // Add implicit call flags, to bail out if field copy prop may propagate the wrong value.
7983- scriptContext->GetThreadContext ()->AddImplicitCallFlags (ImplicitCall_NoOpSet);
7984- }
7985- if (hasThisOnlyStatements)
7986- {
7987- currImplicitCallFlags = CheckAndUpdateFunctionBodyWithImplicitFlag (functionBody);
7988- RestoreImplicitFlag (scriptContext, prevImplicitCallFlags, currImplicitCallFlags);
7989- }
7941+ PatchPutValueWithThisPtrNoLocalFastPath<IsFromFullJit, TInlineCache>(functionBody, inlineCache, inlineCacheIndex, instance, propertyId, newValue, instance, flags);
79907942 }
79917943 template void JavascriptOperators::PatchPutValueNoLocalFastPath<false , InlineCache>(FunctionBody *const functionBody, InlineCache *const inlineCache, const InlineCacheIndex inlineCacheIndex, Var instance, PropertyId propertyId, Var newValue, PropertyOperationFlags flags);
79927944 template void JavascriptOperators::PatchPutValueNoLocalFastPath<true , InlineCache>(FunctionBody *const functionBody, InlineCache *const inlineCache, const InlineCacheIndex inlineCacheIndex, Var instance, PropertyId propertyId, Var newValue, PropertyOperationFlags flags);
0 commit comments