| 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 TEST_BINARY_MONOTONICITY(ShiftLeft) | 366 TEST_BINARY_MONOTONICITY(ShiftLeft) |
| 367 TEST_BINARY_MONOTONICITY(ShiftRight) | 367 TEST_BINARY_MONOTONICITY(ShiftRight) |
| 368 TEST_BINARY_MONOTONICITY(ShiftRightLogical) | 368 TEST_BINARY_MONOTONICITY(ShiftRightLogical) |
| 369 TEST_BINARY_MONOTONICITY(Add) | 369 TEST_BINARY_MONOTONICITY(Add) |
| 370 TEST_BINARY_MONOTONICITY(Subtract) | 370 TEST_BINARY_MONOTONICITY(Subtract) |
| 371 TEST_BINARY_MONOTONICITY(Multiply) | 371 TEST_BINARY_MONOTONICITY(Multiply) |
| 372 TEST_BINARY_MONOTONICITY(Divide) | 372 TEST_BINARY_MONOTONICITY(Divide) |
| 373 TEST_BINARY_MONOTONICITY(Modulus) | 373 TEST_BINARY_MONOTONICITY(Modulus) |
| 374 #undef TEST_BINARY_MONOTONICITY | 374 #undef TEST_BINARY_MONOTONICITY |
| 375 | 375 |
| 376 | |
| 377 //------------------------------------------------------------------------------ | |
| 378 // Regression tests | |
| 379 | |
| 380 | |
| 381 TEST_F(TyperTest, TypeRegressInt32Constant) { | |
| 382 int values[] = {-5, 10}; | |
| 383 for (auto i : values) { | |
| 384 Node* c = graph()->NewNode(common()->Int32Constant(i)); | |
| 385 Type* type = NodeProperties::GetType(c); | |
| 386 EXPECT_TRUE(type->Is(NewRange(i, i))); | |
| 387 } | |
| 388 } | |
| 389 | |
| 390 } // namespace compiler | 376 } // namespace compiler |
| 391 } // namespace internal | 377 } // namespace internal |
| 392 } // namespace v8 | 378 } // namespace v8 |
| OLD | NEW |