Lines Matching defs:thread

38 JSHandle<GlobalEnv> GetGlobal(JSThread *thread)
40 return thread->GetEcmaVM()->GetGlobalEnv();
45 thread->GetEcmaVM()->SetEnableForceGC(false);
46 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
47 JSHandle<JSTaggedValue> objFun = GetGlobal(thread)->GetObjectFunction();
51 JSHandle<JSHClass> newObjCls(thread, newObj->GetJSHClass());
56 EXPECT_EQ(newObj->GetProperties(), thread->GlobalConstants()->GetEmptyArray());
57 EXPECT_EQ(newObj->GetElements(), thread->GlobalConstants()->GetEmptyArray());
64 EXPECT_TRUE(cls->GetPrototype() == GetGlobal(thread)->GetObjectFunctionPrototype().GetTaggedValue());
69 thread->GetEcmaVM()->CollectGarbage(TriggerGCType::FULL_GC);
71 if (thread->GetEcmaVM()->GetJSOptions().EnableSnapshotDeserialize()) {
76 thread->GetEcmaVM()->SetEnableForceGC(true);
81 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
82 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv();
86 JSHandle<JSHClass> newFunCls(thread, newFun->GetJSHClass());
91 EXPECT_EQ(newFun->GetProperties(), thread->GlobalConstants()->GetEmptyArray());
92 EXPECT_EQ(newFun->GetElements(), thread->GlobalConstants()->GetEmptyArray());
101 EXPECT_TRUE(cls->GetPrototype() == GetGlobal(thread)->GetFunctionPrototype().GetTaggedValue());
110 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
113 JSHandle<JSFunction> funFun(GetGlobal(thread)->GetObjectFunction());
114 JSHandle<JSTaggedValue> bound(thread, GetGlobal(thread)->GetObjectFunctionPrototype().GetTaggedValue());
115 const JSHandle<TaggedArray> array(thread->GlobalConstants()->GetHandledEmptyArray());
120 JSHandle<JSHClass> newBoundFunCls(thread, newBoundFun->GetJSHClass());
127 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
130 JSHandle<JSFunction> numberFun(GetGlobal(thread)->GetNumberFunction());
131 JSHandle<JSTaggedValue> primitive(thread, JSTaggedValue(1));
135 JSHandle<JSHClass> newPrimitiveCls(thread, newPrimitive->GetJSHClass());
144 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
148 JSHandle<JSHClass> newLexicalEnvCls(thread, newLexicalEnv->GetClass());
155 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
159 JSHandle<JSHClass> newJSArrayCls(thread, newJSAarray->GetJSHClass());
168 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
172 shortTaggedarray->Set(thread, i, JSTaggedValue(i));
180 EXPECT_EQ(copiedShort->Get(thread, i), shortTaggedarray->Get(thread, i));
181 EXPECT_EQ(copiedLong->Get(thread, i), shortTaggedarray->Get(thread, i));
184 EXPECT_EQ(copiedLong->Get(thread, i), JSTaggedValue::Hole());
192 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
195 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv();
198 shortTaggedarray->Set(thread, i, newFun);
206 EXPECT_EQ(copiedShort->Get(thread, i), shortTaggedarray->Get(thread, i));
207 EXPECT_EQ(copiedLong->Get(thread, i), shortTaggedarray->Get(thread, i));
210 EXPECT_EQ(copiedLong->Get(thread, i), JSTaggedValue::Hole());