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

Unified Diff: runtime/vm/object.cc

Issue 10982088: Remove deoptimization index PC descriptors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove code from an unrelated change. 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 b33dd0c475b57a10f3887a974e3a787b41c09434..cb61ab48ad36952ae5e8071552b95f68c638a15a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -6400,7 +6400,6 @@ void PcDescriptors::SetDeoptId(intptr_t index, intptr_t value) const {
intptr_t PcDescriptors::TokenPos(intptr_t index) const {
- ASSERT(DescriptorKind(index) != kDeoptIndex);
return *(EntryAddr(index, kTokenPosEntry));
}
@@ -6411,7 +6410,6 @@ void PcDescriptors::SetTokenPos(intptr_t index, intptr_t value) const {
intptr_t PcDescriptors::TryIndex(intptr_t index) const {
- ASSERT(DescriptorKind(index) != kDeoptIndex);
return *(EntryAddr(index, kTryIndexEntry));
}
@@ -6421,18 +6419,6 @@ void PcDescriptors::SetTryIndex(intptr_t index, intptr_t value) const {
}
-intptr_t PcDescriptors::DeoptIndex(intptr_t index) const {
- ASSERT(DescriptorKind(index) == kDeoptIndex);
- return *(EntryAddr(index, kDeoptIndexEntry));
-}
-
-
-intptr_t PcDescriptors::DeoptReason(intptr_t index) const {
- ASSERT(DescriptorKind(index) == kDeoptIndex);
- return *(EntryAddr(index, kDeoptReasonEntry));
-}
-
-
RawPcDescriptors* PcDescriptors::New(intptr_t num_descriptors) {
ASSERT(Object::pc_descriptors_class() != Class::null());
if (num_descriptors < 0 || num_descriptors > kMaxElements) {
@@ -6458,7 +6444,6 @@ const char* PcDescriptors::KindAsStr(intptr_t index) const {
switch (DescriptorKind(index)) {
case PcDescriptors::kDeoptBefore: return "deopt-before ";
case PcDescriptors::kDeoptAfter: return "deopt-after ";
- case PcDescriptors::kDeoptIndex: return "deopt-ix ";
case PcDescriptors::kPatchCode: return "patch ";
case PcDescriptors::kLazyDeoptJump: return "lazy-deopt ";
case PcDescriptors::kIcCall: return "ic-call ";
@@ -6476,7 +6461,7 @@ void PcDescriptors::PrintHeaderString() {
const int addr_width = (kBitsPerWord / 4) + 2;
// "*" in a printf format specifier tells it to read the field width from
// the printf argument list.
- OS::Print("%-*s\tkind \tdeopt-id\ttok-ix\ttry/deopt-ix\n",
+ OS::Print("%-*s\tkind \tdeopt-id\ttok-ix\ttry-ix\n",
addr_width, "pc");
}
@@ -6494,32 +6479,24 @@ const char* PcDescriptors::ToCString() const {
// First compute the buffer size required.
intptr_t len = 1; // Trailing '\0'.
for (intptr_t i = 0; i < Length(); i++) {
- intptr_t token_pos_or_deopt_reason = DescriptorKind(i) == kDeoptIndex ?
- DeoptReason(i) : TokenPos(i);
- intptr_t multi_purpose_index = DescriptorKind(i) == kDeoptIndex ?
- DeoptIndex(i) : TryIndex(i);
len += OS::SNPrint(NULL, 0, kFormat, addr_width,
- PC(i),
- KindAsStr(i),
- DeoptId(i),
- token_pos_or_deopt_reason,
- multi_purpose_index);
+ PC(i),
+ KindAsStr(i),
+ DeoptId(i),
+ TokenPos(i),
+ TryIndex(i));
}
// Allocate the buffer.
char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len);
// Layout the fields in the buffer.
intptr_t index = 0;
for (intptr_t i = 0; i < Length(); i++) {
- intptr_t token_pos_or_deopt_reason = DescriptorKind(i) == kDeoptIndex ?
- DeoptReason(i) : TokenPos(i);
- intptr_t multi_purpose_index = DescriptorKind(i) == kDeoptIndex ?
- DeoptIndex(i) : TryIndex(i);
index += OS::SNPrint((buffer + index), (len - index), kFormat, addr_width,
- PC(i),
- KindAsStr(i),
- DeoptId(i),
- token_pos_or_deopt_reason,
- multi_purpose_index);
+ PC(i),
+ KindAsStr(i),
+ DeoptId(i),
+ TokenPos(i),
+ TryIndex(i));
}
return buffer;
}

Powered by Google App Engine
This is Rietveld 408576698