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

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

Issue 1541133003: Incremental changes from background compilation work (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: r Created 4 years, 12 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_x64.cc ('k') | runtime/vm/object.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/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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 const intptr_t cid = Class::Handle(Z, target_function.Owner()).id(); 269 const intptr_t cid = Class::Handle(Z, target_function.Owner()).id();
270 const ICData& ic_data = ICData::ZoneHandle(Z, 270 const ICData& ic_data = ICData::ZoneHandle(Z,
271 ICData::NewFrom(*call->ic_data(), 1)); 271 ICData::NewFrom(*call->ic_data(), 1));
272 ic_data.AddReceiverCheck(cid, target_function); 272 ic_data.AddReceiverCheck(cid, target_function);
273 call->set_ic_data(&ic_data); 273 call->set_ic_data(&ic_data);
274 return true; 274 return true;
275 } 275 }
276 } 276 }
277 277
278 // Check if getter or setter in function's class and class is currently leaf. 278 // Check if getter or setter in function's class and class is currently leaf.
279 if (FLAG_guess_icdata_cid && 279 // Do not run the optimization below if in background compilation since
280 // resolution of getter functions may create new signature classes.
281 // TODO(regis): Remove test for background compilation once signature classes
282 // are not generated any longer.
283 if (thread()->IsMutatorThread() &&
284 FLAG_guess_icdata_cid &&
280 ((call->token_kind() == Token::kGET) || 285 ((call->token_kind() == Token::kGET) ||
281 (call->token_kind() == Token::kSET))) { 286 (call->token_kind() == Token::kSET))) {
282 const Class& owner_class = Class::Handle(Z, function().Owner()); 287 const Class& owner_class = Class::Handle(Z, function().Owner());
283 if (!owner_class.is_abstract() && 288 if (!owner_class.is_abstract() &&
284 !CHA::HasSubclasses(owner_class) && 289 !CHA::HasSubclasses(owner_class) &&
285 !CHA::IsImplemented(owner_class)) { 290 !CHA::IsImplemented(owner_class)) {
286 const Array& args_desc_array = Array::Handle(Z, 291 const Array& args_desc_array = Array::Handle(Z,
287 ArgumentsDescriptor::New(call->ArgumentCount(), 292 ArgumentsDescriptor::New(call->ArgumentCount(),
288 call->argument_names())); 293 call->argument_names()));
289 ArgumentsDescriptor args_desc(args_desc_array); 294 ArgumentsDescriptor args_desc(args_desc_array);
(...skipping 8555 matching lines...) Expand 10 before | Expand all | Expand 10 after
8845 8850
8846 // Insert materializations at environment uses. 8851 // Insert materializations at environment uses.
8847 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { 8852 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) {
8848 CreateMaterializationAt( 8853 CreateMaterializationAt(
8849 exits_collector_.exits()[i], alloc, *slots); 8854 exits_collector_.exits()[i], alloc, *slots);
8850 } 8855 }
8851 } 8856 }
8852 8857
8853 8858
8854 } // namespace dart 8859 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698