| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/33.constant_expression/check_array/ |
| D | constant_calculation.params.yaml | 6 # http://www.apache.org/licenses/LICENSE-2.0 13 --- 15 - { type: byte, value: 26, sign: '*', expected: 260 } 16 - { type: byte, value: 26, sign: '/', expected: 2 } 17 - { type: byte, value: 26, sign: '%', expected: 6 } 18 - { type: byte, value: 26, sign: '+', expected: 36 } 19 - { type: byte, value: 26, sign: '-', expected: 16 } 21 - { type: short, value: 26, sign: '*', expected: 260 } 22 - { type: short, value: 260, sign: '/', expected: 26 } 23 - { type: short, value: 260, sign: '%', expected: 0 } [all …]
|
| D | constant_shift.params.yaml | 6 # http://www.apache.org/licenses/LICENSE-2.0 13 --- 15 - { type: byte, value: 10, sign: '<<', expected: 80 } 16 - { type: byte, value: 10, sign: '>>', expected: 1 } 17 - { type: byte, value: 10, sign: '>>>', expected: 1 } 19 - { type: short, value: 20, sign: '<<', expected: 160 } 20 - { type: short, value: 20, sign: '>>', expected: 2 } 21 - { type: short, value: 20, sign: '>>>', expected: 2 } 23 - { type: char, value: c'p', sign: '<<', expected: 896 } 24 - { type: char, value: c'p', sign: '>>', expected: 14 } [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/33.constant_expression/check_enum/ |
| D | constant_calculation.params.yaml | 6 # http://www.apache.org/licenses/LICENSE-2.0 13 --- 15 - { type: byte, value: 26, sign: '*', expected: 260 } 16 - { type: byte, value: 26, sign: '/', expected: 2 } 17 - { type: byte, value: 26, sign: '%', expected: 6 } 18 - { type: byte, value: 26, sign: '+', expected: 36 } 19 - { type: byte, value: 26, sign: '-', expected: 16 } 21 - { type: short, value: 260, sign: '*', expected: 2600 } 22 - { type: short, value: 260, sign: '/', expected: 26 } 23 - { type: short, value: 260, sign: '%', expected: 0 } [all …]
|
| D | constant_shift.params.yaml | 6 # http://www.apache.org/licenses/LICENSE-2.0 13 --- 15 - { type: byte, value: 3, sign: '<<', expected: 24 } 16 - { type: byte, value: 26, sign: '>>', expected: 3 } 17 - { type: byte, value: 26, sign: '>>>', expected: 3 } 18 - { type: byte, value: -3, sign: '<<', expected: -24 } 19 - { type: byte, value: -26, sign: '>>', expected: -4 } 20 - { type: byte, value: -26, sign: '>>>', expected: 536870908 } 22 - { type: short, value: 8, sign: '<<', expected: 64 } 23 - { type: short, value: 260, sign: '>>', expected: 32 } [all …]
|
| /arkcompiler/ets_runtime/test/aottest/builtin_inlining/math/Sign/ |
| D | builtinMathSign.ts | 7 * http://www.apache.org/licenses/LICENSE-2.0 26 //aot: [trace] aot inline builtin: Math.sign, caller function name:func_main_0@builtinMathSign 27 print(Math.sign(3, -0.12)) //: 1 28 //aot: [trace] aot inline builtin: Math.sign, caller function name:func_main_0@builtinMathSign 29 print(Math.sign(-3, 0.12)) //: -1 30 //aot: [trace] aot inline builtin: Math.sign, caller function name:func_main_0@builtinMathSign 31 print(Math.sign(-3, 0.12, -0.0)) //: -1 32 //aot: [trace] aot inline builtin: Math.sign, caller function name:func_main_0@builtinMathSign 33 print(Math.sign(-4, 0.12, -0.0, 0.0)) //: -1 35 //aot: [trace] aot inline builtin: Math.sign, caller function name:func_main_0@builtinMathSign [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/33.constant_expression/check_annotation/ |
| D | constant_unary_operation.params.yaml | 6 # http://www.apache.org/licenses/LICENSE-2.0 13 --- 15 - { type: byte, value: 16, sign: '+' } 16 - { type: short, value: 300, sign: '+' } 17 - { type: char, value: c'p', sign: '+' } 18 - { type: int, value: 3000, sign: '+' } 19 - { type: long, value: 50000, sign: '+' } 20 - { type: float, value: 120.2f, sign: '+', asInt: ' as int' } 21 - { type: number, value: 5050.9, sign: '+', asInt: ' as int' } 23 - { type: byte, value: 16, sign: '-' } [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_util/include/ |
| D | mpl_int_val.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 23 …f this class provides different operations on signed and unsigned integers with arbitrary bit-width 26 /// @brief create zero value with zero bit-width 27 IntVal() : value(0), width(0), sign(false) {} in IntVal() 29 IntVal(uint64 val, uint8 bitWidth, bool isSigned) : value(val), width(bitWidth), sign(isSigned) in IntVal() 31 DEBUG_ASSERT(width <= valBitSize && width != 0, "bit-width is too wide"); in IntVal() 40 IntVal(const IntVal &val) : IntVal(val.value, val.width, val.sign) {} in IntVal() 51 // Allow 'this' to be assigned with new bit-width and sign iff 52 // its original bit-width is zero (i.e. the value was created by the default ctor) 55 // Otherwise, assign only new value, but sign and width must be the same [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/arkts/@arkts/math/Decimal/ |
| D | signTests.ets | 7 * http://www.apache.org/licenses/LICENSE-2.0 25 arktest.assertEQ(Decimal.sign(Infinity), 1); 26 arktest.assertEQ(Decimal.sign(-Infinity), -1); 27 arktest.assertEQ(Decimal.sign('Infinity'), 1); 28 arktest.assertEQ(Decimal.sign('-Infinity'), -1); 30 arktest.assertTrue(Number.isNaN(Decimal.sign(NaN))); 31 arktest.assertTrue(Number.isNaN(Decimal.sign('NaN'))); 32 arktest.assertTrue(1 / Decimal.sign('0') === Infinity); 33 arktest.assertTrue(1 / Decimal.sign(new Decimal('0')) === Infinity); 34 arktest.assertTrue(1 / Decimal.sign('-0') === -Infinity); [all …]
|
| /arkcompiler/runtime_core/static_core/verification/ |
| D | verification.yaml | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 23 … protected_method: Call to protected methods from non-descendants of object class is prohibited. 24 protected_class: Access to package-private class is prohibited. 25 package_method: Call to protected methods from non-descendants of object class is prohibited. 31 sign: Sign mismatch. Possible overflow/underflow issues and other quirks in data-flow. 33 sign_size: Sign and size mismatch. Possible overflow/underflow and truncation issues. 34 … precision: Precision mismatch. Possible overflow/underflow issues and other quirks in data-flow. 40 - same 41 - descendant [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/runtime/tooling/sampler/sampler_ani/ |
| D | create_vm_sampler.ets | 2 * Copyright (c) 2023-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 28 if (Absolute(res - pi) > 0.0001) { 33 if (Absolute(res - pi) > 0.0001) { 38 if (Absolute(res - pi) > 0.0001) { 43 if (Absolute(res - pi) > 0.0001) { 53 return val *= -1; 75 let sign: int = 1; 77 ret += sign / (2.0 * i + 1); 78 sign *= -1; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/runtime/tooling/sampler/managed/ |
| D | SamplerTest.ets | 2 * Copyright (c) 2023-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 34 if (Absolute(res - pi) > 0.0001) { 39 if (Absolute(res - pi) > 0.0001) { 44 if (Absolute(res - pi) > 0.0001) { 49 if (Absolute(res - pi) > 0.0001) { 59 return val *= -1; 81 let sign: int = 1; 83 ret += sign / (2.0 * i + 1); 84 sign *= -1; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/03.casting_conversions_from_object/ |
| D | func_type_from_object.params.yaml | 6 # http://www.apache.org/licenses/LICENSE-2.0 13 --- 15 - fType: '(a: int, b: int) => int' 17 sign: '(a: int, b: int): int' 20 - fType: '(a: string, b: int) => string' 22 sign: '(a, b: int): string' 25 - fType: '[]' 27 sign: '(a: int, b: int): int' 30 - fType: '[]' 32 sign: '(a: string, b: int): string' [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/debugger/src/tests/ |
| D | test_profiler.py | 2 # -*- coding: utf-8 -*- 9 # http://www.apache.org/licenses/LICENSE-2.0 30 let sign: int = 1; 32 ret += sign / (2.0 * i + 1); 33 sign *= -1; 38 let sign: int = 1; 40 ret += sign / (2.0 * i + 1); 41 sign *= -1; 49 signNum *= -1; 54 signNum *= -1; [all …]
|
| /arkcompiler/ets_runtime/ecmascript/base/ |
| D | number_helper.cpp | 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 26 #include "ecmascript/ecma_string-inl.h" 29 #include "ecmascript/js_tagged_value-inl.h" 34 enum class Sign { NONE, NEG, POS }; enum 36 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 42 constexpr char CHARS[] = "0123456789abcdefghijklmnopqrstuvwxyz"; // NOLINT (modernize-avoid-c-arra… 73 const CString NumberHelper::MINUS_INFINITY_STR = "-Infinity"; 79 return c - '0'; in ToDigit() 82 return c - 'A' + DECIMAL; in ToDigit() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/arkts_header/ |
| D | header_writer.cpp | 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 18 #include "libpandafile/file-inl.h" 19 #include "libpandafile/proto_data_accessor-inl.h" 50 auto classesSpan = inputFile_->GetClasses(); in PrintFunction() 52 if (inputFile_->IsExternal(panda_file::File::EntityId(id))) { in PrintFunction() 70 className = className.substr(1, className.size() - 2U); in PrintFunction() 94 …riter::ProcessProtoType(panda_file::Type type, panda_file::File::EntityId klass, std::string &sign, in ProcessProtoType() argument 98 sign.append(panda_file::Type::GetSignatureByTypeId(type)); in ProcessProtoType() 101 std::string name = utf::Mutf8AsCString(inputFile_->GetStringData(klass).data); in ProcessProtoType() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
| D | BigInt.ets | 2 * Copyright (c) 2021-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 55 private readonly sign: int 59 private static readonly maskSys: long = BigInt.baseSys - (1 as long) 70 internal static fromLongHelper(val: long, bitLen: int, sign: int): FixedArray<int> { 73 let size: int = ((bitLen + BigInt.shiftSys - 1) / BigInt.shiftSys).toInt() 82 if (sign < 0) { 95 this.sign = d < 0 ? -1 : (d == 0 ? 0 : 1) 96 …this.bytes = this.sign == 0 ? [] as FixedArray<int> : BigInt.fromLongHelper(d.toLong(), 8, this.si… 100 this.sign = d < 0 ? -1 : (d == 0 ? 0 : 1) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/helpers/ |
| D | ets_intrinsics_helpers.cpp | 2 * Copyright (c) 2021-2025 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 25 // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) 56 if (!undefinedExponent && (*p == '+' || *p == '-')) { in ParseExponent() 78 if (exponentSign == '-') { in ParseExponent() 79 return {-additionalExponent, p, true}; in ParseExponent() 86 // CC-OFFNXT(G.FUN.01-CPP,huge_cyclomatic_complexity[C++],huge_method[C++]) solid logic 87 // CC-OFFNXT(huge_cca_cyclomatic_complexity[C++]) solid logic 103 // 2. get number sign in StringToDouble() 104 Sign sign = Sign::NONE; in StringToDouble() local [all …]
|
| /arkcompiler/runtime_core/tests/cts-generator/cts-template/ |
| D | fsub2.yaml | 1 # Copyright (c) 2021-2022 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 16 - file-name: "fsub2" 18 title: Two address floating-point binary operation on accumulator 20 …Perform specified floating-point binary operation on accumulator and register and store result int… 21 The results of instructions correspond IEEE-754 arithmetic rules. 23 - x_none 25 - file-name: "op_vs_8_nan" 28 - sig: fsub2 v:in:f32 32 check-type: check-acc-nan-f32 [all …]
|
| D | fadd2.yaml | 1 # Copyright (c) 2021-2022 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 16 - file-name: "fadd2" 18 title: Two address floating-point binary operation on accumulator 20 …Perform specified floating-point binary operation on accumulator and register and store result int… 21 The results of instructions correspond IEEE-754 arithmetic rules. 23 - x_none 25 - file-name: "op_vs_8_nan" 28 - sig: fadd2 v:in:f32 32 check-type: check-acc-nan-f32 [all …]
|
| D | fsub2.64.yaml | 1 # Copyright (c) 2021-2022 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 16 - file-name: "fsub2.64" 18 title: Two address floating-point binary operation on accumulator 20 …Perform specified floating-point binary operation on accumulator and register and store result int… 21 The results of instructions correspond IEEE-754 arithmetic rules. 23 - x_none 25 - file-name: "op_vs_8_nan" 28 - sig: fsub2.64 v:in:f64 32 check-type: check-acc-nan-f64 [all …]
|
| /arkcompiler/runtime_core/static_core/tests/cts-generator/cts-template/ |
| D | fsub2.yaml | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 16 - file-name: "fsub2" 18 title: Two address floating-point binary operation on accumulator 20 …Perform specified floating-point binary operation on accumulator and register and store result int… 21 The results of instructions correspond IEEE-754 arithmetic rules. 23 - x_none 25 - file-name: "op_vs_8_nan" 28 - sig: fsub2 v:in:f32 32 check-type: check-acc-nan-f32 [all …]
|
| D | fadd2.yaml | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 16 - file-name: "fadd2" 18 title: Two address floating-point binary operation on accumulator 20 …Perform specified floating-point binary operation on accumulator and register and store result int… 21 The results of instructions correspond IEEE-754 arithmetic rules. 23 - x_none 25 - file-name: "op_vs_8_nan" 28 - sig: fadd2 v:in:f32 32 check-type: check-acc-nan-f32 [all …]
|
| D | fsub2.64.yaml | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 16 - file-name: "fsub2.64" 18 title: Two address floating-point binary operation on accumulator 20 …Perform specified floating-point binary operation on accumulator and register and store result int… 21 The results of instructions correspond IEEE-754 arithmetic rules. 23 - x_none 25 - file-name: "op_vs_8_nan" 28 - sig: fsub2.64 v:in:f64 32 check-type: check-acc-nan-f64 [all …]
|
| D | fadd2.64.yaml | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 16 - file-name: "fadd2.64" 18 title: Two address floating-point binary operation on accumulator 20 …Perform specified floating-point binary operation on accumulator and register and store result int… 21 The results of instructions correspond IEEE-754 arithmetic rules. 23 - x_none 25 - file-name: "op_vs_8_nan" 28 - sig: fadd2.64 v:in:f64 32 check-type: check-acc-nan-f64 [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/02.lexical_elements/06.identifiers/ |
| D | identifiers.params.yaml | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 14 --- # List of possible ident start symbols 16 - '$' 17 - '_' 20 - 'ѩ' # Cyrillic Small Letter Iotified Little Yus, U+0469 21 - '\uFB17' # Armenian Small Ligature Men Xeh 22 - 'я' # Cyrillic Small Letter Ya, U+044F 23 - 'î' # Latin Small Letter I with Circumflex, U+00EE 26 - 'Ǣ' # Latin Capital Letter Ae with Macron, U+01E2 [all …]
|