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

Side by Side Diff: test/mjsunit/debug-scopes.js

Issue 1130733003: Resolve references to "this" the same way as normal variables (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Add mips/mips64. Fix expectation in nosnap deserialization test. Fix scratch regiser use on x64. Created 5 years, 7 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
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | test/mjsunit/harmony/arrow-functions-this.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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 count++; 161 count++;
162 } 162 }
163 163
164 // 'arguments' and might be exposed in the local and closure scope. Just 164 // 'arguments' and might be exposed in the local and closure scope. Just
165 // ignore this. 165 // ignore this.
166 var scope_size = scope.scopeObject().properties().length; 166 var scope_size = scope.scopeObject().properties().length;
167 if (!scope.scopeObject().property('arguments').isUndefined()) { 167 if (!scope.scopeObject().property('arguments').isUndefined()) {
168 scope_size--; 168 scope_size--;
169 } 169 }
170 // Ditto for 'this'.
171 if (!scope.scopeObject().property('this').isUndefined()) {
172 scope_size--;
173 }
170 // Skip property with empty name. 174 // Skip property with empty name.
171 if (!scope.scopeObject().property('').isUndefined()) { 175 if (!scope.scopeObject().property('').isUndefined()) {
172 scope_size--; 176 scope_size--;
173 } 177 }
174 178
175 if (count != scope_size) { 179 if (count != scope_size) {
176 print('Names found in scope:'); 180 print('Names found in scope:');
177 var names = scope.scopeObject().propertyNames(); 181 var names = scope.scopeObject().propertyNames();
178 for (var i = 0; i < names.length; i++) { 182 for (var i = 0; i < names.length; i++) {
179 print(names[i]); 183 print(names[i]);
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 new C1().m(); 1073 new C1().m();
1070 })(); 1074 })();
1071 1075
1072 EndTest(); 1076 EndTest();
1073 1077
1074 1078
1075 assertEquals(begin_test_count, break_count, 1079 assertEquals(begin_test_count, break_count,
1076 'one or more tests did not enter the debugger'); 1080 'one or more tests did not enter the debugger');
1077 assertEquals(begin_test_count, end_test_count, 1081 assertEquals(begin_test_count, end_test_count,
1078 'one or more tests did not have its result checked'); 1082 'one or more tests did not have its result checked');
OLDNEW
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | test/mjsunit/harmony/arrow-functions-this.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698