OLD | NEW |
(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_ |
OLD | NEW |