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

Unified Diff: src/mark-compact.cc

Issue 16955008: Enable weak embedded maps in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 0501ccf5805a0c752a01c4876895ba2b7863bf53..43ad7e99f14a22dd5cb29d71ca91ec43d01854b2 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -2055,6 +2055,17 @@ void MarkCompactCollector::MarkRoots(RootMarkingVisitor* visitor) {
// etc., and all objects reachable from them.
heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG);
+ // If the call-site of the top optimized code was not prepared for
+ // deoptimization, then treat the maps in the code as strong pointers,
+ // otherwise a map can die and deoptimize the code.
Michael Starzinger 2013/07/02 14:20:54 Can we move this into MarkCompactCollector::MarkLi
ulan 2013/07/02 14:45:41 Done.
+ StackFrame* frame = isolate()->TopOptimizedFrame();
+ if (frame) {
+ Code* code = frame->LookupCode();
+ if (!code->CanDeoptAt(frame->pc())) {
+ code->CodeIterateBody(visitor);
+ }
+ }
+
// Handle the string table specially.
MarkStringTable();

Powered by Google App Engine
This is Rietveld 408576698