| 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/base/compiler-specific.h" |
| 9 #include "src/globals.h" |
| 8 #include "src/interpreter/bytecode-pipeline.h" | 10 #include "src/interpreter/bytecode-pipeline.h" |
| 9 #include "src/source-position-table.h" | 11 #include "src/source-position-table.h" |
| 10 | 12 |
| 11 namespace v8 { | 13 namespace v8 { |
| 12 namespace internal { | 14 namespace internal { |
| 13 | 15 |
| 14 class SourcePositionTableBuilder; | 16 class SourcePositionTableBuilder; |
| 15 | 17 |
| 16 namespace interpreter { | 18 namespace interpreter { |
| 17 | 19 |
| 18 class BytecodeLabel; | 20 class BytecodeLabel; |
| 19 class ConstantArrayBuilder; | 21 class ConstantArrayBuilder; |
| 20 | 22 |
| 21 // Class for emitting bytecode as the final stage of the bytecode | 23 // Class for emitting bytecode as the final stage of the bytecode |
| 22 // generation pipeline. | 24 // generation pipeline. |
| 23 class BytecodeArrayWriter final : public BytecodePipelineStage { | 25 class V8_EXPORT_PRIVATE BytecodeArrayWriter final |
| 26 : public NON_EXPORTED_BASE(BytecodePipelineStage) { |
| 24 public: | 27 public: |
| 25 BytecodeArrayWriter( | 28 BytecodeArrayWriter( |
| 26 Zone* zone, ConstantArrayBuilder* constant_array_builder, | 29 Zone* zone, ConstantArrayBuilder* constant_array_builder, |
| 27 SourcePositionTableBuilder::RecordingMode source_position_mode); | 30 SourcePositionTableBuilder::RecordingMode source_position_mode); |
| 28 virtual ~BytecodeArrayWriter(); | 31 virtual ~BytecodeArrayWriter(); |
| 29 | 32 |
| 30 // BytecodePipelineStage interface. | 33 // BytecodePipelineStage interface. |
| 31 void Write(BytecodeNode* node) override; | 34 void Write(BytecodeNode* node) override; |
| 32 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override; | 35 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override; |
| 33 void BindLabel(BytecodeLabel* label) override; | 36 void BindLabel(BytecodeLabel* label) override; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 80 |
| 78 friend class BytecodeArrayWriterUnittest; | 81 friend class BytecodeArrayWriterUnittest; |
| 79 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayWriter); | 82 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayWriter); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace interpreter | 85 } // namespace interpreter |
| 83 } // namespace internal | 86 } // namespace internal |
| 84 } // namespace v8 | 87 } // namespace v8 |
| 85 | 88 |
| 86 #endif // V8_INTERPRETER_BYTECODE_ARRAY_WRITER_H_ | 89 #endif // V8_INTERPRETER_BYTECODE_ARRAY_WRITER_H_ |
| OLD | NEW |