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

Unified Diff: src/objects.h

Issue 1516833002: Tighten the interface to the optimized code map (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moved definition to private section. Created 5 years 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/factory.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 8960f92b7f9d0cd9b68339b9bf878f309ecc908e..165d88940f0dea7ac3461a7cd1e1e2c6f634aefd 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6509,14 +6509,19 @@ class SharedFunctionInfo: public HeapObject {
Handle<Code> code);
// Add a new entry to the optimized code map for context-dependent code.
- // |code| is either a code object or an undefined value. In the latter case
- // the entry just maps |native_context, osr_ast_id| pair to |literals| array.
- static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared,
- Handle<Context> native_context,
- Handle<HeapObject> code,
- Handle<LiteralsArray> literals,
- BailoutId osr_ast_id);
+ inline static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared,
+ Handle<Context> native_context,
+ Handle<Code> code,
+ Handle<LiteralsArray> literals,
+ BailoutId osr_ast_id);
+ // We may already have cached the code, but want to store literals in the
+ // cache.
+ inline static void AddLiteralsToOptimizedCodeMap(
+ Handle<SharedFunctionInfo> shared, Handle<Context> native_context,
+ Handle<LiteralsArray> literals);
+
+ public:
Michael Starzinger 2015/12/10 15:43:48 nit: Please also drop this re-public. :)
mvstanton 2015/12/10 18:09:33 <sheepish> New CL (https://codereview.chromium.org
// Set up the link between shared function info and the script. The shared
// function info is added to the list on the script.
static void SetScript(Handle<SharedFunctionInfo> shared,
@@ -7123,6 +7128,13 @@ class SharedFunctionInfo: public HeapObject {
int SearchOptimizedCodeMapEntry(Context* native_context,
BailoutId osr_ast_id);
+ // If code is undefined, then existing code won't be overwritten.
+ static void AddToOptimizedCodeMapInternal(Handle<SharedFunctionInfo> shared,
+ Handle<Context> native_context,
+ Handle<HeapObject> code,
+ Handle<LiteralsArray> literals,
+ BailoutId osr_ast_id);
+
DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo);
};
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698