From 3b071dc975873774a86aeb7f2cca436f0b92fa75 Mon Sep 17 00:00:00 2001 From: Aleksandr Semenov Date: Thu, 16 Nov 2023 17:07:33 +0300 Subject: [PATCH] Revert "[ArkTS ets_frontend] codestyle fixes" This reverts commit 77f1ec7949113a3824f6167094779ea4cab07435. Signed-off-by: Aleksandr Semenov --- ets2panda/checker/ASchecker.cpp | 2 +- ets2panda/checker/ASchecker.h | 2 +- ets2panda/checker/ETSAnalyzer.cpp | 286 ++++++++---------- 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 +- .../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 +- .../types/ets/etsAsyncFuncReturnType.h | 2 +- .../checker/types/ets/etsBooleanType.cpp | 2 +- ets2panda/checker/types/ets/etsBooleanType.h | 2 +- .../types/ets/etsDynamicFunctionType.h | 2 +- .../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 +- .../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 +- .../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/checker/types/ts/objectType.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 | 36 +-- 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 +- .../compiler/debugger/debuginfoDumper.cpp | 2 +- ets2panda/compiler/debugger/debuginfoDumper.h | 2 +- .../function/asyncFunctionBuilder.cpp | 4 +- .../compiler/function/asyncFunctionBuilder.h | 2 +- .../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 +- .../compiler/lowering/ets/opAssignment.h | 2 +- .../compiler/lowering/ets/unionLowering.cpp | 4 +- .../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/base/templateElement.cpp | 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 +- .../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/parser/ETSparser.cpp | 6 +- ets2panda/public/es2panda_lib.cpp | 2 +- ets2panda/public/es2panda_lib.h | 2 +- ets2panda/scripts/es2panda_coverage.sh | 2 +- .../{test_runner.py => test-runner.py} | 1 - 214 files changed, 382 insertions(+), 407 deletions(-) rename ets2panda/scripts/{test_runner.py => test-runner.py} (99%) diff --git a/ets2panda/checker/ASchecker.cpp b/ets2panda/checker/ASchecker.cpp index 3f096b5ce2..492c3b5d7a 100644 --- a/ets2panda/checker/ASchecker.cpp +++ b/ets2panda/checker/ASchecker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 7dad82f861..d2840c0533 100644 --- a/ets2panda/checker/ASchecker.h +++ b/ets2panda/checker/ASchecker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 2efdf0aa7d..1b18db86c4 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 @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #include "ETSAnalyzer.h" #include "varbinder/varbinder.h" @@ -688,153 +687,6 @@ checker::Type *ETSAnalyzer::Check(ir::LabelledStatement *st) const UNREACHABLE(); } -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) { - 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 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 InferReturnType(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 ProcessReturnStatements(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(); @@ -852,7 +704,7 @@ checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const ASSERT(containing_func->ReturnTypeAnnotation() != nullptr || containing_func->Signature()->ReturnType() != nullptr); - checker::Type *func_return_type = nullptr; + checker::Type *func_return_type; if (auto *const return_type_annotation = containing_func->ReturnTypeAnnotation(); return_type_annotation != nullptr) { @@ -867,11 +719,18 @@ checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const containing_func->IsEntryPoint() ? checker->GlobalVoidType() : checker->GlobalBuiltinVoidType(); } else { const auto name = containing_func->Scope()->InternalName().Mutf8(); - CheckArgumentVoidType(func_return_type, checker, name, 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()); + } + } if (st->argument_->IsObjectExpression()) { st->argument_->AsObjectExpression()->SetPreferredType(func_return_type); } + if (st->argument_->IsMemberExpression()) { checker->SetArrayPreferredTypeForNestedMemberExpressions(st->argument_->AsMemberExpression(), func_return_type); @@ -879,15 +738,134 @@ checker::Type *ETSAnalyzer::Check(ir::ReturnStatement *st) const checker::Type *argument_type = st->argument_->Check(checker); - CheckReturnType(checker, func_return_type, argument_type, 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); + } } } else { // Case when function's return type should be inferred from return statement(s): if (containing_func->Signature()->HasSignatureFlag(checker::SignatureFlags::NEED_RETURN_TYPE)) { - InferReturnType(checker, containing_func, func_return_type, 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); + } } else { // All subsequent return statements: - ProcessReturnStatements(checker, containing_func, func_return_type, st, 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); + } } } diff --git a/ets2panda/checker/ETSAnalyzer.h b/ets2panda/checker/ETSAnalyzer.h index de2b57cc58..7bc4f8a620 100644 --- a/ets2panda/checker/ETSAnalyzer.h +++ b/ets2panda/checker/ETSAnalyzer.h @@ -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/checker/ETSchecker.cpp b/ets2panda/checker/ETSchecker.cpp index b3271a635d..7a088cb5b6 100644 --- a/ets2panda/checker/ETSchecker.cpp +++ b/ets2panda/checker/ETSchecker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 f1eda74ff4..79927a9efd 100644 --- a/ets2panda/checker/ETSchecker.h +++ b/ets2panda/checker/ETSchecker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 5b72fec1c2..c86bd4ddf1 100644 --- a/ets2panda/checker/JSchecker.cpp +++ b/ets2panda/checker/JSchecker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 adfa71ef13..9dd522c283 100644 --- a/ets2panda/checker/JSchecker.h +++ b/ets2panda/checker/JSchecker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 76c7edac97..0cb278a556 100644 --- a/ets2panda/checker/SemanticAnalyzer.h +++ b/ets2panda/checker/SemanticAnalyzer.h @@ -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/checker/TSAnalyzer.cpp b/ets2panda/checker/TSAnalyzer.cpp index 7f6acbba2a..6b42c2deb6 100644 --- a/ets2panda/checker/TSAnalyzer.cpp +++ b/ets2panda/checker/TSAnalyzer.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/checker/TSAnalyzer.h b/ets2panda/checker/TSAnalyzer.h index eb23fa2fc5..72f353f284 100644 --- a/ets2panda/checker/TSAnalyzer.h +++ b/ets2panda/checker/TSAnalyzer.h @@ -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/checker/TSchecker.cpp b/ets2panda/checker/TSchecker.cpp index 6a9eb3977e..672834816b 100644 --- a/ets2panda/checker/TSchecker.cpp +++ b/ets2panda/checker/TSchecker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 53ac7cdcb9..37d45b60ac 100644 --- a/ets2panda/checker/TSchecker.h +++ b/ets2panda/checker/TSchecker.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 3c6ef37295..a7485952e9 100644 --- a/ets2panda/checker/ets/aliveAnalyzer.cpp +++ b/ets2panda/checker/ets/aliveAnalyzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 08539b32fd..c9c80f2d01 100644 --- a/ets2panda/checker/ets/aliveAnalyzer.h +++ b/ets2panda/checker/ets/aliveAnalyzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 9cb2bdbe06..6f112eb89d 100644 --- a/ets2panda/checker/ets/arithmetic.cpp +++ b/ets2panda/checker/ets/arithmetic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 0eb9a97929..5471d52e97 100644 --- a/ets2panda/checker/ets/arithmetic.h +++ b/ets2panda/checker/ets/arithmetic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 68e18c435e..18cbe6fe29 100644 --- a/ets2panda/checker/ets/baseAnalyzer.cpp +++ b/ets2panda/checker/ets/baseAnalyzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 48e340531a..039fbe34f6 100644 --- a/ets2panda/checker/ets/baseAnalyzer.h +++ b/ets2panda/checker/ets/baseAnalyzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 71960110b3..5bc90847f7 100644 --- a/ets2panda/checker/ets/boxingConverter.cpp +++ b/ets2panda/checker/ets/boxingConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 13ccc675ed..ed53d9db60 100644 --- a/ets2panda/checker/ets/boxingConverter.h +++ b/ets2panda/checker/ets/boxingConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 dbb7ea4b52..a9c5418494 100644 --- a/ets2panda/checker/ets/castingContext.cpp +++ b/ets2panda/checker/ets/castingContext.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/checker/ets/castingContext.h b/ets2panda/checker/ets/castingContext.h index db6ef1442b..c5ff8257b8 100644 --- a/ets2panda/checker/ets/castingContext.h +++ b/ets2panda/checker/ets/castingContext.h @@ -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/checker/ets/conversion.cpp b/ets2panda/checker/ets/conversion.cpp index 83d5c7ec9e..2c9ac1fa40 100644 --- a/ets2panda/checker/ets/conversion.cpp +++ b/ets2panda/checker/ets/conversion.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/checker/ets/conversion.h b/ets2panda/checker/ets/conversion.h index f796162a35..2b94bfbfc6 100644 --- a/ets2panda/checker/ets/conversion.h +++ b/ets2panda/checker/ets/conversion.h @@ -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/checker/ets/dynamic.cpp b/ets2panda/checker/ets/dynamic.cpp index eec5ae919e..69c9b85268 100644 --- a/ets2panda/checker/ets/dynamic.cpp +++ b/ets2panda/checker/ets/dynamic.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/checker/ets/enum.cpp b/ets2panda/checker/ets/enum.cpp index fa148b719b..30e069a25b 100644 --- a/ets2panda/checker/ets/enum.cpp +++ b/ets2panda/checker/ets/enum.cpp @@ -1,10 +1,10 @@ /* - * 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 * - * 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 c112c116f7..0ac3267d1a 100644 --- a/ets2panda/checker/ets/function_helpers.h +++ b/ets2panda/checker/ets/function_helpers.h @@ -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/checker/ets/narrowingConverter.cpp b/ets2panda/checker/ets/narrowingConverter.cpp index ad1dabf223..2ad2863853 100644 --- a/ets2panda/checker/ets/narrowingConverter.cpp +++ b/ets2panda/checker/ets/narrowingConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 89686fb09c..7c2edddfd6 100644 --- a/ets2panda/checker/ets/narrowingConverter.h +++ b/ets2panda/checker/ets/narrowingConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 7a628733a2..8a037b0301 100644 --- a/ets2panda/checker/ets/narrowingWideningConverter.cpp +++ b/ets2panda/checker/ets/narrowingWideningConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 2716c8303f..c6e16aceab 100644 --- a/ets2panda/checker/ets/narrowingWideningConverter.h +++ b/ets2panda/checker/ets/narrowingWideningConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 046f40ced0..4f9c6b68b0 100644 --- a/ets2panda/checker/ets/primitiveWrappers.cpp +++ b/ets2panda/checker/ets/primitiveWrappers.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 c64e03da02..b648c16817 100644 --- a/ets2panda/checker/ets/typeConverter.cpp +++ b/ets2panda/checker/ets/typeConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 d0b0060f7a..0c3289a85f 100644 --- a/ets2panda/checker/ets/typeConverter.h +++ b/ets2panda/checker/ets/typeConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 ee23d08854..2f56a4c41c 100644 --- a/ets2panda/checker/ets/typeRelationContext.cpp +++ b/ets2panda/checker/ets/typeRelationContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 bd08c6587a..2cedf02fa1 100644 --- a/ets2panda/checker/ets/typeRelationContext.h +++ b/ets2panda/checker/ets/typeRelationContext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 3dba28ee93..4f378a6d96 100644 --- a/ets2panda/checker/ets/unboxingConverter.cpp +++ b/ets2panda/checker/ets/unboxingConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 540f22fb9d..f18fe678dd 100644 --- a/ets2panda/checker/ets/unboxingConverter.h +++ b/ets2panda/checker/ets/unboxingConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 6d6e681d50..ac7ef8579e 100644 --- a/ets2panda/checker/ets/wideningConverter.cpp +++ b/ets2panda/checker/ets/wideningConverter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 12dddcecdc..aa254771ce 100644 --- a/ets2panda/checker/ets/wideningConverter.h +++ b/ets2panda/checker/ets/wideningConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 8d9470c5fd..84844d2919 100644 --- a/ets2panda/checker/resolveResult.h +++ b/ets2panda/checker/resolveResult.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. +/** + * Copyright (c) 2021 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 05f77b0b62..d662c6e0a0 100644 --- a/ets2panda/checker/types/ets/byteType.cpp +++ b/ets2panda/checker/types/ets/byteType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 5ba92a4d76..88cfce4304 100644 --- a/ets2panda/checker/types/ets/byteType.h +++ b/ets2panda/checker/types/ets/byteType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 be7d27609f..d12017b54a 100644 --- a/ets2panda/checker/types/ets/charType.cpp +++ b/ets2panda/checker/types/ets/charType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 a1ea57fef9..12878a3aff 100644 --- a/ets2panda/checker/types/ets/charType.h +++ b/ets2panda/checker/types/ets/charType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 4f92ba9218..0b1bf0f592 100644 --- a/ets2panda/checker/types/ets/doubleType.cpp +++ b/ets2panda/checker/types/ets/doubleType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 80be747c39..2377f42443 100644 --- a/ets2panda/checker/types/ets/doubleType.h +++ b/ets2panda/checker/types/ets/doubleType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 0dd1a3f2b3..e6ea36913c 100644 --- a/ets2panda/checker/types/ets/etsArrayType.cpp +++ b/ets2panda/checker/types/ets/etsArrayType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 87017417a0..f1cb2f1bad 100644 --- a/ets2panda/checker/types/ets/etsArrayType.h +++ b/ets2panda/checker/types/ets/etsArrayType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 950477c3f1..d949edc178 100644 --- a/ets2panda/checker/types/ets/etsAsyncFuncReturnType.cpp +++ b/ets2panda/checker/types/ets/etsAsyncFuncReturnType.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/checker/types/ets/etsAsyncFuncReturnType.h b/ets2panda/checker/types/ets/etsAsyncFuncReturnType.h index fc3fb0df7f..c5ed7d523b 100644 --- a/ets2panda/checker/types/ets/etsAsyncFuncReturnType.h +++ b/ets2panda/checker/types/ets/etsAsyncFuncReturnType.h @@ -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/checker/types/ets/etsBooleanType.cpp b/ets2panda/checker/types/ets/etsBooleanType.cpp index aaf1dac4e6..a6d5dd49da 100644 --- a/ets2panda/checker/types/ets/etsBooleanType.cpp +++ b/ets2panda/checker/types/ets/etsBooleanType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 3734e40a66..c48b766bc2 100644 --- a/ets2panda/checker/types/ets/etsBooleanType.h +++ b/ets2panda/checker/types/ets/etsBooleanType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 9d437688b2..6386016557 100644 --- a/ets2panda/checker/types/ets/etsDynamicFunctionType.h +++ b/ets2panda/checker/types/ets/etsDynamicFunctionType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 cbe881350a..4c07a3bd08 100644 --- a/ets2panda/checker/types/ets/etsDynamicType.cpp +++ b/ets2panda/checker/types/ets/etsDynamicType.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/checker/types/ets/etsDynamicType.h b/ets2panda/checker/types/ets/etsDynamicType.h index 3e2475ca41..66169a10ef 100644 --- a/ets2panda/checker/types/ets/etsDynamicType.h +++ b/ets2panda/checker/types/ets/etsDynamicType.h @@ -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/checker/types/ets/etsEnumType.cpp b/ets2panda/checker/types/ets/etsEnumType.cpp index 2288d0044d..f102cd2177 100644 --- a/ets2panda/checker/types/ets/etsEnumType.cpp +++ b/ets2panda/checker/types/ets/etsEnumType.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/checker/types/ets/etsEnumType.h b/ets2panda/checker/types/ets/etsEnumType.h index fb9cc0debb..b926a304d9 100644 --- a/ets2panda/checker/types/ets/etsEnumType.h +++ b/ets2panda/checker/types/ets/etsEnumType.h @@ -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/checker/types/ets/etsExtensionFuncHelperType.cpp b/ets2panda/checker/types/ets/etsExtensionFuncHelperType.cpp index 6757b96f85..e24ee3e6de 100644 --- a/ets2panda/checker/types/ets/etsExtensionFuncHelperType.cpp +++ b/ets2panda/checker/types/ets/etsExtensionFuncHelperType.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/checker/types/ets/etsExtensionFuncHelperType.h b/ets2panda/checker/types/ets/etsExtensionFuncHelperType.h index 735a86e164..d57bf79440 100644 --- a/ets2panda/checker/types/ets/etsExtensionFuncHelperType.h +++ b/ets2panda/checker/types/ets/etsExtensionFuncHelperType.h @@ -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/checker/types/ets/etsFunctionType.cpp b/ets2panda/checker/types/ets/etsFunctionType.cpp index b67c53ca99..6e34f6ea25 100644 --- a/ets2panda/checker/types/ets/etsFunctionType.cpp +++ b/ets2panda/checker/types/ets/etsFunctionType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 012c71251b..815055f2e0 100644 --- a/ets2panda/checker/types/ets/etsFunctionType.h +++ b/ets2panda/checker/types/ets/etsFunctionType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 6678a6f271..9ce2ac0301 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 2f9f726d59..8a5d052c30 100644 --- a/ets2panda/checker/types/ets/etsObjectType.h +++ b/ets2panda/checker/types/ets/etsObjectType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 0528fd46ff..9f0a1aacae 100644 --- a/ets2panda/checker/types/ets/etsStringType.cpp +++ b/ets2panda/checker/types/ets/etsStringType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 acf4e3e4b9..5ee82f4377 100644 --- a/ets2panda/checker/types/ets/etsStringType.h +++ b/ets2panda/checker/types/ets/etsStringType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 43edd66d0c..3c4c2ced73 100644 --- a/ets2panda/checker/types/ets/etsTypeParameter.cpp +++ b/ets2panda/checker/types/ets/etsTypeParameter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 1ef6df6e0e..dcdeb5fae1 100644 --- a/ets2panda/checker/types/ets/etsTypeParameter.h +++ b/ets2panda/checker/types/ets/etsTypeParameter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 869bce16fe..b0addc81fd 100644 --- a/ets2panda/checker/types/ets/etsUnionType.cpp +++ b/ets2panda/checker/types/ets/etsUnionType.cpp @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. +/** + * Copyright (c) 2021 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 66cf14228c..2676059233 100644 --- a/ets2panda/checker/types/ets/etsUnionType.h +++ b/ets2panda/checker/types/ets/etsUnionType.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. +/** + * Copyright (c) 2021-2022 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 0e6c20f848..b25e85b491 100644 --- a/ets2panda/checker/types/ets/etsVoidType.cpp +++ b/ets2panda/checker/types/ets/etsVoidType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 877134f5e6..684a854105 100644 --- a/ets2panda/checker/types/ets/etsVoidType.h +++ b/ets2panda/checker/types/ets/etsVoidType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 56070a4330..7276907fc2 100644 --- a/ets2panda/checker/types/ets/floatType.cpp +++ b/ets2panda/checker/types/ets/floatType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 9f14f58f42..055fb37fd5 100644 --- a/ets2panda/checker/types/ets/floatType.h +++ b/ets2panda/checker/types/ets/floatType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 165e197f92..15f93bcbb3 100644 --- a/ets2panda/checker/types/ets/intType.cpp +++ b/ets2panda/checker/types/ets/intType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 a7d60cc921..fe0e02ee3b 100644 --- a/ets2panda/checker/types/ets/intType.h +++ b/ets2panda/checker/types/ets/intType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 6b0fdba23e..565a22bc15 100644 --- a/ets2panda/checker/types/ets/longType.cpp +++ b/ets2panda/checker/types/ets/longType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 9e6bc6b9ef..8a3546718d 100644 --- a/ets2panda/checker/types/ets/longType.h +++ b/ets2panda/checker/types/ets/longType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 1812690e6c..69f2d0014c 100644 --- a/ets2panda/checker/types/ets/shortType.cpp +++ b/ets2panda/checker/types/ets/shortType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 3197721bee..b5ab753ebc 100644 --- a/ets2panda/checker/types/ets/shortType.h +++ b/ets2panda/checker/types/ets/shortType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 81a800f23e..1b71b48b85 100644 --- a/ets2panda/checker/types/ets/wildcardType.cpp +++ b/ets2panda/checker/types/ets/wildcardType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 18ab762722..4c627d523e 100644 --- a/ets2panda/checker/types/ets/wildcardType.h +++ b/ets2panda/checker/types/ets/wildcardType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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/ts/objectType.h b/ets2panda/checker/types/ts/objectType.h index 5642998a73..6c196b8cc8 100644 --- a/ets2panda/checker/types/ts/objectType.h +++ b/ets2panda/checker/types/ts/objectType.h @@ -56,7 +56,7 @@ public: #define OBJECT_TYPE_IS_CHECKS(object_kind, type_name) \ bool Is##type_name() const \ { \ - return kind_ == (object_kind); \ + return kind_ == object_kind; \ } OBJECT_TYPE_MAPPING(OBJECT_TYPE_IS_CHECKS) #undef OBJECT_TYPE_IS_CHECKS diff --git a/ets2panda/compiler/base/catchTable.cpp b/ets2panda/compiler/base/catchTable.cpp index cc77325a78..598f8482c0 100644 --- a/ets2panda/compiler/base/catchTable.cpp +++ b/ets2panda/compiler/base/catchTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 ae1b68064f..7b1e86d2fc 100644 --- a/ets2panda/compiler/base/catchTable.h +++ b/ets2panda/compiler/base/catchTable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 9f9bcb290a..dbabdb9ba8 100644 --- a/ets2panda/compiler/base/condition.cpp +++ b/ets2panda/compiler/base/condition.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 11ed9e8670..165b37cf8d 100644 --- a/ets2panda/compiler/base/condition.h +++ b/ets2panda/compiler/base/condition.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 3d9f16cb25..358640c0fc 100644 --- a/ets2panda/compiler/base/destructuring.h +++ b/ets2panda/compiler/base/destructuring.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 01e8bb06fe..9eb761c488 100644 --- a/ets2panda/compiler/base/iterators.cpp +++ b/ets2panda/compiler/base/iterators.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 6d3192d61e..5607b9142a 100644 --- a/ets2panda/compiler/base/iterators.h +++ b/ets2panda/compiler/base/iterators.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 a7692148d2..660f3c8146 100644 --- a/ets2panda/compiler/base/literals.cpp +++ b/ets2panda/compiler/base/literals.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 45c1cd5143..debb3e00d7 100644 --- a/ets2panda/compiler/base/literals.h +++ b/ets2panda/compiler/base/literals.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 a3676f6470..0c80103e64 100644 --- a/ets2panda/compiler/base/lreference.cpp +++ b/ets2panda/compiler/base/lreference.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 fb06802d05..cae126baab 100644 --- a/ets2panda/compiler/base/lreference.h +++ b/ets2panda/compiler/base/lreference.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 91f1eb2fc0..d6fa1d171c 100644 --- a/ets2panda/compiler/core/ASTCompiler.h +++ b/ets2panda/compiler/core/ASTCompiler.h @@ -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/core/ASTVerifier.cpp b/ets2panda/compiler/core/ASTVerifier.cpp index fce72cee39..9f9b376f1b 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 d5cbb7f2d5..d9bdba1180 100644 --- a/ets2panda/compiler/core/ASTVerifier.h +++ b/ets2panda/compiler/core/ASTVerifier.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. +/** + * Copyright (c) 2021-2022 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 6ad0a7f3e9..4770e12ab3 100644 --- a/ets2panda/compiler/core/ETSCompiler.cpp +++ b/ets2panda/compiler/core/ETSCompiler.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/core/ETSCompiler.h b/ets2panda/compiler/core/ETSCompiler.h index df72ed1699..bbd98de6b3 100644 --- a/ets2panda/compiler/core/ETSCompiler.h +++ b/ets2panda/compiler/core/ETSCompiler.h @@ -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/core/ETSGen.cpp b/ets2panda/compiler/core/ETSGen.cpp index c2e7e93fef..49bef2b5e8 100644 --- a/ets2panda/compiler/core/ETSGen.cpp +++ b/ets2panda/compiler/core/ETSGen.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 0565afaeeb..77e6c004b0 100644 --- a/ets2panda/compiler/core/ETSGen.h +++ b/ets2panda/compiler/core/ETSGen.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 @@ -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 @@ -1003,14 +1003,14 @@ private: } #undef COMPILE_ARG -#define COMPILE_ARG(idx) \ - 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); \ - VReg arg##idx = AllocReg(); \ - arguments[idx]->Compile(this); \ +#define COMPILE_ARG(idx) \ + 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); \ + VReg arg##idx = AllocReg(); \ + arguments[idx]->Compile(this); \ ApplyConversionAndStoreAccumulator(arguments[idx], arg##idx, paramType##idx); template diff --git a/ets2panda/compiler/core/ETSemitter.cpp b/ets2panda/compiler/core/ETSemitter.cpp index 8f3170bad3..a8589bcf51 100644 --- a/ets2panda/compiler/core/ETSemitter.cpp +++ b/ets2panda/compiler/core/ETSemitter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 5adf0423e9..af3b1748bd 100644 --- a/ets2panda/compiler/core/ETSemitter.h +++ b/ets2panda/compiler/core/ETSemitter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 318eddb302..e25e0915d0 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 ecfc2514bc..1258168cb4 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 a65f34b43f..23fc28f983 100644 --- a/ets2panda/compiler/core/JSCompiler.cpp +++ b/ets2panda/compiler/core/JSCompiler.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/core/JSCompiler.h b/ets2panda/compiler/core/JSCompiler.h index 9d50641650..081389eca7 100644 --- a/ets2panda/compiler/core/JSCompiler.h +++ b/ets2panda/compiler/core/JSCompiler.h @@ -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/core/JSemitter.cpp b/ets2panda/compiler/core/JSemitter.cpp index 39ab410dbd..bb0367ba17 100644 --- a/ets2panda/compiler/core/JSemitter.cpp +++ b/ets2panda/compiler/core/JSemitter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 f220f2346c..2a38cb6b1f 100644 --- a/ets2panda/compiler/core/JSemitter.h +++ b/ets2panda/compiler/core/JSemitter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 85e0e3b8fe..a94baabfd6 100644 --- a/ets2panda/compiler/core/codeGen.cpp +++ b/ets2panda/compiler/core/codeGen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 e06a982cad..07a7c9164c 100644 --- a/ets2panda/compiler/core/codeGen.h +++ b/ets2panda/compiler/core/codeGen.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 923d1915b5..c2cc5c880f 100644 --- a/ets2panda/compiler/core/compileJob.cpp +++ b/ets2panda/compiler/core/compileJob.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 528f5871a0..9c6175ba3c 100644 --- a/ets2panda/compiler/core/compileJob.h +++ b/ets2panda/compiler/core/compileJob.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 ee8fc3b139..ea49298b98 100644 --- a/ets2panda/compiler/core/compileQueue.cpp +++ b/ets2panda/compiler/core/compileQueue.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 f347591806..95b16d89e2 100644 --- a/ets2panda/compiler/core/compileQueue.h +++ b/ets2panda/compiler/core/compileQueue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 ec8b0ccac5..3e712f56a7 100644 --- a/ets2panda/compiler/core/compilerContext.cpp +++ b/ets2panda/compiler/core/compilerContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 420a9fb18b..592ad18ab8 100644 --- a/ets2panda/compiler/core/compilerContext.h +++ b/ets2panda/compiler/core/compilerContext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 62442c5ba5..606f28c297 100644 --- a/ets2panda/compiler/core/envScope.cpp +++ b/ets2panda/compiler/core/envScope.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 df49b9d242..07f34944b7 100644 --- a/ets2panda/compiler/core/envScope.h +++ b/ets2panda/compiler/core/envScope.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 b3107df942..b34886783b 100644 --- a/ets2panda/compiler/core/pandagen.cpp +++ b/ets2panda/compiler/core/pandagen.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 fd2a5c8ae9..037e6fa449 100644 --- a/ets2panda/compiler/core/pandagen.h +++ b/ets2panda/compiler/core/pandagen.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 305ef3b5bd..07d847d8e0 100644 --- a/ets2panda/compiler/core/programElement.cpp +++ b/ets2panda/compiler/core/programElement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 c1f866cbb4..998754ccf8 100644 --- a/ets2panda/compiler/core/programElement.h +++ b/ets2panda/compiler/core/programElement.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 2377a8e5a3..07c2b353e2 100644 --- a/ets2panda/compiler/core/regAllocator.cpp +++ b/ets2panda/compiler/core/regAllocator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 b0f99907af..29ab23031c 100644 --- a/ets2panda/compiler/core/regAllocator.h +++ b/ets2panda/compiler/core/regAllocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 649d583654..6e535fa1cf 100644 --- a/ets2panda/compiler/core/regScope.cpp +++ b/ets2panda/compiler/core/regScope.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 bac7f92e8c..6fc8ce1137 100644 --- a/ets2panda/compiler/core/regScope.h +++ b/ets2panda/compiler/core/regScope.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 aced690245..468fd8b185 100644 --- a/ets2panda/compiler/core/regSpiller.cpp +++ b/ets2panda/compiler/core/regSpiller.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 ff8c62312f..aba5b3391a 100644 --- a/ets2panda/compiler/core/regSpiller.h +++ b/ets2panda/compiler/core/regSpiller.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 + * You may obtain a copy of the License GetReg * * 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 - * limitations under the License. + * limitGetRegions 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 12fc0c5abc..e40e3eb554 100644 --- a/ets2panda/compiler/core/targetTypeContext.cpp +++ b/ets2panda/compiler/core/targetTypeContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 e6760f22e7..f476a5b3e9 100644 --- a/ets2panda/compiler/core/targetTypeContext.h +++ b/ets2panda/compiler/core/targetTypeContext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 40f87a27c0..ccb80d7327 100644 --- a/ets2panda/compiler/core/vReg.cpp +++ b/ets2panda/compiler/core/vReg.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 0cc9c67ba1..cc56ed787b 100644 --- a/ets2panda/compiler/core/vReg.h +++ b/ets2panda/compiler/core/vReg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 16b79913d4..1ff0a7d9e7 100644 --- a/ets2panda/compiler/debugger/debuginfoDumper.cpp +++ b/ets2panda/compiler/debugger/debuginfoDumper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 3f5f0ade92..b0c581aaca 100644 --- a/ets2panda/compiler/debugger/debuginfoDumper.h +++ b/ets2panda/compiler/debugger/debuginfoDumper.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 2404ab976d..5ff219746a 100644 --- a/ets2panda/compiler/function/asyncFunctionBuilder.cpp +++ b/ets2panda/compiler/function/asyncFunctionBuilder.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 b0e9391714..5034debb73 100644 --- a/ets2panda/compiler/function/asyncFunctionBuilder.h +++ b/ets2panda/compiler/function/asyncFunctionBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 f80788782e..b1ff7f4d00 100644 --- a/ets2panda/compiler/function/functionBuilder.cpp +++ b/ets2panda/compiler/function/functionBuilder.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 bed4faa1a2..3ca533d411 100644 --- a/ets2panda/compiler/function/functionBuilder.h +++ b/ets2panda/compiler/function/functionBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 9cdd4baf65..95d9b8eb39 100644 --- a/ets2panda/compiler/function/generatorFunctionBuilder.cpp +++ b/ets2panda/compiler/function/generatorFunctionBuilder.cpp @@ -1,10 +1,10 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 8dd2f6f76c..d9d162b7c0 100644 --- a/ets2panda/compiler/function/generatorFunctionBuilder.h +++ b/ets2panda/compiler/function/generatorFunctionBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 a6c865ca83..6ecae534d1 100644 --- a/ets2panda/compiler/lowering/checkerPhase.cpp +++ b/ets2panda/compiler/lowering/checkerPhase.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/checkerPhase.h b/ets2panda/compiler/lowering/checkerPhase.h index 86e0db579b..c6c0760642 100644 --- a/ets2panda/compiler/lowering/checkerPhase.h +++ b/ets2panda/compiler/lowering/checkerPhase.h @@ -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/ets/generateDeclarations.cpp b/ets2panda/compiler/lowering/ets/generateDeclarations.cpp index 41393a607b..3ea98c3b9b 100644 --- a/ets2panda/compiler/lowering/ets/generateDeclarations.cpp +++ b/ets2panda/compiler/lowering/ets/generateDeclarations.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/ets/generateDeclarations.h b/ets2panda/compiler/lowering/ets/generateDeclarations.h index fb7fcea3fd..a59f1c6e04 100644 --- a/ets2panda/compiler/lowering/ets/generateDeclarations.h +++ b/ets2panda/compiler/lowering/ets/generateDeclarations.h @@ -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/ets/opAssignment.cpp b/ets2panda/compiler/lowering/ets/opAssignment.cpp index 03ecf30834..abdc6fc3a2 100644 --- a/ets2panda/compiler/lowering/ets/opAssignment.cpp +++ b/ets2panda/compiler/lowering/ets/opAssignment.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/ets/opAssignment.h b/ets2panda/compiler/lowering/ets/opAssignment.h index b3c8dbd789..30d20d0fd7 100644 --- a/ets2panda/compiler/lowering/ets/opAssignment.h +++ b/ets2panda/compiler/lowering/ets/opAssignment.h @@ -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/ets/unionLowering.cpp b/ets2panda/compiler/lowering/ets/unionLowering.cpp index 1f70fa278d..9aa3a1c893 100644 --- a/ets2panda/compiler/lowering/ets/unionLowering.cpp +++ b/ets2panda/compiler/lowering/ets/unionLowering.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/ets/unionLowering.h b/ets2panda/compiler/lowering/ets/unionLowering.h index c8a4b49a90..beddab61fe 100644 --- a/ets2panda/compiler/lowering/ets/unionLowering.h +++ b/ets2panda/compiler/lowering/ets/unionLowering.h @@ -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/phase.cpp b/ets2panda/compiler/lowering/phase.cpp index f3b2ff83a6..c95b0eb067 100644 --- a/ets2panda/compiler/lowering/phase.cpp +++ b/ets2panda/compiler/lowering/phase.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/phase.h b/ets2panda/compiler/lowering/phase.h index 490c2fac13..c1b59ed098 100644 --- a/ets2panda/compiler/lowering/phase.h +++ b/ets2panda/compiler/lowering/phase.h @@ -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/ir/as/namedType.cpp b/ets2panda/ir/as/namedType.cpp index 1957c7a148..8cd429a9bf 100644 --- a/ets2panda/ir/as/namedType.cpp +++ b/ets2panda/ir/as/namedType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 c8d58f3d33..595aa39c01 100644 --- a/ets2panda/ir/as/namedType.h +++ b/ets2panda/ir/as/namedType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 9d16342536..27d697f408 100644 --- a/ets2panda/ir/as/prefixAssertionExpression.cpp +++ b/ets2panda/ir/as/prefixAssertionExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 245bf27996..60377a5179 100644 --- a/ets2panda/ir/as/prefixAssertionExpression.h +++ b/ets2panda/ir/as/prefixAssertionExpression.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 83ed05029a..d8e7329a0a 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 192aecf303..fd04aed68c 100644 --- a/ets2panda/ir/base/classElement.cpp +++ b/ets2panda/ir/base/classElement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 ea99fb1566..796fde132f 100644 --- a/ets2panda/ir/base/classElement.h +++ b/ets2panda/ir/base/classElement.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 4f0b307bbb..012595ebe4 100644 --- a/ets2panda/ir/base/classStaticBlock.cpp +++ b/ets2panda/ir/base/classStaticBlock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 f0539a3323..08d9a97a2b 100644 --- a/ets2panda/ir/base/classStaticBlock.h +++ b/ets2panda/ir/base/classStaticBlock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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/templateElement.cpp b/ets2panda/ir/base/templateElement.cpp index 8a0e7d317e..e5650900a5 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", ""}, {"cooked", ""}}}, + {"value", {{"raw", /* raw_ */ ""}, {"cooked", /* cooked_ */ ""}}}, }); } diff --git a/ets2panda/ir/ets/etsClassLiteral.cpp b/ets2panda/ir/ets/etsClassLiteral.cpp index 79c11f531e..4b8673ebdb 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 64dadfd65b..af4a875648 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 57e2248c56..c4b962e10a 100644 --- a/ets2panda/ir/ets/etsFunctionType.cpp +++ b/ets2panda/ir/ets/etsFunctionType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 62c59ffd9f..ca4cfcf2c7 100644 --- a/ets2panda/ir/ets/etsFunctionType.h +++ b/ets2panda/ir/ets/etsFunctionType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 cd6be9e417..1a583ad4fb 100644 --- a/ets2panda/ir/ets/etsImportDeclaration.h +++ b/ets2panda/ir/ets/etsImportDeclaration.h @@ -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/ir/ets/etsImportSource.cpp b/ets2panda/ir/ets/etsImportSource.cpp index edf3658ce5..a73b779c3e 100644 --- a/ets2panda/ir/ets/etsImportSource.cpp +++ b/ets2panda/ir/ets/etsImportSource.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 f5d880a47f..44976cdb5f 100644 --- a/ets2panda/ir/ets/etsLaunchExpression.cpp +++ b/ets2panda/ir/ets/etsLaunchExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 bf3d63aafe..e837295c0e 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 553bb75120..68b5f7d134 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 0e55a8ac98..37f27e54b8 100644 --- a/ets2panda/ir/ets/etsNewClassInstanceExpression.cpp +++ b/ets2panda/ir/ets/etsNewClassInstanceExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 ffed6e65cd..e35c911063 100644 --- a/ets2panda/ir/ets/etsNewClassInstanceExpression.h +++ b/ets2panda/ir/ets/etsNewClassInstanceExpression.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 3671c96b28..d9b5d78eb1 100644 --- a/ets2panda/ir/ets/etsNewMultiDimArrayInstanceExpression.cpp +++ b/ets2panda/ir/ets/etsNewMultiDimArrayInstanceExpression.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 b31ed8e71b..9ed77697fb 100644 --- a/ets2panda/ir/ets/etsPackageDeclaration.cpp +++ b/ets2panda/ir/ets/etsPackageDeclaration.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 8ca20442d3..6a843313d2 100644 --- a/ets2panda/ir/ets/etsPackageDeclaration.h +++ b/ets2panda/ir/ets/etsPackageDeclaration.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 bb0172b423..a4eab69aba 100644 --- a/ets2panda/ir/ets/etsParameterExpression.cpp +++ b/ets2panda/ir/ets/etsParameterExpression.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/ir/ets/etsParameterExpression.h b/ets2panda/ir/ets/etsParameterExpression.h index 4ea4ed1e32..e068b4e3b7 100644 --- a/ets2panda/ir/ets/etsParameterExpression.h +++ b/ets2panda/ir/ets/etsParameterExpression.h @@ -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/ir/ets/etsPrimitiveType.cpp b/ets2panda/ir/ets/etsPrimitiveType.cpp index f8debf8980..c2934842b5 100644 --- a/ets2panda/ir/ets/etsPrimitiveType.cpp +++ b/ets2panda/ir/ets/etsPrimitiveType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 8086c24a37..94df4d0eb7 100644 --- a/ets2panda/ir/ets/etsPrimitiveType.h +++ b/ets2panda/ir/ets/etsPrimitiveType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 3931ae75cc..2797221382 100644 --- a/ets2panda/ir/ets/etsScript.cpp +++ b/ets2panda/ir/ets/etsScript.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 7900b5f473..6ab6a23465 100644 --- a/ets2panda/ir/ets/etsScript.h +++ b/ets2panda/ir/ets/etsScript.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 8bd7ed765a..0f62efc3ca 100644 --- a/ets2panda/ir/ets/etsStructDeclaration.cpp +++ b/ets2panda/ir/ets/etsStructDeclaration.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/ir/ets/etsStructDeclaration.h b/ets2panda/ir/ets/etsStructDeclaration.h index 90a448f581..9dc920dc91 100644 --- a/ets2panda/ir/ets/etsStructDeclaration.h +++ b/ets2panda/ir/ets/etsStructDeclaration.h @@ -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/ir/ets/etsTypeReference.cpp b/ets2panda/ir/ets/etsTypeReference.cpp index 07935632c0..274f7584a7 100644 --- a/ets2panda/ir/ets/etsTypeReference.cpp +++ b/ets2panda/ir/ets/etsTypeReference.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 d23a1a5cbe..adadc8fd96 100644 --- a/ets2panda/ir/ets/etsTypeReference.h +++ b/ets2panda/ir/ets/etsTypeReference.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 ca7207a6f0..2bdb6d282c 100644 --- a/ets2panda/ir/ets/etsTypeReferencePart.cpp +++ b/ets2panda/ir/ets/etsTypeReferencePart.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 6c48c560da..25b9611bba 100644 --- a/ets2panda/ir/ets/etsTypeReferencePart.h +++ b/ets2panda/ir/ets/etsTypeReferencePart.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 803a0598f7..e811f5a37d 100644 --- a/ets2panda/ir/ets/etsUnionType.cpp +++ b/ets2panda/ir/ets/etsUnionType.cpp @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. +/** + * Copyright (c) 2021-2022 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 a5a37940b7..c7f146794c 100644 --- a/ets2panda/ir/ets/etsUnionType.h +++ b/ets2panda/ir/ets/etsUnionType.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. +/** + * Copyright (c) 2021 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 1ca7675248..d389a94820 100644 --- a/ets2panda/ir/ets/etsWildcardType.cpp +++ b/ets2panda/ir/ets/etsWildcardType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 624057c01c..eb9c17a333 100644 --- a/ets2panda/ir/ets/etsWildcardType.h +++ b/ets2panda/ir/ets/etsWildcardType.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 eca1913339..c9ecd693f9 100644 --- a/ets2panda/ir/expressions/directEvalExpression.h +++ b/ets2panda/ir/expressions/directEvalExpression.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 7f270a9014..4f2344a4be 100644 --- a/ets2panda/ir/irnode.cpp +++ b/ets2panda/ir/irnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 caa23c6133..977e9efd70 100644 --- a/ets2panda/ir/opaqueTypeNode.cpp +++ b/ets2panda/ir/opaqueTypeNode.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/ir/opaqueTypeNode.h b/ets2panda/ir/opaqueTypeNode.h index bdd09667bb..676f5478d4 100644 --- a/ets2panda/ir/opaqueTypeNode.h +++ b/ets2panda/ir/opaqueTypeNode.h @@ -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/ir/opcodeMap.h b/ets2panda/ir/opcodeMap.h index e6deaf249a..a6073bcb99 100644 --- a/ets2panda/ir/opcodeMap.h +++ b/ets2panda/ir/opcodeMap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 dd5ddb3b3e..ded0f27717 100644 --- a/ets2panda/ir/statements/assertStatement.cpp +++ b/ets2panda/ir/statements/assertStatement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 e66acedc86..749c5c739b 100644 --- a/ets2panda/ir/statements/assertStatement.h +++ b/ets2panda/ir/statements/assertStatement.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 aed23b0caa..188161e89b 100644 --- a/ets2panda/lexer/ASLexer.cpp +++ b/ets2panda/lexer/ASLexer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 e3015c4147..6fe3ec048a 100644 --- a/ets2panda/lexer/ASLexer.h +++ b/ets2panda/lexer/ASLexer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 aa5b41719e..935daba802 100644 --- a/ets2panda/lexer/ETSLexer.cpp +++ b/ets2panda/lexer/ETSLexer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 1ad9801099..32a4c4147a 100644 --- a/ets2panda/lexer/ETSLexer.h +++ b/ets2panda/lexer/ETSLexer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 13fd19ea45..c2f3cc5cf0 100644 --- a/ets2panda/lexer/TSLexer.cpp +++ b/ets2panda/lexer/TSLexer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 64a4dee135..b4c1aa307d 100644 --- a/ets2panda/lexer/TSLexer.h +++ b/ets2panda/lexer/TSLexer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 3e5cd08755..c5ea702c23 100644 --- a/ets2panda/lexer/keywords.cpp +++ b/ets2panda/lexer/keywords.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 b1651473fa..a7d1d0f476 100644 --- a/ets2panda/lexer/keywordsBase.h +++ b/ets2panda/lexer/keywordsBase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021 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 afc22d4399..3cbb8bc542 100644 --- a/ets2panda/lexer/token/number.cpp +++ b/ets2panda/lexer/token/number.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 7afd5aec3d..840285f60c 100644 --- a/ets2panda/lexer/token/number.h +++ b/ets2panda/lexer/token/number.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 - 2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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/parser/ETSparser.cpp b/ets2panda/parser/ETSparser.cpp index 8b38c5e941..976499d7a5 100644 --- a/ets2panda/parser/ETSparser.cpp +++ b/ets2panda/parser/ETSparser.cpp @@ -3025,8 +3025,7 @@ 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(); @@ -3041,8 +3040,7 @@ 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."); diff --git a/ets2panda/public/es2panda_lib.cpp b/ets2panda/public/es2panda_lib.cpp index 6b6c6e5cf4..690e286a03 100644 --- a/ets2panda/public/es2panda_lib.cpp +++ b/ets2panda/public/es2panda_lib.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/public/es2panda_lib.h b/ets2panda/public/es2panda_lib.h index d20aee7772..0873d590d9 100644 --- a/ets2panda/public/es2panda_lib.h +++ b/ets2panda/public/es2panda_lib.h @@ -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/scripts/es2panda_coverage.sh b/ets2panda/scripts/es2panda_coverage.sh index 9af403a22b..387dc73a57 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 e759dddc02..aeb156848f 100644 --- a/ets2panda/scripts/test_runner.py +++ b/ets2panda/scripts/test-runner.py @@ -19,7 +19,6 @@ import subprocess import sys from pathlib import Path - def parse_options(): # panda root default panda_env = os.environ.get('PANDA_ROOT') -- Gitee