Commit 888eeccd authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

Re-parse the whole script on debug evaluate

This CL changes the {ScopeIterator} to re-parse the whole script instead
of just the immediate function. The result are accurate parent scopes,
which will enable better variable lookup for debug evaluation.

Drive-by: Remove unused IGNORE_NESTED_SCOPES ScopeIterator::Option and
refactor ScopeIteartor::Next.

Change-Id: I6cb9d303fe5f84da4f4b11c6e2057f07c232316c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1771785Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63592}
parent 6cf9cb49
This diff is collapsed.
......@@ -41,7 +41,7 @@ class ScopeIterator {
static const int kScopeDetailsFunctionIndex = 5;
static const int kScopeDetailsSize = 6;
enum Option { DEFAULT, IGNORE_NESTED_SCOPES, COLLECT_NON_LOCALS };
enum Option { DEFAULT, COLLECT_NON_LOCALS };
ScopeIterator(Isolate* isolate, FrameInspector* frame_inspector,
Option options = DEFAULT);
......@@ -120,12 +120,13 @@ class ScopeIterator {
return frame_inspector_->javascript_frame();
}
void AdvanceOneScope();
void AdvanceToNonHiddenScope();
int GetSourcePosition();
void TryParseAndRetrieveScopes(ScopeIterator::Option option);
void RetrieveScopeChain(DeclarationScope* scope);
void UnwrapEvaluationContext();
using Visitor =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment