| 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_BUILDER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/interpreter/bytecode-array-writer.h" | 9 #include "src/interpreter/bytecode-array-writer.h" |
| 10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
| 11 #include "src/interpreter/bytecodes.h" | 11 #include "src/interpreter/bytecodes.h" |
| 12 #include "src/interpreter/constant-array-builder.h" | 12 #include "src/interpreter/constant-array-builder.h" |
| 13 #include "src/interpreter/handler-table-builder.h" | 13 #include "src/interpreter/handler-table-builder.h" |
| 14 #include "src/zone-containers.h" | 14 #include "src/zone-containers.h" |
| 15 | 15 |
| 16 namespace v8 { | 16 namespace v8 { |
| 17 namespace internal { | 17 namespace internal { |
| 18 | 18 |
| 19 class Isolate; | 19 class Isolate; |
| 20 | 20 |
| 21 namespace interpreter { | 21 namespace interpreter { |
| 22 | 22 |
| 23 class BytecodeLabel; | 23 class BytecodeLabel; |
| 24 class BytecodeNode; | 24 class BytecodeNode; |
| 25 class BytecodePipelineStage; | 25 class BytecodePipelineStage; |
| 26 class Register; | 26 class Register; |
| 27 | 27 |
| 28 class BytecodeArrayBuilder final : public ZoneObject { | 28 class BytecodeArrayBuilder final : public ZoneObject { |
| 29 public: | 29 public: |
| 30 BytecodeArrayBuilder(Isolate* isolate, Zone* zone, int parameter_count, | 30 BytecodeArrayBuilder( |
| 31 int context_count, int locals_count, | 31 Isolate* isolate, Zone* zone, int parameter_count, int context_count, |
| 32 FunctionLiteral* literal = nullptr); | 32 int locals_count, FunctionLiteral* literal = nullptr, |
| 33 SourcePositionTableBuilder::RecordingMode source_position_mode = |
| 34 SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS); |
| 33 | 35 |
| 34 Handle<BytecodeArray> ToBytecodeArray(); | 36 Handle<BytecodeArray> ToBytecodeArray(); |
| 35 | 37 |
| 36 // Get the number of parameters expected by function. | 38 // Get the number of parameters expected by function. |
| 37 int parameter_count() const { | 39 int parameter_count() const { |
| 38 DCHECK_GE(parameter_count_, 0); | 40 DCHECK_GE(parameter_count_, 0); |
| 39 return parameter_count_; | 41 return parameter_count_; |
| 40 } | 42 } |
| 41 | 43 |
| 42 // Get the number of locals required for bytecode array. | 44 // Get the number of locals required for bytecode array. |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 BytecodeSourceInfo latest_source_info_; | 369 BytecodeSourceInfo latest_source_info_; |
| 368 | 370 |
| 369 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 371 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 370 }; | 372 }; |
| 371 | 373 |
| 372 } // namespace interpreter | 374 } // namespace interpreter |
| 373 } // namespace internal | 375 } // namespace internal |
| 374 } // namespace v8 | 376 } // namespace v8 |
| 375 | 377 |
| 376 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 378 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |