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

Unified Diff: runtime/vm/kernel_binary_flowgraph.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_binary_flowgraph.h
diff --git a/runtime/vm/kernel_binary_flowgraph.h b/runtime/vm/kernel_binary_flowgraph.h
new file mode 100644
index 0000000000000000000000000000000000000000..cab24b13f15fe7add2bfc4ef4a9457bd04a5181d
--- /dev/null
+++ b/runtime/vm/kernel_binary_flowgraph.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
+#define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
+#include <map>
+
+#include "vm/kernel.h"
+#include "vm/kernel_binary.h"
+#include "vm/kernel_to_il.h"
+#include "vm/object.h"
+
+namespace dart {
+namespace kernel {
+
+class KernelFlowgraphBuilder {
Kevin Millikin (Google) 2017/03/28 12:50:00 I'd call this something like StreamingFlowGraphBui
jensj 2017/03/29 09:30:42 Done.
+ public:
+ KernelFlowgraphBuilder(FlowGraphBuilder* flowGraph_builder,
+ const uint8_t* buffer,
+ intptr_t buffer_length)
+ : flowGraph_builder_(flowGraph_builder),
+ reader_(new kernel::Reader(buffer, buffer_length)) {}
+
+ virtual ~KernelFlowgraphBuilder() { delete reader_; }
+
+ Fragment BuildAt(int64_t kernel_offset);
+
+ private:
+ Fragment buildRethrow();
Kevin Millikin (Google) 2017/03/28 12:50:00 BuildRethrow()
jensj 2017/03/29 09:30:42 Done.
+
+ FlowGraphBuilder* flowGraph_builder_;
Kevin Millikin (Google) 2017/03/28 12:50:00 flow_graph_builder_ or possibly flowgraph_builder_
jensj 2017/03/29 09:30:42 Done.
+ kernel::Reader* reader_;
+};
+
+} // namespace kernel
+} // namespace dart
+
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
+#endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_

Powered by Google App Engine
This is Rietveld 408576698