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

Side by Side Diff: src/objects.h

Issue 1775973002: Add GetProperty/GetElement to JSReceiver and use it where possible (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/log.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/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 MUST_USE_RESULT static Maybe<bool> SetDataProperty(LookupIterator* it, 1257 MUST_USE_RESULT static Maybe<bool> SetDataProperty(LookupIterator* it,
1258 Handle<Object> value); 1258 Handle<Object> value);
1259 MUST_USE_RESULT static Maybe<bool> AddDataProperty( 1259 MUST_USE_RESULT static Maybe<bool> AddDataProperty(
1260 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, 1260 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
1261 ShouldThrow should_throw, StoreFromKeyed store_mode); 1261 ShouldThrow should_throw, StoreFromKeyed store_mode);
1262 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( 1262 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
1263 Handle<Object> object, Handle<Name> name); 1263 Handle<Object> object, Handle<Name> name);
1264 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( 1264 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
1265 Handle<Object> receiver, Handle<Name> name, Handle<JSReceiver> holder); 1265 Handle<Object> receiver, Handle<Name> name, Handle<JSReceiver> holder);
1266 MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty( 1266 MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
1267 Isolate* isolate, Handle<Object> object, const char* key);
1268 MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
1269 Handle<Object> object, Handle<Name> name); 1267 Handle<Object> object, Handle<Name> name);
1270 1268
1271 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithAccessor( 1269 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithAccessor(
1272 LookupIterator* it); 1270 LookupIterator* it);
1273 MUST_USE_RESULT static Maybe<bool> SetPropertyWithAccessor( 1271 MUST_USE_RESULT static Maybe<bool> SetPropertyWithAccessor(
1274 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw); 1272 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw);
1275 1273
1276 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithDefinedGetter( 1274 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithDefinedGetter(
1277 Handle<Object> receiver, 1275 Handle<Object> receiver,
1278 Handle<JSReceiver> getter); 1276 Handle<JSReceiver> getter);
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 // Implementation of [[HasProperty]], ECMA-262 5th edition, section 8.12.6. 1809 // Implementation of [[HasProperty]], ECMA-262 5th edition, section 8.12.6.
1812 MUST_USE_RESULT static Maybe<bool> HasProperty(LookupIterator* it); 1810 MUST_USE_RESULT static Maybe<bool> HasProperty(LookupIterator* it);
1813 MUST_USE_RESULT static inline Maybe<bool> HasProperty( 1811 MUST_USE_RESULT static inline Maybe<bool> HasProperty(
1814 Handle<JSReceiver> object, Handle<Name> name); 1812 Handle<JSReceiver> object, Handle<Name> name);
1815 MUST_USE_RESULT static inline Maybe<bool> HasElement( 1813 MUST_USE_RESULT static inline Maybe<bool> HasElement(
1816 Handle<JSReceiver> object, uint32_t index); 1814 Handle<JSReceiver> object, uint32_t index);
1817 1815
1818 MUST_USE_RESULT static inline Maybe<bool> HasOwnProperty( 1816 MUST_USE_RESULT static inline Maybe<bool> HasOwnProperty(
1819 Handle<JSReceiver> object, Handle<Name> name); 1817 Handle<JSReceiver> object, Handle<Name> name);
1820 1818
1819 MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
1820 Isolate* isolate, Handle<JSReceiver> receiver, const char* key);
1821 MUST_USE_RESULT static inline MaybeHandle<Object> GetProperty(
1822 Handle<JSReceiver> receiver, Handle<Name> name);
1823 MUST_USE_RESULT static inline MaybeHandle<Object> GetElement(
1824 Isolate* isolate, Handle<JSReceiver> receiver, uint32_t index);
1825
1821 // Implementation of ES6 [[Delete]] 1826 // Implementation of ES6 [[Delete]]
1822 MUST_USE_RESULT static Maybe<bool> DeletePropertyOrElement( 1827 MUST_USE_RESULT static Maybe<bool> DeletePropertyOrElement(
1823 Handle<JSReceiver> object, Handle<Name> name, 1828 Handle<JSReceiver> object, Handle<Name> name,
1824 LanguageMode language_mode = SLOPPY); 1829 LanguageMode language_mode = SLOPPY);
1825 MUST_USE_RESULT static Maybe<bool> DeleteProperty( 1830 MUST_USE_RESULT static Maybe<bool> DeleteProperty(
1826 Handle<JSReceiver> object, Handle<Name> name, 1831 Handle<JSReceiver> object, Handle<Name> name,
1827 LanguageMode language_mode = SLOPPY); 1832 LanguageMode language_mode = SLOPPY);
1828 MUST_USE_RESULT static Maybe<bool> DeleteProperty(LookupIterator* it, 1833 MUST_USE_RESULT static Maybe<bool> DeleteProperty(LookupIterator* it,
1829 LanguageMode language_mode); 1834 LanguageMode language_mode);
1830 MUST_USE_RESULT static Maybe<bool> DeleteElement( 1835 MUST_USE_RESULT static Maybe<bool> DeleteElement(
(...skipping 9042 matching lines...) Expand 10 before | Expand all | Expand 10 after
10873 } 10878 }
10874 return value; 10879 return value;
10875 } 10880 }
10876 }; 10881 };
10877 10882
10878 10883
10879 } // NOLINT, false-positive due to second-order macros. 10884 } // NOLINT, false-positive due to second-order macros.
10880 } // NOLINT, false-positive due to second-order macros. 10885 } // NOLINT, false-positive due to second-order macros.
10881 10886
10882 #endif // V8_OBJECTS_H_ 10887 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698