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

Side by Side Diff: src/objects.h

Issue 1180943002: Reland of Replace SetObjectProperty / DefineObjectProperty with less powerful alternatives where re… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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.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 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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 1169
1170 MUST_USE_RESULT static MaybeHandle<Object> SetSuperProperty( 1170 MUST_USE_RESULT static MaybeHandle<Object> SetSuperProperty(
1171 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, 1171 LookupIterator* it, Handle<Object> value, LanguageMode language_mode,
1172 StoreFromKeyed store_mode); 1172 StoreFromKeyed store_mode);
1173 1173
1174 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty( 1174 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty(
1175 LookupIterator* it, Handle<Object> value, LanguageMode language_mode); 1175 LookupIterator* it, Handle<Object> value, LanguageMode language_mode);
1176 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty( 1176 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty(
1177 Isolate* isolate, Handle<Object> reciever, Handle<Object> name, 1177 Isolate* isolate, Handle<Object> reciever, Handle<Object> name,
1178 Handle<Object> value, LanguageMode language_mode); 1178 Handle<Object> value, LanguageMode language_mode);
1179 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyElement(
1180 Isolate* isolate, Handle<Object> receiver, uint32_t index,
1181 Handle<Object> value, LanguageMode language_mode);
1182 MUST_USE_RESULT static MaybeHandle<Object> RedefineNonconfigurableProperty( 1179 MUST_USE_RESULT static MaybeHandle<Object> RedefineNonconfigurableProperty(
1183 Isolate* isolate, Handle<Object> name, Handle<Object> value, 1180 Isolate* isolate, Handle<Object> name, Handle<Object> value,
1184 LanguageMode language_mode); 1181 LanguageMode language_mode);
1185 MUST_USE_RESULT static MaybeHandle<Object> SetDataProperty( 1182 MUST_USE_RESULT static MaybeHandle<Object> SetDataProperty(
1186 LookupIterator* it, Handle<Object> value); 1183 LookupIterator* it, Handle<Object> value);
1187 MUST_USE_RESULT static MaybeHandle<Object> AddDataProperty( 1184 MUST_USE_RESULT static MaybeHandle<Object> AddDataProperty(
1188 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, 1185 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
1189 LanguageMode language_mode, StoreFromKeyed store_mode); 1186 LanguageMode language_mode, StoreFromKeyed store_mode);
1190 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( 1187 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
1191 Handle<Object> object, Handle<Name> name); 1188 Handle<Object> object, Handle<Name> name);
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object, 1835 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object,
1839 uint32_t limit); 1836 uint32_t limit);
1840 1837
1841 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor( 1838 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithInterceptor(
1842 LookupIterator* it, Handle<Object> value); 1839 LookupIterator* it, Handle<Object> value);
1843 1840
1844 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to 1841 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to
1845 // grant an exemption to ExecutableAccessor callbacks in some cases. 1842 // grant an exemption to ExecutableAccessor callbacks in some cases.
1846 enum ExecutableAccessorInfoHandling { DEFAULT_HANDLING, DONT_FORCE_FIELD }; 1843 enum ExecutableAccessorInfoHandling { DEFAULT_HANDLING, DONT_FORCE_FIELD };
1847 1844
1845 // Calls SetOwn[Property|Element]IgnoreAttributes depending on whether name is
1846 // convertible to an index.
1847 MUST_USE_RESULT static inline MaybeHandle<Object> DefinePropertyOrElement(
1848 Handle<JSObject> object, Handle<Name> name, Handle<Object> value,
1849 PropertyAttributes attributes = NONE,
1850 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING);
1851
1848 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( 1852 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes(
1849 Handle<JSObject> object, Handle<Name> name, Handle<Object> value, 1853 Handle<JSObject> object, Handle<Name> name, Handle<Object> value,
1850 PropertyAttributes attributes, 1854 PropertyAttributes attributes,
1851 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); 1855 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING);
1852 1856
1853 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes( 1857 MUST_USE_RESULT static MaybeHandle<Object> SetOwnElementIgnoreAttributes(
1854 Handle<JSObject> object, uint32_t index, Handle<Object> value, 1858 Handle<JSObject> object, uint32_t index, Handle<Object> value,
1855 PropertyAttributes attributes, 1859 PropertyAttributes attributes,
1856 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); 1860 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING);
1857 1861
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after
4045 4049
4046 // Lookup support for serialized scope info. Returns the receiver context 4050 // Lookup support for serialized scope info. Returns the receiver context
4047 // slot index if scope has a "this" binding, and the binding is 4051 // slot index if scope has a "this" binding, and the binding is
4048 // context-allocated. Otherwise returns a value < 0. 4052 // context-allocated. Otherwise returns a value < 0.
4049 int ReceiverContextSlotIndex(); 4053 int ReceiverContextSlotIndex();
4050 4054
4051 bool block_scope_is_class_scope(); 4055 bool block_scope_is_class_scope();
4052 FunctionKind function_kind(); 4056 FunctionKind function_kind();
4053 4057
4054 // Copies all the context locals into an object used to materialize a scope. 4058 // Copies all the context locals into an object used to materialize a scope.
4055 static bool CopyContextLocalsToScopeObject(Handle<ScopeInfo> scope_info, 4059 static void CopyContextLocalsToScopeObject(Handle<ScopeInfo> scope_info,
4056 Handle<Context> context, 4060 Handle<Context> context,
4057 Handle<JSObject> scope_object); 4061 Handle<JSObject> scope_object);
4058 4062
4059 4063
4060 static Handle<ScopeInfo> Create(Isolate* isolate, Zone* zone, Scope* scope); 4064 static Handle<ScopeInfo> Create(Isolate* isolate, Zone* zone, Scope* scope);
4061 4065
4062 // Serializes empty scope info. 4066 // Serializes empty scope info.
4063 static ScopeInfo* Empty(Isolate* isolate); 4067 static ScopeInfo* Empty(Isolate* isolate);
4064 4068
4065 #ifdef DEBUG 4069 #ifdef DEBUG
(...skipping 6781 matching lines...) Expand 10 before | Expand all | Expand 10 after
10847 } else { 10851 } else {
10848 value &= ~(1 << bit_position); 10852 value &= ~(1 << bit_position);
10849 } 10853 }
10850 return value; 10854 return value;
10851 } 10855 }
10852 }; 10856 };
10853 10857
10854 } } // namespace v8::internal 10858 } } // namespace v8::internal
10855 10859
10856 #endif // V8_OBJECTS_H_ 10860 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/lookup.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698