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

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

Issue 1270423003: [strong] dot prototypes of strong class literals should be strong objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/runtime/runtime-classes.cc ('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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // assertWeakClass(class D extends null {}); 303 // assertWeakClass(class D extends null {});
304 assertWeakClass(class D extends C {}); 304 assertWeakClass(class D extends C {});
305 assertWeakClass(class D extends S {}); 305 assertWeakClass(class D extends S {});
306 assertWeakClass(class D extends class {} {}); 306 assertWeakClass(class D extends class {} {});
307 })(); 307 })();
308 308
309 (function StrongClassLiterals() { 309 (function StrongClassLiterals() {
310 'use strong'; 310 'use strong';
311 function assertStrongClass(x) { 311 function assertStrongClass(x) {
312 assertTrue(%IsStrong(x)); 312 assertTrue(%IsStrong(x));
313 // TODO(rossberg): strongify class prototype and instance 313 assertTrue(%IsStrong(x.prototype));
314 // assertTrue(%IsStrong(x.prototype)); 314 // TODO(rossberg): strongify class instance
315 // assertTrue(%IsStrong(new x)); 315 // assertTrue(%IsStrong(new x));
316 } 316 }
317 class C {}; 317 class C {};
318 class D extends C {}; 318 class D extends C {};
319 class E extends Object {}; 319 class E extends Object {};
320 const W = (1, eval)(() => {'use strict'; return class {}})(); 320 const W = (1, eval)(() => {'use strict'; return class {}})();
321 class G extends W {}; 321 class G extends W {};
322 assertStrongClass(C); 322 assertStrongClass(C);
323 assertStrongClass(D); 323 assertStrongClass(D);
324 assertStrongClass(E); 324 assertStrongClass(E);
(...skipping 18 matching lines...) Expand all
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 | « src/runtime/runtime-classes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698