OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 Descriptor(String* key, Object* value, PropertyDetails details) | 86 Descriptor(String* key, Object* value, PropertyDetails details) |
87 : key_(key), | 87 : key_(key), |
88 value_(value), | 88 value_(value), |
89 details_(details) { } | 89 details_(details) { } |
90 | 90 |
91 Descriptor(String* key, | 91 Descriptor(String* key, |
92 Object* value, | 92 Object* value, |
93 PropertyAttributes attributes, | 93 PropertyAttributes attributes, |
94 PropertyType type, | 94 PropertyType type, |
95 int index = 0) | 95 int index) |
96 : key_(key), | 96 : key_(key), |
97 value_(value), | 97 value_(value), |
98 details_(attributes, type, index) { } | 98 details_(attributes, type, index) { } |
99 | 99 |
100 friend class DescriptorArray; | 100 friend class DescriptorArray; |
101 }; | 101 }; |
102 | 102 |
103 | 103 |
104 class FieldDescriptor: public Descriptor { | 104 class FieldDescriptor: public Descriptor { |
105 public: | 105 public: |
106 FieldDescriptor(String* key, | 106 FieldDescriptor(String* key, |
107 int field_index, | 107 int field_index, |
108 PropertyAttributes attributes, | 108 PropertyAttributes attributes, |
109 int index = 0) | 109 int index) |
110 : Descriptor(key, Smi::FromInt(field_index), attributes, FIELD, index) {} | 110 : Descriptor(key, Smi::FromInt(field_index), attributes, FIELD, index) {} |
111 }; | 111 }; |
112 | 112 |
113 | 113 |
114 class ConstantFunctionDescriptor: public Descriptor { | 114 class ConstantFunctionDescriptor: public Descriptor { |
115 public: | 115 public: |
116 ConstantFunctionDescriptor(String* key, | 116 ConstantFunctionDescriptor(String* key, |
117 JSFunction* function, | 117 JSFunction* function, |
118 PropertyAttributes attributes, | 118 PropertyAttributes attributes, |
119 int index = 0) | 119 int index) |
120 : Descriptor(key, function, attributes, CONSTANT_FUNCTION, index) {} | 120 : Descriptor(key, function, attributes, CONSTANT_FUNCTION, index) {} |
121 }; | 121 }; |
122 | 122 |
123 | 123 |
124 class CallbacksDescriptor: public Descriptor { | 124 class CallbacksDescriptor: public Descriptor { |
125 public: | 125 public: |
126 CallbacksDescriptor(String* key, | 126 CallbacksDescriptor(String* key, |
127 Object* foreign, | 127 Object* foreign, |
128 PropertyAttributes attributes, | 128 PropertyAttributes attributes, |
129 int index = 0) | 129 int index) |
130 : Descriptor(key, foreign, attributes, CALLBACKS, index) {} | 130 : Descriptor(key, foreign, attributes, CALLBACKS, index) {} |
131 }; | 131 }; |
132 | 132 |
133 | 133 |
134 class LookupResult BASE_EMBEDDED { | 134 class LookupResult BASE_EMBEDDED { |
135 public: | 135 public: |
136 explicit LookupResult(Isolate* isolate) | 136 explicit LookupResult(Isolate* isolate) |
137 : isolate_(isolate), | 137 : isolate_(isolate), |
138 next_(isolate->top_lookup_result()), | 138 next_(isolate->top_lookup_result()), |
139 lookup_type_(NOT_FOUND), | 139 lookup_type_(NOT_FOUND), |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 JSReceiver* holder_; | 406 JSReceiver* holder_; |
407 int number_; | 407 int number_; |
408 bool cacheable_; | 408 bool cacheable_; |
409 PropertyDetails details_; | 409 PropertyDetails details_; |
410 }; | 410 }; |
411 | 411 |
412 | 412 |
413 } } // namespace v8::internal | 413 } } // namespace v8::internal |
414 | 414 |
415 #endif // V8_PROPERTY_H_ | 415 #endif // V8_PROPERTY_H_ |
OLD | NEW |