| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 })(); |
| OLD | NEW |