From 4fe879b2d04b051dbde5326303723303e16f0557 Mon Sep 17 00:00:00 2001 From: Evgeniy Nikeytsev Date: Thu, 2 Nov 2023 16:37:39 +0300 Subject: [PATCH] Replace TODO with NOTE Signed-off-by: Evgeniy Nikeytsev --- compiler/codegen_intrinsics_ecmascript.cpp | 2 +- compiler/optimizer/ecma_pipeline.cpp | 2 +- compiler/optimizer/ir/dyn_datatype.h | 2 +- compiler/optimizer/ir_builder/ecmascript_inst_builder.cpp | 2 +- runtime/base/json_stringifier.cpp | 2 +- runtime/builtins.cpp | 4 ++-- runtime/builtins/builtins_array.cpp | 4 ++-- runtime/builtins/builtins_runtime_testing.cpp | 2 +- runtime/builtins/builtins_typedarray.cpp | 2 +- runtime/compiler/ecmascript_runtime_interface.cpp | 2 +- runtime/ecma_profiling.cpp | 2 +- runtime/global_dictionary-inl.h | 2 +- runtime/interpreter/interpreter-inl.h | 4 ++-- runtime/intrinsics-inl.h | 4 ++-- runtime/js_iterator.cpp | 2 +- runtime/js_number_format.cpp | 6 +++--- runtime/js_typed_array.cpp | 2 +- runtime/object_factory.cpp | 4 ++-- tests/compiler/checks_elimination_ecma_test.cpp | 4 ++-- tests/runtime/common/object_factory_test.cpp | 2 +- tests/runtime/napi/jsnapi_tests.cpp | 2 +- tests/runtime/tooling/test_list.cpp | 2 +- 22 files changed, 30 insertions(+), 30 deletions(-) diff --git a/compiler/codegen_intrinsics_ecmascript.cpp b/compiler/codegen_intrinsics_ecmascript.cpp index 5d8a49970..b28e065de 100644 --- a/compiler/codegen_intrinsics_ecmascript.cpp +++ b/compiler/codegen_intrinsics_ecmascript.cpp @@ -21,7 +21,7 @@ namespace panda::compiler { -// TODO(vpukhov): reuse irtoc iframe reg +// NOTE(vpukhov): reuse irtoc iframe reg static void LoadIFramePtr(Codegen *cg, Reg dst) { cg->GetEncoder()->EncodeLdr(dst, false, diff --git a/compiler/optimizer/ecma_pipeline.cpp b/compiler/optimizer/ecma_pipeline.cpp index b12404668..fb539f85d 100644 --- a/compiler/optimizer/ecma_pipeline.cpp +++ b/compiler/optimizer/ecma_pipeline.cpp @@ -55,7 +55,7 @@ bool EcmaPipeline::RunOptimizations() { auto graph = GetGraph(); graph->RunPass(); - // TODO(schernykh): Find way to inline in AOT and OSR mode + // NOTE(schernykh): Find way to inline in AOT and OSR mode if (!graph->IsAotMode() && !graph->IsOsrMode()) { graph->RunPass(); } diff --git a/compiler/optimizer/ir/dyn_datatype.h b/compiler/optimizer/ir/dyn_datatype.h index 1ea78f479..245ac16f9 100644 --- a/compiler/optimizer/ir/dyn_datatype.h +++ b/compiler/optimizer/ir/dyn_datatype.h @@ -37,7 +37,7 @@ static inline panda::compiler::AnyBaseType NumericDataTypeToAnyType(panda::compi case panda::compiler::DataType::Type::FLOAT32: // There is no direct method of boxing these types. Cast to f64 is an // option, but for now we miss a mechanism to signal that the cast - // is needed. TODO(asoldatov): Implement when this becomes an issue. + // is needed. NOTE(asoldatov): Implement when this becomes an issue. return panda::compiler::AnyBaseType::UNDEFINED_TYPE; case panda::compiler::DataType::Type::FLOAT64: return panda::compiler::AnyBaseType::ECMASCRIPT_DOUBLE_TYPE; diff --git a/compiler/optimizer/ir_builder/ecmascript_inst_builder.cpp b/compiler/optimizer/ir_builder/ecmascript_inst_builder.cpp index 7ef89696e..414828ad3 100644 --- a/compiler/optimizer/ir_builder/ecmascript_inst_builder.cpp +++ b/compiler/optimizer/ir_builder/ecmascript_inst_builder.cpp @@ -164,7 +164,7 @@ void InstBuilder::BuildEcmaNewobjdynrange(const BytecodeInstruction *bc_inst) void InstBuilder::BuildEcmaGetunmappedargs(const BytecodeInstruction *bc_inst) { - // TODO(pishin) support for inlined graph + // NOTE(pishin) support for inlined graph if (caller_inst_ != nullptr) { failed_ = true; return; diff --git a/runtime/base/json_stringifier.cpp b/runtime/base/json_stringifier.cpp index 80216677d..46a33102e 100644 --- a/runtime/base/json_stringifier.cpp +++ b/runtime/base/json_stringifier.cpp @@ -354,7 +354,7 @@ JSTaggedValue JsonStringifier::SerializeJSONProperty(const JSHandle &env, const JSHa InitializeGcMarker(env); - // TODO(ivagin): Remove ArkTools? + // NOTE(ivagin): Remove ArkTools? if (vm_->GetJSOptions().IsEnableArkTools()) { JSHandle ark_tools(InitializeArkTools(env)); SetConstantObject(global_object, "ArkTools", ark_tools); @@ -764,7 +764,7 @@ void Builtins::GeneralUpdateError(ErrorParameter *error, EcmaEntrypoint construc error->native_jstype = type; } -// TODO(dkofanov): Split errors initialization, use `SetFunctionsGenRangeErrorProto` from `builtins_initializers_gen.h` +// NOTE(dkofanov): Split errors initialization, use `SetFunctionsGenRangeErrorProto` from `builtins_initializers_gen.h` // and etc. void Builtins::InitializeError(const JSHandle &env, const JSHandle &obj_func_dynclass, const JSType &error_tag) const diff --git a/runtime/builtins/builtins_array.cpp b/runtime/builtins/builtins_array.cpp index 52586866a..33339cb21 100644 --- a/runtime/builtins/builtins_array.cpp +++ b/runtime/builtins/builtins_array.cpp @@ -789,7 +789,7 @@ static JSTaggedValue FlattenIntoArray(JSThread *thread, const JSHandle THROW_TYPE_ERROR_AND_RETURN(thread, "out of range", JSTaggedValue::Exception()); } JSTaggedValue str = - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue // (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) JSTaggedValue::ToString(thread, JSHandle(thread, target_idx)).GetTaggedValue(); @@ -800,7 +800,7 @@ static JSTaggedValue FlattenIntoArray(JSThread *thread, const JSHandle } } // 4. Return targetIndex. - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) return target_idx; } diff --git a/runtime/builtins/builtins_runtime_testing.cpp b/runtime/builtins/builtins_runtime_testing.cpp index 037e60dd9..29e839918 100644 --- a/runtime/builtins/builtins_runtime_testing.cpp +++ b/runtime/builtins/builtins_runtime_testing.cpp @@ -106,7 +106,7 @@ JSTaggedValue runtime_testing::GetOptimizationStatus(EcmaRuntimeCallInfo *argv) } } - // TODO(dkofanov): implement --compiler-deopt-every-n-times + // NOTE(dkofanov): implement --compiler-deopt-every-n-times ASSERT((status & static_cast(OptimizationStatus::MAYBE_DEOPTED)) == 0); return JSTaggedValue(status); diff --git a/runtime/builtins/builtins_typedarray.cpp b/runtime/builtins/builtins_typedarray.cpp index 02a8a8741..aab1b377b 100644 --- a/runtime/builtins/builtins_typedarray.cpp +++ b/runtime/builtins/builtins_typedarray.cpp @@ -1117,7 +1117,7 @@ JSTaggedValue typed_array::proto::Set(EcmaRuntimeCallInfo *argv) // iv. Set targetByteIndex to targetByteIndex + 1. while (target_byte_index < limit) { JSTaggedValue tagged_data = - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue // (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) builtins::array_buffer::GetValueFromBuffer(thread, src_buffer, src_byte_index, DataViewType::UINT8, diff --git a/runtime/compiler/ecmascript_runtime_interface.cpp b/runtime/compiler/ecmascript_runtime_interface.cpp index e70190355..79af18fb7 100644 --- a/runtime/compiler/ecmascript_runtime_interface.cpp +++ b/runtime/compiler/ecmascript_runtime_interface.cpp @@ -507,7 +507,7 @@ bool EcmaRuntimeInterface::AddElementInfo(ArenaVector *p } ASSERT(handler.IsInt()); auto handler_info = static_cast(handler.GetInt()); - // TODO(pishin) support for double + // NOTE(pishin) support for double if (UNLIKELY(!HandlerBase::IsKeyInt(handler_info))) { return false; } diff --git a/runtime/ecma_profiling.cpp b/runtime/ecma_profiling.cpp index d406cdfc2..c1af3f51e 100644 --- a/runtime/ecma_profiling.cpp +++ b/runtime/ecma_profiling.cpp @@ -38,7 +38,7 @@ void CallProfile::Update(ECMAObject *js_func, EcmaCallProfilingTable *table) return; } } - // TODO(schernykh): Create way for clear call profiling table, and clear it in this place. + // NOTE(schernykh): Create way for clear call profiling table, and clear it in this place. // Atomic with release order reason: profile data may be updated while the compiler thread loads it reinterpret_cast *>(&callees_idx_[0])->store(MEGAMORPHIC, std::memory_order_release); } diff --git a/runtime/global_dictionary-inl.h b/runtime/global_dictionary-inl.h index 117ca5986..28ae7c3ec 100644 --- a/runtime/global_dictionary-inl.h +++ b/runtime/global_dictionary-inl.h @@ -83,7 +83,7 @@ void GlobalDictionary::ClearEntry(const JSThread *thread, int entry) #if ECMASCRIPT_ENABLE_IC auto box = GetBox(entry); // The PropertyBox can be referenced from compiled code for TryLdGlobalByName - // TODO(aefremov): use handle instead + // NOTE(aefremov): use handle instead thread->GetEcmaGlobalStorage()->NewGlobalHandle(JSTaggedValue(box).GetRawData()); box->Clear(thread); #endif diff --git a/runtime/interpreter/interpreter-inl.h b/runtime/interpreter/interpreter-inl.h index df44505c2..9c19dcd3b 100644 --- a/runtime/interpreter/interpreter-inl.h +++ b/runtime/interpreter/interpreter-inl.h @@ -128,11 +128,11 @@ JSTaggedValue EcmaInterpreter::ExecuteInEnv(EcmaRuntimeCallInfo *info, JSTaggedV { JSThread *thread = info->GetThread(); [[maybe_unused]] HandleStorageCheck handle_storage_check(thread); - if (UNLIKELY(thread->HasPendingException())) { // TODO(vpukhov): replace with assert + if (UNLIKELY(thread->HasPendingException())) { // NOTE(vpukhov): replace with assert return JSTaggedValue::Undefined(); } - if (UNLIKELY(!fn_object.IsCallable())) { // TODO(vpukhov): replace with assert + if (UNLIKELY(!fn_object.IsCallable())) { // NOTE(vpukhov): replace with assert JSHandle error = thread->GetEcmaVM()->GetFactory()->GetJSError(ErrorType::TYPE_ERROR, "is not callable"); thread->SetException(error.GetTaggedValue()); diff --git a/runtime/intrinsics-inl.h b/runtime/intrinsics-inl.h index 20927fe75..ebadd3ef4 100644 --- a/runtime/intrinsics-inl.h +++ b/runtime/intrinsics-inl.h @@ -851,7 +851,7 @@ INLINE_ECMA_INTRINSICS uint64_t CalliRangeDynInterp(JSThread *thread, uint16_t a auto fn_obj = args[0]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) auto *fn_args = &args[1]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) - // TODO(vpukhov): copy in-place + // NOTE(vpukhov): copy in-place auto info = NewRuntimeCallInfo(thread, fn_obj, JSTaggedValue::Undefined(), JSTaggedValue::Undefined(), args_num); for (size_t i = 0; i < args_num; ++i) { info->SetCallArg(i, fn_args[i]); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) @@ -869,7 +869,7 @@ INLINE_ECMA_INTRINSICS uint64_t CalliThisRangeDyn(JSThread *thread, uint16_t arg auto *fn_args = &args[2U]; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) args_num--; - // TODO(vpukhov): copy in-place + // NOTE(vpukhov): copy in-place auto info = NewRuntimeCallInfo(thread, fn_obj, this_obj, JSTaggedValue::Undefined(), args_num); for (size_t i = 0; i < args_num; ++i) { info->SetCallArg(i, fn_args[i]); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) diff --git a/runtime/js_iterator.cpp b/runtime/js_iterator.cpp index a83d8d4a5..1b0eadfef 100644 --- a/runtime/js_iterator.cpp +++ b/runtime/js_iterator.cpp @@ -76,7 +76,7 @@ JSHandle JSIterator::GetIterator(JSThread *thread, const JSHandle return iter; } -// TODO(frobert): Remove it, deprecated +// NOTE(frobert): Remove it, deprecated JSHandle JSIterator::IteratorNextOld(JSThread *thread, const JSHandle &iter) { // 1.If value was not passed, then Let result be Invoke(iterator, "next", «‍ »). diff --git a/runtime/js_number_format.cpp b/runtime/js_number_format.cpp index c7efb90e9..fcf656339 100644 --- a/runtime/js_number_format.cpp +++ b/runtime/js_number_format.cpp @@ -770,7 +770,7 @@ void GroupToParts(JSThread *thread, const icu::number::FormattedNumber &formatte RETURN_IF_ABRUPT_COMPLETION(thread); index++; { - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue // (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) type_string.Update(JSLocale::GetNumberFieldType(thread, x, field_id).GetTaggedValue()); @@ -798,7 +798,7 @@ void GroupToParts(JSThread *thread, const icu::number::FormattedNumber &formatte if (style_option == StyleOption::UNIT && static_cast(field_id) == UNUM_PERCENT_FIELD) { type_string.Update(global_const->GetUnitString()); } else { - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) type_string.Update(JSLocale::GetNumberFieldType(thread, x, field_id).GetTaggedValue()); } @@ -837,7 +837,7 @@ JSHandle JSNumberFormat::FormatNumericToParts(JSThread *thread, const J JSHandle arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)); JSHandle result = JSHandle::Cast(arr); - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) GroupToParts(thread, formatted_number, result, number_format, x); RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSArray, thread); diff --git a/runtime/js_typed_array.cpp b/runtime/js_typed_array.cpp index d9604c029..ffbcd1aa8 100644 --- a/runtime/js_typed_array.cpp +++ b/runtime/js_typed_array.cpp @@ -185,7 +185,7 @@ bool JSTypedArray::DefineOwnProperty(JSThread *thread, const JSHandle value = desc.GetValue(); - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue // (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) return (JSTypedArray::IntegerIndexedElementSet(thread, typedarray, numeric_index, value)); diff --git a/runtime/object_factory.cpp b/runtime/object_factory.cpp index 9e1d374e4..2cc0f5be9 100644 --- a/runtime/object_factory.cpp +++ b/runtime/object_factory.cpp @@ -1681,7 +1681,7 @@ JSHandle ObjectFactory::NewTaggedArray(uint32_t length, JSTaggedVal } JSHandle array(thread_, header); - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) array->InitializeWithSpecialValue(init_val, length); return array; @@ -1708,7 +1708,7 @@ JSHandle ObjectFactory::NewTaggedArrayImpl(uint32_t length, JSTagge size_t size = TaggedArray::ComputeSize(JSTaggedValue::TaggedTypeSize(), length); auto header = heap_helper_.AllocateYoungGenerationOrHugeObject(weak ? weak_array_class_ : array_class_, size); JSHandle array(thread_, header); - // TODO(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) + // NOTE(audovichenko): Remove this suppression when CSA gets recognize primitive TaggedValue (issue #I5QOJX) // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) array->InitializeWithSpecialValue(init_val, length); return array; diff --git a/tests/compiler/checks_elimination_ecma_test.cpp b/tests/compiler/checks_elimination_ecma_test.cpp index 9f66e92f3..63d8184d4 100644 --- a/tests/compiler/checks_elimination_ecma_test.cpp +++ b/tests/compiler/checks_elimination_ecma_test.cpp @@ -642,7 +642,7 @@ TEST_F(CheckEliminationEcmaTest, EliminateAnyTypeCheckWithUndefinedType) EXPECT_TRUE(GraphComparator().Compare(graph, graph_opt)); } -// TODO(kaskov) Not shue that we can eliminate duplicate LoadObject and HclassCheck +// NOTE(kaskov) Not shue that we can eliminate duplicate LoadObject and HclassCheck TEST_F(CheckEliminationEcmaTest, EliminateDuplicateHclassCheck) { auto graph = CreateGraphDynWithDefaultRuntime(); @@ -824,7 +824,7 @@ TEST_F(CheckEliminationEcmaTest, EliminateHclassCheckInlined) EXPECT_TRUE(GraphComparator().Compare(graph, graph_opt)); } -// TODO(kaskov) To deal with the correctness of the HclassCheck +// NOTE(kaskov) To deal with the correctness of the HclassCheck // Not shue that we can move LoadObject and HclassCheck from loop TEST_F(CheckEliminationEcmaTest, MoveHclassCheckFromLoop) { diff --git a/tests/runtime/common/object_factory_test.cpp b/tests/runtime/common/object_factory_test.cpp index 2ebbfb8a7..03bef037a 100644 --- a/tests/runtime/common/object_factory_test.cpp +++ b/tests/runtime/common/object_factory_test.cpp @@ -67,7 +67,7 @@ JSHandle GetGlobal(JSThread *thread) return thread->GetEcmaVM()->GetGlobalEnv(); } -TEST_F(ObjectFactoryTest, DISABLED_NewJSObjectByConstructor) // TODO(vpukhov) +TEST_F(ObjectFactoryTest, DISABLED_NewJSObjectByConstructor) // NOTE(vpukhov) { ObjectFactory *factory = thread_->GetEcmaVM()->GetFactory(); JSHandle obj_fun = GetGlobal(thread_)->GetObjectFunction(); diff --git a/tests/runtime/napi/jsnapi_tests.cpp b/tests/runtime/napi/jsnapi_tests.cpp index d93197f44..bf491f726 100644 --- a/tests/runtime/napi/jsnapi_tests.cpp +++ b/tests/runtime/napi/jsnapi_tests.cpp @@ -802,7 +802,7 @@ TEST_F(JSNApiTests, InheritPrototype_003) EXPECT_TRUE(func->IsStrictEquals(vm_, res1)); } -TEST_F(JSNApiTests, DISABLED_InheritPrototype_004) // TODO(vpukhov) +TEST_F(JSNApiTests, DISABLED_InheritPrototype_004) // NOTE(vpukhov) { LocalScope scope(vm_); JSHandle env = vm_->GetGlobalEnv(); diff --git a/tests/runtime/tooling/test_list.cpp b/tests/runtime/tooling/test_list.cpp index cfe12cd4b..1ee1a60b9 100644 --- a/tests/runtime/tooling/test_list.cpp +++ b/tests/runtime/tooling/test_list.cpp @@ -31,7 +31,7 @@ static void RegisterTests() TestUtil::RegisterTest(panda_file::SourceLang::ECMASCRIPT, "JsSetVariable", GetJsSetVariableTest()); TestUtil::RegisterTest(panda_file::SourceLang::ECMASCRIPT, "JsGetCurrentFrame", GetJsCurrentFrameTest()); TestUtil::RegisterTest(panda_file::SourceLang::ECMASCRIPT, "JsEnumerateFrames", JsEnumerateFramesTest()); - // TODO(maksenov): Enable tests with thread suspension for JS + // NOTE(maksenov): Enable tests with thread suspension for JS // TestUtil::RegisterTest(panda_file::SourceLang::ECMASCRIPT, "JsFramePopNotification", GetJsFramePopTest()); // TestUtil::RegisterTest(panda_file::SourceLang::ECMASCRIPT, "JsRestartFrame", GetJsRestartFrameTest()); TestUtil::RegisterTest(panda_file::SourceLang::ECMASCRIPT, "JsSetNotification", GetJsSetNotificationTest()); -- Gitee