Commit dd0a37f2 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[ic] Ignore the prototype chain for typed array elements.

Elements on typed arrays are never looked up in the prototype chain, so
there's no point in depending on the prototype chain validity cells for
keyed stores to typed arrays. You just risk going megamorphic for
unrelated changes.

Bug: v8:6999
Change-Id: Id831de42a2c9eadfd5317ee9b5dbfaa207f236fe
Reviewed-on: https://chromium-review.googlesource.com/737789Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48898}
parent d74199d5
......@@ -1708,6 +1708,7 @@ Handle<Object> KeyedStoreIC::StoreElementHandler(
stub =
StoreFastElementStub(isolate(), is_jsarray, elements_kind, store_mode)
.GetCode();
if (receiver_map->has_fixed_typed_array_elements()) return stub;
} else {
TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_StoreElementStub);
DCHECK_EQ(DICTIONARY_ELEMENTS, elements_kind);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment