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

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

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed comments Created 5 years, 3 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | 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/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 isolate_->object_store()->float32x4_class())), 195 isolate_->object_store()->float32x4_class())),
196 float64x2_class_(Class::ZoneHandle( 196 float64x2_class_(Class::ZoneHandle(
197 isolate_->object_store()->float64x2_class())), 197 isolate_->object_store()->float64x2_class())),
198 int32x4_class_(Class::ZoneHandle( 198 int32x4_class_(Class::ZoneHandle(
199 isolate_->object_store()->int32x4_class())), 199 isolate_->object_store()->int32x4_class())),
200 list_class_(Class::ZoneHandle( 200 list_class_(Class::ZoneHandle(
201 Library::Handle(Library::CoreLibrary()). 201 Library::Handle(Library::CoreLibrary()).
202 LookupClass(Symbols::List()))), 202 LookupClass(Symbols::List()))),
203 parallel_move_resolver_(this), 203 parallel_move_resolver_(this),
204 pending_deoptimization_env_(NULL), 204 pending_deoptimization_env_(NULL),
205 entry_patch_pc_offset_(Code::kInvalidPc),
206 patch_code_pc_offset_(Code::kInvalidPc),
207 lazy_deopt_pc_offset_(Code::kInvalidPc), 205 lazy_deopt_pc_offset_(Code::kInvalidPc),
208 deopt_id_to_ic_data_(NULL), 206 deopt_id_to_ic_data_(NULL),
209 inlined_code_intervals_(Array::ZoneHandle(Object::empty_array().raw())), 207 inlined_code_intervals_(Array::ZoneHandle(Object::empty_array().raw())),
210 inline_id_to_function_(inline_id_to_function), 208 inline_id_to_function_(inline_id_to_function),
211 caller_inline_id_(caller_inline_id) { 209 caller_inline_id_(caller_inline_id) {
212 ASSERT(flow_graph->parsed_function().function().raw() == 210 ASSERT(flow_graph->parsed_function().function().raw() ==
213 parsed_function.function().raw()); 211 parsed_function.function().raw());
214 if (!is_optimizing) { 212 if (!is_optimizing) {
215 const intptr_t len = isolate()->deopt_id(); 213 const intptr_t len = isolate()->deopt_id();
216 deopt_id_to_ic_data_ = new(zone()) ZoneGrowableArray<const ICData*>(len); 214 deopt_id_to_ic_data_ = new(zone()) ZoneGrowableArray<const ICData*>(len);
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 } 913 }
916 } 914 }
917 915
918 916
919 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { 917 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) {
920 ASSERT(pc_descriptors_list_ != NULL); 918 ASSERT(pc_descriptors_list_ != NULL);
921 const PcDescriptors& descriptors = PcDescriptors::Handle( 919 const PcDescriptors& descriptors = PcDescriptors::Handle(
922 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint())); 920 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint()));
923 if (!is_optimizing_) descriptors.Verify(parsed_function_.function()); 921 if (!is_optimizing_) descriptors.Verify(parsed_function_.function());
924 code.set_pc_descriptors(descriptors); 922 code.set_pc_descriptors(descriptors);
925 code.set_entry_patch_pc_offset(entry_patch_pc_offset_);
926 code.set_patch_code_pc_offset(patch_code_pc_offset_);
927 code.set_lazy_deopt_pc_offset(lazy_deopt_pc_offset_); 923 code.set_lazy_deopt_pc_offset(lazy_deopt_pc_offset_);
928 } 924 }
929 925
930 926
931 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) { 927 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) {
932 // No deopt information if we 'always_optimize' (no deoptimization allowed). 928 // No deopt information if we 'always_optimize' (no deoptimization allowed).
933 if (Compiler::always_optimize()) { 929 if (Compiler::always_optimize()) {
934 return Array::empty_array().raw(); 930 return Array::empty_array().raw();
935 } 931 }
936 // For functions with optional arguments, all incoming arguments are copied 932 // For functions with optional arguments, all incoming arguments are copied
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 1833
1838 1834
1839 void FlowGraphCompiler::FrameStateClear() { 1835 void FlowGraphCompiler::FrameStateClear() {
1840 ASSERT(!is_optimizing()); 1836 ASSERT(!is_optimizing());
1841 frame_state_.TruncateTo(0); 1837 frame_state_.TruncateTo(0);
1842 } 1838 }
1843 #endif 1839 #endif
1844 1840
1845 1841
1846 } // namespace dart 1842 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698