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; |
} |