| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 <functional> | 5 #include <functional> |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/compiler/js-operator.h" | 8 #include "src/compiler/js-operator.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 } | 349 } |
| 350 | 350 |
| 351 | 351 |
| 352 // For numbers there's no difference between strict and non-strict equality. | 352 // For numbers there's no difference between strict and non-strict equality. |
| 353 TEST_F(TyperTest, TypeJSStrictEqual) { | 353 TEST_F(TyperTest, TypeJSStrictEqual) { |
| 354 TestBinaryCompareOp(javascript_.StrictEqual(CompareOperationHint::kAny), | 354 TestBinaryCompareOp(javascript_.StrictEqual(CompareOperationHint::kAny), |
| 355 std::equal_to<double>()); | 355 std::equal_to<double>()); |
| 356 } | 356 } |
| 357 | 357 |
| 358 | 358 |
| 359 TEST_F(TyperTest, TypeJSStrictNotEqual) { | |
| 360 TestBinaryCompareOp(javascript_.StrictNotEqual(CompareOperationHint::kAny), | |
| 361 std::not_equal_to<double>()); | |
| 362 } | |
| 363 | |
| 364 | |
| 365 //------------------------------------------------------------------------------ | 359 //------------------------------------------------------------------------------ |
| 366 // Monotonicity | 360 // Monotonicity |
| 367 | 361 |
| 368 #define TEST_BINARY_MONOTONICITY(name) \ | 362 #define TEST_BINARY_MONOTONICITY(name) \ |
| 369 TEST_F(TyperTest, Monotonicity_##name) { \ | 363 TEST_F(TyperTest, Monotonicity_##name) { \ |
| 370 TestBinaryMonotonicity(javascript_.name(CompareOperationHint::kAny)); \ | 364 TestBinaryMonotonicity(javascript_.name(CompareOperationHint::kAny)); \ |
| 371 } | 365 } |
| 372 TEST_BINARY_MONOTONICITY(Equal) | 366 TEST_BINARY_MONOTONICITY(Equal) |
| 373 TEST_BINARY_MONOTONICITY(NotEqual) | 367 TEST_BINARY_MONOTONICITY(NotEqual) |
| 374 TEST_BINARY_MONOTONICITY(StrictEqual) | 368 TEST_BINARY_MONOTONICITY(StrictEqual) |
| 375 TEST_BINARY_MONOTONICITY(StrictNotEqual) | |
| 376 TEST_BINARY_MONOTONICITY(LessThan) | 369 TEST_BINARY_MONOTONICITY(LessThan) |
| 377 TEST_BINARY_MONOTONICITY(GreaterThan) | 370 TEST_BINARY_MONOTONICITY(GreaterThan) |
| 378 TEST_BINARY_MONOTONICITY(LessThanOrEqual) | 371 TEST_BINARY_MONOTONICITY(LessThanOrEqual) |
| 379 TEST_BINARY_MONOTONICITY(GreaterThanOrEqual) | 372 TEST_BINARY_MONOTONICITY(GreaterThanOrEqual) |
| 380 #undef TEST_BINARY_MONOTONICITY | 373 #undef TEST_BINARY_MONOTONICITY |
| 381 | 374 |
| 382 #define TEST_BINARY_MONOTONICITY(name) \ | 375 #define TEST_BINARY_MONOTONICITY(name) \ |
| 383 TEST_F(TyperTest, Monotonicity_##name) { \ | 376 TEST_F(TyperTest, Monotonicity_##name) { \ |
| 384 TestBinaryMonotonicity(javascript_.name()); \ | 377 TestBinaryMonotonicity(javascript_.name()); \ |
| 385 } | 378 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 398 #define TEST_BINARY_MONOTONICITY(name) \ | 391 #define TEST_BINARY_MONOTONICITY(name) \ |
| 399 TEST_F(TyperTest, Monotonicity_##name) { \ | 392 TEST_F(TyperTest, Monotonicity_##name) { \ |
| 400 TestBinaryMonotonicity(javascript_.name(BinaryOperationHint::kAny)); \ | 393 TestBinaryMonotonicity(javascript_.name(BinaryOperationHint::kAny)); \ |
| 401 } | 394 } |
| 402 TEST_BINARY_MONOTONICITY(Add) | 395 TEST_BINARY_MONOTONICITY(Add) |
| 403 #undef TEST_BINARY_MONOTONICITY | 396 #undef TEST_BINARY_MONOTONICITY |
| 404 | 397 |
| 405 } // namespace compiler | 398 } // namespace compiler |
| 406 } // namespace internal | 399 } // namespace internal |
| 407 } // namespace v8 | 400 } // namespace v8 |
| OLD | NEW |