Lines Matching full:thread
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()
82 JSTaggedValue testA = JSObject::GetProperty(thread, thisValue, in TestReflectApply()
84 JSTaggedValue testB = JSObject::GetProperty(thread, thisValue, in TestReflectApply()
94 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0()
96 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
102 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
103 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(thisArgument), in HWTEST_F_L0()
105 JSHandle<JSTaggedValue>(thread, JSTaggedValue(11))); in HWTEST_F_L0()
106 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(thisArgument), in HWTEST_F_L0()
108 JSHandle<JSTaggedValue>(thread, JSTaggedValue(22))); in HWTEST_F_L0()
110 JSHandle<JSObject> argumentsList(JSArray::ArrayCreate(thread, JSTaggedNumber(2))); in HWTEST_F_L0()
111 PropertyDescriptor desc(thread, JSHandle<JSTaggedValue>(thread, JSTaggedValue(33))); in HWTEST_F_L0()
112 …JSArray::DefineOwnProperty(thread, argumentsList, JSHandle<JSTaggedValue>(thread, JSTaggedValue(0)… in HWTEST_F_L0()
114 PropertyDescriptor desc1(thread, JSHandle<JSTaggedValue>(thread, JSTaggedValue(44))); in HWTEST_F_L0()
115 …JSArray::DefineOwnProperty(thread, argumentsList, JSHandle<JSTaggedValue>(thread, JSTaggedValue(1)… in HWTEST_F_L0()
117 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
124 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
128 JSObject::DeleteProperty(thread, (thisArgument), in HWTEST_F_L0()
130 JSObject::DeleteProperty(thread, (thisArgument), in HWTEST_F_L0()
132 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
138 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0()
140 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
145 JSHandle<JSObject> argumentsList(JSArray::ArrayCreate(thread, JSTaggedNumber(1))); in HWTEST_F_L0()
146 PropertyDescriptor desc(thread, in HWTEST_F_L0()
148 …JSArray::DefineOwnProperty(thread, argumentsList, JSHandle<JSTaggedValue>(thread, JSTaggedValue(0)… in HWTEST_F_L0()
150 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
156 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
160 JSHandle<JSTaggedValue> taggedResult(thread, result); in HWTEST_F_L0()
164 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
170 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
174 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
179 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
181 auto globalConst = thread->GlobalConstants(); in HWTEST_F_L0()
183 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(100)); in HWTEST_F_L0()
184 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(attributes), valueKey, value); in HWTEST_F_L0()
187 JSHandle<JSTaggedValue> writable(thread, JSTaggedValue::True()); in HWTEST_F_L0()
188 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(attributes), writableKey, writable); in HWTEST_F_L0()
191 JSHandle<JSTaggedValue> enumerable(thread, JSTaggedValue::False()); in HWTEST_F_L0()
192 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(attributes), enumerableKey, enumerable); in HWTEST_F_L0()
195 JSHandle<JSTaggedValue> configurable(thread, JSTaggedValue::True()); in HWTEST_F_L0()
196 … JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(attributes), configurableKey, configurable); in HWTEST_F_L0()
198 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
205 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
209 PropertyDescriptor descRuler(thread); in HWTEST_F_L0()
210 JSObject::GetOwnProperty(thread, target, key, descRuler); in HWTEST_F_L0()
215 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
221 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
225 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
228 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(101)); in HWTEST_F_L0()
229 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(target), key, value); in HWTEST_F_L0()
231 PropertyDescriptor desc(thread); in HWTEST_F_L0()
232 ASSERT_EQ(JSObject::GetOwnProperty(thread, target, key, desc), true); in HWTEST_F_L0()
234 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
240 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
243 ASSERT_EQ(JSObject::GetOwnProperty(thread, target, key, desc), false); in HWTEST_F_L0()
244 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
250 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
254 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
258 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(101.5)); in HWTEST_F_L0()
259 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(target), key, value); in HWTEST_F_L0()
261 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
267 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
270 JSHandle<JSTaggedValue> resultValue(thread, result); in HWTEST_F_L0()
272 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
278 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
282 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
285 …PropertyDescriptor desc(thread, JSHandle<JSTaggedValue>(thread, JSTaggedValue(102)), true, false, … in HWTEST_F_L0()
286 …ASSERT_EQ(JSTaggedValue::DefinePropertyOrThrow(thread, JSHandle<JSTaggedValue>(target), key, desc)… in HWTEST_F_L0()
288 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
294 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
299 JSHandle<JSTaggedValue> resultObj(thread, result); in HWTEST_F_L0()
301 auto globalConst = thread->GlobalConstants(); in HWTEST_F_L0()
303 …JSHandle<JSTaggedValue> resultValue = JSObject::GetProperty(thread, resultObj, valueKey).GetValue(… in HWTEST_F_L0()
307 …JSHandle<JSTaggedValue> resultWritable = JSObject::GetProperty(thread, resultObj, writableKey).Get… in HWTEST_F_L0()
311 …JSHandle<JSTaggedValue> resultEnumerable = JSObject::GetProperty(thread, resultObj, enumerableKey)… in HWTEST_F_L0()
315 …JSHandle<JSTaggedValue> resultConfigurable = JSObject::GetProperty(thread, resultObj, configurable… in HWTEST_F_L0()
317 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
323 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
326 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
328 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
330 ASSERT_EQ(JSObject::SetPrototype(thread, target, JSHandle<JSTaggedValue>(proto)), true); in HWTEST_F_L0()
332 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
337 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
340 …JSHandle<JSTaggedValue> resultObj(thread, JSTaggedValue(reinterpret_cast<TaggedObject *>(result.Ge… in HWTEST_F_L0()
342 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
348 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
352 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
355 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(103)); in HWTEST_F_L0()
356 ASSERT_EQ(JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(target), key, value), true); in HWTEST_F_L0()
358 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
364 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
368 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
374 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
378 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
381 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
386 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
390 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
396 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
400 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
402 JSHandle<JSTaggedValue> value0(thread, JSTaggedValue(104)); in HWTEST_F_L0()
403 ASSERT_EQ(JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(target), key0, value0), true); in HWTEST_F_L0()
405 JSHandle<JSTaggedValue> value1(thread, JSTaggedValue(105)); in HWTEST_F_L0()
406 ASSERT_EQ(JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(target), key1, value1), true); in HWTEST_F_L0()
408 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
413 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
417 …JSHandle<JSTaggedValue> resultTaggedValue(thread, reinterpret_cast<TaggedObject *>(result.GetRawDa… in HWTEST_F_L0()
420 JSHandle<JSTaggedValue> resultLengthKey = thread->GlobalConstants()->GetHandledLengthString(); in HWTEST_F_L0()
422 … JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(resultArray), resultLengthKey).GetValue(); in HWTEST_F_L0()
425 JSHandle<JSTaggedValue> resultKey0(thread, JSTaggedValue(0)); in HWTEST_F_L0()
427 JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(resultArray), resultKey0).GetValue(); in HWTEST_F_L0()
433 JSHandle<JSTaggedValue> resultKey1(thread, JSTaggedValue(1)); in HWTEST_F_L0()
435 JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(resultArray), resultKey1).GetValue(); in HWTEST_F_L0()
440 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
446 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
450 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
453 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
458 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
463 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
469 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
473 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
477 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(106)); in HWTEST_F_L0()
479 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
486 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
491 …JSHandle<JSTaggedValue> ruler = JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(target), key… in HWTEST_F_L0()
492 ASSERT_EQ(JSTaggedValue::ToInt32(thread, ruler), 106); in HWTEST_F_L0()
493 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
499 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
502 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
504 …tory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCreate(… in HWTEST_F_L0()
506 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
512 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
516 JSHandle<JSTaggedValue> resultObj(thread, target->GetJSHClass()->GetPrototype()); in HWTEST_F_L0()
518 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()