| 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/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/interpreter/bytecode-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
| 10 #include "src/interpreter/control-flow-builders.h" | 10 #include "src/interpreter/control-flow-builders.h" |
| (...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3144 } | 3144 } |
| 3145 | 3145 |
| 3146 void BytecodeGenerator::VisitInScope(Statement* stmt, Scope* scope) { | 3146 void BytecodeGenerator::VisitInScope(Statement* stmt, Scope* scope) { |
| 3147 ContextScope context_scope(this, scope); | 3147 ContextScope context_scope(this, scope); |
| 3148 DCHECK(scope->declarations()->is_empty()); | 3148 DCHECK(scope->declarations()->is_empty()); |
| 3149 Visit(stmt); | 3149 Visit(stmt); |
| 3150 } | 3150 } |
| 3151 | 3151 |
| 3152 | 3152 |
| 3153 LanguageMode BytecodeGenerator::language_mode() const { | 3153 LanguageMode BytecodeGenerator::language_mode() const { |
| 3154 return info()->language_mode(); | 3154 return execution_context()->scope()->language_mode(); |
| 3155 } | 3155 } |
| 3156 | 3156 |
| 3157 | 3157 |
| 3158 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 3158 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 3159 return info()->shared_info()->feedback_vector()->GetIndex(slot); | 3159 return info()->shared_info()->feedback_vector()->GetIndex(slot); |
| 3160 } | 3160 } |
| 3161 | 3161 |
| 3162 } // namespace interpreter | 3162 } // namespace interpreter |
| 3163 } // namespace internal | 3163 } // namespace internal |
| 3164 } // namespace v8 | 3164 } // namespace v8 |
| OLD | NEW |