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 26 matching lines...) Expand all Loading... |
37 PropertyConstness constness, | 37 PropertyConstness constness, |
38 Representation representation, | 38 Representation representation, |
39 Handle<Object> wrapped_field_type); | 39 Handle<Object> wrapped_field_type); |
40 | 40 |
41 static Descriptor DataConstant(Handle<Name> key, Handle<Object> value, | 41 static Descriptor DataConstant(Handle<Name> key, Handle<Object> value, |
42 PropertyAttributes attributes) { | 42 PropertyAttributes attributes) { |
43 return Descriptor(key, value, kData, attributes, kDescriptor, kConst, | 43 return Descriptor(key, value, kData, attributes, kDescriptor, kConst, |
44 value->OptimalRepresentation(), 0); | 44 value->OptimalRepresentation(), 0); |
45 } | 45 } |
46 | 46 |
| 47 static Descriptor DataConstant(Handle<Name> key, int field_index, |
| 48 Handle<Object> value, |
| 49 PropertyAttributes attributes); |
| 50 |
47 static Descriptor AccessorConstant(Handle<Name> key, Handle<Object> foreign, | 51 static Descriptor AccessorConstant(Handle<Name> key, Handle<Object> foreign, |
48 PropertyAttributes attributes) { | 52 PropertyAttributes attributes) { |
49 return Descriptor(key, foreign, kAccessor, attributes, kDescriptor, kConst, | 53 return Descriptor(key, foreign, kAccessor, attributes, kDescriptor, kConst, |
50 Representation::Tagged(), 0); | 54 Representation::Tagged(), 0); |
51 } | 55 } |
52 | 56 |
53 private: | 57 private: |
54 Handle<Name> key_; | 58 Handle<Name> key_; |
55 Handle<Object> value_; | 59 Handle<Object> value_; |
56 PropertyDetails details_; | 60 PropertyDetails details_; |
(...skipping 27 matching lines...) Expand all Loading... |
84 | 88 |
85 friend class DescriptorArray; | 89 friend class DescriptorArray; |
86 friend class Map; | 90 friend class Map; |
87 friend class MapUpdater; | 91 friend class MapUpdater; |
88 }; | 92 }; |
89 | 93 |
90 } // namespace internal | 94 } // namespace internal |
91 } // namespace v8 | 95 } // namespace v8 |
92 | 96 |
93 #endif // V8_PROPERTY_H_ | 97 #endif // V8_PROPERTY_H_ |
OLD | NEW |