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

Unified Diff: src/deoptimizer.cc

Issue 1122083002: Remove materialized objects on stack unwind. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks, do not unwind the handler's frame Created 5 years, 8 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
« no previous file with comments | « src/deoptimizer.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 13c282da9e6a8a4058dc084eb974ad72118f4b8a..94de738ac1f325b2d56e15b60692784f50cd4042 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -2017,7 +2017,8 @@ void Deoptimizer::MaterializeHeapObjects(JavaScriptFrameIterator* it) {
}
if (prev_materialized_count_ > 0) {
- materialized_store->Remove(stack_fp_);
+ bool removed = materialized_store->Remove(stack_fp_);
+ CHECK(removed);
}
}
@@ -3679,17 +3680,21 @@ void MaterializedObjectStore::Set(Address fp,
}
-void MaterializedObjectStore::Remove(Address fp) {
+bool MaterializedObjectStore::Remove(Address fp) {
int index = StackIdToIndex(fp);
+ if (index == -1) {
+ return false;
+ }
CHECK_GE(index, 0);
frame_fps_.Remove(index);
- Handle<FixedArray> array = GetStackEntries();
+ FixedArray* array = isolate()->heap()->materialized_objects();
CHECK_LT(index, array->length());
for (int i = index; i < frame_fps_.length(); i++) {
array->set(i, array->get(i + 1));
}
array->set(frame_fps_.length(), isolate()->heap()->undefined_value());
+ return true;
}
« no previous file with comments | « src/deoptimizer.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698