Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 7ef75a164234752dce6b742145fdb9fad150e99a..eeceba470ef45d0efed7d2c8d2bcfb8745739d02 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -1224,8 +1224,9 @@ void Compiler::CompileForLiveEdit(Handle<Script> script) { |
MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( |
Handle<String> source, Handle<SharedFunctionInfo> outer_info, |
Handle<Context> context, LanguageMode language_mode, |
- ParseRestriction restriction, int line_offset, int column_offset, |
- Handle<Object> script_name, ScriptOriginOptions options) { |
+ ParseRestriction restriction, int eval_scope_position, int eval_position, |
+ 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); |
@@ -1234,7 +1235,7 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( |
CompilationCache* compilation_cache = isolate->compilation_cache(); |
MaybeHandle<SharedFunctionInfo> maybe_shared_info = |
compilation_cache->LookupEval(source, outer_info, context, language_mode, |
- line_offset); |
+ eval_scope_position); |
Handle<SharedFunctionInfo> shared_info; |
Handle<Script> script; |
@@ -1246,6 +1247,10 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( |
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()); |
@@ -1255,8 +1260,6 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( |
parse_info.set_parse_restriction(restriction); |
parse_info.set_context(context); |
- Debug::RecordEvalCaller(script); |
- |
shared_info = CompileToplevel(&info); |
if (shared_info.is_null()) { |
@@ -1272,7 +1275,7 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( |
DCHECK(is_sloppy(language_mode) || |
is_strict(shared_info->language_mode())); |
compilation_cache->PutEval(source, outer_info, context, shared_info, |
- line_offset); |
+ eval_scope_position); |
} |
} |