| 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 "test/cctest/types-fuzz.h" | 10 #include "test/cctest/types-fuzz.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 TEST_F(TyperTest, TypeJSDivide) { | 242 TEST_F(TyperTest, TypeJSDivide) { |
| 243 TestBinaryArithOp(javascript_.Divide(), std::divides<double>()); | 243 TestBinaryArithOp(javascript_.Divide(), std::divides<double>()); |
| 244 } | 244 } |
| 245 | 245 |
| 246 | 246 |
| 247 TEST_F(TyperTest, TypeJSModulus) { | 247 TEST_F(TyperTest, TypeJSModulus) { |
| 248 TestBinaryArithOp(javascript_.Modulus(), modulo); | 248 TestBinaryArithOp(javascript_.Modulus(), modulo); |
| 249 } | 249 } |
| 250 | 250 |
| 251 | 251 |
| 252 TEST_F(TyperTest, TypeJSExponentiate) { |
| 253 TestBinaryArithOp(javascript_.Exponentiate(), power_helper); |
| 254 } |
| 255 |
| 256 |
| 252 TEST_F(TyperTest, TypeJSBitwiseOr) { | 257 TEST_F(TyperTest, TypeJSBitwiseOr) { |
| 253 TestBinaryBitOp(javascript_.BitwiseOr(), bit_or); | 258 TestBinaryBitOp(javascript_.BitwiseOr(), bit_or); |
| 254 } | 259 } |
| 255 | 260 |
| 256 | 261 |
| 257 TEST_F(TyperTest, TypeJSBitwiseAnd) { | 262 TEST_F(TyperTest, TypeJSBitwiseAnd) { |
| 258 TestBinaryBitOp(javascript_.BitwiseAnd(), bit_and); | 263 TestBinaryBitOp(javascript_.BitwiseAnd(), bit_and); |
| 259 } | 264 } |
| 260 | 265 |
| 261 | 266 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 362 |
| 358 | 363 |
| 359 TEST_F(TyperTest, TypeRegressInt32Constant) { | 364 TEST_F(TyperTest, TypeRegressInt32Constant) { |
| 360 int values[] = {-5, 10}; | 365 int values[] = {-5, 10}; |
| 361 for (auto i : values) { | 366 for (auto i : values) { |
| 362 Node* c = graph()->NewNode(common()->Int32Constant(i)); | 367 Node* c = graph()->NewNode(common()->Int32Constant(i)); |
| 363 Type* type = NodeProperties::GetBounds(c).upper; | 368 Type* type = NodeProperties::GetBounds(c).upper; |
| 364 EXPECT_TRUE(type->Is(NewRange(i, i))); | 369 EXPECT_TRUE(type->Is(NewRange(i, i))); |
| 365 } | 370 } |
| 366 } | 371 } |
| OLD | NEW |