| 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/messages.h" | 13 #include "src/messages.h" |
| 13 #include "src/objects-inl.h" | 14 #include "src/objects-inl.h" |
| 14 #include "src/objects/scope-info.h" | 15 #include "src/objects/module-info.h" |
| 15 #include "src/parsing/parse-info.h" | 16 #include "src/parsing/parse-info.h" |
| 16 | 17 |
| 17 namespace v8 { | 18 namespace v8 { |
| 18 namespace internal { | 19 namespace internal { |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 void* kDummyPreParserVariable = reinterpret_cast<void*>(0x1); | 22 void* kDummyPreParserVariable = reinterpret_cast<void*>(0x1); |
| 22 } // namespace | 23 } // namespace |
| 23 | 24 |
| 24 // ---------------------------------------------------------------------------- | 25 // ---------------------------------------------------------------------------- |
| (...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 Variable* function = | 2134 Variable* function = |
| 2134 is_function_scope() ? AsDeclarationScope()->function_var() : nullptr; | 2135 is_function_scope() ? AsDeclarationScope()->function_var() : nullptr; |
| 2135 bool is_function_var_in_context = | 2136 bool is_function_var_in_context = |
| 2136 function != nullptr && function->IsContextSlot(); | 2137 function != nullptr && function->IsContextSlot(); |
| 2137 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - | 2138 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - |
| 2138 (is_function_var_in_context ? 1 : 0); | 2139 (is_function_var_in_context ? 1 : 0); |
| 2139 } | 2140 } |
| 2140 | 2141 |
| 2141 } // namespace internal | 2142 } // namespace internal |
| 2142 } // namespace v8 | 2143 } // namespace v8 |
| OLD | NEW |