Home
last modified time | relevance | path

Searched full:thread (Results 1 – 25 of 624) sorted by relevance

12345678910>>...25

/ark/js_runtime/ecmascript/interpreter/
Dslow_runtime_stub.cpp48 JSTaggedValue SlowRuntimeStub::CallSpreadDyn(JSThread *thread, JSTaggedValue func, JSTaggedValue ob… in CallSpreadDyn() argument
51 INTERPRETER_TRACE(thread, CallSpreadDyn); in CallSpreadDyn()
53 THROW_TYPE_ERROR_AND_RETURN(thread, "cannot Callspread", JSTaggedValue::Exception()); in CallSpreadDyn()
55 [[maybe_unused]] EcmaHandleScope handleScope(thread); in CallSpreadDyn()
57 JSHandle<JSFunction> jsFunc(thread, func); in CallSpreadDyn()
58 JSHandle<JSTaggedValue> jsArray(thread, array); in CallSpreadDyn()
59 JSHandle<JSTaggedValue> taggedObj(thread, obj); in CallSpreadDyn()
61 … JSHandle<TaggedArray> coretypesArray(thread, GetCallSpreadArgs(thread, jsArray.GetTaggedValue())); in CallSpreadDyn()
62 InternalCallParams *params = thread->GetInternalCallParams(); in CallSpreadDyn()
64 JSHandle<JSTaggedValue> newTarget(thread, JSTaggedValue::Undefined()); in CallSpreadDyn()
[all …]
Dslow_runtime_stub.h30 …static JSTaggedValue CallSpreadDyn(JSThread *thread, JSTaggedValue func, JSTaggedValue obj, JSTagg…
31 static JSTaggedValue NegDyn(JSThread *thread, JSTaggedValue value);
32 static JSTaggedValue AsyncFunctionEnter(JSThread *thread);
33 static JSTaggedValue ToNumber(JSThread *thread, JSTaggedValue value);
34 static JSTaggedValue NotDyn(JSThread *thread, JSTaggedValue value);
35 static JSTaggedValue IncDyn(JSThread *thread, JSTaggedValue value);
36 static JSTaggedValue DecDyn(JSThread *thread, JSTaggedValue value);
37 static void ThrowDyn(JSThread *thread, JSTaggedValue value);
38 static JSTaggedValue GetPropIterator(JSThread *thread, JSTaggedValue value);
39 static void ThrowConstAssignment(JSThread *thread, JSTaggedValue value);
[all …]
Dfast_runtime_stub-inl.h201 JSTaggedValue FastRuntimeStub::CallGetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue h… in CallGetter() argument
204 INTERPRETER_TRACE(thread, CallGetter); in CallGetter()
206 [[maybe_unused]] EcmaHandleScope handleScope(thread); in CallGetter()
209 JSHandle<JSObject> objHandle(thread, holder); in CallGetter()
210 return accessor->CallInternalGet(thread, objHandle); in CallGetter()
212 JSHandle<JSTaggedValue> objHandle(thread, receiver); in CallGetter()
213 return JSObject::CallGetter(thread, accessor, objHandle); in CallGetter()
216 JSTaggedValue FastRuntimeStub::CallSetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue v… in CallSetter() argument
219 INTERPRETER_TRACE(thread, CallSetter); in CallSetter()
221 [[maybe_unused]] EcmaHandleScope handleScope(thread); in CallSetter()
[all …]
/ark/js_runtime/ecmascript/tests/
Dtagged_value_test.cpp47 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 …]
Djs_object_test.cpp54 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
64 JSThread *thread {nullptr}; member in panda::test::JSObjectTest
67 static JSFunction *JSObjectTestCreate(JSThread *thread) in JSObjectTestCreate() argument
69 JSHandle<GlobalEnv> globalEnv = thread->GetEcmaVM()->GetGlobalEnv(); in JSObjectTestCreate()
75 JSHandle<JSTaggedValue> objFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0()
77thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFunc), objFunc… in HWTEST_F_L0()
83 JSHandle<JSTaggedValue> objFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0()
85thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFunc), objFunc… in HWTEST_F_L0()
89 … JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString(array)); in HWTEST_F_L0()
90 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0()
[all …]
Djs_proxy_test.cpp47 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
57 JSThread *thread {nullptr}; member in panda::test::JSProxyTest
60 static JSFunction *JSObjectTestCreate(JSThread *thread) in JSObjectTestCreate() argument
62 EcmaVM *ecmaVM = thread->GetEcmaVM(); in JSObjectTestCreate()
69 JSHandle<JSTaggedValue> dynclass(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0()
71thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(dynclass), … in HWTEST_F_L0()
73 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString("x")); in HWTEST_F_L0()
74 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0()
75 JSObject::SetProperty(thread, targetHandle, key, value); in HWTEST_F_L0()
76 EXPECT_EQ(JSObject::GetProperty(thread, targetHandle, key).GetValue()->GetInt(), 1); in HWTEST_F_L0()
[all …]
Decma_module_test.cpp39 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
48 JSThread *thread {nullptr}; member in panda::test::EcmaModuleTest
51 EcmaModule *EcmaModuleCreate(JSThread *thread) in EcmaModuleCreate() argument
53 ObjectFactory *objectFactory = thread->GetEcmaVM()->GetFactory(); in EcmaModuleCreate()
71 JSHandle<EcmaModule> handleEcmaModule(thread, EcmaModuleCreate(thread)); in HWTEST_F_L0()
72 JSHandle<NameDictionary> handleNameDict(NameDictionary::Create(thread, numOfElementsDict)); in HWTEST_F_L0()
74 thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString(cStrItemName)); in HWTEST_F_L0()
75 JSHandle<JSTaggedValue> handleTagValItemValue(thread, JSTaggedValue(intItemValue)); in HWTEST_F_L0()
77 …handleEcmaModule->SetNameDictionary(thread, handleNameDict); // Call SetNameDictionary in HWTEST_F… in HWTEST_F_L0()
78 EcmaModule::AddItem(thread, handleEcmaModule, handleTagValItemName, handleTagValItemValue); in HWTEST_F_L0()
[all …]
Djs_arguments_test.cpp40 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
49 JSThread *thread {nullptr}; member in panda::test::JsArgumentsTest
52 static JSFunction *JSObjectTestCreate(JSThread *thread) in JSObjectTestCreate() argument
54 EcmaVM *ecmaVM = thread->GetEcmaVM(); in JSObjectTestCreate()
61 JSHandle<JSTaggedValue> argFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0()
63thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(argFunc), argFunc… in HWTEST_F_L0()
64 JSHandle<JSArguments> arg = thread->GetEcmaVM()->GetFactory()->NewJSArguments(); in HWTEST_F_L0()
67 … JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString(array)); in HWTEST_F_L0()
68 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0()
72 EXPECT_TRUE(JSArguments::SetProperty(thread, arg, key, value, receiver)); in HWTEST_F_L0()
[all …]
Djs_array_test.cpp46 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
55 JSThread *thread {nullptr}; member in panda::test::JSArrayTest
60 JSHandle<JSTaggedValue> lengthKeyHandle(thread->GlobalConstants()->GetHandledLengthString()); in HWTEST_F_L0()
61 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
63 JSHandle<JSTaggedValue> obj(thread, arr); in HWTEST_F_L0()
64 EXPECT_EQ(JSArray::GetProperty(thread, obj, lengthKeyHandle).GetValue()->GetInt(), 0); in HWTEST_F_L0()
66 JSArray *arr2 = JSArray::ArrayCreate(thread, JSTaggedNumber(10)).GetObject<JSArray>(); in HWTEST_F_L0()
68 JSHandle<JSTaggedValue> obj2(thread, arr2); in HWTEST_F_L0()
69 EXPECT_EQ(JSArray::GetProperty(thread, obj2, lengthKeyHandle).GetValue()->GetInt(), 10); in HWTEST_F_L0()
74 JSHandle<JSTaggedValue> lengthKeyHandle(thread->GlobalConstants()->GetHandledLengthString()); in HWTEST_F_L0()
[all …]
/ark/js_runtime/ecmascript/builtins/tests/
Dbuiltins_array_test.cpp56 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
66 JSThread *thread {nullptr}; member in panda::test::BuiltinsArrayTest
151 JSTaggedValue CreateBuiltinsJSObject(JSThread *thread, const CString keyCStr) in CreateBuiltinsJSObject() argument
153 EcmaVM *ecmaVM = thread->GetEcmaVM(); in CreateBuiltinsJSObject()
157 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CreateBuiltinsJSObject()
161 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in CreateBuiltinsJSObject()
162 JSObject::SetProperty(thread, obj, key, value); in CreateBuiltinsJSObject()
168 auto ecmaVM = thread->GetEcmaVM(); in HWTEST_F_L0()
171 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in HWTEST_F_L0()
173 …auto ecmaRuntimeCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined… in HWTEST_F_L0()
[all …]
Dbuiltins_object_test.cpp50 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
60 JSThread *thread {nullptr}; member in panda::test::BuiltinsObjectTest
63 JSTaggedValue CreateBuiltinJSObject(JSThread *thread, const CString keyCStr) in CreateBuiltinJSObject() argument
65 EcmaVM *ecmaVM = thread->GetEcmaVM(); in CreateBuiltinJSObject()
68 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CreateBuiltinJSObject()
72 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in CreateBuiltinJSObject()
73 JSObject::SetProperty(thread, obj, key, value); in CreateBuiltinJSObject()
77 JSFunction *BuiltinsObjectTestCreate(JSThread *thread) in BuiltinsObjectTestCreate() argument
79 EcmaVM *ecmaVM = thread->GetEcmaVM(); in BuiltinsObjectTestCreate()
84 JSObject *TestNewJSObject(JSThread *thread, const JSHandle<JSHClass> &dynClass) in TestNewJSObject() argument
[all …]
Dbuiltins_regexp_test.cpp52 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
62 JSThread *thread {nullptr}; member in panda::test::BuiltinsRegExpTest
65 JSTaggedValue CreateRegExpObjByPatternAndFlags(JSThread *thread, const JSHandle<EcmaString> &patter… in CreateRegExpObjByPatternAndFlags() argument
68 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in CreateRegExpObjByPatternAndFlags()
70 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in CreateRegExpObjByPatternAndFlags()
73 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*regexp), 8… in CreateRegExpObjByPatternAndFlags()
79 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo.get()); in CreateRegExpObjByPatternAndFlags()
88 …JSHandle<EcmaString> pattern = thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString("\\w+… in HWTEST_F_L0()
89 JSHandle<EcmaString> flags = thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString("i"); in HWTEST_F_L0()
90 JSTaggedValue result = CreateRegExpObjByPatternAndFlags(thread, pattern, flags); in HWTEST_F_L0()
[all …]
Dbuiltins_reflect_test.cpp50 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 …]
/ark/js_runtime/ecmascript/containers/
Dcontainers_private.cpp36 JSThread *thread = msg->GetThread(); in Load() local
37 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Load()
43 … THROW_TYPE_ERROR_AND_RETURN(thread, "Incorrect input parameters", JSTaggedValue::Exception()); in Load()
49 … res = InitializeContainer(thread, thisValue, InitializeArrayList, "ArrayListConstructor"); in Load()
53 res = InitializeContainer(thread, thisValue, InitializeTreeMap, "TreeMapConstructor"); in Load()
57 res = InitializeContainer(thread, thisValue, InitializeTreeSet, "TreeSetConstructor"); in Load()
80 JSTaggedValue ContainersPrivate::InitializeContainer(JSThread *thread, const JSHandle<JSObject> &ob… in InitializeContainer() argument
83 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in InitializeContainer()
86 … FastRuntimeStub::GetPropertyByName<true>(thread, obj.GetTaggedValue(), key.GetTaggedValue()); in InitializeContainer()
90 JSHandle<JSTaggedValue> map = func(thread); in InitializeContainer()
[all …]
Dcontainers_arraylist.cpp34 JSThread *thread = argv->GetThread(); in ArrayListConstructor() local
35 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ArrayListConstructor()
36 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in ArrayListConstructor()
39 … THROW_TYPE_ERROR_AND_RETURN(thread, "new target can't be undefined", JSTaggedValue::Exception()); in ArrayListConstructor()
44 obj->SetElements(thread, newTaggedArray); in ArrayListConstructor()
45 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ArrayListConstructor()
54 JSThread *thread = argv->GetThread(); in Add() local
55 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Add()
59 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIArrayList", JSTaggedValue::Exception()); in Add()
63 … return GetTaggedBoolean(JSAPIArrayList::Add(thread, JSHandle<JSAPIArrayList>::Cast(self), value)); in Add()
[all …]
/ark/runtime_core/runtime/
Dexceptions.cpp37 void ThrowException(LanguageContext ctx, ManagedThread *thread, const uint8_t *mutf8_name, const ui… in ThrowException() argument
39 ctx.ThrowException(thread, mutf8_name, mutf8_msg); in ThrowException()
42 static LanguageContext GetLanguageContext(ManagedThread *thread) in GetLanguageContext() argument
44 ASSERT(thread != nullptr); in GetLanguageContext()
46 StackWalker stack(thread); in GetLanguageContext()
57 auto *thread = ManagedThread::GetCurrent(); in ThrowNullPointerException() local
58 auto ctx = GetLanguageContext(thread); in ThrowNullPointerException()
59 ThrowNullPointerException(ctx, thread); in ThrowNullPointerException()
62 void ThrowNullPointerException(LanguageContext ctx, ManagedThread *thread) in ThrowNullPointerException() argument
64 ThrowException(ctx, thread, ctx.GetNullPointerExceptionClassDescriptor(), nullptr); in ThrowNullPointerException()
[all …]
/ark/js_runtime/ecmascript/
Djs_tagged_value.cpp34 JSHandle<EcmaString> GetTypeString(JSThread *thread, PreferredPrimitiveType type) in GetTypeString() argument
36 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in GetTypeString()
46 JSHandle<JSTaggedValue> JSTaggedValue::ToPropertyKey(JSThread *thread, const JSHandle<JSTaggedValue… in ToPropertyKey() argument
51 JSHandle<JSTaggedValue> key(thread, ToPrimitive(thread, tagged, PREFER_STRING)); in ToPropertyKey()
52 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSTaggedValue, thread); in ToPropertyKey()
56 JSHandle<EcmaString> string = ToString(thread, key); in ToPropertyKey()
57 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSTaggedValue, thread); in ToPropertyKey()
112 bool JSTaggedValue::Equal(JSThread *thread, const JSHandle<JSTaggedValue> &x, const JSHandle<JSTagg… in Equal() argument
119 JSTaggedNumber yNumber = ToNumber(thread, y); in Equal()
120 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, false); in Equal()
[all …]
Dtagged_tree.cpp23 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 …]
Djs_proxy.cpp26 JSHandle<JSProxy> JSProxy::ProxyCreate(JSThread *thread, const JSHandle<JSTaggedValue> &target, in ProxyCreate() argument
31 THROW_TYPE_ERROR_AND_RETURN(thread, "ProxyCreate: target is not Object", in ProxyCreate()
32 JSHandle<JSProxy>(thread, JSTaggedValue::Exception())); in ProxyCreate()
37 THROW_TYPE_ERROR_AND_RETURN(thread, "ProxyCreate: handler is not Object", in ProxyCreate()
38 JSHandle<JSProxy>(thread, JSTaggedValue::Exception())); in ProxyCreate()
45 return thread->GetEcmaVM()->GetFactory()->NewJSProxy(target, handler); in ProxyCreate()
49 JSTaggedValue JSProxy::GetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy) in GetPrototype() argument
52 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in GetPrototype()
55 …THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetPrototype: handler is null", JSTaggedValue::Excep… in GetPrototype()
60 JSHandle<JSTaggedValue> targetHandle(thread, proxy->GetTarget()); in GetPrototype()
[all …]
Djs_iterator.cpp27 JSTaggedValue JSIterator::IteratorCloseAndReturn(JSThread *thread, const JSHandle<JSTaggedValue> &i… in IteratorCloseAndReturn() argument
30 ASSERT(thread->HasPendingException()); in IteratorCloseAndReturn()
31 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in IteratorCloseAndReturn()
32 JSTaggedValue exception = thread->GetException(); in IteratorCloseAndReturn()
34 JSHandle<JSTaggedValue>(thread, exception))); in IteratorCloseAndReturn()
35 JSHandle<JSTaggedValue> result = JSIterator::IteratorClose(thread, iter, record); in IteratorCloseAndReturn()
42 JSHandle<JSTaggedValue> JSIterator::GetIterator(JSThread *thread, const JSHandle<JSTaggedValue> &ob… in GetIterator() argument
45 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, obj); in GetIterator()
47 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in GetIterator()
49 JSHandle<JSTaggedValue> func = JSObject::GetMethod(thread, obj, iteratorSymbol); in GetIterator()
[all …]
Djs_api_arraylist.cpp25 bool JSAPIArrayList::Add(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in Add() argument
29 JSHandle<TaggedArray> elements = GrowCapacity(thread, arrayList, length + 1); in Add()
32 elements->Set(thread, length, value); in Add()
33 arrayList->SetLength(thread, JSTaggedValue(++length)); in Add()
37 void JSAPIArrayList::Insert(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in Insert() argument
42 THROW_RANGE_ERROR(thread, "ArrayList: set out-of-bounds"); in Insert()
44 JSHandle<TaggedArray> elements = GrowCapacity(thread, arrayList, length + 1); in Insert()
48 elements->Set(thread, i, elements->Get(i - 1)); in Insert()
50 elements->Set(thread, index, value); in Insert()
51 arrayList->SetLength(thread, JSTaggedValue(++length)); in Insert()
[all …]
/ark/js_runtime/ecmascript/ic/
Dic_compare_op.cpp30 JSTaggedValue CompareOp::EqualWithIC(JSThread* thread, JSTaggedValue left, in EqualWithIC() argument
33 INTERPRETER_TRACE(thread, EqualWithIC); in EqualWithIC()
51 JSHandle<JSTaggedValue> leftHandle(thread, left); in EqualWithIC()
52 JSHandle<JSTaggedValue> rightHandle(thread, right); in EqualWithIC()
53 rightDouble = JSTaggedValue::ToNumber(thread, rightHandle).GetNumber(); in EqualWithIC()
54 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, JSTaggedValue::False()); in EqualWithIC()
80 JSHandle<JSTaggedValue> leftHandle(thread, left); in EqualWithIC()
81 JSHandle<JSTaggedValue> rightHandle(thread, right); in EqualWithIC()
82 … JSHandle<JSTaggedValue> rightPrimitive(thread, JSTaggedValue::ToPrimitive(thread, rightHandle)); in EqualWithIC()
83 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, JSTaggedValue::False()); in EqualWithIC()
[all …]
/ark/js_runtime/ecmascript/ic/tests/
Dic_compareop_test.cpp16 #include <thread>
48 TestHelper::CreateEcmaVMWithScope(instance, thread, scope); in SetUp()
60 JSThread *thread {nullptr}; member in panda::test::IcCompareOPTest
72 JSHandle<JSTaggedValue> arg1Handle(thread, arg1); in HWTEST_F_L0()
73 JSHandle<JSTaggedValue> arg2Handle(thread, arg2); in HWTEST_F_L0()
74 JSHandle<JSTaggedValue> arg3Handle(thread, arg3); in HWTEST_F_L0()
75 JSHandle<JSTaggedValue> arg4Handle(thread, arg4); in HWTEST_F_L0()
77 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0()
78 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in HWTEST_F_L0()
81 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*boolean), … in HWTEST_F_L0()
[all …]
/ark/js_runtime/ecmascript/builtins/
Dbuiltins_array.cpp48 JSThread *thread = argv->GetThread(); in ArrayConstructor() local
49 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ArrayConstructor()
50 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in ArrayConstructor()
69 …return JSTaggedValue(JSArray::ArrayCreate(thread, JSTaggedNumber(0), newTarget).GetObject<JSArray>… in ArrayConstructor()
76 …JSHandle<JSObject> newArrayHandle(JSArray::ArrayCreate(thread, JSTaggedNumber(newLen), newTarget)); in ArrayConstructor()
89 JSObject::CreateDataProperty(thread, newArrayHandle, key0, len); in ArrayConstructor()
92 newLen = JSTaggedValue::ToUint32(thread, len); in ArrayConstructor()
93 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ArrayConstructor()
95 … THROW_RANGE_ERROR_AND_RETURN(thread, "The length is out of range.", JSTaggedValue::Exception()); in ArrayConstructor()
98 JSArray::Cast(*newArrayHandle)->SetArrayLength(thread, newLen); in ArrayConstructor()
[all …]
Dbuiltins_promise.cpp42 JSThread *thread = argv->GetThread(); in PromiseConstructor() local
43 [[maybe_unused]] EcmaHandleScope handleScope(thread); in PromiseConstructor()
44 EcmaVM *ecmaVm = thread->GetEcmaVM(); in PromiseConstructor()
46 const GlobalEnvConstants *globalConst = thread->GlobalConstants(); in PromiseConstructor()
50 …THROW_TYPE_ERROR_AND_RETURN(thread, "PromiseConstructor: NewTarget is undefined", JSTaggedValue::E… in PromiseConstructor()
55 …THROW_TYPE_ERROR_AND_RETURN(thread, "PromiseConstructor: executor is not callable", JSTaggedValue:… in PromiseConstructor()
64 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in PromiseConstructor()
70 …gFunctionsRecord> resolvingFunction = JSPromise::CreateResolvingFunctions(thread, instancePromise); in PromiseConstructor()
74 InternalCallParams *arguments = thread->GetInternalCallParams(); in PromiseConstructor()
77 …JSTaggedValue taggedValue = JSFunction::Call(thread, executor, thisValue, 2, arguments->GetArgv())… in PromiseConstructor()
[all …]

12345678910>>...25