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

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

Issue 10795076: Fix 4182: When inlining StringBase_get_length, we cannot assume that all receivers where subclasse… (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
« no previous file with comments | « no previous file | no next file » | 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) 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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/flow_graph_builder.h" 7 #include "vm/flow_graph_builder.h"
8 #include "vm/il_printer.h" 8 #include "vm/il_printer.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 10
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 comp->InputAt(0), 291 comp->InputAt(0),
292 length_offset, 292 length_offset,
293 Type::ZoneHandle(Type::IntInterface())); 293 Type::ZoneHandle(Type::IntInterface()));
294 load->set_original(comp); 294 load->set_original(comp);
295 load->set_ic_data(comp->ic_data()); 295 load->set_ic_data(comp->ic_data());
296 instr->set_computation(load); 296 instr->set_computation(load);
297 return true; 297 return true;
298 } 298 }
299 299
300 if (recognized_kind == MethodRecognizer::kStringBaseLength) { 300 if (recognized_kind == MethodRecognizer::kStringBaseLength) {
301 // All bets are off if we run in production mode, i.e., at one call site
regis 2012/07/23 21:38:57 "if we run in production mode" Can you do more if
srdjan 2012/07/23 21:40:41 Changed comment: it can happen in any mode. Just s
302 // we may have StringBase_get_length as well as ImmutableArray_get_length.
303 if (!HasOneTarget(ic_data)) {
304 return false;
305 }
301 ASSERT(HasOneTarget(ic_data)); 306 ASSERT(HasOneTarget(ic_data));
302 LoadVMFieldComp* load = new LoadVMFieldComp( 307 LoadVMFieldComp* load = new LoadVMFieldComp(
303 comp->InputAt(0), 308 comp->InputAt(0),
304 String::length_offset(), 309 String::length_offset(),
305 Type::ZoneHandle(Type::IntInterface())); 310 Type::ZoneHandle(Type::IntInterface()));
306 load->set_original(comp); 311 load->set_original(comp);
307 load->set_ic_data(comp->ic_data()); 312 load->set_ic_data(comp->ic_data());
308 instr->set_computation(load); 313 instr->set_computation(load);
309 return true; 314 return true;
310 } 315 }
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 LocationSummary* locs = it.Current()->locs(); 541 LocationSummary* locs = it.Current()->locs();
537 if ((locs != NULL) && locs->is_call()) { 542 if ((locs != NULL) && locs->is_call()) {
538 is_leaf_ = false; 543 is_leaf_ = false;
539 return; 544 return;
540 } 545 }
541 } 546 }
542 } 547 }
543 } 548 }
544 549
545 } // namespace dart 550 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698