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

Unified Diff: runtime/vm/compiler.cc

Issue 619903002: Generalize bounds checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 959dd0fd85b466dc575e7ee546f8e7145f1d403c..22273f1add59bf6f2043ebce65a55348aa53080f 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -712,17 +712,18 @@ static void DisassembleCode(const Function& function, bool optimized) {
OS::Print("DeoptInfo: {\n");
Smi& offset = Smi::Handle();
DeoptInfo& info = DeoptInfo::Handle();
- Smi& reason = Smi::Handle();
+ Smi& reason_and_flags = Smi::Handle();
for (intptr_t i = 0; i < deopt_table_length; ++i) {
- DeoptTable::GetEntry(deopt_table, i, &offset, &info, &reason);
- ASSERT((0 <= reason.Value()) &&
- (reason.Value() < ICData::kDeoptNumReasons));
+ DeoptTable::GetEntry(deopt_table, i, &offset, &info, &reason_and_flags);
+ const intptr_t reason =
+ DeoptTable::ReasonField::decode(reason_and_flags.Value());
+ ASSERT((0 <= reason) && (reason < ICData::kDeoptNumReasons));
OS::Print("%4" Pd ": 0x%" Px " %s (%s)\n",
i,
start + offset.Value(),
info.ToCString(),
DeoptReasonToCString(
- static_cast<ICData::DeoptReasonId>(reason.Value())));
+ static_cast<ICData::DeoptReasonId>(reason)));
}
OS::Print("}\n");
}

Powered by Google App Engine
This is Rietveld 408576698