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