Changeset 265000 in webkit for trunk/Source/JavaScriptCore/jit/Repatch.cpp
- Timestamp:
- Jul 28, 2020, 12:28:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r264388 r265000 163 163 case GetByKind::NormalByVal: 164 164 return operationGetByValOptimize; 165 case GetByKind::PrivateName: 166 return operationGetPrivateNameOptimize; 165 167 } 166 168 RELEASE_ASSERT_NOT_REACHED(); … … 180 182 case GetByKind::NormalByVal: 181 183 return operationGetByValGeneric; 184 case GetByKind::PrivateName: 185 return operationGetPrivateName; 182 186 } 183 187 RELEASE_ASSERT_NOT_REACHED(); … … 199 203 return GiveUpOnCache; 200 204 JSCell* baseCell = baseValue.asCell(); 205 const bool isPrivate = kind == GetByKind::PrivateName; 201 206 202 207 std::unique_ptr<AccessCase> newCase; … … 254 259 bool loadTargetFromProxy = false; 255 260 if (baseCell->type() == PureForwardingProxyType) { 261 if (isPrivate) 262 return GiveUpOnCache; 256 263 baseValue = jsCast<JSProxy*>(baseCell)->target(); 257 264 baseCell = baseValue.asCell(); … … 309 316 return GiveUpOnCache; 310 317 311 // If a kind is GetByKind::Direct , we do not need to investigate prototype chains further.318 // If a kind is GetByKind::Direct or GetByKind::PrivateName, we do not need to investigate prototype chains further. 312 319 // Cacheability just depends on the head structure. 313 if (kind != GetByKind::Direct ) {320 if (kind != GetByKind::Direct && !isPrivate) { 314 321 auto cacheStatus = prepareChainForCaching(globalObject, baseCell, slot); 315 322 if (!cacheStatus) … … 375 382 newCase = IntrinsicGetterAccessCase::create(vm, codeBlock, propertyName, slot.cachedOffset(), structure, conditionSet, getter, WTFMove(prototypeAccessChain)); 376 383 else { 377 if (slot.isCacheableValue() || slot.isUnset()) { 384 if (isPrivate) { 385 RELEASE_ASSERT(!slot.isUnset()); 386 constexpr bool isProxy = false; 387 if (!slot.isCacheable()) 388 return GiveUpOnCache; 389 newCase = ProxyableAccessCase::create(vm, codeBlock, AccessCase::Load, propertyName, offset, structure, 390 conditionSet, isProxy, slot.watchpointSet(), WTFMove(prototypeAccessChain)); 391 } else if (slot.isCacheableValue() || slot.isUnset()) { 378 392 newCase = ProxyableAccessCase::create(vm, codeBlock, slot.isUnset() ? AccessCase::Miss : AccessCase::Load, 379 393 propertyName, offset, structure, conditionSet, loadTargetFromProxy, slot.watchpointSet(), WTFMove(prototypeAccessChain));
Note:
See TracChangeset
for help on using the changeset viewer.