Lines Matching full:thread
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()
71 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
72 JSHandle<JSFunction> objectFunc(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
73 JSHandle<GlobalEnv> globalEnv = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0()
76 auto objCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 4); in HWTEST_F_L0()
80 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, objCallInfo); in HWTEST_F_L0()
82 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
85 …JSHandle<JSObject> jtHandle(thread, JSTaggedValue(reinterpret_cast<TaggedObject *>(result.GetRawDa… in HWTEST_F_L0()
86 …JSTaggedValue resultProto = JSTaggedValue::GetPrototype(thread, JSHandle<JSTaggedValue>(jtHandle)); in HWTEST_F_L0()
93 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(function), … in HWTEST_F_L0()
95 auto tgObjCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*object), 4); in HWTEST_F_L0()
100 prev = TestHelper::SetupFrame(thread, tgObjCallInfo); in HWTEST_F_L0()
102 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
104 …JSHandle<JSObject> jtHandleTg(thread, JSTaggedValue(reinterpret_cast<TaggedObject *>(resultTg.GetR… in HWTEST_F_L0()
105 …JSTaggedValue resultProtoTg = JSTaggedValue::GetPrototype(thread, JSHandle<JSTaggedValue>(jtHandle… in HWTEST_F_L0()
112 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(function), … in HWTEST_F_L0()
114 auto vnObjCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*objectVn), 6); in HWTEST_F_L0()
120 prev = TestHelper::SetupFrame(thread, vnObjCallInfo); in HWTEST_F_L0()
122 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
125 …JSHandle<JSObject> jtHandleVn(thread, JSTaggedValue(reinterpret_cast<TaggedObject *>(resultVn.GetR… in HWTEST_F_L0()
126 …JSTaggedValue resultProtoVn = JSTaggedValue::GetPrototype(thread, JSHandle<JSTaggedValue>(jtHandle… in HWTEST_F_L0()
135 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
137 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
139 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
141 JSHandle<JSTaggedValue> key1(thread->GetEcmaVM()->GetFactory()->NewFromASCII("x")); in HWTEST_F_L0()
142 JSHandle<JSTaggedValue> value1(thread, JSTaggedValue(1)); in HWTEST_F_L0()
143 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(objHandle1), key1, value1); in HWTEST_F_L0()
144 …EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(objHandle1), key1).GetValue()->Get… in HWTEST_F_L0()
146 JSHandle<JSTaggedValue> key2(thread->GetEcmaVM()->GetFactory()->NewFromASCII("y")); in HWTEST_F_L0()
147 JSHandle<JSTaggedValue> value2(thread, JSTaggedValue(2)); in HWTEST_F_L0()
148 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(objHandle2), key2, value2); in HWTEST_F_L0()
149 …EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(objHandle2), key2).GetValue()->Get… in HWTEST_F_L0()
151 …auto assignObjCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(),… in HWTEST_F_L0()
157 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, assignObjCallInfo); in HWTEST_F_L0()
159 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
162 …JSHandle<JSTaggedValue> jtHandle(thread, JSTaggedValue(reinterpret_cast<TaggedObject *>(result.Get… in HWTEST_F_L0()
163 EXPECT_EQ(JSObject::GetProperty(thread, jtHandle, key1).GetValue()->GetInt(), 1); in HWTEST_F_L0()
164 EXPECT_EQ(JSObject::GetProperty(thread, jtHandle, key2).GetValue()->GetInt(), 2); in HWTEST_F_L0()
170 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
171 JSHandle<JSFunction> objectFunc(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
172 JSHandle<JSTaggedValue> funcProto(thread, objectFunc->GetFunctionPrototype()); in HWTEST_F_L0()
175 auto objCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 6); in HWTEST_F_L0()
180 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, objCallInfo); in HWTEST_F_L0()
182 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
185 JSHandle<JSTaggedValue> jtHandle(thread, result); in HWTEST_F_L0()
186 JSTaggedValue resultProto = JSTaggedValue::GetPrototype(thread, jtHandle); in HWTEST_F_L0()
190 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("prop")); in HWTEST_F_L0()
192 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(function), … in HWTEST_F_L0()
195 PropertyDescriptor desc(thread); in HWTEST_F_L0()
197 JSHandle<JSObject> descHandle(JSObject::FromPropertyDescriptor(thread, desc)); in HWTEST_F_L0()
199 PropertyDescriptor descNw(thread, JSHandle<JSTaggedValue>::Cast(descHandle), true, true, true); in HWTEST_F_L0()
200 JSObject::DefineOwnProperty(thread, objHandle, key, descNw); in HWTEST_F_L0()
202 … auto hpObjCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 8); in HWTEST_F_L0()
208 prev = TestHelper::SetupFrame(thread, hpObjCallInfo); in HWTEST_F_L0()
210 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
213 PropertyDescriptor descRes(thread); in HWTEST_F_L0()
214 …bool success = JSObject::GetOwnProperty(thread, JSHandle<JSObject>(thread, resultHp), key, descRes… in HWTEST_F_L0()
219 auto unCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 6); in HWTEST_F_L0()
224 prev = TestHelper::SetupFrame(thread, unCallInfo); in HWTEST_F_L0()
226 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
233 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
234 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0()
237 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
238 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("prop")); in HWTEST_F_L0()
240 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
242 PropertyDescriptor desc(thread); in HWTEST_F_L0()
244 JSHandle<JSObject> descHandle(JSObject::FromPropertyDescriptor(thread, desc)); in HWTEST_F_L0()
246 PropertyDescriptor descNw(thread, JSHandle<JSTaggedValue>::Cast(descHandle), true, true, true); in HWTEST_F_L0()
247 JSObject::DefineOwnProperty(thread, jsobjHandle, key, descNw); in HWTEST_F_L0()
249 auto objCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 8); in HWTEST_F_L0()
255 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, objCallInfo); in HWTEST_F_L0()
257 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
261 PropertyDescriptor descRes(thread); in HWTEST_F_L0()
262 JSObject::GetOwnProperty(thread, JSHandle<JSObject>(thread, res), key, descRes); in HWTEST_F_L0()
269 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
271 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0()
274 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
276 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
278 PropertyDescriptor desc(thread); in HWTEST_F_L0()
280 JSHandle<JSTaggedValue> writableStr = thread->GlobalConstants()->GetHandledWritableString(); in HWTEST_F_L0()
281 JSHandle<JSTaggedValue> writable(thread, JSTaggedValue(desc.IsWritable())); in HWTEST_F_L0()
282 JSObject::CreateDataProperty(thread, attHandle, writableStr, writable); in HWTEST_F_L0()
284 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("x")); in HWTEST_F_L0()
286 PropertyDescriptor descNw(thread); in HWTEST_F_L0()
287 JSObject::GetOwnProperty(thread, objHandle, key, descNw); in HWTEST_F_L0()
290 … auto objCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 10); in HWTEST_F_L0()
297 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, objCallInfo); in HWTEST_F_L0()
299 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
303 PropertyDescriptor descRes(thread); in HWTEST_F_L0()
304 JSObject::GetOwnProperty(thread, JSHandle<JSObject>(thread, res), key, descRes); in HWTEST_F_L0()
311 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
314 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
316 …auto nofreezeObjCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
321 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, nofreezeObjCallInfo); in HWTEST_F_L0()
328 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
335 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
337 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
339 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("x")); in HWTEST_F_L0()
341 PropertyDescriptor descEnum(thread); in HWTEST_F_L0()
343 JSTaggedValue::DefinePropertyOrThrow(thread, JSHandle<JSTaggedValue>(objHandle), key, descEnum); in HWTEST_F_L0()
345 auto objCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 8); in HWTEST_F_L0()
351 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, objCallInfo); in HWTEST_F_L0()
353 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
357 JSHandle<JSTaggedValue> writableStr = thread->GlobalConstants()->GetHandledWritableString(); in HWTEST_F_L0()
359 PropertyDescriptor desc(thread); in HWTEST_F_L0()
360 JSObject::GetOwnProperty(thread, JSHandle<JSObject>(thread, jt), writableStr, desc); in HWTEST_F_L0()
367 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
369 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
371 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("x")); in HWTEST_F_L0()
372 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0()
373 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(objHandle), key, value); in HWTEST_F_L0()
375 auto objCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 6); in HWTEST_F_L0()
380 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, objCallInfo); in HWTEST_F_L0()
382 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
390 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
392 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
393 JSHandle<JSSymbol> symbolKey = thread->GetEcmaVM()->GetFactory()->NewJSSymbol(); in HWTEST_F_L0()
395 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0()
396 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(objHandle), key, value); in HWTEST_F_L0()
397 thread->ClearException(); in HWTEST_F_L0()
399 auto objCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 6); in HWTEST_F_L0()
404 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, objCallInfo); in HWTEST_F_L0()
406 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
415 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
418 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
420 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
422 … auto objCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 8); in HWTEST_F_L0()
428 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, objCallInfo1); in HWTEST_F_L0()
430 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
439 …JSHandle<EcmaString> testStrValue1 = thread->GetEcmaVM()->GetFactory()->NewFromASCII("helloworld"); in HWTEST_F_L0()
440 …JSHandle<EcmaString> testStrValue2 = thread->GetEcmaVM()->GetFactory()->NewFromASCII("helloworld"); in HWTEST_F_L0()
442 auto strCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 8); in HWTEST_F_L0()
448 prev = TestHelper::SetupFrame(thread, strCallInfo); in HWTEST_F_L0()
450 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
455 … auto boolCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 8); in HWTEST_F_L0()
461 prev = TestHelper::SetupFrame(thread, boolCallInfo); in HWTEST_F_L0()
463 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
468 auto numCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 8); in HWTEST_F_L0()
474 prev = TestHelper::SetupFrame(thread, numCallInfo); in HWTEST_F_L0()
476 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
481 … auto nullCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), 8); in HWTEST_F_L0()
487 prev = TestHelper::SetupFrame(thread, nullCallInfo); in HWTEST_F_L0()
489 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
493 …auto undefineCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), … in HWTEST_F_L0()
499 prev = TestHelper::SetupFrame(thread, undefineCallInfo); in HWTEST_F_L0()
501 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
509 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
513 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
516 auto emptyObjCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, args, 6); in HWTEST_F_L0()
518 auto prev = TestHelper::SetupFrame(thread, emptyObjCallInfo); in HWTEST_F_L0()
520 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
532 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
533 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("x")); in HWTEST_F_L0()
534 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0()
538 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(function), … in HWTEST_F_L0()
540 …auto emptyObjCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(), … in HWTEST_F_L0()
545 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, emptyObjCallInfo); in HWTEST_F_L0()
547 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
552 prev = TestHelper::SetupFrame(thread, emptyObjCallInfo); in HWTEST_F_L0()
554 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
557 PropertyDescriptor descEnum(thread); in HWTEST_F_L0()
561 JSTaggedValue::DefinePropertyOrThrow(thread, JSHandle<JSTaggedValue>(obj), key, descEnum); in HWTEST_F_L0()
563 …auto emptyObjCallInfo2 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(),… in HWTEST_F_L0()
568 prev = TestHelper::SetupFrame(thread, emptyObjCallInfo2); in HWTEST_F_L0()
570 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
576 JSTaggedValue::DefinePropertyOrThrow(thread, JSHandle<JSTaggedValue>(obj), key, descEnum); in HWTEST_F_L0()
578 …auto emptyObjCallInfo3 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(),… in HWTEST_F_L0()
583 prev = TestHelper::SetupFrame(thread, emptyObjCallInfo3); in HWTEST_F_L0()
585 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
593 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
597 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
601 auto emptyObjCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, args, 6); in HWTEST_F_L0()
603 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, emptyObjCallInfo); in HWTEST_F_L0()
605 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
613 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
614 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
619 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
621 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
629 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
630 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
635 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
637 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
645 JSHandle<JSObject> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
647 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
652 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
654 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
658 JSHandle<JSObject> jtHandle(thread, jt); in HWTEST_F_L0()
665 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
666 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
671 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
679 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
686 JSHandle<JSObject> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
687 JSHandle<JSObject> objFather(thread, CreateBuiltinJSObject(thread, "y")); in HWTEST_F_L0()
689 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
695 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
697 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
703 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("y")); in HWTEST_F_L0()
704 …EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(obj), key).GetValue()->GetInt(), 1… in HWTEST_F_L0()
710 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
712 JSHandle<EcmaString> keyString = thread->GetEcmaVM()->GetFactory()->NewFromASCII(&keyCStr[0]); in HWTEST_F_L0()
715 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
720 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
722 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
730 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
731 JSHandle<JSTaggedValue> objFather(thread, CreateBuiltinJSObject(thread, "y")); in HWTEST_F_L0()
733 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
738 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
740 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
747 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
748 JSHandle<JSTaggedValue> objFather(thread, CreateBuiltinJSObject(thread, "y")); in HWTEST_F_L0()
750 …auto ecmaRuntimeCallInfo1 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined… in HWTEST_F_L0()
756 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo1); in HWTEST_F_L0()
758 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
763 …auto ecmaRuntimeCallInfo2 = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined… in HWTEST_F_L0()
768 prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo2); in HWTEST_F_L0()
770 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
778 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
779 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("x")); in HWTEST_F_L0()
781 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
786 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
788 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
796 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
797 JSHandle<JSFunction> calleeFunc = thread->GetEcmaVM()->GetFactory()->NewJSFunction( in HWTEST_F_L0()
798 thread->GetEcmaVM()->GetGlobalEnv(), reinterpret_cast<void *>(BuiltinsObject::ToString)); in HWTEST_F_L0()
801 JSHandle<JSTaggedValue> calleeKey(thread->GetEcmaVM()->GetFactory()->NewFromASCII("toString")); in HWTEST_F_L0()
802 JSObject::SetProperty(thread, obj, calleeKey, calleeValue); in HWTEST_F_L0()
804 …JSHandle<EcmaString> resultValue = thread->GetEcmaVM()->GetFactory()->NewFromASCII("[object Object… in HWTEST_F_L0()
806 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
811 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
813 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
816 …ASSERT_EQ(EcmaStringAccessor::Compare(instance, resultValue, JSHandle<EcmaString>(thread, result))… in HWTEST_F_L0()
822 … JSHandle<JSTaggedValue> obj = JSHandle<JSTaggedValue>(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
825 …JSHandle<EcmaString> resultValue = thread->GetEcmaVM()->GetFactory()->NewFromASCII("[object Object… in HWTEST_F_L0()
826 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
830 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
832 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
835 …ASSERT_EQ(EcmaStringAccessor::Compare(instance, resultValue, JSHandle<EcmaString>(thread, result))… in HWTEST_F_L0()
838 JSHandle<JSArray> arr = thread->GetEcmaVM()->GetFactory()->NewJSArray(); in HWTEST_F_L0()
840 thread->GetEcmaVM()->GetFactory()->NewFromASCII("[object Array]"); in HWTEST_F_L0()
841 …auto arrEcmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefin… in HWTEST_F_L0()
845 prev = TestHelper::SetupFrame(thread, arrEcmaRuntimeCallInfo); in HWTEST_F_L0()
847 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
850 …ASSERT_EQ(EcmaStringAccessor::Compare(instance, resultArrValue, JSHandle<EcmaString>(thread, resul… in HWTEST_F_L0()
853 JSHandle<EcmaString> str = thread->GetEcmaVM()->GetFactory()->NewFromASCII("hello"); in HWTEST_F_L0()
855 thread->GetEcmaVM()->GetFactory()->NewFromASCII("[object String]"); in HWTEST_F_L0()
856 …auto strEcmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefin… in HWTEST_F_L0()
860 prev = TestHelper::SetupFrame(thread, strEcmaRuntimeCallInfo); in HWTEST_F_L0()
862 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
865 …ASSERT_EQ(EcmaStringAccessor::Compare(instance, resultStrValue, JSHandle<EcmaString>(thread, resul… in HWTEST_F_L0()
868 …JSHandle<JSFunction> func = thread->GetEcmaVM()->GetFactory()->NewJSFunction(thread->GetEcmaVM()->… in HWTEST_F_L0()
870 thread->GetEcmaVM()->GetFactory()->NewFromASCII("[object Function]"); in HWTEST_F_L0()
871 …auto funcEcmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefi… in HWTEST_F_L0()
875 prev = TestHelper::SetupFrame(thread, funcEcmaRuntimeCallInfo); in HWTEST_F_L0()
877 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
881 resultFuncValue, JSHandle<EcmaString>(thread, resultFunc)), 0); in HWTEST_F_L0()
884 auto ecmaVM = thread->GetEcmaVM(); in HWTEST_F_L0()
888 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(errorObject), err… in HWTEST_F_L0()
889 …JSHandle<EcmaString> errorValue = thread->GetEcmaVM()->GetFactory()->NewFromASCII("[object Error]"… in HWTEST_F_L0()
890 …auto errorEcmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undef… in HWTEST_F_L0()
894 prev = TestHelper::SetupFrame(thread, errorEcmaRuntimeCallInfo); in HWTEST_F_L0()
896 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
899 …ASSERT_EQ(EcmaStringAccessor::Compare(instance, errorValue, JSHandle<EcmaString>(thread, resultErr… in HWTEST_F_L0()
902 JSHandle<JSTaggedValue> value(thread, JSTaggedValue::False()); in HWTEST_F_L0()
904 …JSHandle<JSPrimitiveRef> boolean = thread->GetEcmaVM()->GetFactory()->NewJSPrimitiveRef(booleanObj… in HWTEST_F_L0()
906 thread->GetEcmaVM()->GetFactory()->NewFromASCII("[object Boolean]"); in HWTEST_F_L0()
907 …auto boolEcmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefi… in HWTEST_F_L0()
911 prev = TestHelper::SetupFrame(thread, boolEcmaRuntimeCallInfo); in HWTEST_F_L0()
913 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
917 resultBoolValue, JSHandle<EcmaString>(thread, resultBool)), 0); in HWTEST_F_L0()
921 thread->GetEcmaVM()->GetFactory()->NewFromASCII("[object Number]"); in HWTEST_F_L0()
922 …auto numEcmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefin… in HWTEST_F_L0()
926 prev = TestHelper::SetupFrame(thread, numEcmaRuntimeCallInfo); in HWTEST_F_L0()
928 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
931 …ASSERT_EQ(EcmaStringAccessor::Compare(instance, resultNumValue, JSHandle<EcmaString>(thread, resul… in HWTEST_F_L0()
937 JSHandle<JSTaggedValue> obj(thread, CreateBuiltinJSObject(thread, "x")); in HWTEST_F_L0()
938 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
943 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
945 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()
953 JSHandle<JSTaggedValue> function(thread, BuiltinsObjectTestCreate(thread)); in HWTEST_F_L0()
955 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(function), functi… in HWTEST_F_L0()
956 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII("x")); in HWTEST_F_L0()
957 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0()
958 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(object), key, value); in HWTEST_F_L0()
959 …EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(object), key).GetValue()->GetInt()… in HWTEST_F_L0()
961 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue::Undefined(… in HWTEST_F_L0()
967 [[maybe_unused]] auto prev = TestHelper::SetupFrame(thread, ecmaRuntimeCallInfo); in HWTEST_F_L0()
969 TestHelper::TearDownFrame(thread, prev); in HWTEST_F_L0()