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" |
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 if (scope_calls_eval_) Indent(n1, "// scope calls 'eval'\n"); | 1534 if (scope_calls_eval_) Indent(n1, "// scope calls 'eval'\n"); |
1535 if (is_declaration_scope() && AsDeclarationScope()->uses_super_property()) { | 1535 if (is_declaration_scope() && AsDeclarationScope()->uses_super_property()) { |
1536 Indent(n1, "// scope uses 'super' property\n"); | 1536 Indent(n1, "// scope uses 'super' property\n"); |
1537 } | 1537 } |
1538 if (inner_scope_calls_eval_) Indent(n1, "// inner scope calls 'eval'\n"); | 1538 if (inner_scope_calls_eval_) Indent(n1, "// inner scope calls 'eval'\n"); |
1539 if (is_declaration_scope()) { | 1539 if (is_declaration_scope()) { |
1540 DeclarationScope* scope = AsDeclarationScope(); | 1540 DeclarationScope* scope = AsDeclarationScope(); |
1541 if (scope->was_lazily_parsed()) Indent(n1, "// lazily parsed\n"); | 1541 if (scope->was_lazily_parsed()) Indent(n1, "// lazily parsed\n"); |
1542 if (scope->ShouldEagerCompile()) Indent(n1, "// will be compiled\n"); | 1542 if (scope->ShouldEagerCompile()) Indent(n1, "// will be compiled\n"); |
1543 } | 1543 } |
| 1544 if (has_forced_context_allocation()) { |
| 1545 Indent(n1, "// forces context allocation\n"); |
| 1546 } |
1544 if (num_stack_slots_ > 0) { | 1547 if (num_stack_slots_ > 0) { |
1545 Indent(n1, "// "); | 1548 Indent(n1, "// "); |
1546 PrintF("%d stack slots\n", num_stack_slots_); | 1549 PrintF("%d stack slots\n", num_stack_slots_); |
1547 } | 1550 } |
1548 if (num_heap_slots_ > 0) { | 1551 if (num_heap_slots_ > 0) { |
1549 Indent(n1, "// "); | 1552 Indent(n1, "// "); |
1550 PrintF("%d heap slots\n", num_heap_slots_); | 1553 PrintF("%d heap slots\n", num_heap_slots_); |
1551 } | 1554 } |
1552 | 1555 |
1553 // Print locals. | 1556 // Print locals. |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2120 Variable* function = | 2123 Variable* function = |
2121 is_function_scope() ? AsDeclarationScope()->function_var() : nullptr; | 2124 is_function_scope() ? AsDeclarationScope()->function_var() : nullptr; |
2122 bool is_function_var_in_context = | 2125 bool is_function_var_in_context = |
2123 function != nullptr && function->IsContextSlot(); | 2126 function != nullptr && function->IsContextSlot(); |
2124 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - | 2127 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - |
2125 (is_function_var_in_context ? 1 : 0); | 2128 (is_function_var_in_context ? 1 : 0); |
2126 } | 2129 } |
2127 | 2130 |
2128 } // namespace internal | 2131 } // namespace internal |
2129 } // namespace v8 | 2132 } // namespace v8 |
OLD | NEW |