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

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

Issue 2320473003: [turbofan] Typer changes to avoid Type representation dimension (Closed)
Patch Set: A few more changes. Created 4 years, 3 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
« src/compiler/js-typed-lowering.cc ('K') | « src/compiler/typer.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/compiler/js-typed-lowering.h" 5 #include "src/compiler/js-typed-lowering.h"
6 #include "src/code-factory.h" 6 #include "src/code-factory.h"
7 #include "src/compilation-dependencies.h" 7 #include "src/compilation-dependencies.h"
8 #include "src/compiler/access-builder.h" 8 #include "src/compiler/access-builder.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/js-operator.h" 10 #include "src/compiler/js-operator.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 TEST_F(JSTypedLoweringTest, JSToObjectWithAny) { 163 TEST_F(JSTypedLoweringTest, JSToObjectWithAny) {
164 Node* const input = Parameter(Type::Any(), 0); 164 Node* const input = Parameter(Type::Any(), 0);
165 Node* const context = Parameter(Type::Any(), 1); 165 Node* const context = Parameter(Type::Any(), 1);
166 Node* const frame_state = EmptyFrameState(); 166 Node* const frame_state = EmptyFrameState();
167 Node* const effect = graph()->start(); 167 Node* const effect = graph()->start();
168 Node* const control = graph()->start(); 168 Node* const control = graph()->start();
169 Reduction r = Reduce(graph()->NewNode(javascript()->ToObject(), input, 169 Reduction r = Reduce(graph()->NewNode(javascript()->ToObject(), input,
170 context, frame_state, effect, control)); 170 context, frame_state, effect, control));
171 ASSERT_TRUE(r.Changed()); 171 ASSERT_TRUE(r.Changed());
172 EXPECT_THAT(r.replacement(), IsPhi(MachineRepresentation::kTagged, _, _, _)); 172 EXPECT_THAT(r.replacement(),
173 IsPhi(MachineRepresentation::kTaggedPointer, _, _, _));
173 } 174 }
174 175
175 176
176 TEST_F(JSTypedLoweringTest, JSToObjectWithReceiver) { 177 TEST_F(JSTypedLoweringTest, JSToObjectWithReceiver) {
177 Node* const input = Parameter(Type::Receiver(), 0); 178 Node* const input = Parameter(Type::Receiver(), 0);
178 Node* const context = Parameter(Type::Any(), 1); 179 Node* const context = Parameter(Type::Any(), 1);
179 Node* const frame_state = EmptyFrameState(); 180 Node* const frame_state = EmptyFrameState();
180 Node* const effect = graph()->start(); 181 Node* const effect = graph()->start();
181 Node* const control = graph()->start(); 182 Node* const control = graph()->start();
182 Reduction r = Reduce(graph()->NewNode(javascript()->ToObject(), input, 183 Reduction r = Reduce(graph()->NewNode(javascript()->ToObject(), input,
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 EmptyFrameState(), effect, control)); 1022 EmptyFrameState(), effect, control));
1022 ASSERT_TRUE(r.Changed()); 1023 ASSERT_TRUE(r.Changed());
1023 EXPECT_THAT(r.replacement(), IsSpeculativeNumberBitwiseXor( 1024 EXPECT_THAT(r.replacement(), IsSpeculativeNumberBitwiseXor(
1024 NumberOperationHint::kNumberOrOddball, lhs, 1025 NumberOperationHint::kNumberOrOddball, lhs,
1025 rhs, effect, control)); 1026 rhs, effect, control));
1026 } 1027 }
1027 1028
1028 } // namespace compiler 1029 } // namespace compiler
1029 } // namespace internal 1030 } // namespace internal
1030 } // namespace v8 1031 } // namespace v8
OLDNEW
« src/compiler/js-typed-lowering.cc ('K') | « src/compiler/typer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698