| 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/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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 break; | 856 break; |
| 857 } | 857 } |
| 858 } | 858 } |
| 859 | 859 |
| 860 | 860 |
| 861 static void PrintVar(int indent, Variable* var) { | 861 static void PrintVar(int indent, Variable* var) { |
| 862 if (var->is_used() || !var->IsUnallocated()) { | 862 if (var->is_used() || !var->IsUnallocated()) { |
| 863 Indent(indent, Variable::Mode2String(var->mode())); | 863 Indent(indent, Variable::Mode2String(var->mode())); |
| 864 PrintF(" "); | 864 PrintF(" "); |
| 865 if (var->raw_name()->IsEmpty()) | 865 if (var->raw_name()->IsEmpty()) |
| 866 PrintF(".%p", var); | 866 PrintF(".%p", reinterpret_cast<void*>(var)); |
| 867 else | 867 else |
| 868 PrintName(var->raw_name()); | 868 PrintName(var->raw_name()); |
| 869 PrintF("; // "); | 869 PrintF("; // "); |
| 870 PrintLocation(var); | 870 PrintLocation(var); |
| 871 bool comma = !var->IsUnallocated(); | 871 bool comma = !var->IsUnallocated(); |
| 872 if (var->has_forced_context_allocation()) { | 872 if (var->has_forced_context_allocation()) { |
| 873 if (comma) PrintF(", "); | 873 if (comma) PrintF(", "); |
| 874 PrintF("forced context allocation"); | 874 PrintF("forced context allocation"); |
| 875 comma = true; | 875 comma = true; |
| 876 } | 876 } |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1606 function_ != NULL && function_->proxy()->var()->IsContextSlot(); | 1606 function_ != NULL && function_->proxy()->var()->IsContextSlot(); |
| 1607 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - num_global_slots() - | 1607 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - num_global_slots() - |
| 1608 (is_function_var_in_context ? 1 : 0); | 1608 (is_function_var_in_context ? 1 : 0); |
| 1609 } | 1609 } |
| 1610 | 1610 |
| 1611 | 1611 |
| 1612 int Scope::ContextGlobalCount() const { return num_global_slots(); } | 1612 int Scope::ContextGlobalCount() const { return num_global_slots(); } |
| 1613 | 1613 |
| 1614 } // namespace internal | 1614 } // namespace internal |
| 1615 } // namespace v8 | 1615 } // namespace v8 |
| OLD | NEW |