Home
last modified time | relevance | path

Searched refs:item (Results 1 – 25 of 125) sorted by relevance

12345

/arkcompiler/ets_runtime/test/typeinfer/automatedcases/
DobjectInstantiationFromUnionSpread.ts34 a.map(item => ({ ...item })).filter(value => {});
35 AssertType(a.map(item => ({ ...item })).filter(value => {}), "(union)[]");
36 AssertType(a.map(item => ({ ...item })).filter, "{ <S extends union>((union, number, (union)[]) => …
37 AssertType(a.map(item => ({ ...item })), "(union)[]");
39 AssertType(item => ({ ...item }), "(Item) => union");
40 AssertType(item, "Item");
41 AssertType(({ ...item }), "union");
42 AssertType({ ...item }, "union");
43 AssertType(item, "Item");
49 a.map(item => ({ ...item })).filter(value => {});
[all …]
DemitThisInObjectLiteralGetter.ts23 AssertType({ get foo() { return item => this.bar(item); }}, "{ readonly foo: (any) => …
28 AssertType(item => this.bar(item), "(any) => any");
29 AssertType(item, "any");
30 AssertType(this.bar(item), "any");
33 AssertType(item, "any");
34 return item => this.bar(item);
DsourceMapValidationLambdaSpanningMultipleLines.ts21 ((item: string) =>
22 AssertType(((item: string) => item), "(string) => string");
23 AssertType((item: string) => item, "(string) => string");
24 AssertType(item, "string");
26 item
27 AssertType(item, "string");
DcontravariantInferenceAndTypeGuard.ts26 type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListI…
27 …, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>…
44 const filter1 = list2.filter(function(item, node, list): item is Test {
47 AssertType(function(item, node, list): item is Test { this.b; // $ExpectType string item; // …
48 AssertType(item, "union");
51 AssertType(list2.filter(function(item, node, list): item is Test { this.b; // $ExpectType string…
57 item; // $ExpectType Test | null
58 AssertType(item, "union");
66 AssertType(!!item, "boolean");
67 AssertType(!item, "boolean");
[all …]
DcontextuallyTypedByDiscriminableUnion.ts30 function invoke(item: ADT) {
31 if (item.kind === "a") {
32 AssertType(item.kind === "a", "boolean");
33 AssertType(item.kind, "union");
36 item.method("");
37 AssertType(item.method(""), "number");
38 AssertType(item.method, "(string) => number");
42 item.method(42);
43 AssertType(item.method(42), "string");
44 AssertType(item.method, "(number) => string");
DspreadExpressionContextualType.ts31 function test<T extends Apple | Orange>(item: T): T {
32 AssertType({ ...item }, "T");
33 AssertType(item, "T");
34 return { ...item };
37 function test2<T extends Apple | Orange>(item: T): T {
38 const x = { ...item };
40 AssertType({ ...item }, "T");
41 AssertType(item, "T");
Dfor-of58.ts27 for (const item of arr) { constant
28 item.x;
29 AssertType(item.x, "string");
31 item.y;
32 AssertType(item.y, "string");
DstringEnumInElementAccess01.ts33 declare const item: Item; constant
34 AssertType(item, "Item");
39 const snb: string | number | boolean = item[e];
41 AssertType(item[e], "union");
42 AssertType(item, "Item");
DjsDeclarationsExportAssignmentExpressionPlusSecondary.ts35 AssertType(module.exports = { thing: "ok", also: "ok", desc: { item: "ok" }}, "{…
37 AssertType({ thing: "ok", also: "ok", desc: { item: "ok" }}, "{ thing: string; a…
49 AssertType({ item: "ok" }, "{ item: string; }");
51 item: "ok"
52 AssertType(item, "string");
/arkcompiler/runtime_core/libpandafile/
Dpgo.cpp22 std::string ProfileOptimizer::GetNameInfo(const std::unique_ptr<BaseItem> &item) in GetNameInfo() argument
25 if (item->GetName() == CLASS_ITEM) { in GetNameInfo()
26 identity = static_cast<ClassItem *>(item.get())->GetNameItem()->GetData(); in GetNameInfo()
31 } else if (item->GetName() == STRING_ITEM) { in GetNameInfo()
32 identity = static_cast<StringItem *>(item.get())->GetData(); in GetNameInfo()
41 void ProfileOptimizer::MarkProfileItem(std::unique_ptr<BaseItem> &item, bool set_pgo) const in MarkProfileItem() argument
44 if (item->GetName() == CLASS_ITEM) { in MarkProfileItem()
45 item->SetPGORank(PGO_CLASS_DEFAULT_COUNT + inc); in MarkProfileItem()
46 } else if (item->GetName() == STRING_ITEM) { in MarkProfileItem()
47 item->SetPGORank(PGO_STRING_DEFAULT_COUNT + inc); in MarkProfileItem()
[all …]
Dfile_item_container.cpp26 T *Deduplicate(T *item) in Deduplicate() argument
30 ItemData item_data(item); in Deduplicate()
34 return item; in Deduplicate()
38 if (item != result) { in Deduplicate()
39 item->SetNeedsEmit(false); in Deduplicate()
85 explicit ItemData(BaseItem *item) : item_(item) in ItemData() argument
150 auto *item = it->second; in GetOrInsert() local
151 if (item->IsForeign() == is_foreign) { in GetOrInsert()
152 return static_cast<T *>(item); in GetOrInsert()
160 auto *item = static_cast<T *>(ii->get()); in GetOrInsert() local
[all …]
Dfile_item_container.h192 void DeduplicateLineNumberProgram(DebugInfoItem *item, ItemDeduper *deduper);
243 bool Add(IndexedItem *item);
245 bool Has(IndexedItem *item) const in Has() argument
247 auto res = index_.find(item); in Has()
251 void Remove(IndexedItem *item) in Remove() argument
253 index_.erase(item); in Remove()
264 for (auto *item : index_) { in UpdateItems()
265 item->SetIndex(start, end, i++); in UpdateItems()
271 for (auto *item : index_) { in Reset()
272 item->ClearIndexes(); in Reset()
[all …]
/arkcompiler/ets_runtime/test/moduletest/arrayforeach/
Darrayforeach.js23 let func = (item, index) => `${index}_${JSON.stringify(item)}`; argument
26 array1.forEach((item, index) => {
27 print(func(item, index));
31 array2.forEach((item, index) => {
33 print(func(item, index));
37 array3.forEach((item, index) => {
38 func(item, index);
43 array4.forEach((item, index) => {
44 func(item, index);
/arkcompiler/runtime_core/libpandafile/tests/
Dpgo_test.cpp63 for (auto &item : container.GetItems()) { variable
64 if (item->GetName() == CLASS_ITEM) {
65 profile_opt.MarkProfileItem(item, true);
66 …EXPECT_EQ(item->GetPGORank(), panda::panda_file::PGO_CLASS_DEFAULT_COUNT + 1U); // 1 means set pgo
67 profile_opt.MarkProfileItem(item, false);
68 EXPECT_EQ(item->GetPGORank(), panda::panda_file::PGO_CLASS_DEFAULT_COUNT);
69 } else if (item->GetName() == STRING_ITEM) {
70 profile_opt.MarkProfileItem(item, true);
71 …EXPECT_EQ(item->GetPGORank(), panda::panda_file::PGO_STRING_DEFAULT_COUNT + 1U); // 1 means set p…
72 profile_opt.MarkProfileItem(item, false);
[all …]
Dfile_item_container_test.cpp883 auto item = items.begin(); variable
884 EXPECT_EQ((*item)->GetName(), CLASS_ITEM);
885 EXPECT_EQ(panda::panda_file::pgo::ProfileOptimizer::GetNameInfo(*item), "Test");
886 item++;
887 EXPECT_EQ((*item)->GetName(), CLASS_ITEM);
888 EXPECT_EQ(panda::panda_file::pgo::ProfileOptimizer::GetNameInfo(*item), "AA");
889 item++;
890 EXPECT_EQ((*item)->GetName(), CLASS_ITEM);
891 EXPECT_EQ(panda::panda_file::pgo::ProfileOptimizer::GetNameInfo(*item), "BB");
892 item++;
[all …]
Dfile_items_test.cpp30 LineNumberProgramItem item(nullptr);
35 EXPECT_FALSE(item.EmitSpecialOpcode(0, LINE_MAX_INC + 1));
36 EXPECT_FALSE(item.EmitSpecialOpcode(0, LINE_MIN_INC - 1));
37 EXPECT_FALSE(item.EmitSpecialOpcode(100, LINE_MAX_INC));
43 ASSERT_TRUE(item.EmitSpecialOpcode(pc_inc, line_inc));
49 ASSERT_TRUE(item.Write(&writer));
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/contextualOverloadListFromArrayUnion/
Dtwo.ts24 export const yThen = y.map(item => item.length);
26 AssertType(y.map(item => item.length), "number[]");
28 AssertType(item => item.length, "(union) => number");
29 AssertType(item, "union");
30 AssertType(item.length, "number");
Done.ts24 export const yThen = y.map(item => item.length);
26 AssertType(y.map(item => item.length), "number[]");
28 AssertType(item => item.length, "(string) => number");
29 AssertType(item, "string");
30 AssertType(item.length, "number");
/arkcompiler/runtime_core/tests/cts-generator/generator/
Ddefinitions.rb25 @data.each do |item|
26 LOG.debug "check #{item}"
28 … if item.key?(Generator::DEF_TEMPLATE_NAME) && item[Generator::DEF_TEMPLATE_NAME] == item_name
29 return item[Generator::DEF_TEMPLATE]
37 @data.each do |item|
38 … if item.key?(Generator::DEF_TEMPLATE_NAME) && item[Generator::DEF_TEMPLATE_NAME] == item_name
/arkcompiler/runtime_core/assembler/tests/
Dassembler_parser_test.cpp45 auto item = p.Parse(v); variable
49 EXPECT_EQ(item.Value().function_table.at(sig_main).ins[0].regs[0], 1) << "1 expected";
50 EXPECT_EQ(item.Value().function_table.at(sig_main).ins[0].regs[1], 2) << "2 expected";
67 auto item = p.Parse(v); variable
71 EXPECT_EQ(item.Value().function_table.at(sig_main).ins[0].label, "label") << "label expected";
72 EXPECT_EQ(item.Value().function_table.at(sig_main).ins[0].set_label, true) << "true expected";
73 …EXPECT_EQ(item.Value().function_table.at(sig_main).ins[0].opcode, Opcode::INVALID) << "NONE expect…
90 auto item = p.Parse(v); variable
107 auto item = p.Parse(v); variable
124 auto item = p.Parse(v); variable
[all …]
Dparser_test.cpp31 auto item = p.Parse(v); in TEST() local
35 ASSERT_EQ(item.Value().function_table.at(sig_main).ins[0].opcode, Opcode::MOV); in TEST()
36 ASSERT_EQ(item.Value().function_table.at(sig_main).ins[0].regs[0], 1) << "1 expected"; in TEST()
37 ASSERT_EQ(item.Value().function_table.at(sig_main).ins[0].regs[1], 2) << "2 expected"; in TEST()
48 auto item = p.Parse(v); in TEST() local
52 ASSERT_EQ(item.Value().function_table.at(sig_main).ins[0].label, "label") << "label expected"; in TEST()
53 ASSERT_EQ(item.Value().function_table.at(sig_main).ins[0].set_label, true) << "true expected"; in TEST()
54 …ASSERT_EQ(item.Value().function_table.at(sig_main).ins[0].opcode, Opcode::INVALID) << "NONE expect… in TEST()
65 auto item = p.Parse(v); in TEST() local
76 auto item = p.Parse(v); in TEST() local
[all …]
/arkcompiler/ets_frontend/test/scripts/sdk_test/
Dpreparation.py87 for item in os.listdir(sdk_zip_path):
88 if item != '.DS_Store':
90 with zipfile.ZipFile(os.path.join(sdk_zip_path, item)) as zip_file:
108 for item in os.listdir(sdk_path):
109 if item != '.DS_Store':
111 if item == 'toolchains':
113 os.path.join(sdk_path, item, 'restool'))
115 os.path.join(sdk_path, item, 'ark_disasm'))
116 elif item == 'ets':
117 add_executable_permission(os.path.join(sdk_path, item, 'build-tools',
[all …]
/arkcompiler/ets_frontend/ts2panda/tests/expression/
Dconditions.test.ts46 let jumps = insns.filter(item => item instanceof Jeqz);
60 let jumps = insns.filter(item => item instanceof Jeqz);
76 let jumps = insns.filter(item => (item instanceof Jeqz || item instanceof Jmp));
77 let labels = insns.filter(item => (item instanceof Label));
170 let jumps = insns.filter(item => (item instanceof Jeqz || item instanceof Jmp));
171 let labels = insns.filter(item => (item instanceof Label));
/arkcompiler/toolchain/tooling/base/
Dpt_json.cpp353 cJSON *item = cJSON_GetObjectItem(object_, key); in GetBool() local
354 if (item == nullptr) { in GetBool()
357 if (cJSON_IsBool(item) == 0) { in GetBool()
361 *value = cJSON_IsTrue(item) != 0; in GetBool()
397 cJSON *item = cJSON_GetObjectItem(object_, key); in GetDouble() local
398 if (item == nullptr) { in GetDouble()
401 if (cJSON_IsNumber(item) == 0) { in GetDouble()
405 *value = item->valuedouble; in GetDouble()
411 cJSON *item = cJSON_GetObjectItem(object_, key); in GetString() local
412 if (item == nullptr) { in GetString()
[all …]
/arkcompiler/ets_frontend/ts2panda/tests/statements/
DforIn.test.ts74 let jumps = insns.filter(item => (item instanceof Jmp || item instanceof Jeqz));
114 let jmp = <Jmp>insns.find(item => (item instanceof Jmp));
115 let jeqz = <Jeqz>insns.find(item => (item instanceof Jeqz));
152 let jumps = insns.filter(item => (item instanceof Jmp || item instanceof Jeqz));
189 let jumps = insns.filter(item => (item instanceof Jmp || item instanceof Jeqz));

12345