Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: dart/runtime/vm/flow_graph_compiler.cc

Issue 328663002: Version 1.5.0-dev.4.5 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/runtime/vm/flow_graph_compiler.h ('k') | dart/runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 float32x4_class_(Class::ZoneHandle( 96 float32x4_class_(Class::ZoneHandle(
97 isolate_->object_store()->float32x4_class())), 97 isolate_->object_store()->float32x4_class())),
98 float64x2_class_(Class::ZoneHandle( 98 float64x2_class_(Class::ZoneHandle(
99 isolate_->object_store()->float64x2_class())), 99 isolate_->object_store()->float64x2_class())),
100 int32x4_class_(Class::ZoneHandle( 100 int32x4_class_(Class::ZoneHandle(
101 isolate_->object_store()->int32x4_class())), 101 isolate_->object_store()->int32x4_class())),
102 list_class_(Class::ZoneHandle( 102 list_class_(Class::ZoneHandle(
103 Library::Handle(Library::CoreLibrary()). 103 Library::Handle(Library::CoreLibrary()).
104 LookupClass(Symbols::List()))), 104 LookupClass(Symbols::List()))),
105 parallel_move_resolver_(this), 105 parallel_move_resolver_(this),
106 pending_deoptimization_env_(NULL) { 106 pending_deoptimization_env_(NULL),
107 entry_patch_pc_offset_(Code::kInvalidPc),
108 patch_code_pc_offset_(Code::kInvalidPc),
109 lazy_deopt_pc_offset_(Code::kInvalidPc) {
107 ASSERT(assembler != NULL); 110 ASSERT(assembler != NULL);
108 ASSERT(!list_class_.IsNull()); 111 ASSERT(!list_class_.IsNull());
109 } 112 }
110 113
111 114
112 void FlowGraphCompiler::InitCompiler() { 115 void FlowGraphCompiler::InitCompiler() {
113 pc_descriptors_list_ = new DescriptorList(64); 116 pc_descriptors_list_ = new DescriptorList(64);
114 exception_handlers_list_ = new ExceptionHandlerList(); 117 exception_handlers_list_ = new ExceptionHandlerList();
115 block_info_.Clear(); 118 block_info_.Clear();
116 // Conservative detection of leaf routines used to remove the stack check 119 // Conservative detection of leaf routines used to remove the stack check
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 code.set_exception_handlers(handlers); 696 code.set_exception_handlers(handlers);
694 } 697 }
695 698
696 699
697 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { 700 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) {
698 ASSERT(pc_descriptors_list_ != NULL); 701 ASSERT(pc_descriptors_list_ != NULL);
699 const PcDescriptors& descriptors = PcDescriptors::Handle( 702 const PcDescriptors& descriptors = PcDescriptors::Handle(
700 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint())); 703 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint()));
701 if (!is_optimizing_) descriptors.Verify(parsed_function_.function()); 704 if (!is_optimizing_) descriptors.Verify(parsed_function_.function());
702 code.set_pc_descriptors(descriptors); 705 code.set_pc_descriptors(descriptors);
706 code.set_entry_patch_pc_offset(entry_patch_pc_offset_);
707 code.set_patch_code_pc_offset(patch_code_pc_offset_);
708 code.set_lazy_deopt_pc_offset(lazy_deopt_pc_offset_);
703 } 709 }
704 710
705 711
706 void FlowGraphCompiler::FinalizeDeoptInfo(const Code& code) { 712 void FlowGraphCompiler::FinalizeDeoptInfo(const Code& code) {
707 // For functions with optional arguments, all incoming arguments are copied 713 // For functions with optional arguments, all incoming arguments are copied
708 // to spill slots. The deoptimization environment does not track them. 714 // to spill slots. The deoptimization environment does not track them.
709 const Function& function = parsed_function().function(); 715 const Function& function = parsed_function().function();
710 const intptr_t incoming_arg_count = 716 const intptr_t incoming_arg_count =
711 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters(); 717 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
712 DeoptInfoBuilder builder(isolate(), incoming_arg_count); 718 DeoptInfoBuilder builder(isolate(), incoming_arg_count);
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 1303
1298 for (int i = 0; i < len; i++) { 1304 for (int i = 0; i < len; i++) {
1299 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1305 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1300 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1306 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1301 ic_data.GetCountAt(i))); 1307 ic_data.GetCountAt(i)));
1302 } 1308 }
1303 sorted->Sort(HighestCountFirst); 1309 sorted->Sort(HighestCountFirst);
1304 } 1310 }
1305 1311
1306 } // namespace dart 1312 } // namespace dart
OLDNEW
« no previous file with comments | « dart/runtime/vm/flow_graph_compiler.h ('k') | dart/runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698