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 3261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3272 } | 3272 } |
3273 | 3273 |
3274 void BytecodeGenerator::VisitInScope(Statement* stmt, Scope* scope) { | 3274 void BytecodeGenerator::VisitInScope(Statement* stmt, Scope* scope) { |
3275 ContextScope context_scope(this, scope); | 3275 ContextScope context_scope(this, scope); |
3276 DCHECK(scope->declarations()->is_empty()); | 3276 DCHECK(scope->declarations()->is_empty()); |
3277 Visit(stmt); | 3277 Visit(stmt); |
3278 } | 3278 } |
3279 | 3279 |
3280 | 3280 |
3281 LanguageMode BytecodeGenerator::language_mode() const { | 3281 LanguageMode BytecodeGenerator::language_mode() const { |
3282 return info()->language_mode(); | 3282 return execution_context()->scope()->language_mode(); |
3283 } | 3283 } |
3284 | 3284 |
3285 | 3285 |
3286 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 3286 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
3287 return info()->shared_info()->feedback_vector()->GetIndex(slot); | 3287 return info()->shared_info()->feedback_vector()->GetIndex(slot); |
3288 } | 3288 } |
3289 | 3289 |
3290 } // namespace interpreter | 3290 } // namespace interpreter |
3291 } // namespace internal | 3291 } // namespace internal |
3292 } // namespace v8 | 3292 } // namespace v8 |
OLD | NEW |