diff --git a/compiler/codegen_intrinsics_ecmascript.cpp b/compiler/codegen_intrinsics_ecmascript.cpp index 5d8a499708bfc30b9ab63fc66615cb8b70e49bd0..b28e065de653664a8a37500316be5ff80ce30d97 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 b12404668eea2e0064567e917b1ac7c6c5927554..fb539f85dc65ba0b6c960494bb1e2d0baa277597 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 1ea78f479aa576b21f0045c6a7535d34197400b9..245ac16f9eb62e55079a0723eeb54d6233ab538b 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 7ef89696e429efbebc5f6b7f3ca636fcc8c6b286..414828ad3bee5ddcf61cc3b1c7716708cfc89b62 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 80216677d5dff821be80b11ecb6eef00df8761d8..46a33102efbfa3627ce081e026acd5e670f37802 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 52586866a31fb480404b7bdfc388baa19b2cc337..33339cb213279546bc7f5d397178bf200d1b6232 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 037e60dd9130ad7012bbb119373d81a311ff8db2..29e839918c3e8460dc047bbcd23f51c16497ed79 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 02a8a8741497aa9acb60fb215be6d3dfd3c435a7..aab1b377bdee19b314706a1abee1b08df9fcb700 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 e70190355edde6e61f0b321e4d72898fe116728d..79af18fb780b5ea466006576314c61846949055c 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 d406cdfc2f73618d046338269854d32e81dd0b58..c1af3f51e5d43d74f5b3ad029a30a336061bd33a 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 117ca598697031253e262da610e90c48a14869e2..28ae7c3ece51d096128d74c6446cf28a99fc43e7 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 df44505c2f0039f7b94adc978ccce8af79b58111..9c19dcd3bd5893f931e8cfd97b9e2cce2119a9b7 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 20927fe75b336a1397815af6731e94da93836d1e..ebadd3ef4739a8a164d472bfe66c4004911cb773 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 a83d8d4a5acb15590593b2e2f9c014a4b02109c8..1b0eadfef98366634d7933603ea0f9c270d2ffda 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 c7efb90e9c76ecbb8dd05741a024be1cee4fa29c..fcf65633976f4c139fd3b2a36522fdeb8e701e68 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 d9604c0291754672051a7f9df27f8a7228fa2a62..ffbcd1aa86f3b14adc12930d66605482075efd9e 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 9e1d374e46d9e1b83c690903305f8c3bbde43a2b..2cc0f5be94583ef8a67e61b432924224441db1f9 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 9f66e92f37d3ffb779708132adaea1b529054189..63d8184d49e002b5c6176870b4c31cb9c9c4ed4d 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 2ebbfb8a7731a47a5f6ab7003db321b236d15ec7..03bef037a7686b2074b73e6797e3e276be36b350 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 d93197f44107e29dc9225e580bcd3b1a7a5bd331..bf491f726dfac48c3e8bfddd0d3c4abb014aba90 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 cfe12cd4b636eee5f83bee6af57e8a0a5382c320..1ee1a60b9ea9b32f918275db27ed9a4347c1d04c 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());