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

Unified Diff: src/parsing/parsing.cc

Issue 2687973003: Revert of [Compiler] Enable handles created during parsing and scope analysis to be deferred. (Closed)
Patch Set: Created 3 years, 10 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/parsing/parsing.h ('k') | src/pending-compilation-error-handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parsing.cc
diff --git a/src/parsing/parsing.cc b/src/parsing/parsing.cc
index ede13ac9953ec069f0053404a9612ffbc13d66c0..db07bde7c7a77977727ceb7909a7ade54fcdcaf4 100644
--- a/src/parsing/parsing.cc
+++ b/src/parsing/parsing.cc
@@ -15,7 +15,7 @@
namespace internal {
namespace parsing {
-bool ParseProgram(ParseInfo* info, bool internalize) {
+bool ParseProgram(ParseInfo* info) {
DCHECK(info->is_toplevel());
DCHECK_NULL(info->literal());
@@ -29,19 +29,14 @@
parser.SetCachedData(info);
result = parser.ParseProgram(isolate, info);
info->set_literal(result);
- if (result == nullptr) {
- parser.ReportErrors(isolate, info->script());
- } else {
+ parser.Internalize(isolate, info->script(), result == nullptr);
+ if (result != nullptr) {
info->set_language_mode(info->literal()->language_mode());
- }
- parser.UpdateStatistics(isolate, info->script());
- if (internalize) {
- info->ast_value_factory()->Internalize(isolate);
}
return (result != nullptr);
}
-bool ParseFunction(ParseInfo* info, bool internalize) {
+bool ParseFunction(ParseInfo* info) {
DCHECK(!info->is_toplevel());
DCHECK_NULL(info->literal());
@@ -54,19 +49,12 @@
result = parser.ParseFunction(isolate, info);
info->set_literal(result);
- if (result == nullptr) {
- parser.ReportErrors(isolate, info->script());
- }
- parser.UpdateStatistics(isolate, info->script());
- if (internalize) {
- info->ast_value_factory()->Internalize(isolate);
- }
+ parser.Internalize(isolate, info->script(), result == nullptr);
return (result != nullptr);
}
-bool ParseAny(ParseInfo* info, bool internalize) {
- return info->is_toplevel() ? ParseProgram(info, internalize)
- : ParseFunction(info, internalize);
+bool ParseAny(ParseInfo* info) {
+ return info->is_toplevel() ? ParseProgram(info) : ParseFunction(info);
}
} // namespace parsing
« no previous file with comments | « src/parsing/parsing.h ('k') | src/pending-compilation-error-handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698