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

Unified Diff: src/scopeinfo.cc

Issue 2943002: Reimplement stack manipulations for LiveEdit (Closed)
Patch Set: follow codereview Created 10 years, 5 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/scopeinfo.h ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopeinfo.cc
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
index 2091ca726caf05c131b3429ed2a7844eb1f44b94..96922071d3811675590847b40cde86a94e03dda5 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -244,7 +244,7 @@ static Object** ReadList(Object** p,
template<class Allocator>
-ScopeInfo<Allocator>::ScopeInfo(Code* code)
+ScopeInfo<Allocator>::ScopeInfo(Code* code, FunctionScopeState scope_state)
: function_name_(Factory::empty_symbol()),
parameters_(4),
stack_slots_(8),
@@ -259,6 +259,12 @@ ScopeInfo<Allocator>::ScopeInfo(Code* code)
p = ReadList<Allocator>(p, &context_slots_, &context_modes_);
p = ReadList<Allocator>(p, &parameters_);
p = ReadList<Allocator>(p, &stack_slots_);
+ if (scope_state == FUNCTION_SCOPE_NOT_ENTERED) {
+ // Remove all locals from scope info if we are in restarted state.
+ context_slots_.Rewind(0);
+ context_modes_.Rewind(0);
+ stack_slots_.Rewind(0);
+ }
ASSERT((p - p0) * kPointerSize == code->sinfo_size());
}
« no previous file with comments | « src/scopeinfo.h ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698