| 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_INTERPRETER_BYTECODE_ARRAY_WRITER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_WRITER_H_ |
| 6 #define V8_INTERPRETER_BYTECODE_ARRAY_WRITER_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_WRITER_H_ |
| 7 | 7 |
| 8 #include "src/interpreter/bytecode-pipeline.h" | 8 #include "src/interpreter/bytecode-pipeline.h" |
| 9 #include "src/source-position-table.h" | 9 #include "src/source-position-table.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 class SourcePositionTableBuilder; | 14 class SourcePositionTableBuilder; |
| 15 | 15 |
| 16 namespace interpreter { | 16 namespace interpreter { |
| 17 | 17 |
| 18 class BytecodeLabel; | 18 class BytecodeLabel; |
| 19 class ConstantArrayBuilder; | 19 class ConstantArrayBuilder; |
| 20 | 20 |
| 21 // Class for emitting bytecode as the final stage of the bytecode | 21 // Class for emitting bytecode as the final stage of the bytecode |
| 22 // generation pipeline. | 22 // generation pipeline. |
| 23 class BytecodeArrayWriter final : public BytecodePipelineStage { | 23 class BytecodeArrayWriter final : public BytecodePipelineStage { |
| 24 public: | 24 public: |
| 25 BytecodeArrayWriter(Isolate* isolate, Zone* zone, | 25 BytecodeArrayWriter( |
| 26 ConstantArrayBuilder* constant_array_builder); | 26 Isolate* isolate, Zone* zone, |
| 27 ConstantArrayBuilder* constant_array_builder, |
| 28 SourcePositionTableBuilder::RecordingMode source_position_mode); |
| 27 virtual ~BytecodeArrayWriter(); | 29 virtual ~BytecodeArrayWriter(); |
| 28 | 30 |
| 29 // BytecodePipelineStage interface. | 31 // BytecodePipelineStage interface. |
| 30 void Write(BytecodeNode* node) override; | 32 void Write(BytecodeNode* node) override; |
| 31 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override; | 33 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override; |
| 32 void BindLabel(BytecodeLabel* label) override; | 34 void BindLabel(BytecodeLabel* label) override; |
| 33 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; | 35 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; |
| 34 Handle<BytecodeArray> ToBytecodeArray( | 36 Handle<BytecodeArray> ToBytecodeArray( |
| 35 int fixed_register_count, int parameter_count, | 37 int fixed_register_count, int parameter_count, |
| 36 Handle<FixedArray> handler_table) override; | 38 Handle<FixedArray> handler_table) override; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 82 |
| 81 friend class BytecodeArrayWriterUnittest; | 83 friend class BytecodeArrayWriterUnittest; |
| 82 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayWriter); | 84 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayWriter); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace interpreter | 87 } // namespace interpreter |
| 86 } // namespace internal | 88 } // namespace internal |
| 87 } // namespace v8 | 89 } // namespace v8 |
| 88 | 90 |
| 89 #endif // V8_INTERPRETER_BYTECODE_ARRAY_WRITER_H_ | 91 #endif // V8_INTERPRETER_BYTECODE_ARRAY_WRITER_H_ |
| OLD | NEW |