| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_INTERPRETER_BYTECODE_PEEPHOLE_OPTIMIZER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_PEEPHOLE_OPTIMIZER_H_ |
| 6 #define V8_INTERPRETER_BYTECODE_PEEPHOLE_OPTIMIZER_H_ | 6 #define V8_INTERPRETER_BYTECODE_PEEPHOLE_OPTIMIZER_H_ |
| 7 | 7 |
| 8 #include "src/interpreter/bytecode-peephole-table.h" | 8 #include "src/interpreter/bytecode-peephole-table.h" |
| 9 #include "src/interpreter/bytecode-pipeline.h" | 9 #include "src/interpreter/bytecode-pipeline.h" |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public ZoneObject { | 21 public ZoneObject { |
| 22 public: | 22 public: |
| 23 explicit BytecodePeepholeOptimizer(BytecodePipelineStage* next_stage); | 23 explicit BytecodePeepholeOptimizer(BytecodePipelineStage* next_stage); |
| 24 | 24 |
| 25 // BytecodePipelineStage interface. | 25 // BytecodePipelineStage interface. |
| 26 void Write(BytecodeNode* node) override; | 26 void Write(BytecodeNode* node) override; |
| 27 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override; | 27 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override; |
| 28 void BindLabel(BytecodeLabel* label) override; | 28 void BindLabel(BytecodeLabel* label) override; |
| 29 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; | 29 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; |
| 30 Handle<BytecodeArray> ToBytecodeArray( | 30 Handle<BytecodeArray> ToBytecodeArray( |
| 31 Isolate* isolate, int register_count, int parameter_count, | 31 Isolate* isolate, int fixed_register_count, int parameter_count, |
| 32 Handle<FixedArray> handler_table) override; | 32 Handle<FixedArray> handler_table) override; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 #define DECLARE_ACTION(Action) \ | 35 #define DECLARE_ACTION(Action) \ |
| 36 void Action(BytecodeNode* const node, \ | 36 void Action(BytecodeNode* const node, \ |
| 37 const PeepholeActionAndData* const action_data = nullptr); | 37 const PeepholeActionAndData* const action_data = nullptr); |
| 38 PEEPHOLE_ACTION_LIST(DECLARE_ACTION) | 38 PEEPHOLE_ACTION_LIST(DECLARE_ACTION) |
| 39 #undef DECLARE_ACTION | 39 #undef DECLARE_ACTION |
| 40 | 40 |
| 41 void ApplyPeepholeAction(BytecodeNode* const node); | 41 void ApplyPeepholeAction(BytecodeNode* const node); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 53 BytecodeNode last_; | 53 BytecodeNode last_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(BytecodePeepholeOptimizer); | 55 DISALLOW_COPY_AND_ASSIGN(BytecodePeepholeOptimizer); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace interpreter | 58 } // namespace interpreter |
| 59 } // namespace internal | 59 } // namespace internal |
| 60 } // namespace v8 | 60 } // namespace v8 |
| 61 | 61 |
| 62 #endif // V8_INTERPRETER_BYTECODE_PEEPHOLE_OPTIMIZER_H_ | 62 #endif // V8_INTERPRETER_BYTECODE_PEEPHOLE_OPTIMIZER_H_ |
| OLD | NEW |