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

Unified Diff: src/mark-compact.cc

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/hydrogen-instructions.h ('k') | src/objects.h » ('j') | src/runtime.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 0e6b9804e09fe6776b0b61d97362d1d3ecf223ab..bc14bb495a307acf75079b88bc93a535a3e8e2cd 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1068,7 +1068,8 @@ void CodeFlusher::ProcessOptimizedCodeMaps() {
static const int kContextOffset = 0;
static const int kCodeOffset = 1;
static const int kLiteralsOffset = 2;
- STATIC_ASSERT(kEntryLength == 3);
+ static const int kOsrAstIdOffset = 3;
+ STATIC_ASSERT(kEntryLength == 4);
SharedFunctionInfo* holder = optimized_code_map_holder_head_;
SharedFunctionInfo* next_holder;
@@ -1112,6 +1113,10 @@ void CodeFlusher::ProcessOptimizedCodeMaps() {
Marking::MarkBitFrom(HeapObject::cast(*literals_slot))));
isolate_->heap()->mark_compact_collector()->
RecordSlot(literals_slot, literals_slot, *literals_slot);
+
+ // Update and record the osr ast id slot in the optimized code map.
+ code_map->set(new_length++, code_map->get(i + kOsrAstIdOffset));
+ ASSERT(code_map->get(i + kOsrAstIdOffset)->IsSmi());
}
// Trim the optimized code map if entries have been removed.
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/objects.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698