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

Unified Diff: src/compiler.cc

Issue 2392303004: [parser] Remove obsolete ParseInfo::is_global flag. (Closed)
Patch Set: Also renumber flags. Created 4 years, 2 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/background-parsing-task.cc ('k') | src/debug/debug-scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index ec402fa82209339f2bddfcee9066b7e17ef90763..7b391f5a22a2e030eb5a10cc89a0cb0fe0506684 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -719,7 +719,6 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
if (IsEvalToplevel(shared)) {
parse_info->set_eval();
- if (function->context()->IsNativeContext()) parse_info->set_global();
parse_info->set_toplevel();
parse_info->set_allow_lazy_parsing(false);
parse_info->set_lazy(false);
@@ -1059,9 +1058,6 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
isolate->debug()->OnBeforeCompile(script);
- DCHECK(parse_info->is_eval() || parse_info->is_global() ||
- parse_info->is_module());
-
parse_info->set_toplevel();
Handle<SharedFunctionInfo> result;
@@ -1276,7 +1272,6 @@ bool Compiler::CompileDebugCode(Handle<JSFunction> function) {
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
if (IsEvalToplevel(handle(function->shared()))) {
parse_info.set_eval();
- if (function->context()->IsNativeContext()) parse_info.set_global();
parse_info.set_toplevel();
parse_info.set_allow_lazy_parsing(false);
parse_info.set_lazy(false);
@@ -1331,7 +1326,6 @@ MaybeHandle<JSArray> Compiler::CompileForLiveEdit(Handle<Script> script) {
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, script);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
- parse_info.set_global();
info.MarkAsDebug();
// TODO(635): support extensions.
@@ -1481,7 +1475,6 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
ParseInfo parse_info(&zone, script);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
parse_info.set_eval();
- if (context->IsNativeContext()) parse_info.set_global();
parse_info.set_language_mode(language_mode);
parse_info.set_parse_restriction(restriction);
if (!context->IsNativeContext()) {
@@ -1649,11 +1642,7 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, script);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
- if (is_module) {
- parse_info.set_module();
- } else {
- parse_info.set_global();
- }
+ if (is_module) parse_info.set_module();
if (compile_options != ScriptCompiler::kNoCompileOptions) {
parse_info.set_cached_data(cached_data);
}
« no previous file with comments | « src/background-parsing-task.cc ('k') | src/debug/debug-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698