| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index e1df2b662ddc83e9d4c1a661dec9cbab8f9bf626..642e6c3c4cb45b13ff70ce65979f68366a9b0a65 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -2308,12 +2308,24 @@ Handle<Object> FixedArray::get(FixedArray* array, int index, Isolate* isolate) {
|
| return handle(array->get(index), isolate);
|
| }
|
|
|
| +template <class T>
|
| +MaybeHandle<T> FixedArray::GetValue(int index) const {
|
| + Object* obj = get(index);
|
| + if (obj->IsUndefined(GetIsolate())) return MaybeHandle<T>();
|
| + return Handle<T>(T::cast(obj));
|
| +}
|
| +
|
| +template <class T>
|
| +Handle<T> FixedArray::GetValueChecked(int index) const {
|
| + Object* obj = get(index);
|
| + CHECK(!obj->IsUndefined(GetIsolate()));
|
| + return Handle<T>(T::cast(obj));
|
| +}
|
|
|
| bool FixedArray::is_the_hole(int index) {
|
| return get(index) == GetHeap()->the_hole_value();
|
| }
|
|
|
| -
|
| void FixedArray::set(int index, Smi* value) {
|
| DCHECK(map() != GetHeap()->fixed_cow_array_map());
|
| DCHECK(index >= 0 && index < this->length());
|
| @@ -3961,6 +3973,9 @@ byte ByteArray::get(int index) {
|
| return READ_BYTE_FIELD(this, kHeaderSize + index * kCharSize);
|
| }
|
|
|
| +const byte* ByteArray::data() const {
|
| + return reinterpret_cast<const byte*>(FIELD_ADDR_CONST(this, kHeaderSize));
|
| +}
|
|
|
| void ByteArray::set(int index, byte value) {
|
| DCHECK(index >= 0 && index < this->length());
|
|
|