Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Unified Diff: src/objects.h

Issue 2642933003: Revert of Revert [TypeFeedbackVector] Root literal arrays in function literal slots (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/object-stats.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index d3688abc3a1ea4872b069fb043b1a45dc69f4d60..77bc06430c7f4730b27412dd56742a9f6354b31a 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4987,8 +4987,10 @@
return OffsetOfElementAt(index + kFirstLiteralIndex);
}
+ inline bool has_feedback_vector() const;
inline TypeFeedbackVector* feedback_vector() const;
inline void set_feedback_vector(TypeFeedbackVector* vector);
+
inline Object* literal(int literal_index) const;
inline void set_literal(int literal_index, Object* literal);
inline void set_literal_undefined(int literal_index);
@@ -7125,12 +7127,6 @@
kStringIteratorNext,
};
-// Result of searching in an optimized code map of a SharedFunctionInfo. Note
-// that both {code} and {literals} can be NULL to pass search result status.
-struct CodeAndLiterals {
- Code* code; // Cached optimized code.
- LiteralsArray* literals; // Cached literals array.
-};
// SharedFunctionInfo describes the JSFunction information that can be
// shared by multiple instances of the function.
@@ -7162,11 +7158,7 @@
DECL_ACCESSORS(optimized_code_map, FixedArray)
// Returns entry from optimized code map for specified context and OSR entry.
- // Note that {code == nullptr, literals == nullptr} indicates no matching
- // entry has been found, whereas {code, literals == nullptr} indicates that
- // code is context-independent.
- CodeAndLiterals SearchOptimizedCodeMap(Context* native_context,
- BailoutId osr_ast_id);
+ Code* SearchOptimizedCodeMap(Context* native_context, BailoutId osr_ast_id);
// Clear optimized code map.
void ClearOptimizedCodeMap();
@@ -7188,12 +7180,9 @@
Handle<SharedFunctionInfo> shared, Handle<Context> native_context);
// Add or update entry in the optimized code map for context-dependent code.
- // If {code} is not given, then an existing entry's code won't be overwritten.
static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared,
Handle<Context> native_context,
- MaybeHandle<Code> code,
- Handle<LiteralsArray> literals,
- BailoutId osr_ast_id);
+ Handle<Code> code, BailoutId osr_ast_id);
// Set up the link between shared function info and the script. The shared
// function info is added to the list on the script.
@@ -7204,8 +7193,7 @@
static const int kEntriesStart = 0;
static const int kContextOffset = 0;
static const int kCachedCodeOffset = 1;
- static const int kLiteralsOffset = 2;
- static const int kEntryLength = 3;
+ static const int kEntryLength = 2;
static const int kInitialLength = kEntriesStart + kEntryLength;
static const int kNotFound = -1;
@@ -7217,8 +7205,6 @@
static const int kOffsetToPreviousCachedCode =
FixedArray::kHeaderSize +
kPointerSize * (kCachedCodeOffset - kEntryLength);
- static const int kOffsetToPreviousLiterals =
- FixedArray::kHeaderSize + kPointerSize * (kLiteralsOffset - kEntryLength);
// [scope_info]: Scope info.
DECL_ACCESSORS(scope_info, ScopeInfo)
@@ -8168,6 +8154,7 @@
// access to. For API objects we store the boilerplate in the literal array.
DECL_ACCESSORS(literals, LiteralsArray)
+ inline bool has_literals_array() const;
static void EnsureLiterals(Handle<JSFunction> function);
inline TypeFeedbackVector* feedback_vector();
« no previous file with comments | « src/heap/object-stats.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698