| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
| 10 #include "src/ast/ast.h" | 10 #include "src/ast/ast.h" |
| 11 #include "src/bootstrapper.h" | 11 #include "src/bootstrapper.h" |
| 12 #include "src/counters.h" | 12 #include "src/counters.h" |
| 13 #include "src/messages.h" | 13 #include "src/messages.h" |
| 14 #include "src/objects-inl.h" | 14 #include "src/objects-inl.h" |
| 15 #include "src/objects/module-info.h" | 15 #include "src/objects/module-info.h" |
| 16 #include "src/objects/scope-info.h" |
| 16 #include "src/parsing/parse-info.h" | 17 #include "src/parsing/parse-info.h" |
| 17 | 18 |
| 18 namespace v8 { | 19 namespace v8 { |
| 19 namespace internal { | 20 namespace internal { |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| 22 void* kDummyPreParserVariable = reinterpret_cast<void*>(0x1); | 23 void* kDummyPreParserVariable = reinterpret_cast<void*>(0x1); |
| 23 void* kDummyPreParserLexicalVariable = reinterpret_cast<void*>(0x2); | 24 void* kDummyPreParserLexicalVariable = reinterpret_cast<void*>(0x2); |
| 24 | 25 |
| 25 bool IsLexical(Variable* variable) { | 26 bool IsLexical(Variable* variable) { |
| (...skipping 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 Variable* function = | 2164 Variable* function = |
| 2164 is_function_scope() ? AsDeclarationScope()->function_var() : nullptr; | 2165 is_function_scope() ? AsDeclarationScope()->function_var() : nullptr; |
| 2165 bool is_function_var_in_context = | 2166 bool is_function_var_in_context = |
| 2166 function != nullptr && function->IsContextSlot(); | 2167 function != nullptr && function->IsContextSlot(); |
| 2167 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - | 2168 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - |
| 2168 (is_function_var_in_context ? 1 : 0); | 2169 (is_function_var_in_context ? 1 : 0); |
| 2169 } | 2170 } |
| 2170 | 2171 |
| 2171 } // namespace internal | 2172 } // namespace internal |
| 2172 } // namespace v8 | 2173 } // namespace v8 |
| OLD | NEW |