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 // TODO(jochen): Remove this after the setting is turned on globally. | 5 // TODO(jochen): Remove this after the setting is turned on globally. |
6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <functional> | 9 #include <functional> |
10 #include <limits> | 10 #include <limits> |
11 | 11 |
12 #include "src/assembler.h" | 12 #include "src/assembler.h" |
13 #include "src/base/bits.h" | 13 #include "src/base/bits.h" |
14 #include "src/base/utils/random-number-generator.h" | 14 #include "src/base/utils/random-number-generator.h" |
15 #include "src/codegen.h" | 15 #include "src/codegen.h" |
16 #include "src/compiler.h" | 16 #include "src/compiler.h" |
17 #include "src/compiler/linkage.h" | 17 #include "src/compiler/linkage.h" |
18 #include "src/macro-assembler.h" | 18 #include "src/macro-assembler.h" |
19 #include "test/cctest/cctest.h" | 19 #include "test/cctest/cctest.h" |
20 #include "test/cctest/compiler/codegen-tester.h" | 20 #include "test/cctest/compiler/codegen-tester.h" |
21 #include "test/cctest/compiler/value-helper.h" | 21 #include "test/cctest/compiler/value-helper.h" |
22 | 22 |
23 | 23 namespace v8 { |
24 using namespace v8::base; | 24 namespace internal { |
25 using namespace v8::internal; | 25 namespace compiler { |
26 using namespace v8::internal::compiler; | |
27 | |
28 | 26 |
29 namespace { | 27 namespace { |
30 | 28 |
31 CallDescriptor* GetCallDescriptor(Zone* zone, int return_count, | 29 CallDescriptor* GetCallDescriptor(Zone* zone, int return_count, |
32 int param_count) { | 30 int param_count) { |
33 MachineSignature::Builder msig(zone, return_count, param_count); | 31 MachineSignature::Builder msig(zone, return_count, param_count); |
34 LocationSignature::Builder locations(zone, return_count, param_count); | 32 LocationSignature::Builder locations(zone, return_count, param_count); |
35 const RegisterConfiguration* config = | 33 const RegisterConfiguration* config = |
36 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN); | 34 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN); |
37 | 35 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 mt.Return(ret); | 108 mt.Return(ret); |
111 #ifdef ENABLE_DISASSEMBLER | 109 #ifdef ENABLE_DISASSEMBLER |
112 Handle<Code> code2 = mt.GetCode(); | 110 Handle<Code> code2 = mt.GetCode(); |
113 if (FLAG_print_code) { | 111 if (FLAG_print_code) { |
114 OFStream os(stdout); | 112 OFStream os(stdout); |
115 code2->Disassemble("three_value_call", os); | 113 code2->Disassemble("three_value_call", os); |
116 } | 114 } |
117 #endif | 115 #endif |
118 CHECK_EQ((123 + 456) + (123 - 456) + (123 * 456), mt.Call()); | 116 CHECK_EQ((123 + 456) + (123 - 456) + (123 * 456), mt.Call()); |
119 } | 117 } |
| 118 |
| 119 } // namespace compiler |
| 120 } // namespace internal |
| 121 } // namespace v8 |
OLD | NEW |