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

Unified Diff: src/objects.h

Issue 100613004: Use optimized code map to cache OSR code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: correctly upload stuff Created 7 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/mark-compact.cc ('k') | src/objects.cc » ('j') | src/runtime.cc » ('J')
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 bbdefc14a5942122092dd2f82345b4b4d73a2bb6..b7e85e55a44e90dca680a3c048637cdbe874d4eb 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -5356,6 +5356,7 @@ class Code: public HeapObject {
void ClearTypeFeedbackCells(Heap* heap);
BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
+ uint32_t TranslateAstIdToPcOffset(BailoutId ast_id);
#define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge,
enum Age {
@@ -6537,7 +6538,7 @@ class SharedFunctionInfo: public HeapObject {
// 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);
+ 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.
@@ -6555,18 +6556,22 @@ 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 kEntryLength = 4;
static const int kFirstContextSlot = FixedArray::kHeaderSize + kPointerSize;
static const int kFirstCodeSlot = FixedArray::kHeaderSize + 2 * kPointerSize;
+ static const int kFirstOsrAstIdSlot =
+ FixedArray::kHeaderSize + 4 * kPointerSize;
static const int kSecondEntryIndex = kEntryLength + kEntriesStart;
static const int kInitialLength = kEntriesStart + kEntryLength;
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698