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

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

Issue 1487973002: [turbofan] Add binary operation hints for javascript operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
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-operator.h" 5 #include "src/compiler/js-operator.h"
6 #include "src/compiler/opcodes.h" 6 #include "src/compiler/opcodes.h"
7 #include "src/compiler/operator.h" 7 #include "src/compiler/operator.h"
8 #include "src/compiler/operator-properties.h" 8 #include "src/compiler/operator-properties.h"
9 #include "test/unittests/test-utils.h" 9 #include "test/unittests/test-utils.h"
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 { \ 180 { \
181 &JSOperatorBuilder::Name, IrOpcode::kJS##Name, properties, \ 181 &JSOperatorBuilder::Name, IrOpcode::kJS##Name, properties, \
182 value_input_count, frame_state_input_count, effect_input_count, \ 182 value_input_count, frame_state_input_count, effect_input_count, \
183 control_input_count, value_output_count, effect_output_count, \ 183 control_input_count, value_output_count, effect_output_count, \
184 control_output_count \ 184 control_output_count \
185 } 185 }
186 SHARED(LessThan, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2), 186 SHARED(LessThan, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
187 SHARED(GreaterThan, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2), 187 SHARED(GreaterThan, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
188 SHARED(LessThanOrEqual, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2), 188 SHARED(LessThanOrEqual, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
189 SHARED(GreaterThanOrEqual, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2), 189 SHARED(GreaterThanOrEqual, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
190 SHARED(BitwiseOr, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
191 SHARED(BitwiseXor, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
192 SHARED(BitwiseAnd, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
193 SHARED(ShiftLeft, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
194 SHARED(ShiftRight, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
195 SHARED(ShiftRightLogical, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
196 SHARED(Add, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
197 SHARED(Subtract, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
198 SHARED(Multiply, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
199 SHARED(Divide, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
200 SHARED(Modulus, Operator::kNoProperties, 2, 2, 1, 1, 1, 1, 2),
201 #undef SHARED 190 #undef SHARED
202 }; 191 };
203 192
204 193
205 std::ostream& operator<<(std::ostream& os, 194 std::ostream& operator<<(std::ostream& os,
206 const SharedOperatorWithLanguageMode& sop) { 195 const SharedOperatorWithLanguageMode& sop) {
207 return os << IrOpcode::Mnemonic(sop.opcode); 196 return os << IrOpcode::Mnemonic(sop.opcode);
208 } 197 }
209 198
210 } // namespace 199 } // namespace
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 INSTANTIATE_TEST_CASE_P( 263 INSTANTIATE_TEST_CASE_P(
275 JSOperatorTest, JSSharedOperatorWithLanguageModeTest, 264 JSOperatorTest, JSSharedOperatorWithLanguageModeTest,
276 ::testing::Combine(::testing::ValuesIn(kLanguageModes), 265 ::testing::Combine(::testing::ValuesIn(kLanguageModes),
277 ::testing::ValuesIn(kSharedOperatorsWithLanguageMode))); 266 ::testing::ValuesIn(kSharedOperatorsWithLanguageMode)));
278 267
279 #endif // GTEST_HAS_COMBINE 268 #endif // GTEST_HAS_COMBINE
280 269
281 } // namespace compiler 270 } // namespace compiler
282 } // namespace internal 271 } // namespace internal
283 } // namespace v8 272 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698