| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/generic_as_parameter/ts_to_sts/ |
| D | generic_as_parameter.js | 24 export function anyTypeParameter(arg) { 27 export function anyTypeParameterExplicitCallFromTsInt() { 30 export function anyTypeParameterExplicitCallFromTsString() { 33 export function anyTypeParameterExplicitCallFromTsBool() { 36 export function anyTypeParameterExplicitCallFromTsArr() { 39 export function anyTypeParameterExplicitCallFromTsObj() { 42 export function anyTypeParameterExplicitCallFromTsUnion() { 45 export function anyTypeParameterExplicitCallFromTsTuple() { 48 export function anyTypeParameterExplicitCallFromTsLiteral() { 51 export let genericTypeFunctionReturnAny = function (arg) { [all …]
|
| /arkcompiler/ets_runtime/test/aottest/tryldglobalbyname_global_object/ |
| D | expect_output.txt | 14 function Function() { [native code] } 15 Function 16 ReferenceError: Function is not defined 17 function RangeError() { [native code] } 20 function Error() { [native code] } 23 function Object() { [native code] } 26 function SyntaxError() { [native code] } 29 function TypeError() { [native code] } 32 function ReferenceError() { [native code] } 35 function URIError() { [native code] } [all …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/main/ |
| D | explicit_function_type.ets | 15 let f1: Function = () => {}; // NOT OK 16 let g1: Function = function() {}; // NOT OK 17 let h1: Function = new Function('return 42'); // NOT OK 18 let g2 = function() {}; // OK 19 let h2 = new Function('return 42'); // NOT OK 37 f2: Function // NOK 41 func3: Function = () => {} // NOK 45 f4: Function = () => {} // NOK 53 a5: Function = () => {} // NOK 56 function run6(fn: Function) { [all …]
|
| D | explicit_function_type.ets.migrate.ets | 15 let f1: Function = () => {}; // NOT OK 16 let g1: Function = () => { }; // NOT OK 17 let h1: Function = new Function('return 42'); // NOT OK 19 let h2 = new Function('return 42'); // NOT OK 37 f2: Function // NOK 41 func3: Function = () => {} // NOK 45 f4: Function = () => {} // NOK 53 a5: Function = () => {} // NOK 56 function run6(fn: Function) { 60 function getFunction8(): Function { [all …]
|
| /arkcompiler/ets_frontend/merge_abc/src/ |
| D | assemblyFunctionProto.cpp | 19 void CatchBlock::Serialize(const panda::pandasm::Function::CatchBlock &block, protoPanda::CatchBloc… in Serialize() 29 void CatchBlock::Deserialize(const protoPanda::CatchBlock &protoBlock, panda::pandasm::Function::Ca… in Deserialize() 39 void Parameter::Serialize(const panda::pandasm::Function::Parameter ¶m, protoPanda::Parameter &… in Serialize() 45 void Function::Serialize(const panda::pandasm::Function &function, protoPanda::Function &protoFunct… in Serialize() argument 47 protoFunction.set_name(function.name); in Serialize() 48 protoFunction.set_language(static_cast<uint32_t>(function.language)); in Serialize() 51 FunctionMetadata::Serialize(*function.metadata, *protoFuncMeta); in Serialize() 53 for (const auto &[name, label] : function.label_table) { in Serialize() 60 for (const auto &insn : function.ins) { in Serialize() 65 for (const auto &debug : function.local_variable_debug) { in Serialize() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/11.function_call_expression/step_1_selection_of_function/ |
| D | step1.params.yaml | 18 function foo(p: Number): string { 21 function foo(p: Number|null): string { 24 function foo(p: UT): string { 28 // select the most-specific function 35 function foo(p: Number|null): string { 38 function foo(p: UT): string { 42 // select the most-specific function 49 function foo(p: Number|null): string { 52 function foo(p: UT): string { 55 function foo(p: number): string { [all …]
|
| /arkcompiler/runtime_core/taihe/test/ani_record/idl/ |
| D | record_test.taihe | 20 function MakeCpu(): ICpu; 22 function GetCpuSize(r : @record Map<String, ICpu>) : i32; 24 function GetASize(r : @record Map<i32, Opaque>) : i32; 26 function GetStringIntSize(r : @record Map<String, i32>) : i32; 28 function CreateStringString(a : i32) : @record Map<String, String>; 35 function GetMapfromArray(d : Array<Data>): @record Map<String, i32>; 37 function GetDatafromMap(m : @record Map<String, Data>, k : String) : Data; 39 function ForeachMap(r: @record Map<String, String>); 42 function Mapfunc01(m : @record Map<String, bool>): bool; 43 function Mapfunc02(m : @record Map<String, i8>): bool; [all …]
|
| /arkcompiler/runtime_core/libabckit/include/cpp/headers/arkts/ |
| D | function.h | 19 #include "../core/function.h" 25 * @brief Function 27 class Function final : public core::Function { 33 /// @brief abckit::DefaultHash<Function> 34 friend class abckit::DefaultHash<Function>; 36 friend class abckit::traits::TargetCheckCast<Function>; 40 * @brief Constructor Arkts API Function from the Core API with compatibility check 41 * @param other - Core API Function 43 explicit Function(const core::Function &other); 46 * @brief Construct a new Function object [all …]
|
| /arkcompiler/ets_runtime/test/aottest/ts_multi_inline_max_call/ |
| D | expect_output.txt | 14 [trace] aot inline function name: #*#foo@ts_multi_inline_max_call caller function name: func_main_0… 15 [trace] aot inline function name: #*#foo1@ts_multi_inline_max_call caller function name: #*#foo@ts_… 16 [trace] aot inline function name: #*#bar@ts_multi_inline_max_call caller function name: #*#foo1@ts_… 18 [trace] aot inline function name: #*#foo2@ts_multi_inline_max_call caller function name: #*#foo@ts_… 19 [trace] aot inline function name: #*#bar@ts_multi_inline_max_call caller function name: #*#foo2@ts_… 21 [trace] aot inline function name: #*#foo3@ts_multi_inline_max_call caller function name: #*#foo@ts_… 22 [trace] aot inline function name: #*#bar@ts_multi_inline_max_call caller function name: #*#foo3@ts_… 24 [trace] aot inline function name: #*#foo4@ts_multi_inline_max_call caller function name: #*#foo@ts_… 25 [trace] aot inline function name: #*#bar@ts_multi_inline_max_call caller function name: #*#foo4@ts_… 27 [trace] aot inline function name: #*#foo5@ts_multi_inline_max_call caller function name: #*#foo@ts_… [all …]
|
| /arkcompiler/ets_frontend/ets2panda/test/parser/ets/ |
| D | function-expected.txt | 15 "program": "function.ets" 20 "program": "function.ets" 53 "function": { 124 "program": "function.ets" 129 "program": "function.ets" 159 "function": { 198 "program": "function.ets" 203 "program": "function.ets" 209 "function": { 227 "program": "function.ets" [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/08.function_method_and_constructor_overloading/01.function_overloading/ |
| D | fn_overloading.ets | 21 override-equivalent, then the function name is said to be overloaded. 26 function foo(a: byte): int { 29 function foo(a: short): int { 32 function foo(a: char): int { 35 function foo(a: int): int { 38 function foo(a: long): int { 41 function foo(a: float): int { 44 function foo(a: double): int { 47 function foo(a: boolean): int { 50 function foo(a: Byte): int { [all …]
|
| /arkcompiler/ets_runtime/test/aottest/pgo_call_recursive_js/ |
| D | expect_output.txt | 14 [trace] aot inline function name: #*#foo@pgo_call_recursive_js caller function name: func_main_0@pg… 15 [trace] aot inline function name: #*#foo1@pgo_call_recursive_js caller function name: #*#foo@pgo_ca… 16 [trace] aot inline function name: #*#foo2@pgo_call_recursive_js caller function name: #*#foo1@pgo_c… 17 [trace] aot inline function name: #*#foo1@pgo_call_recursive_js caller function name: #*#foo@pgo_ca… 18 [trace] aot inline function name: #*#foo2@pgo_call_recursive_js caller function name: #*#foo1@pgo_c… 19 [trace] aot inline function name: #*#foo2@pgo_call_recursive_js caller function name: #*#foo@pgo_ca… 20 [trace] aot inline function name: #*#foo2@pgo_call_recursive_js caller function name: #*#foo@pgo_ca… 21 [trace] aot inline function name: #*#foo1@pgo_call_recursive_js caller function name: #*#foo@pgo_ca… 22 [trace] aot inline function name: #*#foo2@pgo_call_recursive_js caller function name: #*#foo1@pgo_c… 23 [trace] aot inline function name: #*#foo2@pgo_call_recursive_js caller function name: #*#foo@pgo_ca… [all …]
|
| /arkcompiler/ets_frontend/ets2panda/test/parser/js/ |
| D | test-arrow-function-expected.txt | 8 "function": { 23 "program": "test-arrow-function.js" 28 "program": "test-arrow-function.js" 40 "program": "test-arrow-function.js" 45 "program": "test-arrow-function.js" 58 "program": "test-arrow-function.js" 63 "program": "test-arrow-function.js" 71 "program": "test-arrow-function.js" 76 "program": "test-arrow-function.js" 84 "program": "test-arrow-function.js" [all …]
|
| D | test-function-decl-expected.txt | 17 "program": "test-function-decl.js" 22 "program": "test-function-decl.js" 28 "function": { 47 "program": "test-function-decl.js" 52 "program": "test-function-decl.js" 60 "program": "test-function-decl.js" 65 "program": "test-function-decl.js" 74 "program": "test-function-decl.js" 79 "program": "test-function-decl.js" 87 "program": "test-function-decl.js" [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/01.evaluation_of_expressions/ |
| D | typ.ets | 24 function foo(a: byte): int { 27 function foo(a: short): int { 30 function foo(a: char): int { 33 function foo(a: int): int { 36 function foo(a: long): int { 39 function foo(a: float): int { 42 function foo(a: double): int { 45 function foo(a: boolean): int { 48 function foo(a: Byte): int { 51 function foo(a: Short): int { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/generic_static/ts_to_sts/ |
| D | main.js | 16 let __extends = (this && this.__extends) || (function () { 17 let ExtendStatics = function (d, b) { 19 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 20 …function (d, b) { for (let p in b) { if (Object.prototype.hasOwnProperty.call(b, p)) { d[p] = b[p]… 23 return function (d, b) { 24 if (typeof b !== 'function' && b !== null) { 27 function ConstrFoo() { this.constructor = d; } 40 export let GenericStatic = /** @class */ (function () { 41 function genericStatic() { 43 genericStatic.get = function (value) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/primitive/ets_to_ts/ |
| D | primitive.ets | 17 function getBooleanPrimitive(): boolean { 21 function getBooleanBoxed(): Boolean { 25 function getBytePrimitive(): byte { 29 function getByteBoxed(): Byte { 33 function getShortPrimitive(): short { 37 function getShortBoxed(): Short { 41 function getIntPrimitive(): int { 45 function getIntBoxed(): Int { 49 function getLongPrimitive(): long { 53 function getLongBoxed(): Long { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/class_method/ts_to_sts/ |
| D | main.js | 16 let __extends = (this && this.__extends) || (function () { 17 let extendStatics = function (d, b) { 19 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 20 …function (d, b) { for (let p in b) { if (Object.prototype.hasOwnProperty.call(b, p)) { d[p] = b[p]… 23 return function (d, b) { 24 if (typeof b !== 'function' && b !== null) { 27 function ConstrFoo() { this.constructor = d; } 32 export let UserClass = /** @class */ (function () { 33 function UserClass() { 36 UserClass.prototype.get = function () { [all …]
|
| /arkcompiler/ets_runtime/test/jittest/bytecode_to_cir_with_insufficient_profile_004/ |
| D | expect_output.txt | 14 function without args. 15 function with one arg: 1 16 function with two args: 1, 2 17 function with three args: 1, 2, 3 18 function with four args: 1, 2, 3, 4 19 class function with args. 20 class function with one arg: 1 21 class function with two args: 1, 2 22 class function with three args: 1, 2, 3 23 class function with four args: 1, 2, 3, 4 [all …]
|
| /arkcompiler/ets_runtime/test/aottest/pgo_call_js/ |
| D | expect_output.txt | 14 [trace] aot inline function name: #*#foo@pgo_call_js caller function name: #*#callFoo1@pgo_call_js 15 [trace] aot inline function name: #*#foo@pgo_call_js caller function name: #*#callFoo1@pgo_call_js 16 [trace] aot inline function name: #*#callFoo2@pgo_call_js caller function name: func_main_0@pgo_cal… 17 [trace] aot inline function name: #*#callFoo2@pgo_call_js caller function name: func_main_0@pgo_cal… 18 [trace] aot inline function name: #*#callFoo2@pgo_call_js caller function name: func_main_0@pgo_cal… 19 [trace] aot inline function name: #*#callFoo2@pgo_call_js caller function name: func_main_0@pgo_cal… 20 [trace] aot inline function name: #*#callFoo3@pgo_call_js caller function name: func_main_0@pgo_cal… 21 [trace] aot inline function name: #*#callFoo2@pgo_call_js caller function name: func_main_0@pgo_cal… 22 [trace] aot inline function name: #*#callFoo2@pgo_call_js caller function name: func_main_0@pgo_cal… 23 [trace] aot inline function name: #*#callFoo1@pgo_call_js caller function name: func_main_0@pgo_cal… [all …]
|
| /arkcompiler/ets_runtime/test/aottest/pgo_call/ |
| D | expect_output.txt | 14 [trace] aot inline function name: #*#foo@pgo_call caller function name: #*#callFoo1@pgo_call 15 [trace] aot inline function name: #*#foo@pgo_call caller function name: #*#callFoo1@pgo_call 17 [trace] aot inline function name: #*#callFoo2@pgo_call caller function name: func_main_0@pgo_call 18 [trace] aot inline function name: #*#callFoo2@pgo_call caller function name: func_main_0@pgo_call 20 [trace] aot inline function name: #*#callFoo2@pgo_call caller function name: func_main_0@pgo_call 21 [trace] aot inline function name: #*#callFoo2@pgo_call caller function name: func_main_0@pgo_call 23 [trace] aot inline function name: #*#callFoo3@pgo_call caller function name: func_main_0@pgo_call 24 [trace] aot inline function name: #*#callFoo2@pgo_call caller function name: func_main_0@pgo_call 26 [trace] aot inline function name: #*#callFoo2@pgo_call caller function name: func_main_0@pgo_call 28 [trace] aot inline function name: #*#callFoo1@pgo_call caller function name: func_main_0@pgo_call [all …]
|
| /arkcompiler/runtime_core/taihe/test/ani_namespace/idl/ |
| D | ns_alltest.functiontest.taihe | 28 function BaseFunctionTest1():void; 29 function BaseFunctionTest2(param1:i8):void; 30 function BaseFunctionTest3(param1:i16):void; 31 function BaseFunctionTest4(param1:i32):void; 32 function BaseFunctionTest5(param1:i64):void; 33 function BaseFunctionTest6(param1:f32):void; 34 function BaseFunctionTest7(param1:f64):void; 35 function BaseFunctionTest8(param1:String):void; 36 function BaseFunctionTest9(param1:bool):void; 37 function BaseFunctionTest10(param1:Array<i8>):void; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/doc/tutorial/ |
| D | functions.rst | 20 Function Declarations 23 A function declaration introduces a named function by specifying its name, 26 Below is an example of a simple function with two string parameters and string 31 function add(x: string, y: string): string { 36 Every parameter's type annotation must be specified. When calling a function, 38 parameter of a function can be a rest parameter (see below). 49 function hello(name?: string) { 58 corresponding argument to such parameter is omitted in a function call, 63 function multiply(n: number, coeff: number = 2): number { 74 The last parameter of a function can be a rest parameter. As a result, [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/test_incorrect_conversion_types/ts_to_arkts/ |
| D | incorrect_conversion_types.ets | 38 function isTypeError(error: Error): boolean{ 46 function falseIfThrows(fn: () => void): boolean { 56 function conversionTsObjToStr(): boolean { return falseIfThrows(() => { testInterface as string } )… 57 function conversionTsArrayNumToStr(): boolean { return falseIfThrows(() => { tsArrayNum as string }… 58 function conversionTsArrayStrToStr(): boolean { return falseIfThrows(() => { tsArrayStr as string }… 59 function conversionTsArrayNumToNum(): boolean { return falseIfThrows(() => { tsArrayNum as number }… 60 function conversionTsStrToBool(): boolean { return falseIfThrows(() => { tsString as boolean } ) } 61 function conversionTsStrToNum(): boolean { return falseIfThrows(() => { tsString as number } ) } 62 function conversionTsStrToInt(): boolean { return falseIfThrows(() => { tsString as int } ) } 63 function conversionTsStrToByte(): boolean { return falseIfThrows(() => { tsString as byte } ) } [all …]
|
| /arkcompiler/runtime_core/taihe/test/ani_arraybuffer/idl/ |
| D | arraybuffer.taihe | 15 function SumArrayU8(nums: @arraybuffer Array<u8>): u8; 16 function GetArrayBuffer(nums: u8): @arraybuffer Array<u8>; 17 function DoubleArrayBuffer(nums: @arraybuffer Array<u8>): @arraybuffer Array<u8>; 18 function SumArrayI8(nums: Array<i8>): i8; 19 function GetArrayI8(nums: i8): Array<i8>; 20 function DoubleI8(nums: Array<i8>): Array<i8>; 21 function SumArrayI16(nums: Array<i16>): i16; 22 function GetArrayI16(nums: i16): Array<i16>; 23 function DoubleI16(nums: Array<i16>): Array<i16>; 24 function SumArrayI32(nums: Array<i32>): i32; [all …]
|