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

Unified Diff: runtime/vm/compiler.h

Issue 1663163003: Initial split of precompilation code from compiler.cc (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/compiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.h
diff --git a/runtime/vm/compiler.h b/runtime/vm/compiler.h
index 4aa4249e348c644f3686f8c4803cc1eddb548f22..142f70401519644cc6f7d6710f215f17acb1520f 100644
--- a/runtime/vm/compiler.h
+++ b/runtime/vm/compiler.h
@@ -17,7 +17,9 @@ class BackgroundCompilationQueue;
class Class;
class Code;
class CompilationWorkQueue;
+class FlowGraph;
class Function;
+class IndirectGotoInstr;
class Library;
class ParsedFunction;
class QueueElement;
@@ -26,6 +28,54 @@ class Script;
class SequenceNode;
+class CompilationPipeline : public ZoneAllocated {
+ public:
+ static CompilationPipeline* New(Zone* zone, const Function& function);
+
+ virtual void ParseFunction(ParsedFunction* parsed_function) = 0;
+ virtual FlowGraph* BuildFlowGraph(
+ Zone* zone,
+ ParsedFunction* parsed_function,
+ const ZoneGrowableArray<const ICData*>& ic_data_array,
+ intptr_t osr_id) = 0;
+ virtual void FinalizeCompilation() = 0;
+ virtual ~CompilationPipeline() { }
+};
+
+
+class DartCompilationPipeline : public CompilationPipeline {
+ public:
+ virtual void ParseFunction(ParsedFunction* parsed_function);
+
+ virtual FlowGraph* BuildFlowGraph(
+ Zone* zone,
+ ParsedFunction* parsed_function,
+ const ZoneGrowableArray<const ICData*>& ic_data_array,
+ intptr_t osr_id);
+
+ virtual void FinalizeCompilation();
+};
+
+
+class IrregexpCompilationPipeline : public CompilationPipeline {
+ public:
+ IrregexpCompilationPipeline() : backtrack_goto_(NULL) { }
+
+ virtual void ParseFunction(ParsedFunction* parsed_function);
+
+ virtual FlowGraph* BuildFlowGraph(
+ Zone* zone,
+ ParsedFunction* parsed_function,
+ const ZoneGrowableArray<const ICData*>& ic_data_array,
+ intptr_t osr_id);
+
+ virtual void FinalizeCompilation();
+
+ private:
+ IndirectGotoInstr* backtrack_goto_;
+};
+
+
class Compiler : public AllStatic {
public:
static const intptr_t kNoOSRDeoptId = Thread::kNoDeoptId;
@@ -82,7 +132,6 @@ class Compiler : public AllStatic {
// The return value is either a RawInstance on success or a RawError
// on compilation failure.
static RawObject* EvaluateStaticInitializer(const Field& field);
- static void CompileStaticInitializer(const Field& field);
// Generates local var descriptors and sets it in 'code'. Do not call if the
// local var descriptor already exists.
@@ -93,7 +142,7 @@ class Compiler : public AllStatic {
// Returns Error::null() if there is no compilation error.
static RawError* CompileAllFunctions(const Class& cls);
- static bool always_optimize();
+ static void DisassembleCode(const Function& function, bool optimized);
};
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698