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

Side by Side Diff: src/objects.h

Issue 2449783006: Add a native data property that replaces itself with a real data property (Closed)
Patch Set: Created 4 years, 1 month 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
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 #include <memory> 9 #include <memory>
10 10
(...skipping 11200 matching lines...) Expand 10 before | Expand all | Expand 10 after
11211 11211
11212 inline bool all_can_read(); 11212 inline bool all_can_read();
11213 inline void set_all_can_read(bool value); 11213 inline void set_all_can_read(bool value);
11214 11214
11215 inline bool all_can_write(); 11215 inline bool all_can_write();
11216 inline void set_all_can_write(bool value); 11216 inline void set_all_can_write(bool value);
11217 11217
11218 inline bool is_special_data_property(); 11218 inline bool is_special_data_property();
11219 inline void set_is_special_data_property(bool value); 11219 inline void set_is_special_data_property(bool value);
11220 11220
11221 inline bool replace_on_access();
11222 inline void set_replace_on_access(bool value);
11223
11221 inline bool is_sloppy(); 11224 inline bool is_sloppy();
11222 inline void set_is_sloppy(bool value); 11225 inline void set_is_sloppy(bool value);
11223 11226
11224 inline PropertyAttributes property_attributes(); 11227 inline PropertyAttributes property_attributes();
11225 inline void set_property_attributes(PropertyAttributes attributes); 11228 inline void set_property_attributes(PropertyAttributes attributes);
11226 11229
11227 // Checks whether the given receiver is compatible with this accessor. 11230 // Checks whether the given receiver is compatible with this accessor.
11228 static bool IsCompatibleReceiverMap(Isolate* isolate, 11231 static bool IsCompatibleReceiverMap(Isolate* isolate,
11229 Handle<AccessorInfo> info, 11232 Handle<AccessorInfo> info,
11230 Handle<Map> map); 11233 Handle<Map> map);
(...skipping 21 matching lines...) Expand all
11252 11255
11253 11256
11254 private: 11257 private:
11255 inline bool HasExpectedReceiverType(); 11258 inline bool HasExpectedReceiverType();
11256 11259
11257 // Bit positions in flag. 11260 // Bit positions in flag.
11258 static const int kAllCanReadBit = 0; 11261 static const int kAllCanReadBit = 0;
11259 static const int kAllCanWriteBit = 1; 11262 static const int kAllCanWriteBit = 1;
11260 static const int kSpecialDataProperty = 2; 11263 static const int kSpecialDataProperty = 2;
11261 static const int kIsSloppy = 3; 11264 static const int kIsSloppy = 3;
11262 class AttributesField : public BitField<PropertyAttributes, 4, 3> {}; 11265 static const int kReplaceOnAccess = 4;
11266 class AttributesField : public BitField<PropertyAttributes, 5, 3> {};
11263 11267
11264 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); 11268 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo);
11265 }; 11269 };
11266 11270
11267 11271
11268 // Support for JavaScript accessors: A pair of a getter and a setter. Each 11272 // Support for JavaScript accessors: A pair of a getter and a setter. Each
11269 // accessor can either be 11273 // accessor can either be
11270 // * a pointer to a JavaScript function or proxy: a real accessor 11274 // * a pointer to a JavaScript function or proxy: a real accessor
11271 // * undefined: considered an accessor by the spec, too, strangely enough 11275 // * undefined: considered an accessor by the spec, too, strangely enough
11272 // * the hole: an accessor which has not been set 11276 // * the hole: an accessor which has not been set
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
11761 } 11765 }
11762 return value; 11766 return value;
11763 } 11767 }
11764 }; 11768 };
11765 11769
11766 11770
11767 } // NOLINT, false-positive due to second-order macros. 11771 } // NOLINT, false-positive due to second-order macros.
11768 } // NOLINT, false-positive due to second-order macros. 11772 } // NOLINT, false-positive due to second-order macros.
11769 11773
11770 #endif // V8_OBJECTS_H_ 11774 #endif // V8_OBJECTS_H_
OLDNEW
« src/accessors.cc ('K') | « src/api.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698