| 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, ¶meters_);
|
| 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());
|
| }
|
|
|
|
|