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

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

Issue 1994503002: [turbofan] Turn common Guard operator into simplified TypeGuard. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « src/compiler/js-intrinsic-lowering.cc ('k') | src/compiler/load-elimination.h » ('j') | 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 bf81e33fdf0f889682d0b80fd9dc7737d2f7d58b..fbc064c231a7bd24bb1388e1a50a1b3107727f80 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -305,7 +305,7 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
this_control =
graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state,
this_effect, this_control);
- this_value = graph()->NewNode(common()->Guard(Type::Number()),
+ this_value = graph()->NewNode(simplified()->TypeGuard(Type::Number()),
this_value, this_control);
if (!field_index.is_inobject() || field_index.is_hidden_field() ||
@@ -348,8 +348,9 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
this_control =
graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state,
this_effect, this_control);
- this_value = graph()->NewNode(common()->Guard(type_cache_.kSmi),
- this_value, this_control);
+ this_value =
+ graph()->NewNode(simplified()->TypeGuard(type_cache_.kSmi),
+ this_value, this_control);
} else if (field_type->Is(Type::TaggedPointer())) {
Node* check =
graph()->NewNode(simplified()->ObjectIsSmi(), this_value);
@@ -690,8 +691,8 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
graph()->NewNode(simplified()->ObjectIsNumber(), this_index);
this_control = graph()->NewNode(common()->DeoptimizeUnless(), check,
frame_state, this_effect, this_control);
- this_index = graph()->NewNode(common()->Guard(Type::Number()), this_index,
- this_control);
+ this_index = graph()->NewNode(simplified()->TypeGuard(Type::Number()),
+ this_index, this_control);
}
// Convert the {index} to an unsigned32 value and check if the result is
@@ -813,8 +814,8 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
}
// Rename the result to represent the actual type (not polluted by the
// hole).
- this_value = graph()->NewNode(common()->Guard(element_type), this_value,
- this_control);
+ this_value = graph()->NewNode(simplified()->TypeGuard(element_type),
+ this_value, this_control);
} else if (elements_kind == FAST_HOLEY_DOUBLE_ELEMENTS) {
// Perform the hole check on the result.
Node* check =
@@ -847,14 +848,14 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
Node* check = graph()->NewNode(simplified()->ObjectIsSmi(), this_value);
this_control = graph()->NewNode(common()->DeoptimizeUnless(), check,
frame_state, this_effect, this_control);
- this_value = graph()->NewNode(common()->Guard(type_cache_.kSmi),
+ this_value = graph()->NewNode(simplified()->TypeGuard(type_cache_.kSmi),
this_value, this_control);
} else if (IsFastDoubleElementsKind(elements_kind)) {
Node* check =
graph()->NewNode(simplified()->ObjectIsNumber(), this_value);
this_control = graph()->NewNode(common()->DeoptimizeUnless(), check,
frame_state, this_effect, this_control);
- this_value = graph()->NewNode(common()->Guard(Type::Number()),
+ this_value = graph()->NewNode(simplified()->TypeGuard(Type::Number()),
this_value, this_control);
}
this_effect = graph()->NewNode(simplified()->StoreElement(element_access),
« no previous file with comments | « src/compiler/js-intrinsic-lowering.cc ('k') | src/compiler/load-elimination.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698