• Home
  • Raw
  • Download

Lines Matching +full:- +full:100

7  *     http://www.apache.org/licenses/LICENSE-2.0
50 thread = ecmaVm->GetJSThread(); in SetUp()
58 ecmaVm->SetEnableForceGC(false); in TearDown()
59 thread->ClearException(); in TearDown()
70 auto factory = ecmaVm->GetFactory(); in HWTEST_F_L0()
71 auto env = ecmaVm->GetGlobalEnv(); in HWTEST_F_L0()
73 JSHandle<ConstantPool> constpool = factory->NewConstantPool(6); in HWTEST_F_L0()
74 JSHandle<JSFunction> funcFunc(env->GetFunctionFunction()); in HWTEST_F_L0()
75 JSHandle<JSFunction> dateFunc(env->GetDateFunction()); in HWTEST_F_L0()
76 JSHandle<JSFunction> numberFunc(env->GetNumberFunction()); in HWTEST_F_L0()
77 JSHandle<EcmaString> str1 = factory->NewFromASCII("str11"); in HWTEST_F_L0()
78 JSHandle<EcmaString> str2 = factory->NewFromASCII("str22"); in HWTEST_F_L0()
79 constpool->SetObjectToCache(thread, 0, funcFunc.GetTaggedValue()); in HWTEST_F_L0()
80 constpool->SetObjectToCache(thread, 1, dateFunc.GetTaggedValue()); in HWTEST_F_L0()
81 constpool->SetObjectToCache(thread, 2, str1.GetTaggedValue()); in HWTEST_F_L0()
82 constpool->SetObjectToCache(thread, 3, numberFunc.GetTaggedValue()); in HWTEST_F_L0()
83 constpool->SetObjectToCache(thread, 4, str2.GetTaggedValue()); in HWTEST_F_L0()
84 constpool->SetObjectToCache(thread, 5, str1.GetTaggedValue()); in HWTEST_F_L0()
94 auto beginRegion = const_cast<Heap *>(ecmaVm->GetHeap())->GetOldSpace()->GetCurrentRegion(); in HWTEST_F_L0()
95 auto constpool1 = reinterpret_cast<ConstantPool *>(beginRegion->GetBegin()); in HWTEST_F_L0()
96 EXPECT_EQ(constpool->GetClass()->SizeFromJSHClass(*constpool), in HWTEST_F_L0()
97 constpool1->GetClass()->SizeFromJSHClass(constpool1)); in HWTEST_F_L0()
98 EXPECT_TRUE(constpool1->GetObjectFromCache(0).IsJSFunction()); in HWTEST_F_L0()
99 EXPECT_TRUE(constpool1->GetObjectFromCache(1).IsJSFunction()); in HWTEST_F_L0()
100 EXPECT_TRUE(constpool1->GetObjectFromCache(3).IsJSFunction()); in HWTEST_F_L0()
101 EcmaString *str11 = reinterpret_cast<EcmaString *>(constpool1->Get(2).GetTaggedObject()); in HWTEST_F_L0()
102 EcmaString *str22 = reinterpret_cast<EcmaString *>(constpool1->Get(4).GetTaggedObject()); in HWTEST_F_L0()
103 EcmaString *str33 = reinterpret_cast<EcmaString *>(constpool1->Get(5).GetTaggedObject()); in HWTEST_F_L0()
112 auto factory = ecmaVm->GetFactory(); in HWTEST_F_L0()
113 JSHandle<ConstantPool> constpool = factory->NewConstantPool(400); in HWTEST_F_L0()
114 for (int i = 0; i < 100; i++) { in HWTEST_F_L0()
115 …JSHandle<TaggedArray> array = factory->NewTaggedArray(10, JSTaggedValue::Hole(), MemSpaceType::SEM… in HWTEST_F_L0()
116 constpool->SetObjectToCache(thread, i, array.GetTaggedValue()); in HWTEST_F_L0()
118 for (int i = 0; i < 100; i++) { in HWTEST_F_L0()
119 …JSHandle<TaggedArray> array = factory->NewTaggedArray(10, JSTaggedValue::Hole(), MemSpaceType::OLD… in HWTEST_F_L0()
120 constpool->SetObjectToCache(thread, i + 100, array.GetTaggedValue()); in HWTEST_F_L0()
122 for (int i = 0; i < 100; i++) { in HWTEST_F_L0()
123 JSHandle<MachineCode> codeObj = factory->NewMachineCodeObject(0, nullptr); in HWTEST_F_L0()
124 constpool->SetObjectToCache(thread, i + 200, codeObj.GetTaggedValue()); in HWTEST_F_L0()
126 for (int i = 0; i < 100; i++) { in HWTEST_F_L0()
127 JSHandle<ConstantPool> constpool1 = factory->NewConstantPool(10); in HWTEST_F_L0()
128 constpool->SetObjectToCache(thread, i + 300, constpool1.GetTaggedValue()); in HWTEST_F_L0()
139 auto beginRegion = const_cast<Heap *>(ecmaVm->GetHeap())->GetOldSpace()->GetCurrentRegion(); in HWTEST_F_L0()
140 auto constpool1 = reinterpret_cast<ConstantPool *>(beginRegion->GetBegin()); in HWTEST_F_L0()
141 EXPECT_EQ(constpool->GetClass()->SizeFromJSHClass(*constpool), in HWTEST_F_L0()
142 constpool1->GetClass()->SizeFromJSHClass(constpool1)); in HWTEST_F_L0()
143 EXPECT_TRUE(constpool1->GetObjectFromCache(0).IsTaggedArray()); in HWTEST_F_L0()
144 EXPECT_TRUE(constpool1->GetObjectFromCache(100).IsTaggedArray()); in HWTEST_F_L0()
145 EXPECT_TRUE(constpool1->GetObjectFromCache(200).IsMachineCodeObject()); in HWTEST_F_L0()
146 EXPECT_TRUE(constpool1->GetObjectFromCache(300).IsTaggedArray()); in HWTEST_F_L0()
147 auto obj1 = constpool1->GetObjectFromCache(0).GetTaggedObject(); in HWTEST_F_L0()
148 EXPECT_TRUE(Region::ObjectAddressToRange(obj1)->InOldSpace()); in HWTEST_F_L0()
149 auto obj2 = constpool1->GetObjectFromCache(100).GetTaggedObject(); in HWTEST_F_L0()
150 EXPECT_TRUE(Region::ObjectAddressToRange(obj2)->InOldSpace()); in HWTEST_F_L0()
151 auto obj3 = constpool1->GetObjectFromCache(200).GetTaggedObject(); in HWTEST_F_L0()
153 EXPECT_TRUE(region->InMachineCodeSpace()); in HWTEST_F_L0()
160 auto factory = ecmaVm->GetFactory(); in HWTEST_F_L0()
161 JSHandle<ConstantPool> constpool1 = factory->NewConstantPool(400); in HWTEST_F_L0()
162 JSHandle<ConstantPool> constpool2 = factory->NewConstantPool(400); in HWTEST_F_L0()
163 for (int i = 0; i < 100; i++) { in HWTEST_F_L0()
164 …JSHandle<TaggedArray> array = factory->NewTaggedArray(10, JSTaggedValue::Hole(), MemSpaceType::SEM… in HWTEST_F_L0()
165 constpool1->SetObjectToCache(thread, i, array.GetTaggedValue()); in HWTEST_F_L0()
166 constpool2->SetObjectToCache(thread, i, array.GetTaggedValue()); in HWTEST_F_L0()
168 for (int i = 0; i < 100; i++) { in HWTEST_F_L0()
169 …JSHandle<TaggedArray> array = factory->NewTaggedArray(10, JSTaggedValue::Hole(), MemSpaceType::OLD… in HWTEST_F_L0()
170 constpool1->SetObjectToCache(thread, i + 100, array.GetTaggedValue()); in HWTEST_F_L0()
171 constpool2->SetObjectToCache(thread, i + 100, array.GetTaggedValue()); in HWTEST_F_L0()
173 for (int i = 0; i < 100; i++) { in HWTEST_F_L0()
174 JSHandle<MachineCode> codeObj = factory->NewMachineCodeObject(0, nullptr); in HWTEST_F_L0()
175 constpool1->SetObjectToCache(thread, i + 200, codeObj.GetTaggedValue()); in HWTEST_F_L0()
176 constpool2->SetObjectToCache(thread, i + 200, codeObj.GetTaggedValue()); in HWTEST_F_L0()
178 for (int i = 0; i < 100; i++) { in HWTEST_F_L0()
179 JSHandle<ConstantPool> constpool3 = factory->NewConstantPool(10); in HWTEST_F_L0()
180 constpool1->SetObjectToCache(thread, i + 300, constpool3.GetTaggedValue()); in HWTEST_F_L0()
181 constpool2->SetObjectToCache(thread, i + 300, constpool3.GetTaggedValue()); in HWTEST_F_L0()
195 auto beginRegion = const_cast<Heap *>(ecmaVm->GetHeap())->GetOldSpace()->GetCurrentRegion(); in HWTEST_F_L0()
196 auto constpool = reinterpret_cast<ConstantPool *>(beginRegion->GetBegin()); in HWTEST_F_L0()
197 EXPECT_TRUE(constpool->GetObjectFromCache(0).IsTaggedArray()); in HWTEST_F_L0()
198 EXPECT_TRUE(constpool->GetObjectFromCache(100).IsTaggedArray()); in HWTEST_F_L0()
199 EXPECT_TRUE(constpool->GetObjectFromCache(200).IsMachineCodeObject()); in HWTEST_F_L0()
200 auto obj1 = constpool->GetObjectFromCache(0).GetTaggedObject(); in HWTEST_F_L0()
201 EXPECT_TRUE(Region::ObjectAddressToRange(obj1)->InOldSpace()); in HWTEST_F_L0()
202 auto obj2 = constpool->GetObjectFromCache(100).GetTaggedObject(); in HWTEST_F_L0()
203 EXPECT_TRUE(Region::ObjectAddressToRange(obj2)->InOldSpace()); in HWTEST_F_L0()
204 auto obj3 = constpool->GetObjectFromCache(200).GetTaggedObject(); in HWTEST_F_L0()
206 EXPECT_TRUE(region->InMachineCodeSpace()); in HWTEST_F_L0()
227 EXPECT_TRUE(ecmaVm2->GetGlobalEnv()->GetClass()->GetObjectType() == JSType::GLOBAL_ENV); in HWTEST_F_L0()
228 auto globalConst = const_cast<GlobalEnvConstants *>(ecmaVm2->GetJSThread()->GlobalConstants()); in HWTEST_F_L0()
231 globalConst->VisitRangeSlot([&hclassIndex, &hclassEndIndex]([[maybe_unused]]Root type, in HWTEST_F_L0()
249 auto factory = ecmaVm->GetFactory(); in HWTEST_F_L0()
250 auto env = ecmaVm->GetGlobalEnv(); in HWTEST_F_L0()
252 JSHandle<TaggedArray> array1 = factory->NewTaggedArray(300 * 1024 / 8); in HWTEST_F_L0()
253 JSHandle<TaggedArray> array2 = factory->NewTaggedArray(300 * 1024 / 8); in HWTEST_F_L0()
254 JSHandle<TaggedArray> array3 = factory->NewTaggedArray(100); in HWTEST_F_L0()
256 JSHandle<JSFunction> funcFunc(env->GetFunctionFunction()); in HWTEST_F_L0()
257 JSHandle<JSFunction> dateFunc(env->GetDateFunction()); in HWTEST_F_L0()
258 JSHandle<JSFunction> numberFunc(env->GetNumberFunction()); in HWTEST_F_L0()
259 array1->Set(thread, 0, array2.GetTaggedValue()); in HWTEST_F_L0()
260 array1->Set(thread, 1, funcFunc.GetTaggedValue()); in HWTEST_F_L0()
261 array1->Set(thread, 2, dateFunc.GetTaggedValue()); in HWTEST_F_L0()
262 array1->Set(thread, 3, numberFunc.GetTaggedValue()); in HWTEST_F_L0()
263 array2->Set(thread, 0, array3.GetTaggedValue()); in HWTEST_F_L0()
264 array2->Set(thread, 1, funcFunc.GetTaggedValue()); in HWTEST_F_L0()
265 array2->Set(thread, 2, dateFunc.GetTaggedValue()); in HWTEST_F_L0()
266 array2->Set(thread, 3, numberFunc.GetTaggedValue()); in HWTEST_F_L0()
276 … auto lastRegion = const_cast<Heap *>(ecmaVm->GetHeap())->GetHugeObjectSpace()->GetCurrentRegion(); in HWTEST_F_L0()
277 auto array4 = reinterpret_cast<TaggedArray *>(lastRegion->GetBegin()); in HWTEST_F_L0()
278 EXPECT_TRUE(array4->Get(0).IsTaggedArray()); in HWTEST_F_L0()
279 EXPECT_TRUE(array4->Get(1).IsJSFunction()); in HWTEST_F_L0()
280 EXPECT_TRUE(array4->Get(2).IsJSFunction()); in HWTEST_F_L0()
281 EXPECT_TRUE(array4->Get(3).IsJSFunction()); in HWTEST_F_L0()