Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4347)

Unified Diff: src/elements.h

Issue 1159433003: Use GetProperty for getting elements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/elements.h
diff --git a/src/elements.h b/src/elements.h
index f4d15fc828b751ab8f4c488e85f1586d4c001fa6..081072622b2f9467a948d6967f00a271d78d334f 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -48,16 +48,12 @@ class ElementsAccessor {
// can optionally pass in the backing store to use for the check, which must
// be compatible with the ElementsKind of the ElementsAccessor. If
// backing_store is NULL, the holder->elements() is used as the backing store.
- MUST_USE_RESULT virtual MaybeHandle<Object> Get(
- Handle<Object> receiver,
- Handle<JSObject> holder,
- uint32_t key,
- Handle<FixedArrayBase> backing_store) = 0;
+ virtual Handle<Object> Get(Handle<Object> receiver, Handle<JSObject> holder,
+ uint32_t key,
+ Handle<FixedArrayBase> backing_store) = 0;
- MUST_USE_RESULT inline MaybeHandle<Object> Get(
- Handle<Object> receiver,
- Handle<JSObject> holder,
- uint32_t key) {
+ inline Handle<Object> Get(Handle<Object> receiver, Handle<JSObject> holder,
+ uint32_t key) {
return Get(receiver, holder, key, handle(holder->elements()));
}
@@ -66,15 +62,12 @@ class ElementsAccessor {
// can optionally pass in the backing store to use for the check, which must
// be compatible with the ElementsKind of the ElementsAccessor. If
// backing_store is NULL, the holder->elements() is used as the backing store.
- MUST_USE_RESULT virtual PropertyAttributes GetAttributes(
- Handle<JSObject> holder,
- uint32_t key,
- Handle<FixedArrayBase> backing_store) = 0;
+ virtual PropertyAttributes GetAttributes(JSObject* holder, uint32_t key,
+ FixedArrayBase* backing_store) = 0;
- MUST_USE_RESULT inline PropertyAttributes GetAttributes(
- Handle<JSObject> holder,
- uint32_t key) {
- return GetAttributes(holder, key, handle(holder->elements()));
+ inline PropertyAttributes GetAttributes(Handle<JSObject> holder,
+ uint32_t key) {
+ return GetAttributes(*holder, key, holder->elements());
}
// Returns an element's accessors, or NULL if the element does not exist or
@@ -82,14 +75,12 @@ class ElementsAccessor {
// can optionally pass in the backing store to use for the check, which must
// be compatible with the ElementsKind of the ElementsAccessor. If
// backing_store is NULL, the holder->elements() is used as the backing store.
- MUST_USE_RESULT virtual MaybeHandle<AccessorPair> GetAccessorPair(
- Handle<JSObject> holder,
- uint32_t key,
+ virtual MaybeHandle<AccessorPair> GetAccessorPair(
+ Handle<JSObject> holder, uint32_t key,
Handle<FixedArrayBase> backing_store) = 0;
- MUST_USE_RESULT inline MaybeHandle<AccessorPair> GetAccessorPair(
- Handle<JSObject> holder,
- uint32_t key) {
+ inline MaybeHandle<AccessorPair> GetAccessorPair(Handle<JSObject> holder,
Igor Sheludko 2015/05/26 17:11:56 nit: MUST_USE_RESULT ?
Toon Verwaest 2015/05/27 10:06:24 The MaybeHandle here means that there might not be
+ uint32_t key) {
return GetAccessorPair(holder, key, handle(holder->elements()));
}
@@ -158,7 +149,7 @@ class ElementsAccessor {
*from_holder, 0, from_kind, to, 0, kCopyToEndAndInitializeToHole);
}
- MUST_USE_RESULT virtual MaybeHandle<FixedArray> AddElementsToFixedArray(
+ virtual Handle<FixedArray> AddElementsToFixedArray(
Handle<JSObject> receiver, Handle<FixedArray> to,
FixedArray::KeyFilter filter) = 0;
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/elements.cc » ('j') | src/elements.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698