Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: src/compiler/js-native-context-specialization.cc

Issue 2216453002: [turbofan] Use CheckMaps for the COW check on elements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-native-context-specialization.cc
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc
index dca55370dd12ba16b5ebde4041da41b3e11b2fcb..c122634cbb5e82038f7ce6f81a1ae3dc9dc1feea 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -972,13 +972,9 @@ JSNativeContextSpecialization::BuildElementAccess(
// Don't try to store to a copy-on-write backing store.
if (access_mode == AccessMode::kStore &&
IsFastSmiOrObjectElementsKind(elements_kind)) {
- Node* elements_map = effect =
- graph()->NewNode(simplified()->LoadField(AccessBuilder::ForMap()),
- elements, effect, control);
- Node* check = graph()->NewNode(
- simplified()->ReferenceEqual(Type::Any()), elements_map,
- jsgraph()->HeapConstant(factory()->fixed_array_map()));
- effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control);
+ effect = graph()->NewNode(
+ simplified()->CheckMaps(1), elements,
+ jsgraph()->HeapConstant(factory()->fixed_array_map()), effect, control);
}
if (IsFixedTypedArrayElementsKind(elements_kind)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698