| /arkcompiler/ets_runtime/ecmascript/interpreter/ |
| D | slow_runtime_stub.cpp | 22 JSTaggedValue SlowRuntimeStub::CallSpread(JSThread *thread, JSTaggedValue func, JSTaggedValue obj, in CallSpread() argument 25 INTERPRETER_TRACE(thread, CallSpread); in CallSpread() 26 [[maybe_unused]] EcmaHandleScope handleScope(thread); in CallSpread() 28 JSHandle<JSTaggedValue> jsFunc(thread, func); in CallSpread() 29 JSHandle<JSTaggedValue> jsArray(thread, array); in CallSpread() 30 JSHandle<JSTaggedValue> taggedObj(thread, obj); in CallSpread() 31 return RuntimeStubs::RuntimeCallSpread(thread, jsFunc, taggedObj, jsArray); in CallSpread() 34 JSTaggedValue SlowRuntimeStub::Neg(JSThread *thread, JSTaggedValue value) in Neg() argument 36 INTERPRETER_TRACE(thread, Neg); in Neg() 37 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Neg() [all …]
|
| D | slow_runtime_stub.h | 29 …static JSTaggedValue CallSpread(JSThread *thread, JSTaggedValue func, JSTaggedValue obj, JSTaggedV… 30 static JSTaggedValue Neg(JSThread *thread, JSTaggedValue value); 31 static JSTaggedValue AsyncFunctionEnter(JSThread *thread); 32 static JSTaggedValue ToNumber(JSThread *thread, JSTaggedValue value); 33 static JSTaggedValue ToNumeric(JSThread *thread, JSTaggedValue value); 34 static JSTaggedValue Not(JSThread *thread, JSTaggedValue value); 35 static JSTaggedValue Inc(JSThread *thread, JSTaggedValue value); 36 static JSTaggedValue Dec(JSThread *thread, JSTaggedValue value); 37 static void Throw(JSThread *thread, JSTaggedValue value); 38 static JSTaggedValue GetPropIterator(JSThread *thread, JSTaggedValue value); [all …]
|
| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | tagged_value_test.cpp | 41 JSHandle<JSTaggedValue> stringV(thread->GetEcmaVM()->GetFactory()->NewFromASCII(data)); in NumberFromASCII() 42 return JSTaggedValue::ToNumber(thread, stringV); in NumberFromASCII() 135 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, intV)); in HWTEST_F_L0() 139 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, doubleV)); in HWTEST_F_L0() 143 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, undefinedV)); in HWTEST_F_L0() 147 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, holeV)); in HWTEST_F_L0() 151 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, nullV)); in HWTEST_F_L0() 155 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, falseV)); in HWTEST_F_L0() 159 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, trueV)); in HWTEST_F_L0() 180 EXPECT_FALSE(thread->GetEcmaVM()->GetFactory()->GetEmptyString().GetTaggedValue().ToBoolean()); in HWTEST_F_L0() [all …]
|
| D | js_object_test.cpp | 44 static JSFunction *JSObjectTestCreate(JSThread *thread) in JSObjectTestCreate() argument 46 JSHandle<GlobalEnv> globalEnv = thread->GetEcmaVM()->GetGlobalEnv(); in JSObjectTestCreate() 52 JSHandle<JSTaggedValue> objFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 54 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFunc), objFunc… in HWTEST_F_L0() 60 JSHandle<JSTaggedValue> objFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 62 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFunc), objFunc… in HWTEST_F_L0() 66 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII(array)); in HWTEST_F_L0() 67 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0() 69 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(jsobject), key, value); in HWTEST_F_L0() 70 …EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(jsobject), key).GetValue()->GetInt… in HWTEST_F_L0() [all …]
|
| D | js_api_lightweightmap_test.cpp | 45 return EcmaContainerCommon::CreateLightWeightMap(thread); in CreateLightWeightMap() 51 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined()); in TestCommon() 52 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in TestCommon() 54 JSHandle<JSAPILightWeightMap> lwm(thread, CreateLightWeightMap()); in TestCommon() 60 JSAPILightWeightMap::Set(thread, lwm, key, value); in TestCommon() 61 EXPECT_TRUE(JSAPILightWeightMap::GetIndexOfKey(thread, lwm, key) != -1); in TestCommon() 62 EXPECT_TRUE(JSAPILightWeightMap::GetIndexOfValue(thread, lwm, value) != -1); in TestCommon() 72 JSHandle<JSAPILightWeightMap> lwm(thread, CreateLightWeightMap()); in RemoveCommon() 73 …JSHandle<TaggedArray> valueArray(thread, JSTaggedValue(TaggedArray::Cast(lwm->GetValues().GetTagge… in RemoveCommon() 76 JSHandle<JSTaggedValue> key(thread, JSTaggedValue(i)); in RemoveCommon() [all …]
|
| D | js_shared_array_test.cpp | 34 JSHandle<JSTaggedValue> lengthKeyHandle = thread->GlobalConstants()->GetHandledLengthString(); in HWTEST_F_L0() 35 JSSharedArray *arr = JSSharedArray::Cast(JSSharedArray::ArrayCreate(thread, JSTaggedNumber(0)) in HWTEST_F_L0() 39 JSHandle<JSTaggedValue> obj(thread, arr); in HWTEST_F_L0() 40 …EXPECT_EQ(JSSharedArray::GetProperty(thread, obj, lengthKeyHandle, SCheckMode::SKIP).GetValue()->G… in HWTEST_F_L0() 42 auto ecmaVM = thread->GetEcmaVM(); in HWTEST_F_L0() 47 values->Set(thread, i, JSTaggedValue(i + 1)); in HWTEST_F_L0() 49 JSHandle<TaggedArray> result(JSSharedArray::SetCapacity(thread, values, 10U)); in HWTEST_F_L0() 50 JSHandle<JSSharedArray> sharedArray(JSSharedArray::CreateArrayFromList(thread, result)); in HWTEST_F_L0() 56 …JSSharedArray *sharedArray = JSSharedArray::Cast(JSSharedArray::ArrayCreate(thread, JSTaggedNumber… in HWTEST_F_L0() 60 JSHandle<JSObject> obj(thread, sharedArray); in HWTEST_F_L0() [all …]
|
| D | ecma_container_common.h | 58 static JSObject *JSObjectTestCreate(JSThread *thread) in JSObjectTestCreate() argument 60 [[maybe_unused]] ecmascript::EcmaHandleScope scope(thread); in JSObjectTestCreate() 61 EcmaVM *ecmaVM = thread->GetEcmaVM(); in JSObjectTestCreate() 69 static JSAPIArrayList *CreateArrayList(JSThread *thread) in CreateArrayList() argument 71 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CreateArrayList() 72 … auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::ArrayList); in CreateArrayList() 73 JSHandle<JSTaggedValue> constructor(thread, result); in CreateArrayList() 77 arrayList->SetElements(thread, taggedArray); in CreateArrayList() 81 static JSAPIPlainArray *CreatePlainArray(JSThread *thread) in CreatePlainArray() argument 83 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CreatePlainArray() [all …]
|
| D | js_arguments_test.cpp | 29 static JSFunction *JSObjectTestCreate(JSThread *thread) in JSObjectTestCreate() argument 31 EcmaVM *ecmaVM = thread->GetEcmaVM(); in JSObjectTestCreate() 38 JSHandle<JSTaggedValue> argFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 40 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(argFunc), argFunc… in HWTEST_F_L0() 41 JSHandle<JSArguments> arg = thread->GetEcmaVM()->GetFactory()->NewJSArguments(); in HWTEST_F_L0() 44 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII(array)); in HWTEST_F_L0() 45 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0() 49 EXPECT_TRUE(JSArguments::SetProperty(thread, arg, key, value, receiver)); in HWTEST_F_L0() 50 …EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(jsarg), key).GetValue()->GetInt(),… in HWTEST_F_L0() 51 EXPECT_EQ(JSArguments::GetProperty(thread, jsarg, key).GetValue()->GetInt(), 1); in HWTEST_F_L0() [all …]
|
| D | js_iterator_test.cpp | 39 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() 41 data->Set(thread, 0, JSTaggedValue(1)); in HWTEST_F_L0() 42 data->Set(thread, 1, JSTaggedValue(1)); in HWTEST_F_L0() 43 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0() 44 EXPECT_TRUE(array->IsArray(thread)); in HWTEST_F_L0() 45 JSHandle<JSArrayIterator> iter(JSIterator::GetIterator(thread, array)); in HWTEST_F_L0() 47 EXPECT_TRUE(iter->GetIteratedArray().IsArray(thread)); in HWTEST_F_L0() 52 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() 53 JSHandle<JSTaggedValue> valueStr = thread->GlobalConstants()->GetHandledValueString(); in HWTEST_F_L0() 56 data->Set(thread, 0, JSTaggedValue(1)); in HWTEST_F_L0() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
| D | builtins_shared_typedarray_test.cpp | 62 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0() 64 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() 66 JSHandle<JSTaggedValue> val0(thread, JSTaggedValue(1)); in HWTEST_F_L0() 67 JSHandle<JSTaggedValue> val1(thread, JSTaggedValue(2)); in HWTEST_F_L0() 69 array->Set(thread, 0, val0); in HWTEST_F_L0() 70 array->Set(thread, 1, val1); in HWTEST_F_L0() 72 JSHandle<JSTaggedValue> jsarray(JSArray::CreateArrayFromList(thread, array)); in HWTEST_F_L0() 74 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in HWTEST_F_L0() 75 …auto ecmaRuntimeCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*typed_arr… in HWTEST_F_L0() 79 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo1); in HWTEST_F_L0() [all …]
|
| D | builtins_object_test.cpp | 38 JSTaggedValue CreateBuiltinJSObject(JSThread *thread, const CString keyCStr) in CreateBuiltinJSObject() argument 40 EcmaVM *ecmaVM = thread->GetEcmaVM(); in CreateBuiltinJSObject() 43 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CreateBuiltinJSObject() 47 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in CreateBuiltinJSObject() 48 JSObject::SetProperty(thread, obj, key, value); in CreateBuiltinJSObject() 52 JSFunction *BuiltinsObjectTestCreate(JSThread *thread) in BuiltinsObjectTestCreate() argument 54 EcmaVM *ecmaVM = thread->GetEcmaVM(); in BuiltinsObjectTestCreate() 59 JSObject *TestNewJSObject(JSThread *thread, const JSHandle<JSHClass> &hclass) in TestNewJSObject() argument 61 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in TestNewJSObject() 64 obj->SetElements(thread, factory->EmptyArray().GetTaggedValue(), SKIP_BARRIER); in TestNewJSObject() [all …]
|
| D | builtins_atomics_test.cpp | 41 JSTypedArray *CreateTypedArray(JSThread *thread, const JSHandle<TaggedArray> &array, DataViewType t… in CreateTypedArray() argument 43 auto vm = thread->GetEcmaVM(); in CreateTypedArray() 45 JSHandle<JSTaggedValue> jsarray(JSArray::CreateArrayFromList(thread, array)); in CreateTypedArray() 46 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in CreateTypedArray() 52 …auto ecmaRuntimeCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*arrayFunc… in CreateTypedArray() 57 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo1); in CreateTypedArray() 59 TestHelper::TearDownFrame(thread, prev); in CreateTypedArray() 64 …auto ecmaRuntimeCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*arrayFunc… in CreateTypedArray() 69 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo1); in CreateTypedArray() 71 TestHelper::TearDownFrame(thread, prev); in CreateTypedArray() [all …]
|
| D | builtins_reflect_test.cpp | 40 static JSHandle<JSFunction> TestObjectCreate(JSThread *thread) in TestObjectCreate() argument 42 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in TestObjectCreate() 49 auto thread = argv->GetThread(); in TestReflectApply() local 50 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in TestReflectApply() 58 JSTaggedValue testA = JSObject::GetProperty(thread, thisValue, in TestReflectApply() 60 JSTaggedValue testB = JSObject::GetProperty(thread, thisValue, in TestReflectApply() 70 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0() 72 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() 78 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0() 79 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(thisArgument), in HWTEST_F_L0() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/containers/ |
| D | containers_private.cpp | 59 JSThread *thread = msg->GetThread(); in Load() local 60 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Load() 66 … THROW_TYPE_ERROR_AND_RETURN(thread, "Incorrect input parameters", JSTaggedValue::Exception()); in Load() 70 auto globalConst = const_cast<GlobalEnvConstants *>(thread->GlobalConstants()); in Load() 72 …JSHandle<JSObject> undefinedIteratorResult = JSIterator::CreateIterResultObject(thread, undefinedH… in Load() 78 … res = InitializeContainer(thread, thisValue, InitializeArrayList, "ArrayListConstructor"); in Load() 82 res = InitializeContainer(thread, thisValue, InitializeDeque, "DequeConstructor"); in Load() 86 …res = InitializeContainer(thread, thisValue, InitializeLightWeightMap, "LightWeightMapConstructor"… in Load() 90 …res = InitializeContainer(thread, thisValue, InitializeLightWeightSet, "LightWeightSetConstructor"… in Load() 94 … res = InitializeContainer(thread, thisValue, InitializePlainArray, "PlainArrayConstructor"); in Load() [all …]
|
| D | containers_lightweightmap.cpp | 28 JSThread *thread = argv->GetThread(); in LightWeightMapConstructor() local 29 BUILTINS_API_TRACE(thread, LightWeightMap, Constructor); in LightWeightMapConstructor() 30 [[maybe_unused]] EcmaHandleScope handleScope(thread); in LightWeightMapConstructor() 31 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in LightWeightMapConstructor() 35 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in LightWeightMapConstructor() 37 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in LightWeightMapConstructor() 41 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in LightWeightMapConstructor() 46 lwMap->SetHashes(thread, hashArray.GetTaggedValue()); in LightWeightMapConstructor() 47 lwMap->SetKeys(thread, keyArray.GetTaggedValue()); in LightWeightMapConstructor() 48 lwMap->SetValues(thread, valueArray.GetTaggedValue()); in LightWeightMapConstructor() [all …]
|
| D | containers_vector.cpp | 27 JSThread *thread = argv->GetThread(); in VectorConstructor() local 28 BUILTINS_API_TRACE(thread, Vector, Constructor); in VectorConstructor() 29 [[maybe_unused]] EcmaHandleScope handleScope(thread); in VectorConstructor() 31 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in VectorConstructor() 34 … THROW_TYPE_ERROR_AND_RETURN(thread, "new target can't be undefined", JSTaggedValue::Exception()); in VectorConstructor() 39 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in VectorConstructor() 41 obj->SetElements(thread, newTaggedArray); in VectorConstructor() 49 JSThread *thread = argv->GetThread(); in Add() local 50 BUILTINS_API_TRACE(thread, Vector, Add); in Add() 51 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Add() [all …]
|
| D | containers_linked_list.cpp | 28 JSThread *thread = argv->GetThread(); in LinkedListConstructor() local 29 BUILTINS_API_TRACE(thread, LinkedList, Constructor); in LinkedListConstructor() 30 [[maybe_unused]] EcmaHandleScope handleScope(thread); in LinkedListConstructor() 31 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in LinkedListConstructor() 35 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in LinkedListConstructor() 37 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in LinkedListConstructor() 41 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in LinkedListConstructor() 43 JSTaggedValue doubleList = TaggedDoubleList::Create(thread); in LinkedListConstructor() 44 linkedList->SetDoubleList(thread, doubleList); in LinkedListConstructor() 51 JSThread *thread = argv->GetThread(); in Add() local [all …]
|
| D | containers_hashset.cpp | 28 JSThread *thread = argv->GetThread(); in HashSetConstructor() local 29 BUILTINS_API_TRACE(thread, HashSet, Constructor); in HashSetConstructor() 30 [[maybe_unused]] EcmaHandleScope handleScope(thread); in HashSetConstructor() 31 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HashSetConstructor() 35 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in HashSetConstructor() 37 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in HashSetConstructor() 42 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in HashSetConstructor() 45 JSTaggedValue hashSetArray = TaggedHashArray::Create(thread); in HashSetConstructor() 46 hashSet->SetTable(thread, hashSetArray); in HashSetConstructor() 55 JSThread *thread = argv->GetThread(); in GetIteratorObj() local [all …]
|
| D | containers_lightweightset.cpp | 27 JSThread *thread = argv->GetThread(); in LightWeightSetConstructor() local 28 BUILTINS_API_TRACE(thread, LightWeightSet, Constructor); in LightWeightSetConstructor() 29 [[maybe_unused]] EcmaHandleScope handleScope(thread); in LightWeightSetConstructor() 30 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in LightWeightSetConstructor() 34 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in LightWeightSetConstructor() 36 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in LightWeightSetConstructor() 40 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in LightWeightSetConstructor() 44 JSAPILightWeightSet::CreateSlot(thread, JSAPILightWeightSet::DEFAULT_CAPACITY_LENGTH); in LightWeightSetConstructor() 46 JSAPILightWeightSet::CreateSlot(thread, JSAPILightWeightSet::DEFAULT_CAPACITY_LENGTH); in LightWeightSetConstructor() 47 lightweightSet->SetHashes(thread, hashes); in LightWeightSetConstructor() [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/ |
| D | exceptions.cpp | 38 void ThrowException(const LanguageContext &ctx, ManagedThread *thread, const uint8_t *mutf8Name, in ThrowException() argument 41 ctx.ThrowException(thread, mutf8Name, mutf8Msg); in ThrowException() 44 static LanguageContext GetLanguageContext(ManagedThread *thread) in GetLanguageContext() argument 46 ASSERT(thread != nullptr); in GetLanguageContext() 47 return thread->GetVM()->GetLanguageContext(); in GetLanguageContext() 52 auto *thread = ManagedThread::GetCurrent(); in ThrowNullPointerException() local 53 auto ctx = GetLanguageContext(thread); in ThrowNullPointerException() 54 ThrowNullPointerException(ctx, thread); in ThrowNullPointerException() 57 void ThrowNullPointerException(const LanguageContext &ctx, ManagedThread *thread) in ThrowNullPointerException() argument 59 ThrowException(ctx, thread, ctx.GetNullPointerExceptionClassDescriptor(), nullptr); in ThrowNullPointerException() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/stubs/ |
| D | runtime_stubs-inl.h | 59 JSTaggedValue RuntimeStubs::RuntimeInc(JSThread *thread, const JSHandle<JSTaggedValue> &value) in RuntimeInc() argument 61 JSHandle<JSTaggedValue> inputVal = JSTaggedValue::ToNumeric(thread, value); in RuntimeInc() 62 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RuntimeInc() 65 return BigInt::BigintAddOne(thread, bigValue).GetTaggedValue(); in RuntimeInc() 71 JSTaggedValue RuntimeStubs::RuntimeDec(JSThread *thread, const JSHandle<JSTaggedValue> &value) in RuntimeDec() argument 73 JSHandle<JSTaggedValue> inputVal = JSTaggedValue::ToNumeric(thread, value); in RuntimeDec() 74 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RuntimeDec() 77 return BigInt::BigintSubOne(thread, bigValue).GetTaggedValue(); in RuntimeDec() 83 JSTaggedValue RuntimeStubs::RuntimeExp(JSThread *thread, JSTaggedValue base, JSTaggedValue exponent) in RuntimeExp() argument 85 JSHandle<JSTaggedValue> baseTag(thread, base); in RuntimeExp() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | js_iterator.cpp | 23 JSTaggedValue JSIterator::IteratorCloseAndReturn(JSThread *thread, const JSHandle<JSTaggedValue> &i… in IteratorCloseAndReturn() argument 25 ASSERT(thread->HasPendingException()); in IteratorCloseAndReturn() 26 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in IteratorCloseAndReturn() 27 JSTaggedValue exception = thread->GetException(); in IteratorCloseAndReturn() 29 JSHandle<JSTaggedValue>(thread, exception))); in IteratorCloseAndReturn() 30 JSHandle<JSTaggedValue> result = JSIterator::IteratorClose(thread, iter, record); in IteratorCloseAndReturn() 31 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in IteratorCloseAndReturn() 38 JSHandle<JSTaggedValue> JSIterator::GetIterator(JSThread *thread, const JSHandle<JSTaggedValue> &ob… in GetIterator() argument 41 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, obj); in GetIterator() 43 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in GetIterator() [all …]
|
| D | tagged_tree.cpp | 23 JSHandle<Derived> TaggedTree<Derived>::Create(const JSThread *thread, int numberOfElements) in Create() argument 26 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in Create() 31 tree->SetNumberOfElements(thread, 0); in Create() 32 tree->SetNumberOfDeletedElements(thread, 0); in Create() 33 tree->SetRootEntries(thread, -1); in Create() 34 tree->SetCompare(thread, JSTaggedValue::Hole()); in Create() 35 tree->SetCapacity(thread, capacity); in Create() 40 void TaggedTree<Derived>::InsertRebalance(const JSThread *thread, int index) in InsertRebalance() argument 46 SetColor(thread, GetParent(index), TreeColor::BLACK); in InsertRebalance() 47 SetColor(thread, bro, TreeColor::BLACK); in InsertRebalance() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| D | builtins_object.cpp | 28 JSThread *thread = argv->GetThread(); in ObjectConstructor() local 29 BUILTINS_API_TRACE(thread, Object, Constructor); in ObjectConstructor() 30 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ObjectConstructor() 31 auto ecmaVm = thread->GetEcmaVM(); in ObjectConstructor() 41 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ObjectConstructor() 53 return JSTaggedValue::ToObject(thread, value).GetTaggedValue(); in ObjectConstructor() 56 JSTaggedValue BuiltinsObject::AssignTaggedValue(JSThread *thread, const JSHandle<JSTaggedValue> &so… in AssignTaggedValue() argument 59 JSHandle<JSObject> from = JSTaggedValue::ToObject(thread, source); in AssignTaggedValue() 60 …JSHandle<TaggedArray> keys = JSTaggedValue::GetOwnPropertyKeys(thread, JSHandle<JSTaggedValue>::Ca… in AssignTaggedValue() 61 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in AssignTaggedValue() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/base/tests/ |
| D | json_stringifier_test.cpp | 39 static JSTaggedValue CreateBaseJSObject(JSThread *thread, const CString keyCStr) in CreateBaseJSObject() argument 41 EcmaVM *ecmaVM = thread->GetEcmaVM(); in CreateBaseJSObject() 50 JSHandle<JSTaggedValue> handleValue1(thread, JSTaggedValue(1)); // 1 : test case in CreateBaseJSObject() 51 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(jsObject), handleKey1, handleValue1); in CreateBaseJSObject() 55 JSHandle<JSTaggedValue> handleValue2(thread, JSTaggedValue(3.6)); // 3.6 : test case in CreateBaseJSObject() 56 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(jsObject), handleKey2, handleValue2); in CreateBaseJSObject() 61 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(jsObject), handleKey3, handleValue3); in CreateBaseJSObject() 66 static JSHandle<JSSharedMap> CreateSharedMap(JSThread *thread) in CreateSharedMap() argument 68 auto globalEnv = thread->GetEcmaVM()->GetGlobalEnv(); in CreateSharedMap() 70 auto emptySLayout = thread->GlobalConstants()->GetHandledEmptySLayoutInfo(); in CreateSharedMap() [all …]
|