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

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

Issue 14682020: Optimize functions containing try-catch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased Created 7 years, 7 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 | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_ia32.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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 334 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
335 OS::SNPrint(chars, len, kFormat, function_name, reason); 335 OS::SNPrint(chars, len, kFormat, function_name, reason);
336 const Error& error = Error::Handle( 336 const Error& error = Error::Handle(
337 LanguageError::New(String::Handle(String::New(chars)))); 337 LanguageError::New(String::Handle(String::New(chars))));
338 Isolate::Current()->long_jump_base()->Jump(1, error); 338 Isolate::Current()->long_jump_base()->Jump(1, error);
339 } 339 }
340 340
341 341
342 intptr_t FlowGraphCompiler::StackSize() const { 342 intptr_t FlowGraphCompiler::StackSize() const {
343 if (is_optimizing_) { 343 if (is_optimizing_) {
344 return block_order_[0]->AsGraphEntry()->spill_slot_count(); 344 GraphEntryInstr* entry = flow_graph_.graph_entry();
345 return entry->fixed_slot_count() + entry->spill_slot_count();
345 } else { 346 } else {
346 return parsed_function_.num_stack_locals() + 347 return parsed_function_.num_stack_locals() +
347 parsed_function_.num_copied_params(); 348 parsed_function_.num_copied_params();
348 } 349 }
349 } 350 }
350 351
351 352
352 Label* FlowGraphCompiler::GetJumpLabel( 353 Label* FlowGraphCompiler::GetJumpLabel(
353 BlockEntryInstr* block_entry) const { 354 BlockEntryInstr* block_entry) const {
354 const intptr_t block_index = block_entry->postorder_number(); 355 const intptr_t block_index = block_entry->postorder_number();
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 1166
1166 for (int i = 0; i < len; i++) { 1167 for (int i = 0; i < len; i++) {
1167 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1168 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1168 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1169 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1169 ic_data.GetCountAt(i))); 1170 ic_data.GetCountAt(i)));
1170 } 1171 }
1171 sorted->Sort(HighestCountFirst); 1172 sorted->Sort(HighestCountFirst);
1172 } 1173 }
1173 1174
1174 } // namespace dart 1175 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698