/arkcompiler/runtime_core/platforms/unix/libpandabase/futex/ |
D | fmutex.cpp | 20 #define FAIL_WITH_MESSAGE(m) \ argument 23 #define LOG_MESSAGE(l, m) argument 24 #define HELPERS_TO_UNSIGNED(m) m argument 28 #define LOG_MESSAGE(l, m) LOG(l, COMMON) << (m) // NOLINT(cppcoreguidelines-macro-usage) argument 29 #define FAIL_WITH_MESSAGE(m) LOG_MESSAGE(FATAL, m) // NOLINT(cppcoreguidelines-macro-usage) argument 30 #define HELPERS_TO_UNSIGNED(m) helpers::ToUnsigned(m) // NOLINT(cppcoreguidelines-macro-usage) argument 43 static inline void FutexWait(ATOMIC_INT *m, int v) in FutexWait() argument 48 if (ATOMIC_LOAD(m, memory_order_acquire) != v) { in FutexWait() 75 int *GetStateAddr(struct fmutex *const m) in GetStateAddr() argument 77 return reinterpret_cast<int *>(&m->state_and_waiters_); in GetStateAddr() [all …]
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | callOfConditionalTypeWithConcreteBranches.ts | 31 fn<string | number>(m => m.toFixed()); 32 AssertType(fn<string | number>(m => m.toFixed()), "void"); 34 AssertType(m => m.toFixed(), "(number) => string"); 35 AssertType(m, "number"); 36 AssertType(m.toFixed(), "string"); 37 AssertType(m.toFixed, "(?number) => string"); 39 fn<number>(m => m.toFixed()); 40 AssertType(fn<number>(m => m.toFixed()), "void"); 42 AssertType(m => m.toFixed(), "(number) => string"); 43 AssertType(m, "number"); [all …]
|
D | optionalChainingInTypeAssertionstargetes2015.ts | 22 m() {} 30 (foo.m as any)?.(); 31 AssertType((foo.m as any)?.(), "any"); 32 AssertType((foo.m as any), "any"); 33 AssertType(foo.m as any, "any"); 34 AssertType(foo.m, "() => void"); 36 (<any>foo.m)?.(); 37 AssertType((<any>foo.m)?.(), "any"); 38 AssertType((<any>foo.m), "any"); 39 AssertType(<any>foo.m, "any"); [all …]
|
D | optionalChainingInTypeAssertionstargetesnext.ts | 22 m() {} 30 (foo.m as any)?.(); 31 AssertType((foo.m as any)?.(), "any"); 32 AssertType((foo.m as any), "any"); 33 AssertType(foo.m as any, "any"); 34 AssertType(foo.m, "() => void"); 36 (<any>foo.m)?.(); 37 AssertType((<any>foo.m)?.(), "any"); 38 AssertType((<any>foo.m), "any"); 39 AssertType(<any>foo.m, "any"); [all …]
|
D | narrowingWithNonNullExpression.ts | 21 const m = ''.match(''); 22 AssertType(m, "RegExpMatchArray"); 27 m! && m[0]; 28 AssertType(m! && m[0], "string"); 29 AssertType(m!, "RegExpMatchArray"); 30 AssertType(m, "RegExpMatchArray"); 31 AssertType(m[0], "string"); 32 AssertType(m, "RegExpMatchArray"); 35 m?.[0]! && m[0]; 36 AssertType(m?.[0]! && m[0], "string"); [all …]
|
D | multipleDeclarations.ts | 22 this.m = null; 23 AssertType(this.m = null, "null"); 24 AssertType(this.m, "any"); 28 C.prototype.m = function() { 29 AssertType(C.prototype.m = function() { this.nothing();}, "() => void"); 30 AssertType(C.prototype.m, "any"); 40 this.m = this.m.bind(this); 41 AssertType(this.m = this.m.bind(this), "any"); 42 AssertType(this.m, "() => void"); 44 AssertType(this.m.bind(this), "any"); [all …]
|
D | declFileTypeAnnotationUnionType.ts | 24 module m { 37 let k: c | m.c = new c() || new m.c(); 39 AssertType(m, "any"); 40 AssertType(new c() || new m.c(), "union"); 43 AssertType(new m.c(), "m.c"); 44 AssertType(m.c, "typeof m.c"); 46 let l = new c() || new m.c(); 48 AssertType(new c() || new m.c(), "union"); 51 AssertType(new m.c(), "m.c"); 52 AssertType(m.c, "typeof m.c"); [all …]
|
D | nullishCoalescingOperator8.ts | 21 declare const a: { p: string | undefined, m(): string | undefined }; 24 AssertType(m, "() => union"); 26 declare const b: { p: string | undefined, m(): string | undefined }; constant 29 AssertType(m, "() => union"); 37 const n2 = a.m() ?? "default"; 39 AssertType(a.m() ?? "default", "string"); 40 AssertType(a.m(), "union"); 41 AssertType(a.m, "() => union"); 44 const n3 = a.m() ?? b.p ?? b.m() ?? "default";; 46 AssertType(a.m() ?? b.p ?? b.m() ?? "default", "string"); [all …]
|
D | commaOperatorInConditionalExpression.ts | 21 function f (m: string) { 28 AssertType(i => { return true? { [m]: i } : { [m]: i + 1 } }, "(number) => { [string]: nu… 30 AssertType([1, 2, 3].map(i => { return true? { [m]: i } : { [m]: i + 1 } }), "{ [string]:… 32 AssertType(true? { [m]: i } : { [m]: i + 1 }, "{ [string]: number; }"); 33 return true? { [m]: i } : { [m]: i + 1 37 AssertType({ [m]: i }, "{ [string]: number; }"); 39 AssertType([m], "number"); 41 AssertType(m, "string"); 45 AssertType({ [m]: i + 1 }, "{ [string]: number; }"); 47 AssertType([m], "number"); [all …]
|
D | declFileTypeAnnotationTypeReference.ts | 23 module m { 45 function foo3(): m.c { 46 AssertType(new m.c(), "m.c"); 47 AssertType(m.c, "typeof m.c"); 48 return new m.c(); 51 AssertType(new m.c(), "m.c"); 52 AssertType(m.c, "typeof m.c"); 53 return new m.c(); 69 function foo7(): m.g<number> { 70 AssertType(new m.g<number>(), "m.g<number>"); [all …]
|
D | declFileTypeAnnotationArrayType.ts | 23 module m { 47 function foo3(): m.c[] { 48 AssertType([new m.c()], "m.c[]"); 49 AssertType(new m.c(), "m.c"); 50 AssertType(m.c, "typeof m.c"); 51 return [new m.c()]; 54 AssertType(m.c, "typeof m.c"); 55 return m.c; 73 function foo7(): m.g<number>[] { 74 AssertType([new m.g<number>()], "m.g<number>[]"); [all …]
|
D | declFileTypeAnnotationTupleType.ts | 23 module m { 33 let k: [c, m.c] = [new c(), new m.c()]; variable 35 AssertType(m, "any"); 36 AssertType([new c(), new m.c()], "[c, m.c]"); 39 AssertType(new m.c(), "m.c"); 40 AssertType(m.c, "typeof m.c"); 46 let x: [g<string>, m.g<number>, () => c] = [new g<string>(), new m.g<number>(), () => new c()]; variable 48 AssertType(m, "any"); 49 AssertType([new g<string>(), new m.g<number>(), () => new c()], "[g<string>, m.g<number>, () => c]"… 52 AssertType(new m.g<number>(), "m.g<number>"); [all …]
|
D | declFileTypeAnnotationTypeQuery.ts | 23 module m { 43 function foo3(): typeof m.c { 44 AssertType(m.c, "typeof m.c"); 45 return m.c; 48 AssertType(m.c, "typeof m.c"); 49 return m.c; 63 function foo7(): typeof m.g { 64 AssertType(m.g, "typeof m.g"); 65 return m.g 68 AssertType(m.g, "typeof m.g"); [all …]
|
D | controlFlowSuperPropertyAccess.ts | 22 protected m?(): void; 26 super.m && super.m(); 27 AssertType(super.m && super.m(), "union"); 28 AssertType(super.m, "union"); 30 AssertType(super.m(), "void"); 31 AssertType(super.m, "() => void");
|
D | thisTypeInTaggedTemplateCall.ts | 22 static m<T>(this: new () => T, strings: TemplateStringsArray | string) { 29 Foo.m`test`; 30 AssertType(Foo.m`test`, "Foo"); 31 AssertType(Foo.m, "<T>(new () => T, union) => T"); 34 (Foo.m)`test`; 35 AssertType((Foo.m)`test`, "Foo"); 36 AssertType((Foo.m), "<T>(new () => T, union) => T"); 37 AssertType(Foo.m, "<T>(new () => T, union) => T");
|
D | privateStaticNameShadowing.ts | 22 static #f = X.#m(); 24 X.#m(); 25 AssertType(X.#m(), "number"); 26 AssertType(X.#m, "() => number"); 28 static #m() { 37 X.#m(); // Should check with X as the receiver with _b as the class constructor 38 AssertType(X.#m(), "any"); 39 AssertType(X.#m, "any");
|
D | conditionalOperatorWithIdenticalBCT.ts | 97 let result4: (t: A) => any = true ? (m) => m.propertyX : (n) => n.propertyA; 100 AssertType(true ? (m) => m.propertyX : (n) => n.propertyA, "(A) => any"); 102 AssertType((m) => m.propertyX, "(A) => any"); 103 AssertType(m, "A"); 104 AssertType(m.propertyX, "any"); 171 let result8: (t: A) => any = true ? (m) => m.propertyA : (n) => n.propertyX; 174 AssertType(true ? (m) => m.propertyA : (n) => n.propertyX, "(A) => any"); 176 AssertType((m) => m.propertyA, "(A) => number"); 177 AssertType(m, "A"); 178 AssertType(m.propertyA, "number"); [all …]
|
D | typeGuardNarrowsIndexedAccessOfKnownProperty11.ts | 23 declare const m: { [K in E]: string | null }; constant 24 AssertType(m, "{ 0: union; 1: union; }"); 27 if (m[E.A] !== null) { 28 m[E.A].toString(); // string 29 AssertType(m[E.A].toString(), "string"); 30 AssertType(m[E.A].toString, "() => string"); 31 AssertType(m[E.A], "string"); 32 AssertType(m, "{ 0: union; 1: union; }");
|
D | typeGuardNarrowsIndexedAccessOfKnownProperty12.ts | 26 declare const m: { [K in E]: string | null }; constant 27 AssertType(m, "{ A: union; B: union; }"); 30 if (m[E.A] !== null) { 31 m[E.A].toString(); // string 32 AssertType(m[E.A].toString(), "string"); 33 AssertType(m[E.A].toString, "() => string"); 34 AssertType(m[E.A], "string"); 35 AssertType(m, "{ A: union; B: union; }");
|
D | objectSpreadComputedProperty.ts | 27 let m: number = 13; 28 AssertType(m, "number"); 51 const o3 = { [a]: n, ...{}, [n]: n, ...{}, [m]: m }; 53 AssertType({ [a]: n, ...{}, [n]: n, ...{}, [m]: m }, "{}"); 62 AssertType([m], "number"); 63 AssertType(m, "number"); 64 AssertType(m, "number");
|
D | inferSecondaryParameter.ts | 23 interface Ib { m(test: string, fn: Function); } 25 let b: Ib = { m: function (test: string, fn: Function) { } }; 27 AssertType({ m: function (test: string, fn: Function) { } }, "{ m: (string, Function) => void; }"); 28 AssertType(m, "(string, Function) => void"); 33 b.m("test", function (bug) { 34 AssertType(b.m("test", function (bug) { let a: number = bug;}), "any"); 35 AssertType(b.m, "(string, Function) => any");
|
D | specializedInheritedConstructors1.ts | 33 let m: ViewOptions<Model> = { model: new Model() }; variable 34 AssertType(m, "ViewOptions<Model>"); 49 let aView2 = new View(m); 51 AssertType(new View(m), "View<Model>"); 53 AssertType(m, "ViewOptions<Model>"); 55 let myView = new MyView(m); // was error 57 AssertType(new MyView(m), "MyView"); 59 AssertType(m, "ViewOptions<Model>");
|
D | es6ModuleInternalImport.ts | 21 export module m { 24 export import a1 = m.a; 25 import a2 = m.a; 33 export import a3 = m.a; 34 import a4 = m.a; 39 export import a3 = m.a; 40 import a4 = m.a;
|
D | privateNameWhenNotUseDefineForClassFieldsInEsNexttargetesnext.ts | 26 m() { 33 m() { 47 AssertType(class { m() { new TestWithStatics().#prop // OK … 50 m() { 51 AssertType(m, "() => void"); 73 m() { 80 m() { 94 AssertType(class { m() { new TestNonStatics().#prop // OK … 97 m() { 98 AssertType(m, "() => void");
|
D | privateNameWhenNotUseDefineForClassFieldsInEsNexttargetes2020.ts | 26 m() { 33 m() { 47 AssertType(class { m() { new TestWithStatics().#prop // OK … 50 m() { 51 AssertType(m, "() => void"); 73 m() { 80 m() { 94 AssertType(class { m() { new TestNonStatics().#prop // OK … 97 m() { 98 AssertType(m, "() => void");
|