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

Side by Side Diff: test/mjsunit/harmony/block-scoping-top-level-sloppy.js

Issue 1255013002: Split off a separate --harmony_sloppy_let flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix flags on mjsunit tests Created 5 years, 4 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/mjsunit/harmony/block-scoping-sloppy.js ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --min-preparse-length=0 5 // Flags: --min-preparse-length=0
6 // Flags: --no-legacy-const --harmony-sloppy 6 // Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
7 7
8 let xxx = 1; 8 let xxx = 1;
9 let f = undefined; 9 let f = undefined;
10 { 10 {
11 let inner_x = xxx; 11 let inner_x = xxx;
12 f = function() { return inner_x; }; 12 f = function() { return inner_x; };
13 } 13 }
14 14
15 assertSame(1, f()); 15 assertSame(1, f());
16 16
17 xxx = 42; 17 xxx = 42;
18 { 18 {
19 f = function() { return inner_x1; }; 19 f = function() { return inner_x1; };
20 let inner_x1 = xxx; 20 let inner_x1 = xxx;
21 } 21 }
22 22
23 assertSame(42, f()); 23 assertSame(42, f());
24 24
25 xxx = 31; 25 xxx = 31;
26 { 26 {
27 let inner_x1 = xxx; 27 let inner_x1 = xxx;
28 try { 28 try {
29 throw new Error(); 29 throw new Error();
30 } catch (e) { 30 } catch (e) {
31 f = function() { return inner_x1; }; 31 f = function() { return inner_x1; };
32 } 32 }
33 } 33 }
34 assertSame(31, f()); 34 assertSame(31, f());
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/block-scoping-sloppy.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698