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