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

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

Issue 7979001: Scope tree serialization and ScopeIterator cleanup. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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
« src/scopes.cc ('K') | « src/scopes.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 var with_object = {c:3,d:4}; 433 var with_object = {c:3,d:4};
434 with(with_object) { 434 with(with_object) {
435 with(with_object) { 435 with(with_object) {
436 debugger; 436 debugger;
437 } 437 }
438 } 438 }
439 EndTest(); 439 EndTest();
440 440
441 441
442 // With block in function that is marked for optimization while being executed.
443 BeginTest("With 7");
444
445 function with_7() {
446 with({}) {
447 %OptimizeFunctionOnNextCall(with_7);
448 debugger;
449 }
450 }
451
452 listener_delegate = function(exec_state) {
453 CheckScopeChain([debug.ScopeType.With,
454 debug.ScopeType.Local,
455 debug.ScopeType.Global], exec_state);
456 CheckScopeContent({}, 0, exec_state);
457 };
458 with_7();
459 EndTest();
460
461
442 // Simple closure formed by returning an inner function referering the outer 462 // Simple closure formed by returning an inner function referering the outer
443 // functions arguments. 463 // functions arguments.
444 BeginTest("Closure 1"); 464 BeginTest("Closure 1");
445 465
446 function closure_1(a) { 466 function closure_1(a) {
447 function f() { 467 function f() {
448 debugger; 468 debugger;
449 return a; 469 return a;
450 }; 470 };
451 return f; 471 return f;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 try { 963 try {
944 throw 'Exception'; 964 throw 'Exception';
945 } catch (e) { 965 } catch (e) {
946 (function(x) { 966 (function(x) {
947 debugger; 967 debugger;
948 })(2); 968 })(2);
949 } 969 }
950 EndTest(); 970 EndTest();
951 971
952 972
973 // Catch block in function that is marked for optimization while being executed.
974 BeginTest("Catch block 7");
975 function catch_block_7() {
976 %OptimizeFunctionOnNextCall(catch_block_7);
977 try {
978 throw 'Exception';
979 } catch (e) {
980 debugger;
981 }
982 };
983
984
985 listener_delegate = function(exec_state) {
986 CheckScopeChain([debug.ScopeType.Catch,
987 debug.ScopeType.Local,
988 debug.ScopeType.Global], exec_state);
989 CheckScopeContent({e:'Exception'}, 0, exec_state);
990 };
991 catch_block_7();
992 EndTest();
993
994
953 assertEquals(begin_test_count, break_count, 995 assertEquals(begin_test_count, break_count,
954 'one or more tests did not enter the debugger'); 996 'one or more tests did not enter the debugger');
955 assertEquals(begin_test_count, end_test_count, 997 assertEquals(begin_test_count, end_test_count,
956 'one or more tests did not have its result checked'); 998 'one or more tests did not have its result checked');
OLDNEW
« src/scopes.cc ('K') | « src/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698