| 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/compiler/generic-node-inl.h" | 7 #include "src/compiler/generic-node-inl.h" |
| 8 #include "test/cctest/cctest.h" | 8 #include "test/cctest/cctest.h" |
| 9 #include "test/cctest/compiler/codegen-tester.h" | 9 #include "test/cctest/compiler/codegen-tester.h" |
| 10 #include "test/cctest/compiler/value-helper.h" | 10 #include "test/cctest/compiler/value-helper.h" |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 | 470 |
| 471 | 471 |
| 472 TEST(RunHeapConstant) { | 472 TEST(RunHeapConstant) { |
| 473 RawMachineAssemblerTester<Object*> m; | 473 RawMachineAssemblerTester<Object*> m; |
| 474 m.Return(m.StringConstant("empty")); | 474 m.Return(m.StringConstant("empty")); |
| 475 m.CheckString("empty", m.Call()); | 475 m.CheckString("empty", m.Call()); |
| 476 } | 476 } |
| 477 | 477 |
| 478 | 478 |
| 479 TEST(RunHeapNumberConstant) { | 479 TEST(RunHeapNumberConstant) { |
| 480 RawMachineAssemblerTester<Object*> m; | 480 RawMachineAssemblerTester<HeapObject*> m; |
| 481 Handle<Object> number = m.isolate()->factory()->NewHeapNumber(100.5); | 481 Handle<HeapObject> number = m.isolate()->factory()->NewHeapNumber(100.5); |
| 482 m.Return(m.HeapConstant(number)); | 482 m.Return(m.HeapConstant(number)); |
| 483 Object* result = m.Call(); | 483 HeapObject* result = m.Call(); |
| 484 CHECK_EQ(result, *number); | 484 CHECK_EQ(result, *number); |
| 485 } | 485 } |
| 486 | 486 |
| 487 | 487 |
| 488 TEST(RunParam1) { | 488 TEST(RunParam1) { |
| 489 RawMachineAssemblerTester<int32_t> m(kMachInt32); | 489 RawMachineAssemblerTester<int32_t> m(kMachInt32); |
| 490 m.Return(m.Parameter(0)); | 490 m.Return(m.Parameter(0)); |
| 491 | 491 |
| 492 FOR_INT32_INPUTS(i) { | 492 FOR_INT32_INPUTS(i) { |
| 493 int32_t result = m.Call(*i); | 493 int32_t result = m.Call(*i); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 { | 568 { |
| 569 RawMachineAssemblerTester<int32_t> m; | 569 RawMachineAssemblerTester<int32_t> m; |
| 570 Float64BinopTester bt(&m); | 570 Float64BinopTester bt(&m); |
| 571 bt.AddReturn(bt.param1); | 571 bt.AddReturn(bt.param1); |
| 572 | 572 |
| 573 FOR_FLOAT64_INPUTS(i) { CHECK_EQ(*i, bt.call(-11.25, *i)); } | 573 FOR_FLOAT64_INPUTS(i) { CHECK_EQ(*i, bt.call(-11.25, *i)); } |
| 574 } | 574 } |
| 575 } | 575 } |
| 576 | 576 |
| 577 #endif // V8_TURBOFAN_TARGET | 577 #endif // V8_TURBOFAN_TARGET |
| OLD | NEW |