Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 405) sorted by relevance

12345678910>>...17

/ark/runtime_core/libpandabase/tests/
Dmath_helpers_test.cpp25 for (int i = 1; i < 32; i++) { in TEST() local
26 uint64_t val = 1U << i; in TEST()
27 EXPECT_EQ(GetIntLog2(val), i); in TEST()
31 for (int i = 1; i < 32; i++) { in TEST() local
32 uint64_t val = (1U << i) + (i == 31 ? -1 : 1); in TEST()
55 for (int i = 0; i <= 1; i++) { in TEST() local
56 EXPECT_EQ(GetPowerOfTwoValue32(i), 1); in TEST()
58 for (int i = 2; i <= 2; i++) { in TEST() local
59 EXPECT_EQ(GetPowerOfTwoValue32(i), 2); in TEST()
61 for (int i = 9; i <= 16; i++) { in TEST() local
[all …]
Dstring_helpers_test.cpp33 for (size_t i = 0; i < 10000; i++) { in TEST() local
45 int i = 0; in TEST() local
47 ASSERT_FALSE(ParseInt("x", &i)); in TEST()
50 ASSERT_FALSE(ParseInt("123x", &i)); in TEST()
53 ASSERT_TRUE(ParseInt("123", &i)); in TEST()
54 ASSERT_EQ(123, i); in TEST()
56 i = 0; in TEST()
57 EXPECT_TRUE(ParseInt(" 123", &i)); in TEST()
58 EXPECT_EQ(123, i); in TEST()
59 ASSERT_TRUE(ParseInt("-123", &i)); in TEST()
[all …]
Darena_allocator_test.cpp86 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithAlignment() local
87 arr[i] = static_cast<T *>(aa.Alloc(sizeof(T), align)); in AllocateWithAlignment()
88 *arr[i] = rand() % MAX_VALUE<T>(); in AllocateWithAlignment()
93 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithAlignment() local
94 ASSERT_NE(arr[i], nullptr) << "value of i: " << i << ", align: " << align; in AllocateWithAlignment()
95 …ASSERT_EQ(reinterpret_cast<size_t>(arr[i]) & mask, 0U) << "value of i: " << i << ", align: " << al… in AllocateWithAlignment()
96 … ASSERT_EQ(*arr[i], rand() % MAX_VALUE<T>()) << "value of i: " << i << ", align: " << align; in AllocateWithAlignment()
110 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in AllocateWithDiffAlignment() local
113 arr[i] = static_cast<T *>(aa.Alloc(sizeof(T), static_cast<Alignment>(rand_align))); in AllocateWithDiffAlignment()
114 *arr[i] = random_value % MAX_VALUE<T>(); in AllocateWithDiffAlignment()
[all …]
Dnative_bytes_from_mallinfo_test.cpp31 for (int i = 0; i < 1000; i++) { in TEST() local
32 p1[i] = malloc(64); in TEST()
33 ASSERT_NE(p1[i], nullptr); in TEST()
40 for (int i = 0; i < 10; i++) { in TEST() local
41 p2[i] = malloc(4 * 1024 * 1024); in TEST()
42 ASSERT_NE(p2[i], nullptr); in TEST()
48 for (int i = 0; i < 1000; i++) { in TEST() local
49 free(p1[i]); in TEST()
50 p1[i] = nullptr; in TEST()
56 for (int i = 0; i < 10; i++) { in TEST() local
[all …]
/ark/js_runtime/ecmascript/tests/
Djs_handle_test.cpp79 for (int i = 0; i < 600; i++) { in HWTEST_F_L0() local
80 std::string test = "test" + std::to_string(i); in HWTEST_F_L0()
82 globalString[i] = global->NewGlobalHandle(string1.GetTaggedType()); in HWTEST_F_L0()
87 for (int i = 300; i > 200; i--) { in HWTEST_F_L0() local
88 global->DisposeGlobalHandle(globalString[i]); in HWTEST_F_L0()
91 for (int i = 0; i <= 200; i++) { in HWTEST_F_L0() local
92 std::string test = "test" + std::to_string(i); in HWTEST_F_L0()
94 …ory->NewFromString(test.c_str())->Compare(*reinterpret_cast<EcmaString **>(globalString[i])) == 0); in HWTEST_F_L0()
98 for (int i = 301; i < 600; i++) { in HWTEST_F_L0() local
99 std::string test = "test" + std::to_string(i); in HWTEST_F_L0()
[all …]
Dtagged_tree_test.cpp279 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
280 keyArray[5] = '1' + i; // 5 means index of keyArray in HWTEST_F_L0()
283 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(i)); in HWTEST_F_L0()
289 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
290 keyArray[5] = '1' + i; // 5 means index of keyArray in HWTEST_F_L0()
295 EXPECT_EQ(JSTaggedValue(i), res); in HWTEST_F_L0()
308 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
309 keyArray[5] = '1' + i; // 5 means index of keyArray in HWTEST_F_L0()
319 for (int i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
320 keyArray[5] = '1' + i; // 5 means index of keyArray in HWTEST_F_L0()
[all …]
Djs_array_iterator_test.cpp70 for (int i = 0; i < numArrayFrom1; i++) { in HWTEST_F_L0() local
71 handleTaggedArrayFrom1->Set(thread, i, JSTaggedValue(arrayFrom1[i])); in HWTEST_F_L0()
73 for (int i = 0; i < numArrayFrom2; i++) { in HWTEST_F_L0() local
74 handleTaggedArrayFrom2->Set(thread, i, JSTaggedValue(arrayFrom2[i])); in HWTEST_F_L0()
85 for (int i = 0; i < numArrayFrom1; i++) { in HWTEST_F_L0() local
86 …JSArray::FastGetPropertyByValue(thread, JSHandle<JSTaggedValue>(handleJSArrayTo1), i)->GetNumber(), in HWTEST_F_L0()
87 arrayFrom1[i]); in HWTEST_F_L0()
95 for (int i = 0; i < numArrayFrom2; i++) { in HWTEST_F_L0() local
96 …JSArray::FastGetPropertyByValue(thread, JSHandle<JSTaggedValue>(handleJSArrayTo2), i)->GetNumber(), in HWTEST_F_L0()
97 arrayFrom2[i]); in HWTEST_F_L0()
[all …]
Djs_api_tree_map_test.cpp107 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
108 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
109 std::string ivalue = myValue + std::to_string(i); in HWTEST_F_L0()
116 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
117 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
118 std::string ivalue = myValue + std::to_string(i); in HWTEST_F_L0()
140 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
141 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
142 std::string ivalue = myValue + std::to_string(i); in HWTEST_F_L0()
149 for (uint32_t i = 0; i < REMOVE_SIZE; i++) { in HWTEST_F_L0() local
[all …]
Djs_api_tree_set_test.cpp105 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
106 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
112 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
113 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
132 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
133 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
139 for (uint32_t i = 0; i < REMOVE_SIZE; i++) { in HWTEST_F_L0() local
140 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
147 for (uint32_t i = 0; i < REMOVE_SIZE; i++) { in HWTEST_F_L0() local
148 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
[all …]
/ark/runtime_core/runtime/tests/
Dbump_allocator_test.cpp44 for (auto i : allocated_mem_mmap_) { in ~BumpAllocatorTest() local
45 panda::os::mem::UnmapRaw(std::get<0>(i), std::get<1>(i)); in ~BumpAllocatorTest()
47 for (auto i : allocated_arenas) { in ~BumpAllocatorTest() local
48 delete i; in ~BumpAllocatorTest()
88 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in TEST_F() local
89 arr[i] = static_cast<int *>(bp_allocator.Alloc(sizeof(int), align)); in TEST_F()
90 *arr[i] = rand() % std::numeric_limits<int>::max(); in TEST_F()
95 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in TEST_F() local
96 … ASSERT_NE(arr[i], nullptr) << "value of i: " << i << ", align: " << align << ", seed:" << seed_; in TEST_F()
97 ASSERT_EQ(reinterpret_cast<size_t>(arr[i]) & mask, static_cast<size_t>(0)) in TEST_F()
[all …]
Dframe_allocator_test.cpp54 for (size_t i = 0; i < size; i++) { in PrintMemory() local
65 for (size_t i = 0; i < size; i++) { in PrintAtIndex() local
100 for (size_t i = 1; i <= ITERATIONS; i++) { in TEST_F() local
101 array[i] = alloc.Alloc(FRAME_SIZE); in TEST_F()
102 ASSERT_NE(array[i], nullptr); in TEST_F()
103 *(static_cast<uint64_t *>(array[i])) = i; in TEST_F()
105 for (size_t i = ITERATIONS; i != 0; i--) { in TEST_F() local
106 ASSERT_EQ(*(static_cast<uint64_t *>(array[i])), i); in TEST_F()
107 alloc.Free(array[i]); in TEST_F()
116 for (size_t i = 1; i <= MAX_SIZE; i++) { in AlignmentTest() local
[all …]
Dallocator_test_base.h65 for (size_t i = 0; i < BYTE_ARRAY_SIZE; ++i) { in InitByteArray() local
67 byte_array_[i] = RandFromRange(0, random_max_limit); in InitByteArray()
491 for (size_t i = 0; i < pools_count; ++i) { in OneAlignedAllocFreeTest() local
528 for (size_t i = 0; i < pools_count; i++) { in AlignedAllocFreeTest() local
562 for (size_t i = 0; i < pools_count; i++) { in AllocateAndFree() local
568 for (size_t i = 0; i < elements_count; ++i) { in AllocateAndFree() local
570 ASSERT_TRUE(mem != nullptr) << "Didn't allocate " << alloc_size << " bytes in " << i in AllocateAndFree()
573 allocated_elements[i] = {mem, index}; in AllocateAndFree()
594 for (size_t i = 0; i < POOLS_COUNT; i++) { in VisitAndRemoveFreePools() local
601 allocated_elements[i].push_back(mem); in VisitAndRemoveFreePools()
[all …]
Ddebugger_test.cpp125 for (size_t i = 0; i < regs.size(); i++) { in TEST_F() local
126 if (regs[i].is_ref) { in TEST_F()
127 frame->GetVReg(i).SetReference(ToPtr(regs[i].value)); in TEST_F()
129 frame->GetVReg(i).SetPrimitive(static_cast<int64_t>(regs[i].value)); in TEST_F()
144 for (size_t i = 0; i < debug_frame.GetVRegNum(); i++) { in TEST_F() local
145 EXPECT_EQ(debug_frame.GetVReg(i), regs[i].value); in TEST_F()
148 for (size_t i = 0; i < debug_frame.GetArgumentNum(); i++) { in TEST_F() local
149 EXPECT_EQ(debug_frame.GetArgument(i), regs[i + nregs].value); in TEST_F()
164 for (size_t i = 0; i < debug_frame.GetVRegNum(); i++) { in TEST_F() local
165 EXPECT_EQ(debug_frame.GetVReg(i), regs[i].value); in TEST_F()
[all …]
Dtlab_test.cpp41 for (auto i : allocated_mem_mmap_) { in ~TLABTest() local
42 panda::os::mem::UnmapRaw(std::get<0>(i), std::get<1>(i)); in ~TLABTest()
72 for (size_t i = 1; i < ALLOC_COUNT; i++) { in TEST_F() local
97 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in TEST_F() local
98 arr[i] = static_cast<int *>(tlab->Alloc(sizeof(int))); in TEST_F()
99 *arr[i] = rand() % std::numeric_limits<int>::max(); in TEST_F()
104 for (size_t i = 0; i < ARRAY_SIZE; ++i) { in TEST_F() local
105 ASSERT_NE(arr[i], nullptr) << "value of i: " << i << ", align: " << align; in TEST_F()
106 ASSERT_EQ(reinterpret_cast<size_t>(arr[i]) & mask, static_cast<size_t>(0)) in TEST_F()
107 << "value of i: " << i << ", align: " << align; in TEST_F()
[all …]
/ark/ts2abc/ts2panda/src/
DregAllocator.ts59 for (let i = 0; i < iterCnts; ++i) {
60 let value = this.usedVreg[i];
127 for (let i = 0; i < operands.length; ++i) {
128 if (operands[i] instanceof VReg) {
129 this.markVregNotAvailableAsTmp(<VReg>operands[i]);
192 let i = rangeRegOffset + 1;
193 for (; i < (irNodes[index]).operands.length; ++i) {
194 if ((startNum + 1) != (<VReg>operands[i]).num) {
201 if (i == (irNodes[index]).operands.length) {
222 for (let i = 0; i < regNums; i++) {
[all …]
/ark/runtime_core/isa/
Dasserts.rb114 Panda.instructions.map do |i|
115 next true if i.properties.include?('language')
117 i.acc_and_operands.map(&:dst?).any? == (i.dtype != 'none')
122 Panda.instructions.map do |i|
123 i.float? == i.acc_and_operands.any? { |op| op.type.start_with?('f') }
132 Panda.instructions.map do |i|
133 props = i.properties
139 Panda.instructions.select { |i| i.properties.include?('call') }.map do |i|
140 i.properties.include?('acc_write')
145 Panda.instructions.select do |i|
[all …]
/ark/runtime_core/libpandafile/tests/
Dpanda_cache_test.cpp91 static ElementMock *GetNewMockElement(int i) in GetNewMockElement() argument
94 m->data = i; in GetNewMockElement()
109 for (int i = 0; i < NUMBER_OF_ELEMENTS; i++) { in runWriter() local
110 EntityId id(i); in runWriter()
111 auto *m = GetNewMockElement(i); in runWriter()
119 for (int i = 0; i < NUMBER_OF_ELEMENTS; i++) { in runReader() local
120 EntityId id(i); in runReader()
126 ASSERT_EQ(d, i); in runReader()
241 for (int i = 0; i < NUMBER_OF_ELEMENTS; i++) { in cleanMethodMocks() local
242 EntityId id(i); in cleanMethodMocks()
[all …]
Dbytecode_emitter_tests.cpp78 for (int i = 0; i < num_ret; ++i) { in TEST() local
85 for (int i = 0; i < num_ret; ++i) { in TEST() local
100 for (int i = 0; i < num_ret; ++i) { in TEST() local
109 for (int i = 0; i < num_ret + 1; ++i) { in TEST() local
122 for (int i = 0; i < num_ret; ++i) { in TEST() local
129 for (int i = 0; i < num_ret; ++i) { in TEST() local
140 for (int i = 0; i < num_ret; ++i) { in TEST() local
147 for (int i = 0; i < num_ret; ++i) { in TEST() local
165 for (int i = 0; i < num_ret; ++i) { in TEST() local
174 for (int i = 0; i < num_ret + 1; ++i) { in TEST() local
[all …]
/ark/js_runtime/ecmascript/compiler/
Dstub_aot_compiler.h28 for (int i = 0; i < ALL_STUB_MAXCOUNT; i++) { in StubAotCompiler() local
29 stubs_[i] = nullptr; in StubAotCompiler()
34 for (int i = 0; i < ALL_STUB_MAXCOUNT; i++) { in ~StubAotCompiler() local
35 stubs_[i] = nullptr; in ~StubAotCompiler()
48 uint32_t i; in GetStubIndices() local
49 for (i = 0; i < FAST_STUB_MAXCOUNT; i++) { in GetStubIndices()
50 if (stubs_[i] != nullptr) { in GetStubIndices()
51 result.push_back(i); in GetStubIndices()
55 for (; i < ALL_STUB_MAXCOUNT; i++) { in GetStubIndices()
56 if (stubs_[i] != nullptr) { in GetStubIndices()
/ark/js_runtime/ecmascript/platform/
Drunner.cpp23 for (uint32_t i = 0; i < threadNum; i++) { in Runner() local
25 … std::unique_ptr<std::thread> thread = std::make_unique<std::thread>(&Runner::Run, this, i + 1); in Runner()
30 for (uint32_t i = 0; i < runningTask_.size(); i++) { in Runner() local
31 runningTask_[i] = nullptr; in Runner()
37 for (uint32_t i = 0; i < runningTask_.size(); i++) { in TerminateTask() local
38 if (runningTask_[i] != nullptr) { in TerminateTask()
39 runningTask_[i]->Terminated(); in TerminateTask()
50 for (int i = 0; i < threadNum; i++) { in TerminateThread() local
51 threadPool_.at(i)->join(); in TerminateThread()
/ark/runtime_core/assembler/utils/
Dnumber-utils.h36 for (auto i : token) { in ValidateHexInteger() local
37 if (!((i >= '0' && i <= '9') || (i >= 'A' && i <= 'F') || (i >= 'a' && i <= 'f'))) { in ValidateHexInteger()
52 for (auto i : token) { in ValidateBinInteger() local
53 if (!(i == '0' || i == '1')) { in ValidateBinInteger()
66 for (auto i : token) { in ValidateOctalInteger() local
67 if (!(i >= '0' && i <= '7')) { in ValidateOctalInteger()
101 for (auto i : token) { in ValidateInteger() local
102 if (!(i >= '0' && i <= '9')) { in ValidateInteger()
156 for (auto i : token) { in ValidateFloat() local
157 if (nowexp && (i == '-' || i == '+')) { in ValidateFloat()
[all …]
/ark/js_runtime/ecmascript/
Djs_bigint.cpp42 for (size_t i = 0; i < num.size(); i++) { in Division() local
43 temp = (currentRadix * remain + CharToInt(num[i])); in Division()
44 num[i] = dp[temp / conversionToRadix]; in Division()
94 for (size_t i = 0; i < mod; ++i) { in SetBigInt() local
96 val |= binaryStr[i] - '0'; in SetBigInt()
104 size_t i = mod; in SetBigInt() local
105 while (i < binaryStrLen) { in SetBigInt()
107 for (size_t j = 0; j < BigInt::DATEBITS && i < binaryStrLen; ++j, ++i) { in SetBigInt()
109 val |= binaryStr[i] - '0'; in SetBigInt()
165 for (size_t i = 0; i < resLen; ++i) { in GetBinary() local
[all …]
Dlayout_info.cpp53 for (int i = 0; i < end; i++) { in GetAllKeys() local
54 JSTaggedValue key = GetKey(i); in GetAllKeys()
62 for (int i = 0; i < end; i++) { in GetAllKeys() local
63 JSTaggedValue key = GetKey(i); in GetAllKeys()
76 for (int i = 0; i < end; i++) { in GetAllKeys() local
77 JSTaggedValue key = GetKey(i); in GetAllKeys()
94 for (int i = 0; i < end; i++) { in GetAllEnumKeys() local
95 JSTaggedValue key = GetKey(i); in GetAllEnumKeys()
96 if (key.IsString() && GetAttr(i).IsEnumerable()) { in GetAllEnumKeys()
109 for (int i = 0; i < end; i++) { in GetAllNames() local
[all …]
/ark/js_runtime/ecmascript/containers/tests/
Dcontainers_treemap_test.cpp183 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
187 callInfo->SetCallArg(0, JSTaggedValue(i)); in HWTEST_F_L0()
188 callInfo->SetCallArg(1, JSTaggedValue(i)); in HWTEST_F_L0()
194 EXPECT_EQ(JSAPITreeMap::Cast(result.GetTaggedObject())->GetSize(), i + 1); in HWTEST_F_L0()
203 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
204 std::string ikey = myKey + std::to_string(i); in HWTEST_F_L0()
205 std::string ivalue = myValue + std::to_string(i); in HWTEST_F_L0()
218 EXPECT_EQ(JSAPITreeMap::Cast(result.GetTaggedObject())->GetSize(), NODE_NUMBERS + i + 1); in HWTEST_F_L0()
221 for (uint32_t i = 0; i < NODE_NUMBERS; i++) { in HWTEST_F_L0() local
225 callInfo->SetCallArg(0, JSTaggedValue(i)); in HWTEST_F_L0()
[all …]
/ark/runtime_core/runtime/
Dhandle_storage-inl.h60 for (size_t i = nid; i < nodes_.size(); ++i) { in FreeHandles() local
61 allocator_->Delete(nodes_[i]); in FreeHandles()
73 for (size_t i = nid; i < nodes_.size(); ++i) { in ZapFreedHandles() local
74 auto node = nodes_.at(i); in ZapFreedHandles()
75 if (i != nid) { in ZapFreedHandles()
93 for (uint32_t i = 0; i <= nid; ++i) { in UpdateHeapObject() local
94 auto node = nodes_.at(i); in UpdateHeapObject()
95 uint32_t count = (i != nid) ? NODE_BLOCK_SIZE : offset; in UpdateHeapObject()
117 for (uint32_t i = 0; i <= nid; ++i) { in VisitGCRoots() local
118 auto node = nodes_.at(i); in VisitGCRoots()
[all …]

12345678910>>...17