| 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-branch-analysis.h" | 8 #include "src/compiler/bytecode-branch-analysis.h" |
| 9 #include "src/compiler/bytecode-loop-analysis.h" | 9 #include "src/compiler/bytecode-loop-analysis.h" |
| 10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // The BytecodeGraphBuilder produces a high-level IR graph based on | 27 // The BytecodeGraphBuilder produces a high-level IR graph based on |
| 28 // interpreter bytecodes. | 28 // interpreter bytecodes. |
| 29 class BytecodeGraphBuilder { | 29 class BytecodeGraphBuilder { |
| 30 public: | 30 public: |
| 31 BytecodeGraphBuilder(Zone* local_zone, CompilationInfo* info, | 31 BytecodeGraphBuilder(Zone* local_zone, CompilationInfo* info, |
| 32 JSGraph* jsgraph, float invocation_frequency, | 32 JSGraph* jsgraph, float invocation_frequency, |
| 33 SourcePositionTable* source_positions); | 33 SourcePositionTable* source_positions); |
| 34 | 34 |
| 35 // Creates a graph by visiting bytecodes. | 35 // Creates a graph by visiting bytecodes. |
| 36 bool CreateGraph(); | 36 bool CreateGraph(bool stack_check = true); |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 class Environment; | 39 class Environment; |
| 40 | 40 |
| 41 void VisitBytecodes(); | 41 void VisitBytecodes(bool stack_check); |
| 42 | 42 |
| 43 // Get or create the node that represents the outer function closure. | 43 // Get or create the node that represents the outer function closure. |
| 44 Node* GetFunctionClosure(); | 44 Node* GetFunctionClosure(); |
| 45 | 45 |
| 46 // Get or create the node that represents the outer function context. | 46 // Get or create the node that represents the outer function context. |
| 47 Node* GetFunctionContext(); | 47 Node* GetFunctionContext(); |
| 48 | 48 |
| 49 // Get or create the node that represents the incoming new target value. | 49 // Get or create the node that represents the incoming new target value. |
| 50 Node* GetNewTarget(); | 50 Node* GetNewTarget(); |
| 51 | 51 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 static int const kBinaryOperationSmiHintIndex = 2; | 326 static int const kBinaryOperationSmiHintIndex = 2; |
| 327 | 327 |
| 328 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 328 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
| 329 }; | 329 }; |
| 330 | 330 |
| 331 } // namespace compiler | 331 } // namespace compiler |
| 332 } // namespace internal | 332 } // namespace internal |
| 333 } // namespace v8 | 333 } // namespace v8 |
| 334 | 334 |
| 335 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 335 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
| OLD | NEW |