OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 LanguageMode language_mode) { | 1188 LanguageMode language_mode) { |
1189 LookupIterator it(isolate, object, index); | 1189 LookupIterator it(isolate, object, index); |
1190 return GetProperty(&it, language_mode); | 1190 return GetProperty(&it, language_mode); |
1191 } | 1191 } |
1192 | 1192 |
1193 | 1193 |
1194 MaybeHandle<Object> Object::SetElement(Isolate* isolate, Handle<Object> object, | 1194 MaybeHandle<Object> Object::SetElement(Isolate* isolate, Handle<Object> object, |
1195 uint32_t index, Handle<Object> value, | 1195 uint32_t index, Handle<Object> value, |
1196 LanguageMode language_mode) { | 1196 LanguageMode language_mode) { |
1197 LookupIterator it(isolate, object, index); | 1197 LookupIterator it(isolate, object, index); |
1198 return SetProperty(&it, value, language_mode, MAY_BE_STORE_FROM_KEYED); | 1198 MAYBE_RETURN_NULL( |
| 1199 SetProperty(&it, value, language_mode, MAY_BE_STORE_FROM_KEYED)); |
| 1200 return value; |
1199 } | 1201 } |
1200 | 1202 |
1201 | 1203 |
1202 Handle<Object> Object::GetPrototype(Isolate* isolate, Handle<Object> obj) { | 1204 Handle<Object> Object::GetPrototype(Isolate* isolate, Handle<Object> obj) { |
1203 // We don't expect access checks to be needed on JSProxy objects. | 1205 // We don't expect access checks to be needed on JSProxy objects. |
1204 DCHECK(!obj->IsAccessCheckNeeded() || obj->IsJSObject()); | 1206 DCHECK(!obj->IsAccessCheckNeeded() || obj->IsJSObject()); |
1205 Handle<Context> context(isolate->context()); | 1207 Handle<Context> context(isolate->context()); |
1206 if (obj->IsAccessCheckNeeded() && | 1208 if (obj->IsAccessCheckNeeded() && |
1207 !isolate->MayAccess(context, Handle<JSObject>::cast(obj))) { | 1209 !isolate->MayAccess(context, Handle<JSObject>::cast(obj))) { |
1208 return isolate->factory()->null_value(); | 1210 return isolate->factory()->null_value(); |
(...skipping 6923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8132 #undef WRITE_INT64_FIELD | 8134 #undef WRITE_INT64_FIELD |
8133 #undef READ_BYTE_FIELD | 8135 #undef READ_BYTE_FIELD |
8134 #undef WRITE_BYTE_FIELD | 8136 #undef WRITE_BYTE_FIELD |
8135 #undef NOBARRIER_READ_BYTE_FIELD | 8137 #undef NOBARRIER_READ_BYTE_FIELD |
8136 #undef NOBARRIER_WRITE_BYTE_FIELD | 8138 #undef NOBARRIER_WRITE_BYTE_FIELD |
8137 | 8139 |
8138 } // namespace internal | 8140 } // namespace internal |
8139 } // namespace v8 | 8141 } // namespace v8 |
8140 | 8142 |
8141 #endif // V8_OBJECTS_INL_H_ | 8143 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |