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

Unified Diff: src/objects.cc

Issue 1884143003: [compiler] Allow optimization of top-level eval code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-simplify-13
Patch Set: Fix comment typo. Created 4 years, 7 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/ast-graph-builder.cc ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »
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 e6ddc0cdfa04d92b4e7d7a4a630d2eaa05cbc992..b80dfe4bb8720ea9ff4e71e4785d2c5c32bb9f66 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12773,7 +12773,11 @@ MaybeHandle<SharedFunctionInfo> Script::FindSharedFunctionInfo(
SharedFunctionInfo* shared;
while ((shared = iterator.Next<SharedFunctionInfo>())) {
if (fun->function_token_position() == shared->function_token_position() &&
- fun->start_position() == shared->start_position()) {
+ fun->start_position() == shared->start_position() &&
+ fun->end_position() == shared->end_position()) {
+ // This method is not used to find top-level SharedFunctionInfo objects,
+ // verify that above checks are sufficient to distinguish top-level code.
+ DCHECK(!shared->is_toplevel());
return Handle<SharedFunctionInfo>(shared);
}
}
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698