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

Unified Diff: src/objects-inl.h

Issue 504493002: Fix deoptimization address patching in Turbofan to use safepoints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Compilation fix. Created 6 years, 4 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
« no previous file with comments | « src/objects.cc ('k') | src/safepoint-table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index e2414d290046927d3d3f4a7e13d3b09e0311d5df..0ec6feb2805e887b6f52a2bd5c8e4ca26be76f03 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -717,19 +717,9 @@ bool Object::IsDeoptimizationInputData() const {
// the entry size.
int length = FixedArray::cast(this)->length();
if (length == 0) return true;
- if (length < DeoptimizationInputData::kFirstDeoptEntryIndex) return false;
-
- FixedArray* self = FixedArray::cast(const_cast<Object*>(this));
- int deopt_count =
- Smi::cast(self->get(DeoptimizationInputData::kDeoptEntryCountIndex))
- ->value();
- int patch_count =
- Smi::cast(
- self->get(
- DeoptimizationInputData::kReturnAddressPatchEntryCountIndex))
- ->value();
-
- return length == DeoptimizationInputData::LengthFor(deopt_count, patch_count);
+
+ length -= DeoptimizationInputData::kFirstDeoptEntryIndex;
+ return length >= 0 && length % DeoptimizationInputData::kDeoptEntrySize == 0;
}
« no previous file with comments | « src/objects.cc ('k') | src/safepoint-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698