| /arkcompiler/runtime_core/static_core/plugins/ets/templates/stdlib/ |
| D | typedUArray.sts.j2 | 24 {%- for element in [{'name': 'Uint8Clamped', 'subsetType': 'number', 'subsetTypeValues': 'Number', … 29 …element.update({'subsetTypeBoxed': element['subsetType'][0].upper() + element['subsetType'][1:], … 30 …{%- set asElementCompat = ('%s as ' + element['subsetType']) if element['subsetType'] != 'BigInt' … 31 …{%- set fromElementCompat = ('%s as ' + element['primitiveType']) if element['subsetType'] != 'Big… 32 …{%- set numberBigIntToPrimitive = ('.' + element['primitiveType'] + 'Value()') if element['subsetT… 34 …{%- set isNonCompat = '/* public */ internal' if element['subsetType'] != 'BigInt' else 'private' … 35 …{%- set valueOrBigIntGetULong = '%s' if element['subsetType'] != 'BigInt' else 'new BigInt(%s).get… 36 …{%- set asElementCompatOrBigInt = ('%s as ' + element['primitiveType']) if element['subsetType'] !… 38 class {{element['name']}}ArrayIteratorKeys implements IterableIterator<number> { 42 constructor(parent: {{element['name']}}Array) { [all …]
|
| D | Array_builtin_algorithms.sts.j2 | 36 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 74 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 89 …* Upper bound is an index of a first element, where (key < element) is true. If no such element is… 127 …* Upper bound is an index of a first element, where (key < element) is true. If no such element is… 142 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 180 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 195 …* Upper bound is an index of a first element, where (key < element) is true. If no such element is… 233 …* Upper bound is an index of a first element, where (key < element) is true. If no such element is…
|
| /arkcompiler/ets_runtime/test/moduletest/arrayfindlast/ |
| D | arrayfindlast.js | 25 result = arr.findLast((element, index, array) => { 27 return (element == 5); 30 result = arr.findLast((element) => { 31 return element > 2; 35 result = arr.findLastIndex((element, index, array) => { 39 return (element == 100); 42 result = arr.findLastIndex((element, index, array) => { 43 return (element == 100); 48 result = arr2.findLast((element, index, array) => { 49 return (element == undefined); [all …]
|
| /arkcompiler/ets_frontend/es2panda/compiler/base/ |
| D | destructuring.cpp | 43 // create left reference for rest element in GenRestElement() 83 for (const auto *element : array->Elements()) { in GenArray() local 86 if (element->IsRestElement()) { in GenArray() 87 GenRestElement(pg, element->AsRestElement(), iterator, array->IsDeclaration()); in GenArray() 92 if (element->IsOmittedExpression()) { in GenArray() 98 const ir::Expression *target = element; in GenArray() 100 if (element->IsAssignmentPattern() || element->IsAssignmentExpression()) { in GenArray() 101 auto *assignment = element->IsAssignmentPattern() ? element->AsAssignmentPattern() : in GenArray() 102 element->AsAssignmentExpression(); in GenArray() 113 pg->BranchIfStrictUndefined(element, defaultInit); in GenArray() [all …]
|
| D | literals.cpp | 45 for (const auto *element : templateLit->Quasis()) { in GetTemplateObject() local 46 pg->LoadAccumulatorInt(element, elemIndex); in GetTemplateObject() 47 pg->StoreAccumulator(element, indexReg); in GetTemplateObject() 49 pg->LoadAccumulatorString(element, element->Raw()); in GetTemplateObject() 50 pg->DefineFieldByValue(element, rawArr, indexReg); in GetTemplateObject() 51 // Generate ldundefined when element is escape error in GetTemplateObject() 52 if (element->EscapeError()) { in GetTemplateObject() 53 pg->LoadConst(element, compiler::Constant::JS_UNDEFINED); in GetTemplateObject() 55 pg->LoadAccumulatorString(element, element->Cooked()); in GetTemplateObject() 57 pg->DefineFieldByValue(element, cookedArr, indexReg); in GetTemplateObject()
|
| /arkcompiler/ets_frontend/ets2panda/compiler/base/ |
| D | destructuring.cpp | 42 // create left reference for rest element in GenRestElement() 73 for (const auto *element : array->Elements()) { in GenElement() local 76 if (element->IsRestElement()) { in GenElement() 77 GenRestElement(pg, element->AsRestElement(), iterator, array->IsDeclaration()); in GenElement() 82 if (element->IsOmittedExpression()) { in GenElement() 88 const ir::Expression *target = element; in GenElement() 90 if (element->IsAssignmentPattern()) { in GenElement() 91 target = element->AsAssignmentPattern()->Left(); in GenElement() 92 init = element->AsAssignmentPattern()->Right(); in GenElement() 101 pg->BranchIfUndefined(element, defaultInit); in GenElement() [all …]
|
| D | literals.cpp | 42 for (const auto *element : templateLit->Quasis()) { in GetTemplateObject() local 43 pg->LoadAccumulatorInt(element, elemIndex); in GetTemplateObject() 44 pg->StoreAccumulator(element, indexReg); in GetTemplateObject() 46 pg->LoadAccumulatorString(element, element->Raw()); in GetTemplateObject() 47 pg->StoreObjByValue(element, rawArr, indexReg); in GetTemplateObject() 49 pg->LoadAccumulatorString(element, element->Cooked()); in GetTemplateObject() 50 pg->StoreObjByValue(element, cookedArr, indexReg); in GetTemplateObject()
|
| /arkcompiler/ets_runtime/test/moduletest/typedarrayfindlast/ |
| D | typedarrayfindlast.js | 50 let result1 = obj.findLast((element, index, array) => { 51 return (element == 12); 54 result1 = obj.findLast((element, index, array) => { 55 return (element < 10); 58 result1 = obj.findLastIndex((element, index, array) => { 62 return (element == 100); 65 result1 = obj.findLastIndex((element, index, array) => { 66 return (element == 100); 80 let result1 = obj.findLast((element, index, array) => { 81 return (element == 12n); [all …]
|
| /arkcompiler/runtime_core/libpandabase/utils/ |
| D | ring_buffer.h | 145 * Appends the given element value to the end of the ring buffer 146 * @param value the value of the element to append 155 * Moves the given element value to the end of the ring buffer 156 * @param value the value of the element to append 164 * Appends a new element to the end of the ring buffer 167 * @param args arguments to forward to the constructor of the element 168 * @return a reference to the inserted element 179 * Appends the given element value to the begin of the ring buffer 180 * @param value the value of the element to append 189 * Moves the given element value to the begin of the ring buffer [all …]
|
| /arkcompiler/runtime_core/static_core/libpandabase/utils/ |
| D | ring_buffer.h | 149 * Appends the given element value to the end of the ring buffer 150 * @param value the value of the element to append 159 * Moves the given element value to the end of the ring buffer 160 * @param value the value of the element to append 168 * Appends a new element to the end of the ring buffer 171 * @param args arguments to forward to the constructor of the element 172 * @return a reference to the inserted element 183 * Appends the given element value to the begin of the ring buffer 184 * @param value the value of the element to append 193 * Moves the given element value to the begin of the ring buffer [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/include/ |
| D | histogram-inl.h | 46 void SimpleHistogram<Value>::AddValue(const Value &element, size_t number) in AddValue() argument 48 sum_ += element * Value(number); in AddValue() 49 sumOfSquares_ += element * element * Value(number); in AddValue() 51 min_ = element; in AddValue() 52 max_ = element; in AddValue() 54 min_ = std::min(min_, element); in AddValue() 55 max_ = std::max(max_, element); in AddValue() 89 void Histogram<Value>::AddValue(const Value &element, size_t number) in AddValue() argument 91 frequency_[element] += number; in AddValue() 92 SimpleHistogram<Value>::AddValue(element, number); in AddValue()
|
| /arkcompiler/ets_runtime/test/moduletest/arrayFindIndexCase/ |
| D | findIndex.js | 24 const isLargeNumber = (element) => element > 13; argument 35 function isPrime(element) { argument 36 if (element % 2 === 0 || element < 2) { 39 for (let factor = 3; factor <= Math.sqrt(element); factor += 2) { 40 if (element % factor === 0) { 64 const hasFirst = (element) => element == "first"; argument
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/ |
| D | BuiltinArray.sts | 82 * @param index Zero-based index of the array element to be returned. 85 * @returns The element in the array matching the given index. 132 * @param index Zero-based index of the array element to be returned. 135 * @returns The element in the array matching the given index. 274 * Returns the value of the first element in the array where predicate is true, and undefined 277 * @param predicate find calls predicate once for each element of the array, in ascending 278 * order, until it finds one where predicate returns true. If such an element is found, find 279 * immediately returns that element value. Otherwise, find returns undefined. 281 * @returns the value of the first element in the array or undefined 292 * Returns the index of the first element in the array where predicate is true, and -1 [all …]
|
| D | BuiltinArrayAlgorithms.sts | 32 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 70 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 85 …* Upper bound is an index of a first element, where (key < element) is true. If no such element is… 123 …* Upper bound is an index of a first element, where (key < element) is true. If no such element is… 198 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 236 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 251 …* Upper bound is an index of a first element, where (key < element) is true. If no such element is… 289 …* Upper bound is an index of a first element, where (key < element) is true. If no such element is… 364 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… 402 …* Lower bound is an index of a first element, where (element < key) is false. If no such element i… [all …]
|
| /arkcompiler/ets_runtime/test/aottest/array_foreach_inline/ |
| D | array_foreach_inline.ts | 18 array1.forEach((element) => { 19 print(element) 22 array1.forEach((element) => { 24 print(element) 27 array1.forEach((element) => { 29 print(element)
|
| /arkcompiler/runtime_core/static_core/runtime/ |
| D | compiler_queue_counter_priority.h | 96 auto element = queue_.back(); in GetTask() local 97 auto task = std::move(element->GetContext()); in GetTask() 99 allocator_->Delete(element); in GetTask() 119 …LOG(DEBUG, COMPILATION_QUEUE) << "Add an element to a " << queueName_ << ": " << GetTaskDescriptio… 120 auto element = allocator_->New<CompilationQueueElement>(std::move(ctx)); variable 122 queue_.push_back(element); 140 virtual bool UpdateCounterAndCheck(CompilationQueueElement *element) in UpdateCounterAndCheck() argument 143 element->UpdateCounter(element->GetContext().GetMethod()->GetHotnessCounter()); in UpdateCounterAndCheck() 145 return (curStamp - element->GetTimestamp() >= taskLifeSpan_); in UpdateCounterAndCheck() 178 auto element = *it; in UpdateQueue() local [all …]
|
| /arkcompiler/ets_runtime/test/moduletest/arrayfindlastindex/ |
| D | arrayfindlastindex.js | 33 function testFunction(element, index, array) { argument 37 return element < 1; 50 function fun1(element) { argument 51 return element === 1; 60 function func2(element, index, arr) { argument 61 return element === 6; 67 function func3(element, index, arr) { argument 69 return element === 100;
|
| /arkcompiler/ets_runtime/test/moduletest/arrayflatmap/ |
| D | arrayflatmap.js | 29 function testFunction(element, index, array) { argument 33 return [element, element * element]; 47 function testFunction(element, index, array) { 54 return [element, element * element];
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
| D | TypedUArrays.sts | 399 * Assigns val as element on index. 410 * Assigns val as element on index. 425 * Assigns val as element on index. 436 * Assigns val as element on index. 704 * Assigns val as element on index. 715 * Assigns val as element on index. 726 * Assigns val as element on index. 737 * Assigns val as element on index. 891 * @param mapfn A mapping function to call on every element of the array. 928 * @param mapfn A mapping function to call on every element of the array. [all …]
|
| D | Array.sts | 181 * @param mapfn a mapping function to call on every element of the array. 373 * Removes the first element from an array and returns that removed element. 376 * @returns shifted element, i.e. that was at index zero 390 * Removes the last element from an array and returns that element. 393 * @returns removed element 506 … * @returns an Array with deleted elements from start to the last element of the current instance 518 … * @returns an Array with deleted elements from start to the last element of the current instance 597 …e arguments. The filter method calls the predicate function one time for each element in the array. 697 * @param index Zero-based index of the array element to be returned. 700 * @returns The element in the array matching the given index. [all …]
|
| D | TypedArrays.sts | 342 * Assigns val as element on index. 353 * Assigns val as element on index. 369 * Assigns val as element on index. 380 * Assigns val as element on index. 396 * Assigns val as element on index. 407 * Assigns val as element on index. 741 * Assigns val as element on insertPos. 753 * Assigns val as element on insertPos. 912 * @param mapfn A mapping function to call on every element of the array. 950 * @param mapfn A mapping function to call on every element of the array. [all …]
|
| /arkcompiler/ets_frontend/arkguard/test/grammar/wildcard_comment/keep_comment2/ |
| D | keep_all_comment.d.ts | 27 * Pushes an element onto the stack. 28 * @param {T} element - The element to push. 30 push(element: T): void; 33 * Pops an element from the stack. 34 * @returns {T} The popped element.
|
| D | keep_all_comment_expected.txt | 22 * Pushes an element onto the stack. 23 * @param {T} element - The element to push. 25 push(element: T): void; 27 * Pops an element from the stack. 28 * @returns {T} The popped element.
|
| /arkcompiler/ets_frontend/arkguard/test/grammar/wildcard_comment/keep_comment3/ |
| D | keep_single_comment.d.ts | 27 * Pushes an element onto the stack. 28 * @param {T} element - The element to push. 30 B(element: T): void; 33 * Pops an element from the stack. 34 * @returns {T} The popped element.
|
| /arkcompiler/ets_frontend/arkguard/test/grammar/removeComments/ |
| D | removeComments2.d.ts | 27 * Pushes an element onto the stack. 28 * @param {T} element - The element to push. 30 push(element: T): void; 33 * Pops an element from the stack. 34 * @returns {T} The popped element.
|