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/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
512 static const char* phase_name() { return "type feedback specializing"; } | 512 static const char* phase_name() { return "type feedback specializing"; } |
513 | 513 |
514 void Run(PipelineData* data, Zone* temp_zone) { | 514 void Run(PipelineData* data, Zone* temp_zone) { |
515 SourcePositionTable::Scope pos(data->source_positions(), | 515 SourcePositionTable::Scope pos(data->source_positions(), |
516 SourcePosition::Unknown()); | 516 SourcePosition::Unknown()); |
517 Handle<Context> native_context(data->info()->context()->native_context()); | 517 Handle<Context> native_context(data->info()->context()->native_context()); |
518 TypeFeedbackOracle oracle(data->isolate(), temp_zone, | 518 TypeFeedbackOracle oracle(data->isolate(), temp_zone, |
519 data->info()->unoptimized_code(), | 519 data->info()->unoptimized_code(), |
520 data->info()->feedback_vector(), native_context); | 520 data->info()->feedback_vector(), native_context); |
521 GraphReducer graph_reducer(data->graph(), temp_zone); | 521 GraphReducer graph_reducer(data->graph(), temp_zone); |
522 JSTypeFeedbackSpecializer specializer(data->jsgraph(), | 522 Handle<GlobalObject> global_object = Handle<GlobalObject>::null(); |
523 data->js_type_feedback(), &oracle); | 523 if (data->info()->has_global_object()) { |
Michael Starzinger
2015/04/21 12:34:01
This is only valid if we don't share TurboFan code
titzer
2015/04/21 12:56:52
Acknowledge, agreed. I have sketched out a special
| |
524 global_object = | |
525 Handle<GlobalObject>(data->info()->global_object(), data->isolate()); | |
526 } | |
527 JSTypeFeedbackSpecializer specializer( | |
528 data->jsgraph(), data->js_type_feedback(), &oracle, global_object, | |
529 data->info()->dependencies()); | |
524 AddReducer(data, &graph_reducer, &specializer); | 530 AddReducer(data, &graph_reducer, &specializer); |
525 graph_reducer.ReduceGraph(); | 531 graph_reducer.ReduceGraph(); |
526 } | 532 } |
527 }; | 533 }; |
528 | 534 |
529 | 535 |
530 struct TypedLoweringPhase { | 536 struct TypedLoweringPhase { |
531 static const char* phase_name() { return "typed lowering"; } | 537 static const char* phase_name() { return "typed lowering"; } |
532 | 538 |
533 void Run(PipelineData* data, Zone* temp_zone) { | 539 void Run(PipelineData* data, Zone* temp_zone) { |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1262 | 1268 |
1263 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { | 1269 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { |
1264 TurboCfgFile tcf(data->isolate()); | 1270 TurboCfgFile tcf(data->isolate()); |
1265 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); | 1271 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); |
1266 } | 1272 } |
1267 } | 1273 } |
1268 | 1274 |
1269 } // namespace compiler | 1275 } // namespace compiler |
1270 } // namespace internal | 1276 } // namespace internal |
1271 } // namespace v8 | 1277 } // namespace v8 |
OLD | NEW |