| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 5d094cfa1f7cbb833452fc2c242ea28abe495604..bb98576eaff4464640b90cd20eeb28ee1d2309d9 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -1040,7 +1040,6 @@ class MaybeObject BASE_EMBEDDED {
|
| V(DeoptimizationInputData) \
|
| V(DeoptimizationOutputData) \
|
| V(DependentCode) \
|
| - V(TypeFeedbackCells) \
|
| V(FixedArray) \
|
| V(FixedDoubleArray) \
|
| V(ConstantPoolArray) \
|
| @@ -1159,16 +1158,18 @@ class MaybeObject BASE_EMBEDDED {
|
| V(kExpectedNonIdenticalObjects, "Expected non-identical objects") \
|
| V(kExpectedNonNullContext, "Expected non-null context") \
|
| V(kExpectedPositiveZero, "Expected +0.0") \
|
| - V(kExpectedPropertyCellInTypeInfoCell, \
|
| - "Expected property cell in type_info_cell") \
|
| V(kExpectedAllocationSiteInCell, \
|
| "Expected AllocationSite in property cell") \
|
| - V(kExpectedPropertyCellInRegisterA2, \
|
| - "Expected property cell in register a2") \
|
| - V(kExpectedPropertyCellInRegisterEbx, \
|
| - "Expected property cell in register ebx") \
|
| - V(kExpectedPropertyCellInRegisterRbx, \
|
| - "Expected property cell in register rbx") \
|
| + V(kExpectedFixedArrayInFeedbackVector, \
|
| + "Expected fixed array in feedback vector") \
|
| + V(kExpectedFixedArrayInRegisterA2, \
|
| + "Expected fixed array in register a2") \
|
| + V(kExpectedFixedArrayInRegisterEbx, \
|
| + "Expected fixed array in register ebx") \
|
| + V(kExpectedFixedArrayInRegisterR2, \
|
| + "Expected fixed array in register r2") \
|
| + V(kExpectedFixedArrayInRegisterRbx, \
|
| + "Expected fixed array in register rbx") \
|
| V(kExpectedSmiOrHeapNumber, "Expected smi or HeapNumber") \
|
| V(kExpectingAlignmentForCopyBytes, \
|
| "Expecting alignment for CopyBytes") \
|
| @@ -5112,49 +5113,6 @@ class DeoptimizationOutputData: public FixedArray {
|
| // Forward declaration.
|
| class Cell;
|
| class PropertyCell;
|
| -
|
| -// TypeFeedbackCells is a fixed array used to hold the association between
|
| -// cache cells and AST ids for code generated by the full compiler.
|
| -// The format of the these objects is
|
| -// [i * 2]: Global property cell of ith cache cell.
|
| -// [i * 2 + 1]: Ast ID for ith cache cell.
|
| -class TypeFeedbackCells: public FixedArray {
|
| - public:
|
| - int CellCount() { return length() / 2; }
|
| - static int LengthOfFixedArray(int cell_count) { return cell_count * 2; }
|
| -
|
| - // Accessors for AST ids associated with cache values.
|
| - inline TypeFeedbackId AstId(int index);
|
| - inline void SetAstId(int index, TypeFeedbackId id);
|
| -
|
| - // Accessors for global property cells holding the cache values.
|
| - inline Cell* GetCell(int index);
|
| - inline void SetCell(int index, Cell* cell);
|
| -
|
| - // The object that indicates an uninitialized cache.
|
| - static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
|
| -
|
| - // The object that indicates a megamorphic state.
|
| - static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
|
| -
|
| - // The object that indicates a monomorphic state of Array with
|
| - // ElementsKind
|
| - static inline Handle<Object> MonomorphicArraySentinel(Isolate* isolate,
|
| - ElementsKind elements_kind);
|
| -
|
| - // A raw version of the uninitialized sentinel that's safe to read during
|
| - // garbage collection (e.g., for patching the cache).
|
| - static inline Object* RawUninitializedSentinel(Heap* heap);
|
| -
|
| - // Casting.
|
| - static inline TypeFeedbackCells* cast(Object* obj);
|
| -
|
| - static const int kForInFastCaseMarker = 0;
|
| - static const int kForInSlowCaseMarker = 1;
|
| -};
|
| -
|
| -
|
| -// Forward declaration.
|
| class SafepointEntry;
|
| class TypeFeedbackInfo;
|
|
|
| @@ -5279,16 +5237,6 @@ class Code: public HeapObject {
|
| inline InlineCacheState ic_state(); // Only valid for IC stubs.
|
| inline ExtraICState extra_ic_state(); // Only valid for IC stubs.
|
|
|
| - inline ExtraICState extended_extra_ic_state(); // Only valid for
|
| - // non-call IC stubs.
|
| - static bool needs_extended_extra_ic_state(Kind kind) {
|
| - // TODO(danno): This is a bit of a hack right now since there are still
|
| - // clients of this API that pass "extra" values in for argc. These clients
|
| - // should be retrofitted to used ExtendedExtraICState.
|
| - return kind == COMPARE_NIL_IC || kind == TO_BOOLEAN_IC ||
|
| - kind == BINARY_OP_IC;
|
| - }
|
| -
|
| inline StubType type(); // Only valid for monomorphic IC stubs.
|
| inline int arguments_count(); // Only valid for call IC stubs.
|
|
|
| @@ -5429,7 +5377,7 @@ class Code: public HeapObject {
|
| InlineCacheState ic_state = UNINITIALIZED,
|
| ExtraICState extra_ic_state = kNoExtraICState,
|
| StubType type = NORMAL,
|
| - int argc = -1,
|
| + Kind handler_kind = STUB,
|
| InlineCacheHolderFlag holder = OWN_MAP);
|
|
|
| static inline Flags ComputeMonomorphicFlags(
|
| @@ -5437,14 +5385,13 @@ class Code: public HeapObject {
|
| ExtraICState extra_ic_state = kNoExtraICState,
|
| InlineCacheHolderFlag holder = OWN_MAP,
|
| StubType type = NORMAL,
|
| - int argc = -1);
|
| + Kind handler_kind = STUB);
|
|
|
| static inline InlineCacheState ExtractICStateFromFlags(Flags flags);
|
| static inline StubType ExtractTypeFromFlags(Flags flags);
|
| static inline Kind ExtractKindFromFlags(Flags flags);
|
| static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags);
|
| static inline ExtraICState ExtractExtraICStateFromFlags(Flags flags);
|
| - static inline ExtraICState ExtractExtendedExtraICStateFromFlags(Flags flags);
|
| static inline int ExtractArgumentsCountFromFlags(Flags flags);
|
|
|
| static inline Flags RemoveTypeFromFlags(Flags flags);
|
| @@ -5515,7 +5462,7 @@ class Code: public HeapObject {
|
| void ClearInlineCaches();
|
| void ClearInlineCaches(Kind kind);
|
|
|
| - void ClearTypeFeedbackCells(Heap* heap);
|
| + void ClearTypeFeedbackInfo(Heap* heap);
|
|
|
| BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
|
| uint32_t TranslateAstIdToPcOffset(BailoutId ast_id);
|
| @@ -5610,10 +5557,8 @@ class Code: public HeapObject {
|
| class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {};
|
| class KindField: public BitField<Kind, 6, 4> {};
|
| // TODO(bmeurer): Bit 10 is available for free use. :-)
|
| - class ExtraICStateField: public BitField<ExtraICState, 11, 6> {};
|
| - class ExtendedExtraICStateField: public BitField<ExtraICState, 11,
|
| + class ExtraICStateField: public BitField<ExtraICState, 11,
|
| PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT
|
| - STATIC_ASSERT(ExtraICStateField::kShift == ExtendedExtraICStateField::kShift);
|
|
|
| // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION)
|
| static const int kStackSlotsFirstBit = 0;
|
| @@ -5674,13 +5619,6 @@ class Code: public HeapObject {
|
| PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1;
|
| static const int kMaxArguments = (1 << kArgumentsBits) - 1;
|
|
|
| - // ICs can use either argument count or ExtendedExtraIC, since their storage
|
| - // overlaps.
|
| - STATIC_ASSERT(ExtraICStateField::kShift +
|
| - ExtraICStateField::kSize + kArgumentsBits ==
|
| - ExtendedExtraICStateField::kShift +
|
| - ExtendedExtraICStateField::kSize);
|
| -
|
| // This constant should be encodable in an ARM instruction.
|
| static const int kFlagsNotUsedInLookup =
|
| TypeField::kMask | CacheHolderField::kMask;
|
| @@ -7844,9 +7782,6 @@ class JSMessageObject: public JSObject {
|
| // [script]: the script from which the error message originated.
|
| DECL_ACCESSORS(script, Object)
|
|
|
| - // [stack_trace]: the stack trace for this error message.
|
| - DECL_ACCESSORS(stack_trace, Object)
|
| -
|
| // [stack_frames]: an array of stack frames for this error object.
|
| DECL_ACCESSORS(stack_frames, Object)
|
|
|
| @@ -7869,8 +7804,7 @@ class JSMessageObject: public JSObject {
|
| static const int kTypeOffset = JSObject::kHeaderSize;
|
| static const int kArgumentsOffset = kTypeOffset + kPointerSize;
|
| static const int kScriptOffset = kArgumentsOffset + kPointerSize;
|
| - static const int kStackTraceOffset = kScriptOffset + kPointerSize;
|
| - static const int kStackFramesOffset = kStackTraceOffset + kPointerSize;
|
| + static const int kStackFramesOffset = kScriptOffset + kPointerSize;
|
| static const int kStartPositionOffset = kStackFramesOffset + kPointerSize;
|
| static const int kEndPositionOffset = kStartPositionOffset + kPointerSize;
|
| static const int kSize = kEndPositionOffset + kPointerSize;
|
| @@ -8229,7 +8163,7 @@ class TypeFeedbackInfo: public Struct {
|
| inline void set_inlined_type_change_checksum(int checksum);
|
| inline bool matches_inlined_type_change_checksum(int checksum);
|
|
|
| - DECL_ACCESSORS(type_feedback_cells, TypeFeedbackCells)
|
| + DECL_ACCESSORS(feedback_vector, FixedArray)
|
|
|
| static inline TypeFeedbackInfo* cast(Object* obj);
|
|
|
| @@ -8239,8 +8173,27 @@ class TypeFeedbackInfo: public Struct {
|
|
|
| static const int kStorage1Offset = HeapObject::kHeaderSize;
|
| static const int kStorage2Offset = kStorage1Offset + kPointerSize;
|
| - static const int kTypeFeedbackCellsOffset = kStorage2Offset + kPointerSize;
|
| - static const int kSize = kTypeFeedbackCellsOffset + kPointerSize;
|
| + static const int kFeedbackVectorOffset =
|
| + kStorage2Offset + kPointerSize;
|
| + static const int kSize = kFeedbackVectorOffset + kPointerSize;
|
| +
|
| + // The object that indicates an uninitialized cache.
|
| + static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
|
| +
|
| + // The object that indicates a megamorphic state.
|
| + static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
|
| +
|
| + // The object that indicates a monomorphic state of Array with
|
| + // ElementsKind
|
| + static inline Handle<Object> MonomorphicArraySentinel(Isolate* isolate,
|
| + ElementsKind elements_kind);
|
| +
|
| + // A raw version of the uninitialized sentinel that's safe to read during
|
| + // garbage collection (e.g., for patching the cache).
|
| + static inline Object* RawUninitializedSentinel(Heap* heap);
|
| +
|
| + static const int kForInFastCaseMarker = 0;
|
| + static const int kForInSlowCaseMarker = 1;
|
|
|
| private:
|
| static const int kTypeChangeChecksumBits = 7;
|
|
|