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

Unified Diff: src/objects.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/objects.h
diff --git a/src/objects.h b/src/objects.h
index 5d0cc044ae78a37869834c4c1f8e5b47ab06c3ec..347b277512dc644e034c6dcd59837e04deb5e2f2 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1206,12 +1206,6 @@ class Object {
Handle<Object> object,
uint32_t index);
- MUST_USE_RESULT static MaybeHandle<Object> GetElementWithReceiver(
- Isolate* isolate,
- Handle<Object> object,
- Handle<Object> receiver,
- uint32_t index);
-
MUST_USE_RESULT static MaybeHandle<Object> SetElementWithReceiver(
Isolate* isolate, Handle<Object> object, Handle<Object> receiver,
uint32_t index, Handle<Object> value, LanguageMode language_mode);
@@ -1239,8 +1233,13 @@ class Object {
// by ES6 Map and Set.
bool SameValueZero(Object* other);
- // Tries to convert an object to an array index. Returns true and sets
- // the output parameter if it succeeds.
+ // Tries to convert an object to an array length. Returns true and sets the
+ // output parameter if it succeeds.
+ inline bool ToArrayLength(uint32_t* index);
+
+ // Tries to convert an object to an array index. Returns true and sets the
+ // output parameter if it succeeds. Equivalent to ToArrayLength, but does not
+ // allow kMaxUInt32.
inline bool ToArrayIndex(uint32_t* index);
// Returns true if this is a JSValue containing a string and the index is
@@ -1987,12 +1986,6 @@ class JSObject: public JSReceiver {
PropertyAttributes attributes, LanguageMode language_mode,
bool check_prototype = true, SetPropertyMode set_mode = SET_PROPERTY);
- // Returns the index'th element.
- // The undefined object if index is out of bounds.
- MUST_USE_RESULT static MaybeHandle<Object> GetElementWithInterceptor(
- Handle<JSObject> object, Handle<Object> receiver, uint32_t index,
- bool check_prototype);
-
enum SetFastElementsCapacitySmiMode {
kAllowSmiElements,
kForceSmiElements,
@@ -2288,13 +2281,6 @@ class JSObject: public JSReceiver {
MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck(
LookupIterator* it);
- MUST_USE_RESULT static MaybeHandle<Object> GetElementWithCallback(
- Handle<JSObject> object,
- Handle<Object> receiver,
- Handle<Object> structure,
- uint32_t index,
- Handle<Object> holder);
-
MUST_USE_RESULT static Maybe<PropertyAttributes>
GetElementAttributeWithInterceptor(Handle<JSObject> object,
Handle<JSReceiver> receiver,
@@ -2343,9 +2329,6 @@ class JSObject: public JSReceiver {
MUST_USE_RESULT static MaybeHandle<Object> SetFastDoubleElement(
Handle<JSObject> object, uint32_t index, Handle<Object> value,
LanguageMode language_mode, bool check_prototype = true);
- MUST_USE_RESULT static MaybeHandle<Object> GetElementWithFailedAccessCheck(
- Isolate* isolate, Handle<JSObject> object, Handle<Object> receiver,
- uint32_t index);
MUST_USE_RESULT static Maybe<PropertyAttributes>
GetElementAttributesWithFailedAccessCheck(Isolate* isolate,
Handle<JSObject> object,
@@ -9965,10 +9948,6 @@ class JSProxy: public JSReceiver {
Handle<JSProxy> proxy,
Handle<Object> receiver,
Handle<Name> name);
- MUST_USE_RESULT static inline MaybeHandle<Object> GetElementWithHandler(
- Handle<JSProxy> proxy,
- Handle<Object> receiver,
- uint32_t index);
// If the handler defines an accessor property with a setter, invoke it.
// If it defines an accessor property without a setter, or a data property
@@ -10362,6 +10341,7 @@ class JSTypedArray: public JSArrayBufferView {
public:
// [length]: length of typed array in elements.
DECL_ACCESSORS(length, Object)
+ inline uint32_t length_value() const;
DECLARE_CAST(JSTypedArray)

Powered by Google App Engine
This is Rietveld 408576698