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

Unified Diff: src/compiler.cc

Issue 2413673002: Mark ParseInfo as eval in the constructors (Closed)
Patch Set: fix 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 | « no previous file | src/parsing/parse-info.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 44b50797927faee0b386cc204207216886186633..eb2e1839af4a93ee62a5c339b443307f352e3132 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -251,12 +251,6 @@ void CompilationJob::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) {
namespace {
-bool IsEvalToplevel(Handle<SharedFunctionInfo> shared) {
- return shared->is_toplevel() && shared->script()->IsScript() &&
- Script::cast(shared->script())->compilation_type() ==
- Script::COMPILATION_TYPE_EVAL;
-}
-
bool Parse(ParseInfo* info) {
// Create a canonical handle scope if compiling ignition bytecode. This is
// required by the constant array builder to de-duplicate objects without
@@ -705,11 +699,6 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
info->MarkAsOptimizeFromBytecode();
}
- if (IsEvalToplevel(shared)) {
- parse_info->set_eval();
- parse_info->set_allow_lazy_parsing(false);
- }
-
// Verify that OSR compilations are delegated to the correct graph builder.
// Depending on the underlying frame the semantics of the {BailoutId} differ
// and the various graph builders hard-code a certain semantic:
@@ -1234,10 +1223,6 @@ bool Compiler::CompileDebugCode(Handle<JSFunction> function) {
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, function);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
- if (IsEvalToplevel(handle(function->shared()))) {
- parse_info.set_eval();
- parse_info.set_allow_lazy_parsing(false);
- }
info.MarkAsDebug();
if (GetUnoptimizedCode(&info).is_null()) {
isolate->clear_pending_exception();
@@ -1259,10 +1244,6 @@ bool Compiler::CompileDebugCode(Handle<SharedFunctionInfo> shared) {
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, shared);
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
- if (IsEvalToplevel(shared)) {
- parse_info.set_eval();
- parse_info.set_allow_lazy_parsing(false);
- }
info.MarkAsDebug();
if (GetUnoptimizedCode(&info).is_null()) {
isolate->clear_pending_exception();
« no previous file with comments | « no previous file | src/parsing/parse-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698