| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 2f92d70b3fb649d973597b927bb012f684f8bad4..ff2562de89060a98d5f5f0b9eab264a8a84d248e 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -793,6 +793,7 @@ class MaybeObject BASE_EMBEDDED {
|
| V(DescriptorArray) \
|
| V(DeoptimizationInputData) \
|
| V(DeoptimizationOutputData) \
|
| + V(TypeFeedbackCells) \
|
| V(FixedArray) \
|
| V(FixedDoubleArray) \
|
| V(Context) \
|
| @@ -3940,8 +3941,44 @@ class DeoptimizationOutputData: public FixedArray {
|
| };
|
|
|
|
|
| -class SafepointEntry;
|
| +// Forward declaration.
|
| +class JSGlobalPropertyCell;
|
| +
|
| +// 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 Smi* AstId(int index);
|
| + inline void SetAstId(int index, Smi* id);
|
| +
|
| + // Accessors for global property cells holding the cache values.
|
| + inline JSGlobalPropertyCell* Cell(int index);
|
| + inline void SetCell(int index, JSGlobalPropertyCell* 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);
|
| +
|
| + // 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);
|
| +};
|
| +
|
| +
|
| +// Forward declaration.
|
| +class SafepointEntry;
|
|
|
| // Code describes objects with on-the-fly generated machine code.
|
| class Code: public HeapObject {
|
| @@ -4013,6 +4050,9 @@ class Code: public HeapObject {
|
| // [deoptimization_data]: Array containing data for deopt.
|
| DECL_ACCESSORS(deoptimization_data, FixedArray)
|
|
|
| + // [type_feedback_cells]: Array containing cache cells used for type feedback.
|
| + DECL_ACCESSORS(type_feedback_cells, TypeFeedbackCells)
|
| +
|
| // [code_flushing_candidate]: Field only used during garbage
|
| // collection to hold code flushing candidates. The contents of this
|
| // field does not have to be traced during garbage collection since
|
| @@ -4122,11 +4162,6 @@ class Code: public HeapObject {
|
| inline byte to_boolean_state();
|
| inline void set_to_boolean_state(byte value);
|
|
|
| - // For kind STUB, major_key == CallFunction, tells whether there is
|
| - // a function cache in the instruction stream.
|
| - inline bool has_function_cache();
|
| - inline void set_has_function_cache(bool flag);
|
| -
|
| // Get the safepoint entry for the given pc.
|
| SafepointEntry GetSafepointEntry(Address pc);
|
|
|
| @@ -4241,8 +4276,10 @@ class Code: public HeapObject {
|
| static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize;
|
| static const int kDeoptimizationDataOffset =
|
| kHandlerTableOffset + kPointerSize;
|
| - static const int kNextCodeFlushingCandidateOffset =
|
| + static const int kTypeFeedbackCellsOffset =
|
| kDeoptimizationDataOffset + kPointerSize;
|
| + static const int kNextCodeFlushingCandidateOffset =
|
| + kTypeFeedbackCellsOffset + kPointerSize;
|
| static const int kFlagsOffset =
|
| kNextCodeFlushingCandidateOffset + kPointerSize;
|
|
|
| @@ -4267,7 +4304,6 @@ class Code: public HeapObject {
|
| static const int kBinaryOpTypeOffset = kStubMajorKeyOffset + 1;
|
| static const int kCompareStateOffset = kStubMajorKeyOffset + 1;
|
| static const int kToBooleanTypeOffset = kStubMajorKeyOffset + 1;
|
| - static const int kHasFunctionCacheOffset = kStubMajorKeyOffset + 1;
|
|
|
| static const int kFullCodeFlags = kOptimizableOffset + 1;
|
| class FullCodeFlagsHasDeoptimizationSupportField:
|
| @@ -5658,7 +5694,6 @@ class JSGlobalProxy : public JSObject {
|
|
|
| // Forward declaration.
|
| class JSBuiltinsObject;
|
| -class JSGlobalPropertyCell;
|
|
|
| // Common super class for JavaScript global objects and the special
|
| // builtins global objects.
|
|
|