| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index e14c1af6db83bbb880df0768ed2c5fe726cf0a23..5ef23c5789f121c957f98a5853450a98475ff716 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -731,10 +731,19 @@ bool Object::IsDeoptimizationInputData() const {
|
| // the entry size.
|
| int length = FixedArray::cast(this)->length();
|
| if (length == 0) return true;
|
| + if (length < DeoptimizationInputData::kFirstDeoptEntryIndex) return false;
|
|
|
| - length -= DeoptimizationInputData::kFirstDeoptEntryIndex;
|
| - return length >= 0 &&
|
| - length % DeoptimizationInputData::kDeoptEntrySize == 0;
|
| + 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);
|
| }
|
|
|
|
|
| @@ -1082,6 +1091,12 @@ bool Object::IsNaN() const {
|
| }
|
|
|
|
|
| +bool Object::IsMinusZero() const {
|
| + return this->IsHeapNumber() &&
|
| + i::IsMinusZero(HeapNumber::cast(this)->value());
|
| +}
|
| +
|
| +
|
| MaybeHandle<Smi> Object::ToSmi(Isolate* isolate, Handle<Object> object) {
|
| if (object->IsSmi()) return Handle<Smi>::cast(object);
|
| if (object->IsHeapNumber()) {
|
| @@ -4703,6 +4718,21 @@ inline void Code::set_is_crankshafted(bool value) {
|
| }
|
|
|
|
|
| +inline bool Code::is_turbofanned() {
|
| + ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
|
| + return IsTurbofannedField::decode(
|
| + READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
|
| +}
|
| +
|
| +
|
| +inline void Code::set_is_turbofanned(bool value) {
|
| + ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
|
| + int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
|
| + int updated = IsTurbofannedField::update(previous, value);
|
| + WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
|
| +}
|
| +
|
| +
|
| bool Code::optimizable() {
|
| ASSERT_EQ(FUNCTION, kind());
|
| return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
|
|
|