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

Unified Diff: src/mark-compact.cc

Issue 101853003: Cache optimized code for OSR. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 578d580159a21fbab3a92dd8bb109e7eb985a32c..4f57e9b12dd7ffc29fd9f2f2c79da63ab22438aa 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1070,7 +1070,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;
@@ -1114,6 +1115,10 @@ void CodeFlusher::ProcessOptimizedCodeMaps() {
Marking::MarkBitFrom(HeapObject::cast(*literals_slot))));
isolate_->heap()->mark_compact_collector()->
RecordSlot(literals_slot, literals_slot, *literals_slot);
+
+ // Update OSR AST id. No write barrier necessary for a smi.
+ ASSERT(code_map->get(i + kOsrAstIdOffset)->IsSmi());
+ code_map->set(new_length++, code_map->get(i + kOsrAstIdOffset));
}
// Trim the optimized code map if entries have been removed.
« src/code-stubs-hydrogen.cc ('K') | « src/hydrogen-instructions.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698