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

Side by Side Diff: src/scopes.cc

Issue 9125001: Adjust position recorded for call expressions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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') | test/mjsunit/regress/regress-109195.js » ('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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 // Print parameters, if any. 801 // Print parameters, if any.
802 if (is_function_scope()) { 802 if (is_function_scope()) {
803 PrintF(" ("); 803 PrintF(" (");
804 for (int i = 0; i < params_.length(); i++) { 804 for (int i = 0; i < params_.length(); i++) {
805 if (i > 0) PrintF(", "); 805 if (i > 0) PrintF(", ");
806 PrintName(params_[i]->name()); 806 PrintName(params_[i]->name());
807 } 807 }
808 PrintF(")"); 808 PrintF(")");
809 } 809 }
810 810
811 PrintF(" {\n"); 811 PrintF(" { // (%d, %d)\n", start_position(), end_position());
812 812
813 // Function name, if any (named function literals, only). 813 // Function name, if any (named function literals, only).
814 if (function_ != NULL) { 814 if (function_ != NULL) {
815 Indent(n1, "// (local) function name: "); 815 Indent(n1, "// (local) function name: ");
816 PrintName(function_->name()); 816 PrintName(function_->name());
817 PrintF("\n"); 817 PrintF("\n");
818 } 818 }
819 819
820 // Scope info. 820 // Scope info.
821 if (HasTrivialOuterContext()) { 821 if (HasTrivialOuterContext()) {
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 } 1230 }
1231 1231
1232 1232
1233 int Scope::ContextLocalCount() const { 1233 int Scope::ContextLocalCount() const {
1234 if (num_heap_slots() == 0) return 0; 1234 if (num_heap_slots() == 0) return 0;
1235 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - 1235 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS -
1236 (function_ != NULL && function_->var()->IsContextSlot() ? 1 : 0); 1236 (function_ != NULL && function_->var()->IsContextSlot() ? 1 : 0);
1237 } 1237 }
1238 1238
1239 } } // namespace v8::internal 1239 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/regress/regress-109195.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698