OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
7 | 7 |
8 #include "src/compiler/bytecode-analysis.h" | 8 #include "src/compiler/bytecode-analysis.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
11 #include "src/compiler/state-values-utils.h" | 11 #include "src/compiler/state-values-utils.h" |
12 #include "src/interpreter/bytecode-array-iterator.h" | 12 #include "src/interpreter/bytecode-array-iterator.h" |
13 #include "src/interpreter/bytecode-flags.h" | 13 #include "src/interpreter/bytecode-flags.h" |
14 #include "src/interpreter/bytecodes.h" | 14 #include "src/interpreter/bytecodes.h" |
15 #include "src/source-position-table.h" | 15 #include "src/source-position-table.h" |
16 | 16 |
17 namespace v8 { | 17 namespace v8 { |
18 namespace internal { | 18 namespace internal { |
19 | |
20 class CompilationInfo; | |
21 | |
22 namespace compiler { | 19 namespace compiler { |
23 | 20 |
24 class SourcePositionTable; | 21 class SourcePositionTable; |
25 | 22 |
26 // The BytecodeGraphBuilder produces a high-level IR graph based on | 23 // The BytecodeGraphBuilder produces a high-level IR graph based on |
27 // interpreter bytecodes. | 24 // interpreter bytecodes. |
28 class BytecodeGraphBuilder { | 25 class BytecodeGraphBuilder { |
29 public: | 26 public: |
30 BytecodeGraphBuilder(Zone* local_zone, CompilationInfo* info, | 27 BytecodeGraphBuilder(Zone* local_zone, Handle<SharedFunctionInfo> shared, |
31 JSGraph* jsgraph, float invocation_frequency, | 28 Handle<TypeFeedbackVector> feedback_vector, |
| 29 BailoutId osr_ast_id, JSGraph* jsgraph, |
| 30 float invocation_frequency, |
32 SourcePositionTable* source_positions, | 31 SourcePositionTable* source_positions, |
33 int inlining_id = SourcePosition::kNotInlined); | 32 int inlining_id = SourcePosition::kNotInlined); |
34 | 33 |
35 // Creates a graph by visiting bytecodes. | 34 // Creates a graph by visiting bytecodes. |
36 bool CreateGraph(bool stack_check = true); | 35 bool CreateGraph(bool stack_check = true); |
37 | 36 |
38 private: | 37 private: |
39 class Environment; | 38 class Environment; |
40 | 39 |
41 void VisitBytecodes(bool stack_check); | 40 void VisitBytecodes(bool stack_check); |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 static int const kBinaryOperationSmiHintIndex = 2; | 313 static int const kBinaryOperationSmiHintIndex = 2; |
315 | 314 |
316 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 315 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
317 }; | 316 }; |
318 | 317 |
319 } // namespace compiler | 318 } // namespace compiler |
320 } // namespace internal | 319 } // namespace internal |
321 } // namespace v8 | 320 } // namespace v8 |
322 | 321 |
323 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 322 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
OLD | NEW |