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

Unified Diff: runtime/vm/kernel_to_il.h

Issue 2776373002: Initial steps into streaming the kernel flowgraph (Closed)
Patch Set: Changed type Created 3 years, 9 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
Index: runtime/vm/kernel_to_il.h
diff --git a/runtime/vm/kernel_to_il.h b/runtime/vm/kernel_to_il.h
index fe96738262193dcae379059c83c6a8823a6fc7df..791842f6209137d8af644b94200cc9822588cc52 100644
--- a/runtime/vm/kernel_to_il.h
+++ b/runtime/vm/kernel_to_il.h
@@ -721,7 +721,6 @@ class ScopeBuilder : public RecursiveVisitor {
intptr_t name_index_;
};
-
class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor {
public:
FlowGraphBuilder(TreeNode* node,
@@ -1051,16 +1050,48 @@ class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor {
DartTypeTranslator type_translator_;
ConstantEvaluator constant_evaluator_;
+ Library* library_;
Kevin Millikin (Google) 2017/03/28 12:50:00 Instead of the Library (which we eventually won't
jensj 2017/03/29 09:30:42 I for one cannot figure out how to make it compile
+
friend class BreakableBlock;
friend class CatchBlock;
friend class ConstantEvaluator;
friend class DartTypeTranslator;
+ friend class KernelFlowgraphBuilder;
friend class ScopeBuilder;
friend class SwitchBlock;
friend class TryCatchBlock;
friend class TryFinallyBlock;
};
+
+class CatchBlock {
+ public:
+ CatchBlock(FlowGraphBuilder* builder,
+ LocalVariable* exception_var,
+ LocalVariable* stack_trace_var,
+ intptr_t catch_try_index)
+ : builder_(builder),
+ outer_(builder->catch_block_),
+ exception_var_(exception_var),
+ stack_trace_var_(stack_trace_var),
+ catch_try_index_(catch_try_index) {
+ builder_->catch_block_ = this;
+ }
+ ~CatchBlock() { builder_->catch_block_ = outer_; }
+
+ LocalVariable* exception_var() { return exception_var_; }
+ LocalVariable* stack_trace_var() { return stack_trace_var_; }
+ intptr_t catch_try_index() { return catch_try_index_; }
+
+ private:
+ FlowGraphBuilder* builder_;
+ CatchBlock* outer_;
+ LocalVariable* exception_var_;
+ LocalVariable* stack_trace_var_;
+ intptr_t catch_try_index_;
+};
+
+
RawObject* EvaluateMetadata(TreeNode* const kernel_node);
RawObject* BuildParameterDescriptor(TreeNode* const kernel_node);

Powered by Google App Engine
This is Rietveld 408576698