| OLD | NEW |
| 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 <functional> | 5 #include <functional> |
| 6 | 6 |
| 7 #include "src/codegen.h" | |
| 8 #include "src/compiler/node-properties-inl.h" | 7 #include "src/compiler/node-properties-inl.h" |
| 9 #include "src/compiler/typer.h" | 8 #include "src/compiler/typer.h" |
| 10 #include "test/cctest/cctest.h" | 9 #include "test/cctest/cctest.h" |
| 11 #include "test/cctest/compiler/graph-builder-tester.h" | 10 #include "test/cctest/compiler/graph-builder-tester.h" |
| 12 #include "test/cctest/types-fuzz.h" | 11 #include "test/cctest/types-fuzz.h" |
| 13 | 12 |
| 14 using namespace v8::internal; | 13 using namespace v8::internal; |
| 15 using namespace v8::internal::compiler; | 14 using namespace v8::internal::compiler; |
| 16 | 15 |
| 17 | 16 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 t.TestBinaryArithOp(t.javascript_.Multiply(), std::multiplies<double>()); | 209 t.TestBinaryArithOp(t.javascript_.Multiply(), std::multiplies<double>()); |
| 211 } | 210 } |
| 212 | 211 |
| 213 | 212 |
| 214 TEST(TypeJSDivide) { | 213 TEST(TypeJSDivide) { |
| 215 TyperTester t; | 214 TyperTester t; |
| 216 t.TestBinaryArithOp(t.javascript_.Divide(), std::divides<double>()); | 215 t.TestBinaryArithOp(t.javascript_.Divide(), std::divides<double>()); |
| 217 } | 216 } |
| 218 | 217 |
| 219 | 218 |
| 220 TEST(TypeJSModulus) { | |
| 221 TyperTester t; | |
| 222 t.TestBinaryArithOp(t.javascript_.Modulus(), modulo); | |
| 223 } | |
| 224 | |
| 225 | |
| 226 TEST(TypeJSBitwiseOr) { | 219 TEST(TypeJSBitwiseOr) { |
| 227 TyperTester t; | 220 TyperTester t; |
| 228 t.TestBinaryBitOp(t.javascript_.BitwiseOr(), bit_or); | 221 t.TestBinaryBitOp(t.javascript_.BitwiseOr(), bit_or); |
| 229 } | 222 } |
| 230 | 223 |
| 231 | 224 |
| 232 TEST(TypeJSBitwiseAnd) { | 225 TEST(TypeJSBitwiseAnd) { |
| 233 TyperTester t; | 226 TyperTester t; |
| 234 t.TestBinaryBitOp(t.javascript_.BitwiseAnd(), bit_and); | 227 t.TestBinaryBitOp(t.javascript_.BitwiseAnd(), bit_and); |
| 235 } | 228 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 V(Modulus) | 325 V(Modulus) |
| 333 | 326 |
| 334 | 327 |
| 335 TEST(Monotonicity) { | 328 TEST(Monotonicity) { |
| 336 TyperTester t; | 329 TyperTester t; |
| 337 #define TEST_OP(name) \ | 330 #define TEST_OP(name) \ |
| 338 t.TestBinaryMonotonicity(t.javascript_.name()); | 331 t.TestBinaryMonotonicity(t.javascript_.name()); |
| 339 JSBINOP_LIST(TEST_OP) | 332 JSBINOP_LIST(TEST_OP) |
| 340 #undef TEST_OP | 333 #undef TEST_OP |
| 341 } | 334 } |
| OLD | NEW |