/arkcompiler/ets_runtime/ecmascript/ |
D | tagged_queue.h | 48 static TaggedQueue *Push(const JSThread *thread, const JSHandle<TaggedQueue> &queue, in Push() argument 51 uint32_t capacity = queue->GetCapacity().GetArrayLength(); in Push() 63 uint32_t start = queue->GetStart().GetArrayLength(); in Push() 64 uint32_t end = queue->GetEnd().GetArrayLength(); in Push() 65 uint32_t size = queue->Size(); in Push() 70 return *queue; in Push() 79 newQueue->Set(thread, newEnd, queue->Get(i)); in Push() 89 queue->Set(thread, end, value.GetTaggedValue()); in Push() 90 queue->SetEnd(thread, JSTaggedValue((end + 1) % capacity)); in Push() 91 return *queue; in Push() [all …]
|
D | js_async_generator_object.cpp | 62 JSHandle<TaggedQueue> queue(thread, generator->GetAsyncGeneratorQueue()); in AsyncGeneratorResolve() local 64 ASSERT(!(queue->Empty())); in AsyncGeneratorResolve() 66 JSHandle<AsyncGeneratorRequest> next(thread, queue->Front()); in AsyncGeneratorResolve() 68 queue->Pop(thread); in AsyncGeneratorResolve() 97 JSHandle<TaggedQueue> queue(thread, generator->GetAsyncGeneratorQueue()); in AsyncGeneratorReject() local 99 ASSERT(!(queue->Empty())); in AsyncGeneratorReject() 101 JSHandle<JSTaggedValue> val(thread, queue->Front()); in AsyncGeneratorReject() 104 queue->Pop(thread); in AsyncGeneratorReject() 138 JSHandle<TaggedQueue> queue(thread, generator->GetAsyncGeneratorQueue()); in AsyncGeneratorResumeNext() local 140 if (queue->Empty()) { in AsyncGeneratorResumeNext() [all …]
|
D | tagged_hash_array.cpp | 259 …TaggedValue> TaggedHashArray::GetCurrentNode(JSThread *thread, JSMutableHandle<TaggedQueue> &queue, in GetCurrentNode() argument 263 if (queue->Empty()) { in GetCurrentNode() 270 rootValue.Update(queue->Pop(thread)); in GetCurrentNode() 276 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, left))); in GetCurrentNode() 280 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, right))); in GetCurrentNode() 286 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, next))); in GetCurrentNode() 289 if (queue->Empty()) { in GetCurrentNode()
|
/arkcompiler/ets_frontend/es2panda/util/ |
D | workerQueue.cpp | 59 void WorkerQueue::Worker(WorkerQueue *queue) in Worker() argument 62 std::unique_lock<std::mutex> lock(queue->m_); in Worker() 63 …queue->jobsAvailable_.wait(lock, [queue]() { return queue->terminate_ || queue->jobsCount_ != 0; }… in Worker() 65 if (queue->terminate_) { in Worker() 71 queue->Consume(); in Worker() 72 queue->jobsFinished_.notify_one(); in Worker()
|
/arkcompiler/runtime_core/libpandabase/tests/ringbuf/ |
D | lock_free_ring_buffer_test.cpp | 58 std::queue<size_t> queue; in TEST() local 61 queue.push(i); in TEST() 62 if (i % ((rand() % 100) + 1) == 0 && !queue.empty()) { in TEST() 64 size_t queue_pop = queue.front(); in TEST() 65 queue.pop(); in TEST() 69 while (!queue.empty()) { in TEST() 71 size_t queue_pop = queue.front(); in TEST() 72 queue.pop(); in TEST()
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
D | js_tagged_queue_test.cpp | 58 JSHandle<TaggedQueue> queue = thread->GetEcmaVM()->GetFactory()->NewTaggedQueue(0); in HWTEST_F_L0() local 59 EXPECT_TRUE(*queue != nullptr); in HWTEST_F_L0() 60 EXPECT_TRUE(queue->Empty()); in HWTEST_F_L0() 61 EXPECT_EQ(queue->Size(), 0U); in HWTEST_F_L0() 62 EXPECT_EQ(queue->Front(), JSTaggedValue::Hole()); in HWTEST_F_L0() 63 EXPECT_EQ(queue->Back(), JSTaggedValue::Hole()); in HWTEST_F_L0() 68 JSHandle<TaggedQueue> queue = thread->GetEcmaVM()->GetFactory()->NewTaggedQueue(0); in HWTEST_F_L0() local 69 EXPECT_TRUE(queue->Empty()); in HWTEST_F_L0() 72 … TaggedQueue::Push(thread, queue, JSHandle<JSTaggedValue>(thread, JSTaggedValue(0)))); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/js_api/ |
D | js_api_queue.cpp | 27 void JSAPIQueue::Add(JSThread *thread, const JSHandle<JSAPIQueue> &queue, const JSHandle<JSTaggedVa… in Add() argument 29 uint32_t length = queue->GetLength().GetArrayLength(); in Add() 30 JSHandle<TaggedArray> elements = GrowCapacity(thread, queue, length + 1); in Add() 33 uint32_t tail = queue->GetTail(); in Add() 36 queue->SetLength(thread, JSTaggedValue(++length)); in Add() 40 queue->SetTail((tail + 1) % elementsSize); in Add() 71 JSTaggedValue JSAPIQueue::GetFirst(JSThread *thread, const JSHandle<JSAPIQueue> &queue) in GetFirst() argument 73 if (queue->GetLength().GetArrayLength() < 1) { in GetFirst() 77 uint32_t index = queue->GetFront(); in GetFirst() 79 JSHandle<TaggedArray> elements(thread, queue->GetElements()); in GetFirst() [all …]
|
D | js_api_hashmap_iterator.cpp | 53 JSMutableHandle<TaggedQueue> queue(thread, iter->GetTaggedQueue()); in Next() local 60 currentNode.Update(JSAPIHashMapIterator::FastGetCurrentNode(thread, iter, queue, tableArr)); in Next() 90 … JSMutableHandle<TaggedQueue> &queue, in FastGetCurrentNode() argument 97 return GetCurrentNode(thread, iter, queue, tableArr); in FastGetCurrentNode() 117 JSMutableHandle<TaggedQueue> &queue, in GetCurrentNode() argument 122 if (queue->Empty()) { in GetCurrentNode() 129 rootValue = JSHandle<JSTaggedValue>(thread, queue->Pop(thread)); in GetCurrentNode() 135 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, left))); in GetCurrentNode() 139 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, right))); in GetCurrentNode() 142 iter->SetTaggedQueue(thread, queue.GetTaggedValue()); in GetCurrentNode() [all …]
|
D | js_api_hashset_iterator.cpp | 54 JSMutableHandle<TaggedQueue> queue(thread, iter->GetTaggedQueue()); in Next() local 59 currentNode.Update(FastGetCurrentNode(thread, iter, queue, tableArr)); in Next() 85 … JSMutableHandle<TaggedQueue> &queue, in FastGetCurrentNode() argument 92 return GetCurrentNode(thread, iter, queue, tableArr); in FastGetCurrentNode() 111 JSMutableHandle<TaggedQueue> &queue, in GetCurrentNode() argument 116 if (queue->Empty()) { in GetCurrentNode() 123 rootValue = JSHandle<JSTaggedValue>(thread, queue->Pop(thread)); in GetCurrentNode() 129 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, left))); in GetCurrentNode() 133 queue.Update(JSTaggedValue(TaggedQueue::Push(thread, queue, right))); in GetCurrentNode() 136 iter->SetTaggedQueue(thread, queue.GetTaggedValue()); in GetCurrentNode() [all …]
|
D | js_api_queue_iterator.cpp | 42 JSHandle<JSTaggedValue> queue(thread, iter->GetIteratedQueue()); in Next() local 44 if (queue->IsUndefined()) { in Next() 49 uint32_t length = JSAPIQueue::GetArrayLength(thread, JSHandle<JSAPIQueue>(queue)); in Next() 57 JSHandle<JSTaggedValue> value(thread, JSHandle<JSAPIQueue>::Cast(queue)->Get(thread, index)); in Next()
|
D | js_api_queue.h | 32 …static void Add(JSThread *thread, const JSHandle<JSAPIQueue> &queue, const JSHandle<JSTaggedValue>… 33 static JSTaggedValue GetFirst(JSThread *thread, const JSHandle<JSAPIQueue> &queue); 34 static JSTaggedValue Pop(JSThread *thread, const JSHandle<JSAPIQueue> &queue); 35 …static void ForEach(JSThread *thread, const JSHandle<JSAPIQueue> &queue, const JSHandle<JSTaggedVa… 74 static uint32_t GetArrayLength(JSThread *thread, const JSHandle<JSAPIQueue> &queue);
|
D | js_api_hashmap_iterator.h | 35 JSMutableHandle<TaggedQueue> &queue, 39 JSMutableHandle<TaggedQueue> &queue,
|
/arkcompiler/toolchain/tooling/test/testcases/js/ |
D | container.js | 234 let queue = new Queue(); 235 queue.add(5); 236 queue.add(188); 237 queue.add(3); 238 queue.add(2888); 239 queue.add(1); 240 queue.add('555'); 241 queue.add(857); 242 queue.add('eleven'); 243 queue.add(999); [all …]
|
/arkcompiler/ets_runtime/ecmascript/snapshot/mem/ |
D | snapshot_processor.h | 53 …void ProcessObjectQueue(CQueue<TaggedObject *> *queue, std::unordered_map<uint64_t, ObjectEncode> … 54 void SerializeObject(TaggedObject *objectHeader, CQueue<TaggedObject *> *queue, 61 EncodeBit EncodeTaggedObject(TaggedObject *objectHeader, CQueue<TaggedObject *> *queue, 63 EncodeBit GetObjectEncode(JSTaggedValue object, CQueue<TaggedObject *> *queue, 65 void EncodeTaggedObjectRange(ObjectSlot start, ObjectSlot end, CQueue<TaggedObject *> *queue, 108 …SerializeObjectHeader(TaggedObject *objectHeader, size_t objectType, CQueue<TaggedObject *> *queue, 110 uint64_t SerializeTaggedField(JSTaggedType *tagged, CQueue<TaggedObject *> *queue,
|
/arkcompiler/ets_runtime/ecmascript/containers/tests/ |
D | containers_queue_test.cpp | 93 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue() local 94 return queue; in CreateJSAPIQueue() 113 JSHandle<JSAPIQueue> queue(thread, result); in HWTEST_F_L0() local 114 JSTaggedValue resultProto = JSTaggedValue::GetPrototype(thread, JSHandle<JSTaggedValue>(queue)); in HWTEST_F_L0() 126 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(); in HWTEST_F_L0() local 130 proxy->SetTarget(thread, queue.GetTaggedValue()); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/test/fuzztest/containersqueuegetiteratorobj_fuzzer/ |
D | containersqueuegetiteratorobj_fuzzer.cpp | 77 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue() local 78 return queue; in CreateJSAPIQueue() 99 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(thread); in ContainersQueueGetIteratorObjFuzzTest() local 104 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueGetIteratorObjFuzzTest() 112 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueGetIteratorObjFuzzTest()
|
/arkcompiler/ets_runtime/test/fuzztest/containersqueuegetfirst_fuzzer/ |
D | containersqueuegetfirst_fuzzer.cpp | 77 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue() local 78 return queue; in CreateJSAPIQueue() 99 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(thread); in ContainersQueueGetFirstFuzzTest() local 103 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueGetFirstFuzzTest() 111 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueGetFirstFuzzTest()
|
/arkcompiler/ets_runtime/test/fuzztest/containersqueuepop_fuzzer/ |
D | containersqueuepop_fuzzer.cpp | 77 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue() local 78 return queue; in CreateJSAPIQueue() 100 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(thread); in ContainersQueuePopFuzzTest() local 104 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueuePopFuzzTest() 112 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueuePopFuzzTest()
|
/arkcompiler/runtime_core/tests/cts-generator/ |
D | test-runner.rb | 214 queue = Queue.new 215 files.each { |x| queue.push x} 219 def create_executor_threads(queue, id, reporter_factory) argument 222 while file = queue.pop(true) 242 create_executor_threads queue, id, reporter_factory 281 while file = queue.pop(true)
|
/arkcompiler/ets_runtime/test/fuzztest/containersqueueforeach_fuzzer/ |
D | containersqueueforeach_fuzzer.cpp | 82 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue() local 83 return queue; in CreateJSAPIQueue() 105 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(thread); in ContainersQueueForEachFuzzTest() local 109 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueForEachFuzzTest() 121 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueForEachFuzzTest()
|
/arkcompiler/ets_runtime/test/fuzztest/containersqueue_fuzzer/ |
D | containersqueue_fuzzer.cpp | 77 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue() local 78 return queue; in CreateJSAPIQueue() 100 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(thread); in ContainersQueueFuzzTest() local 103 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueFuzzTest()
|
/arkcompiler/ets_runtime/test/fuzztest/containersqueueadd_fuzzer/ |
D | containersqueueadd_fuzzer.cpp | 77 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue() local 78 return queue; in CreateJSAPIQueue() 99 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(thread); in ContainersQueueAddFuzzTest() local 102 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueAddFuzzTest()
|
/arkcompiler/ets_frontend/es2panda/ |
D | es2panda.cpp | 171 …auto queue = new compiler::CompileFileQueue(options.fileThreadCount, &options, progsInfo, symbolTa… in CompileFiles() local 174 queue->Schedule(); in CompileFiles() 175 queue->Consume(); in CompileFiles() 176 queue->Wait(); in CompileFiles() 181 delete queue; in CompileFiles() 182 queue = nullptr; in CompileFiles()
|
/arkcompiler/ets_frontend/es2panda/aot/ |
D | main.cpp | 87 auto queue = new panda::es2panda::aot::EmitFileQueue(options, statp, programsInfo); in GenerateProgramsByWorkers() local 91 queue->Schedule(); in GenerateProgramsByWorkers() 92 queue->Consume(); in GenerateProgramsByWorkers() 93 queue->Wait(); in GenerateProgramsByWorkers() 99 delete queue; in GenerateProgramsByWorkers() 100 queue = nullptr; in GenerateProgramsByWorkers()
|
/arkcompiler/ets_runtime/test/fuzztest/containersqueuegetsize_fuzzer/ |
D | containersqueuegetsize_fuzzer.cpp | 77 JSHandle<JSAPIQueue> queue(thread, result); in CreateJSAPIQueue() local 78 return queue; in CreateJSAPIQueue() 100 JSHandle<JSAPIQueue> queue = CreateJSAPIQueue(thread); in ContainersQueueGetSizeFuzzTest() local 103 callInfo->SetThis(queue.GetTaggedValue()); in ContainersQueueGetSizeFuzzTest()
|