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

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

Issue 2758002: Fix bug in mjsunit/const-eval-init causing objects to be initialized to undef... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 6 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 | « no previous file | 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 var source = "const x = 9; assertEquals(9, x); x = 10; assertEquals(9, x)"; 84 var source = "const x = 9; assertEquals(9, x); x = 10; assertEquals(9, x)";
85 eval(source); 85 eval(source);
86 } 86 }
87 87
88 testInitFastCaseExtension(); 88 testInitFastCaseExtension();
89 89
90 function testInitSlowCaseExtension() { 90 function testInitSlowCaseExtension() {
91 var source = ""; 91 var source = "";
92 // Introduce 100 properties on the context extension object to force 92 // Introduce 100 properties on the context extension object to force
93 // it in slow case. 93 // it in slow case.
94 for (var i = 0; i < 100; i++) source += ("var a" + i + " = i;"); 94 for (var i = 0; i < 100; i++) source += ("var a" + i + " = " + i + ";");
95 source += "const x = 10; assertEquals(10, x); x = 11; assertEquals(10, x)"; 95 source += "const x = 10; assertEquals(10, x); x = 11; assertEquals(10, x)";
96 eval(source); 96 eval(source);
97 } 97 }
98 98
99 testInitSlowCaseExtension(); 99 testInitSlowCaseExtension();
100 100
101 function testAssignSurroundingContextSlot() { 101 function testAssignSurroundingContextSlot() {
102 var x = 12; 102 var x = 12;
103 function local() { 103 function local() {
104 var source = "delete x; const x = 13; assertEquals(13, x)"; 104 var source = "delete x; const x = 13; assertEquals(13, x)";
105 eval(source); 105 eval(source);
106 } 106 }
107 local(); 107 local();
108 assertEquals(13, x); 108 assertEquals(13, x);
109 } 109 }
110 110
111 testAssignSurroundingContextSlot(); 111 testAssignSurroundingContextSlot();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698