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

Side by Side Diff: test/mjsunit/es6/block-sloppy-function.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
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 --harmony-sloppy-let
6 // Flags: --harmony-sloppy-function
7
8 // Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode. 5 // Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode.
9 // http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-decl arations-web-legacy-compatibility-semantics 6 // http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-decl arations-web-legacy-compatibility-semantics
10 7
11 (function overridingLocalFunction() { 8 (function overridingLocalFunction() {
12 var x = []; 9 var x = [];
13 assertEquals('function', typeof f); 10 assertEquals('function', typeof f);
14 function f() { 11 function f() {
15 x.push(1); 12 x.push(1);
16 } 13 }
17 f(); 14 f();
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 throws = false; 289 throws = false;
293 try { 290 try {
294 eval('{ function hoistWhenFrozen() {} }'); 291 eval('{ function hoistWhenFrozen() {} }');
295 } catch (e) { 292 } catch (e) {
296 throws = true; 293 throws = true;
297 } 294 }
298 assertFalse(this.hasOwnProperty("hoistWhenFrozen")); 295 assertFalse(this.hasOwnProperty("hoistWhenFrozen"));
299 assertThrows(() => hoistWhenFrozen, ReferenceError); 296 assertThrows(() => hoistWhenFrozen, ReferenceError);
300 // Should be assertFalse BUG(v8:4452) 297 // Should be assertFalse BUG(v8:4452)
301 assertTrue(throws); 298 assertTrue(throws);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/block-scoping-top-level-sloppy.js ('k') | test/mjsunit/es6/class-computed-property-names-super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698