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

Unified Diff: src/runtime/runtime-debug.cc

Issue 974213002: Extract ParseInfo from CompilationInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 9d69294fea88da0512ec20a7945e42796e7a762e..d4f968756ba655b714bc11ba6bffac53a447db46 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -6,6 +6,7 @@
#include "src/accessors.h"
#include "src/arguments.h"
+#include "src/compiler.h"
#include "src/debug.h"
#include "src/deoptimizer.h"
#include "src/isolate-inl.h"
@@ -1197,16 +1198,18 @@ class ScopeIterator {
// Check whether we are in global, eval or function code.
Handle<ScopeInfo> scope_info(shared_info->scope_info());
+ Zone zone;
+ ParseInfo info(&zone);
if (scope_info->scope_type() != FUNCTION_SCOPE &&
scope_info->scope_type() != ARROW_SCOPE) {
// Global or eval code.
- CompilationInfoWithZone info(script);
+ info.InitializeFromScript(script);
if (scope_info->scope_type() == SCRIPT_SCOPE) {
- info.MarkAsGlobal();
+ info.set_global();
} else {
DCHECK(scope_info->scope_type() == EVAL_SCOPE);
- info.MarkAsEval();
- info.SetContext(Handle<Context>(function_->context()));
+ info.set_eval();
+ info.set_context(Handle<Context>(function_->context()));
}
if (Parser::ParseStatic(&info) && Scope::Analyze(&info)) {
scope = info.function()->scope();
@@ -1214,7 +1217,7 @@ class ScopeIterator {
RetrieveScopeChain(scope, shared_info);
} else {
// Function code
- CompilationInfoWithZone info(shared_info);
+ info.InitializeFromSharedFunctionInfo(shared_info);
if (Parser::ParseStatic(&info) && Scope::Analyze(&info)) {
scope = info.function()->scope();
}

Powered by Google App Engine
This is Rietveld 408576698