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

Unified Diff: src/compiler.cc

Issue 2481163002: Assign unique IDs to FunctionLiterals (Closed)
Patch Set: updates Created 4 years, 1 month 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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 57a010c3162076cd4183959d47d0a13c596281eb..1c94c9ed14231048baa0e9f5130101a18804c2a5 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1001,6 +1001,7 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
result = NewSharedFunctionInfoForLiteral(isolate, lit, script);
result->set_is_toplevel(true);
parse_info->set_shared_info(result);
+ parse_info->set_function_literal_id(result->function_literal_id());
// Compile the code.
if (!CompileUnoptimizedCode(info)) {
@@ -1588,6 +1589,7 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo(
CompilationInfo info(&parse_info, Handle<JSFunction>::null());
parse_info.set_literal(literal);
parse_info.set_shared_info(result);
+ parse_info.set_function_literal_id(result->function_literal_id());
parse_info.set_language_mode(literal->scope()->language_mode());
parse_info.set_ast_value_factory(
outer_info->parse_info()->ast_value_factory());

Powered by Google App Engine
This is Rietveld 408576698