| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/scopes.h" | 7 #include "src/scopes.h" |
| 8 | 8 |
| 9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 } | 895 } |
| 896 if (strict_mode() == STRICT) { | 896 if (strict_mode() == STRICT) { |
| 897 Indent(n1, "// strict mode scope\n"); | 897 Indent(n1, "// strict mode scope\n"); |
| 898 } | 898 } |
| 899 if (scope_inside_with_) Indent(n1, "// scope inside 'with'\n"); | 899 if (scope_inside_with_) Indent(n1, "// scope inside 'with'\n"); |
| 900 if (scope_contains_with_) Indent(n1, "// scope contains 'with'\n"); | 900 if (scope_contains_with_) Indent(n1, "// scope contains 'with'\n"); |
| 901 if (scope_calls_eval_) Indent(n1, "// scope calls 'eval'\n"); | 901 if (scope_calls_eval_) Indent(n1, "// scope calls 'eval'\n"); |
| 902 if (scope_uses_arguments_) Indent(n1, "// scope uses 'arguments'\n"); | 902 if (scope_uses_arguments_) Indent(n1, "// scope uses 'arguments'\n"); |
| 903 if (scope_uses_super_property_) | 903 if (scope_uses_super_property_) |
| 904 Indent(n1, "// scope uses 'super' property\n"); | 904 Indent(n1, "// scope uses 'super' property\n"); |
| 905 if (scope_uses_super_constructor_call_) { | 905 if (scope_uses_super_constructor_call_) |
| 906 Indent(n1, "// scope uses 'super' constructor\n"); | 906 Indent(n1, "// scope uses 'super' constructor\n"); |
| 907 } | |
| 908 if (scope_uses_this_) Indent(n1, "// scope uses 'this'\n"); | 907 if (scope_uses_this_) Indent(n1, "// scope uses 'this'\n"); |
| 909 if (inner_scope_uses_arguments_) { | 908 if (inner_scope_uses_arguments_) { |
| 910 Indent(n1, "// inner scope uses 'arguments'\n"); | 909 Indent(n1, "// inner scope uses 'arguments'\n"); |
| 911 } | 910 } |
| 912 if (inner_scope_uses_super_property_) | 911 if (inner_scope_uses_super_property_) |
| 913 Indent(n1, "// inner scope uses 'super' property\n"); | 912 Indent(n1, "// inner scope uses 'super' property\n"); |
| 914 if (inner_scope_uses_super_constructor_call_) { | 913 if (inner_scope_uses_super_constructor_call_) { |
| 915 Indent(n1, "// inner scope uses 'super' constructor\n"); | 914 Indent(n1, "// inner scope uses 'super' constructor\n"); |
| 916 } | 915 } |
| 917 if (inner_scope_uses_this_) Indent(n1, "// inner scope uses 'this'\n"); | 916 if (inner_scope_uses_this_) Indent(n1, "// inner scope uses 'this'\n"); |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 } | 1433 } |
| 1435 | 1434 |
| 1436 | 1435 |
| 1437 int Scope::ContextLocalCount() const { | 1436 int Scope::ContextLocalCount() const { |
| 1438 if (num_heap_slots() == 0) return 0; | 1437 if (num_heap_slots() == 0) return 0; |
| 1439 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - | 1438 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - |
| 1440 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); | 1439 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); |
| 1441 } | 1440 } |
| 1442 | 1441 |
| 1443 } } // namespace v8::internal | 1442 } } // namespace v8::internal |
| OLD | NEW |