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 #include "src/interpreter/bytecode-generator.h" | 5 #include "src/interpreter/bytecode-generator.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 private: | 540 private: |
541 Register result_register_; | 541 Register result_register_; |
542 }; | 542 }; |
543 | 543 |
544 BytecodeGenerator::BytecodeGenerator(CompilationInfo* info) | 544 BytecodeGenerator::BytecodeGenerator(CompilationInfo* info) |
545 : isolate_(info->isolate()), | 545 : isolate_(info->isolate()), |
546 zone_(info->zone()), | 546 zone_(info->zone()), |
547 builder_(new (zone()) BytecodeArrayBuilder( | 547 builder_(new (zone()) BytecodeArrayBuilder( |
548 info->isolate(), info->zone(), info->num_parameters_including_this(), | 548 info->isolate(), info->zone(), info->num_parameters_including_this(), |
549 info->scope()->MaxNestedContextChainLength(), | 549 info->scope()->MaxNestedContextChainLength(), |
550 info->scope()->num_stack_slots(), info->literal())), | 550 info->scope()->num_stack_slots(), info->literal(), |
| 551 info->SourcePositionRecordingMode())), |
551 info_(info), | 552 info_(info), |
552 scope_(info->scope()), | 553 scope_(info->scope()), |
553 globals_(0, info->zone()), | 554 globals_(0, info->zone()), |
554 execution_control_(nullptr), | 555 execution_control_(nullptr), |
555 execution_context_(nullptr), | 556 execution_context_(nullptr), |
556 execution_result_(nullptr), | 557 execution_result_(nullptr), |
557 register_allocator_(nullptr), | 558 register_allocator_(nullptr), |
558 generator_resume_points_(info->literal()->yield_count(), info->zone()), | 559 generator_resume_points_(info->literal()->yield_count(), info->zone()), |
559 generator_state_(), | 560 generator_state_(), |
560 try_catch_nesting_level_(0), | 561 try_catch_nesting_level_(0), |
(...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3167 return execution_context()->scope()->language_mode(); | 3168 return execution_context()->scope()->language_mode(); |
3168 } | 3169 } |
3169 | 3170 |
3170 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 3171 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
3171 return TypeFeedbackVector::GetIndex(slot); | 3172 return TypeFeedbackVector::GetIndex(slot); |
3172 } | 3173 } |
3173 | 3174 |
3174 } // namespace interpreter | 3175 } // namespace interpreter |
3175 } // namespace internal | 3176 } // namespace internal |
3176 } // namespace v8 | 3177 } // namespace v8 |
OLD | NEW |