Home
last modified time | relevance | path

Searched full:stack (Results 1 – 25 of 630) sorted by relevance

12345678910>>...26

/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/api/@ohos/util/Stack/
DStackCreateLengthPushPopPeekTests.ets16 import {Stack} from "@ohos.util.Stack";
19 const suite = new ArkTestsuite("Stack API tests");
21 …suite.addTest("Stack create an instance that stores single-type data", testCreateSingleTypeInstanc…
22 …suite.addTest("Stack create an instance that stores multiple types of data", testCreateMultiTypeIn…
23 suite.addTest("Stack length", testStackLength);
24 suite.addTest("Stack length with mixed types", testStackLengthMixedTypes);
25 suite.addTest("Stack length with large number of elements", testStackLengthLargeNumber);
26 suite.addTest("Stack push", testStackPush);
27 suite.addTest("Stack pop first element from an empty stack", testPopFromEmptyStack);
28 suite.addTest("Stack pop first element", testPopFromNonEmptyStack);
[all …]
DStackLocateForEachIteratorTests.ets16 import {Stack} from "@ohos.util.Stack";
19 const suite = new ArkTestsuite("Stack API tests");
21 suite.addTest("Stack locate with unique element", testLocateWithUniqueElement);
22 suite.addTest("Stack locate with repeated element", testLocateWithRepeatedElement);
23 suite.addTest("Stack locate with inexistent element", testLocateWithInexistentElement);
24 suite.addTest("Stack forEach with no parameter function", testForEachNoParameter);
25 suite.addTest("Stack forEach with function with value", testForEachWithValue);
26 suite.addTest("Stack forEach with function with value and index", testForEachWithValueAndIndex);
27 …suite.addTest("Stack forEach with function with value, index and stack", testForEachWithValueIndex…
28 suite.addTest("Stack forEach with changing the elements", testForEachWithChangingElements);
[all …]
/arkcompiler/runtime_core/docs/
Druntime-compiled_code-interaction.md8 * The structure of compiled code stack frames and stack traversing
12 * Stack unwinding during exception handling
50 …_ | StackFrameKind | A kind of the current stack frame (compiled code or interpreter sta…
82 ## Stack frame
83 A stack frame contains data necessary to execute the function the frame belongs to.
84 …kinds of stack frames. But all the frames of managed code must have the structure described in [Co…
86 ### Interpreter stack frame
87 …terpreter stack frame is decribed by `panda::Frame` class. The class has fields to store virtual r…
88 All the consecutive interpreter stack frames are organized into a linked list. The field `panda::Fr…
90 ### Compiled code stack frame
[all …]
Dcfi_directives.md5 …ecial cryptographic/vector instructions) or if there is a need for manual stack/registers manipula…
7 …rmation**) is a subset of these debug symbols which is responsible for correct **stack unwinding**.
24 In prolog we save `lr`, `fp` and `callee` regs on stack.
25 So we should explicitly mark these stack slots with help of `CFI` directives.
30 In epilog we read saved `callees` from stack and also `fp`/`lr`. Here we annotate that saved regist…
34 There are bridges which `hack` stack memory (setting `stack pointer` to other stack frame), i.e.:
/arkcompiler/runtime_core/static_core/docs/
Druntime-compiled_code-interaction.md8 * The structure of compiled code stack frames and stack traversing
12 * Stack unwinding during exception handling
43 For dynamic languages a compiled function accepts all arguments in stack slots.
56 …_ | StackFrameKind | A kind of the current stack frame (compiled code or interpreter sta…
88 ## Stack frame
89 A stack frame contains data necessary to execute the function the frame belongs to.
90 …kinds of stack frames. But all the frames of managed code must have the structure described in [Co…
92 ### Interpreter stack frame
93 …nterpreter stack frame is decribed by `ark::Frame` class. The class has fields to store virtual re…
94 All the consecutive interpreter stack frames are organized into a linked list. The field `ark::Fram…
[all …]
Dcfi_directives.md5 …ecial cryptographic/vector instructions) or if there is a need for manual stack/registers manipula…
7 …rmation**) is a subset of these debug symbols which is responsible for correct **stack unwinding**.
24 In prolog we save `lr`, `fp` and `callee` regs on stack.
25 So we should explicitly mark these stack slots with help of `CFI` directives.
30 In epilog we read saved `callees` from stack and also `fp`/`lr`. Here we annotate that saved regist…
34 There are bridges which `hack` stack memory (setting `stack pointer` to other stack frame), i.e.:
/arkcompiler/ets_runtime/test/moduletest/container/
Dcontainer_stack.js24 var Stack = undefined; variable
26 Stack = ArkPrivate.Load(ArkPrivate.Stack);
27 let stack = new Stack(); variable
28 let proxy = new Proxy(stack, {});
50 map.set("test stack add:", res)
59 map.set("test stack forEach:", res)
69 map.set("test stack for of:", res);
71 map.set("test stack Symbol.iterator:", res)
73 map.set("test stack peek:", proxy.peek() === 9)
74 map.set("test stack locate:", proxy.locate(5) === 5)
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/sdk/api/
D@ohos.util.Stack.ets16 export class Stack<T> implements Iterable<T> {
20 * Gets the number of elements in the Stack.
27 * Retrieves the top element in the Stack without removing it.
28 * @returns The top element in the Stack, or undefined if the Stack is empty.
35 * Finds the index of the specified element in the Stack.
36 * @param element - The element to locate in the Stack.
44 * Removes and returns the first element in the Stack.
45 * @returns The first element in the Stack, or undefined if the Stack is empty.
52 * Creates a new instance of Stack.
61 …lbackfn - The function to execute on each element, taking the value, index, and Stack as arguments.
[all …]
/arkcompiler/runtime_core/static_core/compiler/tests/
Dspill_fill_encoder_test.cpp32 {{LocationType::REGISTER, LocationType::STACK, 1U, 0U, DataType::Type::INT64}, in TEST_F()
33 {LocationType::REGISTER, LocationType::STACK, 0U, 2U, DataType::Type::INT64}, in TEST_F()
38 {LocationType::STACK, LocationType::REGISTER, 0U, 0U, DataType::Type::INT64}, in TEST_F()
39 {LocationType::STACK, LocationType::REGISTER, 1U, 1U, DataType::Type::INT64}, in TEST_F()
40 {LocationType::STACK, LocationType::REGISTER, 2U, 2U, DataType::Type::INT64}, in TEST_F()
42 {LocationType::STACK, LocationType::REGISTER, 3U, 2U, DataType::Type::INT64}, in TEST_F()
43 {LocationType::STACK, LocationType::STACK, 7U, 9U, DataType::Type::INT64}, in TEST_F()
44 {LocationType::STACK, LocationType::STACK, 8U, 10U, DataType::Type::INT64}}, in TEST_F()
49 {{LocationType::REGISTER, LocationType::STACK, 0U, 2U, DataType::Type::INT64}, in TEST_F()
50 {LocationType::REGISTER, LocationType::STACK, 1U, 0U, DataType::Type::INT64}, in TEST_F()
[all …]
/arkcompiler/runtime_core/static_core/models/thread_pool/
Dthread_pool.tla366 scale_lock_, cond_var_, queue_size_, pc, stack
374 scale_lock_, cond_var_, queue_size_, pc, stack, worker_num_,
398 /\ stack = [self \in ProcSet |-> << >>]
409 cond_var_, queue_size_, stack,
421 queue_size_, stack,
430 … /\ pc' = [pc EXCEPT ![self] = Head(stack[self]).pc]
431 … /\ stack' = [stack EXCEPT ![self] = Tail(stack[self])]
434 stack >>
439 /\ stack' = stack
447 /\ pc' = [pc EXCEPT ![self] = Head(stack[self]).pc]
[all …]
/arkcompiler/runtime_core/static_core/runtime/mem/gc/
Dgc_adaptive_stack.h28 * Adaptive stack with GC workers support.
29 * It will try to pop objects from the source stack and push
30 * it to the destination stack. if the destination stack reaches the limit,
32 * If stack limit is equal to zero, it means that the destination stack is unlimited.
46 * @brief Add new object into destination stack.
47 * If we set the limit for stack, we will create a new task for
53 * @brief Pop an object from source stack.
54 * If the source stack is empty, we will swap it with destination stack
60 * @brief Travers objects in stack via visitor and return marked objects.
61 * Visitor can push in stack, but mustn't pop from it.
[all …]
Dgc_adaptive_marking_stack.h28 * Adaptive stack with GC workers support.
29 * It will try to pop objects from the source stack and push
30 * it to the destination stack. if the destination stack reaches the limit,
32 * If stack limit is equal to zero, it means that the destination stack is unlimited.
49 * @param object object which will be added to the stack
56 * @param object object which will be added to the stack
61 * @brief Travers objects in stack via visitor and return marked objects.
62 * Visitor can push in stack, but mustn't pop from it.
78 GCWorkersTask CreateTask(GCAdaptiveStack<ObjectHeader *> *stack) override;
/arkcompiler/ets_runtime/ecmascript/platform/common/
Dasm_stack.cpp24 // js stack limit in GetAsmStackLimit()
44 LOG_ECMA(ERROR) << "Get current thread stack size failed"; in GetAsmStackLimit()
60 LOG_ECMA(ERROR) << "Get current thread stack size failed"; in GetAsmStackLimit()
72 LOG_ECMA(ERROR) << "Get current thread stack size failed"; in GetAsmStackLimit()
76 …LOG_ECMA(ERROR) << "Get current thread stack size exceed " << JSThread::DEFAULT_MAX_SYSTEM_STACK_S… in GetAsmStackLimit()
86 …LOG_INTERPRETER(DEBUG) << "Current thread stack start: " << reinterpret_cast<void *>(threadStackSt… in GetAsmStackLimit()
87 LOG_INTERPRETER(DEBUG) << "Used stack before js stack start: " in GetAsmStackLimit()
89 … LOG_INTERPRETER(DEBUG) << "Current thread asm stack limit: " << reinterpret_cast<void *>(result); in GetAsmStackLimit()
91 …// To avoid too much times of stack overflow checking, we only check stack overflow before push vr… in GetAsmStackLimit()
92 …// parameters of variable length. So we need a reserved size of stack to make sure stack won't be … in GetAsmStackLimit()
[all …]
/arkcompiler/ets_runtime/common_components/common/
Dmark_work_stack.h36 LOGF_CHECK(!full()) << "Mark stack buffer can not be full when push back"; in push_back()
43 LOGF_CHECK(!empty()) << "Mark stack buffer can not be empty when get back"; in back()
49 LOGF_CHECK(!empty()) << "Mark stack buffer can not be empty when pop back"; in pop_back()
63 MarkStack(MarkStack&& stack) in MarkStack() argument
65 this->h_ = stack.head(); in MarkStack()
66 this->t_ = stack.tail(); in MarkStack()
67 this->s_ = stack.size(); in MarkStack()
68 stack.clean(); in MarkStack()
141 LOGF_CHECK(!empty()) << "Mark stack can not be empty when pop back"; in pop_back()
150 void insert(MarkStack<T>& stack) in insert() argument
[all …]
/arkcompiler/ets_frontend/arkguard/test/grammar/removeComments/
DremoveComments2.d.ts17 * A generic stack class.
18 * @template T - The type of elements in the stack.
20 declare class Stack<T> { class
22 * Constructor for Stack.
27 * Pushes an element onto the stack.
33 * Pops an element from the stack.
39 * Gets the size of the stack.
40 * @returns {number} The size of the stack.
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/12.error_handling/01.errors/
Derror_call_stack.ets17 desc: Verify the name, message, and stack format of the stack.
18 assert: Support column number of stack info, support get error name, message and stack separately.
23 throw new Error('error call stack test');
26 assertEQ(typeof err.stack, 'string');
27 const stackLines = (err.stack as string).split('\n');
/arkcompiler/runtime_core/static_core/runtime/
Ddeoptimization.cpp62 …* Drop means that we set stack pointer to the top of given CFrame, restores its return address and…
86 for (auto stack = StackWalker::Create(thread); stack.HasFrame(); stack.NextFrame()) { in InvalidateCompiledMethod() local
87 if (stack.IsCFrame() && stack.GetMethod() == method) { in InvalidateCompiledMethod()
88 auto &cframe = stack.GetCFrame(); in InvalidateCompiledMethod()
90 cframe.SetDeoptCodeEntry(stack.GetCompiledCodeEntry()); in InvalidateCompiledMethod()
111 …// NOTE(msherstennikov): remove this loop and check `methods` contains frame's method in stack tra… in InvalidateCompiledEntryPoint()
135 void PrevFrameDeopt(FrameKind prevFrameKind, ManagedThread *thread, StackWalker *stack, const uint8… in InvalidateCompiledEntryPoint() argument
142 … pc - stack->GetMethod()->GetInstructions(), events::DeoptimizationAfter::CFRAME); in InvalidateCompiledEntryPoint()
159 stack->GetCalleeRegsForDeoptimize().end()); in InvalidateCompiledEntryPoint()
163 pc - stack->GetMethod()->GetInstructions(), in InvalidateCompiledEntryPoint()
[all …]
Druntime_helpers.cpp30 LOG(ERROR, RUNTIME) << "====================== Stack trace begin ======================"; in PrintStackTrace()
31 for (auto stack = StackWalker::Create(thread); stack.HasFrame(); stack.NextFrame()) { in PrintStackTrace() local
32 Method *method = stack.GetMethod(); in PrintStackTrace()
35 << method->GetLineNumberAndSourceFile(stack.GetBytecodePc()); in PrintStackTrace()
37 LOG(ERROR, RUNTIME) << "====================== Stack trace end ======================"; in PrintStackTrace()
Dexceptions.cpp211 NO_ADDRESS_SANITIZE void DropCFrameIfNecessary(ManagedThread *thread, StackWalker *stack, Frame *or… in DropCFrameIfNecessary() argument
220 DropCompiledFrame(stack); in DropCFrameIfNecessary()
229 DropCompiledFrame(stack); in DropCFrameIfNecessary()
238 DropCompiledFrame(stack); in DropCFrameIfNecessary()
250 NO_ADDRESS_SANITIZE void FindCatchBlockInCFrames(ManagedThread *thread, StackWalker *stack, Frame *… in FindCatchBlockInCFrames() argument
252 auto nextFrame = stack->GetNextFrame(); in FindCatchBlockInCFrames()
253 for (; stack->HasFrame(); stack->NextFrame(), nextFrame = stack->GetNextFrame()) { in FindCatchBlockInCFrames()
254 … LOG(DEBUG, INTEROP) << "Search for the catch block in " << stack->GetMethod()->GetFullName(); in FindCatchBlockInCFrames()
256 auto pc = stack->GetBytecodePc(); in FindCatchBlockInCFrames()
257 auto *method = stack->GetMethod(); in FindCatchBlockInCFrames()
[all …]
/arkcompiler/ets_frontend/arkguard/test/grammar/wildcard_comment/keep_comment2/
Dkeep_all_comment.d.ts17 * A generic stack class.
18 * @template T - The type of elements in the stack.
22 * Constructor for Stack.
27 * Pushes an element onto the stack.
33 * Pops an element from the stack.
39 * Gets the size of the stack.
40 * @returns {number} The size of the stack.
/arkcompiler/ets_frontend/arkguard/test/grammar/wildcard_comment/keep_comment3/
Dkeep_single_comment.d.ts17 * A generic stack class.
18 * @template T - The type of elements in the stack.
22 * Constructor for Stack.
27 * Pushes an element onto the stack.
33 * Pops an element from the stack.
39 * Gets the size of the stack.
40 * @returns {number} The size of the stack.
/arkcompiler/runtime_core/static_core/docs/diagrams/
Dg1-thread-sequence.plantuml20 "GC Thread #1" -> "Task Queue":Marking stack #1
21 "GC Thread #2" <- "Task Queue":Marking stack #1
22 "GC Thread #2" -> "Task Queue":Marking stack #2
23 "GC Thread #3" <- "Task Queue":Marking stack #2
24 "GC Thread #2" -> "Task Queue":Marking stack #X
25 "GC Thread #1" <- "Task Queue":Marking stack #X
/arkcompiler/ets_frontend/es2panda/test/compiler/crashStack/offColumn/js/
Doff-column-callthis.js35 print(e.stack);
42 print(e.stack);
48 print(e.stack);
57 print(e.stack);
64 print(e.stack);
70 print(e.stack);
79 print(e.stack);
86 print(e.stack);
92 print(e.stack);
100 print(e.stack);
[all …]
/arkcompiler/ets_frontend/es2panda/test/compiler/crashStack/enableColumn/js/
Denable-column-callthis.js35 print(e.stack);
42 print(e.stack);
48 print(e.stack);
57 print(e.stack);
64 print(e.stack);
70 print(e.stack);
79 print(e.stack);
86 print(e.stack);
92 print(e.stack);
100 print(e.stack);
[all …]
/arkcompiler/ets_runtime/test/moduletest/stack/
Dstack.js17 * @tc.name:stack
18 * @tc.desc:test Stack
23 var Stack = arkPrivate.Load(arkPrivate.Stack); variable
24 const v1 = new Stack();

12345678910>>...26