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.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/bytecode-branch-analysis.h" | 9 #include "src/compiler/bytecode-branch-analysis.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
| 11 #include "src/compiler/type-hint-analyzer.h" |
11 #include "src/interpreter/bytecode-array-iterator.h" | 12 #include "src/interpreter/bytecode-array-iterator.h" |
12 #include "src/interpreter/bytecode-flags.h" | 13 #include "src/interpreter/bytecode-flags.h" |
13 #include "src/interpreter/bytecodes.h" | 14 #include "src/interpreter/bytecodes.h" |
14 | 15 |
15 namespace v8 { | 16 namespace v8 { |
16 namespace internal { | 17 namespace internal { |
17 namespace compiler { | 18 namespace compiler { |
18 | 19 |
19 // The BytecodeGraphBuilder produces a high-level IR graph based on | 20 // The BytecodeGraphBuilder produces a high-level IR graph based on |
20 // interpreter bytecodes. | 21 // interpreter bytecodes. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 void BuildThrow(); | 127 void BuildThrow(); |
127 void BuildBinaryOp(const Operator* op); | 128 void BuildBinaryOp(const Operator* op); |
128 void BuildBinaryOpWithImmediate(const Operator* op); | 129 void BuildBinaryOpWithImmediate(const Operator* op); |
129 void BuildCompareOp(const Operator* op); | 130 void BuildCompareOp(const Operator* op); |
130 void BuildDelete(LanguageMode language_mode); | 131 void BuildDelete(LanguageMode language_mode); |
131 void BuildCastOperator(const Operator* op); | 132 void BuildCastOperator(const Operator* op); |
132 void BuildForInPrepare(); | 133 void BuildForInPrepare(); |
133 void BuildForInNext(); | 134 void BuildForInNext(); |
134 void BuildInvokeIntrinsic(); | 135 void BuildInvokeIntrinsic(); |
135 | 136 |
| 137 // Helper function to create binary operation hint from the recorded |
| 138 // type feedback. |
| 139 BinaryOperationHints GetBinaryOperationHint(); |
| 140 |
136 // Control flow plumbing. | 141 // Control flow plumbing. |
137 void BuildJump(); | 142 void BuildJump(); |
138 void BuildConditionalJump(Node* condition); | 143 void BuildConditionalJump(Node* condition); |
139 void BuildJumpIfEqual(Node* comperand); | 144 void BuildJumpIfEqual(Node* comperand); |
140 void BuildJumpIfToBooleanEqual(Node* boolean_comperand); | 145 void BuildJumpIfToBooleanEqual(Node* boolean_comperand); |
141 void BuildJumpIfNotHole(); | 146 void BuildJumpIfNotHole(); |
142 | 147 |
143 // Simulates control flow by forward-propagating environments. | 148 // Simulates control flow by forward-propagating environments. |
144 void MergeIntoSuccessorEnvironment(int target_offset); | 149 void MergeIntoSuccessorEnvironment(int target_offset); |
145 void BuildLoopHeaderEnvironment(int current_offset); | 150 void BuildLoopHeaderEnvironment(int current_offset); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 ZoneVector<Node*> exit_controls_; | 245 ZoneVector<Node*> exit_controls_; |
241 | 246 |
242 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 247 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
243 }; | 248 }; |
244 | 249 |
245 } // namespace compiler | 250 } // namespace compiler |
246 } // namespace internal | 251 } // namespace internal |
247 } // namespace v8 | 252 } // namespace v8 |
248 | 253 |
249 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 254 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
OLD | NEW |