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

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

Issue 2373443003: Revert of Preparse inner functions (new try) (Closed)
Patch Set: Created 4 years, 2 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-parsing.cc ('k') | test/mjsunit/debug-scopes.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 CheckScope(mirror.scope(0), {}, ScopeType.Script); 80 CheckScope(mirror.scope(0), {}, ScopeType.Script);
81 CheckScope(mirror.scope(1), {}, ScopeType.Global); 81 CheckScope(mirror.scope(1), {}, ScopeType.Global);
82 82
83 var f3 = (function F1(invisible_parameter) { 83 var f3 = (function F1(invisible_parameter) {
84 var invisible1 = 1; 84 var invisible1 = 1;
85 var visible1 = 10; 85 var visible1 = 10;
86 return (function F2() { 86 return (function F2() {
87 var invisible2 = 2; 87 var invisible2 = 2;
88 return (function F3() { 88 return (function F3() {
89 var visible2 = 20; 89 var visible2 = 20;
90 var invisible2 = 3;
90 return (function () {return visible1 + visible2 + visible1a;}); 91 return (function () {return visible1 + visible2 + visible1a;});
91 })(); 92 })();
92 })(); 93 })();
93 })(5); 94 })(5);
94 95
95 var mirror = Debug.MakeMirror(f3); 96 var mirror = Debug.MakeMirror(f3);
96 97
97 assertEquals(4, mirror.scopeCount()); 98 assertEquals(4, mirror.scopeCount());
98 99
99 CheckScope(mirror.scope(0), { visible2: 20 }, ScopeType.Closure); 100 CheckScope(mirror.scope(0), { visible2: 20 }, ScopeType.Closure);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 148
148 149
149 function CheckNoScopeVisible(f) { 150 function CheckNoScopeVisible(f) {
150 var mirror = Debug.MakeMirror(f); 151 var mirror = Debug.MakeMirror(f);
151 assertEquals(0, mirror.scopeCount()); 152 assertEquals(0, mirror.scopeCount());
152 } 153 }
153 154
154 CheckNoScopeVisible(Number); 155 CheckNoScopeVisible(Number);
155 156
156 CheckNoScopeVisible(Function.toString); 157 CheckNoScopeVisible(Function.toString);
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698