| /arkcompiler/ets_runtime/ecmascript/interpreter/ |
| D | slow_runtime_stub.cpp | 47 JSTaggedValue SlowRuntimeStub::CallSpread(JSThread *thread, JSTaggedValue func, JSTaggedValue obj, in CallSpread() argument 50 INTERPRETER_TRACE(thread, CallSpread); in CallSpread() 51 [[maybe_unused]] EcmaHandleScope handleScope(thread); in CallSpread() 53 JSHandle<JSTaggedValue> jsFunc(thread, func); in CallSpread() 54 JSHandle<JSTaggedValue> jsArray(thread, array); in CallSpread() 55 JSHandle<JSTaggedValue> taggedObj(thread, obj); in CallSpread() 56 return RuntimeStubs::RuntimeCallSpread(thread, jsFunc, taggedObj, jsArray); in CallSpread() 59 JSTaggedValue SlowRuntimeStub::Neg(JSThread *thread, JSTaggedValue value) in Neg() argument 61 INTERPRETER_TRACE(thread, Neg); in Neg() 62 [[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/builtins/tests/ |
| D | builtins_array_test.cpp | 55 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 65 JSThread *thread {nullptr}; member in panda::test::BuiltinsArrayTest 104 JSThread *thread = argv->GetThread(); in TestFlatMapFunc() local 105 … JSHandle<JSTaggedValue> lengthKeyHandle = thread->GlobalConstants()->GetHandledLengthString(); in TestFlatMapFunc() 107 … JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetTaggedObject()); in TestFlatMapFunc() 109 JSHandle<JSObject> obj(thread, arr); in TestFlatMapFunc() 110 … auto property = JSArray::GetProperty(thread, JSHandle<JSTaggedValue>(obj), lengthKeyHandle); in TestFlatMapFunc() 113 JSHandle<JSTaggedValue> key(thread, JSTaggedValue(0)); in TestFlatMapFunc() 114 … PropertyDescriptor desc(thread, JSHandle<JSTaggedValue>(thread, JSTaggedValue(accumulator)), in TestFlatMapFunc() 116 JSArray::DefineOwnProperty(thread, obj, key, desc); in TestFlatMapFunc() [all …]
|
| D | builtins_atomics_test.cpp | 51 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 61 JSThread *thread {nullptr}; member in panda::test::BuiltinsAtomicsTest 64 JSTypedArray *CreateTypedArray(JSThread *thread, const JSHandle<TaggedArray> &array) in CreateTypedArray() argument 66 auto ecmaVM = thread->GetEcmaVM(); in CreateTypedArray() 69 JSHandle<JSTaggedValue> jsarray(JSArray::CreateArrayFromList(thread, array)); in CreateTypedArray() 71 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in CreateTypedArray() 73 …auto ecmaRuntimeCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*int8_arra… in CreateTypedArray() 78 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo1); in CreateTypedArray() 80 TestHelper::TearDownFrame(thread, prev); in CreateTypedArray() 87 JSTypedArray *CreateTypedArray(JSThread *thread, const JSHandle<TaggedArray> &array, DataViewType t… in CreateTypedArray() argument [all …]
|
| D | builtins_list_format_test.cpp | 50 thread = instance->GetJSThread(); in SetUp() 51 scope = new EcmaHandleScope(thread); in SetUp() 61 JSThread *thread {nullptr}; member in panda::test::BuiltinsListFormatTest 67 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() 68 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0() 72 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*newTarget)… in HWTEST_F_L0() 79 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0() 81 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0() 85 static JSTaggedValue JSListFormatCreateWithOptionTest(JSThread *thread, JSHandle<JSTaggedValue> &lo… in JSListFormatCreateWithOptionTest() argument 88 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in JSListFormatCreateWithOptionTest() [all …]
|
| D | builtins_object_test.cpp | 49 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 59 JSThread *thread {nullptr}; member in panda::test::BuiltinsObjectTest 62 JSTaggedValue CreateBuiltinJSObject(JSThread *thread, const CString keyCStr) in CreateBuiltinJSObject() argument 64 EcmaVM *ecmaVM = thread->GetEcmaVM(); in CreateBuiltinJSObject() 67 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CreateBuiltinJSObject() 71 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in CreateBuiltinJSObject() 72 JSObject::SetProperty(thread, obj, key, value); in CreateBuiltinJSObject() 76 JSFunction *BuiltinsObjectTestCreate(JSThread *thread) in BuiltinsObjectTestCreate() argument 78 EcmaVM *ecmaVM = thread->GetEcmaVM(); in BuiltinsObjectTestCreate() 83 JSObject *TestNewJSObject(JSThread *thread, const JSHandle<JSHClass> &hclass) in TestNewJSObject() argument [all …]
|
| D | builtins_locale_test.cpp | 49 thread = instance->GetJSThread(); in SetUp() 50 scope = new EcmaHandleScope(thread); in SetUp() 60 JSThread *thread {nullptr}; member in panda::test::BuiltinsLocaleTest 66 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() 67 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0() 71 JSHandle<JSTaggedValue> languageKey = thread->GlobalConstants()->GetHandledLanguageString(); in HWTEST_F_L0() 72 JSHandle<JSTaggedValue> regionKey = thread->GlobalConstants()->GetHandledRegionString(); in HWTEST_F_L0() 73 JSHandle<JSTaggedValue> numericKey = thread->GlobalConstants()->GetHandledNumericString(); in HWTEST_F_L0() 74 JSHandle<JSTaggedValue> scriptKey = thread->GlobalConstants()->GetHandledScriptString(); in HWTEST_F_L0() 78 JSHandle<JSTaggedValue> numericValue(thread, JSTaggedValue::True()); in HWTEST_F_L0() [all …]
|
| D | builtins_reflect_test.cpp | 50 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 60 JSThread *thread {nullptr}; member in panda::test::BuiltinsReflectTest 64 static JSHandle<JSFunction> TestObjectCreate(JSThread *thread) in TestObjectCreate() argument 66 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in TestObjectCreate() 73 auto thread = argv->GetThread(); in TestReflectApply() local 74 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in TestReflectApply() 83 JSObject::GetProperty(thread, thisValue, in TestReflectApply() 88 JSObject::GetProperty(thread, thisValue, in TestReflectApply() 100 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0() 102 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() [all …]
|
| D | builtins_dataview_test.cpp | 47 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 57 JSThread *thread {nullptr}; member in panda::test::BuiltinsDataViewTest 60 JSTaggedValue CreateBuiltinsDataviewArrayBuffer(JSThread *thread, int32_t length) in CreateBuiltinsDataviewArrayBuffer() argument 62 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in CreateBuiltinsDataviewArrayBuffer() 63 JSHandle<JSFunction> arrayBuffer(thread, env->GetArrayBufferFunction().GetTaggedValue()); in CreateBuiltinsDataviewArrayBuffer() 64 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in CreateBuiltinsDataviewArrayBuffer() 66 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*arrayBuffe… in CreateBuiltinsDataviewArrayBuffer() 71 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in CreateBuiltinsDataviewArrayBuffer() 73 TestHelper::TearDownFrame(thread, prev); in CreateBuiltinsDataviewArrayBuffer() 77 JSTaggedValue CreateBuiltinsDataView(JSThread *thread, int32_t length, int32_t byte_offset) in CreateBuiltinsDataView() argument [all …]
|
| D | builtins_collator_test.cpp | 51 thread = instance->GetJSThread(); in SetUp() 52 scope = new EcmaHandleScope(thread); in SetUp() 62 JSThread *thread {nullptr}; member in panda::test::BuiltinsCollatorTest 67 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0() 68 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0() 72 JSHandle<JSTaggedValue> usageKey = thread->GlobalConstants()->GetHandledUsageString(); in HWTEST_F_L0() 73 …JSHandle<JSTaggedValue> localeMatcherKey = thread->GlobalConstants()->GetHandledLocaleMatcherStrin… in HWTEST_F_L0() 74 JSHandle<JSTaggedValue> numericKey = thread->GlobalConstants()->GetHandledNumericString(); in HWTEST_F_L0() 75 JSHandle<JSTaggedValue> caseFirstKey = thread->GlobalConstants()->GetHandledCaseFirstString(); in HWTEST_F_L0() 76 … JSHandle<JSTaggedValue> sensitivityKey = thread->GlobalConstants()->GetHandledSensitivityString(); in HWTEST_F_L0() [all …]
|
| D | builtins_regexp_test.cpp | 50 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 60 JSThread *thread {nullptr}; member in panda::test::BuiltinsRegExpTest 63 JSTaggedValue CreateBuiltinsRegExpObjByPatternAndFlags(JSThread *thread, const JSHandle<EcmaString>… in CreateBuiltinsRegExpObjByPatternAndFlags() argument 66 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in CreateBuiltinsRegExpObjByPatternAndFlags() 68 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in CreateBuiltinsRegExpObjByPatternAndFlags() 71 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*regexp), 8… in CreateBuiltinsRegExpObjByPatternAndFlags() 77 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in CreateBuiltinsRegExpObjByPatternAndFlags() 80 TestHelper::TearDownFrame(thread, prev); in CreateBuiltinsRegExpObjByPatternAndFlags() 87 JSHandle<EcmaString> pattern = thread->GetEcmaVM()->GetFactory()->NewFromASCII("\\w+"); in HWTEST_F_L0() 88 JSHandle<EcmaString> flags = thread->GetEcmaVM()->GetFactory()->NewFromASCII("i"); in HWTEST_F_L0() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | tagged_value_test.cpp | 47 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 57 JSThread *thread {nullptr}; member in panda::test::JSTaggedValueTest 149 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, intV)); in HWTEST_F_L0() 153 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, doubleV)); in HWTEST_F_L0() 157 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, undefinedV)); in HWTEST_F_L0() 161 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, holeV)); in HWTEST_F_L0() 165 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, nullV)); in HWTEST_F_L0() 169 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, falseV)); in HWTEST_F_L0() 173 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, trueV)); in HWTEST_F_L0() 194 EXPECT_FALSE(thread->GetEcmaVM()->GetFactory()->GetEmptyString().GetTaggedValue().ToBoolean()); in HWTEST_F_L0() [all …]
|
| D | js_api_lightweightmap_test.cpp | 53 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 63 JSThread *thread {nullptr}; member in panda::test::JSAPILightWeightMapTest 68 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in CreateLightWeightMap() 69 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CreateLightWeightMap() 73 JSHandle<JSTaggedValue> value = JSObject::GetProperty(thread, in CreateLightWeightMap() 76 … auto objCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 6); in CreateLightWeightMap() 81 auto prev = TestHelper::SetupFrame(thread, objCallInfo); in CreateLightWeightMap() 83 JSHandle<JSTaggedValue>(thread, containers::ContainersPrivate::Load(objCallInfo)); in CreateLightWeightMap() 84 TestHelper::TearDownFrame(thread, prev); in CreateLightWeightMap() 90 lightWeightMap->SetHashes(thread, hashArray); in CreateLightWeightMap() [all …]
|
| D | js_object_test.cpp | 53 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp() 63 JSThread *thread {nullptr}; member in panda::test::JSObjectTest 66 static JSFunction *JSObjectTestCreate(JSThread *thread) in JSObjectTestCreate() argument 68 JSHandle<GlobalEnv> globalEnv = thread->GetEcmaVM()->GetGlobalEnv(); in JSObjectTestCreate() 74 JSHandle<JSTaggedValue> objFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 76 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFunc), objFunc… in HWTEST_F_L0() 82 JSHandle<JSTaggedValue> objFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 84 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFunc), objFunc… in HWTEST_F_L0() 88 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII(array)); in HWTEST_F_L0() 89 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/containers/ |
| D | containers_private.cpp | 70 JSThread *thread = msg->GetThread(); in Load() local 71 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Load() 77 … THROW_TYPE_ERROR_AND_RETURN(thread, "Incorrect input parameters", JSTaggedValue::Exception()); in Load() 81 auto globalConst = const_cast<GlobalEnvConstants *>(thread->GlobalConstants()); in Load() 83 …JSHandle<JSObject> undefinedIteratorResult = JSIterator::CreateIterResultObject(thread, undefinedH… in Load() 89 … res = InitializeContainer(thread, thisValue, InitializeArrayList, "ArrayListConstructor"); in Load() 93 res = InitializeContainer(thread, thisValue, InitializeDeque, "DequeConstructor"); in Load() 97 …res = InitializeContainer(thread, thisValue, InitializeLightWeightMap, "LightWeightMapConstructor"… in Load() 101 …res = InitializeContainer(thread, thisValue, InitializeLightWeightSet, "LightWeightSetConstructor"… in Load() 105 … res = InitializeContainer(thread, thisValue, InitializePlainArray, "PlainArrayConstructor"); in Load() [all …]
|
| D | containers_vector.cpp | 32 JSThread *thread = argv->GetThread(); in VectorConstructor() local 33 BUILTINS_API_TRACE(thread, Vector, Constructor); in VectorConstructor() 34 [[maybe_unused]] EcmaHandleScope handleScope(thread); in VectorConstructor() 36 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in VectorConstructor() 39 … THROW_TYPE_ERROR_AND_RETURN(thread, "new target can't be undefined", JSTaggedValue::Exception()); in VectorConstructor() 44 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in VectorConstructor() 46 obj->SetElements(thread, newTaggedArray); in VectorConstructor() 54 JSThread *thread = argv->GetThread(); in Add() local 55 BUILTINS_API_TRACE(thread, Vector, Add); in Add() 56 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Add() [all …]
|
| D | containers_lightweightmap.cpp | 35 JSThread *thread = argv->GetThread(); in LightWeightMapConstructor() local 36 BUILTINS_API_TRACE(thread, LightWeightMap, Constructor); in LightWeightMapConstructor() 37 [[maybe_unused]] EcmaHandleScope handleScope(thread); in LightWeightMapConstructor() 38 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in LightWeightMapConstructor() 42 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in LightWeightMapConstructor() 44 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in LightWeightMapConstructor() 48 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in LightWeightMapConstructor() 53 lwMap->SetHashes(thread, hashArray.GetTaggedValue()); in LightWeightMapConstructor() 54 lwMap->SetKeys(thread, keyArray.GetTaggedValue()); in LightWeightMapConstructor() 55 lwMap->SetValues(thread, valueArray.GetTaggedValue()); in LightWeightMapConstructor() [all …]
|
| D | containers_lightweightset.cpp | 30 JSThread *thread = argv->GetThread(); in LightWeightSetConstructor() local 31 BUILTINS_API_TRACE(thread, LightWeightSet, Constructor); in LightWeightSetConstructor() 32 [[maybe_unused]] EcmaHandleScope handleScope(thread); in LightWeightSetConstructor() 33 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in LightWeightSetConstructor() 37 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in LightWeightSetConstructor() 39 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in LightWeightSetConstructor() 43 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in LightWeightSetConstructor() 47 JSAPILightWeightSet::CreateSlot(thread, JSAPILightWeightSet::DEFAULT_CAPACITY_LENGTH); in LightWeightSetConstructor() 49 JSAPILightWeightSet::CreateSlot(thread, JSAPILightWeightSet::DEFAULT_CAPACITY_LENGTH); in LightWeightSetConstructor() 50 lightweightSet->SetHashes(thread, hashes); in LightWeightSetConstructor() [all …]
|
| D | containers_list.cpp | 32 JSThread *thread = argv->GetThread(); in ListConstructor() local 33 BUILTINS_API_TRACE(thread, List, Constructor); in ListConstructor() 34 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ListConstructor() 35 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in ListConstructor() 39 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in ListConstructor() 41 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ListConstructor() 45 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ListConstructor() 48 JSTaggedValue singleList = TaggedSingleList::Create(thread); in ListConstructor() 49 list->SetSingleList(thread, singleList); in ListConstructor() 57 JSThread *thread = argv->GetThread(); in Add() local [all …]
|
| /arkcompiler/ets_runtime/ecmascript/stubs/ |
| D | runtime_stubs-inl.h | 47 JSTaggedValue RuntimeStubs::RuntimeInc(JSThread *thread, const JSHandle<JSTaggedValue> &value) in RuntimeInc() argument 49 JSHandle<JSTaggedValue> inputVal = JSTaggedValue::ToNumeric(thread, value); in RuntimeInc() 50 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RuntimeInc() 53 return BigInt::BigintAddOne(thread, bigValue).GetTaggedValue(); in RuntimeInc() 59 JSTaggedValue RuntimeStubs::RuntimeDec(JSThread *thread, const JSHandle<JSTaggedValue> &value) in RuntimeDec() argument 61 JSHandle<JSTaggedValue> inputVal = JSTaggedValue::ToNumeric(thread, value); in RuntimeDec() 62 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RuntimeDec() 65 return BigInt::BigintSubOne(thread, bigValue).GetTaggedValue(); in RuntimeDec() 71 JSTaggedValue RuntimeStubs::RuntimeExp(JSThread *thread, JSTaggedValue base, JSTaggedValue exponent) in RuntimeExp() argument 73 JSHandle<JSTaggedValue> baseTag(thread, base); in RuntimeExp() [all …]
|
| /arkcompiler/runtime_core/runtime/ |
| D | exceptions.cpp | 38 void ThrowException(const LanguageContext &ctx, ManagedThread *thread, const uint8_t *mutf8_name, in ThrowException() argument 41 ctx.ThrowException(thread, mutf8_name, mutf8_msg); 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/ |
| D | js_tagged_value.cpp | 45 JSHandle<EcmaString> GetTypeString(JSThread *thread, PreferredPrimitiveType type) in GetTypeString() argument 47 const GlobalEnvConstants *globalConst = thread->GlobalConstants(); in GetTypeString() 57 JSHandle<JSTaggedValue> JSTaggedValue::ToPropertyKey(JSThread *thread, const JSHandle<JSTaggedValue… in ToPropertyKey() argument 62 JSHandle<JSTaggedValue> key(thread, ToPrimitive(thread, tagged, PREFER_STRING)); in ToPropertyKey() 63 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSTaggedValue, thread); in ToPropertyKey() 67 JSHandle<EcmaString> string = ToString(thread, key); in ToPropertyKey() 68 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSTaggedValue, thread); in ToPropertyKey() 129 bool JSTaggedValue::Equal(JSThread *thread, const JSHandle<JSTaggedValue> &x, const JSHandle<JSTagg… in Equal() argument 136 JSTaggedNumber yNumber = ToNumber(thread, y); in Equal() 137 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, false); in Equal() [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 …]
|
| D | js_iterator.cpp | 29 JSTaggedValue JSIterator::IteratorCloseAndReturn(JSThread *thread, const JSHandle<JSTaggedValue> &i… in IteratorCloseAndReturn() argument 31 ASSERT(thread->HasPendingException()); in IteratorCloseAndReturn() 32 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in IteratorCloseAndReturn() 33 JSTaggedValue exception = thread->GetException(); in IteratorCloseAndReturn() 35 JSHandle<JSTaggedValue>(thread, exception))); in IteratorCloseAndReturn() 36 JSHandle<JSTaggedValue> result = JSIterator::IteratorClose(thread, iter, record); in IteratorCloseAndReturn() 43 JSHandle<JSTaggedValue> JSIterator::GetIterator(JSThread *thread, const JSHandle<JSTaggedValue> &ob… in GetIterator() argument 46 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, obj); in GetIterator() 48 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in GetIterator() 50 JSHandle<JSTaggedValue> func = JSObject::GetMethod(thread, obj, iteratorSymbol); in GetIterator() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ic/ |
| D | ic_compare_op.cpp | 29 JSTaggedValue CompareOp::EqualWithIC(JSThread* thread, JSTaggedValue left, in EqualWithIC() argument 32 INTERPRETER_TRACE(thread, EqualWithIC); in EqualWithIC() 50 JSHandle<JSTaggedValue> leftHandle(thread, left); in EqualWithIC() 51 JSHandle<JSTaggedValue> rightHandle(thread, right); in EqualWithIC() 52 rightDouble = JSTaggedValue::ToNumber(thread, rightHandle).GetNumber(); in EqualWithIC() 53 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, JSTaggedValue::False()); in EqualWithIC() 79 JSHandle<JSTaggedValue> leftHandle(thread, left); in EqualWithIC() 80 JSHandle<JSTaggedValue> rightHandle(thread, right); in EqualWithIC() 81 … JSHandle<JSTaggedValue> rightPrimitive(thread, JSTaggedValue::ToPrimitive(thread, rightHandle)); in EqualWithIC() 82 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, JSTaggedValue::False()); in EqualWithIC() [all …]
|