Home
last modified time | relevance | path

Searched full:f (Results 1 – 25 of 3238) sorted by relevance

12345678910>>...130

/arkcompiler/runtime_core/taihe/compiler/taihe/codegen/cpp/
Dgen_common.py65 f"include/{pkg_cpp_info.header}",
104 f"include/{enum_cpp_info.decl_header}",
109 f"namespace {enum_cpp_info.namespace} {{",
110 f"}}",
114 f"struct {enum_cpp_info.name};",
117 f"namespace taihe {{",
118 f"}}",
122 f"template<>",
125 f"struct as_abi<{enum_cpp_info.full_name}> {{",
126 f"}};",
[all …]
/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/
DUnionAsAndInstanceof.ets16 function assert_ccexc(f: () => void) {
18 f();
26 function assert_nothrow(f: () => void) {
28 f();
42 // let f = ... until inference in form ((p)=>expr)(a) is broken
43 assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object); f(null); });
44 assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object); f(undefined); });
45 assert_ccexc(() => { let f = ((x: Object | null) => x as Object); f(null); });
46 assert_ccexc(() => { let f = ((x: Object | undefined) => x as Object); f(undefined); });
48 …assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object | undefined); f(null);…
[all …]
/arkcompiler/runtime_core/taihe/compiler/
Dgenerate-grammar43 return f'List["TaiheAST.{attr_kind[:-3]}"]'
45 return f'Optional["TaiheAST.{attr_kind[:-3]}"]'
46 return f'"TaiheAST.{attr_kind}"'
72 f"from dataclasses import dataclass\n"
73 f"from typing import Any, Union, List, Optional\n"
74 f"\n"
75 f"from taihe.utils.sources import SourceLocation\n"
76 f"\n"
77 f"\n"
78 f"class TaiheAST:\n"
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/12.adding_functionality_to_existing_types/01.functions_with_receiver/
Dfunctions_with_receiver.params.yaml18 function f(this: A) {}
20 f(new A())
23 function f(this: A) {}
26 f(a)
29 function f(this: A) {}
31 new A().f()
34 function f(this: A) {}
37 a.f()
40 function f(this: A, n: number) {}
43 a.f(1)
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ani/tests/object_ops/
Dobject_call_method_by_name_float_test.cpp23 static constexpr ani_float VAL1 = 2.0F;
24 static constexpr ani_float VAL2 = 3.0F;
48 args[0U].f = VAL1; in TEST_F()
49 args[1U].f = VAL2; in TEST_F()
50 ani_float sum = 0.0F; in TEST_F()
51 …ASSERT_EQ(env_->Object_CallMethodByName_Float_A(object, "floatMethod", "FF:F", &sum, args), ANI_OK… in TEST_F()
61 args[0U].f = VAL1; in TEST_F()
62 args[1U].f = VAL2; in TEST_F()
63 ani_float sum = 0.0F; in TEST_F()
74 args[0U].f = VAL1; in TEST_F()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/03.utility_types/01.partial_utility_type/
Dpartial_inherit3.ets34 let f: Partial<B> = { }
35 assertTrue( !f.k )
36 assertTrue( f.i == undefined )
37 assertTrue( f.j == undefined )
39 f = { k: false }
40 assertTrue( !f.k )
41 assertTrue( f.i == undefined )
42 assertTrue( f.j == undefined )
43 f.i = 2;
44 f.j = "new str"
[all …]
/arkcompiler/runtime_core/taihe/compiler/taihe/codegen/ani/
Dgen_ani.py71 f"temp/ani_constructor.cpp",
75 f"#if __has_include(<ani.h>)",
76 f"#include <ani.h>",
77 f"#elif __has_include(<ani/ani.h>)",
78 f"#include <ani/ani.h>",
79 f"#else",
80 f'#error "ani.h not found. Please ensure the Ani SDK is correctly installed."',
81 f"#endif",
84 f"ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) {{",
85 f"}}",
[all …]
Danalyses.py80 expect_dict = {"s": str, "i": int, "f": float, "b": bool}
88 f"@{attr.name} expects exactly {len(pattern)} arguments",
95 f"@{attr.name} expects at least {len(pattern)} arguments",
105 f"@{attr.name} expects {i + 1}th argument to be {expect_dict[p].__name__}",
119 return f"ani_{self.hint}"
197 return f"ani_{self.hint}"
221 return f"ani_{self.hint}"
298 decl_name = f"{scope_name}_default"
299 target.add_import_default(f"{self.name}", decl_name)
301 target.add_import_module(f"./{self.name}", scope_name) # TODO: Remove `./`
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/09.classes/03.class_members/
Dmember_declared_in_body.params.yaml16 - { decl: "f: int = 2;", call: "", check: "assertTrue( y.f == 2 )" }
17 …- { decl: "f: int = 3; set F(f: int) { this.f = f; }; get F(): int { return this.f; }", call: "y.F
18 - { decl: "f: int; constructor() { this.f = 1; }; ", call: "", check: "y.f == 1;" }
19 …- { decl: "f: int = 0; constructor() { this.f += 1; }; constructor(f: int) { this.f += f; }", call…
20 - { decl: "static f: int = 5; ", call: "", check: "C.f == 5;" }
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates_deprecated/02.multiple_catch_clauses_in_try_statements/
Dcatch2.ets34 class F extends Exception {
54 throw new F("1", e);
55 } catch (f: F) {
57 throw new Ex("2", f);
60 throw new F("3", e);
61 } catch (f: F) {
63 throw new Ex("4", f);
66 throw new F("5", e);
67 } catch (f: F) {
69 throw new Ex("6", f);
[all …]
/arkcompiler/ets_runtime/test/
Druntest.py45 parser.add_argument('-f', '--frontend', metavar='opt',
62 help=f'aot compile with pgo, default threshold is {DEFAULT_PGO_THRESHOLD}')
64 help=f'pgo hotness threshold, default is {DEFAULT_PGO_THRESHOLD}')
68 help=f'specify seconds of test timeout, default is {DEFAULT_TIMEOUT}')
89 return (1, '', f'exec command timeout {timeout}s')
100 with open(f'{hap_dir}/module.json') as f:
101 data = json.load(f)
108 with open(f'{hap_dir}/module.json') as f:
109 data = json.load(f)
122 print(f'pls place this script at: {self.place_dir}')
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/10.final_classes_and_methods/01.final_classes/
Dfc.params.yaml22 final class F extends A implements I {}
24 let f: F = new F()
25 assertTrue( f instanceof F && f instanceof A && f instanceof I && f.fld == '' )
26 f = { fld: 'ABC' }
27 assertEQ( f.fld, 'ABC' )
33 final final class F extends A {} // CTE
41 final abstract class F extends A {} // CTE
50 class F extends B {} // CTE
58 abstract class F extends A {} // CTE
66 final class F extends A {} // CTE
[all …]
/arkcompiler/runtime_core/libabckit/tests/mock/tests/
Dcpp_mock_dyn_isa_1.cpp32 abckit::File f(DEFAULT_PATH); in TEST_F() local
34 abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateSupercallspread( in TEST_F()
35 … abckit::mock::helpers::GetMockInstruction(f), abckit::mock::helpers::GetMockInstruction(f)); in TEST_F()
48 abckit::File f(DEFAULT_PATH); in TEST_F() local
50 …abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateApply(abckit::mock::helpers::GetMockInstruct… in TEST_F()
51 … abckit::mock::helpers::GetMockInstruction(f), in TEST_F()
52 … abckit::mock::helpers::GetMockInstruction(f)); in TEST_F()
65 abckit::File f(DEFAULT_PATH); in TEST_F() local
67 …abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateCallthis0(abckit::mock::helpers::GetMockInst… in TEST_F()
68 … abckit::mock::helpers::GetMockInstruction(f)); in TEST_F()
[all …]
Dcpp_mock_dyn_isa_0.cpp32 abckit::File f(DEFAULT_PATH); in TEST_F() local
34 abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateLoadString(DEFAULT_CONST_CHAR); in TEST_F()
48 abckit::File f(DEFAULT_PATH); in TEST_F() local
50 …abckit::mock::helpers::GetMockGraph(f).DynIsa().CreateSub2(abckit::mock::helpers::GetMockInstructi… in TEST_F()
51 … abckit::mock::helpers::GetMockInstruction(f)); in TEST_F()
64 abckit::File f(DEFAULT_PATH); in TEST_F() local
66 …abckit::mock::helpers::GetMockGraph(f).DynIsa().GetModule(abckit::mock::helpers::GetMockInstructio… in TEST_F()
79 abckit::File f(DEFAULT_PATH); in TEST_F() local
81 …abckit::mock::helpers::GetMockGraph(f).DynIsa().SetModule(abckit::mock::helpers::GetMockInstructio… in TEST_F()
82 … abckit::mock::helpers::GetMockCoreModule(f)); in TEST_F()
[all …]
/arkcompiler/ets_frontend/arkguard/test/grammar/in_operator/
DprivateNameInInExpressionTransform.ts16 class F { class
17 #f = 1;
22 #f in a; // expect F's 'f' WeakMap
23 #fun in a; // expect F's 'instances' WeakSet
24 #staticF in a; // expect F's constructor
25 #staticMethod in a; // expect F's constructor
32 a == #f in a || a; // Good precedence: (a == (#f in a)) || a
34 #f in a && #f in a; // Good precedence: (#f in a) && (#f in a)
39 #f = 1;
41 #f in a; // expect Bar's 'f' WeakMap
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/01.numeric_casting_conversions/
Dnum_cc.params.yaml237 - { sval: '-65537.0', dval: '-65537.0f' }
238 - { sval: '-65536.0', dval: '-65536.0f' }
239 - { sval: '-65535.0', dval: '-65535.0f' }
240 - { sval: '-32769.0', dval: '-32769.0f' }
241 - { sval: '-32768.0', dval: '-32768.0f' }
242 - { sval: '-32767.0', dval: '-32767.0f' }
243 - { sval: '-129.0', dval: '-129.0f' }
244 - { sval: '-128.0', dval: '-128.0f' }
245 - { sval: '-127.0', dval: '-127.0f' }
246 - { sval: '-3.1415926', dval: '-3.1415925f' }
[all …]
/arkcompiler/runtime_core/verifier/tests/
Dverify_sys_hap_abc.py50 print(f"Error extracting {zip_path}: {e}")
63 memory_usage = f"{line.split(':')[1].strip()} KB"
66 user_time_ms = f"{user_time_seconds * 1000:.2f} ms"
69 …file_size_str = f"{file_size / 1024:.2f} KB" if file_size < 1024**2 else f"{file_size / 1024**2:.2
91 print(f"Verifying file: {abc_path}")
115 print(f"Extracting {zip_path} to {extract_folder}")
124 print(f"Verifying file: {modules_abc_path}")
145 with os.fdopen(os.open(report_file, flags, mode), 'w') as f:
146 f.truncate()
147 f.write("<html><head><title>Verification Report</title>")
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/
Dfunction_decl_neg.params.yaml17 - { decl: 'function f(): {}', call: 'f();' }
20 - { decl: 'let f = function (): void {}', call: 'f();' }
28 - { decl: 'function f: void {}', call: 'f();' }
29 - { decl: 'function f(: void {}', call: 'f();' }
30 - { decl: 'function f): void {}', call: 'f();' }
33 - { decl: 'function f() void {}', call: 'f();' }
36 - { decl: 'function f(): void', call: 'f();' }
37 - { decl: 'function f(): void {', call: 'f();' }
38 - { decl: 'function f(): void }', call: 'f();' }
50 let f: BarType[] = foo();
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/test/main/
Dfunctions.ets89 function f(a: string): number {
93 foo(f(null));
97 f(null);
101 f(null);
102 }, null, f(null));
106 f(null);
107 }, null, f(null));
108 }, null, foo(f(null)));
116 f(null)
118 f(null)
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/06.callable_types/02.callable_types_with_instantiate_method/
Dct_inst.params.yaml26 static $_instantiate(f: () => C) { return 'abc' }
38 static $_instantiate(f: () => C) { C.inst = f() }
49 static $_instantiate(f: () => C): void { C.inst = f() }
60 static $_instantiate(f: () => C, p: string): string {
61 return f().meth(p)
72 static $_instantiate(f: () => C): C {
74 C.instance = f()
86 static $_instantiate(f: () => C): C {
88 C.instance = f()
94 let f: ()=>C = (): C => new C()
[all …]
Dct_inst1.params.yaml18 static $_instantiate(f: ()=>C): C {
19 return f()
29 static $_instantiate(f: ()=>C, p: int[]): C {
30 return f()
41 static $_instantiate(f: ()=>C): C {
42 return f()
53 static $_instantiate(f: ()=>C, p: ()=>C): C {
54 return f()
68 static $_instantiate(f: ()=>C): C {
69 return f()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/12.adding_functionality_to_existing_types/05.lambda_expressions_with_receiver/
Dlambda_expressions_with_receiver.params.yaml18 let f = (this: A): void => {}
21 f(a)
24 let f = (this: A): void => {}
27 a.f()
30 let f = (this: I): void => {}
33 f(i)
36 let f = (this: I): void => {}
39 i.f()
41 let f = (this: number[]): void => {}
44 n.f()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/18.function_types/01.type_function/
Dpositive.params.yaml18 const f: Function = foo
19 f.unsafeCall(4.4)
22 const f: Function = foo
23 f.unsafeCall(4.4)
25 const f: Function = (n: number) => {}
26 f.unsafeCall(4.4)
29 const f: Function = foo
30 f.unsafeCall(4.4, 6.6)
33 const f: Function = foo
34 f.unsafeCall(4.4, "just a test")
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/12.adding_functionality_to_existing_types/02.receiver_types/
Dfunctions_with_receiver.params.yaml17 function f(this: number[]) {}
20 f(n)
22 function f(this: number[]) {}
25 n.f()
27 function f(this: Number) {}
30 f(n)
32 function f(this: Number) {}
35 n.f()
38 function f(this: I) {}
41 f(i)
[all …]
/arkcompiler/runtime_core/taihe/compiler/taihe/semantics/
Dformat.py65 self.as_keyword = lambda s: f"{AnsiStyle.CYAN}{s}{AnsiStyle.RESET}"
66 self.as_attr = lambda s: f"{AnsiStyle.MAGENTA}{s}{AnsiStyle.RESET}"
67 self.as_comment = lambda s: f"{AnsiStyle.GREEN}{s}{AnsiStyle.RESET}"
77 self.as_attr(f"@{item}") for item in self.get_format_attr(d)
79 return f"{fmt_attrs} {s}"
88 comment = self.as_comment(f"/* {real_type} */")
89 return f"{type_ref_repr} {comment}"
93 return self.with_attr(d, f"{d.pkname}.{d.symbol}")
102 return self.with_attr(d, f"{d.symbol}<{args_fmt}>")
108 return self.with_attr(d, f"({fmt_args}) => {ret}")
[all …]

12345678910>>...130