| /arkcompiler/runtime_core/static_core/compiler/docs/ |
| D | constant_folding_doc.md | 1 # Constant Folding 3 **Constant folding** - optimization which calculate instructions with constant inputs in compile ti… 13 If instruction have constant inputs, new constant is calculate and input of user of original instru… 15 Constant folding is called in Peephole optimization. 21 Putting new constant in inputs of inst users. 26 Before constant folding: 28 1.i64 Constant 1 -> v3 29 2.i64 Constant 2 -> v3 34 After constant folding: 36 1.i64 Constant 1 [all …]
|
| D | peephole_doc.md | 22 * Constant folding 23 * Partial constant instruction replace by constant (a *= 0 -> a = 0) 24 * Putting constant input on second place for commutative instructions (ex. Add, Mul, ...) 41 3.i64 Constant -1 -> v10 // -1 42 4.i64 Constant 1 -> v6, v7 // 1 43 5.i64 Constant 2 -> v8 // 2 56 3.i64 Constant -1 -> v10 // -1 57 4.i64 Constant 1 -> v6, v7 // 1 58 5.i64 Constant 2 -> v8, v12 // 2 78 [constant folding](constant_folding_doc.md)
|
| D | deoptimize_elimination_doc.md | 20 If input of `DeoptimizeIf` is constant: 21 * Constant is equal 0 -> `DeoptimizeIf` is replaced by `NOP`. 22 * Other constant -> `DeoptimizeIf` is replaced by `Deoptimize` instruction. 37 1. Constant 0 38 2. Constant 1 54 1. Constant 0 55 2. Constant 1
|
| D | reserve_sb_buffer_doc.md | 39 replace initial StringBuilder.buf size constant to count 70 2.i64 Constant 0x3e 71 3.i64 Constant 0x0 72 23.i64 Constant 0x1 94 2.i64 Constant 0x3e 95 3.i64 Constant 0x0 96 23.i64 Constant 0x1 97 118.i64 Constant 0x40 98 141.i64 Constant 0x2 99 142.i64 Constant 0x4 [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/doc/spec/ |
| D | 11_enums.rst | 44 constant 45 named constant 54 Qualification by type is mandatory to access the enumeration constant, except 55 enumeration constant initialization expressions: 80 enumeration constant 82 enum constant 85 The value of an enum constant can be set as follows: 87 - Explicitly to a numeric constant expression (expression of type ``int`` or 88 ``long`` ) or to a constant expression of type ``string``; or 89 - Implicitly by omitting the constant expression. [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/10.interfaces/07.interface_inheritance/multi_layer_interface/complex_inheritance/ |
| D | complex_inheritance_14.ets | 17 desc: The combination of test method overriding and constant access. 21 readonly CONSTANT: string; 23 return "Constant from interface"; 28 static readonly CONSTANT = "Constant from A"; 29 readonly CONSTANT = "Constant from A"; 36 static readonly CONSTANT = "Constant from B"; 45 assertEQ(b.CONSTANT, "Constant from A"); 46 assertEQ(B.CONSTANT, "Constant from B");
|
| D | complex_inheritance_12.ets | 21 readonly CONSTANT: string; 25 static readonly CONSTANT = "Constant from A"; 26 readonly CONSTANT: string = "Constant from interface A"; 30 static readonly CONSTANT = "Constant from B"; 31 readonly CONSTANT: string = "Constant from interface B"; 35 assertEQ(B.CONSTANT, "Constant from B");
|
| D | complex_inheritance_31.ets | 17 desc: Constant access test under complex inheritance. 30 static readonly GRANDPARENT_CONST = "GrandParent Constant"; 31 static readonly OVERRIDE_CONST = "GrandParent Override Constant"; 32 readonly INTERFACR_CONST: string = "Interface Constant"; 33 readonly OVERRIDE_CONST: string = "Override Constant"; 37 static readonly PARENT_CONST = "Parent Constant"; 38 static readonly OVERRIDE_CONST = "Parent Override Constant"; 42 static readonly CHILD_CONST = "Child Constant"; 46 assertEQ(Child.CHILD_CONST, "Child Constant"); 47 assertEQ(Child.OVERRIDE_CONST, "Parent Override Constant"); [all …]
|
| D | complex_inheritance_13.ets | 21 readonly CONSTANT: string; 25 static readonly CONSTANT: string = "Constant from A"; 29 static readonly CONSTANT: string = "Constant from B"; 33 readonly CONSTANT: string = "Constant from interface C"; 37 assertEQ(C.CONSTANT, "Constant from B"); 40 assertEQ(c.CONSTANT, "Constant from interface C");
|
| D | complex_inheritance_15.ets | 17 desc: The combination of test method overriding and constant access. 21 static readonly CONSTANT = "Constant from A"; 25 static readonly CONSTANT = "Constant from B"; 29 readonly CONSTANT: string; 33 readonly CONSTANT = "Constant from D"; 38 assertEQ(d.CONSTANT, "Constant from D");
|
| D | complex_inheritance_32.ets | 17 desc: Constant access test under complex inheritance, and access the read-only constant. 30 static readonly GRANDPARENT_CONST = "GrandParent Constant"; 31 static readonly OVERRIDE_CONST = "GrandParent Override Constant"; 35 static readonly PARENT_CONST = "Parent Constant"; 36 static readonly OVERRIDE_CONST = "Parent Override Constant"; 40 static readonly CHILD_CONST = "Child Constant"; 41 static readonly OVERRIDE_CONST = "Child Override Constant";
|
| D | complex_inheritance_17.ets | 21 static readonly CONSTANT = "Constant from A"; 25 readonly CONSTANT: string; 29 readonly CONSTANT = "Constant from C"; 34 assertEQ(c.CONSTANT, "Constant from C");
|
| D | complex_inheritance_16.ets | 21 static readonly CONSTANT = "Constant from A"; 25 readonly CONSTANT: string; 29 readonly CONSTANT = "Constant from C"; 34 assertEQ(c.CONSTANT, "Constant from C");
|
| D | complex_inheritance_33.ets | 29 static readonly GRANDPARENT_CONST = "GrandParent Constant"; 34 static readonly PARENT_CONST = "Parent Constant"; 38 static readonly CHILD_CONST = "Child Constant"; 42 assertEQ(GrandParent.GRANDPARENT_CONST, "GrandParent Constant"); 44 assertEQ(Parent.PARENT_CONST, "Parent Constant"); 45 assertEQ(Child.CHILD_CONST, "Child Constant");
|
| /arkcompiler/ets_frontend/ets2panda/linter/arkanalyzer/src/core/common/ |
| D | ValueUtil.ts | 16 …Constant, BooleanConstant, Constant, NullConstant, NumberConstant, StringConstant, UndefinedConsta… 21 private static readonly NumberConstantCache: Map<number, Constant> = new Map(); 32 public static getOrCreateNumberConst(n: number): Constant { 33 let constant = this.NumberConstantCache.get(n); 34 if (constant === undefined) { 35 constant = new NumberConstant(n); 36 this.NumberConstantCache.set(n, constant); 38 return constant; 45 public static createStringConst(str: string): Constant { 52 public static createConst(str: string): Constant { [all …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/arkanalyzer/src/core/base/ |
| D | Constant.ts | 23 export class Constant implements Value { class 33 * Returns the constant's value as a **string**. 34 * @returns The constant's value. 45 * Returns the type of this constant. 46 * @returns The type of this constant. 53 * Get a string of constant value in Constant. 54 * @returns The string of constant value. 67 export class BooleanConstant extends Constant { 80 export class NumberConstant extends Constant { 86 export class BigIntConstant extends Constant { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/10.interfaces/07.interface_inheritance/Interface_inheritance_class_implementation/test_class_usage_of_conflicting_constants/ |
| D | test_class_usage_of_conflicting_constants_10.ets | 17 desc: Verify that a class can distinguish the same - named constants between an interface constant … 21 readonly CONSTANT: number; 25 readonly CONSTANT: number = 10; 27 someMethod(CONSTANT: number) { 28 const localConstant = this.CONSTANT; 29 console.log(`Interface/Class constant: ${localConstant}`); 30 console.log(`Method parameter constant: ${CONSTANT}`); 31 return localConstant !== CONSTANT;
|
| /arkcompiler/runtime_core/static_core/docs/ |
| D | PBC2IR.md | 7 | movi | i64 Constant | 8 | movi.64 | i64 Constant | 9 | fmovi | f32 Constant | 10 | fmovi.64 | f64 Constant | 15 | ldai | i64 Constant | 16 | ldai.64 | i64 Constant | 17 | fldai | f32 Constant | 18 | fldai.64 | f64 Constant | 22 | lda.null | i64 Constant 0 | 36 | jeqz.obj | i64 Constant 0, bool Compare EQ, IfImm | [all …]
|
| /arkcompiler/runtime_core/docs/ |
| D | PBC2IR.md | 7 | movi | i64 Constant | 8 | movi.64 | i64 Constant | 9 | fmovi | f32 Constant | 10 | fmovi.64 | f64 Constant | 15 | ldai | i64 Constant | 16 | ldai.64 | i64 Constant | 17 | fldai | f32 Constant | 18 | fldai.64 | f64 Constant | 22 | lda.null | i64 Constant 0 | 36 | jeqz.obj | i64 Constant 0, bool Compare EQ, IfImm | [all …]
|
| /arkcompiler/runtime_core/bytecode_optimizer/tests/ |
| D | const_array_resolver_test.cpp | 26 CONSTANT(1, 2).s64(); in TEST_F() 27 CONSTANT(2, 0).s64(); in TEST_F() 49 CONSTANT(1, 2).s64(); in TEST_F() 50 CONSTANT(2, 0).s64(); in TEST_F() 69 CONSTANT(1, 2).s32(); in TEST_F() 70 CONSTANT(2, 0).s32(); in TEST_F() 96 CONSTANT(0, 3).s32(); in TEST_F() 97 CONSTANT(4, 0).s32(); in TEST_F() 98 CONSTANT(6, 100).f64(); in TEST_F() 99 CONSTANT(10, 1).s32(); in TEST_F() [all …]
|
| /arkcompiler/runtime_core/static_core/bytecode_optimizer/tests/ |
| D | const_array_resolver_test.cpp | 28 CONSTANT(1U, 2U).s64(); in TEST_F() 29 CONSTANT(2U, 0U).s64(); in TEST_F() 30 CONSTANT(3U, 1U).s64(); in TEST_F() 52 CONSTANT(1U, 2U).s64(); in TEST_F() 53 CONSTANT(2U, 0U).s64(); in TEST_F() 54 CONSTANT(3U, 1U).s64(); in TEST_F() 73 CONSTANT(1U, 2U).s32(); in TEST_F() 74 CONSTANT(2U, 0U).s32(); in TEST_F() 75 CONSTANT(3U, 1U).s32(); in TEST_F() 103 CONSTANT(0U, 3U).s32(); in TEST_F() [all …]
|
| D | reg_encoder_test.cpp | 34 CONSTANT(0U, 0.0).f32(); in TEST_F() 35 CONSTANT(1U, 0.0).f32(); in TEST_F() 36 CONSTANT(2U, 0.0).f32(); in TEST_F() 37 CONSTANT(3U, 0.0).f32(); in TEST_F() 38 CONSTANT(4U, 0.0).f32(); in TEST_F() 39 CONSTANT(5U, 0.0).f32(); in TEST_F() 40 CONSTANT(6U, 0.0).f32(); in TEST_F() 41 CONSTANT(7U, 0.0).f32(); in TEST_F() 42 CONSTANT(8U, 0.0).f32(); in TEST_F() 43 CONSTANT(9U, 0.0).f32(); in TEST_F() [all …]
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | deoptimize_elimination_doc.md | 20 If input of `DeoptimizeIf` is constant: 21 * Constant is equal 0 -> `DeoptimizeIf` is replaced by `NOP`. 22 * Other constant -> `DeoptimizeIf` is replaced by `Deoptimize` instruction. 37 1. Constant 0 38 2. Constant 1 54 1. Constant 0 55 2. Constant 1
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/ |
| D | load_static_const_folding.ets | 21 //! INST_NOT "Constant" 23 //! INST /Constant\s+20 ->.+/ 26 //! INST /Constant\s+20 ->.+/ 27 //! INST_COUNT "Constant", 1 32 //! INST_NOT "Constant" 34 //! INST /Constant\s+10 ->.+/ 37 //! INST /Constant\s+10 ->.+/ 38 //! INST_COUNT "Constant", 1
|
| /arkcompiler/runtime_core/static_core/compiler/tests/ |
| D | const_folding_test.cpp | 49 CONSTANT(0U, l); in CmpTest() 50 CONSTANT(1U, r); in CmpTest() 75 CONSTANT(0U, src); in CastTest() 165 CONSTANT(0U, nan1ValueF).f32(); in CheckCompareWithNan() 166 CONSTANT(1U, nan2ValueF).f32(); in CheckCompareWithNan() 167 CONSTANT(2U, nan1ValueD).f64(); in CheckCompareWithNan() 168 CONSTANT(3U, nan2ValueD).f64(); in CheckCompareWithNan() 171 CONSTANT(8U, 1U); // It is bool True in CheckCompareWithNan() 172 CONSTANT(9U, 0U); // It is bool False in CheckCompareWithNan() 205 CONSTANT(0U, nan1ValueF).f32(); in CheckNegNan() [all …]
|