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

Unified Diff: src/compiler.cc

Issue 1888013002: 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 2426eb356f4eb4adce41eded21862f6f982d50b4..9cec9f3aadd82dd39697485e9997827d7e230108 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1268,9 +1268,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);
@@ -1279,7 +1278,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;
@@ -1291,10 +1290,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, Handle<JSFunction>::null());
@@ -1304,6 +1299,8 @@
parse_info.set_parse_restriction(restriction);
parse_info.set_context(context);
+ Debug::RecordEvalCaller(script);
+
shared_info = CompileToplevel(&info);
if (shared_info.is_null()) {
@@ -1319,7 +1316,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