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

Unified Diff: runtime/vm/object.cc

Issue 10928232: Deoptimization support in inlined code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index aebbc47d1bf9c7652db59a4dd1f2bcdecf509b1f..2d12f58cdf01be9a09157f7937803377f91556c2 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -7114,7 +7114,7 @@ const char* PcDescriptors::ToCString() const {
// - No two ic-call descriptors have the same deoptimization id (type feedback).
// A function without unique ids is marked as non-optimizable (e.g., because of
// finally blocks).
-void PcDescriptors::Verify(bool check_ids) const {
+void PcDescriptors::Verify(const Function& function) const {
#if defined(DEBUG)
// TODO(srdjan): Implement a more efficient way to check, currently drop
// the check for too large number of descriptors.
@@ -7124,15 +7124,15 @@ void PcDescriptors::Verify(bool check_ids) const {
}
return;
}
+ // Only check ids for unoptimized code that is optimizable.
+ if (!function.is_optimizable()) return;
for (intptr_t i = 0; i < Length(); i++) {
PcDescriptors::Kind kind = DescriptorKind(i);
// 'deopt_id' is set for kDeopt and kIcCall and must be unique for one kind.
intptr_t deopt_id = Isolate::kNoDeoptId;
- if (check_ids) {
- if ((DescriptorKind(i) == PcDescriptors::kDeoptBefore) ||
- (DescriptorKind(i) == PcDescriptors::kIcCall)) {
- deopt_id = DeoptId(i);
- }
+ if ((DescriptorKind(i) == PcDescriptors::kDeoptBefore) ||
+ (DescriptorKind(i) == PcDescriptors::kIcCall)) {
+ deopt_id = DeoptId(i);
}
for (intptr_t k = i + 1; k < Length(); k++) {
if (kind == DescriptorKind(k)) {

Powered by Google App Engine
This is Rietveld 408576698