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

Side by Side Diff: runtime/vm/kernel_binary_flowgraph.h

Issue 2776373002: Initial steps into streaming the kernel flowgraph (Closed)
Patch Set: Rebase + fix lint error Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/kernel_binary.cc ('k') | runtime/vm/kernel_binary_flowgraph.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
7
8 #if !defined(DART_PRECOMPILED_RUNTIME)
9
10 #include <map>
11
12 #include "vm/kernel.h"
13 #include "vm/kernel_binary.h"
14 #include "vm/kernel_to_il.h"
15 #include "vm/object.h"
16
17 namespace dart {
18 namespace kernel {
19
20 class StreamingFlowGraphBuilder {
21 public:
22 StreamingFlowGraphBuilder(FlowGraphBuilder* flowGraph_builder,
23 const uint8_t* buffer,
24 intptr_t buffer_length)
25 : flow_graph_builder_(flowGraph_builder),
26 reader_(new kernel::Reader(buffer, buffer_length)) {}
27
28 virtual ~StreamingFlowGraphBuilder() { delete reader_; }
29
30 Fragment BuildAt(intptr_t kernel_offset);
31
32 private:
33 TokenPosition ReadPosition(bool record = true);
34
35 CatchBlock* catch_block();
36
37 Fragment DebugStepCheck(TokenPosition position);
38 Fragment LoadLocal(LocalVariable* variable);
39 Fragment PushArgument();
40 Fragment RethrowException(TokenPosition position, int catch_try_index);
41
42 Fragment BuildRethrow();
43
44 FlowGraphBuilder* flow_graph_builder_;
45 kernel::Reader* reader_;
46 };
47
48 } // namespace kernel
49 } // namespace dart
50
51 #endif // !defined(DART_PRECOMPILED_RUNTIME)
52 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
OLDNEW
« no previous file with comments | « runtime/vm/kernel_binary.cc ('k') | runtime/vm/kernel_binary_flowgraph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698