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

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

Issue 2109623002: [turbofan] Introduce proper CheckNumber operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add to RedundancyElimination Created 4 years, 6 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/effect-control-linearizer.cc ('k') | src/compiler/opcodes.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 46529074e2ab5ad3a44d0a9ffadc3435829d7384..89d16a7d0048135feb81b77304c3ea29bf570357 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -276,13 +276,9 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
} else {
DCHECK_EQ(AccessMode::kStore, access_mode);
if (field_type->Is(Type::UntaggedFloat64())) {
- Node* check =
- graph()->NewNode(simplified()->ObjectIsNumber(), this_value);
- this_control = this_effect =
- graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state,
+ this_value = this_effect =
+ graph()->NewNode(simplified()->CheckNumber(), this_value,
this_effect, this_control);
- this_value = graph()->NewNode(simplified()->TypeGuard(Type::Number()),
- this_value, this_control);
if (!field_index.is_inobject() || field_index.is_hidden_field() ||
!FLAG_unbox_double_fields) {
@@ -784,13 +780,8 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
graph()->NewNode(simplified()->CheckTaggedSigned(), this_value,
this_effect, this_control);
} else if (IsFastDoubleElementsKind(elements_kind)) {
- Node* check =
- graph()->NewNode(simplified()->ObjectIsNumber(), this_value);
- this_control = this_effect =
- graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state,
- this_effect, this_control);
- this_value = graph()->NewNode(simplified()->TypeGuard(Type::Number()),
- this_value, this_control);
+ this_value = this_effect = graph()->NewNode(
+ simplified()->CheckNumber(), this_value, this_effect, this_control);
// Make sure we do not store signalling NaNs into holey double arrays.
if (elements_kind == FAST_HOLEY_DOUBLE_ELEMENTS) {
this_value =
« no previous file with comments | « src/compiler/effect-control-linearizer.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698