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

Unified Diff: src/parser.h

Issue 3586006: Begin a more aggressive refactoring of the Compiler interface. (Closed)
Patch Set: Always return false on a parse failure. Created 10 years, 2 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/liveedit.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 99ed22a2f8a0c176cbc216726c576ec34b318aad..7142551c2200a88215a69405d77d20f84090223f 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -35,6 +35,7 @@
namespace v8 {
namespace internal {
+class CompilationInfo;
class FuncNameInferrer;
class ParserFactory;
class ParserLog;
@@ -183,17 +184,10 @@ class Parser {
ParserFactory* factory, ParserLog* log, ScriptDataImpl* pre_data);
virtual ~Parser() { }
- // Takes a script and and context information, and builds a
- // FunctionLiteral AST node. Returns NULL and deallocates any allocated
- // AST nodes if parsing failed.
- static FunctionLiteral* MakeAST(bool compile_in_global_context,
- Handle<Script> script,
- v8::Extension* extension,
- ScriptDataImpl* pre_data,
- bool is_json = false);
-
- // Support for doing lazy compilation.
- static FunctionLiteral* MakeLazyAST(Handle<SharedFunctionInfo> info);
+ // Parses the source code represented by the compilation info and sets its
+ // function literal. Returns false (and deallocates any allocated AST
+ // nodes) if parsing failed.
+ static bool Parse(CompilationInfo* info);
// Generic preparser generating full preparse data.
static ScriptDataImpl* PreParse(Handle<String> source,
« no previous file with comments | « src/liveedit.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698