| 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 <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 5033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5044 | 5044 |
| 5045 // [next_code_link]: Link for lists of optimized or deoptimized code. | 5045 // [next_code_link]: Link for lists of optimized or deoptimized code. |
| 5046 // Note that storage for this field is overlapped with typefeedback_info. | 5046 // Note that storage for this field is overlapped with typefeedback_info. |
| 5047 DECL_ACCESSORS(next_code_link, Object) | 5047 DECL_ACCESSORS(next_code_link, Object) |
| 5048 | 5048 |
| 5049 // [gc_metadata]: Field used to hold GC related metadata. The contents of this | 5049 // [gc_metadata]: Field used to hold GC related metadata. The contents of this |
| 5050 // field does not have to be traced during garbage collection since | 5050 // field does not have to be traced during garbage collection since |
| 5051 // it is only used by the garbage collector itself. | 5051 // it is only used by the garbage collector itself. |
| 5052 DECL_ACCESSORS(gc_metadata, Object) | 5052 DECL_ACCESSORS(gc_metadata, Object) |
| 5053 | 5053 |
| 5054 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age | |
| 5055 // at the moment when this object was created. | |
| 5056 inline void set_ic_age(int count); | |
| 5057 inline int ic_age() const; | |
| 5058 | |
| 5059 // [prologue_offset]: Offset of the function prologue, used for aging | 5054 // [prologue_offset]: Offset of the function prologue, used for aging |
| 5060 // FUNCTIONs and OPTIMIZED_FUNCTIONs. | 5055 // FUNCTIONs and OPTIMIZED_FUNCTIONs. |
| 5061 inline int prologue_offset() const; | 5056 inline int prologue_offset() const; |
| 5062 inline void set_prologue_offset(int offset); | 5057 inline void set_prologue_offset(int offset); |
| 5063 | 5058 |
| 5064 // Unchecked accessors to be used during GC. | 5059 // Unchecked accessors to be used during GC. |
| 5065 inline ByteArray* unchecked_relocation_info(); | 5060 inline ByteArray* unchecked_relocation_info(); |
| 5066 | 5061 |
| 5067 inline int relocation_size(); | 5062 inline int relocation_size(); |
| 5068 | 5063 |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5404 // Layout description. | 5399 // Layout description. |
| 5405 static const int kRelocationInfoOffset = HeapObject::kHeaderSize; | 5400 static const int kRelocationInfoOffset = HeapObject::kHeaderSize; |
| 5406 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; | 5401 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; |
| 5407 static const int kDeoptimizationDataOffset = | 5402 static const int kDeoptimizationDataOffset = |
| 5408 kHandlerTableOffset + kPointerSize; | 5403 kHandlerTableOffset + kPointerSize; |
| 5409 // For FUNCTION kind, we store the type feedback info here. | 5404 // For FUNCTION kind, we store the type feedback info here. |
| 5410 static const int kTypeFeedbackInfoOffset = | 5405 static const int kTypeFeedbackInfoOffset = |
| 5411 kDeoptimizationDataOffset + kPointerSize; | 5406 kDeoptimizationDataOffset + kPointerSize; |
| 5412 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize; | 5407 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize; |
| 5413 static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize; | 5408 static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize; |
| 5414 static const int kInstructionSizeOffset = kGCMetadataOffset + kPointerSize; | 5409 static const int kConstantPoolOffset = kGCMetadataOffset + kPointerSize; |
| 5415 static const int kICAgeOffset = kInstructionSizeOffset + kIntSize; | 5410 static const int kInstructionSizeOffset = kConstantPoolOffset + kPointerSize; |
| 5416 static const int kFlagsOffset = kICAgeOffset + kIntSize; | 5411 static const int kFlagsOffset = kInstructionSizeOffset + kIntSize; |
| 5417 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; | 5412 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; |
| 5418 static const int kKindSpecificFlags2Offset = | 5413 static const int kKindSpecificFlags2Offset = |
| 5419 kKindSpecificFlags1Offset + kIntSize; | 5414 kKindSpecificFlags1Offset + kIntSize; |
| 5420 // Note: We might be able to squeeze this into the flags above. | 5415 // Note: We might be able to squeeze this into the flags above. |
| 5421 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; | 5416 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; |
| 5422 static const int kConstantPoolOffset = kPrologueOffset + kIntSize; | 5417 static const int kHeaderPaddingStart = kPrologueOffset + kIntSize; |
| 5423 | |
| 5424 static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize; | |
| 5425 | 5418 |
| 5426 // Add padding to align the instruction start following right after | 5419 // Add padding to align the instruction start following right after |
| 5427 // the Code object header. | 5420 // the Code object header. |
| 5428 static const int kHeaderSize = | 5421 static const int kHeaderSize = |
| 5429 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; | 5422 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; |
| 5430 // Ensure that the slot for the constant pool pointer is aligned. | 5423 // Ensure that the slot for the constant pool pointer is aligned. |
| 5431 STATIC_ASSERT((kConstantPoolOffset & kPointerAlignmentMask) == 0); | 5424 STATIC_ASSERT((kConstantPoolOffset & kPointerAlignmentMask) == 0); |
| 5432 | 5425 |
| 5433 // Byte offsets within kKindSpecificFlags1Offset. | 5426 // Byte offsets within kKindSpecificFlags1Offset. |
| 5434 static const int kOptimizableOffset = kKindSpecificFlags1Offset; | 5427 static const int kOptimizableOffset = kKindSpecificFlags1Offset; |
| (...skipping 5523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10958 } else { | 10951 } else { |
| 10959 value &= ~(1 << bit_position); | 10952 value &= ~(1 << bit_position); |
| 10960 } | 10953 } |
| 10961 return value; | 10954 return value; |
| 10962 } | 10955 } |
| 10963 }; | 10956 }; |
| 10964 | 10957 |
| 10965 } } // namespace v8::internal | 10958 } } // namespace v8::internal |
| 10966 | 10959 |
| 10967 #endif // V8_OBJECTS_H_ | 10960 #endif // V8_OBJECTS_H_ |
| OLD | NEW |