Home
last modified time | relevance | path

Searched +full:case +full:- +full:check +full:- +full:type (Results 1 – 25 of 499) sorted by relevance

12345678910>>...20

/arkcompiler/ets_frontend/ets2panda/checker/
DTSAnalyzer.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
29 checker::Type *TSAnalyzer::Check(ir::CatchClause *st) const in Check() function in ark::es2panda::checker::TSAnalyzer
32 ir::Expression *typeAnnotation = st->Param()->AsAnnotatedExpression()->TypeAnnotation(); in Check()
35 checker::Type *catchParamType = typeAnnotation->Check(checker); in Check()
37 if (!catchParamType->HasTypeFlag(checker::TypeFlag::ANY_OR_UNKNOWN)) { in Check()
38 …checker->ThrowTypeError("Catch clause variable type annotation must be 'any' or 'unknown' if speci… in Check()
39 st->Start()); in Check()
43 st->Body()->Check(checker); in Check()
48 checker::Type *TSAnalyzer::Check([[maybe_unused]] ir::ClassDefinition *node) const in Check() function in ark::es2panda::checker::TSAnalyzer
[all …]
/arkcompiler/runtime_core/tests/cts-generator/cts-template/
Dtest-schema.json2 "type": "object", string
4 "file-name",
10 "file-name": {
11 "type": "string" string
14 "type": "boolean" string
17 "type": "boolean" string
20 "type": "object", string
28 "type": "string" string
31 "type": "string" string
34 "type": "array", string
[all …]
Dmonitor.yaml1 # Copyright (c) 2021-2022 Huawei Device Co., Ltd.
6 # http://www.apache.org/licenses/LICENSE-2.0
14 ---
16 - name: PandaAssembly
68 - file-name: 'monitor'
79 … that case monitor is acquired by thread and monitor count is set to 1. The thread becomes the
88 - file-name: 'null_monitor'
89 description: Check panda.NullPointerException when accumulator contains null
92 - sig: monitorenter
97 - sig: monitorexit
[all …]
Djmp.yaml1 # Copyright (c) 2021-2022 Huawei Device Co., Ltd.
6 # http://www.apache.org/licenses/LICENSE-2.0
16 - file-name: "jmp"
23 - branch_target
25 - x_none
27 - file-name: "op_none"
30 - sig: jmp imm:i32
33 … description: Check execution is transferred, jump forward, backward, jump on current instruction.
34 code-template: |
37 check-type: exit-positive
[all …]
/arkcompiler/runtime_core/static_core/tests/cts-generator/cts-template/
Dtest-schema.json2 "type": "object", string
4 "file-name",
10 "file-name": {
11 "type": "string" string
14 "type": "boolean" string
17 "type": "boolean" string
20 "type": "object", string
28 "type": "string" string
31 "type": "string" string
34 "type": "array", string
[all …]
Djmp.yaml1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd.
6 # http://www.apache.org/licenses/LICENSE-2.0
16 - file-name: "jmp"
23 - branch_target
25 - x_none
27 - file-name: "op_none"
30 - sig: jmp imm:i32
33 … description: Check execution is transferred, jump forward, backward, jump on current instruction.
34 code-template: |
37 check-type: exit-positive
[all …]
/arkcompiler/ets_frontend/ets2panda/checker/typeChecker/
DTypeChecker.cpp2 * Copyright (c) 2021 - 2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
23 if (!node->TsType()->IsETSObjectType()) { in VisitArrowFunctionExpression()
24 ThrowTypeError({"Cannot infer arrow function type from context for type: '", node->TsType(), in VisitArrowFunctionExpression()
25 "', consider adding type explicitly"}, in VisitArrowFunctionExpression()
26 node->Start()); in VisitArrowFunctionExpression()
33 case ScriptExtension::ETS: in RunTypeChecker()
34 return ETSTypeChecker(checker).Check(node); in RunTypeChecker()
35 case ScriptExtension::JS: in RunTypeChecker()
36 return JSTypeChecker(checker).Check(node); in RunTypeChecker()
[all …]
/arkcompiler/ets_frontend/ets2panda/ir/ets/
DetsPrimitiveType.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
35 dumper->Add({{"type", "ETSPrimitiveType"}}); in Dump()
41 case PrimitiveType::BYTE: in Dump()
42 dumper->Add("byte"); in Dump()
44 case PrimitiveType::INT: in Dump()
45 dumper->Add("int"); in Dump()
47 case PrimitiveType::LONG: in Dump()
48 dumper->Add("long"); in Dump()
50 case PrimitiveType::SHORT: in Dump()
[all …]
/arkcompiler/ets_frontend/es2panda/ir/ts/
DtsAsExpression.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
36 …dumper->Add({{"type", "TSAsExpression"}, {"expression", expression_}, {"typeAnnotation", typeAnnot… in Dump()
41 expression_->Compile(pg); in Compile()
46 switch (arg->Type()) { in IsValidConstAssertionArgument()
47 case ir::AstNodeType::NUMBER_LITERAL: in IsValidConstAssertionArgument()
48 case ir::AstNodeType::STRING_LITERAL: in IsValidConstAssertionArgument()
49 case ir::AstNodeType::BIGINT_LITERAL: in IsValidConstAssertionArgument()
50 case ir::AstNodeType::BOOLEAN_LITERAL: in IsValidConstAssertionArgument()
51 case ir::AstNodeType::ARRAY_EXPRESSION: in IsValidConstAssertionArgument()
52 case ir::AstNodeType::OBJECT_EXPRESSION: in IsValidConstAssertionArgument()
[all …]
/arkcompiler/ets_runtime/test/aottest/builtin_inlining/Array/Pop/
DbuiltinArrayPop.ts7 * http://www.apache.org/licenses/LICENSE-2.0
20 var x = [1,2.1,-1,null,undefined,,false,NaN]
38 // Check inside try-block
81 //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
100 printPop(-1); //pgo: 2
101 //aot: [trace] Check Type: NotCallTarget1
102 //aot: -1
105 //aot: [trace] Check Type: NotCallTarget1
111 print('case 1 pop') //: case 1 pop
119 print(arr2.pop()); //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
[all …]
/arkcompiler/ets_frontend/ets2panda/ir/statements/
DlabelledStatement.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
28 ident_->SetTransformedNode(transformationName, transformedNode); in TransformChildren()
29 ident_ = transformedNode->AsIdentifier(); in TransformChildren()
33 body_->SetTransformedNode(transformationName, transformedNode); in TransformChildren()
34 body_ = transformedNode->AsStatement(); in TransformChildren()
46 dumper->Add({{"type", "LabelledStatement"}, {"label", ident_}, {"body", body_}}); in Dump()
52 ident_->Dump(dumper); in Dump()
53 dumper->Add(":"); in Dump()
54 dumper->Endl(); in Dump()
[all …]
DswitchCaseStatement.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
30 test_->SetTransformedNode(transformationName, transformedNode); in TransformChildren()
31 test_ = transformedNode->AsExpression(); in TransformChildren()
37 it->SetTransformedNode(transformationName, transformedNode); in TransformChildren()
38 it = transformedNode->AsStatement(); in TransformChildren()
56 …dumper->Add({{"type", "SwitchCase"}, {"test", AstDumper::Nullish(test_)}, {"consequent", consequen… in Dump()
62 dumper->Add("case "); in Dump()
63 test_->Dump(dumper); in Dump()
64 dumper->Add(":"); in Dump()
[all …]
/arkcompiler/ets_runtime/test/aottest/builtin_inlining/Array/FindFindIndex/
DbuiltinArrayFindFindIndex.ts7 * http://www.apache.org/licenses/LICENSE-2.0
38 print(inlineNotFindIndex) //: -1
60 print(inlineNotFindNumberIndex) //: -1
62 // Check inside try-block
71 // Check without args
97 print(x.findIndex(() => {})) //: -1
101 print(x.findIndex(x => false)) //: -1
103 print(x.findIndex((x,y) => {})) //: -1
126 //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
131 print('case 1 find') //: case 1 find
[all …]
/arkcompiler/ets_frontend/ets2panda/ir/base/
DspreadElement.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
32 …sion(static_cast<AnnotatedExpression const &>(other), allocator), decorators_(allocator->Adapter()) in SpreadElement()
37 argument_ = other.argument_->Clone(allocator, this)->AsExpression(); in SpreadElement()
41 decorators_.emplace_back(decorator->Clone(allocator, this)); in SpreadElement()
47 …if (auto *const clone = allocator->New<SpreadElement>(Tag {}, *this, allocator); clone != nullptr)… in Clone()
49 clone->SetParent(parent); in Clone()
60 switch (argument_->Type()) { in ValidateExpression()
61 case AstNodeType::OBJECT_EXPRESSION: { in ValidateExpression()
62 info = argument_->AsObjectExpression()->ValidateExpression(); in ValidateExpression()
[all …]
Dproperty.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
36 auto *const key = key_ != nullptr ? key_->Clone(allocator, nullptr)->AsExpression() : nullptr; in Clone()
37 …auto *const value = value_ != nullptr ? value_->Clone(allocator, nullptr)->AsExpression() : nullpt… in Clone()
39 if (auto *const clone = allocator->New<Property>(Tag {}, *this, key, value); clone != nullptr) { in Clone()
41 key->SetParent(clone); in Clone()
44 value->SetParent(clone); in Clone()
47 clone->SetParent(parent); in Clone()
62 switch (value_->Type()) { in ConvertibleToPatternProperty()
63 case AstNodeType::OBJECT_EXPRESSION: { in ConvertibleToPatternProperty()
[all …]
/arkcompiler/ets_runtime/test/aottest/builtin_inlining/Array/ForEach/
DbuiltinArrayForEach.ts7 * http://www.apache.org/licenses/LICENSE-2.0
49 // Check without args
69 // Check inside try-block
88 //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
97 //aot: [trace] Check Type: NotStableArray2
104 print('case 1 forEach') //: case 1 forEach
112 print(arr2.forEach(x => x == 1)); //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
119 print('case 2 forEach') //: case 2 forEach
137 print('case 3 forEach') //: case 3 forEach
148 print(marr.forEach(x => x == 1)); //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
[all …]
/arkcompiler/ets_frontend/ets2panda/ir/expressions/
DassignmentExpression.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
36 switch (left_->Type()) { in ConvertibleToAssignmentPatternLeft()
37 case AstNodeType::ARRAY_EXPRESSION: { in ConvertibleToAssignmentPatternLeft()
38 return left_->AsArrayExpression()->ConvertibleToArrayPattern(); in ConvertibleToAssignmentPatternLeft()
40 case AstNodeType::SPREAD_ELEMENT: { in ConvertibleToAssignmentPatternLeft()
41 return mustBePattern && left_->AsSpreadElement()->ConvertibleToRest(false); in ConvertibleToAssignmentPatternLeft()
43 case AstNodeType::OBJECT_EXPRESSION: { in ConvertibleToAssignmentPatternLeft()
44 return left_->AsObjectExpression()->ConvertibleToObjectPattern(); in ConvertibleToAssignmentPatternLeft()
46 case AstNodeType::ASSIGNMENT_EXPRESSION: { in ConvertibleToAssignmentPatternLeft()
[all …]
DarrayExpression.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
39 decorators_(allocator->Adapter()), in ArrayExpression()
40 elements_(allocator->Adapter()) in ArrayExpression()
48 elements_.emplace_back(element->Clone(allocator, this)->AsExpression()); in ArrayExpression()
52 decorators_.emplace_back(decorator->Clone(allocator, this)); in ArrayExpression()
58 …if (auto *const clone = allocator->New<ArrayExpression>(Tag {}, *this, allocator); clone != nullpt… in Clone()
60 clone->SetParent(parent); in Clone()
72 switch (it->Type()) { in ConvertibleToArrayPattern()
73 case AstNodeType::ARRAY_EXPRESSION: { in ConvertibleToArrayPattern()
[all …]
DobjectExpression.cpp2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
43 decorators_(allocator->Adapter()), in ObjectExpression()
44 properties_(allocator->Adapter()) in ObjectExpression()
52 properties_.emplace_back(property->Clone(allocator, this)->AsExpression()); in ObjectExpression()
56 decorators_.emplace_back(decorator->Clone(allocator, this)); in ObjectExpression()
62 …if (auto *const clone = allocator->New<ObjectExpression>(Tag {}, *this, allocator); clone != nullp… in Clone()
64 clone->SetParent(parent); in Clone()
73 ValidationInfo info = prop->ValidateExpression(); in ValidateProperty()
74 if (prop->Kind() == PropertyKind::PROTO) { in ValidateProperty()
[all …]
/arkcompiler/ets_runtime/test/aottest/builtin_inlining/map/Get/
DbuiltinMapGet.ts7 * http://www.apache.org/licenses/LICENSE-2.0
43 …ap = new Map([[0, 0], [0.0, 5], [-1, 1], [2.5, -2.5], [NaN, Infinity], [2000, -0.0], [56, "oops"],…
45 // Check without params
49 // Check with adding element undefined
54 // Check with single param
60 print(myMap.get(2.5)); //: -2.5
64 print("1/x: " + 1 / myMap.get(2000)); //: 1/x: -Infinity
66 // Check with 2 params
70 // Check with 3 params
72 print(myMap.get(-1, 10.2, 15)); //: 1
[all …]
/arkcompiler/runtime_core/tests/cts-generator/generator/
Dgenerator.rb1 # Copyright (c) 2021-2022 Huawei Device Co., Ltd.
6 # http://www.apache.org/licenses/LICENSE-2.0
37 TEST_NAME = 'file-name'
48 TEST_PANDA_OPTIONS = 'panda-options'
49 TEST_RUN_OPTIONS = 'runner-options'
52 COMMAND_FILE_NAME = 'file-name'
53 TEST_CODE_TEMPLATE = 'code-template'
54 TEST_HEADER_TEMPLATE = 'header-template'
55 TEST_CHECK_TYPE = 'check-type'
59 TEST_TEMPLATE_CASES = 'template-cases'
[all …]
/arkcompiler/runtime_core/static_core/tests/cts-generator/generator/
Dgenerator.rb1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd.
6 # http://www.apache.org/licenses/LICENSE-2.0
37 TEST_NAME = 'file-name'
48 TEST_PANDA_OPTIONS = 'panda-options'
49 TEST_RUN_OPTIONS = 'runner-options'
52 COMMAND_FILE_NAME = 'file-name'
53 TEST_CODE_TEMPLATE = 'code-template'
54 TEST_HEADER_TEMPLATE = 'header-template'
55 TEST_CHECK_TYPE = 'check-type'
59 TEST_TEMPLATE_CASES = 'template-cases'
[all …]
/arkcompiler/ets_runtime/test/aottest/builtin_inlining/Array/Filter/
DbuiltinArrayFilter.ts7 * http://www.apache.org/licenses/LICENSE-2.0
53 // Check without args
73 // Check inside try-block
92 //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
97 print('case 1 filter') //: case 1 filter
105 print(arr2.filter(x => x == 1)); //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
112 print('case 2 filter') //: case 2 filter
130 print('case 3 filter') //: case 3 filter
141 print(marr.filter(x => x == 1)); //aot: [trace] Check Type: BuiltinInstanceHClassMismatch
148 print('case 4 filter') //: case 4 filter
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/utils/
Dtest_core_typeduarray_function2.j27 * http://www.apache.org/licenses/LICENSE-2.0
23 failures += check(testSubarrayWithOutParam(), "Try to Array subarray() function");
24 failures += check(testSubarrayOneParam(), "Try to Array subarray(1) function");
25 failures += check(testSubarrayTwoParams(), "Try to Array subarray(2) function");
26 …failures += check(testSubarrayTwoParamsWithOtherNumber(), "Try to Array subarray(2) With Other Num…
27 …failures += check(testSubarrayOneLengthTwoParams(), "Try to Array subarray(2) One Length Two Param…
29 failures += check(testNonEmptyTypedUArraySetValue(), "Test Set Value to Nonempty Array");
31 …failures += check(testTypedUArrayIncludesOneParamWithNormalNum(), "Test Includes One Param With No…
32 …failures += check(testTypedUArrayIncludesOneParamWithAbnormalNum(), "Test Includes One Param With …
33 …failures += check(testTypedUArrayIncludesTwoParamWithNormalIndex(), "Test Includes Two Param With …
[all …]
/arkcompiler/ets_runtime/test/aottest/builtin_inlining/map/Delete/
DbuiltinMapDelete.ts7 * http://www.apache.org/licenses/LICENSE-2.0
43 …ap = new Map([[0, 0], [0.0, 5], [-1, 1], [2.5, -2.5], [NaN, Infinity], [2000, -0.0], [56, "oops"],…
45 // Check without params
49 // Check with seting element undefined
54 // Check with single param
62 // Check with 2 params
66 // Check with 3 params
68 print(myMap.delete(-51, 10.2, 15)); //: false
70 // Check after inserting elements
71 myMap.set(2000, 1e-98);
[all …]

12345678910>>...20