| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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-reflect | 5 // Flags: --harmony-reflect |
| 6 | 6 |
| 7 | 7 |
| 8 (function testReflectConstructArity() { | 8 (function testReflectConstructArity() { |
| 9 assertEquals(2, Reflect.construct.length); | 9 assertEquals(2, Reflect.construct.length); |
| 10 })(); | 10 })(); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 (function () { | 288 (function () { |
| 289 var realm1 = Realm.create(); | 289 var realm1 = Realm.create(); |
| 290 var realm2 = Realm.create(); | 290 var realm2 = Realm.create(); |
| 291 | 291 |
| 292 var well_known_intrinsic_constructors = [ | 292 var well_known_intrinsic_constructors = [ |
| 293 "Array", | 293 "Array", |
| 294 "ArrayBuffer", | 294 "ArrayBuffer", |
| 295 "Boolean", | 295 "Boolean", |
| 296 ["DataView", [new ArrayBuffer()]], | 296 ["DataView", [new ArrayBuffer()]], |
| 297 "Date", | 297 "Date", |
| 298 // "Error", | 298 "Error", |
| 299 // "EvalError", | 299 "EvalError", |
| 300 "Float32Array", | 300 "Float32Array", |
| 301 "Float64Array", | 301 "Float64Array", |
| 302 "Function", | 302 "Function", |
| 303 "((function*(){}).constructor)", // GeneratorFunction | 303 "((function*(){}).constructor)", // GeneratorFunction |
| 304 "Int8Array", | 304 "Int8Array", |
| 305 "Int16Array", | 305 "Int16Array", |
| 306 "Int32Array", | 306 "Int32Array", |
| 307 "Map", | 307 "Map", |
| 308 "Number", | 308 "Number", |
| 309 "Object", | 309 "Object", |
| 310 // "Promise", | 310 // "Promise", |
| 311 // "RangeError", | 311 "RangeError", |
| 312 // "ReferenceError", | 312 "ReferenceError", |
| 313 "RegExp", | 313 "RegExp", |
| 314 "Set", | 314 "Set", |
| 315 "String", | 315 "String", |
| 316 // "SyntaxError", | 316 "SyntaxError", |
| 317 // %TypedArray%? | 317 // %TypedArray%? |
| 318 // "TypeError", | 318 "TypeError", |
| 319 "Uint8Array", | 319 "Uint8Array", |
| 320 "Uint8ClampedArray", | 320 "Uint8ClampedArray", |
| 321 "Uint16Array", | 321 "Uint16Array", |
| 322 "Uint32Array", | 322 "Uint32Array", |
| 323 // "URIError", | 323 "URIError", |
| 324 "WeakMap", | 324 "WeakMap", |
| 325 "WeakSet" | 325 "WeakSet" |
| 326 ]; | 326 ]; |
| 327 | 327 |
| 328 function getname(v) { | 328 function getname(v) { |
| 329 return typeof v === "string" ? v : v[0]; | 329 return typeof v === "string" ? v : v[0]; |
| 330 } | 330 } |
| 331 | 331 |
| 332 function getargs(v) { | 332 function getargs(v) { |
| 333 return typeof v === "string" ? [] : v[1]; | 333 return typeof v === "string" ? [] : v[1]; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 for (var realm of [realm1, realm2]) { | 368 for (var realm of [realm1, realm2]) { |
| 369 test(realm, getname(intrinsic), getargs(intrinsic), convert); | 369 test(realm, getname(intrinsic), getargs(intrinsic), convert); |
| 370 } | 370 } |
| 371 } | 371 } |
| 372 } | 372 } |
| 373 | 373 |
| 374 test_all(test_intrinsic_default, (v)=>v); | 374 test_all(test_intrinsic_default, (v)=>v); |
| 375 test_all(test_intrinsic_default, | 375 test_all(test_intrinsic_default, |
| 376 (v)=>{ "use strict"; return class extends v {}}); | 376 (v)=>{ "use strict"; return class extends v {}}); |
| 377 })(); | 377 })(); |
| OLD | NEW |