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

Side by Side Diff: test/mjsunit/strong/literals.js

Issue 1300103005: [parser] disallow language mode directive in body of function with non-simple parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: flag implications don't work in test suite? Created 5 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
« no previous file with comments | « test/mjsunit/strong/function-arity.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: --strong-mode --allow-natives-syntax 5 // Flags: --strong-mode --allow-natives-syntax
6 // Flags: --harmony-arrow-functions --harmony-rest-parameters 6 // Flags: --harmony-arrow-functions --harmony-rest-parameters
7 // Flags: --harmony-destructuring --harmony-spread-arrays 7 // Flags: --harmony-destructuring --harmony-spread-arrays
8 8
9 'use strict'; 9 'use strict';
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 assertWeakArray([1, 2, 3]); 105 assertWeakArray([1, 2, 3]);
106 assertWeakArray([1, 2, ...[3, 4], 5]); 106 assertWeakArray([1, 2, ...[3, 4], 5]);
107 assertWeakArray([[[]]]); 107 assertWeakArray([[[]]]);
108 assertWeakArray([[1], {}, [[3]]]); 108 assertWeakArray([[1], {}, [[3]]]);
109 assertWeakArray([[1], {}, [[3]]][0]); 109 assertWeakArray([[1], {}, [[3]]][0]);
110 assertWeakArray([[1], {}, [[3]]][2]); 110 assertWeakArray([[1], {}, [[3]]][2]);
111 assertWeakArray([[1], {}, [[3]]][2][0]); 111 assertWeakArray([[1], {}, [[3]]][2][0]);
112 assertWeakArray({a: [], b: {}}.a); 112 assertWeakArray({a: [], b: {}}.a);
113 })(); 113 })();
114 114
115 (function StrongArrayLiterals(...args) { 115 (function StrongArrayLiterals() {
116 'use strong'; 116 'use strong';
117 function assertStrongArray(x) { 117 function assertStrongArray(x) {
118 assertTrue(%IsStrong(x)); 118 assertTrue(%IsStrong(x));
119 assertSame(Array.prototype, Object.getPrototypeOf(x)); 119 assertSame(Array.prototype, Object.getPrototypeOf(x));
120 } 120 }
121 let [...r] = []; 121 let [...r] = [];
122 assertStrongArray(args); 122 assertStrongArray((function(...a) { return a; })());
123 assertStrongArray(r); 123 assertStrongArray(r);
124 assertStrongArray([]); 124 assertStrongArray([]);
125 assertStrongArray([1, 2, 3]); 125 assertStrongArray([1, 2, 3]);
126 assertStrongArray([1, 2, ...[3, 4], 5]); 126 assertStrongArray([1, 2, ...[3, 4], 5]);
127 assertStrongArray([[[]]]); 127 assertStrongArray([[[]]]);
128 assertStrongArray([[1], {}, [[3]]]); 128 assertStrongArray([[1], {}, [[3]]]);
129 assertStrongArray([[1], {}, [[3]]][0]); 129 assertStrongArray([[1], {}, [[3]]][0]);
130 assertStrongArray([[1], {}, [[3]]][2]); 130 assertStrongArray([[1], {}, [[3]]][2]);
131 assertStrongArray([[1], {}, [[3]]][2][0]); 131 assertStrongArray([[1], {}, [[3]]][2][0]);
132 assertStrongArray({a: [], b: {}}.a); 132 assertStrongArray({a: [], b: {}}.a);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 })(); 343 })();
344 344
345 (function StrongRegExpLiterals() { 345 (function StrongRegExpLiterals() {
346 'use strong'; 346 'use strong';
347 function assertStrongRegExp(x) { 347 function assertStrongRegExp(x) {
348 // TODO(rossberg): strongify regexps 348 // TODO(rossberg): strongify regexps
349 // assertTrue(%IsStrong(x)); 349 // assertTrue(%IsStrong(x));
350 } 350 }
351 assertStrongRegExp(/abc/); 351 assertStrongRegExp(/abc/);
352 })(); 352 })();
OLDNEW
« no previous file with comments | « test/mjsunit/strong/function-arity.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698