From b2f6f74a3f17a9d2e75466c25b81de0c24dff43b Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 14:04:57 +0300 Subject: [PATCH 1/9] testing commit 1 Signed-off-by: ermolaevavarvara --- ets2panda/checker/ETSAnalyzer.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index 1b18db86c4..dbc6575734 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -1,17 +1,3 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ #include "ETSAnalyzer.h" #include "varbinder/varbinder.h" -- Gitee From fe6db2b7a8b54c5d291f8762c5cca51e0aacb220 Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 14:38:25 +0300 Subject: [PATCH 2/9] testing commit 2 --- ets2panda/checker/ETSAnalyzer.cpp | 16 ++++++++++++++++ ets2panda/parser/ETSparser.cpp | 6 ++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index dbc6575734..41154f9def 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -1,3 +1,19 @@ +/** + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include "ETSAnalyzer.h" #include "varbinder/varbinder.h" diff --git a/ets2panda/parser/ETSparser.cpp b/ets2panda/parser/ETSparser.cpp index 736173af5a..7338be7acd 100644 --- a/ets2panda/parser/ETSparser.cpp +++ b/ets2panda/parser/ETSparser.cpp @@ -3025,7 +3025,8 @@ ir::AnnotatedExpression *ETSParser::GetAnnotatedExpressionFromParam() parameter->SetRange( {parameter->AsIdentifier()->Decorators().front()->Start(), Lexer()->GetToken().End()}); } - } break; + break; + } case lexer::TokenType::PUNCTUATOR_PERIOD_PERIOD_PERIOD: { const auto start_loc = Lexer()->GetToken().Start(); @@ -3040,7 +3041,8 @@ ir::AnnotatedExpression *ETSParser::GetAnnotatedExpressionFromParam() parameter = AllocNode(ir::AstNodeType::REST_ELEMENT, Allocator(), rest_ident); parameter->SetRange({start_loc, Lexer()->GetToken().End()}); - } break; + break; + } default: { ThrowSyntaxError("Unexpected token, expected an identifier."); -- Gitee From 02f600453490afc5f9b2bf86b2e3ac803aeff7ea Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 17:57:36 +0300 Subject: [PATCH 3/9] [ArkTS ets_frontend] codestyle fixes --- ets2panda/checker/ETSAnalyzer.cpp | 1 - ets2panda/compiler/core/ETSGen.h | 22 +++++++++---------- ets2panda/compiler/lowering/util.cpp | 5 +++-- ets2panda/ir/base/templateElement.cpp | 2 +- ets2panda/scripts/es2panda_coverage.sh | 2 +- .../{test-runner.py => test_runner.py} | 1 + 6 files changed, 17 insertions(+), 16 deletions(-) rename ets2panda/scripts/{test-runner.py => test_runner.py} (99%) diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index 41154f9def..001a68b67f 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -13,7 +13,6 @@ * limitations under the License. */ - #include "ETSAnalyzer.h" #include "varbinder/varbinder.h" diff --git a/ets2panda/compiler/core/ETSGen.h b/ets2panda/compiler/core/ETSGen.h index 77e6c004b0..7d80286b2c 100644 --- a/ets2panda/compiler/core/ETSGen.h +++ b/ets2panda/compiler/core/ETSGen.h @@ -883,15 +883,15 @@ private: } } // NOLINTBEGIN(cppcoreguidelines-macro-usage, readability-container-size-empty) -#define COMPILE_ARG(idx) \ - ASSERT(idx < arguments.size()); \ - ASSERT(idx < signature->Params().size() || signature->RestVar() != nullptr); \ - auto *paramType##idx = Checker()->MaybeBoxedType( \ - idx < signature->Params().size() ? signature->Params()[idx] : signature->RestVar(), Allocator()); \ - auto ttctx##idx = TargetTypeContext(this, paramType##idx); \ - arguments[idx]->Compile(this); \ - VReg arg##idx = AllocReg(); \ - ApplyConversion(arguments[idx], nullptr); \ +#define COMPILE_ARG(idx) \ + ASSERT((idx) < arguments.size()); \ + ASSERT((idx) < signature->Params().size() || signature->RestVar() != nullptr); \ + auto *paramType##idx = Checker()->MaybeBoxedType( \ + idx < signature->Params().size() ? signature->Params()[(idx)] : signature->RestVar(), Allocator()); \ + auto ttctx##idx = TargetTypeContext(this, paramType##idx); \ + arguments[idx]->Compile(this); \ + VReg arg##idx = AllocReg(); \ + ApplyConversion(arguments[idx], nullptr); \ ApplyConversionAndStoreAccumulator(arguments[idx], arg##idx, paramType##idx); template @@ -1004,8 +1004,8 @@ private: #undef COMPILE_ARG #define COMPILE_ARG(idx) \ - ASSERT(idx < arguments.size()); \ - ASSERT(idx + 2U < signature->Params().size() || signature->RestVar() != nullptr); \ + ASSERT((idx) < arguments.size()); \ + ASSERT((idx) + 2U < signature->Params().size() || signature->RestVar() != nullptr); \ auto *paramType##idx = idx + 2U < signature->Params().size() ? signature->Params()[idx + 2U]->TsType() \ : signature->RestVar()->TsType(); \ auto ttctx##idx = TargetTypeContext(this, paramType##idx); \ diff --git a/ets2panda/compiler/lowering/util.cpp b/ets2panda/compiler/lowering/util.cpp index 247f182093..a2fd4ede6b 100644 --- a/ets2panda/compiler/lowering/util.cpp +++ b/ets2panda/compiler/lowering/util.cpp @@ -14,7 +14,7 @@ */ #include - +#include #include "util.h" #include "ir/expressions/identifier.h" @@ -40,8 +40,9 @@ ir::Identifier *Gensym(ArenaAllocator *allocator) const ArenaString s {allocator->Adapter()}; const auto str = ss.str(); auto *arena_pointer = allocator->Alloc(str.size() + 1); - std::memmove(arena_pointer, reinterpret_cast(str.c_str()), str.size() + 1); + memmove_s(arena_pointer, str.size() + 1, reinterpret_cast(str.c_str()), str.size() + 1); return allocator->New(util::StringView(reinterpret_cast(arena_pointer)), allocator); + } } // namespace panda::es2panda::compiler diff --git a/ets2panda/ir/base/templateElement.cpp b/ets2panda/ir/base/templateElement.cpp index e5650900a5..8a0e7d317e 100644 --- a/ets2panda/ir/base/templateElement.cpp +++ b/ets2panda/ir/base/templateElement.cpp @@ -28,7 +28,7 @@ void TemplateElement::Dump(ir::AstDumper *dumper) const { dumper->Add({ {"type", "TemplateElement"}, - {"value", {{"raw", /* raw_ */ ""}, {"cooked", /* cooked_ */ ""}}}, + {"value", {{"raw", ""}, {"cooked", ""}}}, }); } diff --git a/ets2panda/scripts/es2panda_coverage.sh b/ets2panda/scripts/es2panda_coverage.sh index 387dc73a57..9af403a22b 100644 --- a/ets2panda/scripts/es2panda_coverage.sh +++ b/ets2panda/scripts/es2panda_coverage.sh @@ -26,7 +26,7 @@ case "$ARGUMENT" in esac done -python $PANDA_ROOT/plugins/ecmascript/es2panda/scripts/test-runner.py \ +python $PANDA_ROOT/plugins/ecmascript/es2panda/scripts/test_runner.py \ --builddir $PANDA_BINARY_ROOT --arkdir $PANDA_ROOT --all gcov $PANDA_BINARY_ROOT/plugins/ecmascript/es2panda/CMakeFiles/es2panda-lib.dir/*/* diff --git a/ets2panda/scripts/test-runner.py b/ets2panda/scripts/test_runner.py similarity index 99% rename from ets2panda/scripts/test-runner.py rename to ets2panda/scripts/test_runner.py index aeb156848f..e759dddc02 100644 --- a/ets2panda/scripts/test-runner.py +++ b/ets2panda/scripts/test_runner.py @@ -19,6 +19,7 @@ import subprocess import sys from pathlib import Path + def parse_options(): # panda root default panda_env = os.environ.get('PANDA_ROOT') -- Gitee From 512e4b6dc7010794d05bcba6f045fc76f5b2234b Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 18:17:46 +0300 Subject: [PATCH 4/9] [ArkTS ets_frontend] codestyle fixes --- ets2panda/checker/ETSAnalyzer.cpp | 2 +- ets2panda/compiler/lowering/util.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index 001a68b67f..58610f6510 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/util.cpp b/ets2panda/compiler/lowering/util.cpp index a2fd4ede6b..b63145fc63 100644 --- a/ets2panda/compiler/lowering/util.cpp +++ b/ets2panda/compiler/lowering/util.cpp @@ -14,7 +14,7 @@ */ #include -#include + #include "util.h" #include "ir/expressions/identifier.h" @@ -42,7 +42,6 @@ ir::Identifier *Gensym(ArenaAllocator *allocator) auto *arena_pointer = allocator->Alloc(str.size() + 1); memmove_s(arena_pointer, str.size() + 1, reinterpret_cast(str.c_str()), str.size() + 1); return allocator->New(util::StringView(reinterpret_cast(arena_pointer)), allocator); - } } // namespace panda::es2panda::compiler -- Gitee From b218c252115bbe9ec483e25b1d3e7c5902179771 Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 18:51:44 +0300 Subject: [PATCH 5/9] [ArkTS ets_frontend] codestyle fixes --- ets2panda/checker/ETSAnalyzer.cpp | 36 ++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index 58610f6510..39c1db3f98 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -688,6 +688,28 @@ checker::Type *ETSAnalyzer::Check(ir::LabelledStatement *st) const UNREACHABLE(); } + +void CheckVoidType(checker::Type *&func_return_type, ETSChecker *&checker, const std::string &name, ir::ReturnStatement *st) +{ + if (name.find(compiler::Signatures::ETS_MAIN_WITH_MANGLE_BEGIN) != std::string::npos) { + if (func_return_type == checker->GlobalBuiltinVoidType()) { + func_return_type = checker->GlobalVoidType(); + } else if (!func_return_type->IsETSVoidType() && !func_return_type->IsIntType()) { + checker->ThrowTypeError("Bad return type, main enable only void or int type.", st->Start()); + } + } +} + +void CheckMissingArgument(checker::Type *&func_return_type, ETSChecker *checker, + ir::ScriptFunction *containing_func, ir::ReturnStatement *st) +{ + if (!func_return_type->IsETSVoidType() && func_return_type != checker->GlobalBuiltinVoidType()) { + checker->ThrowTypeError("Missing return value.", st->Start()); + } + func_return_type = + containing_func->IsEntryPoint() ? checker->GlobalVoidType() : checker->GlobalBuiltinVoidType(); +} + checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const { ETSChecker *checker = GetETSChecker(); @@ -713,20 +735,10 @@ checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const func_return_type = checker->GetTypeFromTypeAnnotation(return_type_annotation); if (st->argument_ == nullptr) { - if (!func_return_type->IsETSVoidType() && func_return_type != checker->GlobalBuiltinVoidType()) { - checker->ThrowTypeError("Missing return value.", st->Start()); - } - func_return_type = - containing_func->IsEntryPoint() ? checker->GlobalVoidType() : checker->GlobalBuiltinVoidType(); + CheckMissingArgument(func_return_type, checker, containing_func, st); } else { const auto name = containing_func->Scope()->InternalName().Mutf8(); - if (name.find(compiler::Signatures::ETS_MAIN_WITH_MANGLE_BEGIN) != std::string::npos) { - if (func_return_type == checker->GlobalBuiltinVoidType()) { - func_return_type = checker->GlobalVoidType(); - } else if (!func_return_type->IsETSVoidType() && !func_return_type->IsIntType()) { - checker->ThrowTypeError("Bad return type, main enable only void or int type.", st->Start()); - } - } + CheckVoidType(func_return_type, checker, name, st); if (st->argument_->IsObjectExpression()) { st->argument_->AsObjectExpression()->SetPreferredType(func_return_type); -- Gitee From 0a266ce842ff46c656d62945e1575abb3e185f9f Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 18:52:18 +0300 Subject: [PATCH 6/9] [ArkTS ets_frontend] codestyle fixes --- ets2panda/checker/ETSAnalyzer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index 39c1db3f98..ce0dd6c1ce 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2023 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -- Gitee From a94d97f6c01f07e4e3d0a029bb08d480261f7c15 Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 20:18:11 +0300 Subject: [PATCH 7/9] [ArkTS ets_frontend] codestyle fixes --- ets2panda/checker/ASchecker.cpp | 2 +- ets2panda/checker/ASchecker.h | 2 +- ets2panda/checker/ETSAnalyzer.cpp | 17 +++++++++++++++-- ets2panda/checker/ETSAnalyzer.h | 2 +- ets2panda/checker/ETSchecker.cpp | 2 +- ets2panda/checker/ETSchecker.h | 2 +- ets2panda/checker/JSchecker.cpp | 2 +- ets2panda/checker/JSchecker.h | 2 +- ets2panda/checker/SemanticAnalyzer.h | 2 +- ets2panda/checker/TSAnalyzer.cpp | 2 +- ets2panda/checker/TSAnalyzer.h | 2 +- ets2panda/checker/TSchecker.cpp | 2 +- ets2panda/checker/TSchecker.h | 2 +- ets2panda/checker/ets/aliveAnalyzer.cpp | 2 +- ets2panda/checker/ets/aliveAnalyzer.h | 2 +- ets2panda/checker/ets/arithmetic.cpp | 2 +- ets2panda/checker/ets/arithmetic.h | 2 +- ets2panda/checker/ets/baseAnalyzer.cpp | 2 +- ets2panda/checker/ets/baseAnalyzer.h | 2 +- ets2panda/checker/ets/boxingConverter.cpp | 2 +- ets2panda/checker/ets/boxingConverter.h | 2 +- ets2panda/checker/ets/castingContext.cpp | 2 +- ets2panda/checker/ets/castingContext.h | 2 +- ets2panda/checker/ets/conversion.cpp | 2 +- ets2panda/checker/ets/conversion.h | 2 +- ets2panda/checker/ets/dynamic.cpp | 2 +- ets2panda/checker/ets/enum.cpp | 4 ++-- ets2panda/checker/ets/function_helpers.h | 4 ++-- ets2panda/checker/ets/narrowingConverter.cpp | 2 +- ets2panda/checker/ets/narrowingConverter.h | 2 +- .../checker/ets/narrowingWideningConverter.cpp | 2 +- .../checker/ets/narrowingWideningConverter.h | 2 +- ets2panda/checker/ets/primitiveWrappers.cpp | 2 +- ets2panda/checker/ets/typeConverter.cpp | 2 +- ets2panda/checker/ets/typeConverter.h | 2 +- ets2panda/checker/ets/typeRelationContext.cpp | 2 +- ets2panda/checker/ets/typeRelationContext.h | 2 +- ets2panda/checker/ets/unboxingConverter.cpp | 2 +- ets2panda/checker/ets/unboxingConverter.h | 2 +- ets2panda/checker/ets/wideningConverter.cpp | 2 +- ets2panda/checker/ets/wideningConverter.h | 2 +- ets2panda/checker/resolveResult.h | 4 ++-- ets2panda/checker/types/ets/byteType.cpp | 2 +- ets2panda/checker/types/ets/byteType.h | 2 +- ets2panda/checker/types/ets/charType.cpp | 2 +- ets2panda/checker/types/ets/charType.h | 2 +- ets2panda/checker/types/ets/doubleType.cpp | 2 +- ets2panda/checker/types/ets/doubleType.h | 2 +- ets2panda/checker/types/ets/etsArrayType.cpp | 2 +- ets2panda/checker/types/ets/etsArrayType.h | 2 +- .../types/ets/etsAsyncFuncReturnType.cpp | 2 +- .../checker/types/ets/etsAsyncFuncReturnType.h | 2 +- ets2panda/checker/types/ets/etsBooleanType.cpp | 2 +- ets2panda/checker/types/ets/etsBooleanType.h | 2 +- .../checker/types/ets/etsDynamicFunctionType.h | 2 +- ets2panda/checker/types/ets/etsDynamicType.cpp | 2 +- ets2panda/checker/types/ets/etsDynamicType.h | 2 +- ets2panda/checker/types/ets/etsEnumType.cpp | 2 +- ets2panda/checker/types/ets/etsEnumType.h | 2 +- .../types/ets/etsExtensionFuncHelperType.cpp | 2 +- .../types/ets/etsExtensionFuncHelperType.h | 2 +- ets2panda/checker/types/ets/etsFunctionType.cpp | 2 +- ets2panda/checker/types/ets/etsFunctionType.h | 2 +- ets2panda/checker/types/ets/etsObjectType.cpp | 2 +- ets2panda/checker/types/ets/etsObjectType.h | 2 +- ets2panda/checker/types/ets/etsStringType.cpp | 2 +- ets2panda/checker/types/ets/etsStringType.h | 2 +- .../checker/types/ets/etsTypeParameter.cpp | 2 +- ets2panda/checker/types/ets/etsTypeParameter.h | 2 +- ets2panda/checker/types/ets/etsUnionType.cpp | 4 ++-- ets2panda/checker/types/ets/etsUnionType.h | 4 ++-- ets2panda/checker/types/ets/etsVoidType.cpp | 2 +- ets2panda/checker/types/ets/etsVoidType.h | 2 +- ets2panda/checker/types/ets/floatType.cpp | 2 +- ets2panda/checker/types/ets/floatType.h | 2 +- ets2panda/checker/types/ets/intType.cpp | 2 +- ets2panda/checker/types/ets/intType.h | 2 +- ets2panda/checker/types/ets/longType.cpp | 2 +- ets2panda/checker/types/ets/longType.h | 2 +- ets2panda/checker/types/ets/shortType.cpp | 2 +- ets2panda/checker/types/ets/shortType.h | 2 +- ets2panda/checker/types/ets/wildcardType.cpp | 2 +- ets2panda/checker/types/ets/wildcardType.h | 2 +- ets2panda/compiler/base/catchTable.cpp | 2 +- ets2panda/compiler/base/catchTable.h | 2 +- ets2panda/compiler/base/condition.cpp | 2 +- ets2panda/compiler/base/condition.h | 2 +- ets2panda/compiler/base/destructuring.h | 2 +- ets2panda/compiler/base/iterators.cpp | 2 +- ets2panda/compiler/base/iterators.h | 2 +- ets2panda/compiler/base/literals.cpp | 2 +- ets2panda/compiler/base/literals.h | 2 +- ets2panda/compiler/base/lreference.cpp | 2 +- ets2panda/compiler/base/lreference.h | 2 +- ets2panda/compiler/core/ASTCompiler.h | 2 +- ets2panda/compiler/core/ASTVerifier.cpp | 4 ++-- ets2panda/compiler/core/ASTVerifier.h | 4 ++-- ets2panda/compiler/core/ETSCompiler.cpp | 2 +- ets2panda/compiler/core/ETSCompiler.h | 2 +- ets2panda/compiler/core/ETSGen.cpp | 4 ++-- ets2panda/compiler/core/ETSGen.h | 2 +- ets2panda/compiler/core/ETSemitter.cpp | 2 +- ets2panda/compiler/core/ETSemitter.h | 2 +- ets2panda/compiler/core/ETSfunction.cpp | 2 +- ets2panda/compiler/core/ETSfunction.h | 2 +- ets2panda/compiler/core/JSCompiler.cpp | 2 +- ets2panda/compiler/core/JSCompiler.h | 2 +- ets2panda/compiler/core/JSemitter.cpp | 2 +- ets2panda/compiler/core/JSemitter.h | 2 +- ets2panda/compiler/core/codeGen.cpp | 2 +- ets2panda/compiler/core/codeGen.h | 2 +- ets2panda/compiler/core/compileJob.cpp | 4 ++-- ets2panda/compiler/core/compileJob.h | 2 +- ets2panda/compiler/core/compileQueue.cpp | 4 ++-- ets2panda/compiler/core/compileQueue.h | 2 +- ets2panda/compiler/core/compilerContext.cpp | 2 +- ets2panda/compiler/core/compilerContext.h | 2 +- ets2panda/compiler/core/envScope.cpp | 2 +- ets2panda/compiler/core/envScope.h | 2 +- ets2panda/compiler/core/pandagen.cpp | 4 ++-- ets2panda/compiler/core/pandagen.h | 2 +- ets2panda/compiler/core/programElement.cpp | 2 +- ets2panda/compiler/core/programElement.h | 2 +- ets2panda/compiler/core/regAllocator.cpp | 2 +- ets2panda/compiler/core/regAllocator.h | 2 +- ets2panda/compiler/core/regScope.cpp | 2 +- ets2panda/compiler/core/regScope.h | 2 +- ets2panda/compiler/core/regSpiller.cpp | 2 +- ets2panda/compiler/core/regSpiller.h | 6 +++--- ets2panda/compiler/core/targetTypeContext.cpp | 2 +- ets2panda/compiler/core/targetTypeContext.h | 2 +- ets2panda/compiler/core/vReg.cpp | 2 +- ets2panda/compiler/core/vReg.h | 2 +- ets2panda/compiler/debugger/debuginfoDumper.cpp | 2 +- ets2panda/compiler/debugger/debuginfoDumper.h | 2 +- .../compiler/function/asyncFunctionBuilder.cpp | 4 ++-- .../compiler/function/asyncFunctionBuilder.h | 2 +- ets2panda/compiler/function/functionBuilder.cpp | 4 ++-- ets2panda/compiler/function/functionBuilder.h | 2 +- .../function/generatorFunctionBuilder.cpp | 4 ++-- .../function/generatorFunctionBuilder.h | 2 +- ets2panda/compiler/lowering/checkerPhase.cpp | 2 +- ets2panda/compiler/lowering/checkerPhase.h | 2 +- .../lowering/ets/generateDeclarations.cpp | 2 +- .../lowering/ets/generateDeclarations.h | 2 +- .../compiler/lowering/ets/opAssignment.cpp | 2 +- ets2panda/compiler/lowering/ets/opAssignment.h | 2 +- .../compiler/lowering/ets/unionLowering.cpp | 4 ++-- ets2panda/compiler/lowering/ets/unionLowering.h | 4 ++-- ets2panda/compiler/lowering/phase.cpp | 2 +- ets2panda/compiler/lowering/phase.h | 2 +- ets2panda/ir/as/namedType.cpp | 2 +- ets2panda/ir/as/namedType.h | 2 +- ets2panda/ir/as/prefixAssertionExpression.cpp | 2 +- ets2panda/ir/as/prefixAssertionExpression.h | 2 +- ets2panda/ir/astNodeFlags.h | 2 +- ets2panda/ir/base/classElement.cpp | 2 +- ets2panda/ir/base/classElement.h | 2 +- ets2panda/ir/base/classStaticBlock.cpp | 2 +- ets2panda/ir/base/classStaticBlock.h | 2 +- ets2panda/ir/ets/etsClassLiteral.cpp | 2 +- ets2panda/ir/ets/etsClassLiteral.h | 2 +- ets2panda/ir/ets/etsFunctionType.cpp | 2 +- ets2panda/ir/ets/etsFunctionType.h | 2 +- ets2panda/ir/ets/etsImportDeclaration.h | 2 +- ets2panda/ir/ets/etsImportSource.cpp | 2 +- ets2panda/ir/ets/etsLaunchExpression.cpp | 2 +- .../ir/ets/etsNewArrayInstanceExpression.cpp | 2 +- .../ir/ets/etsNewArrayInstanceExpression.h | 2 +- .../ir/ets/etsNewClassInstanceExpression.cpp | 2 +- .../ir/ets/etsNewClassInstanceExpression.h | 2 +- .../etsNewMultiDimArrayInstanceExpression.cpp | 2 +- ets2panda/ir/ets/etsPackageDeclaration.cpp | 2 +- ets2panda/ir/ets/etsPackageDeclaration.h | 2 +- ets2panda/ir/ets/etsParameterExpression.cpp | 2 +- ets2panda/ir/ets/etsParameterExpression.h | 2 +- ets2panda/ir/ets/etsPrimitiveType.cpp | 2 +- ets2panda/ir/ets/etsPrimitiveType.h | 2 +- ets2panda/ir/ets/etsScript.cpp | 2 +- ets2panda/ir/ets/etsScript.h | 2 +- ets2panda/ir/ets/etsStructDeclaration.cpp | 2 +- ets2panda/ir/ets/etsStructDeclaration.h | 2 +- ets2panda/ir/ets/etsTypeReference.cpp | 2 +- ets2panda/ir/ets/etsTypeReference.h | 2 +- ets2panda/ir/ets/etsTypeReferencePart.cpp | 2 +- ets2panda/ir/ets/etsTypeReferencePart.h | 2 +- ets2panda/ir/ets/etsUnionType.cpp | 4 ++-- ets2panda/ir/ets/etsUnionType.h | 4 ++-- ets2panda/ir/ets/etsWildcardType.cpp | 2 +- ets2panda/ir/ets/etsWildcardType.h | 2 +- ets2panda/ir/expressions/directEvalExpression.h | 2 +- ets2panda/ir/irnode.cpp | 2 +- ets2panda/ir/opaqueTypeNode.cpp | 2 +- ets2panda/ir/opaqueTypeNode.h | 2 +- ets2panda/ir/opcodeMap.h | 2 +- ets2panda/ir/statements/assertStatement.cpp | 2 +- ets2panda/ir/statements/assertStatement.h | 2 +- ets2panda/lexer/ASLexer.cpp | 2 +- ets2panda/lexer/ASLexer.h | 2 +- ets2panda/lexer/ETSLexer.cpp | 2 +- ets2panda/lexer/ETSLexer.h | 2 +- ets2panda/lexer/TSLexer.cpp | 2 +- ets2panda/lexer/TSLexer.h | 2 +- ets2panda/lexer/keywords.cpp | 2 +- ets2panda/lexer/keywordsBase.h | 2 +- ets2panda/lexer/token/number.cpp | 2 +- ets2panda/lexer/token/number.h | 2 +- ets2panda/public/es2panda_lib.cpp | 2 +- ets2panda/public/es2panda_lib.h | 2 +- 209 files changed, 243 insertions(+), 230 deletions(-) diff --git a/ets2panda/checker/ASchecker.cpp b/ets2panda/checker/ASchecker.cpp index 492c3b5d7a..3f096b5ce2 100644 --- a/ets2panda/checker/ASchecker.cpp +++ b/ets2panda/checker/ASchecker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ASchecker.h b/ets2panda/checker/ASchecker.h index d2840c0533..7dad82f861 100644 --- a/ets2panda/checker/ASchecker.h +++ b/ets2panda/checker/ASchecker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index ce0dd6c1ce..5a5c27aab0 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -700,7 +700,7 @@ void CheckVoidType(checker::Type *&func_return_type, ETSChecker *&checker, const } } -void CheckMissingArgument(checker::Type *&func_return_type, ETSChecker *checker, +void CheckMissingArgumentType(checker::Type *&func_return_type, ETSChecker *checker, ir::ScriptFunction *containing_func, ir::ReturnStatement *st) { if (!func_return_type->IsETSVoidType() && func_return_type != checker->GlobalBuiltinVoidType()) { @@ -710,6 +710,19 @@ void CheckMissingArgument(checker::Type *&func_return_type, ETSChecker *checker, containing_func->IsEntryPoint() ? checker->GlobalVoidType() : checker->GlobalBuiltinVoidType(); } +// void CheckObjectExpressionType(ir::ReturnStatement *st, checker::Type *func_return_type) +// { +// if (st->argument_->IsObjectExpression()) { +// st->argument_->AsObjectExpression()->SetPreferredType(func_return_type); +// } +// } + +// void CheckMemberExpressionType(ir::ReturnStatement *st, checker::Type *func_return_type) { +// if (st->argument_->IsMemberExpression()) { +// checker->SetArrayPreferredTypeForNestedMemberExpressions(st->argument_->AsMemberExpression(), +// func_return_type); +// } +// } checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const { ETSChecker *checker = GetETSChecker(); @@ -735,7 +748,7 @@ checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const func_return_type = checker->GetTypeFromTypeAnnotation(return_type_annotation); if (st->argument_ == nullptr) { - CheckMissingArgument(func_return_type, checker, containing_func, st); + CheckMissingArgumentType(func_return_type, checker, containing_func, st); } else { const auto name = containing_func->Scope()->InternalName().Mutf8(); CheckVoidType(func_return_type, checker, name, st); diff --git a/ets2panda/checker/ETSAnalyzer.h b/ets2panda/checker/ETSAnalyzer.h index 7bc4f8a620..de2b57cc58 100644 --- a/ets2panda/checker/ETSAnalyzer.h +++ b/ets2panda/checker/ETSAnalyzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ETSchecker.cpp b/ets2panda/checker/ETSchecker.cpp index 7a088cb5b6..b3271a635d 100644 --- a/ets2panda/checker/ETSchecker.cpp +++ b/ets2panda/checker/ETSchecker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ETSchecker.h b/ets2panda/checker/ETSchecker.h index 79927a9efd..f1eda74ff4 100644 --- a/ets2panda/checker/ETSchecker.h +++ b/ets2panda/checker/ETSchecker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/JSchecker.cpp b/ets2panda/checker/JSchecker.cpp index c86bd4ddf1..5b72fec1c2 100644 --- a/ets2panda/checker/JSchecker.cpp +++ b/ets2panda/checker/JSchecker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/JSchecker.h b/ets2panda/checker/JSchecker.h index 9dd522c283..adfa71ef13 100644 --- a/ets2panda/checker/JSchecker.h +++ b/ets2panda/checker/JSchecker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/SemanticAnalyzer.h b/ets2panda/checker/SemanticAnalyzer.h index 0cb278a556..76c7edac97 100644 --- a/ets2panda/checker/SemanticAnalyzer.h +++ b/ets2panda/checker/SemanticAnalyzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/TSAnalyzer.cpp b/ets2panda/checker/TSAnalyzer.cpp index 6b42c2deb6..7f6acbba2a 100644 --- a/ets2panda/checker/TSAnalyzer.cpp +++ b/ets2panda/checker/TSAnalyzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/TSAnalyzer.h b/ets2panda/checker/TSAnalyzer.h index 72f353f284..eb23fa2fc5 100644 --- a/ets2panda/checker/TSAnalyzer.h +++ b/ets2panda/checker/TSAnalyzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/TSchecker.cpp b/ets2panda/checker/TSchecker.cpp index 672834816b..6a9eb3977e 100644 --- a/ets2panda/checker/TSchecker.cpp +++ b/ets2panda/checker/TSchecker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/TSchecker.h b/ets2panda/checker/TSchecker.h index 37d45b60ac..53ac7cdcb9 100644 --- a/ets2panda/checker/TSchecker.h +++ b/ets2panda/checker/TSchecker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/aliveAnalyzer.cpp b/ets2panda/checker/ets/aliveAnalyzer.cpp index bcc0bb107f..626e17ade8 100644 --- a/ets2panda/checker/ets/aliveAnalyzer.cpp +++ b/ets2panda/checker/ets/aliveAnalyzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/aliveAnalyzer.h b/ets2panda/checker/ets/aliveAnalyzer.h index c9c80f2d01..08539b32fd 100644 --- a/ets2panda/checker/ets/aliveAnalyzer.h +++ b/ets2panda/checker/ets/aliveAnalyzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/arithmetic.cpp b/ets2panda/checker/ets/arithmetic.cpp index 6f112eb89d..9cb2bdbe06 100644 --- a/ets2panda/checker/ets/arithmetic.cpp +++ b/ets2panda/checker/ets/arithmetic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/arithmetic.h b/ets2panda/checker/ets/arithmetic.h index 5471d52e97..0eb9a97929 100644 --- a/ets2panda/checker/ets/arithmetic.h +++ b/ets2panda/checker/ets/arithmetic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/baseAnalyzer.cpp b/ets2panda/checker/ets/baseAnalyzer.cpp index 18cbe6fe29..68e18c435e 100644 --- a/ets2panda/checker/ets/baseAnalyzer.cpp +++ b/ets2panda/checker/ets/baseAnalyzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/baseAnalyzer.h b/ets2panda/checker/ets/baseAnalyzer.h index 039fbe34f6..48e340531a 100644 --- a/ets2panda/checker/ets/baseAnalyzer.h +++ b/ets2panda/checker/ets/baseAnalyzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/boxingConverter.cpp b/ets2panda/checker/ets/boxingConverter.cpp index 5bc90847f7..71960110b3 100644 --- a/ets2panda/checker/ets/boxingConverter.cpp +++ b/ets2panda/checker/ets/boxingConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/boxingConverter.h b/ets2panda/checker/ets/boxingConverter.h index ed53d9db60..13ccc675ed 100644 --- a/ets2panda/checker/ets/boxingConverter.h +++ b/ets2panda/checker/ets/boxingConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/castingContext.cpp b/ets2panda/checker/ets/castingContext.cpp index a9c5418494..dbb7ea4b52 100644 --- a/ets2panda/checker/ets/castingContext.cpp +++ b/ets2panda/checker/ets/castingContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/castingContext.h b/ets2panda/checker/ets/castingContext.h index c5ff8257b8..db6ef1442b 100644 --- a/ets2panda/checker/ets/castingContext.h +++ b/ets2panda/checker/ets/castingContext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/conversion.cpp b/ets2panda/checker/ets/conversion.cpp index 2c9ac1fa40..83d5c7ec9e 100644 --- a/ets2panda/checker/ets/conversion.cpp +++ b/ets2panda/checker/ets/conversion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/conversion.h b/ets2panda/checker/ets/conversion.h index 2b94bfbfc6..f796162a35 100644 --- a/ets2panda/checker/ets/conversion.h +++ b/ets2panda/checker/ets/conversion.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/dynamic.cpp b/ets2panda/checker/ets/dynamic.cpp index 69c9b85268..eec5ae919e 100644 --- a/ets2panda/checker/ets/dynamic.cpp +++ b/ets2panda/checker/ets/dynamic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/enum.cpp b/ets2panda/checker/ets/enum.cpp index 30e069a25b..fa148b719b 100644 --- a/ets2panda/checker/ets/enum.cpp +++ b/ets2panda/checker/ets/enum.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http: //www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ets2panda/checker/ets/function_helpers.h b/ets2panda/checker/ets/function_helpers.h index 0ac3267d1a..c112c116f7 100644 --- a/ets2panda/checker/ets/function_helpers.h +++ b/ets2panda/checker/ets/function_helpers.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2023 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/narrowingConverter.cpp b/ets2panda/checker/ets/narrowingConverter.cpp index 2ad2863853..ad1dabf223 100644 --- a/ets2panda/checker/ets/narrowingConverter.cpp +++ b/ets2panda/checker/ets/narrowingConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/narrowingConverter.h b/ets2panda/checker/ets/narrowingConverter.h index 7c2edddfd6..89686fb09c 100644 --- a/ets2panda/checker/ets/narrowingConverter.h +++ b/ets2panda/checker/ets/narrowingConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/narrowingWideningConverter.cpp b/ets2panda/checker/ets/narrowingWideningConverter.cpp index 8a037b0301..7a628733a2 100644 --- a/ets2panda/checker/ets/narrowingWideningConverter.cpp +++ b/ets2panda/checker/ets/narrowingWideningConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/narrowingWideningConverter.h b/ets2panda/checker/ets/narrowingWideningConverter.h index c6e16aceab..2716c8303f 100644 --- a/ets2panda/checker/ets/narrowingWideningConverter.h +++ b/ets2panda/checker/ets/narrowingWideningConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/primitiveWrappers.cpp b/ets2panda/checker/ets/primitiveWrappers.cpp index 4f9c6b68b0..046f40ced0 100644 --- a/ets2panda/checker/ets/primitiveWrappers.cpp +++ b/ets2panda/checker/ets/primitiveWrappers.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/typeConverter.cpp b/ets2panda/checker/ets/typeConverter.cpp index b648c16817..c64e03da02 100644 --- a/ets2panda/checker/ets/typeConverter.cpp +++ b/ets2panda/checker/ets/typeConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/typeConverter.h b/ets2panda/checker/ets/typeConverter.h index 0c3289a85f..d0b0060f7a 100644 --- a/ets2panda/checker/ets/typeConverter.h +++ b/ets2panda/checker/ets/typeConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/typeRelationContext.cpp b/ets2panda/checker/ets/typeRelationContext.cpp index 2f56a4c41c..ee23d08854 100644 --- a/ets2panda/checker/ets/typeRelationContext.cpp +++ b/ets2panda/checker/ets/typeRelationContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/typeRelationContext.h b/ets2panda/checker/ets/typeRelationContext.h index 2cedf02fa1..bd08c6587a 100644 --- a/ets2panda/checker/ets/typeRelationContext.h +++ b/ets2panda/checker/ets/typeRelationContext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/unboxingConverter.cpp b/ets2panda/checker/ets/unboxingConverter.cpp index 4f378a6d96..3dba28ee93 100644 --- a/ets2panda/checker/ets/unboxingConverter.cpp +++ b/ets2panda/checker/ets/unboxingConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/unboxingConverter.h b/ets2panda/checker/ets/unboxingConverter.h index f18fe678dd..540f22fb9d 100644 --- a/ets2panda/checker/ets/unboxingConverter.h +++ b/ets2panda/checker/ets/unboxingConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/wideningConverter.cpp b/ets2panda/checker/ets/wideningConverter.cpp index ac7ef8579e..6d6e681d50 100644 --- a/ets2panda/checker/ets/wideningConverter.cpp +++ b/ets2panda/checker/ets/wideningConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/ets/wideningConverter.h b/ets2panda/checker/ets/wideningConverter.h index aa254771ce..12dddcecdc 100644 --- a/ets2panda/checker/ets/wideningConverter.h +++ b/ets2panda/checker/ets/wideningConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/resolveResult.h b/ets2panda/checker/resolveResult.h index 84844d2919..8d9470c5fd 100644 --- a/ets2panda/checker/resolveResult.h +++ b/ets2panda/checker/resolveResult.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/byteType.cpp b/ets2panda/checker/types/ets/byteType.cpp index d662c6e0a0..05f77b0b62 100644 --- a/ets2panda/checker/types/ets/byteType.cpp +++ b/ets2panda/checker/types/ets/byteType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/byteType.h b/ets2panda/checker/types/ets/byteType.h index 88cfce4304..5ba92a4d76 100644 --- a/ets2panda/checker/types/ets/byteType.h +++ b/ets2panda/checker/types/ets/byteType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/charType.cpp b/ets2panda/checker/types/ets/charType.cpp index d12017b54a..be7d27609f 100644 --- a/ets2panda/checker/types/ets/charType.cpp +++ b/ets2panda/checker/types/ets/charType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/charType.h b/ets2panda/checker/types/ets/charType.h index 12878a3aff..a1ea57fef9 100644 --- a/ets2panda/checker/types/ets/charType.h +++ b/ets2panda/checker/types/ets/charType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/doubleType.cpp b/ets2panda/checker/types/ets/doubleType.cpp index 0b1bf0f592..4f92ba9218 100644 --- a/ets2panda/checker/types/ets/doubleType.cpp +++ b/ets2panda/checker/types/ets/doubleType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/doubleType.h b/ets2panda/checker/types/ets/doubleType.h index 2377f42443..80be747c39 100644 --- a/ets2panda/checker/types/ets/doubleType.h +++ b/ets2panda/checker/types/ets/doubleType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsArrayType.cpp b/ets2panda/checker/types/ets/etsArrayType.cpp index e6ea36913c..0dd1a3f2b3 100644 --- a/ets2panda/checker/types/ets/etsArrayType.cpp +++ b/ets2panda/checker/types/ets/etsArrayType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsArrayType.h b/ets2panda/checker/types/ets/etsArrayType.h index f1cb2f1bad..87017417a0 100644 --- a/ets2panda/checker/types/ets/etsArrayType.h +++ b/ets2panda/checker/types/ets/etsArrayType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsAsyncFuncReturnType.cpp b/ets2panda/checker/types/ets/etsAsyncFuncReturnType.cpp index d949edc178..950477c3f1 100644 --- a/ets2panda/checker/types/ets/etsAsyncFuncReturnType.cpp +++ b/ets2panda/checker/types/ets/etsAsyncFuncReturnType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsAsyncFuncReturnType.h b/ets2panda/checker/types/ets/etsAsyncFuncReturnType.h index c5ed7d523b..fc3fb0df7f 100644 --- a/ets2panda/checker/types/ets/etsAsyncFuncReturnType.h +++ b/ets2panda/checker/types/ets/etsAsyncFuncReturnType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsBooleanType.cpp b/ets2panda/checker/types/ets/etsBooleanType.cpp index a6d5dd49da..aaf1dac4e6 100644 --- a/ets2panda/checker/types/ets/etsBooleanType.cpp +++ b/ets2panda/checker/types/ets/etsBooleanType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsBooleanType.h b/ets2panda/checker/types/ets/etsBooleanType.h index c48b766bc2..3734e40a66 100644 --- a/ets2panda/checker/types/ets/etsBooleanType.h +++ b/ets2panda/checker/types/ets/etsBooleanType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsDynamicFunctionType.h b/ets2panda/checker/types/ets/etsDynamicFunctionType.h index 6386016557..9d437688b2 100644 --- a/ets2panda/checker/types/ets/etsDynamicFunctionType.h +++ b/ets2panda/checker/types/ets/etsDynamicFunctionType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsDynamicType.cpp b/ets2panda/checker/types/ets/etsDynamicType.cpp index 4c07a3bd08..cbe881350a 100644 --- a/ets2panda/checker/types/ets/etsDynamicType.cpp +++ b/ets2panda/checker/types/ets/etsDynamicType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsDynamicType.h b/ets2panda/checker/types/ets/etsDynamicType.h index 66169a10ef..3e2475ca41 100644 --- a/ets2panda/checker/types/ets/etsDynamicType.h +++ b/ets2panda/checker/types/ets/etsDynamicType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsEnumType.cpp b/ets2panda/checker/types/ets/etsEnumType.cpp index f102cd2177..2288d0044d 100644 --- a/ets2panda/checker/types/ets/etsEnumType.cpp +++ b/ets2panda/checker/types/ets/etsEnumType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsEnumType.h b/ets2panda/checker/types/ets/etsEnumType.h index b926a304d9..fb9cc0debb 100644 --- a/ets2panda/checker/types/ets/etsEnumType.h +++ b/ets2panda/checker/types/ets/etsEnumType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsExtensionFuncHelperType.cpp b/ets2panda/checker/types/ets/etsExtensionFuncHelperType.cpp index e24ee3e6de..6757b96f85 100644 --- a/ets2panda/checker/types/ets/etsExtensionFuncHelperType.cpp +++ b/ets2panda/checker/types/ets/etsExtensionFuncHelperType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsExtensionFuncHelperType.h b/ets2panda/checker/types/ets/etsExtensionFuncHelperType.h index d57bf79440..735a86e164 100644 --- a/ets2panda/checker/types/ets/etsExtensionFuncHelperType.h +++ b/ets2panda/checker/types/ets/etsExtensionFuncHelperType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsFunctionType.cpp b/ets2panda/checker/types/ets/etsFunctionType.cpp index 6e34f6ea25..b67c53ca99 100644 --- a/ets2panda/checker/types/ets/etsFunctionType.cpp +++ b/ets2panda/checker/types/ets/etsFunctionType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsFunctionType.h b/ets2panda/checker/types/ets/etsFunctionType.h index 815055f2e0..012c71251b 100644 --- a/ets2panda/checker/types/ets/etsFunctionType.h +++ b/ets2panda/checker/types/ets/etsFunctionType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsObjectType.cpp b/ets2panda/checker/types/ets/etsObjectType.cpp index 9ce2ac0301..6678a6f271 100644 --- a/ets2panda/checker/types/ets/etsObjectType.cpp +++ b/ets2panda/checker/types/ets/etsObjectType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsObjectType.h b/ets2panda/checker/types/ets/etsObjectType.h index 8a5d052c30..2f9f726d59 100644 --- a/ets2panda/checker/types/ets/etsObjectType.h +++ b/ets2panda/checker/types/ets/etsObjectType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsStringType.cpp b/ets2panda/checker/types/ets/etsStringType.cpp index 9f0a1aacae..0528fd46ff 100644 --- a/ets2panda/checker/types/ets/etsStringType.cpp +++ b/ets2panda/checker/types/ets/etsStringType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsStringType.h b/ets2panda/checker/types/ets/etsStringType.h index 5ee82f4377..acf4e3e4b9 100644 --- a/ets2panda/checker/types/ets/etsStringType.h +++ b/ets2panda/checker/types/ets/etsStringType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsTypeParameter.cpp b/ets2panda/checker/types/ets/etsTypeParameter.cpp index 3c4c2ced73..43edd66d0c 100644 --- a/ets2panda/checker/types/ets/etsTypeParameter.cpp +++ b/ets2panda/checker/types/ets/etsTypeParameter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsTypeParameter.h b/ets2panda/checker/types/ets/etsTypeParameter.h index dcdeb5fae1..1ef6df6e0e 100644 --- a/ets2panda/checker/types/ets/etsTypeParameter.h +++ b/ets2panda/checker/types/ets/etsTypeParameter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsUnionType.cpp b/ets2panda/checker/types/ets/etsUnionType.cpp index b0addc81fd..869bce16fe 100644 --- a/ets2panda/checker/types/ets/etsUnionType.cpp +++ b/ets2panda/checker/types/ets/etsUnionType.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsUnionType.h b/ets2panda/checker/types/ets/etsUnionType.h index 2676059233..66cf14228c 100644 --- a/ets2panda/checker/types/ets/etsUnionType.h +++ b/ets2panda/checker/types/ets/etsUnionType.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsVoidType.cpp b/ets2panda/checker/types/ets/etsVoidType.cpp index b25e85b491..0e6c20f848 100644 --- a/ets2panda/checker/types/ets/etsVoidType.cpp +++ b/ets2panda/checker/types/ets/etsVoidType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/etsVoidType.h b/ets2panda/checker/types/ets/etsVoidType.h index 684a854105..877134f5e6 100644 --- a/ets2panda/checker/types/ets/etsVoidType.h +++ b/ets2panda/checker/types/ets/etsVoidType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/floatType.cpp b/ets2panda/checker/types/ets/floatType.cpp index 7276907fc2..56070a4330 100644 --- a/ets2panda/checker/types/ets/floatType.cpp +++ b/ets2panda/checker/types/ets/floatType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/floatType.h b/ets2panda/checker/types/ets/floatType.h index 055fb37fd5..9f14f58f42 100644 --- a/ets2panda/checker/types/ets/floatType.h +++ b/ets2panda/checker/types/ets/floatType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/intType.cpp b/ets2panda/checker/types/ets/intType.cpp index 15f93bcbb3..165e197f92 100644 --- a/ets2panda/checker/types/ets/intType.cpp +++ b/ets2panda/checker/types/ets/intType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/intType.h b/ets2panda/checker/types/ets/intType.h index fe0e02ee3b..a7d60cc921 100644 --- a/ets2panda/checker/types/ets/intType.h +++ b/ets2panda/checker/types/ets/intType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/longType.cpp b/ets2panda/checker/types/ets/longType.cpp index 565a22bc15..6b0fdba23e 100644 --- a/ets2panda/checker/types/ets/longType.cpp +++ b/ets2panda/checker/types/ets/longType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/longType.h b/ets2panda/checker/types/ets/longType.h index 8a3546718d..9e6bc6b9ef 100644 --- a/ets2panda/checker/types/ets/longType.h +++ b/ets2panda/checker/types/ets/longType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/shortType.cpp b/ets2panda/checker/types/ets/shortType.cpp index 69f2d0014c..1812690e6c 100644 --- a/ets2panda/checker/types/ets/shortType.cpp +++ b/ets2panda/checker/types/ets/shortType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/shortType.h b/ets2panda/checker/types/ets/shortType.h index b5ab753ebc..3197721bee 100644 --- a/ets2panda/checker/types/ets/shortType.h +++ b/ets2panda/checker/types/ets/shortType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/wildcardType.cpp b/ets2panda/checker/types/ets/wildcardType.cpp index 1b71b48b85..81a800f23e 100644 --- a/ets2panda/checker/types/ets/wildcardType.cpp +++ b/ets2panda/checker/types/ets/wildcardType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/checker/types/ets/wildcardType.h b/ets2panda/checker/types/ets/wildcardType.h index 4c627d523e..18ab762722 100644 --- a/ets2panda/checker/types/ets/wildcardType.h +++ b/ets2panda/checker/types/ets/wildcardType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/catchTable.cpp b/ets2panda/compiler/base/catchTable.cpp index 598f8482c0..cc77325a78 100644 --- a/ets2panda/compiler/base/catchTable.cpp +++ b/ets2panda/compiler/base/catchTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/catchTable.h b/ets2panda/compiler/base/catchTable.h index 7b1e86d2fc..ae1b68064f 100644 --- a/ets2panda/compiler/base/catchTable.h +++ b/ets2panda/compiler/base/catchTable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/condition.cpp b/ets2panda/compiler/base/condition.cpp index dbabdb9ba8..9f9bcb290a 100644 --- a/ets2panda/compiler/base/condition.cpp +++ b/ets2panda/compiler/base/condition.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/condition.h b/ets2panda/compiler/base/condition.h index 165b37cf8d..11ed9e8670 100644 --- a/ets2panda/compiler/base/condition.h +++ b/ets2panda/compiler/base/condition.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/destructuring.h b/ets2panda/compiler/base/destructuring.h index 358640c0fc..3d9f16cb25 100644 --- a/ets2panda/compiler/base/destructuring.h +++ b/ets2panda/compiler/base/destructuring.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/iterators.cpp b/ets2panda/compiler/base/iterators.cpp index 9eb761c488..01e8bb06fe 100644 --- a/ets2panda/compiler/base/iterators.cpp +++ b/ets2panda/compiler/base/iterators.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/iterators.h b/ets2panda/compiler/base/iterators.h index 5607b9142a..6d3192d61e 100644 --- a/ets2panda/compiler/base/iterators.h +++ b/ets2panda/compiler/base/iterators.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/literals.cpp b/ets2panda/compiler/base/literals.cpp index 660f3c8146..a7692148d2 100644 --- a/ets2panda/compiler/base/literals.cpp +++ b/ets2panda/compiler/base/literals.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/literals.h b/ets2panda/compiler/base/literals.h index debb3e00d7..45c1cd5143 100644 --- a/ets2panda/compiler/base/literals.h +++ b/ets2panda/compiler/base/literals.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/lreference.cpp b/ets2panda/compiler/base/lreference.cpp index 0c80103e64..a3676f6470 100644 --- a/ets2panda/compiler/base/lreference.cpp +++ b/ets2panda/compiler/base/lreference.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/base/lreference.h b/ets2panda/compiler/base/lreference.h index cae126baab..fb06802d05 100644 --- a/ets2panda/compiler/base/lreference.h +++ b/ets2panda/compiler/base/lreference.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ASTCompiler.h b/ets2panda/compiler/core/ASTCompiler.h index d6fa1d171c..91f1eb2fc0 100644 --- a/ets2panda/compiler/core/ASTCompiler.h +++ b/ets2panda/compiler/core/ASTCompiler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ASTVerifier.cpp b/ets2panda/compiler/core/ASTVerifier.cpp index 9f9b376f1b..fce72cee39 100644 --- a/ets2panda/compiler/core/ASTVerifier.cpp +++ b/ets2panda/compiler/core/ASTVerifier.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ASTVerifier.h b/ets2panda/compiler/core/ASTVerifier.h index d9bdba1180..d5cbb7f2d5 100644 --- a/ets2panda/compiler/core/ASTVerifier.h +++ b/ets2panda/compiler/core/ASTVerifier.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ETSCompiler.cpp b/ets2panda/compiler/core/ETSCompiler.cpp index 4770e12ab3..6ad0a7f3e9 100644 --- a/ets2panda/compiler/core/ETSCompiler.cpp +++ b/ets2panda/compiler/core/ETSCompiler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ETSCompiler.h b/ets2panda/compiler/core/ETSCompiler.h index bbd98de6b3..df72ed1699 100644 --- a/ets2panda/compiler/core/ETSCompiler.h +++ b/ets2panda/compiler/core/ETSCompiler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ETSGen.cpp b/ets2panda/compiler/core/ETSGen.cpp index 49bef2b5e8..c2e7e93fef 100644 --- a/ets2panda/compiler/core/ETSGen.cpp +++ b/ets2panda/compiler/core/ETSGen.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ets2panda/compiler/core/ETSGen.h b/ets2panda/compiler/core/ETSGen.h index 7d80286b2c..6f97fa47ec 100644 --- a/ets2panda/compiler/core/ETSGen.h +++ b/ets2panda/compiler/core/ETSGen.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ETSemitter.cpp b/ets2panda/compiler/core/ETSemitter.cpp index a8589bcf51..8f3170bad3 100644 --- a/ets2panda/compiler/core/ETSemitter.cpp +++ b/ets2panda/compiler/core/ETSemitter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ETSemitter.h b/ets2panda/compiler/core/ETSemitter.h index af3b1748bd..5adf0423e9 100644 --- a/ets2panda/compiler/core/ETSemitter.h +++ b/ets2panda/compiler/core/ETSemitter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ETSfunction.cpp b/ets2panda/compiler/core/ETSfunction.cpp index e25e0915d0..318eddb302 100644 --- a/ets2panda/compiler/core/ETSfunction.cpp +++ b/ets2panda/compiler/core/ETSfunction.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/ETSfunction.h b/ets2panda/compiler/core/ETSfunction.h index 1258168cb4..ecfc2514bc 100644 --- a/ets2panda/compiler/core/ETSfunction.h +++ b/ets2panda/compiler/core/ETSfunction.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/JSCompiler.cpp b/ets2panda/compiler/core/JSCompiler.cpp index 23fc28f983..a65f34b43f 100644 --- a/ets2panda/compiler/core/JSCompiler.cpp +++ b/ets2panda/compiler/core/JSCompiler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/JSCompiler.h b/ets2panda/compiler/core/JSCompiler.h index 081389eca7..9d50641650 100644 --- a/ets2panda/compiler/core/JSCompiler.h +++ b/ets2panda/compiler/core/JSCompiler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/JSemitter.cpp b/ets2panda/compiler/core/JSemitter.cpp index bb0367ba17..39ab410dbd 100644 --- a/ets2panda/compiler/core/JSemitter.cpp +++ b/ets2panda/compiler/core/JSemitter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/JSemitter.h b/ets2panda/compiler/core/JSemitter.h index 2a38cb6b1f..f220f2346c 100644 --- a/ets2panda/compiler/core/JSemitter.h +++ b/ets2panda/compiler/core/JSemitter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/codeGen.cpp b/ets2panda/compiler/core/codeGen.cpp index a94baabfd6..85e0e3b8fe 100644 --- a/ets2panda/compiler/core/codeGen.cpp +++ b/ets2panda/compiler/core/codeGen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/codeGen.h b/ets2panda/compiler/core/codeGen.h index 07a7c9164c..e06a982cad 100644 --- a/ets2panda/compiler/core/codeGen.h +++ b/ets2panda/compiler/core/codeGen.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/compileJob.cpp b/ets2panda/compiler/core/compileJob.cpp index c2cc5c880f..923d1915b5 100644 --- a/ets2panda/compiler/core/compileJob.cpp +++ b/ets2panda/compiler/core/compileJob.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ets2panda/compiler/core/compileJob.h b/ets2panda/compiler/core/compileJob.h index 9c6175ba3c..528f5871a0 100644 --- a/ets2panda/compiler/core/compileJob.h +++ b/ets2panda/compiler/core/compileJob.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/compileQueue.cpp b/ets2panda/compiler/core/compileQueue.cpp index ea49298b98..ee8fc3b139 100644 --- a/ets2panda/compiler/core/compileQueue.cpp +++ b/ets2panda/compiler/core/compileQueue.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ets2panda/compiler/core/compileQueue.h b/ets2panda/compiler/core/compileQueue.h index 95b16d89e2..f347591806 100644 --- a/ets2panda/compiler/core/compileQueue.h +++ b/ets2panda/compiler/core/compileQueue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/compilerContext.cpp b/ets2panda/compiler/core/compilerContext.cpp index 3e712f56a7..ec8b0ccac5 100644 --- a/ets2panda/compiler/core/compilerContext.cpp +++ b/ets2panda/compiler/core/compilerContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/compilerContext.h b/ets2panda/compiler/core/compilerContext.h index 592ad18ab8..420a9fb18b 100644 --- a/ets2panda/compiler/core/compilerContext.h +++ b/ets2panda/compiler/core/compilerContext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/envScope.cpp b/ets2panda/compiler/core/envScope.cpp index 606f28c297..62442c5ba5 100644 --- a/ets2panda/compiler/core/envScope.cpp +++ b/ets2panda/compiler/core/envScope.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/envScope.h b/ets2panda/compiler/core/envScope.h index 07f34944b7..df49b9d242 100644 --- a/ets2panda/compiler/core/envScope.h +++ b/ets2panda/compiler/core/envScope.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/pandagen.cpp b/ets2panda/compiler/core/pandagen.cpp index b34886783b..b3107df942 100644 --- a/ets2panda/compiler/core/pandagen.cpp +++ b/ets2panda/compiler/core/pandagen.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ets2panda/compiler/core/pandagen.h b/ets2panda/compiler/core/pandagen.h index 037e6fa449..fd2a5c8ae9 100644 --- a/ets2panda/compiler/core/pandagen.h +++ b/ets2panda/compiler/core/pandagen.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/programElement.cpp b/ets2panda/compiler/core/programElement.cpp index 07d847d8e0..305ef3b5bd 100644 --- a/ets2panda/compiler/core/programElement.cpp +++ b/ets2panda/compiler/core/programElement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/programElement.h b/ets2panda/compiler/core/programElement.h index 998754ccf8..c1f866cbb4 100644 --- a/ets2panda/compiler/core/programElement.h +++ b/ets2panda/compiler/core/programElement.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/regAllocator.cpp b/ets2panda/compiler/core/regAllocator.cpp index 07c2b353e2..2377a8e5a3 100644 --- a/ets2panda/compiler/core/regAllocator.cpp +++ b/ets2panda/compiler/core/regAllocator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/regAllocator.h b/ets2panda/compiler/core/regAllocator.h index 29ab23031c..b0f99907af 100644 --- a/ets2panda/compiler/core/regAllocator.h +++ b/ets2panda/compiler/core/regAllocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/regScope.cpp b/ets2panda/compiler/core/regScope.cpp index 6e535fa1cf..649d583654 100644 --- a/ets2panda/compiler/core/regScope.cpp +++ b/ets2panda/compiler/core/regScope.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/regScope.h b/ets2panda/compiler/core/regScope.h index 6fc8ce1137..bac7f92e8c 100644 --- a/ets2panda/compiler/core/regScope.h +++ b/ets2panda/compiler/core/regScope.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/regSpiller.cpp b/ets2panda/compiler/core/regSpiller.cpp index 468fd8b185..aced690245 100644 --- a/ets2panda/compiler/core/regSpiller.cpp +++ b/ets2panda/compiler/core/regSpiller.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/regSpiller.h b/ets2panda/compiler/core/regSpiller.h index aba5b3391a..ff8c62312f 100644 --- a/ets2panda/compiler/core/regSpiller.h +++ b/ets2panda/compiler/core/regSpiller.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * You may obtain a copy of the License GetReg + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -10,7 +10,7 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitGetRegions under the License. + * limitations under the License. */ #ifndef ES2PANDA_COMPILER_CORE_REG_SPILLER_H diff --git a/ets2panda/compiler/core/targetTypeContext.cpp b/ets2panda/compiler/core/targetTypeContext.cpp index e40e3eb554..12fc0c5abc 100644 --- a/ets2panda/compiler/core/targetTypeContext.cpp +++ b/ets2panda/compiler/core/targetTypeContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/targetTypeContext.h b/ets2panda/compiler/core/targetTypeContext.h index f476a5b3e9..e6760f22e7 100644 --- a/ets2panda/compiler/core/targetTypeContext.h +++ b/ets2panda/compiler/core/targetTypeContext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/vReg.cpp b/ets2panda/compiler/core/vReg.cpp index ccb80d7327..40f87a27c0 100644 --- a/ets2panda/compiler/core/vReg.cpp +++ b/ets2panda/compiler/core/vReg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/core/vReg.h b/ets2panda/compiler/core/vReg.h index cc56ed787b..0cc9c67ba1 100644 --- a/ets2panda/compiler/core/vReg.h +++ b/ets2panda/compiler/core/vReg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/debugger/debuginfoDumper.cpp b/ets2panda/compiler/debugger/debuginfoDumper.cpp index 1ff0a7d9e7..16b79913d4 100644 --- a/ets2panda/compiler/debugger/debuginfoDumper.cpp +++ b/ets2panda/compiler/debugger/debuginfoDumper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/debugger/debuginfoDumper.h b/ets2panda/compiler/debugger/debuginfoDumper.h index b0c581aaca..3f5f0ade92 100644 --- a/ets2panda/compiler/debugger/debuginfoDumper.h +++ b/ets2panda/compiler/debugger/debuginfoDumper.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/function/asyncFunctionBuilder.cpp b/ets2panda/compiler/function/asyncFunctionBuilder.cpp index 5ff219746a..2404ab976d 100644 --- a/ets2panda/compiler/function/asyncFunctionBuilder.cpp +++ b/ets2panda/compiler/function/asyncFunctionBuilder.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ets2panda/compiler/function/asyncFunctionBuilder.h b/ets2panda/compiler/function/asyncFunctionBuilder.h index 5034debb73..b0e9391714 100644 --- a/ets2panda/compiler/function/asyncFunctionBuilder.h +++ b/ets2panda/compiler/function/asyncFunctionBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/function/functionBuilder.cpp b/ets2panda/compiler/function/functionBuilder.cpp index b1ff7f4d00..f80788782e 100644 --- a/ets2panda/compiler/function/functionBuilder.cpp +++ b/ets2panda/compiler/function/functionBuilder.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ets2panda/compiler/function/functionBuilder.h b/ets2panda/compiler/function/functionBuilder.h index 3ca533d411..bed4faa1a2 100644 --- a/ets2panda/compiler/function/functionBuilder.h +++ b/ets2panda/compiler/function/functionBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/function/generatorFunctionBuilder.cpp b/ets2panda/compiler/function/generatorFunctionBuilder.cpp index 95d9b8eb39..9cdd4baf65 100644 --- a/ets2panda/compiler/function/generatorFunctionBuilder.cpp +++ b/ets2panda/compiler/function/generatorFunctionBuilder.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ets2panda/compiler/function/generatorFunctionBuilder.h b/ets2panda/compiler/function/generatorFunctionBuilder.h index d9d162b7c0..8dd2f6f76c 100644 --- a/ets2panda/compiler/function/generatorFunctionBuilder.h +++ b/ets2panda/compiler/function/generatorFunctionBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/checkerPhase.cpp b/ets2panda/compiler/lowering/checkerPhase.cpp index 6ecae534d1..a6c865ca83 100644 --- a/ets2panda/compiler/lowering/checkerPhase.cpp +++ b/ets2panda/compiler/lowering/checkerPhase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/checkerPhase.h b/ets2panda/compiler/lowering/checkerPhase.h index c6c0760642..86e0db579b 100644 --- a/ets2panda/compiler/lowering/checkerPhase.h +++ b/ets2panda/compiler/lowering/checkerPhase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/ets/generateDeclarations.cpp b/ets2panda/compiler/lowering/ets/generateDeclarations.cpp index 3ea98c3b9b..41393a607b 100644 --- a/ets2panda/compiler/lowering/ets/generateDeclarations.cpp +++ b/ets2panda/compiler/lowering/ets/generateDeclarations.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/ets/generateDeclarations.h b/ets2panda/compiler/lowering/ets/generateDeclarations.h index a59f1c6e04..fb7fcea3fd 100644 --- a/ets2panda/compiler/lowering/ets/generateDeclarations.h +++ b/ets2panda/compiler/lowering/ets/generateDeclarations.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/ets/opAssignment.cpp b/ets2panda/compiler/lowering/ets/opAssignment.cpp index abdc6fc3a2..03ecf30834 100644 --- a/ets2panda/compiler/lowering/ets/opAssignment.cpp +++ b/ets2panda/compiler/lowering/ets/opAssignment.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/ets/opAssignment.h b/ets2panda/compiler/lowering/ets/opAssignment.h index 30d20d0fd7..b3c8dbd789 100644 --- a/ets2panda/compiler/lowering/ets/opAssignment.h +++ b/ets2panda/compiler/lowering/ets/opAssignment.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/ets/unionLowering.cpp b/ets2panda/compiler/lowering/ets/unionLowering.cpp index 9aa3a1c893..1f70fa278d 100644 --- a/ets2panda/compiler/lowering/ets/unionLowering.cpp +++ b/ets2panda/compiler/lowering/ets/unionLowering.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2023 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/ets/unionLowering.h b/ets2panda/compiler/lowering/ets/unionLowering.h index beddab61fe..c8a4b49a90 100644 --- a/ets2panda/compiler/lowering/ets/unionLowering.h +++ b/ets2panda/compiler/lowering/ets/unionLowering.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2023 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/phase.cpp b/ets2panda/compiler/lowering/phase.cpp index c95b0eb067..f3b2ff83a6 100644 --- a/ets2panda/compiler/lowering/phase.cpp +++ b/ets2panda/compiler/lowering/phase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/compiler/lowering/phase.h b/ets2panda/compiler/lowering/phase.h index c1b59ed098..490c2fac13 100644 --- a/ets2panda/compiler/lowering/phase.h +++ b/ets2panda/compiler/lowering/phase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/as/namedType.cpp b/ets2panda/ir/as/namedType.cpp index 8cd429a9bf..1957c7a148 100644 --- a/ets2panda/ir/as/namedType.cpp +++ b/ets2panda/ir/as/namedType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/as/namedType.h b/ets2panda/ir/as/namedType.h index 595aa39c01..c8d58f3d33 100644 --- a/ets2panda/ir/as/namedType.h +++ b/ets2panda/ir/as/namedType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/as/prefixAssertionExpression.cpp b/ets2panda/ir/as/prefixAssertionExpression.cpp index 27d697f408..9d16342536 100644 --- a/ets2panda/ir/as/prefixAssertionExpression.cpp +++ b/ets2panda/ir/as/prefixAssertionExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/as/prefixAssertionExpression.h b/ets2panda/ir/as/prefixAssertionExpression.h index 60377a5179..245bf27996 100644 --- a/ets2panda/ir/as/prefixAssertionExpression.h +++ b/ets2panda/ir/as/prefixAssertionExpression.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/astNodeFlags.h b/ets2panda/ir/astNodeFlags.h index d8e7329a0a..83ed05029a 100644 --- a/ets2panda/ir/astNodeFlags.h +++ b/ets2panda/ir/astNodeFlags.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/ets2panda/ir/base/classElement.cpp b/ets2panda/ir/base/classElement.cpp index fd04aed68c..192aecf303 100644 --- a/ets2panda/ir/base/classElement.cpp +++ b/ets2panda/ir/base/classElement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/base/classElement.h b/ets2panda/ir/base/classElement.h index 796fde132f..ea99fb1566 100644 --- a/ets2panda/ir/base/classElement.h +++ b/ets2panda/ir/base/classElement.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/base/classStaticBlock.cpp b/ets2panda/ir/base/classStaticBlock.cpp index 012595ebe4..4f0b307bbb 100644 --- a/ets2panda/ir/base/classStaticBlock.cpp +++ b/ets2panda/ir/base/classStaticBlock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/base/classStaticBlock.h b/ets2panda/ir/base/classStaticBlock.h index 08d9a97a2b..f0539a3323 100644 --- a/ets2panda/ir/base/classStaticBlock.h +++ b/ets2panda/ir/base/classStaticBlock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsClassLiteral.cpp b/ets2panda/ir/ets/etsClassLiteral.cpp index 4b8673ebdb..79c11f531e 100644 --- a/ets2panda/ir/ets/etsClassLiteral.cpp +++ b/ets2panda/ir/ets/etsClassLiteral.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsClassLiteral.h b/ets2panda/ir/ets/etsClassLiteral.h index af4a875648..64dadfd65b 100644 --- a/ets2panda/ir/ets/etsClassLiteral.h +++ b/ets2panda/ir/ets/etsClassLiteral.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsFunctionType.cpp b/ets2panda/ir/ets/etsFunctionType.cpp index c4b962e10a..57e2248c56 100644 --- a/ets2panda/ir/ets/etsFunctionType.cpp +++ b/ets2panda/ir/ets/etsFunctionType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsFunctionType.h b/ets2panda/ir/ets/etsFunctionType.h index ca4cfcf2c7..62c59ffd9f 100644 --- a/ets2panda/ir/ets/etsFunctionType.h +++ b/ets2panda/ir/ets/etsFunctionType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsImportDeclaration.h b/ets2panda/ir/ets/etsImportDeclaration.h index 1a583ad4fb..cd6be9e417 100644 --- a/ets2panda/ir/ets/etsImportDeclaration.h +++ b/ets2panda/ir/ets/etsImportDeclaration.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsImportSource.cpp b/ets2panda/ir/ets/etsImportSource.cpp index a73b779c3e..edf3658ce5 100644 --- a/ets2panda/ir/ets/etsImportSource.cpp +++ b/ets2panda/ir/ets/etsImportSource.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsLaunchExpression.cpp b/ets2panda/ir/ets/etsLaunchExpression.cpp index 44976cdb5f..f5d880a47f 100644 --- a/ets2panda/ir/ets/etsLaunchExpression.cpp +++ b/ets2panda/ir/ets/etsLaunchExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsNewArrayInstanceExpression.cpp b/ets2panda/ir/ets/etsNewArrayInstanceExpression.cpp index e837295c0e..bf3d63aafe 100644 --- a/ets2panda/ir/ets/etsNewArrayInstanceExpression.cpp +++ b/ets2panda/ir/ets/etsNewArrayInstanceExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsNewArrayInstanceExpression.h b/ets2panda/ir/ets/etsNewArrayInstanceExpression.h index 68b5f7d134..553bb75120 100644 --- a/ets2panda/ir/ets/etsNewArrayInstanceExpression.h +++ b/ets2panda/ir/ets/etsNewArrayInstanceExpression.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsNewClassInstanceExpression.cpp b/ets2panda/ir/ets/etsNewClassInstanceExpression.cpp index 37f27e54b8..0e55a8ac98 100644 --- a/ets2panda/ir/ets/etsNewClassInstanceExpression.cpp +++ b/ets2panda/ir/ets/etsNewClassInstanceExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsNewClassInstanceExpression.h b/ets2panda/ir/ets/etsNewClassInstanceExpression.h index e35c911063..ffed6e65cd 100644 --- a/ets2panda/ir/ets/etsNewClassInstanceExpression.h +++ b/ets2panda/ir/ets/etsNewClassInstanceExpression.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsNewMultiDimArrayInstanceExpression.cpp b/ets2panda/ir/ets/etsNewMultiDimArrayInstanceExpression.cpp index d9b5d78eb1..3671c96b28 100644 --- a/ets2panda/ir/ets/etsNewMultiDimArrayInstanceExpression.cpp +++ b/ets2panda/ir/ets/etsNewMultiDimArrayInstanceExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsPackageDeclaration.cpp b/ets2panda/ir/ets/etsPackageDeclaration.cpp index 9ed77697fb..b31ed8e71b 100644 --- a/ets2panda/ir/ets/etsPackageDeclaration.cpp +++ b/ets2panda/ir/ets/etsPackageDeclaration.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsPackageDeclaration.h b/ets2panda/ir/ets/etsPackageDeclaration.h index 6a843313d2..8ca20442d3 100644 --- a/ets2panda/ir/ets/etsPackageDeclaration.h +++ b/ets2panda/ir/ets/etsPackageDeclaration.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsParameterExpression.cpp b/ets2panda/ir/ets/etsParameterExpression.cpp index a4eab69aba..bb0172b423 100644 --- a/ets2panda/ir/ets/etsParameterExpression.cpp +++ b/ets2panda/ir/ets/etsParameterExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsParameterExpression.h b/ets2panda/ir/ets/etsParameterExpression.h index e068b4e3b7..4ea4ed1e32 100644 --- a/ets2panda/ir/ets/etsParameterExpression.h +++ b/ets2panda/ir/ets/etsParameterExpression.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsPrimitiveType.cpp b/ets2panda/ir/ets/etsPrimitiveType.cpp index c2934842b5..f8debf8980 100644 --- a/ets2panda/ir/ets/etsPrimitiveType.cpp +++ b/ets2panda/ir/ets/etsPrimitiveType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsPrimitiveType.h b/ets2panda/ir/ets/etsPrimitiveType.h index 94df4d0eb7..8086c24a37 100644 --- a/ets2panda/ir/ets/etsPrimitiveType.h +++ b/ets2panda/ir/ets/etsPrimitiveType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsScript.cpp b/ets2panda/ir/ets/etsScript.cpp index 2797221382..3931ae75cc 100644 --- a/ets2panda/ir/ets/etsScript.cpp +++ b/ets2panda/ir/ets/etsScript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsScript.h b/ets2panda/ir/ets/etsScript.h index 6ab6a23465..7900b5f473 100644 --- a/ets2panda/ir/ets/etsScript.h +++ b/ets2panda/ir/ets/etsScript.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsStructDeclaration.cpp b/ets2panda/ir/ets/etsStructDeclaration.cpp index 0f62efc3ca..8bd7ed765a 100644 --- a/ets2panda/ir/ets/etsStructDeclaration.cpp +++ b/ets2panda/ir/ets/etsStructDeclaration.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsStructDeclaration.h b/ets2panda/ir/ets/etsStructDeclaration.h index 9dc920dc91..90a448f581 100644 --- a/ets2panda/ir/ets/etsStructDeclaration.h +++ b/ets2panda/ir/ets/etsStructDeclaration.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsTypeReference.cpp b/ets2panda/ir/ets/etsTypeReference.cpp index 274f7584a7..07935632c0 100644 --- a/ets2panda/ir/ets/etsTypeReference.cpp +++ b/ets2panda/ir/ets/etsTypeReference.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsTypeReference.h b/ets2panda/ir/ets/etsTypeReference.h index adadc8fd96..d23a1a5cbe 100644 --- a/ets2panda/ir/ets/etsTypeReference.h +++ b/ets2panda/ir/ets/etsTypeReference.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsTypeReferencePart.cpp b/ets2panda/ir/ets/etsTypeReferencePart.cpp index 2bdb6d282c..ca7207a6f0 100644 --- a/ets2panda/ir/ets/etsTypeReferencePart.cpp +++ b/ets2panda/ir/ets/etsTypeReferencePart.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsTypeReferencePart.h b/ets2panda/ir/ets/etsTypeReferencePart.h index 25b9611bba..6c48c560da 100644 --- a/ets2panda/ir/ets/etsTypeReferencePart.h +++ b/ets2panda/ir/ets/etsTypeReferencePart.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsUnionType.cpp b/ets2panda/ir/ets/etsUnionType.cpp index e811f5a37d..803a0598f7 100644 --- a/ets2panda/ir/ets/etsUnionType.cpp +++ b/ets2panda/ir/ets/etsUnionType.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsUnionType.h b/ets2panda/ir/ets/etsUnionType.h index c7f146794c..a5a37940b7 100644 --- a/ets2panda/ir/ets/etsUnionType.h +++ b/ets2panda/ir/ets/etsUnionType.h @@ -1,5 +1,5 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. +/* + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsWildcardType.cpp b/ets2panda/ir/ets/etsWildcardType.cpp index d389a94820..1ca7675248 100644 --- a/ets2panda/ir/ets/etsWildcardType.cpp +++ b/ets2panda/ir/ets/etsWildcardType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/ets/etsWildcardType.h b/ets2panda/ir/ets/etsWildcardType.h index eb9c17a333..624057c01c 100644 --- a/ets2panda/ir/ets/etsWildcardType.h +++ b/ets2panda/ir/ets/etsWildcardType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/expressions/directEvalExpression.h b/ets2panda/ir/expressions/directEvalExpression.h index c9ecd693f9..eca1913339 100644 --- a/ets2panda/ir/expressions/directEvalExpression.h +++ b/ets2panda/ir/expressions/directEvalExpression.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/irnode.cpp b/ets2panda/ir/irnode.cpp index 4f2344a4be..7f270a9014 100644 --- a/ets2panda/ir/irnode.cpp +++ b/ets2panda/ir/irnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/opaqueTypeNode.cpp b/ets2panda/ir/opaqueTypeNode.cpp index 977e9efd70..caa23c6133 100644 --- a/ets2panda/ir/opaqueTypeNode.cpp +++ b/ets2panda/ir/opaqueTypeNode.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/opaqueTypeNode.h b/ets2panda/ir/opaqueTypeNode.h index 676f5478d4..bdd09667bb 100644 --- a/ets2panda/ir/opaqueTypeNode.h +++ b/ets2panda/ir/opaqueTypeNode.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/opcodeMap.h b/ets2panda/ir/opcodeMap.h index a6073bcb99..e6deaf249a 100644 --- a/ets2panda/ir/opcodeMap.h +++ b/ets2panda/ir/opcodeMap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/statements/assertStatement.cpp b/ets2panda/ir/statements/assertStatement.cpp index ded0f27717..dd5ddb3b3e 100644 --- a/ets2panda/ir/statements/assertStatement.cpp +++ b/ets2panda/ir/statements/assertStatement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/ir/statements/assertStatement.h b/ets2panda/ir/statements/assertStatement.h index 749c5c739b..e66acedc86 100644 --- a/ets2panda/ir/statements/assertStatement.h +++ b/ets2panda/ir/statements/assertStatement.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/ASLexer.cpp b/ets2panda/lexer/ASLexer.cpp index 188161e89b..aed23b0caa 100644 --- a/ets2panda/lexer/ASLexer.cpp +++ b/ets2panda/lexer/ASLexer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/ASLexer.h b/ets2panda/lexer/ASLexer.h index 6fe3ec048a..e3015c4147 100644 --- a/ets2panda/lexer/ASLexer.h +++ b/ets2panda/lexer/ASLexer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/ETSLexer.cpp b/ets2panda/lexer/ETSLexer.cpp index 935daba802..aa5b41719e 100644 --- a/ets2panda/lexer/ETSLexer.cpp +++ b/ets2panda/lexer/ETSLexer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/ETSLexer.h b/ets2panda/lexer/ETSLexer.h index 32a4c4147a..1ad9801099 100644 --- a/ets2panda/lexer/ETSLexer.h +++ b/ets2panda/lexer/ETSLexer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/TSLexer.cpp b/ets2panda/lexer/TSLexer.cpp index c2f3cc5cf0..13fd19ea45 100644 --- a/ets2panda/lexer/TSLexer.cpp +++ b/ets2panda/lexer/TSLexer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/TSLexer.h b/ets2panda/lexer/TSLexer.h index b4c1aa307d..64a4dee135 100644 --- a/ets2panda/lexer/TSLexer.h +++ b/ets2panda/lexer/TSLexer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/keywords.cpp b/ets2panda/lexer/keywords.cpp index c5ea702c23..3e5cd08755 100644 --- a/ets2panda/lexer/keywords.cpp +++ b/ets2panda/lexer/keywords.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/keywordsBase.h b/ets2panda/lexer/keywordsBase.h index a7d1d0f476..b1651473fa 100644 --- a/ets2panda/lexer/keywordsBase.h +++ b/ets2panda/lexer/keywordsBase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/token/number.cpp b/ets2panda/lexer/token/number.cpp index 3cbb8bc542..afc22d4399 100644 --- a/ets2panda/lexer/token/number.cpp +++ b/ets2panda/lexer/token/number.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/lexer/token/number.h b/ets2panda/lexer/token/number.h index 840285f60c..7afd5aec3d 100644 --- a/ets2panda/lexer/token/number.h +++ b/ets2panda/lexer/token/number.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/public/es2panda_lib.cpp b/ets2panda/public/es2panda_lib.cpp index 690e286a03..6b6c6e5cf4 100644 --- a/ets2panda/public/es2panda_lib.cpp +++ b/ets2panda/public/es2panda_lib.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/public/es2panda_lib.h b/ets2panda/public/es2panda_lib.h index 0873d590d9..d20aee7772 100644 --- a/ets2panda/public/es2panda_lib.h +++ b/ets2panda/public/es2panda_lib.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -- Gitee From f3e2cf51f1c7335fd972526b3b33b28df9e4ba32 Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 20:29:41 +0300 Subject: [PATCH 8/9] [ArkTS ets_frontend] codestyle fixes --- ets2panda/checker/ETSAnalyzer.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index 5a5c27aab0..26ebf655d4 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -689,7 +689,8 @@ checker::Type *ETSAnalyzer::Check(ir::LabelledStatement *st) const } -void CheckVoidType(checker::Type *&func_return_type, ETSChecker *&checker, const std::string &name, ir::ReturnStatement *st) +void CheckVoidType(checker::Type *&func_return_type, ETSChecker *&checker, const std::string &name, + ir::ReturnStatement *st) { if (name.find(compiler::Signatures::ETS_MAIN_WITH_MANGLE_BEGIN) != std::string::npos) { if (func_return_type == checker->GlobalBuiltinVoidType()) { @@ -710,19 +711,6 @@ void CheckMissingArgumentType(checker::Type *&func_return_type, ETSChecker *chec containing_func->IsEntryPoint() ? checker->GlobalVoidType() : checker->GlobalBuiltinVoidType(); } -// void CheckObjectExpressionType(ir::ReturnStatement *st, checker::Type *func_return_type) -// { -// if (st->argument_->IsObjectExpression()) { -// st->argument_->AsObjectExpression()->SetPreferredType(func_return_type); -// } -// } - -// void CheckMemberExpressionType(ir::ReturnStatement *st, checker::Type *func_return_type) { -// if (st->argument_->IsMemberExpression()) { -// checker->SetArrayPreferredTypeForNestedMemberExpressions(st->argument_->AsMemberExpression(), -// func_return_type); -// } -// } checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const { ETSChecker *checker = GetETSChecker(); -- Gitee From 3f6df56e04b1311aa0e8b9686be27dc4cf1ffe7d Mon Sep 17 00:00:00 2001 From: ermolaevavarvara Date: Fri, 10 Nov 2023 21:14:37 +0300 Subject: [PATCH 9/9] [ArkTS ets_frontend] codestyle fixes --- ets2panda/checker/ETSAnalyzer.cpp | 294 ++++++++++++++++-------------- 1 file changed, 160 insertions(+), 134 deletions(-) diff --git a/ets2panda/checker/ETSAnalyzer.cpp b/ets2panda/checker/ETSAnalyzer.cpp index 26ebf655d4..e108f48e27 100644 --- a/ets2panda/checker/ETSAnalyzer.cpp +++ b/ets2panda/checker/ETSAnalyzer.cpp @@ -689,7 +689,7 @@ checker::Type *ETSAnalyzer::Check(ir::LabelledStatement *st) const } -void CheckVoidType(checker::Type *&func_return_type, ETSChecker *&checker, const std::string &name, +void CheckArgumentVoidType(checker::Type *&func_return_type, ETSChecker *&checker, const std::string &name, ir::ReturnStatement *st) { if (name.find(compiler::Signatures::ETS_MAIN_WITH_MANGLE_BEGIN) != std::string::npos) { @@ -702,7 +702,7 @@ void CheckVoidType(checker::Type *&func_return_type, ETSChecker *&checker, const } void CheckMissingArgumentType(checker::Type *&func_return_type, ETSChecker *checker, - ir::ScriptFunction *containing_func, ir::ReturnStatement *st) + ir::ScriptFunction *containing_func, ir::ReturnStatement *st) { if (!func_return_type->IsETSVoidType() && func_return_type != checker->GlobalBuiltinVoidType()) { checker->ThrowTypeError("Missing return value.", st->Start()); @@ -711,6 +711,158 @@ void CheckMissingArgumentType(checker::Type *&func_return_type, ETSChecker *chec containing_func->IsEntryPoint() ? checker->GlobalVoidType() : checker->GlobalBuiltinVoidType(); } +void CheckObjectExpressionType(ir::Expression *st_argument, checker::Type *func_return_type) +{ + if (st_argument->IsObjectExpression()) { + st_argument->AsObjectExpression()->SetPreferredType(func_return_type); + } +} + +void CheckMemberExpressionType(ir::Expression *st_argument, ETSChecker *checker, checker::Type *func_return_type) +{ + if (st_argument->IsMemberExpression()) { + checker->SetArrayPreferredTypeForNestedMemberExpressions(st_argument->AsMemberExpression(), + func_return_type); + } +} + +void CheckReturnType(ETSChecker *checker, checker::Type *func_return_type, checker::Type *argument_type, + ir::Expression *st_argument) +{ + if (func_return_type->IsETSVoidType() || func_return_type == checker->GlobalBuiltinVoidType()) { + if (argument_type != checker->GlobalVoidType() && argument_type != checker->GlobalBuiltinVoidType()) { + checker->ThrowTypeError("Unexpected return value, enclosing method return type is void.", + st_argument->Start()); + } + } else { + checker::AssignmentContext( + checker->Relation(), st_argument, argument_type, func_return_type, st_argument->Start(), + {"Return statement type is not compatible with the enclosing method's return type."}, + checker::TypeRelationFlag::DIRECT_RETURN); + } +} + +void CheckSignatureFlag(ETSChecker *checker, ir::ScriptFunction *containing_func, checker::Type *&func_return_type, + ir::Expression *st_argument) +{ + // First (or single) return statement in the function: + func_return_type = + st_argument == nullptr ? checker->GlobalBuiltinVoidType() : st_argument->Check(checker); + if (func_return_type->HasTypeFlag(checker::TypeFlag::CONSTANT)) { + // remove CONSTANT type modifier if exists + func_return_type = func_return_type->Instantiate(checker->Allocator(), checker->Relation(), + checker->GetGlobalTypesHolder()); + func_return_type->RemoveTypeFlag(checker::TypeFlag::CONSTANT); + } + + containing_func->Signature()->SetReturnType(func_return_type); + containing_func->Signature()->RemoveSignatureFlag(checker::SignatureFlags::NEED_RETURN_TYPE); + checker->VarBinder()->AsETSBinder()->BuildFunctionName(containing_func); + + if (st_argument != nullptr && st_argument->IsObjectExpression()) { + st_argument->AsObjectExpression()->SetPreferredType(func_return_type); + } +} + +void CheckNoSignatureFlag(ETSChecker *checker, ir::ScriptFunction *containing_func, checker::Type *&func_return_type, + ir::ReturnStatement *st, ir::Expression *st_argument) +{ + func_return_type = containing_func->Signature()->ReturnType(); + + if (st_argument == nullptr) { + // previous return statement(s) have value + if (!func_return_type->IsETSVoidType() && func_return_type != checker->GlobalBuiltinVoidType()) { + checker->ThrowTypeError("All return statements in the function should be empty or have a value.", + st->Start()); + } + } else { + // previous return statement(s) don't have any value + if (func_return_type->IsETSVoidType() || func_return_type == checker->GlobalBuiltinVoidType()) { + checker->ThrowTypeError("All return statements in the function should be empty or have a value.", + st_argument->Start()); + } + + const auto name = containing_func->Scope()->InternalName().Mutf8(); + if (name.find(compiler::Signatures::ETS_MAIN_WITH_MANGLE_BEGIN) != std::string::npos) { + if (func_return_type == checker->GlobalBuiltinVoidType()) { + func_return_type = checker->GlobalVoidType(); + } else if (!func_return_type->IsETSVoidType() && !func_return_type->IsIntType()) { + checker->ThrowTypeError("Bad return type, main enable only void or int type.", st->Start()); + } + } + + if (st_argument->IsObjectExpression()) { + st_argument->AsObjectExpression()->SetPreferredType(func_return_type); + } + + if (st_argument->IsMemberExpression()) { + checker->SetArrayPreferredTypeForNestedMemberExpressions(st_argument->AsMemberExpression(), + func_return_type); + } + + checker::Type *argument_type = st_argument->Check(checker); + // remove CONSTANT type modifier if exists + if (argument_type->HasTypeFlag(checker::TypeFlag::CONSTANT)) { + argument_type = argument_type->Instantiate(checker->Allocator(), checker->Relation(), + checker->GetGlobalTypesHolder()); + argument_type->RemoveTypeFlag(checker::TypeFlag::CONSTANT); + } + + auto *const relation = checker->Relation(); + relation->SetNode(st_argument); + + if (!relation->IsIdenticalTo(func_return_type, argument_type)) { + if (func_return_type->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT) || + argument_type->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT)) { + // function return type should be of reference (object) type + relation->SetFlags(checker::TypeRelationFlag::NONE); + + if (!argument_type->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT)) { + argument_type = checker->PrimitiveTypeAsETSBuiltinType(argument_type); + if (argument_type == nullptr) { + checker->ThrowTypeError("Invalid return statement expression", st_argument->Start()); + } + st_argument->AddBoxingUnboxingFlag(checker->GetBoxingFlag(argument_type)); + } + + if (!func_return_type->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT)) { + func_return_type = checker->PrimitiveTypeAsETSBuiltinType(func_return_type); + if (func_return_type == nullptr) { + checker->ThrowTypeError("Invalid return function expression", st->Start()); + } + } + + func_return_type = checker->FindLeastUpperBound(func_return_type, argument_type); + containing_func->Signature()->SetReturnType(func_return_type); + containing_func->Signature()->AddSignatureFlag(checker::SignatureFlags::INFERRED_RETURN_TYPE); + } else if (func_return_type->HasTypeFlag(checker::TypeFlag::ETS_PRIMITIVE_RETURN) && + argument_type->HasTypeFlag(checker::TypeFlag::ETS_PRIMITIVE_RETURN)) { + // function return type is of primitive type (including enums): + relation->SetFlags(checker::TypeRelationFlag::DIRECT_RETURN | + checker::TypeRelationFlag::IN_ASSIGNMENT_CONTEXT | + checker::TypeRelationFlag::ASSIGNMENT_CONTEXT); + if (relation->IsAssignableTo(func_return_type, argument_type)) { + func_return_type = argument_type; + containing_func->Signature()->SetReturnType(func_return_type); + containing_func->Signature()->AddSignatureFlag( + checker::SignatureFlags::INFERRED_RETURN_TYPE); + } else if (!relation->IsAssignableTo(argument_type, func_return_type)) { + checker->ThrowTypeError( + "Return statement type is not compatible with previous method's return statement " + "type(s).", + st_argument->Start()); + } + + } else { + checker->ThrowTypeError("Invalid return statement type(s).", st->Start()); + } + } + + relation->SetNode(nullptr); + relation->SetFlags(checker::TypeRelationFlag::NONE); + } +} + checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const { ETSChecker *checker = GetETSChecker(); @@ -739,147 +891,21 @@ checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const CheckMissingArgumentType(func_return_type, checker, containing_func, st); } else { const auto name = containing_func->Scope()->InternalName().Mutf8(); - CheckVoidType(func_return_type, checker, name, st); - - if (st->argument_->IsObjectExpression()) { - st->argument_->AsObjectExpression()->SetPreferredType(func_return_type); - } - - if (st->argument_->IsMemberExpression()) { - checker->SetArrayPreferredTypeForNestedMemberExpressions(st->argument_->AsMemberExpression(), - func_return_type); - } + CheckArgumentVoidType(func_return_type, checker, name, st); + CheckObjectExpressionType(st->argument_, func_return_type); + CheckMemberExpressionType(st->argument_, checker, func_return_type); checker::Type *argument_type = st->argument_->Check(checker); - if (func_return_type->IsETSVoidType() || func_return_type == checker->GlobalBuiltinVoidType()) { - if (argument_type != checker->GlobalVoidType() && argument_type != checker->GlobalBuiltinVoidType()) { - checker->ThrowTypeError("Unexpected return value, enclosing method return type is void.", - st->argument_->Start()); - } - } else { - checker::AssignmentContext( - checker->Relation(), st->argument_, argument_type, func_return_type, st->argument_->Start(), - {"Return statement type is not compatible with the enclosing method's return type."}, - checker::TypeRelationFlag::DIRECT_RETURN); - } + CheckReturnType(checker, func_return_type, argument_type, st->argument_); } } else { // Case when function's return type should be inferred from return statement(s): if (containing_func->Signature()->HasSignatureFlag(checker::SignatureFlags::NEED_RETURN_TYPE)) { - // First (or single) return statement in the function: - func_return_type = - st->argument_ == nullptr ? checker->GlobalBuiltinVoidType() : st->argument_->Check(checker); - if (func_return_type->HasTypeFlag(checker::TypeFlag::CONSTANT)) { - // remove CONSTANT type modifier if exists - func_return_type = func_return_type->Instantiate(checker->Allocator(), checker->Relation(), - checker->GetGlobalTypesHolder()); - func_return_type->RemoveTypeFlag(checker::TypeFlag::CONSTANT); - } - - containing_func->Signature()->SetReturnType(func_return_type); - containing_func->Signature()->RemoveSignatureFlag(checker::SignatureFlags::NEED_RETURN_TYPE); - checker->VarBinder()->AsETSBinder()->BuildFunctionName(containing_func); - - if (st->argument_ != nullptr && st->argument_->IsObjectExpression()) { - st->argument_->AsObjectExpression()->SetPreferredType(func_return_type); - } + CheckSignatureFlag(checker, containing_func, func_return_type, st->argument_); } else { // All subsequent return statements: - func_return_type = containing_func->Signature()->ReturnType(); - - if (st->argument_ == nullptr) { - // previous return statement(s) have value - if (!func_return_type->IsETSVoidType() && func_return_type != checker->GlobalBuiltinVoidType()) { - checker->ThrowTypeError("All return statements in the function should be empty or have a value.", - st->Start()); - } - } else { - // previous return statement(s) don't have any value - if (func_return_type->IsETSVoidType() || func_return_type == checker->GlobalBuiltinVoidType()) { - checker->ThrowTypeError("All return statements in the function should be empty or have a value.", - st->argument_->Start()); - } - - const auto name = containing_func->Scope()->InternalName().Mutf8(); - if (name.find(compiler::Signatures::ETS_MAIN_WITH_MANGLE_BEGIN) != std::string::npos) { - if (func_return_type == checker->GlobalBuiltinVoidType()) { - func_return_type = checker->GlobalVoidType(); - } else if (!func_return_type->IsETSVoidType() && !func_return_type->IsIntType()) { - checker->ThrowTypeError("Bad return type, main enable only void or int type.", st->Start()); - } - } - - if (st->argument_->IsObjectExpression()) { - st->argument_->AsObjectExpression()->SetPreferredType(func_return_type); - } - - if (st->argument_->IsMemberExpression()) { - checker->SetArrayPreferredTypeForNestedMemberExpressions(st->argument_->AsMemberExpression(), - func_return_type); - } - - checker::Type *argument_type = st->argument_->Check(checker); - // remove CONSTANT type modifier if exists - if (argument_type->HasTypeFlag(checker::TypeFlag::CONSTANT)) { - argument_type = argument_type->Instantiate(checker->Allocator(), checker->Relation(), - checker->GetGlobalTypesHolder()); - argument_type->RemoveTypeFlag(checker::TypeFlag::CONSTANT); - } - - auto *const relation = checker->Relation(); - relation->SetNode(st->argument_); - - if (!relation->IsIdenticalTo(func_return_type, argument_type)) { - if (func_return_type->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT) || - argument_type->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT)) { - // function return type should be of reference (object) type - relation->SetFlags(checker::TypeRelationFlag::NONE); - - if (!argument_type->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT)) { - argument_type = checker->PrimitiveTypeAsETSBuiltinType(argument_type); - if (argument_type == nullptr) { - checker->ThrowTypeError("Invalid return statement expression", st->argument_->Start()); - } - st->argument_->AddBoxingUnboxingFlag(checker->GetBoxingFlag(argument_type)); - } - - if (!func_return_type->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT)) { - func_return_type = checker->PrimitiveTypeAsETSBuiltinType(func_return_type); - if (func_return_type == nullptr) { - checker->ThrowTypeError("Invalid return function expression", st->Start()); - } - } - - func_return_type = checker->FindLeastUpperBound(func_return_type, argument_type); - containing_func->Signature()->SetReturnType(func_return_type); - containing_func->Signature()->AddSignatureFlag(checker::SignatureFlags::INFERRED_RETURN_TYPE); - } else if (func_return_type->HasTypeFlag(checker::TypeFlag::ETS_PRIMITIVE_RETURN) && - argument_type->HasTypeFlag(checker::TypeFlag::ETS_PRIMITIVE_RETURN)) { - // function return type is of primitive type (including enums): - relation->SetFlags(checker::TypeRelationFlag::DIRECT_RETURN | - checker::TypeRelationFlag::IN_ASSIGNMENT_CONTEXT | - checker::TypeRelationFlag::ASSIGNMENT_CONTEXT); - if (relation->IsAssignableTo(func_return_type, argument_type)) { - func_return_type = argument_type; - containing_func->Signature()->SetReturnType(func_return_type); - containing_func->Signature()->AddSignatureFlag( - checker::SignatureFlags::INFERRED_RETURN_TYPE); - } else if (!relation->IsAssignableTo(argument_type, func_return_type)) { - checker->ThrowTypeError( - "Return statement type is not compatible with previous method's return statement " - "type(s).", - st->argument_->Start()); - } - - } else { - checker->ThrowTypeError("Invalid return statement type(s).", st->Start()); - } - } - - relation->SetNode(nullptr); - relation->SetFlags(checker::TypeRelationFlag::NONE); - } + CheckNoSignatureFlag(checker, containing_func, func_return_type, st, st->argument_); } } -- Gitee