/arkcompiler/ets_frontend/es2panda/test/compiler/js/language/arguments-object/ |
H A D | test-key-named-called-func-bound-value.js | 16 var obj = { 99 print(obj[2e3]()); // call key 2e3 100 print(obj[2000]()); // call key 2e3 101 print(obj[1000]()); 103 print(obj[NaN]()); 104 print(obj[0]()); // 0.0 == 0 105 print(obj[Infinity]()); 107 print(obj[1e-6]()); 108 print(obj[0.000001]()); 109 print(obj[0.00000 [all...] |
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/passing_optional_type/ |
H A D | passing_optional_type.js | 18 function fnWithAnyParamsObject(obj) { 19 return obj.surname ? `${obj.name}; ${obj.surname}` : obj.name; 24 function fnWithLiteralObjectParam(obj) { 25 return obj.surname ? `${obj.name}; ${obj.surname}` : obj [all...] |
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/ |
H A D | std_core_Value.cpp | 36 void ValueAPISetFieldObject(EtsObject *obj, EtsLong i, EtsObject *val) in ValueAPISetFieldObject() argument 40 VMHandle<EtsObject> objHandle(coroutine, obj->GetCoreType()); in ValueAPISetFieldObject() 49 void SetFieldValue(EtsObject *obj, EtsLong i, T val) in SetFieldValue() argument 53 VMHandle<EtsObject> objHandle(coroutine, obj->GetCoreType()); in SetFieldValue() 64 void ValueAPISetFieldBoolean(EtsObject *obj, EtsLong i, EtsBoolean val) in ValueAPISetFieldBoolean() argument 66 SetFieldValue(obj, i, val); in ValueAPISetFieldBoolean() 69 void ValueAPISetFieldByte(EtsObject *obj, EtsLong i, EtsByte val) in ValueAPISetFieldByte() argument 71 SetFieldValue(obj, i, val); in ValueAPISetFieldByte() 74 void ValueAPISetFieldShort(EtsObject *obj, EtsLong i, EtsShort val) in ValueAPISetFieldShort() argument 76 SetFieldValue(obj, in ValueAPISetFieldShort() 79 ValueAPISetFieldChar(EtsObject *obj, EtsLong i, EtsChar val) ValueAPISetFieldChar() argument 84 ValueAPISetFieldInt(EtsObject *obj, EtsLong i, EtsInt val) ValueAPISetFieldInt() argument 89 ValueAPISetFieldLong(EtsObject *obj, EtsLong i, EtsLong val) ValueAPISetFieldLong() argument 94 ValueAPISetFieldFloat(EtsObject *obj, EtsLong i, EtsFloat val) ValueAPISetFieldFloat() argument 99 ValueAPISetFieldDouble(EtsObject *obj, EtsLong i, EtsDouble val) ValueAPISetFieldDouble() argument 104 ValueAPISetFieldByNameObject(EtsObject *obj, EtsString *name, EtsObject *val) ValueAPISetFieldByNameObject() argument 118 SetFieldByNameValue(EtsObject *obj, EtsString *name, T val) SetFieldByNameValue() argument 134 ValueAPISetFieldByNameBoolean(EtsObject *obj, EtsString *name, EtsBoolean val) ValueAPISetFieldByNameBoolean() argument 139 ValueAPISetFieldByNameByte(EtsObject *obj, EtsString *name, EtsByte val) ValueAPISetFieldByNameByte() argument 144 ValueAPISetFieldByNameShort(EtsObject *obj, EtsString *name, EtsShort val) ValueAPISetFieldByNameShort() argument 149 ValueAPISetFieldByNameChar(EtsObject *obj, EtsString *name, EtsChar val) ValueAPISetFieldByNameChar() argument 154 ValueAPISetFieldByNameInt(EtsObject *obj, EtsString *name, EtsInt val) ValueAPISetFieldByNameInt() argument 159 ValueAPISetFieldByNameLong(EtsObject *obj, EtsString *name, EtsLong val) ValueAPISetFieldByNameLong() argument 164 ValueAPISetFieldByNameFloat(EtsObject *obj, EtsString *name, EtsFloat val) ValueAPISetFieldByNameFloat() argument 169 ValueAPISetFieldByNameDouble(EtsObject *obj, EtsString *name, EtsDouble val) ValueAPISetFieldByNameDouble() argument 174 ValueAPIGetFieldObject(EtsObject *obj, EtsLong i) ValueAPIGetFieldObject() argument 186 GetFieldValue(EtsObject *obj, EtsLong i) GetFieldValue() argument 200 ValueAPIGetFieldBoolean(EtsObject *obj, EtsLong i) ValueAPIGetFieldBoolean() argument 205 ValueAPIGetFieldByte(EtsObject *obj, EtsLong i) ValueAPIGetFieldByte() argument 210 ValueAPIGetFieldShort(EtsObject *obj, EtsLong i) ValueAPIGetFieldShort() argument 215 ValueAPIGetFieldChar(EtsObject *obj, EtsLong i) ValueAPIGetFieldChar() argument 220 ValueAPIGetFieldInt(EtsObject *obj, EtsLong i) ValueAPIGetFieldInt() argument 225 ValueAPIGetFieldLong(EtsObject *obj, EtsLong i) ValueAPIGetFieldLong() argument 230 ValueAPIGetFieldFloat(EtsObject *obj, EtsLong i) ValueAPIGetFieldFloat() argument 235 ValueAPIGetFieldDouble(EtsObject *obj, EtsLong i) ValueAPIGetFieldDouble() argument 240 ValueAPIGetFieldByNameObject(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameObject() argument 252 GetFieldByNameValue(EtsObject *obj, EtsString *name) GetFieldByNameValue() argument 266 ValueAPIGetFieldByNameBoolean(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameBoolean() argument 271 ValueAPIGetFieldByNameByte(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameByte() argument 276 ValueAPIGetFieldByNameShort(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameShort() argument 281 ValueAPIGetFieldByNameChar(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameChar() argument 286 ValueAPIGetFieldByNameInt(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameInt() argument 291 ValueAPIGetFieldByNameLong(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameLong() argument 296 ValueAPIGetFieldByNameFloat(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameFloat() argument 301 ValueAPIGetFieldByNameDouble(EtsObject *obj, EtsString *name) ValueAPIGetFieldByNameDouble() argument 306 ValueAPIGetArrayLength(EtsObject *obj) ValueAPIGetArrayLength() argument 314 ValueAPISetElementObject(EtsObject *obj, EtsLong i, EtsObject *val) ValueAPISetElementObject() argument 325 SetElement(EtsObject *obj, EtsLong i, T val) SetElement() argument 339 ValueAPISetElementBoolean(EtsObject *obj, EtsLong i, EtsBoolean val) ValueAPISetElementBoolean() argument 344 ValueAPISetElementByte(EtsObject *obj, EtsLong i, EtsByte val) ValueAPISetElementByte() argument 349 ValueAPISetElementShort(EtsObject *obj, EtsLong i, EtsShort val) ValueAPISetElementShort() argument 354 ValueAPISetElementChar(EtsObject *obj, EtsLong i, EtsChar val) ValueAPISetElementChar() argument 359 ValueAPISetElementInt(EtsObject *obj, EtsLong i, EtsInt val) ValueAPISetElementInt() argument 364 ValueAPISetElementLong(EtsObject *obj, EtsLong i, EtsLong val) ValueAPISetElementLong() argument 369 ValueAPISetElementFloat(EtsObject *obj, EtsLong i, EtsFloat val) ValueAPISetElementFloat() argument 374 ValueAPISetElementDouble(EtsObject *obj, EtsLong i, EtsDouble val) ValueAPISetElementDouble() argument 379 ValueAPIGetElementObject(EtsObject *obj, EtsLong i) ValueAPIGetElementObject() argument 389 GetElement(EtsObject *obj, EtsLong i) GetElement() argument 403 ValueAPIGetElementBoolean(EtsObject *obj, EtsLong i) ValueAPIGetElementBoolean() argument 408 ValueAPIGetElementByte(EtsObject *obj, EtsLong i) ValueAPIGetElementByte() argument 413 ValueAPIGetElementShort(EtsObject *obj, EtsLong i) ValueAPIGetElementShort() argument 418 ValueAPIGetElementChar(EtsObject *obj, EtsLong i) ValueAPIGetElementChar() argument 423 ValueAPIGetElementInt(EtsObject *obj, EtsLong i) ValueAPIGetElementInt() argument 428 ValueAPIGetElementLong(EtsObject *obj, EtsLong i) ValueAPIGetElementLong() argument 433 ValueAPIGetElementFloat(EtsObject *obj, EtsLong i) ValueAPIGetElementFloat() argument 438 ValueAPIGetElementDouble(EtsObject *obj, EtsLong i) ValueAPIGetElementDouble() argument [all...] |
/arkcompiler/runtime_core/static_core/libpandabase/tests/ |
H A D | json_parser_test.cpp | 31 JsonObject obj(str); 32 ASSERT_TRUE(obj.IsValid()); 34 ASSERT_NE(obj.GetValue<JsonObject::StringT>("key_0"), nullptr); 35 ASSERT_EQ(*obj.GetValue<JsonObject::StringT>("key_0"), "key_0.value"); 37 ASSERT_NE(obj.GetValue<JsonObject::StringT>("key_1"), nullptr); 38 ASSERT_EQ(*obj.GetValue<JsonObject::StringT>("key_1"), "\"key_1\"\\. value\n"); 56 JsonObject obj(str); in TEST() 57 ASSERT_TRUE(obj.IsValid()); in TEST() 59 ASSERT_NE(obj.GetValue<JsonObject::ArrayT>("key_0"), nullptr); in TEST() 60 auto &mainArray = *obj in TEST() [all...] |
/arkcompiler/runtime_core/static_core/plugins/ets/tests/mock/ |
H A D | calling_methods_test_6.cpp | 40 ets_object obj = env_->AllocObject(dCls); in TEST_F() local 41 ASSERT_NE(obj, nullptr); in TEST_F() 48 env_->CallNonvirtualVoidMethod(obj, cCls, voidId, static_cast<ets_int>(1), static_cast<ets_int>(121_I)); in TEST_F() 51 EXPECT_EQ(env_->GetIntField(obj, dMemberId), static_cast<ets_int>(0)); in TEST_F() 55 ets_object aObj = env_->CallNonvirtualObjectMethod(obj, cCls, objectId); in TEST_F() 58 EXPECT_EQ(env_->GetIntField(obj, dMemberId), static_cast<ets_int>(0)); in TEST_F() 65 env_->CallNonvirtualVoidMethodArray(obj, cCls, voidId, voidArgs.data()); in TEST_F() 66 EXPECT_EQ(env_->GetIntField(obj, dMemberId), static_cast<ets_int>(0)); in TEST_F() 68 ets_object aObjFromArrayFunc = env_->CallNonvirtualObjectMethodArray(obj, cCls, objectId, nullptr); in TEST_F() 71 EXPECT_EQ(env_->GetIntField(obj, dMemberI in TEST_F() 88 ets_object obj = env_->AllocObject(dCls); TEST_F() local 140 ets_object obj = env_->AllocObject(dCls); TEST_F() local 197 ets_object obj = env_->AllocObject(dCls); TEST_F() local 244 ets_object obj = env_->AllocObject(dCls); TEST_F() local [all...] |
H A D | calling_methods_test_1.cpp | 81 ets_object obj = env_->AllocObject(cls); in TEST_F() local 82 ASSERT_NE(obj, nullptr); in TEST_F() 85 EXPECT_DEATH(env_->CallVoidMethod(obj, nullptr), ""); in TEST_F() 86 EXPECT_DEATH(env_->CallObjectMethod(obj, nullptr), ""); in TEST_F() 87 EXPECT_DEATH(env_->CallBooleanMethod(obj, nullptr), ""); in TEST_F() 88 EXPECT_DEATH(env_->CallByteMethod(obj, nullptr), ""); in TEST_F() 89 EXPECT_DEATH(env_->CallCharMethod(obj, nullptr), ""); in TEST_F() 90 EXPECT_DEATH(env_->CallShortMethod(obj, nullptr), ""); in TEST_F() 91 EXPECT_DEATH(env_->CallIntMethod(obj, nullptr), ""); in TEST_F() 92 EXPECT_DEATH(env_->CallLongMethod(obj, nullpt in TEST_F() [all...] |
H A D | calling_methods_test_helper.h | 33 [[maybe_unused]] static void CallVoidMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) in CallVoidMethodListHelper() argument 37 env->CallVoidMethodList(obj, methodId, args); in CallVoidMethodListHelper() 40 [[maybe_unused]] static ets_object CallObjectMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) in CallObjectMethodListHelper() argument 44 return env->CallObjectMethodList(obj, methodId, args); in CallObjectMethodListHelper() 47 [[maybe_unused]] static ets_boolean CallBooleanMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) in CallBooleanMethodListHelper() argument 51 return env->CallBooleanMethodList(obj, methodId, args); in CallBooleanMethodListHelper() 54 [[maybe_unused]] static ets_byte CallByteMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) in CallByteMethodListHelper() argument 58 return env->CallByteMethodList(obj, methodId, args); in CallByteMethodListHelper() 61 [[maybe_unused]] static ets_char CallCharMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) in CallCharMethodListHelper() argument 65 return env->CallCharMethodList(obj, methodI in CallCharMethodListHelper() 68 CallShortMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) CallShortMethodListHelper() argument 75 CallIntMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) CallIntMethodListHelper() argument 82 CallLongMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) CallLongMethodListHelper() argument 89 CallFloatMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) CallFloatMethodListHelper() argument 96 CallDoubleMethodListHelper(EtsEnv *env, ets_object obj, ets_method methodId, ...) CallDoubleMethodListHelper() argument 103 CallNonvirtualVoidMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualVoidMethodListHelper() argument 111 CallNonvirtualObjectMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualObjectMethodListHelper() argument 119 CallNonvirtualBooleanMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualBooleanMethodListHelper() argument 127 CallNonvirtualByteMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualByteMethodListHelper() argument 135 CallNonvirtualCharMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualCharMethodListHelper() argument 143 CallNonvirtualShortMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualShortMethodListHelper() argument 151 CallNonvirtualIntMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualIntMethodListHelper() argument 159 CallNonvirtualLongMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualLongMethodListHelper() argument 167 CallNonvirtualFloatMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualFloatMethodListHelper() argument 175 CallNonvirtualDoubleMethodListHelper(EtsEnv *env, ets_object obj, ets_class cls, ets_method methodId, ...) CallNonvirtualDoubleMethodListHelper() argument [all...] |
H A D | calling_methods_test_2.cpp | 39 ets_object obj = env_->AllocObject(cls); in TEST_F() local 40 ASSERT_NE(obj, nullptr); in TEST_F() 89 ets_object obj = env_->AllocObject(cls); in TEST_F() local 90 ASSERT_NE(obj, nullptr); in TEST_F() 114 env_->CallVoidMethod(obj, voidId, static_cast<ets_int>(42_I), static_cast<ets_int>(121_I)); in TEST_F() 118 ets_object aObj = env_->CallObjectMethod(obj, objectId); in TEST_F() 122 EXPECT_EQ(env_->CallBooleanMethod(obj, booleanId, static_cast<ets_boolean>(1), static_cast<ets_int>(121_I)), in TEST_F() 124 EXPECT_EQ(env_->CallByteMethod(obj, byteId, static_cast<ets_byte>(1), static_cast<ets_int>(121_I)), in TEST_F() 126 EXPECT_EQ(env_->CallCharMethod(obj, charId, static_cast<ets_char>(1), static_cast<ets_int>(121_I)), in TEST_F() 128 EXPECT_EQ(env_->CallShortMethod(obj, shortI in TEST_F() 143 ets_object obj = env_->AllocObject(cls); TEST_F() local 187 ets_object obj = env_->AllocObject(cls); TEST_F() local 231 ets_object obj = env_->AllocObject(cls); TEST_F() local 333 ets_object obj = env_->AllocObject(dCls); TEST_F() local [all...] |
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/optional_reference_type/ |
H A D | index.js | 48 function fnWithSubsetPick(obj) { 49 return obj.address ? obj.address.city : 'Address not found'; 54 function fnWithSubsetOmit(obj) { 55 return obj.address ? obj.address.city : 'Address not found'; 60 function fnWithSubsetPartial(obj) { 61 return obj.address ? obj.address.city : 'Address not found'; 66 function fnWithUnionParam(obj) { [all...] |
/arkcompiler/ets_runtime/ecmascript/builtins/ |
H A D | builtins_lazy_callback.h | 55 static JSTaggedValue Date(JSThread *thread, const JSHandle<JSObject> &obj); 56 static JSTaggedValue Set(JSThread *thread, const JSHandle<JSObject> &obj); 57 static JSTaggedValue Map(JSThread *thread, const JSHandle<JSObject> &obj); 58 static JSTaggedValue WeakMap(JSThread *thread, const JSHandle<JSObject> &obj); 59 static JSTaggedValue WeakSet(JSThread *thread, const JSHandle<JSObject> &obj); 60 static JSTaggedValue WeakRef(JSThread *thread, const JSHandle<JSObject> &obj); 61 static JSTaggedValue FinalizationRegistry(JSThread *thread, const JSHandle<JSObject> &obj); 62 static JSTaggedValue TypedArray(JSThread *thread, const JSHandle<JSObject> &obj); 63 static JSTaggedValue Int8Array(JSThread *thread, const JSHandle<JSObject> &obj); 64 static JSTaggedValue Uint8Array(JSThread *thread, const JSHandle<JSObject> &obj); [all...] |
/arkcompiler/ets_runtime/ecmascript/ |
H A D | js_tagged_value.cpp | 71 TaggedObject *obj = GetTaggedObject(); in ToBoolean() local 73 auto str = static_cast<EcmaString *>(obj); in ToBoolean() 946 OperationResult JSTaggedValue::GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, in GetProperty() argument 949 if (obj->IsUndefined() || obj->IsNull() || obj->IsHole()) { in GetProperty() 951 std::string objStr = EcmaStringAccessor(ToString(thread, obj)).ToStdString(); in GetProperty() 959 if (obj->IsJSProxy()) { in GetProperty() 960 return JSProxy::GetProperty(thread, JSHandle<JSProxy>(obj), key); in GetProperty() 962 if (obj in GetProperty() 976 GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t key) GetProperty() argument 1003 GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &receiver) GetProperty() argument 1031 SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value, bool mayThrow, SCheckMode checkMode) SetProperty() argument 1061 SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t key, const JSHandle<JSTaggedValue> &value, bool mayThrow) SetProperty() argument 1091 SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedValue> &receiver, bool mayThrow) SetProperty() argument 1121 DeleteProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) DeleteProperty() argument 1144 DeletePropertyOrThrow(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) DeletePropertyOrThrow() argument 1165 DefinePropertyOrThrow(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const PropertyDescriptor &desc) DefinePropertyOrThrow() argument 1182 DefineOwnProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const PropertyDescriptor &desc, SCheckMode sCheckMode) DefineOwnProperty() argument 1213 GetOwnProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc) GetOwnProperty() argument 1231 SetPrototype(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &proto, bool isChangeProto) SetPrototype() argument 1259 GetPrototype(JSThread *thread, const JSHandle<JSTaggedValue> &obj) GetPrototype() argument 1270 PreventExtensions(JSThread *thread, const JSHandle<JSTaggedValue> &obj) PreventExtensions() argument 1281 GetOwnPropertyKeys(JSThread *thread, const JSHandle<JSTaggedValue> &obj) GetOwnPropertyKeys() argument 1298 GetAllPropertyKeys(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t filter) GetAllPropertyKeys() argument 1319 GetOwnEnumPropertyKeys(JSThread *thread, const JSHandle<JSTaggedValue> &obj) GetOwnEnumPropertyKeys() argument 1335 HasProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) HasProperty() argument 1353 HasProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t key) HasProperty() argument 1370 HasOwnProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) HasOwnProperty() argument 1449 ToPrototypeOrObj(JSThread *thread, const JSHandle<JSTaggedValue> &obj) ToPrototypeOrObj() argument 1476 GetSuperBase(JSThread *thread, const JSHandle<JSTaggedValue> &obj) GetSuperBase() argument 1486 HasContainerProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) HasContainerProperty() argument 1537 GetOwnContainerPropertyKeys(JSThread *thread, const JSHandle<JSTaggedValue> &obj) GetOwnContainerPropertyKeys() argument 1585 GetOwnContainerEnumPropertyKeys(JSThread *thread, const JSHandle<JSTaggedValue> &obj) GetOwnContainerEnumPropertyKeys() argument 1623 GetContainerProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc) GetContainerProperty() argument 1712 GetJSAPIProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) GetJSAPIProperty() argument 1756 SetJSAPIProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value) SetJSAPIProperty() argument [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/builtins/ |
H A D | containers_stub_builder.h | 79 GateRef IsContainer(GateRef obj, ContainersType type)
in IsContainer() argument 84 return IsJSAPIVector(obj);
in IsContainer() 86 return IsJSAPIStack(obj);
in IsContainer() 88 return IsJSAPIPlainArray(obj);
in IsContainer() 90 return IsJSAPIQueue(obj);
in IsContainer() 92 return IsJSAPIDeque(obj);
in IsContainer() 94 return IsJSAPILightWeightMap(obj);
in IsContainer() 96 return IsJSAPILightWeightSet(obj);
in IsContainer() 98 return IsJSAPIHashMap(obj);
in IsContainer() 100 return IsJSAPIHashSet(obj);
in IsContainer() 175 ContainerSet(GateRef glue, GateRef obj, GateRef index, GateRef value, ContainersType type) ContainerSet() argument 194 ContainerGetSize(GateRef obj, ContainersType type) ContainerGetSize() argument 254 ContainerGetValue(GateRef obj, GateRef index, ContainersType type) ContainerGetValue() argument 298 ContainerGetKey(GateRef obj, GateRef index, ContainersType type) ContainerGetKey() argument 316 ContainerGetNode(GateRef obj, GateRef index, ContainersType type) ContainerGetNode() argument 342 PlainArrayGetKey(GateRef obj, GateRef index) PlainArrayGetKey() argument 348 QueueGetNextPosition(GateRef obj, GateRef index) QueueGetNextPosition() argument 354 QueueGetCurrentFront(GateRef obj) QueueGetCurrentFront() argument [all...] |
H A D | containers_deque_stub_builder.h | 31 GateRef GetSize(GateRef obj)
in GetSize() argument 34 GateRef elements = Load(VariableType::JS_POINTER(), obj, elementsOffset);
in GetSize() 36 GateRef first = GetFirst(obj);
in GetSize() 37 GateRef last = GetLast(obj);
in GetSize() 41 GateRef Get(GateRef obj, GateRef index)
in Get() argument 44 GateRef elements = Load(VariableType::JS_POINTER(), obj, elementsOffset);
in Get() 46 GateRef first = GetFirst(obj);
in Get() 51 GateRef GetFirst(GateRef obj)
in GetFirst() argument 53 return Load(VariableType::INT32(), obj, IntPtr(JSAPIDeque::FIRST_OFFSET));
in GetFirst() 56 GateRef GetLast(GateRef obj)
in GetLast() argument 61 GetElementsLength(GateRef obj) GetElementsLength() argument [all...] |
/arkcompiler/ets_runtime/test/moduletest/typedarrayat/ |
H A D | typedarrayat.js | 49 let obj = new ctor(5); 50 obj[0] = 10; 51 obj[1] = 11; 52 obj[2] = 12; 53 obj[3] = 13; 54 obj[4] = 14; 55 result.push(obj.at(-1) == 14); 56 result.push(obj.at(1.5) == 11); 57 result.push(obj.at(-3) == 12); 58 result.push(obj [all...] |
/arkcompiler/runtime_core/static_core/runtime/include/ |
H A D | object_accessor-inl.h | 30 inline ObjectHeader *ObjectAccessor::GetObject(const void *obj, size_t offset) in GetObject() argument 34 return reinterpret_cast<ObjectHeader *>(Get<ObjectPointerType, IS_VOLATILE>(obj, offset)); in GetObject() 36 return Get<ObjectHeader *, IS_VOLATILE>(obj, offset); in GetObject() 41 inline void ObjectAccessor::SetObject(void *obj, size_t offset, ObjectHeader *value) in SetObject() argument 47 ObjectHeader *preVal = GetObject<IS_VOLATILE, false, IS_DYN>(obj, offset); in SetObject() 52 Set<ObjectPointerType, IS_VOLATILE>(obj, offset, ToObjPtrType(value)); in SetObject() 54 Set<ObjectHeader *, IS_VOLATILE>(obj, offset, value); in SetObject() 58 barrierSet->PostBarrier(ToVoidPtr(ToUintPtr(obj)), offset, value); in SetObject() 62 Set<ObjectPointerType, IS_VOLATILE>(obj, offset, ToObjPtrType(value)); in SetObject() 64 Set<ObjectHeader *, IS_VOLATILE>(obj, offse in SetObject() 71 GetObject([[maybe_unused]] const ManagedThread *thread, const void *obj, size_t offset) GetObject() argument 83 SetObject(const ManagedThread *thread, void *obj, size_t offset, ObjectHeader *value) SetObject() argument 111 GetFieldPrimitive(const void *obj, const Field &field) GetFieldPrimitive() argument 121 SetFieldPrimitive(void *obj, const Field &field, T value) SetFieldPrimitive() argument 133 GetFieldObject(const void *obj, const Field &field) GetFieldObject() argument 144 SetFieldObject(void *obj, const Field &field, ObjectHeader *value) SetFieldObject() argument 157 GetFieldObject(const ManagedThread *thread, const void *obj, const Field &field) GetFieldObject() argument 168 SetFieldObject(const ManagedThread *thread, void *obj, const Field &field, ObjectHeader *value) SetFieldObject() argument 180 GetFieldPrimitive(const void *obj, size_t offset, std::memory_order memoryOrder) GetFieldPrimitive() argument 187 SetFieldPrimitive(void *obj, size_t offset, T value, std::memory_order memoryOrder) SetFieldPrimitive() argument 195 GetFieldObject(const void *obj, int offset, std::memory_order memoryOrder) GetFieldObject() argument 216 SetFieldObject(void *obj, size_t offset, ObjectHeader *value, std::memory_order memoryOrder) SetFieldObject() argument 249 CompareAndSetFieldPrimitive(void *obj, size_t offset, T oldValue, T newValue, std::memory_order memoryOrder, bool strong) CompareAndSetFieldPrimitive() argument 264 CompareAndSetFieldObject(void *obj, size_t offset, ObjectHeader *oldValue, ObjectHeader *newValue, std::memory_order memoryOrder, bool strong) CompareAndSetFieldObject() argument 306 GetAndSetFieldPrimitive(void *obj, size_t offset, T value, std::memory_order memoryOrder) GetAndSetFieldPrimitive() argument 317 GetAndSetFieldObject(void *obj, size_t offset, ObjectHeader *value, std::memory_order memoryOrder) GetAndSetFieldObject() argument 343 GetAndAddFieldPrimitive([[maybe_unused]] void *obj, [[maybe_unused]] size_t offset, [[maybe_unused]] T value, [[maybe_unused]] std::memory_order memoryOrder) GetAndAddFieldPrimitive() argument 375 GetAndBitwiseOrFieldPrimitive([[maybe_unused]] void *obj, [[maybe_unused]] size_t offset, [[maybe_unused]] T value, [[maybe_unused]] std::memory_order memoryOrder) GetAndBitwiseOrFieldPrimitive() argument 393 GetAndBitwiseAndFieldPrimitive([[maybe_unused]] void *obj, [[maybe_unused]] size_t offset, [[maybe_unused]] T value, [[maybe_unused]] std::memory_order memoryOrder) GetAndBitwiseAndFieldPrimitive() argument 411 GetAndBitwiseXorFieldPrimitive([[maybe_unused]] void *obj, [[maybe_unused]] size_t offset, [[maybe_unused]] T value, [[maybe_unused]] std::memory_order memoryOrder) GetAndBitwiseXorFieldPrimitive() argument 428 SetDynValueWithoutBarrier(void *obj, size_t offset, coretypes::TaggedType value) SetDynValueWithoutBarrier() argument 437 SetDynValue(const ManagedThread *thread, void *obj, size_t offset, coretypes::TaggedType value) SetDynValue() argument 458 SetDynPrimitive(const ManagedThread *thread, void *obj, size_t offset, T value) SetDynPrimitive() argument 471 SetClass(ObjectHeader *obj, BaseClass *newClass) SetClass() argument [all...] |
H A D | object_accessor.h | 33 static T GetPrimitive(const void *obj, size_t offset) in GetPrimitive() argument 35 return Get<T, IS_VOLATILE>(obj, offset); in GetPrimitive() 39 static void SetPrimitive(void *obj, size_t offset, T value) in SetPrimitive() argument 41 Set<T, IS_VOLATILE>(obj, offset, value); in SetPrimitive() 45 static ObjectHeader *GetObject(const void *obj, size_t offset); 48 static void SetObject(void *obj, size_t offset, ObjectHeader *value); 51 static T GetFieldPrimitive(const void *obj, const Field &field); 54 static void SetFieldPrimitive(void *obj, const Field &field, T value); 57 static ObjectHeader *GetFieldObject(const void *obj, const Field &field); 60 static void SetFieldObject(void *obj, cons 123 GetDynValue(const void *obj, size_t offset) GetDynValue() argument 179 Get(const void *obj, size_t offset) Get() argument 192 Set(void *obj, size_t offset, T value) Set() argument 205 Get(const void *obj, size_t offset, std::memory_order memoryOrder) Get() argument 214 Set(void *obj, size_t offset, T value, std::memory_order memoryOrder) Set() argument 222 EncodeObjectPointerType(ObjectHeader *obj) EncodeObjectPointerType() argument 227 EncodeTaggedType(ObjectHeader *obj) EncodeTaggedType() argument [all...] |
/arkcompiler/runtime_core/static_core/verification/util/ |
H A D | synchronized.h | 35 obj = other.obj; in ConstProxy() 36 other.obj = nullptr; in ConstProxy() 38 const Synchronized *obj; // NOLINT(misc-non-private-member-variables-in-classes) member 39 explicit ConstProxy(const Synchronized *paramObj) ACQUIRE_SHARED(obj->rwLock_) : obj {paramObj} 41 obj->rwLock_.ReadLock(); 45 ASSERT(obj != nullptr); in operator ->() 46 return &obj->c_; in operator ->() 48 ~ConstProxy() RELEASE_SHARED(obj in operator ->() 66 Synchronized *obj; // NOLINT(misc-non-private-member-variables-in-classes) global() member [all...] |
/arkcompiler/runtime_core/libpandabase/tests/ |
H A D | json_parser_test.cpp | 32 JsonObject obj(str); 33 ASSERT_TRUE(obj.IsValid()); 35 ASSERT_NE(obj.GetValue<JsonObject::StringT>("key_0"), nullptr); 36 ASSERT_EQ(*obj.GetValue<JsonObject::StringT>("key_0"), "key_0.value"); 38 ASSERT_NE(obj.GetValue<JsonObject::StringT>("key_1"), nullptr); 39 ASSERT_EQ(*obj.GetValue<JsonObject::StringT>("key_1"), "\"key_1\"\\. value\n"); 41 ASSERT_EQ(obj.GetValue<JsonObject::StringT>("key_2"), nullptr); 58 JsonObject obj(str); in HWTEST() 59 ASSERT_TRUE(obj.IsValid()); in HWTEST() 61 ASSERT_NE(obj in HWTEST() [all...] |
/arkcompiler/ets_frontend/ets2panda/test/unit/dynamic/ |
H A D | dynamic_call_test.cpp | 46 ir::Expression *MarkChainDynamic(ir::Expression *obj) in MarkChainDynamic() argument 48 if (obj == nullptr) { in MarkChainDynamic() 53 std::make_tuple(obj, checker::ETSObjectFlags::NO_OPTS, nullptr), false); in MarkChainDynamic() 54 if (obj->IsETSTypeReference()) { in MarkChainDynamic() 55 obj = obj->AsETSTypeReference()->Part()->Name(); in MarkChainDynamic() 57 while (obj != nullptr && (obj->IsMemberExpression() || obj->IsTSQualifiedName())) { in MarkChainDynamic() 58 obj in MarkChainDynamic() 72 ir::Expression *obj = nullptr; ParseDynExpr() local [all...] |
/arkcompiler/ets_runtime/test/moduletest/builtins/ |
H A D | builtinsir.js | 61 var obj = { 66 print(obj.number(1)); 67 print(obj.number(1, 2)); 68 print(obj.number(1, 2, 3)); 69 print(obj.number(1, 2, 3, 4)); 70 print(obj.number([1])); 71 print(obj.number([1, 2])); 72 obj.date(0); 73 obj.date(0, 1); 74 obj [all...] |
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/napi/ |
H A D | ets_napi.h | 192 ets_int (*ThrowError)(EtsEnv *env, ets_error obj); 200 ets_object (*NewGlobalRef)(EtsEnv *env, ets_object obj); 210 ets_class (*GetObjectClass)(EtsEnv *env, ets_object obj); 211 ets_boolean (*IsInstanceOf)(EtsEnv *env, ets_object obj, ets_class cls); 213 ets_object (*CallObjectMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); 214 ets_object (*CallObjectMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); 215 ets_object (*CallObjectMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); 216 ets_boolean (*CallBooleanMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); 217 ets_boolean (*CallBooleanMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); 218 ets_boolean (*CallBooleanMethodArray)(EtsEnv *env, ets_object obj, ets_metho [all...] |
H A D | ets_scoped_objects_fix.h | 63 EtsObject *ToInternalType(ets_object obj) in ToInternalType() argument 65 RETURN_NULL_IF_NULL(obj); in ToInternalType() 66 return GetInternalType(env_, obj); in ToInternalType() 94 T *Convert(ets_object obj) in Convert() argument 96 return Convert<T>(env_, obj); in Convert() 100 static T *Convert(PandaEtsNapiEnv *env, ets_object obj) in Convert() argument 102 return reinterpret_cast<T *>(GetInternalType(env, obj)); in Convert() 115 ets_object AddGlobalRef(EtsObject *obj) in AddGlobalRef() argument 117 EtsReference *ref = GetEtsReferenceStorage()->NewEtsRef(obj, EtsReference::EtsObjectType::GLOBAL); in AddGlobalRef() 121 ets_object AddLocalRef(EtsObject *obj) in AddLocalRef() argument 126 AddLocalRef(PandaEtsNapiEnv *env, EtsObject *obj) AddLocalRef() argument 133 AddWeakGlobalRef(EtsObject *obj) AddWeakGlobalRef() argument 138 AddWeakGlobalRef(PandaEtsNapiEnv *env, EtsObject *obj) AddWeakGlobalRef() argument 147 DelLocalRef(ets_object obj) DelLocalRef() argument 152 DelLocalRef(PandaEtsNapiEnv *env, ets_object obj) DelLocalRef() argument 166 IsValidRef(ets_object obj) IsValidRef() argument 201 GetInternalType(PandaEtsNapiEnv *env, ets_object obj) GetInternalType() argument [all...] |
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/objects_passing/ |
H A D | objects_passing.js | 98 function getName(obj) { 99 return obj.name; 102 function getDetails(obj) { 103 return obj.getDetails(); 106 function changeName(obj, name) { 107 obj.name = name; 108 return obj.name; 111 function getEdu(obj) { 112 return obj.education; 115 function getId(obj) { [all...] |
/arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/ |
H A D | vn.cpp | 37 static bool AddClassInst(Inst *inst, VnObject *obj) in AddClassInst() argument 44 obj->Add(static_cast<VnObject::ObjType>(Opcode::InitClass)); in AddClassInst() 48 obj->Add(classInst->GetTypeId()); in AddClassInst() 50 obj->Add(reinterpret_cast<VnObject::DoubleObjType>(klass)); in AddClassInst() 52 inst->SetVnObject(obj); in AddClassInst() 56 static bool AddGlobalVarInst(Inst *inst, VnObject *obj) in AddGlobalVarInst() argument 62 obj->Add(static_cast<VnObject::ObjType>(Opcode::GetGlobalVarAddress)); in AddGlobalVarInst() 63 obj->Add(inst->CastToGetGlobalVarAddress()->GetTypeId()); in AddGlobalVarInst() 64 inst->SetVnObject(obj); in AddGlobalVarInst() 68 static bool AddSelectImmInst(Inst *inst, VnObject *obj) in AddSelectImmInst() argument 88 AddCommutativeInst(Inst *inst, VnObject *obj) AddCommutativeInst() argument 112 AddSpecialTraits(Inst *inst, VnObject *obj) AddSpecialTraits() argument 146 AddResolver(Inst *inst, VnObject *obj) AddResolver() argument 324 auto obj = GetGraph()->GetLocalAllocator()->New<VnObject>(); FindEqualVnOrCreateNew() local [all...] |
/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
H A D | builtins_shared_array_test.cpp | 95 JSHandle<JSObject> obj(thread, arr); in TestFlatMapFunc() 96 auto property = JSSharedArray::GetProperty(thread, JSHandle<JSTaggedValue>(obj), lengthKeyHandle, in TestFlatMapFunc() 103 JSSharedArray::DefineOwnProperty(thread, obj, key, desc, SCheckMode::SKIP); in TestFlatMapFunc() 104 return obj.GetTaggedValue(); in TestFlatMapFunc() 224 std::vector<JSHandle<JSTaggedValue>> SharedArrayDefineOwnPropertyTest(JSThread* thread, JSHandle<JSObject>& obj, in SharedArrayDefineOwnPropertyTest() argument 231 JSArray::DefineOwnProperty(thread, obj, keys[i], desc0); in SharedArrayDefineOwnPropertyTest() 236 std::vector<JSHandle<JSTaggedValue>> SharedArrayDefineOwnPropertyTest(JSThread* thread, JSHandle<JSTaggedValue>& obj, in SharedArrayDefineOwnPropertyTest() argument 239 JSHandle<JSObject> jsObj(obj); in SharedArrayDefineOwnPropertyTest() 264 JSHandle<JSObject> obj(thread, arr); in HWTEST_F_L0() 265 EXPECT_EQ(JSSharedArray::GetProperty(thread, JSHandle<JSTaggedValue>(obj), lengthKeyHandl in HWTEST_F_L0() [all...] |