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

Side by Side Diff: src/objects.h

Issue 1643563002: [runtime] further dismantle AccessorInfoHandling, reducing it to the single API usecase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/api.cc ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 uint32_t limit); 2058 uint32_t limit);
2059 // As PrepareElementsForSort, but only on objects where elements is 2059 // As PrepareElementsForSort, but only on objects where elements is
2060 // a dictionary, and it will stay a dictionary. Collates undefined and 2060 // a dictionary, and it will stay a dictionary. Collates undefined and
2061 // unexisting elements below limit from position zero of the elements. 2061 // unexisting elements below limit from position zero of the elements.
2062 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, 2062 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object,
2063 uint32_t limit); 2063 uint32_t limit);
2064 2064
2065 MUST_USE_RESULT static Maybe<bool> SetPropertyWithInterceptor( 2065 MUST_USE_RESULT static Maybe<bool> SetPropertyWithInterceptor(
2066 LookupIterator* it, ShouldThrow should_throw, Handle<Object> value); 2066 LookupIterator* it, ShouldThrow should_throw, Handle<Object> value);
2067 2067
2068 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to 2068 // The API currently still wants DefineOwnPropertyIgnoreAttributes to convert
2069 // grant an exemption to AccessorInfo callbacks in some cases. 2069 // AccessorInfo objects to data fields. We allow FORCE_FIELD as an exception
2070 enum AccessorInfoHandling { DEFAULT_HANDLING, DONT_FORCE_FIELD }; 2070 // to the default behavior that calls the setter.
2071 enum AccessorInfoHandling { FORCE_FIELD, DONT_FORCE_FIELD };
2071 2072
2072 MUST_USE_RESULT static MaybeHandle<Object> DefineOwnPropertyIgnoreAttributes( 2073 MUST_USE_RESULT static MaybeHandle<Object> DefineOwnPropertyIgnoreAttributes(
2073 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, 2074 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
2074 AccessorInfoHandling handling = DEFAULT_HANDLING); 2075 AccessorInfoHandling handling = DONT_FORCE_FIELD);
2075 2076
2076 MUST_USE_RESULT static Maybe<bool> DefineOwnPropertyIgnoreAttributes( 2077 MUST_USE_RESULT static Maybe<bool> DefineOwnPropertyIgnoreAttributes(
2077 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, 2078 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
2078 ShouldThrow should_throw, 2079 ShouldThrow should_throw,
2079 AccessorInfoHandling handling = DEFAULT_HANDLING); 2080 AccessorInfoHandling handling = DONT_FORCE_FIELD);
2080 2081
2081 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( 2082 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes(
2082 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, 2083 Handle<JSObject> object, Handle<Name> name, Handle<Object> value,
2083 PropertyAttributes attributes, 2084 PropertyAttributes attributes);
2084 AccessorInfoHandling handling = DEFAULT_HANDLING);
2085 2085
2086 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes( 2086 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes(
2087 Handle<JSObject> object, uint32_t index, Handle<Object> value, 2087 Handle<JSObject> object, uint32_t index, Handle<Object> value,
2088 PropertyAttributes attributes, 2088 PropertyAttributes attributes);
2089 AccessorInfoHandling handling = DEFAULT_HANDLING);
2090 2089
2091 // Equivalent to one of the above depending on whether |name| can be converted 2090 // Equivalent to one of the above depending on whether |name| can be converted
2092 // to an array index. 2091 // to an array index.
2093 MUST_USE_RESULT static MaybeHandle<Object> 2092 MUST_USE_RESULT static MaybeHandle<Object>
2094 DefinePropertyOrElementIgnoreAttributes( 2093 DefinePropertyOrElementIgnoreAttributes(Handle<JSObject> object,
2095 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, 2094 Handle<Name> name,
2096 PropertyAttributes attributes = NONE, 2095 Handle<Object> value,
2097 AccessorInfoHandling handling = DEFAULT_HANDLING); 2096 PropertyAttributes attributes = NONE);
2098 2097
2099 // Adds or reconfigures a property to attributes NONE. It will fail when it 2098 // Adds or reconfigures a property to attributes NONE. It will fail when it
2100 // cannot. 2099 // cannot.
2101 MUST_USE_RESULT static Maybe<bool> CreateDataProperty(LookupIterator* it, 2100 MUST_USE_RESULT static Maybe<bool> CreateDataProperty(LookupIterator* it,
2102 Handle<Object> value); 2101 Handle<Object> value);
2103 2102
2104 static void AddProperty(Handle<JSObject> object, Handle<Name> name, 2103 static void AddProperty(Handle<JSObject> object, Handle<Name> name,
2105 Handle<Object> value, PropertyAttributes attributes); 2104 Handle<Object> value, PropertyAttributes attributes);
2106 2105
2107 MUST_USE_RESULT static Maybe<bool> AddDataElement( 2106 MUST_USE_RESULT static Maybe<bool> AddDataElement(
(...skipping 8671 matching lines...) Expand 10 before | Expand all | Expand 10 after
10779 } 10778 }
10780 return value; 10779 return value;
10781 } 10780 }
10782 }; 10781 };
10783 10782
10784 10783
10785 } // NOLINT, false-positive due to second-order macros. 10784 } // NOLINT, false-positive due to second-order macros.
10786 } // NOLINT, false-positive due to second-order macros. 10785 } // NOLINT, false-positive due to second-order macros.
10787 10786
10788 #endif // V8_OBJECTS_H_ 10787 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698