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

Side by Side Diff: test/unittests/compiler/simplified-operator-unittest.cc

Issue 800833003: [turbofan] Correctify JSToBoolean lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve simplified lowering. Created 5 years, 11 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 | « test/unittests/compiler/simplified-operator-reducer-unittest.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/opcodes.h" 5 #include "src/compiler/opcodes.h"
6 #include "src/compiler/operator.h" 6 #include "src/compiler/operator.h"
7 #include "src/compiler/operator-properties.h" 7 #include "src/compiler/operator-properties.h"
8 #include "src/compiler/simplified-operator.h" 8 #include "src/compiler/simplified-operator.h"
9 #include "src/types-inl.h" 9 #include "src/types-inl.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
(...skipping 20 matching lines...) Expand all
31 return os << IrOpcode::Mnemonic(pop.opcode); 31 return os << IrOpcode::Mnemonic(pop.opcode);
32 } 32 }
33 33
34 34
35 const PureOperator kPureOperators[] = { 35 const PureOperator kPureOperators[] = {
36 #define PURE(Name, properties, input_count) \ 36 #define PURE(Name, properties, input_count) \
37 { \ 37 { \
38 &SimplifiedOperatorBuilder::Name, IrOpcode::k##Name, \ 38 &SimplifiedOperatorBuilder::Name, IrOpcode::k##Name, \
39 Operator::kPure | properties, input_count \ 39 Operator::kPure | properties, input_count \
40 } 40 }
41 PURE(AnyToBoolean, Operator::kNoProperties, 1),
41 PURE(BooleanNot, Operator::kNoProperties, 1), 42 PURE(BooleanNot, Operator::kNoProperties, 1),
42 PURE(BooleanToNumber, Operator::kNoProperties, 1), 43 PURE(BooleanToNumber, Operator::kNoProperties, 1),
43 PURE(NumberEqual, Operator::kCommutative, 2), 44 PURE(NumberEqual, Operator::kCommutative, 2),
44 PURE(NumberLessThan, Operator::kNoProperties, 2), 45 PURE(NumberLessThan, Operator::kNoProperties, 2),
45 PURE(NumberLessThanOrEqual, Operator::kNoProperties, 2), 46 PURE(NumberLessThanOrEqual, Operator::kNoProperties, 2),
46 PURE(NumberAdd, Operator::kCommutative, 2), 47 PURE(NumberAdd, Operator::kCommutative, 2),
47 PURE(NumberSubtract, Operator::kNoProperties, 2), 48 PURE(NumberSubtract, Operator::kNoProperties, 2),
48 PURE(NumberMultiply, Operator::kCommutative, 2), 49 PURE(NumberMultiply, Operator::kCommutative, 2),
49 PURE(NumberDivide, Operator::kNoProperties, 2), 50 PURE(NumberDivide, Operator::kNoProperties, 2),
50 PURE(NumberModulus, Operator::kNoProperties, 2), 51 PURE(NumberModulus, Operator::kNoProperties, 2),
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 279 }
279 280
280 281
281 INSTANTIATE_TEST_CASE_P(SimplifiedOperatorTest, 282 INSTANTIATE_TEST_CASE_P(SimplifiedOperatorTest,
282 SimplifiedElementAccessOperatorTest, 283 SimplifiedElementAccessOperatorTest,
283 ::testing::ValuesIn(kElementAccesses)); 284 ::testing::ValuesIn(kElementAccesses));
284 285
285 } // namespace compiler 286 } // namespace compiler
286 } // namespace internal 287 } // namespace internal
287 } // namespace v8 288 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/simplified-operator-reducer-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698