From a41da7e771ccfea9041b14f67377d6ad89ad3512 Mon Sep 17 00:00:00 2001 From: "yingguofeng@huawei.com" Date: Wed, 22 Dec 2021 15:38:21 +0800 Subject: [PATCH] code_check bugfix Signed-off-by: yingguofeng@huawei.com Change-Id: If83ad3d7290a678abf20ac55cf1b9c2bf02f76fb --- ecmascript/ecma_module.cpp | 2 - ecmascript/ecma_module.h | 4 +- ecmascript/ic/invoke_cache.cpp | 4 +- ecmascript/ic/invoke_cache.h | 3 + ecmascript/ic/profile_type_info.cpp | 6 +- ecmascript/ic/profile_type_info.h | 1 + ecmascript/interpreter/interpreter-inl.h | 1 - ecmascript/interpreter/slow_runtime_stub.cpp | 4 +- ecmascript/js_method.h | 6 +- ecmascript/js_runtime_options.h | 14 ++-- ecmascript/linked_hash_table.cpp | 8 +-- ecmascript/mem/allocator.h | 6 +- ecmascript/mem/evacuation_allocator.h | 2 +- ecmascript/mem/heap.cpp | 74 ++++++++++++-------- ecmascript/mem/parallel_evacuation.cpp | 23 +++--- ecmascript/mem/region_factory.cpp | 14 ++-- ecmascript/mem/verification.h | 2 +- ecmascript/napi/include/jsnapi.h | 12 ++-- 18 files changed, 105 insertions(+), 81 deletions(-) diff --git a/ecmascript/ecma_module.cpp b/ecmascript/ecma_module.cpp index 3fa055c8cb..954f159363 100644 --- a/ecmascript/ecma_module.cpp +++ b/ecmascript/ecma_module.cpp @@ -22,7 +22,6 @@ #include "ecmascript/tagged_dictionary.h" namespace panda::ecmascript { - JSHandle EcmaModule::GetItem(const JSThread *thread, JSHandle itemName) { JSHandle moduleItems(thread, NameDictionary::Cast(GetNameDictionary().GetTaggedObject())); @@ -248,5 +247,4 @@ void ModuleManager::DebugPrint([[maybe_unused]] const JSThread *thread, [[maybe_ }); std::cout << "\n"; } - } // namespace panda::ecmascript diff --git a/ecmascript/ecma_module.h b/ecmascript/ecma_module.h index 287fd6ac61..85afabe2cf 100644 --- a/ecmascript/ecma_module.h +++ b/ecmascript/ecma_module.h @@ -92,8 +92,8 @@ private: NO_MOVE_SEMANTIC(ModuleManager); EcmaVM *vm_{nullptr}; - JSTaggedValue ecmaModules_{JSTaggedValue::Hole()}; - std::vector moduleNames_{DEAULT_DICTIONART_CAPACITY}; + JSTaggedValue ecmaModules_ {JSTaggedValue::Hole()}; + std::vector moduleNames_ {DEAULT_DICTIONART_CAPACITY}; friend class EcmaVM; }; diff --git a/ecmascript/ic/invoke_cache.cpp b/ecmascript/ic/invoke_cache.cpp index 022b77c394..e01c5c219c 100644 --- a/ecmascript/ic/invoke_cache.cpp +++ b/ecmascript/ic/invoke_cache.cpp @@ -36,7 +36,7 @@ bool InvokeCache::SetPolyConstuctCacheSlot(JSThread *thread, ProfileTypeInfo *pr uint8_t length, JSTaggedValue newTargetArray, JSTaggedValue initialHClassArray) { - ASSERT(length <= 4 && newTargetArray.IsTaggedArray() && initialHClassArray.IsTaggedArray()); + ASSERT(length <= POLY_DEFAULT_LEN && newTargetArray.IsTaggedArray() && initialHClassArray.IsTaggedArray()); JSHandle profileTypeInfoArr(thread, profileTypeInfo); JSHandle newTargetArr(thread, newTargetArray); @@ -143,7 +143,7 @@ bool InvokeCache::SetMonoInlineCallCacheSlot(JSThread *thread, ProfileTypeInfo * bool InvokeCache::SetPolyInlineCallCacheSlot(JSThread *thread, ProfileTypeInfo *profileTypeInfo, uint32_t slotId, uint8_t length, JSTaggedValue calleeArray) { - ASSERT(calleeArray.IsTaggedArray() && length >= 2 && length <= 4); + ASSERT(calleeArray.IsTaggedArray() && length >= MONO_DEFAULT_LEN && length <= POLY_DEFAULT_LEN); JSHandle calleeArr(thread, calleeArray); ASSERT(calleeArr->GetLength() == length); JSHandle profileTypeInfoArr(thread, profileTypeInfo); diff --git a/ecmascript/ic/invoke_cache.h b/ecmascript/ic/invoke_cache.h index 615c9d1a72..5479c168d8 100644 --- a/ecmascript/ic/invoke_cache.h +++ b/ecmascript/ic/invoke_cache.h @@ -22,6 +22,9 @@ namespace panda::ecmascript { class InvokeCache { public: + static constexpr size_t MONO_DEFAULT_LEN = 2; + static constexpr array_size_t POLY_DEFAULT_LEN = 4; + static bool SetMonoConstuctCacheSlot(JSThread *thread, ProfileTypeInfo *profileTypeInfo, uint32_t slotId, JSTaggedValue newTarget, JSTaggedValue initialHClass); diff --git a/ecmascript/ic/profile_type_info.cpp b/ecmascript/ic/profile_type_info.cpp index 9428fa8cb7..01798db73a 100644 --- a/ecmascript/ic/profile_type_info.cpp +++ b/ecmascript/ic/profile_type_info.cpp @@ -260,11 +260,11 @@ ProfileTypeAccessor::ICState ProfileTypeAccessor::GetICState() const } if (profileData.IsTaggedArray()) { TaggedArray *array = TaggedArray::Cast(profileData.GetHeapObject()); - return array->GetLength() == 2 ? ICState::MONO : ICState::POLY; // 2 : test case + return array->GetLength() == MONO_DEFAULT_LEN ? ICState::MONO : ICState::POLY; // 2 : test case } profileData = profileTypeInfo_->Get(slotId_ + 1); TaggedArray *array = TaggedArray::Cast(profileData.GetHeapObject()); - return array->GetLength() == 2 ? ICState::MONO : ICState::POLY; // 2 : test case + return array->GetLength() == MONO_DEFAULT_LEN ? ICState::MONO : ICState::POLY; // 2 : test case } case ICKind::NamedGlobalLoadIC: case ICKind::NamedGlobalStoreIC: @@ -274,7 +274,7 @@ ProfileTypeAccessor::ICState ProfileTypeAccessor::GetICState() const case ICKind::GlobalStoreIC: { ASSERT(profileData.IsTaggedArray()); TaggedArray *array = TaggedArray::Cast(profileData.GetHeapObject()); - return array->GetLength() == 2 ? ICState::MONO : ICState::POLY; // 2 : test case + return array->GetLength() == MONO_DEFAULT_LEN ? ICState::MONO : ICState::POLY; // 2 : test case } default: UNREACHABLE(); diff --git a/ecmascript/ic/profile_type_info.h b/ecmascript/ic/profile_type_info.h index f7fecfef55..34faae89d1 100644 --- a/ecmascript/ic/profile_type_info.h +++ b/ecmascript/ic/profile_type_info.h @@ -94,6 +94,7 @@ public: class ProfileTypeAccessor { public: static constexpr size_t CACHE_MAX_LEN = 8; + static constexpr size_t MONO_DEFAULT_LEN = 2; static constexpr size_t POLY_DEFAULT_LEN = 4; enum ICState { diff --git a/ecmascript/interpreter/interpreter-inl.h b/ecmascript/interpreter/interpreter-inl.h index ce8c3c911c..f898e537af 100644 --- a/ecmascript/interpreter/interpreter-inl.h +++ b/ecmascript/interpreter/interpreter-inl.h @@ -991,7 +991,6 @@ NO_UB_SANITIZE void EcmaInterpreter::RunInternal(JSThread *thread, ConstantPool InterpreterFrameCopyArgs(newSp, numVregs, copyArgs, numDeclaredArgs, haveExtra); } - FrameState *state = GET_FRAME(newSp); state->base.prev = sp; state->base.frameType = static_cast(FrameType::INTERPRETER_FRAME); diff --git a/ecmascript/interpreter/slow_runtime_stub.cpp b/ecmascript/interpreter/slow_runtime_stub.cpp index af080d028f..a20171f6c7 100644 --- a/ecmascript/interpreter/slow_runtime_stub.cpp +++ b/ecmascript/interpreter/slow_runtime_stub.cpp @@ -1670,8 +1670,8 @@ JSTaggedValue SlowRuntimeStub::DefineClass(JSThread *thread, JSFunction *func, T } else { JSHandle::Cast(cls)->SetFunctionKind(thread, FunctionKind::DERIVED_CONSTRUCTOR); parentPrototype.Update(JSTaggedValue::GetProperty(thread, parent, globalConst->GetHandledPrototypeString()) - .GetValue() - .GetTaggedValue()); + .GetValue() + .GetTaggedValue()); if (!parentPrototype->IsECMAObject() && !parentPrototype->IsNull()) { return ThrowTypeError(thread, "parent class have no valid prototype"); } diff --git a/ecmascript/js_method.h b/ecmascript/js_method.h index d81092e8dd..12edb03589 100755 --- a/ecmascript/js_method.h +++ b/ecmascript/js_method.h @@ -24,13 +24,13 @@ namespace panda { class Class; } -namespace panda::ecmascript { static constexpr uint32_t NORMAL_CALL_TYPE = 0; // 0: normal (without this, newTarget, extra, func) static constexpr uint32_t HAVE_THIS_BIT = 1; // 1: the last bit means this static constexpr uint32_t HAVE_NEWTARGET_BIT = 2; // 2: the 2nd to last bit means newTarget static constexpr uint32_t HAVE_EXTRA_BIT = 4; // 4: the 3rd to last bit means extra static constexpr uint32_t HAVE_FUNC_BIT = 8; // 8: the 4th to last bit means func (for old version, UINT32_MAX) +namespace panda::ecmascript { class JSMethod : public Method { public: static constexpr uint8_t MAX_SLOT_SIZE = 0xFF; @@ -101,8 +101,8 @@ public: private: const uint8_t *bytecodeArray_ {nullptr}; uint32_t bytecodeArraySize_ {0}; - uint8_t slotSize_{0}; - uint32_t callType_{UINT32_MAX}; // UINT32_MAX means not found + uint8_t slotSize_ {0}; + uint32_t callType_ {UINT32_MAX}; // UINT32_MAX means not found }; } // namespace panda::ecmascript diff --git a/ecmascript/js_runtime_options.h b/ecmascript/js_runtime_options.h index 36243078bf..1cb53d7e03 100644 --- a/ecmascript/js_runtime_options.h +++ b/ecmascript/js_runtime_options.h @@ -123,18 +123,18 @@ public: } private: - PandArg enable_ark_tools_{"enable-ark-tools", false, R"(Enable ark tools to debug. Default: false)"}; - PandArg enable_cpuprofiler_{"enable-cpuprofiler", false, + PandArg enable_ark_tools_ {"enable-ark-tools", false, R"(Enable ark tools to debug. Default: false)"}; + PandArg enable_cpuprofiler_ {"enable-cpuprofiler", false, R"(Enable cpuprofiler to sample call stack and output to json file. Default: false)"}; - PandArg enable_stub_aot_{"enable-stub-aot", false, R"(enable aot of fast stub. Default: false)"}; - PandArg stub_module_file_{"stub-module-file", + PandArg enable_stub_aot_ {"enable-stub-aot", false, R"(enable aot of fast stub. Default: false)"}; + PandArg stub_module_file_ {"stub-module-file", R"(stub.m)", R"(Path to stub module file. Default: "stub.m")"}; - PandArg enable_force_gc_{"enable-force-gc", true, R"(enable force gc when allocating object)"}; - PandArg force_compress_gc_{"force-compress-gc", + PandArg enable_force_gc_ {"enable-force-gc", true, R"(enable force gc when allocating object)"}; + PandArg force_compress_gc_ {"force-compress-gc", true, R"(if true trigger compress gc, else trigger semi and old gc)"}; - PandArg enable_concurrent_sweep_{"enable_concurrent_sweep", + PandArg enable_concurrent_sweep_ {"enable_concurrent_sweep", true, R"(If true enable concurrent sweep, else disable concurrent sweep. Default: true)"}; }; diff --git a/ecmascript/linked_hash_table.cpp b/ecmascript/linked_hash_table.cpp index fda60f2b5e..8a94a07ba9 100644 --- a/ecmascript/linked_hash_table.cpp +++ b/ecmascript/linked_hash_table.cpp @@ -173,7 +173,7 @@ JSHandle LinkedHashMap::Create(const JSThread *thread, int number } JSHandle LinkedHashMap::Delete(const JSThread *thread, const JSHandle &obj, - const JSHandle &key) + const JSHandle &key) { return LinkedHashTable::Remove(thread, obj, key); } @@ -217,7 +217,7 @@ void LinkedHashMap::Clear(const JSThread *thread) } JSHandle LinkedHashMap::Shrink(const JSThread *thread, const JSHandle &table, - int additionalCapacity) + int additionalCapacity) { return LinkedHashTable::Shrink(thread, table, additionalCapacity); } @@ -229,13 +229,13 @@ JSHandle LinkedHashSet::Create(const JSThread *thread, int number } JSHandle LinkedHashSet::Delete(const JSThread *thread, const JSHandle &obj, - const JSHandle &key) + const JSHandle &key) { return LinkedHashTable::Remove(thread, obj, key); } JSHandle LinkedHashSet::Add(const JSThread *thread, const JSHandle &obj, - const JSHandle &key) + const JSHandle &key) { return LinkedHashTable::Insert(thread, obj, key, key); } diff --git a/ecmascript/mem/allocator.h b/ecmascript/mem/allocator.h index e5b48e308d..6abbb3aafe 100644 --- a/ecmascript/mem/allocator.h +++ b/ecmascript/mem/allocator.h @@ -73,9 +73,9 @@ public: } private: - uintptr_t begin_{0}; - uintptr_t top_{0}; - uintptr_t end_{0}; + uintptr_t begin_ {0}; + uintptr_t top_ {0}; + uintptr_t end_ {0}; }; class FreeListAllocator : public Allocator { diff --git a/ecmascript/mem/evacuation_allocator.h b/ecmascript/mem/evacuation_allocator.h index e26b53532a..4e41d190b2 100644 --- a/ecmascript/mem/evacuation_allocator.h +++ b/ecmascript/mem/evacuation_allocator.h @@ -27,7 +27,7 @@ namespace panda::ecmascript { class Heap; class EvacuationAllocator { public: - EvacuationAllocator(Heap *heap) : heap_(heap), isFreeTaskFinish_(true), oldSpaceAllocator_(){}; + EvacuationAllocator(Heap *heap) : heap_(heap), isFreeTaskFinish_(true), oldSpaceAllocator_() {}; ~EvacuationAllocator() = default; NO_COPY_SEMANTIC(EvacuationAllocator); NO_MOVE_SEMANTIC(EvacuationAllocator); diff --git a/ecmascript/mem/heap.cpp b/ecmascript/mem/heap.cpp index 36bfb91de6..4b0fd9143b 100644 --- a/ecmascript/mem/heap.cpp +++ b/ecmascript/mem/heap.cpp @@ -34,6 +34,8 @@ #include "ecmascript/mem/semi_space_collector.h" #include "ecmascript/mem/verification.h" +static constexpr int MAX_PARALLEL_THREAD_NUM = 3; + namespace panda::ecmascript { Heap::Heap(EcmaVM *ecmaVm) : ecmaVm_(ecmaVm), regionFactory_(ecmaVm->GetRegionFactory()) {} @@ -101,31 +103,46 @@ void Heap::FlipCompressSpace() void Heap::Destroy() { Prepare(); - toSpace_->Destroy(); - delete toSpace_; - toSpace_ = nullptr; - fromSpace_->Destroy(); - delete fromSpace_; - fromSpace_ = nullptr; - - oldSpace_->Destroy(); - delete oldSpace_; - oldSpace_ = nullptr; - compressSpace_->Destroy(); - delete compressSpace_; - compressSpace_ = nullptr; - nonMovableSpace_->Destroy(); - delete nonMovableSpace_; - nonMovableSpace_ = nullptr; - snapshotSpace_->Destroy(); - delete snapshotSpace_; - snapshotSpace_ = nullptr; - machineCodeSpace_->Destroy(); - delete machineCodeSpace_; - machineCodeSpace_ = nullptr; - hugeObjectSpace_->Destroy(); - delete hugeObjectSpace_; - hugeObjectSpace_ = nullptr; + if (toSpace_ != nullptr) { + toSpace_->Destroy(); + delete toSpace_; + toSpace_ = nullptr; + } + if (fromSpace_ != nullptr) { + fromSpace_->Destroy(); + delete fromSpace_; + fromSpace_ = nullptr; + } + if (oldSpace_ != nullptr) { + oldSpace_->Destroy(); + delete oldSpace_; + oldSpace_ = nullptr; + } + if (compressSpace_ != nullptr) { + compressSpace_->Destroy(); + delete compressSpace_; + compressSpace_ = nullptr; + } + if (nonMovableSpace_ != nullptr) { + nonMovableSpace_->Destroy(); + delete nonMovableSpace_; + nonMovableSpace_ = nullptr; + } + if (snapshotSpace_ != nullptr) { + snapshotSpace_->Destroy(); + delete snapshotSpace_; + snapshotSpace_ = nullptr; + } + if (machineCodeSpace_ != nullptr) { + machineCodeSpace_->Destroy(); + delete machineCodeSpace_; + machineCodeSpace_ = nullptr; + } + if (hugeObjectSpace_ != nullptr) { + hugeObjectSpace_->Destroy(); + delete hugeObjectSpace_; + hugeObjectSpace_ = nullptr; + } delete workList_; workList_ = nullptr; @@ -179,7 +196,7 @@ void Heap::CollectGarbage(TriggerGCType gcType) } #endif -# if ECMASCRIPT_SWITCH_GC_MODE_TO_COMPRESS_GC +#if ECMASCRIPT_SWITCH_GC_MODE_TO_COMPRESS_GC gcType = TriggerGCType::COMPRESS_FULL_GC; #endif switch (gcType) { @@ -221,7 +238,7 @@ void Heap::CollectGarbage(TriggerGCType gcType) break; } -# if ECMASCRIPT_ENABLE_GC_LOG +#if ECMASCRIPT_ENABLE_GC_LOG ecmaVm_->GetEcmaGCStats()->PrintStatisticResult(); #endif @@ -413,7 +430,8 @@ void Heap::IncreaseTaskCount() bool Heap::CheckCanDistributeTask() { os::memory::LockHolder holder(waitTaskFinishedMutex_); - return (runningTastCount_ < Platform::GetCurrentPlatform()->GetTotalThreadNum() - 1) && (runningTastCount_ <= 3); + return (runningTastCount_ < Platform::GetCurrentPlatform()->GetTotalThreadNum() - 1) && + (runningTastCount_ <= MAX_PARALLEL_THREAD_NUM); } void Heap::ReduceTaskCount() diff --git a/ecmascript/mem/parallel_evacuation.cpp b/ecmascript/mem/parallel_evacuation.cpp index 41776e6ace..6d2bb4b7c2 100644 --- a/ecmascript/mem/parallel_evacuation.cpp +++ b/ecmascript/mem/parallel_evacuation.cpp @@ -140,17 +140,18 @@ void ParallelEvacuation::VerifyHeapObject(TaggedObject *object) for (ObjectSlot slot = start; slot < end; slot++) { JSTaggedValue value(slot.GetTaggedType()); if (value.IsHeapObject()) { - if (!value.IsWeak()) { - Region *object_region = Region::ObjectAddressToRange(value.GetTaggedObject()); - if (heap_->IsOnlyMarkSemi() && !object_region->InYoungGeneration()) { - continue; - } - auto reset = object_region->GetMarkBitmap(); - if (!reset->Test(value.GetTaggedObject())) { - LOG(FATAL, RUNTIME) << "Miss mark value: " << value.GetTaggedObject() - << ", body address:" << slot.SlotAddress() - << ", header address:" << object; - } + if (value.IsWeak()) { + continue; + } + Region *object_region = Region::ObjectAddressToRange(value.GetTaggedObject()); + if (heap_->IsOnlyMarkSemi() && !object_region->InYoungGeneration()) { + continue; + } + auto reset = object_region->GetMarkBitmap(); + if (!reset->Test(value.GetTaggedObject())) { + LOG(FATAL, RUNTIME) << "Miss mark value: " << value.GetTaggedObject() + << ", body address:" << slot.SlotAddress() + << ", header address:" << object; } } } diff --git a/ecmascript/mem/region_factory.cpp b/ecmascript/mem/region_factory.cpp index 8d92d1c725..f3e9da58d2 100644 --- a/ecmascript/mem/region_factory.cpp +++ b/ecmascript/mem/region_factory.cpp @@ -25,6 +25,10 @@ #include "libpandabase/mem/pool_manager.h" #include "os/mem.h" +#if ECMASCRIPT_ENABLE_ZAP_MEM +static constexpr int INVALID_VALUE = 0x7; +#endif + namespace panda::ecmascript { Region *RegionFactory::AllocateAlignedRegion(Space *space, size_t capacity) { @@ -62,7 +66,7 @@ void RegionFactory::FreeRegion(Region *region) auto size = region->GetCapacity(); DecreaseAnnoMemoryUsage(size); #if ECMASCRIPT_ENABLE_ZAP_MEM - memset_s(ToVoidPtr(region->GetAllocateBase()), size, 7, size); + memset_s(ToVoidPtr(region->GetAllocateBase()), size, INVALID_VALUE, size); #endif PoolManager::GetMmapMemPool()->FreePool(ToVoidPtr(region->GetAllocateBase()), size); } @@ -107,7 +111,7 @@ void RegionFactory::FreeArea(Area *area) auto size = area->GetSize() + sizeof(Area); DecreaseNativeMemoryUsage(size); #if ECMASCRIPT_ENABLE_ZAP_MEM - memset_s(area, size, 7, size); + memset_s(area, size, INVALID_VALUE, size); #endif // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) free(reinterpret_cast(area)); @@ -120,7 +124,7 @@ void RegionFactory::Free(void *mem, size_t size) } DecreaseNativeMemoryUsage(size); #if ECMASCRIPT_ENABLE_ZAP_MEM - memset_s(mem, size, 7, size); + memset_s(mem, size, INVALID_VALUE, size); #endif // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) free(mem); @@ -139,7 +143,7 @@ void *RegionFactory::AllocateBuffer(size_t size) UNREACHABLE(); } #if ECMASCRIPT_ENABLE_ZAP_MEM - memset_s(ptr, size, 0, size); + memset_s(ptr, size, INVALID_VALUE, size); #endif IncreaseNativeMemoryUsage(size); return ptr; @@ -152,7 +156,7 @@ void RegionFactory::FreeBuffer(void *mem) } DecreaseNativeMemoryUsage(malloc_usable_size(mem)); #if ECMASCRIPT_ENABLE_ZAP_MEM - memset_s(mem, size, 7, size); + memset_s(mem, size, INVALID_VALUE, size); #endif // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) free(mem); diff --git a/ecmascript/mem/verification.h b/ecmascript/mem/verification.h index 5028f18484..9920be2c39 100644 --- a/ecmascript/mem/verification.h +++ b/ecmascript/mem/verification.h @@ -71,7 +71,7 @@ private: NO_COPY_SEMANTIC(Verification); NO_MOVE_SEMANTIC(Verification); - const Heap *heap_{nullptr}; + const Heap *heap_ {nullptr}; HeapRootManager rootManager_; }; } // namespace panda::ecmascript diff --git a/ecmascript/napi/include/jsnapi.h b/ecmascript/napi/include/jsnapi.h index 6c0acdb3d9..a65a826dd3 100644 --- a/ecmascript/napi/include/jsnapi.h +++ b/ecmascript/napi/include/jsnapi.h @@ -198,7 +198,7 @@ private: }; inline void Update(const Global &that); uintptr_t address_ = 0U; - const EcmaVM *vm_{nullptr}; + const EcmaVM *vm_ {nullptr}; }; // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions, hicpp-special-member-functions) @@ -213,7 +213,7 @@ protected: private: void *prevNext_ = nullptr; void *prevEnd_ = nullptr; - int prevHandleStorageIndex_{-1}; + int prevHandleStorageIndex_ {-1}; void *thread_ = nullptr; }; @@ -816,10 +816,10 @@ private: GC_TYPE gcType_ = GC_TYPE::EPSILON; LOG_LEVEL logLevel_ = LOG_LEVEL::DEBUG; uint32_t gcPoolSize_ = DEFAULT_GC_POOL_SIZE; - LOG_PRINT logBufPrint_{nullptr}; - std::string debuggerLibraryPath_{}; - bool enableArkTools_{false}; - bool enableCpuprofiler_{false}; + LOG_PRINT logBufPrint_ {nullptr}; + std::string debuggerLibraryPath_ {}; + bool enableArkTools_ {false}; + bool enableCpuprofiler_ {false}; friend JSNApi; }; -- Gitee