Skip to content

Commit 8a69c78

Browse files
sygV8 LUCI CQ
authored andcommitted
[ic] Use slow stub element handler for non-JSObjects
Fixed: 339736513 Change-Id: I134a046475b0b004c3de1bacc5b2f1a7fa503d96 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5527898 Reviewed-by: Igor Sheludko <[email protected]> Commit-Queue: Igor Sheludko <[email protected]> Auto-Submit: Shu-yu Guo <[email protected]> Cr-Commit-Position: refs/heads/main@{#93847}
1 parent 4eaaa2a commit 8a69c78

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/ic/ic.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,15 +2388,16 @@ Handle<Object> KeyedStoreIC::StoreElementHandler(
23882388
isolate()),
23892389
IsStoreInArrayLiteralIC());
23902390

2391-
if (IsJSProxyMap(*receiver_map)) {
2391+
if (!IsJSObjectMap(*receiver_map)) {
23922392
// DefineKeyedOwnIC, which is used to define computed fields in instances,
2393-
// should be handled by the slow stub.
2394-
if (IsDefineKeyedOwnIC()) {
2395-
TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_SlowStub);
2396-
return StoreHandler::StoreSlow(isolate(), store_mode);
2393+
// should handled by the slow stub below instead of the proxy stub.
2394+
if (IsJSProxyMap(*receiver_map) && !IsDefineKeyedOwnIC()) {
2395+
return StoreHandler::StoreProxy(isolate());
23972396
}
23982397

2399-
return StoreHandler::StoreProxy(isolate());
2398+
// Wasm objects or other kind of special objects go through the slow stub.
2399+
TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_SlowStub);
2400+
return StoreHandler::StoreSlow(isolate(), store_mode);
24002401
}
24012402

24022403
// TODO(ishell): move to StoreHandler::StoreElement().

0 commit comments

Comments
 (0)