Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 8084474a9be9351c83df10d187d7dbabfd6c1aec..5aa3e58136c5f867c3b38a24e60cc6e70c1708d4 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -5460,13 +5460,13 @@ class Code: public HeapObject { |
| // [raw_type_feedback_info]: This field stores various things, depending on |
| // the kind of the code object. |
| // FUNCTION => type feedback information. |
| - // STUB => various things, e.g. a SMI |
| + // STUB and ICs => major/minor key as Smi. |
| DECL_ACCESSORS(raw_type_feedback_info, Object) |
| inline Object* type_feedback_info(); |
| inline void set_type_feedback_info( |
| Object* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
| - inline int stub_info(); |
| - inline void set_stub_info(int info); |
| + inline uint32_t stub_key(); |
| + inline void set_stub_key(uint32_t key); |
| // [next_code_link]: Link for lists of optimized or deoptimized code. |
| // Note that storage for this field is overlapped with typefeedback_info. |
| @@ -5530,14 +5530,11 @@ class Code: public HeapObject { |
| ic_state() == MONOMORPHIC; |
| } |
| + inline bool IsCodeStubOrIC(); |
| + |
| inline void set_raw_kind_specific_flags1(int value); |
| inline void set_raw_kind_specific_flags2(int value); |
| - // [major_key]: For kind STUB or BINARY_OP_IC, the major key. |
| - inline int major_key(); |
| - inline void set_major_key(int value); |
| - inline bool has_major_key(); |
| - |
| // For kind STUB or ICs, tells whether or not a code object was generated by |
| // the optimizing compiler (but it may not be an optimized function). |
| bool is_crankshafted(); |
| @@ -5808,6 +5805,7 @@ class Code: public HeapObject { |
| static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; |
| static const int kDeoptimizationDataOffset = |
| kHandlerTableOffset + kPointerSize; |
| + // For FUNCTION kind, we store the type feedback info here. |
| static const int kTypeFeedbackInfoOffset = |
| kDeoptimizationDataOffset + kPointerSize; |
| static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize; |
| @@ -5890,22 +5888,16 @@ class Code: public HeapObject { |
| kIsCrankshaftedBit, 1> {}; // NOLINT |
| // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) |
| - static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1; |
| - static const int kSafepointTableOffsetFirstBit = |
| - kStubMajorKeyFirstBit + kStubMajorKeyBits; |
| + static const int kSafepointTableOffsetFirstBit = kIsCrankshaftedBit + 1; |
| static const int kSafepointTableOffsetBitCount = 24; |
|
Jakob Kummerow
2014/07/21 12:23:19
nit: let's add a comment that bits 25-31 (zero-ind
|
| - STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32); |
| STATIC_ASSERT(kSafepointTableOffsetFirstBit + |
| kSafepointTableOffsetBitCount <= 32); |
| - STATIC_ASSERT(1 + kStubMajorKeyBits + |
| - kSafepointTableOffsetBitCount <= 32); |
| + STATIC_ASSERT(1 + kSafepointTableOffsetBitCount <= 32); |
| class SafepointTableOffsetField: public BitField<int, |
| kSafepointTableOffsetFirstBit, |
| kSafepointTableOffsetBitCount> {}; // NOLINT |
| - class StubMajorKeyField: public BitField<int, |
| - kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT |
| // KindSpecificFlags2 layout (FUNCTION) |
| class BackEdgeTableOffsetField: public BitField<int, |