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

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

Issue 1002673002: Remove funky 2-stage initialization of ParserInfo and an adventurous memset. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed TODOs Created 5 years, 9 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/parser.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 935399e4330e842b3d05569634b2f7bf6121e916..1856396094fadd005c80c0fdffe1fa8074a43c5f 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -1201,11 +1201,10 @@ 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.
- info.InitializeFromScript(script);
+ ParseInfo info(&zone, script);
if (scope_info->scope_type() == SCRIPT_SCOPE) {
info.set_global();
} else {
@@ -1219,7 +1218,7 @@ class ScopeIterator {
RetrieveScopeChain(scope, shared_info);
} else {
// Function code
- info.InitializeFromSharedFunctionInfo(shared_info);
+ ParseInfo info(&zone, shared_info);
if (Parser::ParseStatic(&info) && Scope::Analyze(&info)) {
scope = info.function()->scope();
}
« no previous file with comments | « src/parser.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698