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 5721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5732 inline bool is_observed() { | 5732 inline bool is_observed() { |
5733 return ((1 << kIsObserved) & bit_field()) != 0; | 5733 return ((1 << kIsObserved) & bit_field()) != 0; |
5734 } | 5734 } |
5735 | 5735 |
5736 inline void set_is_extensible(bool value); | 5736 inline void set_is_extensible(bool value); |
5737 inline bool is_extensible(); | 5737 inline bool is_extensible(); |
5738 inline void set_is_prototype_map(bool value); | 5738 inline void set_is_prototype_map(bool value); |
5739 inline bool is_prototype_map(); | 5739 inline bool is_prototype_map(); |
5740 | 5740 |
5741 inline void set_elements_kind(ElementsKind elements_kind) { | 5741 inline void set_elements_kind(ElementsKind elements_kind) { |
5742 DCHECK(elements_kind < kElementsKindCount); | 5742 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount); |
5743 DCHECK(kElementsKindCount <= (1 << Map::ElementsKindBits::kSize)); | 5743 DCHECK(kElementsKindCount <= (1 << Map::ElementsKindBits::kSize)); |
5744 set_bit_field2(Map::ElementsKindBits::update(bit_field2(), elements_kind)); | 5744 set_bit_field2(Map::ElementsKindBits::update(bit_field2(), elements_kind)); |
5745 DCHECK(this->elements_kind() == elements_kind); | 5745 DCHECK(this->elements_kind() == elements_kind); |
5746 } | 5746 } |
5747 | 5747 |
5748 inline ElementsKind elements_kind() { | 5748 inline ElementsKind elements_kind() { |
5749 return Map::ElementsKindBits::decode(bit_field2()); | 5749 return Map::ElementsKindBits::decode(bit_field2()); |
5750 } | 5750 } |
5751 | 5751 |
5752 // Tells whether the instance has fast elements that are only Smis. | 5752 // Tells whether the instance has fast elements that are only Smis. |
(...skipping 5244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10997 } else { | 10997 } else { |
10998 value &= ~(1 << bit_position); | 10998 value &= ~(1 << bit_position); |
10999 } | 10999 } |
11000 return value; | 11000 return value; |
11001 } | 11001 } |
11002 }; | 11002 }; |
11003 | 11003 |
11004 } } // namespace v8::internal | 11004 } } // namespace v8::internal |
11005 | 11005 |
11006 #endif // V8_OBJECTS_H_ | 11006 #endif // V8_OBJECTS_H_ |
OLD | NEW |