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/scopes.h" | 5 #include "src/scopes.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/messages.h" | 9 #include "src/messages.h" |
10 #include "src/parser.h" | 10 #include "src/parser.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 scope_calls_eval_ = false; | 164 scope_calls_eval_ = false; |
165 scope_uses_arguments_ = false; | 165 scope_uses_arguments_ = false; |
166 scope_uses_super_property_ = false; | 166 scope_uses_super_property_ = false; |
167 asm_module_ = false; | 167 asm_module_ = false; |
168 asm_function_ = outer_scope != NULL && outer_scope->asm_module_; | 168 asm_function_ = outer_scope != NULL && outer_scope->asm_module_; |
169 // Inherit the language mode from the parent scope. | 169 // Inherit the language mode from the parent scope. |
170 language_mode_ = outer_scope != NULL ? outer_scope->language_mode_ : SLOPPY; | 170 language_mode_ = outer_scope != NULL ? outer_scope->language_mode_ : SLOPPY; |
171 outer_scope_calls_sloppy_eval_ = false; | 171 outer_scope_calls_sloppy_eval_ = false; |
172 inner_scope_calls_eval_ = false; | 172 inner_scope_calls_eval_ = false; |
173 inner_scope_uses_arguments_ = false; | 173 inner_scope_uses_arguments_ = false; |
| 174 scope_nonlinear_ = false; |
174 force_eager_compilation_ = false; | 175 force_eager_compilation_ = false; |
175 force_context_allocation_ = (outer_scope != NULL && !is_function_scope()) | 176 force_context_allocation_ = (outer_scope != NULL && !is_function_scope()) |
176 ? outer_scope->has_forced_context_allocation() : false; | 177 ? outer_scope->has_forced_context_allocation() : false; |
177 num_var_or_const_ = 0; | 178 num_var_or_const_ = 0; |
178 num_stack_slots_ = 0; | 179 num_stack_slots_ = 0; |
179 num_heap_slots_ = 0; | 180 num_heap_slots_ = 0; |
180 num_global_slots_ = 0; | 181 num_global_slots_ = 0; |
181 num_modules_ = 0; | 182 num_modules_ = 0; |
182 module_var_ = NULL; | 183 module_var_ = NULL; |
183 arity_ = 0; | 184 arity_ = 0; |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1620 function_ != NULL && function_->proxy()->var()->IsContextSlot(); | 1621 function_ != NULL && function_->proxy()->var()->IsContextSlot(); |
1621 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - num_global_slots() - | 1622 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - num_global_slots() - |
1622 (is_function_var_in_context ? 1 : 0); | 1623 (is_function_var_in_context ? 1 : 0); |
1623 } | 1624 } |
1624 | 1625 |
1625 | 1626 |
1626 int Scope::ContextGlobalCount() const { return num_global_slots(); } | 1627 int Scope::ContextGlobalCount() const { return num_global_slots(); } |
1627 | 1628 |
1628 } // namespace internal | 1629 } // namespace internal |
1629 } // namespace v8 | 1630 } // namespace v8 |
OLD | NEW |