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

Side by Side Diff: test/mjsunit/regress/regress-520029.js

Issue 1858943002: Remove runtime flags for sloppy mode block scoping features (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 8 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/regress/regress-4693.js ('k') | test/mjsunit/regress/regress-536751.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 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: --harmony-sloppy-let --harmony-sloppy
6
7 // Test that hoisting a function out of a lexical scope does not 5 // Test that hoisting a function out of a lexical scope does not
8 // lead to a parsing error 6 // lead to a parsing error
9 7
10 // This used to cause a crash in the parser 8 // This used to cause a crash in the parser
11 function f(one) { class x { } { class x { } function g() { one; x; } g() } } f() 9 function f(one) { class x { } { class x { } function g() { one; x; } g() } } f()
12 10
13 // This used to lead to a ReferenceError 11 // This used to lead to a ReferenceError
14 function g() { var x = 1; { let x = 2; function g() { x; } g(); } } 12 function g() { var x = 1; { let x = 2; function g() { x; } g(); } }
15 assertEquals(undefined, g()); 13 assertEquals(undefined, g());
16 14
17 // This used to cause a crash in the parser 15 // This used to cause a crash in the parser
18 function __f_4(one) { 16 function __f_4(one) {
19 var __v_10 = one + 1; 17 var __v_10 = one + 1;
20 { 18 {
21 let __v_10 = one + 3; 19 let __v_10 = one + 3;
22 function __f_6() { 20 function __f_6() {
23 one; 21 one;
24 __v_10; 22 __v_10;
25 } 23 }
26 __f_6(); 24 __f_6();
27 } 25 }
28 } 26 }
29 __f_4(); 27 __f_4();
OLDNEW
« no previous file with comments | « test/mjsunit/regress/regress-4693.js ('k') | test/mjsunit/regress/regress-536751.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698