| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 4f2bd7a29ce27cd6cb8c16e41c1ecdbc120c0024..61247426495e9666410fb8fd2c4ba79131a8500b 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -2365,27 +2365,11 @@ void Struct::InitializeBody(int object_size) {
|
| }
|
|
|
|
|
| -bool Object::ToArrayLength(uint32_t* index) {
|
| - if (IsSmi()) {
|
| - int value = Smi::cast(this)->value();
|
| - if (value < 0) return false;
|
| - *index = value;
|
| - return true;
|
| - }
|
| - if (IsHeapNumber()) {
|
| - double value = HeapNumber::cast(this)->value();
|
| - uint32_t uint_value = static_cast<uint32_t>(value);
|
| - if (value == static_cast<double>(uint_value)) {
|
| - *index = uint_value;
|
| - return true;
|
| - }
|
| - }
|
| - return false;
|
| -}
|
| +bool Object::ToArrayLength(uint32_t* index) { return Object::ToUint32(index); }
|
|
|
|
|
| bool Object::ToArrayIndex(uint32_t* index) {
|
| - return ToArrayLength(index) && *index != kMaxUInt32;
|
| + return Object::ToUint32(index) && *index != kMaxUInt32;
|
| }
|
|
|
|
|
|
|