| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4527 inline int relocation_size(); | 4527 inline int relocation_size(); |
| 4528 | 4528 |
| 4529 // [flags]: Various code flags. | 4529 // [flags]: Various code flags. |
| 4530 inline Flags flags(); | 4530 inline Flags flags(); |
| 4531 inline void set_flags(Flags flags); | 4531 inline void set_flags(Flags flags); |
| 4532 | 4532 |
| 4533 // [flags]: Access to specific code flags. | 4533 // [flags]: Access to specific code flags. |
| 4534 inline Kind kind(); | 4534 inline Kind kind(); |
| 4535 inline InlineCacheState ic_state(); // Only valid for IC stubs. | 4535 inline InlineCacheState ic_state(); // Only valid for IC stubs. |
| 4536 inline ExtraICState extra_ic_state(); // Only valid for IC stubs. | 4536 inline ExtraICState extra_ic_state(); // Only valid for IC stubs. |
| 4537 |
| 4537 inline ExtraICState extended_extra_ic_state(); // Only valid for | 4538 inline ExtraICState extended_extra_ic_state(); // Only valid for |
| 4538 // non-call IC stubs. | 4539 // non-call IC stubs. |
| 4540 static bool needs_extended_extra_ic_state(Kind kind) { |
| 4541 // TODO(danno): This is a bit of a hack right now since there are still |
| 4542 // clients of this API that pass "extra" values in for argc. These clients |
| 4543 // should be retrofitted to used ExtendedExtraICState. |
| 4544 return kind == COMPARE_NIL_IC || kind == TO_BOOLEAN_IC; |
| 4545 } |
| 4546 |
| 4539 inline StubType type(); // Only valid for monomorphic IC stubs. | 4547 inline StubType type(); // Only valid for monomorphic IC stubs. |
| 4540 inline int arguments_count(); // Only valid for call IC stubs. | 4548 inline int arguments_count(); // Only valid for call IC stubs. |
| 4541 | 4549 |
| 4542 // Testers for IC stub kinds. | 4550 // Testers for IC stub kinds. |
| 4543 inline bool is_inline_cache_stub(); | 4551 inline bool is_inline_cache_stub(); |
| 4544 inline bool is_debug_break(); | 4552 inline bool is_debug_break(); |
| 4545 inline bool is_load_stub() { return kind() == LOAD_IC; } | 4553 inline bool is_load_stub() { return kind() == LOAD_IC; } |
| 4546 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } | 4554 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } |
| 4547 inline bool is_store_stub() { return kind() == STORE_IC; } | 4555 inline bool is_store_stub() { return kind() == STORE_IC; } |
| 4548 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } | 4556 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4621 // receiver is valid for the given call. | 4629 // receiver is valid for the given call. |
| 4622 inline CheckType check_type(); | 4630 inline CheckType check_type(); |
| 4623 inline void set_check_type(CheckType value); | 4631 inline void set_check_type(CheckType value); |
| 4624 | 4632 |
| 4625 // [type-recording unary op type]: For kind UNARY_OP_IC. | 4633 // [type-recording unary op type]: For kind UNARY_OP_IC. |
| 4626 inline byte unary_op_type(); | 4634 inline byte unary_op_type(); |
| 4627 inline void set_unary_op_type(byte value); | 4635 inline void set_unary_op_type(byte value); |
| 4628 | 4636 |
| 4629 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. | 4637 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. |
| 4630 inline byte to_boolean_state(); | 4638 inline byte to_boolean_state(); |
| 4631 inline void set_to_boolean_state(byte value); | |
| 4632 | 4639 |
| 4633 // [compare_nil]: For kind COMPARE_NIL_IC tells what state the stub is in. | 4640 // [compare_nil]: For kind COMPARE_NIL_IC tells what state the stub is in. |
| 4634 byte compare_nil_types(); | 4641 byte compare_nil_types(); |
| 4635 | 4642 |
| 4636 // [has_function_cache]: For kind STUB tells whether there is a function | 4643 // [has_function_cache]: For kind STUB tells whether there is a function |
| 4637 // cache is passed to the stub. | 4644 // cache is passed to the stub. |
| 4638 inline bool has_function_cache(); | 4645 inline bool has_function_cache(); |
| 4639 inline void set_has_function_cache(bool flag); | 4646 inline void set_has_function_cache(bool flag); |
| 4640 | 4647 |
| 4641 | 4648 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4853 class ExtendedExtraICStateField: public BitField<ExtraICState, 12, | 4860 class ExtendedExtraICStateField: public BitField<ExtraICState, 12, |
| 4854 PlatformSmiTagging::kSmiValueSize - 12 + 1> {}; // NOLINT | 4861 PlatformSmiTagging::kSmiValueSize - 12 + 1> {}; // NOLINT |
| 4855 STATIC_ASSERT(ExtraICStateField::kShift == ExtendedExtraICStateField::kShift); | 4862 STATIC_ASSERT(ExtraICStateField::kShift == ExtendedExtraICStateField::kShift); |
| 4856 | 4863 |
| 4857 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) | 4864 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) |
| 4858 static const int kStackSlotsFirstBit = 0; | 4865 static const int kStackSlotsFirstBit = 0; |
| 4859 static const int kStackSlotsBitCount = 24; | 4866 static const int kStackSlotsBitCount = 24; |
| 4860 static const int kUnaryOpTypeFirstBit = | 4867 static const int kUnaryOpTypeFirstBit = |
| 4861 kStackSlotsFirstBit + kStackSlotsBitCount; | 4868 kStackSlotsFirstBit + kStackSlotsBitCount; |
| 4862 static const int kUnaryOpTypeBitCount = 3; | 4869 static const int kUnaryOpTypeBitCount = 3; |
| 4863 static const int kToBooleanStateFirstBit = | |
| 4864 kStackSlotsFirstBit + kStackSlotsBitCount; | |
| 4865 static const int kToBooleanStateBitCount = 8; | |
| 4866 static const int kHasFunctionCacheFirstBit = | 4870 static const int kHasFunctionCacheFirstBit = |
| 4867 kStackSlotsFirstBit + kStackSlotsBitCount; | 4871 kStackSlotsFirstBit + kStackSlotsBitCount; |
| 4868 static const int kHasFunctionCacheBitCount = 1; | 4872 static const int kHasFunctionCacheBitCount = 1; |
| 4869 static const int kMarkedForDeoptimizationFirstBit = | 4873 static const int kMarkedForDeoptimizationFirstBit = |
| 4870 kStackSlotsFirstBit + kStackSlotsBitCount + 1; | 4874 kStackSlotsFirstBit + kStackSlotsBitCount + 1; |
| 4871 static const int kMarkedForDeoptimizationBitCount = 1; | 4875 static const int kMarkedForDeoptimizationBitCount = 1; |
| 4872 | 4876 |
| 4873 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); | 4877 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); |
| 4874 STATIC_ASSERT(kUnaryOpTypeFirstBit + kUnaryOpTypeBitCount <= 32); | 4878 STATIC_ASSERT(kUnaryOpTypeFirstBit + kUnaryOpTypeBitCount <= 32); |
| 4875 STATIC_ASSERT(kToBooleanStateFirstBit + kToBooleanStateBitCount <= 32); | |
| 4876 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32); | 4879 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32); |
| 4877 STATIC_ASSERT(kMarkedForDeoptimizationFirstBit + | 4880 STATIC_ASSERT(kMarkedForDeoptimizationFirstBit + |
| 4878 kMarkedForDeoptimizationBitCount <= 32); | 4881 kMarkedForDeoptimizationBitCount <= 32); |
| 4879 | 4882 |
| 4880 class StackSlotsField: public BitField<int, | 4883 class StackSlotsField: public BitField<int, |
| 4881 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT | 4884 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT |
| 4882 class UnaryOpTypeField: public BitField<int, | 4885 class UnaryOpTypeField: public BitField<int, |
| 4883 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT | 4886 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT |
| 4884 class ToBooleanStateField: public BitField<int, | |
| 4885 kToBooleanStateFirstBit, kToBooleanStateBitCount> {}; // NOLINT | |
| 4886 class HasFunctionCacheField: public BitField<bool, | 4887 class HasFunctionCacheField: public BitField<bool, |
| 4887 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT | 4888 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT |
| 4888 class MarkedForDeoptimizationField: public BitField<bool, | 4889 class MarkedForDeoptimizationField: public BitField<bool, |
| 4889 kMarkedForDeoptimizationFirstBit, | 4890 kMarkedForDeoptimizationFirstBit, |
| 4890 kMarkedForDeoptimizationBitCount> {}; // NOLINT | 4891 kMarkedForDeoptimizationBitCount> {}; // NOLINT |
| 4891 | 4892 |
| 4892 // KindSpecificFlags2 layout (ALL) | 4893 // KindSpecificFlags2 layout (ALL) |
| 4893 static const int kIsCrankshaftedBit = 0; | 4894 static const int kIsCrankshaftedBit = 0; |
| 4894 class IsCrankshaftedField: public BitField<bool, | 4895 class IsCrankshaftedField: public BitField<bool, |
| 4895 kIsCrankshaftedBit, 1> {}; // NOLINT | 4896 kIsCrankshaftedBit, 1> {}; // NOLINT |
| (...skipping 4732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9628 } else { | 9629 } else { |
| 9629 value &= ~(1 << bit_position); | 9630 value &= ~(1 << bit_position); |
| 9630 } | 9631 } |
| 9631 return value; | 9632 return value; |
| 9632 } | 9633 } |
| 9633 }; | 9634 }; |
| 9634 | 9635 |
| 9635 } } // namespace v8::internal | 9636 } } // namespace v8::internal |
| 9636 | 9637 |
| 9637 #endif // V8_OBJECTS_H_ | 9638 #endif // V8_OBJECTS_H_ |
| OLD | NEW |