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

Side by Side Diff: test/mjsunit/const-eval-init.js

Issue 3274008: Get gcc to check that we don't ignore return values of functions that can... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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/utils.h ('K') | « test/cctest/test-heap.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 function testAssignmentArgument(x) { 61 function testAssignmentArgument(x) {
62 function local() { 62 function local() {
63 var source = "delete x; const x = 7; assertEquals(7, x)"; 63 var source = "delete x; const x = 7; assertEquals(7, x)";
64 eval(source); 64 eval(source);
65 } 65 }
66 local(); 66 local();
67 assertEquals(7, x); 67 assertEquals(7, x);
68 } 68 }
69 69
70 testAssignmentArgument(); 70 for (var i = 0; i < 10000; i++) {
71 testAssignmentArgument();
72 }
71 assertEquals(6, x); 73 assertEquals(6, x);
72 74
73 __defineSetter__('x', function() { throw 42; }); 75 __defineSetter__('x', function() { throw 42; });
74 function testAssignGlobalThrows() { 76 function testAssignGlobalThrows() {
75 // Initialization turns into assignment to global 'x' which 77 // Initialization turns into assignment to global 'x' which
76 // throws an exception. 78 // throws an exception.
77 var source = "delete x; const x = 8"; 79 var source = "delete x; const x = 8";
78 eval(source); 80 eval(source);
79 } 81 }
80 82
(...skipping 21 matching lines...) Expand all
102 var x = 12; 104 var x = 12;
103 function local() { 105 function local() {
104 var source = "delete x; const x = 13; assertEquals(13, x)"; 106 var source = "delete x; const x = 13; assertEquals(13, x)";
105 eval(source); 107 eval(source);
106 } 108 }
107 local(); 109 local();
108 assertEquals(13, x); 110 assertEquals(13, x);
109 } 111 }
110 112
111 testAssignSurroundingContextSlot(); 113 testAssignSurroundingContextSlot();
OLDNEW
« src/utils.h ('K') | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698