| 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 4837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4848 NON_IC_KIND_LIST(V) \ | 4848 NON_IC_KIND_LIST(V) \ |
| 4849 IC_KIND_LIST(V) | 4849 IC_KIND_LIST(V) |
| 4850 | 4850 |
| 4851 enum Kind { | 4851 enum Kind { |
| 4852 #define DEFINE_CODE_KIND_ENUM(name) name, | 4852 #define DEFINE_CODE_KIND_ENUM(name) name, |
| 4853 CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM) | 4853 CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM) |
| 4854 #undef DEFINE_CODE_KIND_ENUM | 4854 #undef DEFINE_CODE_KIND_ENUM |
| 4855 NUMBER_OF_KINDS | 4855 NUMBER_OF_KINDS |
| 4856 }; | 4856 }; |
| 4857 | 4857 |
| 4858 // No more than 16 kinds. The value is currently encoded in four bits in | 4858 // No more than 32 kinds. The value is currently encoded in five bits in |
| 4859 // Flags. | 4859 // Flags. |
| 4860 STATIC_ASSERT(NUMBER_OF_KINDS <= 16); | 4860 STATIC_ASSERT(NUMBER_OF_KINDS <= 32); |
| 4861 | 4861 |
| 4862 static const char* Kind2String(Kind kind); | 4862 static const char* Kind2String(Kind kind); |
| 4863 | 4863 |
| 4864 // Types of stubs. | 4864 // Types of stubs. |
| 4865 enum StubType { | 4865 enum StubType { |
| 4866 NORMAL, | 4866 NORMAL, |
| 4867 FAST | 4867 FAST |
| 4868 }; | 4868 }; |
| 4869 | 4869 |
| 4870 static const int kPrologueOffsetNotSet = -1; | 4870 static const int kPrologueOffsetNotSet = -1; |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5277 static const int kFullCodeFlags = kKindSpecificFlags1Offset; | 5277 static const int kFullCodeFlags = kKindSpecificFlags1Offset; |
| 5278 class FullCodeFlagsHasDeoptimizationSupportField: | 5278 class FullCodeFlagsHasDeoptimizationSupportField: |
| 5279 public BitField<bool, 0, 1> {}; // NOLINT | 5279 public BitField<bool, 0, 1> {}; // NOLINT |
| 5280 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; | 5280 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; |
| 5281 class FullCodeFlagsHasRelocInfoForSerialization | 5281 class FullCodeFlagsHasRelocInfoForSerialization |
| 5282 : public BitField<bool, 2, 1> {}; | 5282 : public BitField<bool, 2, 1> {}; |
| 5283 // Bit 3 in this bitfield is unused. | 5283 // Bit 3 in this bitfield is unused. |
| 5284 class ProfilerTicksField : public BitField<int, 4, 28> {}; | 5284 class ProfilerTicksField : public BitField<int, 4, 28> {}; |
| 5285 | 5285 |
| 5286 // Flags layout. BitField<type, shift, size>. | 5286 // Flags layout. BitField<type, shift, size>. |
| 5287 class ICStateField : public BitField<InlineCacheState, 0, 4> {}; | 5287 class ICStateField : public BitField<InlineCacheState, 0, 3> {}; |
| 5288 class TypeField : public BitField<StubType, 4, 1> {}; | 5288 class TypeField : public BitField<StubType, 3, 1> {}; |
| 5289 class CacheHolderField : public BitField<CacheHolderFlag, 5, 2> {}; | 5289 class CacheHolderField : public BitField<CacheHolderFlag, 4, 2> {}; |
| 5290 class KindField : public BitField<Kind, 7, 4> {}; | 5290 class KindField : public BitField<Kind, 6, 5> {}; |
| 5291 class ExtraICStateField: public BitField<ExtraICState, 11, | 5291 class ExtraICStateField: public BitField<ExtraICState, 11, |
| 5292 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT | 5292 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT |
| 5293 | 5293 |
| 5294 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) | 5294 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) |
| 5295 static const int kStackSlotsFirstBit = 0; | 5295 static const int kStackSlotsFirstBit = 0; |
| 5296 static const int kStackSlotsBitCount = 24; | 5296 static const int kStackSlotsBitCount = 24; |
| 5297 static const int kHasFunctionCacheBit = | 5297 static const int kHasFunctionCacheBit = |
| 5298 kStackSlotsFirstBit + kStackSlotsBitCount; | 5298 kStackSlotsFirstBit + kStackSlotsBitCount; |
| 5299 static const int kMarkedForDeoptimizationBit = kHasFunctionCacheBit + 1; | 5299 static const int kMarkedForDeoptimizationBit = kHasFunctionCacheBit + 1; |
| 5300 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; | 5300 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; |
| (...skipping 5537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10838 // (elements + properties) in the current level. | 10838 // (elements + properties) in the current level. |
| 10839 int levelLength_ = 0; | 10839 int levelLength_ = 0; |
| 10840 | 10840 |
| 10841 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); | 10841 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); |
| 10842 }; | 10842 }; |
| 10843 | 10843 |
| 10844 } // NOLINT, false-positive due to second-order macros. | 10844 } // NOLINT, false-positive due to second-order macros. |
| 10845 } // NOLINT, false-positive due to second-order macros. | 10845 } // NOLINT, false-positive due to second-order macros. |
| 10846 | 10846 |
| 10847 #endif // V8_OBJECTS_H_ | 10847 #endif // V8_OBJECTS_H_ |
| OLD | NEW |