Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 5056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5067 // [is_turbofanned]: For kind STUB or OPTIMIZED_FUNCTION, tells whether the | 5067 // [is_turbofanned]: For kind STUB or OPTIMIZED_FUNCTION, tells whether the |
| 5068 // code object was generated by the TurboFan optimizing compiler. | 5068 // code object was generated by the TurboFan optimizing compiler. |
| 5069 inline bool is_turbofanned(); | 5069 inline bool is_turbofanned(); |
| 5070 inline void set_is_turbofanned(bool value); | 5070 inline void set_is_turbofanned(bool value); |
| 5071 | 5071 |
| 5072 // [can_have_weak_objects]: For kind OPTIMIZED_FUNCTION, tells whether the | 5072 // [can_have_weak_objects]: For kind OPTIMIZED_FUNCTION, tells whether the |
| 5073 // embedded objects in code should be treated weakly. | 5073 // embedded objects in code should be treated weakly. |
| 5074 inline bool can_have_weak_objects(); | 5074 inline bool can_have_weak_objects(); |
| 5075 inline void set_can_have_weak_objects(bool value); | 5075 inline void set_can_have_weak_objects(bool value); |
| 5076 | 5076 |
| 5077 // [is_construct_stub]: For kind BUILTIN, tells whether the code object | |
| 5078 // represents a hand-written construct stub | |
| 5079 // (e.g., NumberConstructor_ConstructStub). | |
| 5080 inline bool is_construct_stub(); | |
| 5081 inline void set_is_construct_stub(bool value); | |
| 5082 | |
| 5077 // [has_deoptimization_support]: For FUNCTION kind, tells if it has | 5083 // [has_deoptimization_support]: For FUNCTION kind, tells if it has |
| 5078 // deoptimization support. | 5084 // deoptimization support. |
| 5079 inline bool has_deoptimization_support(); | 5085 inline bool has_deoptimization_support(); |
| 5080 inline void set_has_deoptimization_support(bool value); | 5086 inline void set_has_deoptimization_support(bool value); |
| 5081 | 5087 |
| 5082 // [has_debug_break_slots]: For FUNCTION kind, tells if it has | 5088 // [has_debug_break_slots]: For FUNCTION kind, tells if it has |
| 5083 // been compiled with debug break slots. | 5089 // been compiled with debug break slots. |
| 5084 inline bool has_debug_break_slots(); | 5090 inline bool has_debug_break_slots(); |
| 5085 inline void set_has_debug_break_slots(bool value); | 5091 inline void set_has_debug_break_slots(bool value); |
| 5086 | 5092 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5402 PlatformSmiTagging::kSmiValueSize - | 5408 PlatformSmiTagging::kSmiValueSize - |
| 5403 HasUnwindingInfoField::kNext + 1> {}; | 5409 HasUnwindingInfoField::kNext + 1> {}; |
| 5404 | 5410 |
| 5405 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION) | 5411 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION) |
| 5406 static const int kStackSlotsFirstBit = 0; | 5412 static const int kStackSlotsFirstBit = 0; |
| 5407 static const int kStackSlotsBitCount = 24; | 5413 static const int kStackSlotsBitCount = 24; |
| 5408 static const int kMarkedForDeoptimizationBit = | 5414 static const int kMarkedForDeoptimizationBit = |
| 5409 kStackSlotsFirstBit + kStackSlotsBitCount; | 5415 kStackSlotsFirstBit + kStackSlotsBitCount; |
| 5410 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; | 5416 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; |
| 5411 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; | 5417 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; |
| 5418 static const int kIsConstructStub = kCanHaveWeakObjects + 1; | |
|
Yang
2016/07/08 07:08:04
We could be smarter here. Aside from IsTurbofanned
jgruber
2016/07/08 10:02:41
Done.
| |
| 5412 | 5419 |
| 5413 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); | 5420 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); |
| 5414 STATIC_ASSERT(kCanHaveWeakObjects + 1 <= 32); | 5421 STATIC_ASSERT(kIsConstructStub + 1 <= 32); |
| 5415 | 5422 |
| 5416 class StackSlotsField: public BitField<int, | 5423 class StackSlotsField: public BitField<int, |
| 5417 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT | 5424 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT |
| 5418 class MarkedForDeoptimizationField | 5425 class MarkedForDeoptimizationField |
| 5419 : public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT | 5426 : public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT |
| 5420 class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> { | 5427 class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> { |
| 5421 }; // NOLINT | 5428 }; // NOLINT |
| 5422 class CanHaveWeakObjectsField | 5429 class CanHaveWeakObjectsField |
| 5423 : public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT | 5430 : public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT |
| 5431 class IsConstructStubField : public BitField<bool, kIsConstructStub, 1> { | |
| 5432 }; // NOLINT | |
| 5424 | 5433 |
| 5425 // KindSpecificFlags2 layout (ALL) | 5434 // KindSpecificFlags2 layout (ALL) |
| 5426 static const int kIsCrankshaftedBit = 0; | 5435 static const int kIsCrankshaftedBit = 0; |
| 5427 class IsCrankshaftedField: public BitField<bool, | 5436 class IsCrankshaftedField: public BitField<bool, |
| 5428 kIsCrankshaftedBit, 1> {}; // NOLINT | 5437 kIsCrankshaftedBit, 1> {}; // NOLINT |
| 5429 | 5438 |
| 5430 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) | 5439 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) |
| 5431 static const int kSafepointTableOffsetFirstBit = kIsCrankshaftedBit + 1; | 5440 static const int kSafepointTableOffsetFirstBit = kIsCrankshaftedBit + 1; |
| 5432 static const int kSafepointTableOffsetBitCount = 30; | 5441 static const int kSafepointTableOffsetBitCount = 30; |
| 5433 | 5442 |
| (...skipping 5536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10970 } | 10979 } |
| 10971 return value; | 10980 return value; |
| 10972 } | 10981 } |
| 10973 }; | 10982 }; |
| 10974 | 10983 |
| 10975 | 10984 |
| 10976 } // NOLINT, false-positive due to second-order macros. | 10985 } // NOLINT, false-positive due to second-order macros. |
| 10977 } // NOLINT, false-positive due to second-order macros. | 10986 } // NOLINT, false-positive due to second-order macros. |
| 10978 | 10987 |
| 10979 #endif // V8_OBJECTS_H_ | 10988 #endif // V8_OBJECTS_H_ |
| OLD | NEW |