/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | controlFlowJavascript.ts | 21 let cond = true; 22 AssertType(cond, "boolean"); 30 if (cond) { 31 AssertType(cond, "boolean"); 38 if (cond) { 39 AssertType(cond, "boolean"); 57 if (cond) { 58 AssertType(cond, "boolean"); 65 if (cond) { 66 AssertType(cond, "boolean"); [all …]
|
D | controlFlowDoWhileStatement.ts | 21 let cond: boolean; 22 AssertType(cond, "boolean"); 37 } while (cond) 38 AssertType(cond, "boolean"); 59 } while (cond) 60 AssertType(cond, "boolean"); 87 } while (cond) 88 AssertType(cond, "boolean"); 131 } while (cond) 132 AssertType(cond, "boolean"); [all …]
|
D | controlFlowWhileStatement.ts | 21 let cond: boolean; 22 AssertType(cond, "boolean"); 33 while (cond) { 34 AssertType(cond, "boolean"); 49 while (cond) { 50 AssertType(cond, "boolean"); 72 while (cond) { 73 AssertType(cond, "boolean"); 124 while (cond) { 125 AssertType(cond, "boolean"); [all …]
|
D | controlFlowArrays.ts | 21 declare function cond(): boolean; 101 if (cond()) { 102 AssertType(cond(), "boolean"); 103 AssertType(cond, "() => boolean"); 124 if (cond()) { 125 AssertType(cond(), "boolean"); 126 AssertType(cond, "() => boolean"); 157 if (cond()) { 158 AssertType(cond(), "boolean"); 159 AssertType(cond, "() => boolean"); [all …]
|
D | literalTypeWidening.ts | 57 function f2(cond: boolean) { 58 const c1 = cond ? "foo" : "bar"; // widening "foo" | widening "bar" 60 AssertType(cond ? "foo" : "bar", "union"); 61 AssertType(cond, "boolean"); 69 const c3 = cond ? c1 : c2; // "foo" | "bar" 71 AssertType(cond ? c1 : c2, "union"); 72 AssertType(cond, "boolean"); 76 const c4 = cond ? c3 : "baz"; // "foo" | "bar" | widening "baz" 78 AssertType(cond ? c3 : "baz", "union"); 79 AssertType(cond, "boolean"); [all …]
|
D | literalTypes2.ts | 25 let cond: boolean; variable 26 AssertType(cond, "boolean"); 194 const c1 = cond ? 1 : 2; 196 AssertType(cond ? 1 : 2, "union"); 197 AssertType(cond, "boolean"); 201 const c2 = cond ? 1 : "two"; 203 AssertType(cond ? 1 : "two", "union"); 204 AssertType(cond, "boolean"); 208 const c3 = cond ? E.A : cond ? true : 123; 210 AssertType(cond ? E.A : cond ? true : 123, "union"); [all …]
|
D | controlFlowForInStatement.ts | 27 let cond: boolean; 28 AssertType(cond, "boolean"); 41 if (cond) { 42 AssertType(cond, "boolean"); 51 if (cond) { 52 AssertType(cond, "boolean");
|
D | controlFlowConditionalExpression.ts | 24 let cond: boolean; 25 AssertType(cond, "boolean"); 27 cond ? x = "" : x = 3; 28 AssertType(cond ? x = "" : x = 3, "union"); 29 AssertType(cond, "boolean");
|
D | controlFlowWithIncompleteTypes.ts | 23 declare let cond: boolean; 24 AssertType(cond, "boolean"); 31 while (cond) { 32 AssertType(cond, "boolean"); 60 while (cond) { 61 AssertType(cond, "boolean");
|
D | typeGuardsInWhileStatement.ts | 21 let cond: boolean; 22 AssertType(cond, "boolean"); 49 if (cond) continue; 50 AssertType(cond, "boolean"); 70 if (cond) break; 71 AssertType(cond, "boolean");
|
D | controlFlowBinaryAndExpression.ts | 24 let cond: boolean; 25 AssertType(cond, "boolean"); 46 cond && (x = 0); 47 AssertType(cond && (x = 0), "int"); 48 AssertType(cond, "boolean");
|
D | typeGuardsInDoStatement.ts | 21 let cond: boolean; 22 AssertType(cond, "boolean"); 58 if (cond) continue; 59 AssertType(cond, "boolean"); 85 if (cond) break; 86 AssertType(cond, "boolean");
|
D | typeGuardsInForStatement.ts | 21 let cond: boolean; 22 AssertType(cond, "boolean"); 59 if (cond) continue; 60 AssertType(cond, "boolean"); 81 if (cond) break; 82 AssertType(cond, "boolean");
|
D | controlFlowIteration.ts | 21 let cond: boolean; 22 AssertType(cond, "boolean"); 31 if (cond) { 32 AssertType(cond, "boolean");
|
D | controlFlowBinaryOrExpression.ts | 24 let cond: boolean; 25 AssertType(cond, "boolean"); 46 cond || (x = 0); 47 AssertType(cond || (x = 0), "union"); 48 AssertType(cond, "boolean");
|
D | controlFlowForStatement.ts | 21 let cond: boolean; 22 AssertType(cond, "boolean"); 28 for (x = ""; cond; x = 5) { 32 AssertType(cond, "boolean"); 45 for (x = 5; cond; x = x.length) { 49 AssertType(cond, "boolean");
|
D | typeGuardsAsAssertions.ts | 23 let cond: boolean; 24 AssertType(cond, "boolean"); 58 while (cond) { 59 AssertType(cond, "boolean"); 90 while (cond) { 91 AssertType(cond, "boolean"); 123 while (cond) { 124 AssertType(cond, "boolean");
|
D | defaultParameterAddsUndefinedWithStrictNullChecks.ts | 154 declare const cond: boolean; constant 155 AssertType(cond, "boolean"); 157 function removeNothing(y = cond ? true : undefined) {
|
/arkcompiler/runtime_core/libpandabase/ |
D | macros.h | 180 #define ASSERT(cond) \ argument 181 if (UNLIKELY(!(cond))) { \ 182 ASSERT_FAIL(#cond); \ 186 #define ASSERT_DO(cond, func) \ argument 188 if (auto cond_val = cond; UNLIKELY(!(cond_val))) { \ 190 ASSERT_FAIL(#cond); \ 194 #define ASSERT_PRINT(cond, message) \ argument 196 if (auto cond_val = cond; UNLIKELY(!(cond_val))) { \ 198 ASSERT_FAIL(#cond); \ 202 #define ASSERT_RETURN(cond) assert(cond) argument [all …]
|
/arkcompiler/ets_runtime/ecmascript/ |
D | log_wrapper.h | 31 #define LOG_ECMA_IF(cond, level) (cond) && ARK_LOG(level, Component::ALL) argument
|
D | ecma_macros.h | 154 #define DASSERT(cond) assert(cond) argument 156 #define DASSERT_PRINT(cond, message) \ argument 157 if (auto cond_val = (cond); UNLIKELY(!(cond_val))) { \ 159 ASSERT(#cond &&cond_val); \ 162 #define DASSERT(cond) static_cast<void>(0) // NOLINT(cppcoreguidelines-macro-usage) argument 163 #define DASSERT_PRINT(cond, message) static_cast<void>(0) // NOLINT(cppcoreguidelines-macro-usage) argument 167 #define RASSERT(cond) assert(cond) argument 169 #define RASSERT_PRINT(cond, message) \ argument 170 if (auto cond_val = cond; UNLIKELY(!(cond_val))) { \ 172 RASSERT(#cond &&cond_val); \
|
/arkcompiler/toolchain/tooling/test/utils/ |
D | test_util.h | 238 #define ASSERT_TRUE(cond) \ argument 240 auto res = (cond); \ 242 ASSERT_FAIL_(res, true, #cond, "true", "equal to"); \ 246 #define ASSERT_FALSE(cond) \ argument 248 auto res = (cond); \ 250 ASSERT_FAIL_(res, false, #cond, "false", "equal to"); \
|
/arkcompiler/runtime_core/libpandafile/ |
D | helpers.h | 51 #define THROW_IF(cond, msg) \ argument 52 if (UNLIKELY(cond)) { \ 56 #define THROW_IF(cond, msg) \ argument 57 if (UNLIKELY(cond)) { \
|
/arkcompiler/runtime_core/libpandabase/utils/ |
D | logger.h | 498 #define LOG_IF(cond, level, component) (cond) && LOG(level, component) argument 501 #define PLOG_IF(cond, level, component) (cond) && PLOG(level, component) argument
|
/arkcompiler/ets_runtime/ecmascript/compiler/assembler/aarch64/ |
D | assembler_aarch64.h | 331 void CMov(const Register &rd, const Register &rn, const Operand &operand, Condition cond); 334 void B(Condition cond, Label *label); 335 void B(Condition cond, int32_t imm);
|