| 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 "allocation.h" |      8 #include "allocation.h" | 
|      9 #include "assert-scope.h" |      9 #include "assert-scope.h" | 
|     10 #include "builtins.h" |     10 #include "builtins.h" | 
| (...skipping 6463 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   6474   // and the values are the maps the are transitioned to. |   6474   // and the values are the maps the are transitioned to. | 
|   6475   static const int kMaxCachedPrototypeTransitions = 256; |   6475   static const int kMaxCachedPrototypeTransitions = 256; | 
|   6476   static Handle<Map> TransitionToPrototype(Handle<Map> map, |   6476   static Handle<Map> TransitionToPrototype(Handle<Map> map, | 
|   6477                                            Handle<Object> prototype); |   6477                                            Handle<Object> prototype); | 
|   6478  |   6478  | 
|   6479   static const int kMaxPreAllocatedPropertyFields = 255; |   6479   static const int kMaxPreAllocatedPropertyFields = 255; | 
|   6480  |   6480  | 
|   6481   // Layout description. |   6481   // Layout description. | 
|   6482   static const int kInstanceSizesOffset = HeapObject::kHeaderSize; |   6482   static const int kInstanceSizesOffset = HeapObject::kHeaderSize; | 
|   6483   static const int kInstanceAttributesOffset = kInstanceSizesOffset + kIntSize; |   6483   static const int kInstanceAttributesOffset = kInstanceSizesOffset + kIntSize; | 
|   6484   static const int kPrototypeOffset = kInstanceAttributesOffset + kIntSize; |   6484   static const int kBitField3Offset = kInstanceAttributesOffset + kIntSize; | 
 |   6485   static const int kPrototypeOffset = kBitField3Offset + kPointerSize; | 
|   6485   static const int kConstructorOffset = kPrototypeOffset + kPointerSize; |   6486   static const int kConstructorOffset = kPrototypeOffset + kPointerSize; | 
|   6486   // Storage for the transition array is overloaded to directly contain a back |   6487   // Storage for the transition array is overloaded to directly contain a back | 
|   6487   // pointer if unused. When the map has transitions, the back pointer is |   6488   // pointer if unused. When the map has transitions, the back pointer is | 
|   6488   // transferred to the transition array and accessed through an extra |   6489   // transferred to the transition array and accessed through an extra | 
|   6489   // indirection. |   6490   // indirection. | 
|   6490   static const int kTransitionsOrBackPointerOffset = |   6491   static const int kTransitionsOrBackPointerOffset = | 
|   6491       kConstructorOffset + kPointerSize; |   6492       kConstructorOffset + kPointerSize; | 
|   6492   static const int kDescriptorsOffset = |   6493   static const int kDescriptorsOffset = | 
|   6493       kTransitionsOrBackPointerOffset + kPointerSize; |   6494       kTransitionsOrBackPointerOffset + kPointerSize; | 
|   6494   static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize; |   6495   static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize; | 
|   6495   static const int kDependentCodeOffset = kCodeCacheOffset + kPointerSize; |   6496   static const int kDependentCodeOffset = kCodeCacheOffset + kPointerSize; | 
|   6496   static const int kBitField3Offset = kDependentCodeOffset + kPointerSize; |   6497   static const int kSize = kDependentCodeOffset + kPointerSize; | 
|   6497   static const int kSize = kBitField3Offset + kPointerSize; |  | 
|   6498  |   6498  | 
|   6499   // Layout of pointer fields. Heap iteration code relies on them |   6499   // Layout of pointer fields. Heap iteration code relies on them | 
|   6500   // being continuously allocated. |   6500   // being continuously allocated. | 
|   6501   static const int kPointerFieldsBeginOffset = Map::kPrototypeOffset; |   6501   static const int kPointerFieldsBeginOffset = Map::kPrototypeOffset; | 
|   6502   static const int kPointerFieldsEndOffset = kBitField3Offset + kPointerSize; |   6502   static const int kPointerFieldsEndOffset = kSize; | 
|   6503  |   6503  | 
|   6504   // Byte offsets within kInstanceSizesOffset. |   6504   // Byte offsets within kInstanceSizesOffset. | 
|   6505   static const int kInstanceSizeOffset = kInstanceSizesOffset + 0; |   6505   static const int kInstanceSizeOffset = kInstanceSizesOffset + 0; | 
|   6506   static const int kInObjectPropertiesByte = 1; |   6506   static const int kInObjectPropertiesByte = 1; | 
|   6507   static const int kInObjectPropertiesOffset = |   6507   static const int kInObjectPropertiesOffset = | 
|   6508       kInstanceSizesOffset + kInObjectPropertiesByte; |   6508       kInstanceSizesOffset + kInObjectPropertiesByte; | 
|   6509   static const int kPreAllocatedPropertyFieldsByte = 2; |   6509   static const int kPreAllocatedPropertyFieldsByte = 2; | 
|   6510   static const int kPreAllocatedPropertyFieldsOffset = |   6510   static const int kPreAllocatedPropertyFieldsOffset = | 
|   6511       kInstanceSizesOffset + kPreAllocatedPropertyFieldsByte; |   6511       kInstanceSizesOffset + kPreAllocatedPropertyFieldsByte; | 
|   6512   static const int kVisitorIdByte = 3; |   6512   static const int kVisitorIdByte = 3; | 
| (...skipping 4607 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  11120     } else { |  11120     } else { | 
|  11121       value &= ~(1 << bit_position); |  11121       value &= ~(1 << bit_position); | 
|  11122     } |  11122     } | 
|  11123     return value; |  11123     return value; | 
|  11124   } |  11124   } | 
|  11125 }; |  11125 }; | 
|  11126  |  11126  | 
|  11127 } }  // namespace v8::internal |  11127 } }  // namespace v8::internal | 
|  11128  |  11128  | 
|  11129 #endif  // V8_OBJECTS_H_ |  11129 #endif  // V8_OBJECTS_H_ | 
| OLD | NEW |