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

Side by Side Diff: src/objects.h

Issue 1157093003: Handle Delete of element with LookupIterator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase, fix all strong-mode handling Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/lookup.h ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 Handle<Name> name); 1651 Handle<Name> name);
1652 MUST_USE_RESULT static inline Maybe<bool> HasElement( 1652 MUST_USE_RESULT static inline Maybe<bool> HasElement(
1653 Handle<JSReceiver> object, uint32_t index); 1653 Handle<JSReceiver> object, uint32_t index);
1654 MUST_USE_RESULT static inline Maybe<bool> HasOwnElement( 1654 MUST_USE_RESULT static inline Maybe<bool> HasOwnElement(
1655 Handle<JSReceiver> object, uint32_t index); 1655 Handle<JSReceiver> object, uint32_t index);
1656 1656
1657 // Implementation of [[Delete]], ECMA-262 5th edition, section 8.12.7. 1657 // Implementation of [[Delete]], ECMA-262 5th edition, section 8.12.7.
1658 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty( 1658 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty(
1659 Handle<JSReceiver> object, Handle<Name> name, 1659 Handle<JSReceiver> object, Handle<Name> name,
1660 LanguageMode language_mode = SLOPPY); 1660 LanguageMode language_mode = SLOPPY);
1661 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty(
1662 LookupIterator* it, LanguageMode language_mode);
1661 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement( 1663 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement(
1662 Handle<JSReceiver> object, uint32_t index, 1664 Handle<JSReceiver> object, uint32_t index,
1663 LanguageMode language_mode = SLOPPY); 1665 LanguageMode language_mode = SLOPPY);
1664 1666
1665 // Tests for the fast common case for property enumeration. 1667 // Tests for the fast common case for property enumeration.
1666 bool IsSimpleEnum(); 1668 bool IsSimpleEnum();
1667 1669
1668 // Returns the class name ([[Class]] property in the specification). 1670 // Returns the class name ([[Class]] property in the specification).
1669 String* class_name(); 1671 String* class_name();
1670 1672
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
2318 2320
2319 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithFailedAccessCheck( 2321 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithFailedAccessCheck(
2320 LookupIterator* it, Handle<Object> value, LanguageMode language_mode); 2322 LookupIterator* it, Handle<Object> value, LanguageMode language_mode);
2321 2323
2322 // Add a property to a slow-case object. 2324 // Add a property to a slow-case object.
2323 static void AddSlowProperty(Handle<JSObject> object, 2325 static void AddSlowProperty(Handle<JSObject> object,
2324 Handle<Name> name, 2326 Handle<Name> name,
2325 Handle<Object> value, 2327 Handle<Object> value,
2326 PropertyAttributes attributes); 2328 PropertyAttributes attributes);
2327 2329
2328 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty(
2329 Handle<JSObject> object, Handle<Name> name, LanguageMode language_mode);
2330 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithInterceptor( 2330 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithInterceptor(
2331 Handle<JSObject> holder, Handle<JSObject> receiver, Handle<Name> name); 2331 LookupIterator* it);
2332 2332
2333 // Deletes an existing named property in a normalized object. 2333 // Deletes an existing named property in a normalized object.
2334 static void DeleteNormalizedProperty(Handle<JSObject> object, 2334 static void DeleteNormalizedProperty(Handle<JSObject> object,
2335 Handle<Name> name); 2335 Handle<Name> name);
2336 2336
2337 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement(
2338 Handle<JSObject> object, uint32_t index, LanguageMode language_mode);
2339 MUST_USE_RESULT static MaybeHandle<Object> DeleteElementWithInterceptor(
2340 Handle<JSObject> object,
2341 uint32_t index);
2342
2343 bool ReferencesObjectFromElements(FixedArray* elements, 2337 bool ReferencesObjectFromElements(FixedArray* elements,
2344 ElementsKind kind, 2338 ElementsKind kind,
2345 Object* object); 2339 Object* object);
2346 2340
2347 // Returns true if most of the elements backing storage is used. 2341 // Returns true if most of the elements backing storage is used.
2348 bool HasDenseElements(); 2342 bool HasDenseElements();
2349 2343
2350 // Gets the current elements capacity and the number of used elements. 2344 // Gets the current elements capacity and the number of used elements.
2351 void GetElementsCapacityAndUsage(int* capacity, int* used); 2345 void GetElementsCapacityAndUsage(int* capacity, int* used);
2352 2346
(...skipping 7629 matching lines...) Expand 10 before | Expand all | Expand 10 after
9982 9976
9983 private: 9977 private:
9984 friend class JSReceiver; 9978 friend class JSReceiver;
9985 9979
9986 MUST_USE_RESULT static inline MaybeHandle<Object> SetElementWithHandler( 9980 MUST_USE_RESULT static inline MaybeHandle<Object> SetElementWithHandler(
9987 Handle<JSProxy> proxy, Handle<JSReceiver> receiver, uint32_t index, 9981 Handle<JSProxy> proxy, Handle<JSReceiver> receiver, uint32_t index,
9988 Handle<Object> value, LanguageMode language_mode); 9982 Handle<Object> value, LanguageMode language_mode);
9989 9983
9990 MUST_USE_RESULT static Maybe<bool> HasPropertyWithHandler( 9984 MUST_USE_RESULT static Maybe<bool> HasPropertyWithHandler(
9991 Handle<JSProxy> proxy, Handle<Name> name); 9985 Handle<JSProxy> proxy, Handle<Name> name);
9992 MUST_USE_RESULT static inline Maybe<bool> HasElementWithHandler(
9993 Handle<JSProxy> proxy, uint32_t index);
9994 9986
9995 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithHandler( 9987 MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithHandler(
9996 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode); 9988 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode);
9997 MUST_USE_RESULT static MaybeHandle<Object> DeleteElementWithHandler(
9998 Handle<JSProxy> proxy, uint32_t index, LanguageMode language_mode);
9999 9989
10000 MUST_USE_RESULT Object* GetIdentityHash(); 9990 MUST_USE_RESULT Object* GetIdentityHash();
10001 9991
10002 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy); 9992 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy);
10003 9993
10004 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy); 9994 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy);
10005 }; 9995 };
10006 9996
10007 9997
10008 class JSFunctionProxy: public JSProxy { 9998 class JSFunctionProxy: public JSProxy {
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
11109 } else { 11099 } else {
11110 value &= ~(1 << bit_position); 11100 value &= ~(1 << bit_position);
11111 } 11101 }
11112 return value; 11102 return value;
11113 } 11103 }
11114 }; 11104 };
11115 11105
11116 } } // namespace v8::internal 11106 } } // namespace v8::internal
11117 11107
11118 #endif // V8_OBJECTS_H_ 11108 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/lookup.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698