| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 // Print parameters, if any. | 760 // Print parameters, if any. |
| 761 if (is_function_scope()) { | 761 if (is_function_scope()) { |
| 762 PrintF(" ("); | 762 PrintF(" ("); |
| 763 for (int i = 0; i < params_.length(); i++) { | 763 for (int i = 0; i < params_.length(); i++) { |
| 764 if (i > 0) PrintF(", "); | 764 if (i > 0) PrintF(", "); |
| 765 PrintName(params_[i]->name()); | 765 PrintName(params_[i]->name()); |
| 766 } | 766 } |
| 767 PrintF(")"); | 767 PrintF(")"); |
| 768 } | 768 } |
| 769 | 769 |
| 770 PrintF(" {\n"); | 770 PrintF(" { // (%d, %d)\n", start_position(), end_position()); |
| 771 | 771 |
| 772 // Function name, if any (named function literals, only). | 772 // Function name, if any (named function literals, only). |
| 773 if (function_ != NULL) { | 773 if (function_ != NULL) { |
| 774 Indent(n1, "// (local) function name: "); | 774 Indent(n1, "// (local) function name: "); |
| 775 PrintName(function_->name()); | 775 PrintName(function_->name()); |
| 776 PrintF("\n"); | 776 PrintF("\n"); |
| 777 } | 777 } |
| 778 | 778 |
| 779 // Scope info. | 779 // Scope info. |
| 780 if (HasTrivialOuterContext()) { | 780 if (HasTrivialOuterContext()) { |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 | 1191 |
| 1192 int Scope::ContextLocalCount() const { | 1192 int Scope::ContextLocalCount() const { |
| 1193 if (num_heap_slots() == 0) return 0; | 1193 if (num_heap_slots() == 0) return 0; |
| 1194 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - | 1194 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - |
| 1195 (function_ != NULL && function_->var()->IsContextSlot() ? 1 : 0); | 1195 (function_ != NULL && function_->var()->IsContextSlot() ? 1 : 0); |
| 1196 } | 1196 } |
| 1197 | 1197 |
| 1198 } } // namespace v8::internal | 1198 } } // namespace v8::internal |
| OLD | NEW |