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

Unified Diff: src/parsing/parser.cc

Issue 2534393002: Split parsing of functions and top-level code into two separate methods (Closed)
Patch Set: Created 4 years 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/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 0c69c92d1ef1ccf8bbb4ef3c06c2d66735566d7a..affdd5a803e4ce497b46ef1b5c24b81a27ec2a7d 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -3833,37 +3833,6 @@ void Parser::Internalize(Isolate* isolate, Handle<Script> script, bool error) {
// ----------------------------------------------------------------------------
marja 2016/11/30 11:30:29 This comment is now obsolete & doesn't belong here
// The Parser interface.
-
-bool Parser::ParseStatic(ParseInfo* info) {
- Parser parser(info);
- if (parser.Parse(info)) {
- info->set_language_mode(info->literal()->language_mode());
- return true;
- }
- return false;
-}
-
-
-bool Parser::Parse(ParseInfo* info) {
- DCHECK(info->literal() == NULL);
- FunctionLiteral* result = NULL;
- // Ok to use Isolate here; this function is only called in the main thread.
- DCHECK(parsing_on_main_thread_);
- Isolate* isolate = info->isolate();
-
- if (info->is_toplevel()) {
marja 2016/11/30 11:30:29 Could you add DCHECKs into the relevant parse func
jochen (gone - plz use gerrit) 2016/11/30 11:49:58 those DCHECKs are already in place
- SetCachedData(info);
- result = ParseProgram(isolate, info);
- } else {
- result = ParseFunction(isolate, info);
- }
- info->set_literal(result);
-
- Internalize(isolate, info->script(), result == NULL);
- return (result != NULL);
-}
-
-
void Parser::ParseOnBackground(ParseInfo* info) {
parsing_on_main_thread_ = false;
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/parsing.h » ('j') | test/cctest/test-parsing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698