| OLD | NEW |
| 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 10184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10195 | 10195 |
| 10196 inline bool all_can_read(); | 10196 inline bool all_can_read(); |
| 10197 inline void set_all_can_read(bool value); | 10197 inline void set_all_can_read(bool value); |
| 10198 | 10198 |
| 10199 inline bool all_can_write(); | 10199 inline bool all_can_write(); |
| 10200 inline void set_all_can_write(bool value); | 10200 inline void set_all_can_write(bool value); |
| 10201 | 10201 |
| 10202 inline bool is_special_data_property(); | 10202 inline bool is_special_data_property(); |
| 10203 inline void set_is_special_data_property(bool value); | 10203 inline void set_is_special_data_property(bool value); |
| 10204 | 10204 |
| 10205 inline bool is_sloppy(); |
| 10206 inline void set_is_sloppy(bool value); |
| 10207 |
| 10205 inline PropertyAttributes property_attributes(); | 10208 inline PropertyAttributes property_attributes(); |
| 10206 inline void set_property_attributes(PropertyAttributes attributes); | 10209 inline void set_property_attributes(PropertyAttributes attributes); |
| 10207 | 10210 |
| 10208 // Checks whether the given receiver is compatible with this accessor. | 10211 // Checks whether the given receiver is compatible with this accessor. |
| 10209 static bool IsCompatibleReceiverMap(Isolate* isolate, | 10212 static bool IsCompatibleReceiverMap(Isolate* isolate, |
| 10210 Handle<AccessorInfo> info, | 10213 Handle<AccessorInfo> info, |
| 10211 Handle<Map> map); | 10214 Handle<Map> map); |
| 10212 inline bool IsCompatibleReceiver(Object* receiver); | 10215 inline bool IsCompatibleReceiver(Object* receiver); |
| 10213 | 10216 |
| 10214 DECLARE_CAST(AccessorInfo) | 10217 DECLARE_CAST(AccessorInfo) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 10232 static const int kSize = kDataOffset + kPointerSize; | 10235 static const int kSize = kDataOffset + kPointerSize; |
| 10233 | 10236 |
| 10234 | 10237 |
| 10235 private: | 10238 private: |
| 10236 inline bool HasExpectedReceiverType(); | 10239 inline bool HasExpectedReceiverType(); |
| 10237 | 10240 |
| 10238 // Bit positions in flag. | 10241 // Bit positions in flag. |
| 10239 static const int kAllCanReadBit = 0; | 10242 static const int kAllCanReadBit = 0; |
| 10240 static const int kAllCanWriteBit = 1; | 10243 static const int kAllCanWriteBit = 1; |
| 10241 static const int kSpecialDataProperty = 2; | 10244 static const int kSpecialDataProperty = 2; |
| 10242 class AttributesField : public BitField<PropertyAttributes, 3, 3> {}; | 10245 static const int kIsSloppy = 3; |
| 10246 class AttributesField : public BitField<PropertyAttributes, 4, 3> {}; |
| 10243 | 10247 |
| 10244 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); | 10248 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); |
| 10245 }; | 10249 }; |
| 10246 | 10250 |
| 10247 | 10251 |
| 10248 // Support for JavaScript accessors: A pair of a getter and a setter. Each | 10252 // Support for JavaScript accessors: A pair of a getter and a setter. Each |
| 10249 // accessor can either be | 10253 // accessor can either be |
| 10250 // * a pointer to a JavaScript function or proxy: a real accessor | 10254 // * a pointer to a JavaScript function or proxy: a real accessor |
| 10251 // * undefined: considered an accessor by the spec, too, strangely enough | 10255 // * undefined: considered an accessor by the spec, too, strangely enough |
| 10252 // * the hole: an accessor which has not been set | 10256 // * the hole: an accessor which has not been set |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10723 } | 10727 } |
| 10724 return value; | 10728 return value; |
| 10725 } | 10729 } |
| 10726 }; | 10730 }; |
| 10727 | 10731 |
| 10728 | 10732 |
| 10729 } // NOLINT, false-positive due to second-order macros. | 10733 } // NOLINT, false-positive due to second-order macros. |
| 10730 } // NOLINT, false-positive due to second-order macros. | 10734 } // NOLINT, false-positive due to second-order macros. |
| 10731 | 10735 |
| 10732 #endif // V8_OBJECTS_H_ | 10736 #endif // V8_OBJECTS_H_ |
| OLD | NEW |