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

Unified Diff: src/objects.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
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | src/parsing/parser-base.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 9a903f1ff59ad217d25a74e53589927ea1d12ff7..f7812a4332bc4c6f0748bb25f14926e7973fe411 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13638,8 +13638,10 @@ MaybeHandle<SharedFunctionInfo> Script::FindSharedFunctionInfo(
if (fun->function_token_position() == shared->function_token_position() &&
fun->start_position() == shared->start_position() &&
fun->end_position() == shared->end_position()) {
+ DCHECK_EQ(fun->function_literal_id(), shared->function_literal_id());
return Handle<SharedFunctionInfo>(shared);
}
+ DCHECK_NE(fun->function_literal_id(), shared->function_literal_id());
}
return MaybeHandle<SharedFunctionInfo>();
}
@@ -13991,6 +13993,7 @@ void SharedFunctionInfo::InitFromFunctionLiteral(
shared_info->set_requires_class_field_init(lit->requires_class_field_init());
shared_info->set_is_class_field_initializer(
lit->is_class_field_initializer());
+ shared_info->set_function_literal_id(lit->function_literal_id());
SetExpectedNofPropertiesFromEstimate(shared_info, lit);
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | src/parsing/parser-base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698