| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // A pointer from a map to the new map that is created by adding | 103 // A pointer from a map to the new map that is created by adding |
| 104 // a named property. These are key to the speed and functioning of V8. | 104 // a named property. These are key to the speed and functioning of V8. |
| 105 // The two maps should always have the same prototype, since | 105 // The two maps should always have the same prototype, since |
| 106 // MapSpace::CreateBackPointers depends on this. | 106 // MapSpace::CreateBackPointers depends on this. |
| 107 class MapTransitionDescriptor: public Descriptor { | 107 class MapTransitionDescriptor: public Descriptor { |
| 108 public: | 108 public: |
| 109 MapTransitionDescriptor(String* key, Map* map, PropertyAttributes attributes) | 109 MapTransitionDescriptor(String* key, Map* map, PropertyAttributes attributes) |
| 110 : Descriptor(key, map, attributes, MAP_TRANSITION) { } | 110 : Descriptor(key, map, attributes, MAP_TRANSITION) { } |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 class ExternalArrayTransitionDescriptor: public Descriptor { |
| 114 public: |
| 115 ExternalArrayTransitionDescriptor(String* key, |
| 116 Map* map, |
| 117 ExternalArrayType array_type) |
| 118 : Descriptor(key, map, PropertyDetails(NONE, |
| 119 EXTERNAL_ARRAY_TRANSITION, |
| 120 array_type)) { } |
| 121 }; |
| 122 |
| 113 // Marks a field name in a map so that adding the field is guaranteed | 123 // Marks a field name in a map so that adding the field is guaranteed |
| 114 // to create a FIELD descriptor in the new map. Used after adding | 124 // to create a FIELD descriptor in the new map. Used after adding |
| 115 // a constant function the first time, creating a CONSTANT_FUNCTION | 125 // a constant function the first time, creating a CONSTANT_FUNCTION |
| 116 // descriptor in the new map. This avoids creating multiple maps with | 126 // descriptor in the new map. This avoids creating multiple maps with |
| 117 // the same CONSTANT_FUNCTION field. | 127 // the same CONSTANT_FUNCTION field. |
| 118 class ConstTransitionDescriptor: public Descriptor { | 128 class ConstTransitionDescriptor: public Descriptor { |
| 119 public: | 129 public: |
| 120 explicit ConstTransitionDescriptor(String* key, Map* map) | 130 explicit ConstTransitionDescriptor(String* key, Map* map) |
| 121 : Descriptor(key, map, NONE, CONSTANT_TRANSITION) { } | 131 : Descriptor(key, map, NONE, CONSTANT_TRANSITION) { } |
| 122 }; | 132 }; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 JSObject* holder_; | 338 JSObject* holder_; |
| 329 int number_; | 339 int number_; |
| 330 bool cacheable_; | 340 bool cacheable_; |
| 331 PropertyDetails details_; | 341 PropertyDetails details_; |
| 332 }; | 342 }; |
| 333 | 343 |
| 334 | 344 |
| 335 } } // namespace v8::internal | 345 } } // namespace v8::internal |
| 336 | 346 |
| 337 #endif // V8_PROPERTY_H_ | 347 #endif // V8_PROPERTY_H_ |
| OLD | NEW |