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

Side by Side Diff: test/unittests/compiler/js-typed-lowering-unittest.cc

Issue 2230923002: [turbofan] Fix more places where IfSuccess lacks on a non-NoThrow node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@p7
Patch Set: Fix unit test. 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 unified diff | Download patch
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/access-builder.h" 6 #include "src/compiler/access-builder.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 882
883 Matcher<Node*> offset_matcher = 883 Matcher<Node*> offset_matcher =
884 element_size == 1 884 element_size == 1
885 ? key 885 ? key
886 : IsNumberShiftLeft( 886 : IsNumberShiftLeft(
887 key, IsNumberConstant(WhichPowerOf2(element_size))); 887 key, IsNumberConstant(WhichPowerOf2(element_size)));
888 888
889 Matcher<Node*> value_matcher = 889 Matcher<Node*> value_matcher =
890 IsToNumber(value, context, checkpoint, control); 890 IsToNumber(value, context, checkpoint, control);
891 Matcher<Node*> effect_matcher = value_matcher; 891 Matcher<Node*> effect_matcher = value_matcher;
892 Matcher<Node*> control_matcher = IsIfSuccess(value_matcher);
892 893
893 ASSERT_TRUE(r.Changed()); 894 ASSERT_TRUE(r.Changed());
894 EXPECT_THAT( 895 EXPECT_THAT(
895 r.replacement(), 896 r.replacement(),
896 IsStoreBuffer(BufferAccess(type), 897 IsStoreBuffer(BufferAccess(type),
897 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), 898 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])),
898 offset_matcher, 899 offset_matcher,
899 IsNumberConstant(array->byte_length()->Number()), 900 IsNumberConstant(array->byte_length()->Number()),
900 value_matcher, effect_matcher, control)); 901 value_matcher, effect_matcher, control_matcher));
901 } 902 }
902 } 903 }
903 } 904 }
904 905
905 906
906 TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArrayWithSafeKey) { 907 TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArrayWithSafeKey) {
907 const size_t kLength = 17; 908 const size_t kLength = 17;
908 double backing_store[kLength]; 909 double backing_store[kLength];
909 Handle<JSArrayBuffer> buffer = 910 Handle<JSArrayBuffer> buffer =
910 NewArrayBuffer(backing_store, sizeof(backing_store)); 911 NewArrayBuffer(backing_store, sizeof(backing_store));
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 EmptyFrameState(), effect, control)); 1223 EmptyFrameState(), effect, control));
1223 ASSERT_TRUE(r.Changed()); 1224 ASSERT_TRUE(r.Changed());
1224 EXPECT_THAT(r.replacement(), IsSpeculativeNumberBitwiseXor( 1225 EXPECT_THAT(r.replacement(), IsSpeculativeNumberBitwiseXor(
1225 NumberOperationHint::kNumberOrOddball, lhs, 1226 NumberOperationHint::kNumberOrOddball, lhs,
1226 rhs, effect, control)); 1227 rhs, effect, control));
1227 } 1228 }
1228 1229
1229 } // namespace compiler 1230 } // namespace compiler
1230 } // namespace internal 1231 } // namespace internal
1231 } // namespace v8 1232 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698