Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: src/scopes.cc

Issue 9127002: Merge r10350 from the bleeding_edge to the 3.7 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.7/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/parser.cc ('k') | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698