Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 785fa987b71fda3665c638c524f59a7edfc37fc3..20a50d450ff3827d9a5db1842e5032fe91e37181 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -6558,6 +6558,14 @@ enum BuiltinFunctionId { |
}; |
+// Result of searching in an optimized code map of a SharedFunctionInfo. Note |
+// that {code == nullptr} indicates that no entry has been found. |
+struct CodeAndLiterals { |
+ Code* code; // Cached optimized code. |
+ FixedArray* literals; // Cached literals array. |
+}; |
+ |
+ |
// SharedFunctionInfo describes the JSFunction information that can be |
// shared by multiple instances of the function. |
class SharedFunctionInfo: public HeapObject { |
@@ -6573,16 +6581,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 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. |
- FixedArray* GetLiteralsFromOptimizedCodeMap(int index); |
- |
- Code* GetCodeFromOptimizedCodeMap(int index); |
+ // Returns entry from optimized code map for specified context and OSR entry. |
+ // Note that {code == nullptr} indicates no matching entry has been found. |
+ CodeAndLiterals SearchOptimizedCodeMap(Context* native_context, |
+ BailoutId osr_ast_id); |
// Clear optimized code map. |
void ClearOptimizedCodeMap(); |