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

Unified Diff: src/compiler.cc

Issue 1858773004: Revert of Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/compiler.h ('k') | src/compiler/ast-graph-builder.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 a55383d65c38cb196aed1e3ea8c182c99f1effd3..841c950132342db140a11aacebcc89d45cd9981e 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1509,9 +1509,8 @@
MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
Handle<String> source, Handle<SharedFunctionInfo> outer_info,
Handle<Context> context, LanguageMode language_mode,
- ParseRestriction restriction, int eval_position, int line_offset,
- int column_offset, Handle<Object> script_name,
- ScriptOriginOptions options) {
+ ParseRestriction restriction, int line_offset, int column_offset,
+ Handle<Object> script_name, ScriptOriginOptions options) {
Isolate* isolate = source->GetIsolate();
int source_length = source->length();
isolate->counters()->total_eval_size()->Increment(source_length);
@@ -1520,7 +1519,7 @@
CompilationCache* compilation_cache = isolate->compilation_cache();
MaybeHandle<SharedFunctionInfo> maybe_shared_info =
compilation_cache->LookupEval(source, outer_info, context, language_mode,
- eval_position);
+ line_offset);
Handle<SharedFunctionInfo> shared_info;
Handle<Script> script;
@@ -1532,10 +1531,6 @@
script->set_column_offset(column_offset);
}
script->set_origin_options(options);
- script->set_compilation_type(Script::COMPILATION_TYPE_EVAL);
- script->set_eval_from_shared(*outer_info);
- script->set_eval_from_position(eval_position);
-
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, script);
CompilationInfo info(&parse_info);
@@ -1545,6 +1540,8 @@
parse_info.set_parse_restriction(restriction);
parse_info.set_context(context);
+ Debug::RecordEvalCaller(script);
+
shared_info = CompileToplevel(&info);
if (shared_info.is_null()) {
@@ -1560,7 +1557,7 @@
DCHECK(is_sloppy(language_mode) ||
is_strict(shared_info->language_mode()));
compilation_cache->PutEval(source, outer_info, context, shared_info,
- eval_position);
+ line_offset);
}
}
« no previous file with comments | « src/compiler.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698