| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/ |
| D | ReflectGetBadCases.sts | 20 failures += test(reflectGetBadCases(), "Reflect.get on types without fields and elements"); 57 Reflect.get(c, "a") 59 … result += e.toString().contains("`target` argument of Reflect.get must have fields", 0) ? 0 : 1 63 Reflect.get(bo, "a") 65 … result += e.toString().contains("`target` argument of Reflect.get must have fields", 0) ? 0 : 1 69 Reflect.get(bt, "a") 71 … result += e.toString().contains("`target` argument of Reflect.get must have fields", 0) ? 0 : 1 75 Reflect.get(sh, "a") 77 … result += e.toString().contains("`target` argument of Reflect.get must have fields", 0) ? 0 : 1 81 Reflect.get(i, "a") [all …]
|
| D | ReflectHas.sts | 19 failures += test(reflectHas(), "Reflect.has"); 71 result += (Reflect.has(arr, 0) == true) ? 0 : 1 72 result += (Reflect.has(arr, 3) == false) ? 0 : 1 73 result += (Reflect.has(arr, "length") == true) ? 0 : 1 74 result += (Reflect.has(arr, "qwerty") == false) ? 0 : 1 75 result += (Reflect.has(arr, "toString") == true) ? 0 : 1 76 result += (Reflect.has(arr, "toLocaleString") == true) ? 0 : 1 77 result += (Reflect.has(arr, "keys") == false) ? 0 : 1 79 result += (Reflect.has(str, 0) == true) ? 0 : 1 80 result += (Reflect.has(str, 3) == false) ? 0 : 1 [all …]
|
| D | ReflectGet.sts | 20 failures += test(reflectGetClass(), "Reflect.get on class type"); 21 failures += test(reflectGetArray(), "Reflect.get on array type"); 22 failures += test(reflectGetLambda(), "Reflect.get on function type"); 51 result += (Reflect.get(p, "x") as Number == 10) ? 0 : 1 52 result += (Reflect.get(p, "y") as Number == 20) ? 0 : 1 53 result += (Reflect.get(p, "z") as Number == 30) ? 0 : 1 55 result += (Reflect.get(p, "axisnum") == undefined) ? 0 : 1 56 result += (Reflect.get(p, "qwerty") == undefined) ? 0 : 1 57 result += (Reflect.get(p, 1) == null) ? 0 : 1 68 result += (Reflect.get(arr, 0) as Number == 10) ? 0 : 1 [all …]
|
| D | ReflectSet.sts | 20 failures += test(reflectSetClass(), "Reflect.set on class type"); 21 failures += test(reflectSetArray(), "Reflect.set on array type"); 63 result += (Reflect.set(p, "x", 40 as number) == true) ? 0 : 1 64 result += (Reflect.set(p, "y", 50 as number) == true) ? 0 : 1 65 result += (Reflect.set(p, "z", 60 as number) == true) ? 0 : 1 67 result += (Reflect.get(p, "x") as Number == 40) ? 0 : 1 68 result += (Reflect.get(p, "y") as Number == 50) ? 0 : 1 69 result += (Reflect.get(p, "z") as Number == 60) ? 0 : 1 71 result += (Reflect.set(p, "axisnum", 10 as number) == false) ? 0 : 1 72 result += (Reflect.set(p, "x", "string") == false) ? 0 : 1 [all …]
|
| D | ReflectOwnKeys.sts | 20 failures += test(reflectOwnKeys(), "Reflect.ownKeys"); 80 result += arraysAreEqual(Reflect.ownKeys(c), emptyArr) ? 0 : 1 81 result += arraysAreEqual(Reflect.ownKeys(bo), emptyArr) ? 0 : 1 82 result += arraysAreEqual(Reflect.ownKeys(bt), emptyArr) ? 0 : 1 83 result += arraysAreEqual(Reflect.ownKeys(sh), emptyArr) ? 0 : 1 84 result += arraysAreEqual(Reflect.ownKeys(i), emptyArr) ? 0 : 1 85 result += arraysAreEqual(Reflect.ownKeys(lo), emptyArr) ? 0 : 1 86 result += arraysAreEqual(Reflect.ownKeys(fl), emptyArr) ? 0 : 1 87 result += arraysAreEqual(Reflect.ownKeys(dou), emptyArr) ? 0 : 1 89 result += arraysAreEqual(Reflect.ownKeys(arr), ["0", "1", "2", "length"]) ? 0 : 1 [all …]
|
| /arkcompiler/ets_runtime/test/aottest/builtin_inlining/reflect/Reflect/ |
| D | builtinReflectReflect.ts | 17 //aot: [trace] aot inline builtin: Reflect.getPrototypeOf, caller function name:func_main_0@builtin… 18 print(Reflect.getPrototypeOf({})) //: [object Object] 20 …//aot: [trace] aot inline builtin: Reflect.getPrototypeOf, caller function name:func_main_0@builti… 21 Reflect.getPrototypeOf(1); 26 //aot: [trace] aot inline builtin: Reflect.get, caller function name:func_main_0@builtinReflectRefl… 27 print(Reflect.get(o, "a")); //: 123 28 //aot: [trace] aot inline builtin: Reflect.get, caller function name:func_main_0@builtinReflectRefl… 29 print(Reflect.get(o, "b")); //: abc 30 //aot: [trace] aot inline builtin: Reflect.get, caller function name:func_main_0@builtinReflectRefl… 31 print(Reflect.get(o, "c")); //: undefined [all …]
|
| /arkcompiler/ets_runtime/test/aottest/aot_compatibility_test/builtins_api/ |
| D | builtins_api.ts | 26 print("Reflect.has:", Reflect.has(this, "b")); 27 print("Reflect.ownKeys():", Reflect.ownKeys(this)); 28 print("Reflect.get:", Reflect.get(this, "b")); 29 … print("Reflect.getOwnPropertyDescriptor():", Reflect.getOwnPropertyDescriptor(this, "b")); 35 print("Reflect.has:", Reflect.has(this, "b")); 36 print("Reflect.ownKeys():", Reflect.ownKeys(this)); 37 print("Reflect.get:", Reflect.get(this, "b")); 38 … print("Reflect.getOwnPropertyDescriptor():", Reflect.getOwnPropertyDescriptor(this, "b"));
|
| D | expect_output.txt | 18 Reflect.has: false 19 Reflect.ownKeys(): 20 Reflect.get: undefined 21 Reflect.getOwnPropertyDescriptor(): undefined 26 Reflect.has: true 27 Reflect.ownKeys(): b 28 Reflect.get: abc 29 Reflect.getOwnPropertyDescriptor(): [object Object]
|
| /arkcompiler/ets_runtime/test/moduletest/builtins/ |
| D | builtinsreflect.js | 18 * @tc.desc:test builtins reflect 22 print("builtins reflect start"); 24 // test1 -- reflect set length 27 var tag1 = Reflect.set(y, 'length', 0); 28 var tag2 = Reflect.set(y, 'length', 5); 35 Reflect.set(v56, "length", v0) 36 Reflect.set(v55, "length", v0, v56) 87 if (true == Reflect.get(target, "bla") && 88 42 == Reflect.get(target, 4) && 89 42 == Reflect.get(target, "4") && [all …]
|
| D | expect_output.txt | 287 builtins reflect start 332 builtins reflect end
|
| /arkcompiler/ets_frontend/ets2panda/linter/test_rules/ |
| D | rule144.sts | 84 /// Reflect 85 Reflect.apply<C, number[], void>(() => {}, c, []); 86 Reflect.construct<number[], C>(C, []); 87 Reflect.defineProperty(c, 'p', {}); 88 Reflect.deleteProperty(c, 'p', ); 89 Reflect.get<C, string>(c, 'p'); 90 Reflect.getOwnPropertyDescriptor<C, string>(c, 'p'); 91 Reflect.getPrototypeOf(c); 92 Reflect.isExtensible(c); 93 Reflect.preventExtensions(c); [all …]
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| D | builtins_reflect.h | 23 // List of functions in Reflect, excluding the '@@' properties. 25 // where BuiltinsRefject::func refers to the native implementation of Reflect[name]. 28 /* Reflect.apply ( target, thisArgument, argumentsList ) */ \ 30 /* Reflect.construct ( target, argumentsList [ , newTarget ] ) */ \ 32 /* Reflect.defineProperty ( target, propertyKey, attributes ) */ \ 34 /* Reflect.deleteProperty ( target, propertyKey ) */ \ 36 /* Reflect.get ( target, propertyKey [ , receiver ] ) */ \ 38 /* Reflect.getOwnPropertyDescriptor ( target, propertyKey ) */ \ 40 /* Reflect.getPrototypeOf ( target ) */ \ 42 /* Reflect.has ( target, propertyKey ) */ \ [all …]
|
| D | builtins_reflect.cpp | 22 // ecma 26.1.1 Reflect.apply (target, thisArgument, argumentsList) 26 BUILTINS_API_TRACE(argv->GetThread(), Reflect, Apply); in ReflectApply() 42 …THROW_TYPE_ERROR_AND_RETURN(thread, "Reflect.apply target is not callable", JSTaggedValue::Excepti… in ReflectApplyInternal() 60 // ecma 26.1.2 Reflect.construct (target, argumentsList [ , newTarget]) 64 BUILTINS_API_TRACE(argv->GetThread(), Reflect, Constructor); in ReflectConstruct() 70 …THROW_TYPE_ERROR_AND_RETURN(thread, "Reflect.construct target is not constructor", JSTaggedValue::… in ReflectConstruct() 77 … THROW_TYPE_ERROR_AND_RETURN(thread, "Reflect.construct newTarget is present, but not constructor", in ReflectConstruct() 101 // ecma 26.1.3 Reflect.defineProperty (target, propertyKey, attributes) 105 BUILTINS_API_TRACE(argv->GetThread(), Reflect, DefineProperty); in ReflectDefineProperty() 111 …THROW_TYPE_ERROR_AND_RETURN(thread, "Reflect.defineProperty target is not object", JSTaggedValue::… in ReflectDefineProperty() [all …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/ |
| D | limited_stdlib_api.sts | 84 /// Reflect 85 Reflect.apply<C, number[], void>(() => {}, c, []); 86 Reflect.construct<number[], C>(C, []); 87 Reflect.defineProperty(c, 'p', {}); 88 Reflect.deleteProperty(c, 'p', ); 89 Reflect.get<C, string>(c, 'p'); 90 Reflect.getOwnPropertyDescriptor<C, string>(c, 'p'); 91 Reflect.getPrototypeOf(c); 92 Reflect.isExtensible(c); 93 Reflect.preventExtensions(c); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
| D | Reflect.sts | 18 export class Reflect { 41 throw new Error("`target` argument of Reflect.get must have fields") 43 if (!Reflect.has(target, key)) { 91 throw new Error("`target` argument of Reflect.get must be indexed") 93 if (!Reflect.has(target, index)) { 125 if (!Reflect.has(target, key)) { 157 if (!Reflect.has(target, index)) {
|
| /arkcompiler/ets_runtime/test/aottest/class_method_signature/ |
| D | class_method_signature.ts | 35 print(Reflect.ownKeys(A.prototype)); //constructor,bar,bar2 58 print(Reflect.ownKeys(A2.prototype)); //constructor,foo,bar,bar2 78 print(Reflect.ownKeys(B.prototype)); //constructor,bar,bar2 101 print(Reflect.ownKeys(B2.prototype)); //constructor,bar,foo,bar2
|
| /arkcompiler/ets_runtime/test/moduletest/ictest/ |
| D | ictest.js | 55 Reflect.deleteProperty(arr , "b") 67 Reflect.deleteProperty(this, "b") 87 Reflect.deleteProperty(this , "b")
|
| /arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
| D | builtins_reflect_test.cpp | 46 // native function for test Reflect.apply 67 // Reflect.apply (target, thisArgument, argumentsList) 111 // Reflect.construct (target, argumentsList [ , newTarget]) 144 // Reflect.defineProperty (target, propertyKey, attributes) 195 // Reflect.deleteProperty (target, propertyKey) 224 // Reflect.get (target, propertyKey [ , receiver]) 252 // Reflect.getOwnPropertyDescriptor ( target, propertyKey ) 297 // Reflect.getPrototypeOf (target) 322 // Reflect.has (target, propertyKey) 348 // Reflect.isExtensible (target) [all …]
|
| /arkcompiler/ets_runtime/test/aottest/tryldglobalbyname_global_object/ |
| D | expect_output.txt | 164 [object Reflect] 165 Reflect 166 ReferenceError: Reflect is not defined
|
| D | tryldglobalbyname_global_object.ts | 619 print(Reflect); 620 globalThis.Reflect = "Reflect"; 621 print(Reflect); 622 delete globalThis.Reflect; 624 print(Reflect);
|
| /arkcompiler/ets_frontend/es2panda/parser/ |
| D | commonjs.cpp | 103 auto *reflect = AllocNode<ir::Identifier>("Reflect"); in ParseCommonjs() local 104 auto *reflectApply = AllocNode<ir::MemberExpression>(reflect, apply, in ParseCommonjs()
|
| /arkcompiler/ets_runtime/test/moduletest/regresssuper/ |
| D | regresssuper.js | 90 let c1 = Reflect.construct(TestB, [], TestC.prototype.constructor); 91 let c2 = Reflect.construct(TestB, [], c1.constructor);
|
| /arkcompiler/ets_runtime/test/aottest/aot_compatibility_test/property_operation/ |
| D | property_operation.ts | 61 assert_true(!Reflect.has(b3, "x2")); 64 assert_true(Reflect.has(b3, "x2"));
|
| /arkcompiler/runtime_core/tests/cts-generator/cts-template/ |
| D | calle.polymorphic.short.yaml | 30 .record panda.reflect.Field <external> 31 … .function panda.Object panda.reflect.Field.get(panda.reflect.Field a0, panda.Object a1) <external> 32 .function panda.reflect.Field panda.Class.getField(panda.Class a0, panda.String a1) <external> 48 call.virt.acc.short panda.reflect.Field.get, v0, 0
|
| /arkcompiler/ets_runtime/test/aottest/builtin_inlining/reflect/ |
| D | BUILD.gn | 16 test_list = [ "Reflect" ]
|