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

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

Issue 1544583002: For background compilation we copy ICData so that it is immutable during comnpilation. However, we … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: l Created 5 years 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
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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 if ((ic_data.NumberOfUsedChecks() == 1) && ic_data.HasReceiverClassId(cid)) { 312 if ((ic_data.NumberOfUsedChecks() == 1) && ic_data.HasReceiverClassId(cid)) {
313 return ic_data; // Nothing to do 313 return ic_data; // Nothing to do
314 } 314 }
315 315
316 const Function& function = 316 const Function& function =
317 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid)); 317 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid));
318 // TODO(fschneider): Try looking up the function on the class if it is 318 // TODO(fschneider): Try looking up the function on the class if it is
319 // not found in the ICData. 319 // not found in the ICData.
320 if (!function.IsNull()) { 320 if (!function.IsNull()) {
321 const ICData& new_ic_data = ICData::ZoneHandle(Z, ICData::New( 321 const ICData& new_ic_data = ICData::ZoneHandle(Z, ICData::New(
322 Function::Handle(Z, ic_data.owner()), 322 Function::Handle(Z, ic_data.Owner()),
323 String::Handle(Z, ic_data.target_name()), 323 String::Handle(Z, ic_data.target_name()),
324 Object::empty_array(), // Dummy argument descriptor. 324 Object::empty_array(), // Dummy argument descriptor.
325 ic_data.deopt_id(), 325 ic_data.deopt_id(),
326 ic_data.NumArgsTested())); 326 ic_data.NumArgsTested()));
327 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons()); 327 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons());
328 new_ic_data.AddReceiverCheck(cid, function); 328 new_ic_data.AddReceiverCheck(cid, function);
329 return new_ic_data; 329 return new_ic_data;
330 } 330 }
331 331
332 return ic_data; 332 return ic_data;
(...skipping 8521 matching lines...) Expand 10 before | Expand all | Expand 10 after
8854 8854
8855 // Insert materializations at environment uses. 8855 // Insert materializations at environment uses.
8856 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { 8856 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) {
8857 CreateMaterializationAt( 8857 CreateMaterializationAt(
8858 exits_collector_.exits()[i], alloc, *slots); 8858 exits_collector_.exits()[i], alloc, *slots);
8859 } 8859 }
8860 } 8860 }
8861 8861
8862 8862
8863 } // namespace dart 8863 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698