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

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

Issue 10704210: Fix problem of excessive attempts to optimize, fix excessive deoptimizations for load/store indexed… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 433
434 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, 434 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data,
435 Register class_id_reg, 435 Register class_id_reg,
436 intptr_t arg_count, 436 intptr_t arg_count,
437 const Array& arg_names, 437 const Array& arg_names,
438 Label* deopt, 438 Label* deopt,
439 Label* done, 439 Label* done,
440 intptr_t cid, 440 intptr_t cid,
441 intptr_t token_index, 441 intptr_t token_index,
442 intptr_t try_index) { 442 intptr_t try_index) {
443 ASSERT(!ic_data.IsNull() && (ic_data.NumberOfChecks() > 0));
443 Label match_found; 444 Label match_found;
444 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { 445 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) {
445 const bool is_last_check = (i == (ic_data.NumberOfChecks() - 1)); 446 const bool is_last_check = (i == (ic_data.NumberOfChecks() - 1));
446 Label next_test; 447 Label next_test;
447 assembler()->cmpl(class_id_reg, Immediate(ic_data.GetReceiverClassIdAt(i))); 448 assembler()->cmpl(class_id_reg, Immediate(ic_data.GetReceiverClassIdAt(i)));
448 if (is_last_check) { 449 if (is_last_check) {
449 assembler()->j(NOT_EQUAL, deopt); 450 assembler()->j(NOT_EQUAL, deopt);
450 } else { 451 } else {
451 assembler()->j(NOT_EQUAL, &next_test); 452 assembler()->j(NOT_EQUAL, &next_test);
452 } 453 }
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 return; 793 return;
793 } 794 }
794 } 795 }
795 796
796 // This move is not blocked. 797 // This move is not blocked.
797 EmitMove(index); 798 EmitMove(index);
798 } 799 }
799 800
800 801
801 } // namespace dart 802 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698