OLD | NEW |
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_PROPERTY_DETAILS_H_ | 5 #ifndef V8_PROPERTY_DETAILS_H_ |
6 #define V8_PROPERTY_DETAILS_H_ | 6 #define V8_PROPERTY_DETAILS_H_ |
7 | 7 |
8 #include "include/v8.h" | 8 #include "include/v8.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/utils.h" | 10 #include "src/utils.h" |
11 | 11 |
12 // Ecma-262 3rd 8.6.1 | 12 // Ecma-262 3rd 8.6.1 |
13 enum PropertyAttributes { | 13 enum PropertyAttributes { |
14 NONE = v8::None, | 14 NONE = v8::None, |
15 READ_ONLY = v8::ReadOnly, | 15 READ_ONLY = v8::ReadOnly, |
16 DONT_ENUM = v8::DontEnum, | 16 DONT_ENUM = v8::DontEnum, |
17 DONT_DELETE = v8::DontDelete, | 17 DONT_DELETE = v8::DontDelete, |
18 | 18 |
19 SEALED = DONT_DELETE, | 19 SEALED = DONT_DELETE, |
20 FROZEN = SEALED | READ_ONLY, | 20 FROZEN = SEALED | READ_ONLY, |
21 | 21 |
22 STRING = 8, // Used to filter symbols and string names | 22 STRING = 8, // Used to filter symbols and string names |
23 SYMBOLIC = 16, | 23 SYMBOLIC = 16, |
24 PRIVATE_SYMBOL = 32, | 24 PRIVATE_SYMBOL = 32, |
25 | 25 |
26 DONT_SHOW = DONT_ENUM | SYMBOLIC | PRIVATE_SYMBOL, | 26 DONT_SHOW = DONT_ENUM | SYMBOLIC | PRIVATE_SYMBOL, |
27 ABSENT = 64 // Used in runtime to indicate a property is absent. | 27 ABSENT = 64, // Used in runtime to indicate a property is absent. |
28 // ABSENT can never be stored in or returned from a descriptor's attributes | 28 // ABSENT can never be stored in or returned from a descriptor's attributes |
29 // bitfield. It is only used as a return value meaning the attributes of | 29 // bitfield. It is only used as a return value meaning the attributes of |
30 // a non-existent property. | 30 // a non-existent property. |
| 31 |
| 32 // When creating a property, EVAL_DECLARED used to indicate that the property |
| 33 // came from a sloppy-mode direct eval, and certain checks need to be done. |
| 34 // Cannot be stored in or returned from a descriptor's attributes bitfield. |
| 35 EVAL_DECLARED = 128 |
31 }; | 36 }; |
32 | 37 |
33 | 38 |
34 namespace v8 { | 39 namespace v8 { |
35 namespace internal { | 40 namespace internal { |
36 | 41 |
37 class Smi; | 42 class Smi; |
38 template<class> class TypeImpl; | 43 template<class> class TypeImpl; |
39 struct ZoneTypeConfig; | 44 struct ZoneTypeConfig; |
40 typedef TypeImpl<ZoneTypeConfig> Type; | 45 typedef TypeImpl<ZoneTypeConfig> Type; |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 uint32_t value_; | 372 uint32_t value_; |
368 }; | 373 }; |
369 | 374 |
370 | 375 |
371 std::ostream& operator<<(std::ostream& os, | 376 std::ostream& operator<<(std::ostream& os, |
372 const PropertyAttributes& attributes); | 377 const PropertyAttributes& attributes); |
373 std::ostream& operator<<(std::ostream& os, const PropertyDetails& details); | 378 std::ostream& operator<<(std::ostream& os, const PropertyDetails& details); |
374 } } // namespace v8::internal | 379 } } // namespace v8::internal |
375 | 380 |
376 #endif // V8_PROPERTY_DETAILS_H_ | 381 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |