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

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

Issue 1368173002: Do not eagerly finalize when optimizing. Remove allocation of temporary strings in new space. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Improve comments Created 5 years, 2 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/class_finalizer.cc ('k') | runtime/vm/object.h » ('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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 } 218 }
219 219
220 if (all_cids_known) { 220 if (all_cids_known) {
221 const Array& args_desc_array = Array::Handle(Z, 221 const Array& args_desc_array = Array::Handle(Z,
222 ArgumentsDescriptor::New(call->ArgumentCount(), 222 ArgumentsDescriptor::New(call->ArgumentCount(),
223 call->argument_names())); 223 call->argument_names()));
224 ArgumentsDescriptor args_desc(args_desc_array); 224 ArgumentsDescriptor args_desc(args_desc_array);
225 const Class& receiver_class = Class::Handle(Z, 225 const Class& receiver_class = Class::Handle(Z,
226 isolate()->class_table()->At(class_ids[0])); 226 isolate()->class_table()->At(class_ids[0]));
227 if (!receiver_class.is_finalized()) {
228 // Do not eagerly finalize classes. ResolveDynamicForReceiverClass can
229 // cause class finalization, since callee's receiver class may not be
230 // finalized yet.
231 return false;
232 }
227 const Function& function = Function::Handle(Z, 233 const Function& function = Function::Handle(Z,
228 Resolver::ResolveDynamicForReceiverClass( 234 Resolver::ResolveDynamicForReceiverClass(
229 receiver_class, 235 receiver_class,
230 call->function_name(), 236 call->function_name(),
231 args_desc)); 237 args_desc));
232 if (function.IsNull()) { 238 if (function.IsNull()) {
233 return false; 239 return false;
234 } 240 }
235 241
236 // Create new ICData, do not modify the one attached to the instruction 242 // Create new ICData, do not modify the one attached to the instruction
(...skipping 8545 matching lines...) Expand 10 before | Expand all | Expand 10 after
8782 8788
8783 // Insert materializations at environment uses. 8789 // Insert materializations at environment uses.
8784 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { 8790 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) {
8785 CreateMaterializationAt( 8791 CreateMaterializationAt(
8786 exits_collector_.exits()[i], alloc, *slots); 8792 exits_collector_.exits()[i], alloc, *slots);
8787 } 8793 }
8788 } 8794 }
8789 8795
8790 8796
8791 } // namespace dart 8797 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698