| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 6c4aa61dd946800cf362fca49d97198f5bf24366..993d3333c79d0d04b7b2c5edbddb11aaac73f648 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -2959,6 +2959,11 @@ class FixedArray: public FixedArrayBase {
|
| // Code Generation support.
|
| static int OffsetOfElementAt(int index) { return SizeFor(index); }
|
|
|
| + // Garbage collection support.
|
| + Object** RawFieldOfElementAt(int index) {
|
| + return HeapObject::RawField(this, OffsetOfElementAt(index));
|
| + }
|
| +
|
| // Casting.
|
| static inline FixedArray* cast(Object* obj);
|
|
|
| @@ -6537,10 +6542,10 @@ class SharedFunctionInfo: public HeapObject {
|
| // and a shared literals array or Smi(0) if none.
|
| DECL_ACCESSORS(optimized_code_map, Object)
|
|
|
| - // Returns index i of the entry with the specified context. At position
|
| - // i - 1 is the context, position i the code, and i + 1 the literals array.
|
| - // Returns -1 when no matching entry is found.
|
| - int SearchOptimizedCodeMap(Context* native_context);
|
| + // Returns index i of the entry with the specified context and OSR entry.
|
| + // At position i - 1 is the context, position i the code, and i + 1 the
|
| + // literals array. Returns -1 when no matching entry is found.
|
| + int SearchOptimizedCodeMap(Context* native_context, BailoutId osr_ast_id);
|
|
|
| // Installs optimized code from the code map on the given closure. The
|
| // index has to be consistent with a search result as defined above.
|
| @@ -6560,18 +6565,28 @@ class SharedFunctionInfo: public HeapObject {
|
| // Add a new entry to the optimized code map.
|
| MUST_USE_RESULT MaybeObject* AddToOptimizedCodeMap(Context* native_context,
|
| Code* code,
|
| - FixedArray* literals);
|
| + FixedArray* literals,
|
| + BailoutId osr_ast_id);
|
| static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared,
|
| Handle<Context> native_context,
|
| Handle<Code> code,
|
| - Handle<FixedArray> literals);
|
| + Handle<FixedArray> literals,
|
| + BailoutId osr_ast_id);
|
|
|
| // Layout description of the optimized code map.
|
| static const int kNextMapIndex = 0;
|
| static const int kEntriesStart = 1;
|
| - static const int kEntryLength = 3;
|
| - static const int kFirstContextSlot = FixedArray::kHeaderSize + kPointerSize;
|
| - static const int kFirstCodeSlot = FixedArray::kHeaderSize + 2 * kPointerSize;
|
| + static const int kContextOffset = 0;
|
| + static const int kCachedCodeOffset = 1;
|
| + static const int kLiteralsOffset = 2;
|
| + static const int kOsrAstIdOffset = 3;
|
| + static const int kEntryLength = 4;
|
| + static const int kFirstContextSlot = FixedArray::kHeaderSize +
|
| + (kEntriesStart + kContextOffset) * kPointerSize;
|
| + static const int kFirstCodeSlot = FixedArray::kHeaderSize +
|
| + (kEntriesStart + kCachedCodeOffset) * kPointerSize;
|
| + static const int kFirstOsrAstIdSlot = FixedArray::kHeaderSize +
|
| + (kEntriesStart + kOsrAstIdOffset) * kPointerSize;
|
| static const int kSecondEntryIndex = kEntryLength + kEntriesStart;
|
| static const int kInitialLength = kEntriesStart + kEntryLength;
|
|
|
|
|