| 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_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 8394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8405 public: | 8405 public: |
| 8406 // [name]: The print name of a symbol, or undefined if none. | 8406 // [name]: The print name of a symbol, or undefined if none. |
| 8407 DECL_ACCESSORS(name, Object) | 8407 DECL_ACCESSORS(name, Object) |
| 8408 | 8408 |
| 8409 DECL_INT_ACCESSORS(flags) | 8409 DECL_INT_ACCESSORS(flags) |
| 8410 | 8410 |
| 8411 // [is_private]: Whether this is a private symbol. Private symbols can only | 8411 // [is_private]: Whether this is a private symbol. Private symbols can only |
| 8412 // be used to designate own properties of objects. | 8412 // be used to designate own properties of objects. |
| 8413 DECL_BOOLEAN_ACCESSORS(is_private) | 8413 DECL_BOOLEAN_ACCESSORS(is_private) |
| 8414 | 8414 |
| 8415 // [is_well_known_symbol]: Whether this is a spec-defined well-known symbol, |
| 8416 // or not. Well-known symbols do not throw when an access check fails during |
| 8417 // a load. |
| 8418 DECL_BOOLEAN_ACCESSORS(is_well_known_symbol) |
| 8419 |
| 8415 DECLARE_CAST(Symbol) | 8420 DECLARE_CAST(Symbol) |
| 8416 | 8421 |
| 8417 // Dispatched behavior. | 8422 // Dispatched behavior. |
| 8418 DECLARE_PRINTER(Symbol) | 8423 DECLARE_PRINTER(Symbol) |
| 8419 DECLARE_VERIFIER(Symbol) | 8424 DECLARE_VERIFIER(Symbol) |
| 8420 | 8425 |
| 8421 // Layout description. | 8426 // Layout description. |
| 8422 static const int kNameOffset = Name::kSize; | 8427 static const int kNameOffset = Name::kSize; |
| 8423 static const int kFlagsOffset = kNameOffset + kPointerSize; | 8428 static const int kFlagsOffset = kNameOffset + kPointerSize; |
| 8424 static const int kSize = kFlagsOffset + kPointerSize; | 8429 static const int kSize = kFlagsOffset + kPointerSize; |
| 8425 | 8430 |
| 8426 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; | 8431 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; |
| 8427 | 8432 |
| 8428 void SymbolShortPrint(std::ostream& os); | 8433 void SymbolShortPrint(std::ostream& os); |
| 8429 | 8434 |
| 8430 private: | 8435 private: |
| 8431 static const int kPrivateBit = 0; | 8436 static const int kPrivateBit = 0; |
| 8437 static const int kWellKnownSymbolBit = 1; |
| 8432 | 8438 |
| 8433 const char* PrivateSymbolToName() const; | 8439 const char* PrivateSymbolToName() const; |
| 8434 | 8440 |
| 8435 #if TRACE_MAPS | 8441 #if TRACE_MAPS |
| 8436 friend class Name; // For PrivateSymbolToName. | 8442 friend class Name; // For PrivateSymbolToName. |
| 8437 #endif | 8443 #endif |
| 8438 | 8444 |
| 8439 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); | 8445 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); |
| 8440 }; | 8446 }; |
| 8441 | 8447 |
| (...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10664 Handle<FixedArray> keys_; | 10670 Handle<FixedArray> keys_; |
| 10665 Handle<OrderedHashSet> set_; | 10671 Handle<OrderedHashSet> set_; |
| 10666 int length_; | 10672 int length_; |
| 10667 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); | 10673 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); |
| 10668 }; | 10674 }; |
| 10669 | 10675 |
| 10670 } // NOLINT, false-positive due to second-order macros. | 10676 } // NOLINT, false-positive due to second-order macros. |
| 10671 } // NOLINT, false-positive due to second-order macros. | 10677 } // NOLINT, false-positive due to second-order macros. |
| 10672 | 10678 |
| 10673 #endif // V8_OBJECTS_H_ | 10679 #endif // V8_OBJECTS_H_ |
| OLD | NEW |