OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_H_ | 5 #ifndef V8_PROPERTY_H_ |
6 #define V8_PROPERTY_H_ | 6 #define V8_PROPERTY_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 PropertyDetails GetDetails() const { return details_; } | 25 PropertyDetails GetDetails() const { return details_; } |
26 | 26 |
27 void SetSortedKeyIndex(int index) { details_ = details_.set_pointer(index); } | 27 void SetSortedKeyIndex(int index) { details_ = details_.set_pointer(index); } |
28 | 28 |
29 private: | 29 private: |
30 Handle<Name> key_; | 30 Handle<Name> key_; |
31 Handle<Object> value_; | 31 Handle<Object> value_; |
32 PropertyDetails details_; | 32 PropertyDetails details_; |
33 | 33 |
34 protected: | 34 protected: |
35 Descriptor() : details_(Smi::kZero) {} | 35 Descriptor() : details_(Smi::FromInt(0)) {} |
36 | 36 |
37 void Init(Handle<Name> key, Handle<Object> value, PropertyDetails details) { | 37 void Init(Handle<Name> key, Handle<Object> value, PropertyDetails details) { |
38 DCHECK(key->IsUniqueName()); | 38 DCHECK(key->IsUniqueName()); |
39 key_ = key; | 39 key_ = key; |
40 value_ = value; | 40 value_ = value; |
41 details_ = details; | 41 details_ = details; |
42 } | 42 } |
43 | 43 |
44 Descriptor(Handle<Name> key, Handle<Object> value, PropertyDetails details) | 44 Descriptor(Handle<Name> key, Handle<Object> value, PropertyDetails details) |
45 : key_(key), value_(value), details_(details) { | 45 : key_(key), value_(value), details_(details) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 PropertyAttributes attributes) | 93 PropertyAttributes attributes) |
94 : Descriptor(key, foreign, attributes, ACCESSOR_CONSTANT, | 94 : Descriptor(key, foreign, attributes, ACCESSOR_CONSTANT, |
95 Representation::Tagged()) {} | 95 Representation::Tagged()) {} |
96 }; | 96 }; |
97 | 97 |
98 | 98 |
99 } // namespace internal | 99 } // namespace internal |
100 } // namespace v8 | 100 } // namespace v8 |
101 | 101 |
102 #endif // V8_PROPERTY_H_ | 102 #endif // V8_PROPERTY_H_ |
OLD | NEW |