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" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 class BytecodeGraphBuilder::Environment : public ZoneObject { | 260 class BytecodeGraphBuilder::Environment : public ZoneObject { |
261 public: | 261 public: |
262 Environment(BytecodeGraphBuilder* builder, int register_count, | 262 Environment(BytecodeGraphBuilder* builder, int register_count, |
263 int parameter_count, Node* control_dependency, Node* context); | 263 int parameter_count, Node* control_dependency, Node* context); |
264 | 264 |
265 int parameter_count() const { return parameter_count_; } | 265 int parameter_count() const { return parameter_count_; } |
266 int register_count() const { return register_count_; } | 266 int register_count() const { return register_count_; } |
267 | 267 |
268 void BindRegister(interpreter::Register the_register, Node* node); | 268 void BindRegister(interpreter::Register the_register, Node* node); |
269 Node* LookupRegister(interpreter::Register the_register) const; | 269 Node* LookupRegister(interpreter::Register the_register) const; |
| 270 void ExchangeRegisters(interpreter::Register reg0, |
| 271 interpreter::Register reg1); |
270 | 272 |
271 void BindAccumulator(Node* node, FrameStateBeforeAndAfter* states = nullptr); | 273 void BindAccumulator(Node* node, FrameStateBeforeAndAfter* states = nullptr); |
272 Node* LookupAccumulator() const; | 274 Node* LookupAccumulator() const; |
273 | 275 |
274 void RecordAfterState(Node* node, FrameStateBeforeAndAfter* states); | 276 void RecordAfterState(Node* node, FrameStateBeforeAndAfter* states); |
275 | 277 |
276 bool IsMarkedAsUnreachable() const; | 278 bool IsMarkedAsUnreachable() const; |
277 void MarkAsUnreachable(); | 279 void MarkAsUnreachable(); |
278 | 280 |
279 // Effect dependency tracked by this environment. | 281 // Effect dependency tracked by this environment. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 Node* accumulator_state_values_; | 335 Node* accumulator_state_values_; |
334 int register_base_; | 336 int register_base_; |
335 int accumulator_base_; | 337 int accumulator_base_; |
336 }; | 338 }; |
337 | 339 |
338 } // namespace compiler | 340 } // namespace compiler |
339 } // namespace internal | 341 } // namespace internal |
340 } // namespace v8 | 342 } // namespace v8 |
341 | 343 |
342 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 344 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
OLD | NEW |