/arkcompiler/ets_frontend/es2panda/test/compiler/js/language/arguments-object/ |
D | test-key-named-bound-value.js | 16 let number = { variable 37 print(number[2e3]); // call key 2e3 38 print(number[2000]); // call key 2e3 39 print(number[1000]); 41 print(number[NaN]); 42 print(number[0]); // equal to 0.0 43 print(number[Infinity]); 45 print(number[1e-6]); 46 print(number[0.000001]); 47 print(number[0.000002]); [all …]
|
/arkcompiler/runtime_core/static_core/assembler/ |
D | context.cpp | 30 number = 1; in Make() 34 … token = std::string_view(&*(tokens[number - 1].wholeLine.begin() + tokens[number - 1].boundLeft), in Make() 35 tokens[number - 1].boundRight - tokens[number - 1].boundLeft); in Make() 37 id = this->tokens[number - 1].type; in Make() 100 if (this->tokens.size() > number) { in Next() 101 return this->tokens[number].type; in Next() 104 return this->tokens[number - 1].type; in Next() 128 return this->tokens.size() < number + 1; in NextMask() 136 if (this->tokens.size() > number) { in operator ++() 137 ++number; in operator ++() [all …]
|
/arkcompiler/runtime_core/assembler/ |
D | context.cpp | 30 number = 1; in Make() 34 …token = std::string_view(&*(tokens[number - 1].whole_line.begin() + tokens[number - 1].bound_left), in Make() 35 tokens[number - 1].bound_right - tokens[number - 1].bound_left); in Make() 37 id = this->tokens[number - 1].type; in Make() 100 if (this->tokens.size() > number) { in Next() 101 return this->tokens[number].type; in Next() 104 return this->tokens[number - 1].type; in Next() 128 return this->tokens.size() < number + 1; in NextMask() 136 if (this->tokens.size() > number) { in operator ++() 137 ++number; in operator ++() [all …]
|
/arkcompiler/runtime_core/static_core/plugins/ets/doc/stdlib/packages/ |
D | escompat.rst | 132 at(index\: :kw:`number`)\: T | :kw:`null` 140 …- index\: :kw:`number` Zero-based index of the array element to be returned. Negative index count… 190 |nbsp| target\: :kw:`number`, 191 |nbsp| start\: :kw:`number`, 192 |nbsp| end\: :kw:`number` 201 - target\: :kw:`number` index at which to copy the sequence 202 - start\: :kw:`number` index at which to start copying elements from 203 - end\: :kw:`number` index at which to end copying elements from 211 …copyWithin(target\: :kw:`number`, start\: :kw:`number`)\: :ref:`Array<LeLsLcLoLmLpLaLt.UALrLrLaLy>… 219 - target\: :kw:`number` index at which to copy the sequence [all …]
|
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
D | Math.ets | 26 public static readonly PI: number = 3.141592653589793; 29 * Euler number as double value 31 public static readonly E: number = 2.718281828459045; 36 public static readonly LN10: number = 2.302585092994046; 41 public static readonly LN2: number = 0.6931471805599453; 44 * Logarithm base 2 of Euler number as double value 46 public static readonly LOG2E: number = 1.4426950408889634; 49 * Logarithm base 10 of Euler number as double value 51 public static readonly LOG10E: number = 0.4342944819032518; 56 public static readonly SQRT1_2: number = 0.7071067811865476; [all …]
|
D | TypedUArrays.ets | 43 * @param length size of elements of type number in newly created Uint8ClampedArray 45 public constructor(buf: ArrayBuffer, byteOffset: number, length: number) { 56 * @param length size of elements of type number in newly created Uint8ClampedArray 93 public constructor(buf: ArrayBuffer, byteOffset: number) { 125 public constructor(length: number) { 147 public at(index: number): number { 148 return this.at(index as int) as number 158 /* public */ internal at(index: int): number 174 public copyWithin(insertPos: number, startPos: number, endPos: number): void { 238 public copyWithin(insertPos: number, startPos: number): void { [all …]
|
D | ReadonlyArray.ets | 25 // entries(): IterableIterator<[number, T]>; 27 every(predicate: (value: T, index: number, array: ReadonlyArray<T>) => boolean): boolean; 28 every(predicate: (value: T, index: number) => boolean): boolean; 30 …// every<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thi… 33 filter(predicate: (value: T, index: number, array: ReadonlyArray<T>) => boolean): Array<T>; 34 filter(predicate: (value: T, index: number) => boolean): Array<T>; 36 …// filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, th… 40 find(predicate: (value: T, index: number, obj: ReadonlyArray<T>) => boolean): T | undefined; 41 find(predicate: (value: T, index: number) => boolean): T | undefined; 42 …// find<S extends T>(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisAr… [all …]
|
/arkcompiler/ets_frontend/ets2panda/linter/docs/rules/ |
D | recipe99.md | 19 function foo(x : number, y : number, z : number) { 23 let args : [number, number, number] = [0, 1, 2] 39 function sum_numbers(...numbers: number[]): number { 47 function log_numbers(x : number, y : number, z : number) { 50 let numbers: number[] = [1, 2, 3] 53 let list1 : number[] = [1, 2] 54 let list2 : number[] = [list1[0], list1[1], 3, 4] 57 x: number = 0; y: number = 0 61 x: number = 0; y: number = 0; z: number = 0 62 constructor(p2d: Point2D, z: number) {
|
D | recipe55.md | 18 let a = +5 // 5 as number 19 let b = +"5" // 5 as number 20 let c = -5 // -5 as number 21 let d = -"5" // -5 as number 22 let e = ~5 // -6 as number 23 let f = ~"5" // -6 as number 24 let g = +"string" // NaN as number 34 let x = +returnTen() // -10 as number 44 let a = +5 // 5 as number 46 let c = -5 // -5 as number [all …]
|
/arkcompiler/ets_frontend/ets2panda/linter-4.2/docs/rules/ |
D | recipe99.md | 19 function foo(x : number, y : number, z : number) { 23 let args : [number, number, number] = [0, 1, 2] 39 function sum_numbers(...numbers: number[]): number { 47 function log_numbers(x : number, y : number, z : number) { 50 let numbers: number[] = [1, 2, 3] 53 let list1 : number[] = [1, 2] 54 let list2 : number[] = [list1[0], list1[1], 3, 4] 57 x: number = 0; y: number = 0 61 x: number = 0; y: number = 0; z: number = 0 62 constructor(p2d: Point2D, z: number) {
|
D | recipe55.md | 18 let a = +5 // 5 as number 19 let b = +"5" // 5 as number 20 let c = -5 // -5 as number 21 let d = -"5" // -5 as number 22 let e = ~5 // -6 as number 23 let f = ~"5" // -6 as number 24 let g = +"string" // NaN as number 34 let x = +returnTen() // -10 as number 44 let a = +5 // 5 as number 46 let c = -5 // -5 as number [all …]
|
/arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/utils/ |
D | test_instance_method.j2 | 19 {%- for number in item.init_object_param_list.keys() %} 20 …st TEST_DATA_OBJECT_INIT_{{.number|upper}} : {{.item.init_object_data_types[number]}} = {{.item.in… 25 {%- for number, param in item.param_list.items() %} 26 const TEST_DATA_{{.number|upper}} : {{.item.param_init_data_types[number]}} = {{.item.param_list[nu… 45 {%- for number in item.init_object_param_list.keys() %} 46 {%- if item.init_object_param_nature[number] == "object" %} 47 …let {{.number}} : {{.item.init_object_param_types[number]}} = new {{.item.init_object_param_types[… 49 …let {{.number}} : {{.item.init_object_param_types[number]}} = TEST_DATA_OBJECT_INIT_{{.number|uppe… 56 {%- for number, param in item.param_list.items() %} 57 {%- if item.param_nature[number] == "object" %} [all …]
|
D | test_instance_property.j2 | 19 {%- for number, param in item.param_list.items() %} 20 const TEST_DATA_{{.number|upper}} : {{.item.param_init_data_types[number]}} = {{.item.param_list[nu… 39 {%- for number in item.init_object_param_list.keys() %} 40 {%- if item.init_object_param_nature[number] == "object" %} 41 …let {{.number}} : {{.item.init_object_param_types[number]}} = new {{.item.init_object_param_types[… 43 …let {{.number}} : {{.item.init_object_param_types[number]}} = TEST_DATA_OBJECT_INIT_{{.number|uppe… 50 {%- for number, param in item.param_list.items() %} 51 {%- if item.param_nature[number] == "object" %} 52 …let {{.number}} : {{.item.param_types[number]}} = new {{.item.param_types[number]}}(TEST_DATA_{{.n… 54 let {{.number}} : {{.item.param_types[number]}} = (TEST_DATA_{{.number|upper}}[i]); [all …]
|
D | test_static_method.j2 | 18 {%- for number, param in item.param_list.items() %} 19 const TEST_DATA_{{.number|upper}} : {{.item.param_init_data_types[number]}} = {{.item.param_list[nu… 37 {%- for number, param in item.param_list.items() %} 38 {%- if item.param_nature[number] == "object" %} 39 …let {{.number}} : {{.item.param_types[number]}} = new {{.item.param_types[number]}}(TEST_DATA_{{.n… 41 let {{.number}} : {{.item.param_types[number]}} = TEST_DATA_{{.number|upper}}[i]; 45 {%- for number, param in item.param_list.items() %} 46 // console.print("{{.number}} = " + {{.number}} + ";");
|
/arkcompiler/ets_frontend/arkguard/test/grammar/removeComments/ |
D | removeComments1_expected.txt | 18 * @param {number} a - The first number. 19 * @param {number} b - The second number. 20 * @returns {number} The sum of a and b. 22 function add(a: number, b: number): number; 25 * @param {number} a - The first number. 26 * @param {number} b - The second number. 27 * @returns {number} The product of a and b. 29 function multiply(a: number, b: number): number;
|
D | removeComments5_expected.txt | 20 * @param {number} x - The first number. 21 * @param {number} y - The second number. 22 * @returns {number} The sum of x and y. 24 add(x: number, y: number): number; 33 x: number; 34 y: number;
|
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/helpers/ |
D | ets_intrinsics_helpers.h | 105 inline double PowHelper(uint64_t number, int16_t exponent, uint8_t radix) in PowHelper() argument 114 DoubleValUnion u = {static_cast<double>(number) * std::pow(2.0, expRem)}; in PowHelper() 189 uint64_t number = 0; in Strtod() local 204 if (number < numberMax) { in Strtod() 205 number = number * radix + digit; in Strtod() 212 result = number / std::pow(radix, -exponent); in Strtod() 214 result = number * std::pow(radix, exponent); in Strtod() 217 result = PowHelper(number, exponent, radix); in Strtod() 230 FpType TruncateFp(FpType number) in TruncateFp() argument 233 if (number == 0.0) { in TruncateFp() [all …]
|
/arkcompiler/ets_frontend/ets2panda/test/parser/ets/ |
D | tuple_type_1.ets | 18 function foo(a0: [int, number]): [number, number] { 22 let a: [number, number] = [1, 2]; 24 let c: [number, number, ...number[]] = [1, 2, 3]; 26 let e: [a0: number, a1: number] = [1, 2]; 27 let f: [a0: number, int, a1: number] = [1, 2, 3];
|
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/ |
D | ReflectSet.ets | 27 static axisnum: number = 2 28 x: number 29 y: number 30 constructor (x_: number, y_: number) { 37 static axisnum: number = 3 38 z: number 39 constructor (x_: number, y_: number, z_: number) { 63 result += (Reflect.set(p, "x", 40 as number) == true) ? 0 : 1 64 result += (Reflect.set(p, "y", 50 as number) == true) ? 0 : 1 65 result += (Reflect.set(p, "z", 60 as number) == true) ? 0 : 1 [all …]
|
D | ArrayBufferTest2.ets | 21 …failures += test(sliceArrayBufferNumberNegativeEnd(), "Slice ArrayBuffer with negative end number … 22 …sliceArrayBufferNumberNegativeStart(), "Slice ArrayBuffer with negative start number parameters"); 23 …failures += test(sliceArrayBufferNumberStartExceedsLength(), "Slice ArrayBuffer with start number … 24 …failures += test(sliceArrayBufferNumberEndExceedsLength(), "Slice ArrayBuffer with end number para… 78 * Check slice() method of ArrayBuffer with negative end number parameters 83 let start = 2 as number; 84 let end = -4 as number; 85 if (a.slice(start, 0 as number).byteLength != 2) 88 start = 2 as number; 89 end = -10 as number; [all …]
|
D | ReflectOwnKeys.ets | 26 static axisnum: number = 2 27 x: number 28 y: number 29 constructor (x_: number, y_: number) { 36 static axisnum: number = 3 37 z: number 38 constructor (x_: number, y_: number, z_: number) { 69 let arr: number[] = [10, 20, 30] 74 let lambda: (a: number) => number = (a: number): number => {
|
D | ReflectHas.ets | 25 static axisnum: number = 2 26 x: number 27 y: number 28 constructor (x_: number, y_: number) { 35 static axisnum: number = 3 36 z: number 37 constructor (x_: number, y_: number, z_: number) { 59 let arr: number[] = [10, 20, 30] 64 let lambda: (a: number) => number = (a: number): number => {
|
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/declgen_ets2ts/ |
D | lib1.expected | 26 function SumDouble(a: number, b: number): number { return {} as any; }; 32 function SumBoxedDouble(a: number, b: number): number { return {} as any; }; 50 function ForEach<T extends Object>(a: T[], cb: (e: T, idx: number) => void): void { return {} as an… 62 function AsyncIdentity(param: number): Promise<number> { return {} as any; }; 68 function AsyncIdentity$asyncimpl(param: number): any { return {} as any; }; 76 public static staticFloat_: number = {} as any; 77 public double_: number = {} as any; 78 public doubleAlias_: number = {} as any; 79 public int_: number = {} as any; 96 public static StaticSumDouble(a: number, b: number): number { return {} as any; }; [all …]
|
/arkcompiler/ets_frontend/ets2panda/test/compiler/ets/ |
D | tuple_types_1.ets | 19 type num_str_str_type = [number, string, string]; 20 type num_str_str_with_spread = [num_str_str_type, ...number[]]; 22 function foo(a0: number, args: [...number[]]): number { 62 let num_tup: [number, number] = [11,2]; 63 let num_prim_arr: number[] = [3,4]; 67 let d_var: [number, string] = [1, "A"]; 68 let e_var: [number, string, boolean] = [1, "A", true]; 69 let f_var: [number, string, boolean, number, string]; 72 let g_var: [number, string][]; 75 let h_var: [number, int, string, boolean, Object] = [1, 2, "asd", false, new Object()]; [all …]
|
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/spec/unions/ |
D | union_compare_04.ets | 22 type Margin = number | string 29 assert (a as number) < b as number 30 assert b as number > a as number 33 assert a as number <= c as number 34 assert c as number >= a as number
|