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 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
7 | 7 |
8 #include "src/compiler/code-generator.h" | 8 #include "src/compiler/code-generator.h" |
9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
11 #include "src/compiler/instruction-selector.h" | 11 #include "src/compiler/instruction-selector.h" |
12 #include "src/compiler/machine-operator.h" | 12 #include "src/compiler/machine-operator.h" |
13 #include "src/compiler/node.h" | 13 #include "src/compiler/node.h" |
14 #include "src/compiler/operator.h" | 14 #include "src/compiler/operator.h" |
15 #include "src/compiler/raw-machine-assembler.h" | 15 #include "src/compiler/raw-machine-assembler.h" |
16 #include "src/compiler/register-allocator.h" | 16 #include "src/compiler/register-allocator.h" |
17 #include "src/compiler/schedule.h" | 17 #include "src/compiler/schedule.h" |
| 18 #include "src/compiler/visualizer.h" |
18 | 19 |
19 #include "src/ast-numbering.h" | 20 #include "src/ast-numbering.h" |
20 #include "src/full-codegen.h" | 21 #include "src/full-codegen.h" |
21 #include "src/parser.h" | 22 #include "src/parser.h" |
22 #include "src/rewriter.h" | 23 #include "src/rewriter.h" |
23 | 24 |
24 #include "test/cctest/compiler/c-signature.h" | 25 #include "test/cctest/compiler/c-signature.h" |
25 #include "test/cctest/compiler/function-tester.h" | 26 #include "test/cctest/compiler/function-tester.h" |
26 | 27 |
27 using namespace v8::internal; | 28 using namespace v8::internal; |
(...skipping 26 matching lines...) Expand all Loading... |
54 DCHECK(info.shared_info()->has_deoptimization_support()); | 55 DCHECK(info.shared_info()->has_deoptimization_support()); |
55 | 56 |
56 graph = new (scope_->main_zone()) Graph(scope_->main_zone()); | 57 graph = new (scope_->main_zone()) Graph(scope_->main_zone()); |
57 } | 58 } |
58 | 59 |
59 virtual ~DeoptCodegenTester() {} | 60 virtual ~DeoptCodegenTester() {} |
60 | 61 |
61 void GenerateCodeFromSchedule(Schedule* schedule) { | 62 void GenerateCodeFromSchedule(Schedule* schedule) { |
62 OFStream os(stdout); | 63 OFStream os(stdout); |
63 if (FLAG_trace_turbo) { | 64 if (FLAG_trace_turbo) { |
64 os << *schedule; | 65 os << ScheduleAsJSON(*schedule); |
65 } | 66 } |
66 result_code = Pipeline::GenerateCodeForTesting(&info, graph, schedule); | 67 result_code = Pipeline::GenerateCodeForTesting(&info, graph, schedule); |
67 #ifdef OBJECT_PRINT | 68 #ifdef OBJECT_PRINT |
68 if (FLAG_print_opt_code || FLAG_trace_turbo) { | 69 if (FLAG_print_opt_code || FLAG_trace_turbo) { |
69 result_code->Print(); | 70 result_code->Print(); |
70 } | 71 } |
71 #endif | 72 #endif |
72 } | 73 } |
73 | 74 |
74 Zone* zone() { return scope_->main_zone(); } | 75 Zone* zone() { return scope_->main_zone(); } |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 Handle<Object> result; | 285 Handle<Object> result; |
285 bool has_pending_exception = | 286 bool has_pending_exception = |
286 !Execution::Call(isolate, t.function, | 287 !Execution::Call(isolate, t.function, |
287 isolate->factory()->undefined_value(), 0, NULL, | 288 isolate->factory()->undefined_value(), 0, NULL, |
288 false).ToHandle(&result); | 289 false).ToHandle(&result); |
289 CHECK(!has_pending_exception); | 290 CHECK(!has_pending_exception); |
290 CHECK(result->SameValue(Smi::FromInt(42))); | 291 CHECK(result->SameValue(Smi::FromInt(42))); |
291 } | 292 } |
292 | 293 |
293 #endif | 294 #endif |
OLD | NEW |