diff --git a/runtime/dump.cpp b/runtime/dump.cpp index 6c79386fa51dbe4289702578331cfef59cca64be..5fe42692ffa2c7f3efa233b773c29fd2ca2096d8 100644 --- a/runtime/dump.cpp +++ b/runtime/dump.cpp @@ -258,8 +258,6 @@ PandaString JSHClass::DumpJSType(JSType type) return "LexicalFunction"; case JSType::FUNCTION_EXTRA_INFO: return "FunctionExtraInfo"; - case JSType::MACHINE_CODE_OBJECT: - return "MachineCode"; case JSType::ECMA_MODULE: return "EcmaModule"; case JSType::CLASS_INFO_EXTRACTOR: @@ -611,9 +609,6 @@ static void DumpObject(JSThread *thread, TaggedObject *obj, std::ostream &os) case JSType::FUNCTION_EXTRA_INFO: JSFunctionExtraInfo::Cast(obj)->Dump(thread, os); break; - case JSType::MACHINE_CODE_OBJECT: - MachineCode::Cast(obj)->Dump(thread, os); - break; case JSType::ECMA_MODULE: EcmaModule::Cast(obj)->Dump(thread, os); break; @@ -1951,13 +1946,6 @@ void JSFunctionExtraInfo::Dump([[maybe_unused]] JSThread *thread, std::ostream & os << "\n"; } -void MachineCode::Dump([[maybe_unused]] JSThread *thread, std::ostream &os) const -{ - os << " - InstructionSizeInBytes: "; - GetInstructionSizeInBytes().D(); - os << "\n"; -} - void EcmaModule::Dump([[maybe_unused]] JSThread *thread, std::ostream &os) const { os << " - NameDictionary: "; @@ -2245,9 +2233,6 @@ static void DumpObject(JSThread *thread, TaggedObject *obj, std::vectorDumpForSnapshot(thread, vec); return; - case JSType::MACHINE_CODE_OBJECT: - MachineCode::Cast(obj)->DumpForSnapshot(thread, vec); - return; case JSType::TRANSITION_HANDLER: TransitionHandler::Cast(obj)->DumpForSnapshot(thread, vec); return; @@ -3099,12 +3084,6 @@ void JSFunctionExtraInfo::DumpForSnapshot([[maybe_unused]] JSThread *thread, vec.emplace_back(std::make_pair(PandaString("Data"), GetData())); } -void MachineCode::DumpForSnapshot([[maybe_unused]] JSThread *thread, - std::vector> &vec) const -{ - vec.emplace_back(std::make_pair(PandaString("InstructionSizeInBytes"), GetInstructionSizeInBytes())); -} - void EcmaModule::DumpForSnapshot([[maybe_unused]] JSThread *thread, std::vector> &vec) const { diff --git a/runtime/global_env_constants.cpp b/runtime/global_env_constants.cpp index 496267feccefca3c50c941b7e4ceacf1b31e1651..8ecb034f4a6702b296a788186a1ef3e2645e5f7d 100644 --- a/runtime/global_env_constants.cpp +++ b/runtime/global_env_constants.cpp @@ -169,8 +169,6 @@ void GlobalEnvConstants::InitRootsClass([[maybe_unused]] JSThread *thread, JSHCl SetConstant(ConstantIndex::JS_REALM_CLASS_INDEX, factory->NewEcmaDynClass(dynClassClass, JSRealm::SIZE, JSType::JS_REALM).GetTaggedValue()); - SetConstant(ConstantIndex::MACHINE_CODE_CLASS_INDEX, - factory->NewEcmaDynClass(dynClassClass, 0, JSType::MACHINE_CODE_OBJECT).GetTaggedValue()); JSHClass *classInfoExtractorClass = *factory->NewEcmaDynClass(dynClassClass, ClassInfoExtractor::SIZE, JSType::CLASS_INFO_EXTRACTOR); diff --git a/runtime/global_env_constants.h b/runtime/global_env_constants.h index f8eb51e536a95c3f9710ceafcb619f70787c7495..d0d7e705c8aa9649d4c50ec6f6adacea81c2837e 100644 --- a/runtime/global_env_constants.h +++ b/runtime/global_env_constants.h @@ -73,7 +73,6 @@ class JSThread; V(JSTaggedValue, LinkedHashMapClass, LINKED_HASH_MAP_CLASS_INDEX, ecma_roots_class) \ V(JSTaggedValue, WeakLinkedHashMapClass, WEAK_LINKED_HASH_MAP_CLASS_INDEX, ecma_roots_class) \ V(JSTaggedValue, JSRegExpClass, JS_REGEXP_CLASS_INDEX, ecma_roots_class) \ - V(JSTaggedValue, MachineCodeClass, MACHINE_CODE_CLASS_INDEX, ecma_roots_class) \ V(JSTaggedValue, ClassInfoExtractorHClass, CLASS_INFO_EXTRACTOR_HCLASS_INDEX, ecma_roots_class) \ V(JSTaggedValue, FinalizationRegistryClass, FINALIZATION_REGISTRY_CLASS_INDEX, ecma_root_class) diff --git a/runtime/js_hclass-inl.h b/runtime/js_hclass-inl.h index c7b011b0dc0f6836e258af5450e696af304dde8b..e72c0482020bc8919b92ee9f91ca2275cfbddb59 100644 --- a/runtime/js_hclass-inl.h +++ b/runtime/js_hclass-inl.h @@ -148,35 +148,6 @@ inline bool JSHClass::HasReferenceField() auto type = GetObjectType(); return type != JSType::STRING && type != JSType::JS_NATIVE_POINTER; } - -inline size_t JSHClass::SizeFromJSHClass(TaggedObject *header) -{ - auto type = GetObjectType(); - size_t size = 0; - switch (type) { - case JSType::TAGGED_ARRAY: - case JSType::TAGGED_DICTIONARY: - case JSType::LINKED_HASH_SET: - case JSType::LINKED_HASH_MAP: - size = TaggedArray::ComputeSize(JSTaggedValue::TaggedTypeSize(), - reinterpret_cast(header)->GetLength()); - break; - case JSType::STRING: - size = reinterpret_cast(header)->ObjectSize(); - size = AlignUp(size, static_cast(MemAlignment::MEM_ALIGN_OBJECT)); - break; - case JSType::MACHINE_CODE_OBJECT: - size = reinterpret_cast(header)->GetMachineCodeObjectSize(); - size = AlignUp(size, static_cast(MemAlignment::MEM_ALIGN_OBJECT)); - break; - default: - ASSERT(GetObjectSize() != 0); - size = GetObjectSize(); - break; - } - ASSERT(AlignUp(size, static_cast(MemAlignment::MEM_ALIGN_OBJECT)) == size); - return size; -} } // namespace panda::ecmascript #endif // ECMASCRIPT_JS_HCLASS_INL_H diff --git a/runtime/js_hclass.h b/runtime/js_hclass.h index 7b28c15bc2c1a7644d14ce74ea8fd17b101487b7..bead4887cd326f2a1776705085a9074044b15d33 100644 --- a/runtime/js_hclass.h +++ b/runtime/js_hclass.h @@ -172,7 +172,6 @@ class ProtoChangeDetails; PENDING_JOB, /* /////////////////////////////////////////////////////////////////////////////-PADDING */ \ FUNCTION_EXTRA_INFO, /* ////////////////////////////////////////////////////////////////////////-PADDING */ \ COMPLETION_RECORD, /* JS_RECORD_END /////////////////////////////////////////////////////////////////////// */ \ - MACHINE_CODE_OBJECT, /* ///////////////////////////////////////////////////////////////////////////-PADDING */ \ ECMA_MODULE, /* /////////////////////////////////////////////////////////////////////////////////-PADDING */ \ CLASS_INFO_EXTRACTOR, /* //////////////////////////////////////////////////////////////////////////-PADDING */ \ JS_TYPE_LAST = CLASS_INFO_EXTRACTOR, /* ///////////////////////////////////////////////////////////-PADDING */ \ @@ -239,7 +238,6 @@ public: static JSHClass *Cast(const TaggedObject *object); - inline size_t SizeFromJSHClass(TaggedObject *header); inline bool HasReferenceField(); // size need to add inlined property numbers @@ -917,11 +915,6 @@ public: return GetObjectType() == JSType::FREE_OBJECT_WITH_TWO_FIELD; } - inline bool IsMachineCodeObject() const - { - return GetObjectType() == JSType::MACHINE_CODE_OBJECT; - } - inline void SetElementRepresentation(Representation representation) { uint32_t bits = GetBitField(); diff --git a/runtime/js_tagged_value-inl.h b/runtime/js_tagged_value-inl.h index e84459350ef49e0f392fcd31e5cc709981c5777b..67d1db572ae641fe0ace095bdfd702e9639f4fe5 100644 --- a/runtime/js_tagged_value-inl.h +++ b/runtime/js_tagged_value-inl.h @@ -884,11 +884,6 @@ inline bool JSTaggedValue::IsJSGlobalObject() const return IsHeapObject() && GetTaggedObject()->GetClass()->IsJSGlobalObject(); } -inline bool JSTaggedValue::IsMachineCodeObject() const -{ - return IsHeapObject() && GetTaggedObject()->GetClass()->IsMachineCodeObject(); -} - inline bool JSTaggedValue::IsClassInfoExtractor() const { return IsHeapObject() && GetTaggedObject()->GetClass()->IsClassInfoExtractor(); diff --git a/runtime/js_tagged_value.h b/runtime/js_tagged_value.h index ebf9662c0d83fd415f9d8f2db161d46d521f3b63..65334f5bddd7828336b7ca0b6b18603744fa24c4 100644 --- a/runtime/js_tagged_value.h +++ b/runtime/js_tagged_value.h @@ -320,7 +320,6 @@ public: bool IsPropertyBox() const; bool IsProtoChangeMarker() const; bool IsProtoChangeDetails() const; - bool IsMachineCodeObject() const; bool IsClassInfoExtractor() const; bool IsJSFinalizationRegistry() const; static bool IsSameTypeOrHClass(JSTaggedValue x, JSTaggedValue y); diff --git a/runtime/js_thread.cpp b/runtime/js_thread.cpp index 6c6d126c1f97547d1d300b3d169c18e38fe2c35b..ef273661a940117738391a05ee6ebd216295efa3 100644 --- a/runtime/js_thread.cpp +++ b/runtime/js_thread.cpp @@ -19,7 +19,6 @@ #include "plugins/ecmascript/runtime/ic/properties_cache-inl.h" #include "plugins/ecmascript/runtime/internal_call_params.h" #include "plugins/ecmascript/runtime/interpreter/interpreter-inl.h" -#include "plugins/ecmascript/runtime/mem/machine_code.h" #include "runtime/include/panda_vm.h" #include "runtime/include/stack_walker-inl.h" diff --git a/runtime/mem/barriers.h b/runtime/mem/barriers.h index 746a2a3d919db3d6bed9ec263bbd69439d4768a0..8b35f31301aeb5b9d3aa443f9ae00f40a77e231b 100644 --- a/runtime/mem/barriers.h +++ b/runtime/mem/barriers.h @@ -20,10 +20,10 @@ namespace panda::ecmascript { class Barriers { public: template - static inline bool AtomicSetDynPrimitive(volatile void *obj, size_t offset, T oldValue, T value) + static inline bool AtomicSetDynPrimitive(volatile void *obj, size_t offset, T old_value, T value) { - volatile auto atomicField = reinterpret_cast *>(ToUintPtr(obj) + offset); - return std::atomic_compare_exchange_strong_explicit(atomicField, &oldValue, value, std::memory_order_release, + volatile auto atomic_field = reinterpret_cast *>(ToUintPtr(obj) + offset); + return std::atomic_compare_exchange_strong_explicit(atomic_field, &old_value, value, std::memory_order_release, std::memory_order_relaxed); } diff --git a/runtime/mem/ecma_string.h b/runtime/mem/ecma_string.h index afe6dc475a42fb618bda93c90aaeb2444e2ac2bb..770aa266f604cb387bbc5c267bbb8036e91a7b0c 100644 --- a/runtime/mem/ecma_string.h +++ b/runtime/mem/ecma_string.h @@ -40,10 +40,10 @@ std::enable_if_t, PandaString> ToPandaString(T number) if (number == 0) { return PandaString("0"); } - bool IsNeg = false; + bool is_neg = false; if (number < 0) { number = -number; - IsNeg = true; + is_neg = true; } static constexpr uint32_t BUFF_SIZE = std::numeric_limits::digits10 + 3; // 3: Reserved for sign bit and '\0'. @@ -56,7 +56,7 @@ std::enable_if_t, PandaString> ToPandaString(T number) // NOLINTNEXTLINE(readability-magic-numbers) number /= 10; // 10 : decimal } - if (IsNeg) { + if (is_neg) { buf[--position] = '-'; } return PandaString(&buf[position]); diff --git a/runtime/mem/machine_code.h b/runtime/mem/machine_code.h deleted file mode 100644 index 44a2a3fd978719df359da669641f504d0302e40c..0000000000000000000000000000000000000000 --- a/runtime/mem/machine_code.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PANDA_RUNTIME_ECMASCRIPT_MEM_MACHINE_CODE_H -#define PANDA_RUNTIME_ECMASCRIPT_MEM_MACHINE_CODE_H - -#include "plugins/ecmascript/runtime/ecma_macros.h" -#include "plugins/ecmascript/runtime/js_tagged_value.h" -#include "plugins/ecmascript/runtime/mem/tagged_object.h" - -namespace panda::ecmascript { -class MachineCode : public TaggedObject { -public: - static MachineCode *Cast(ObjectHeader *object) - { - ASSERT(JSTaggedValue(object).IsMachineCodeObject()); - return static_cast(object); - } - - MachineCode() = default; - ~MachineCode() = default; - - static constexpr size_t INS_SIZE_OFFSET = TaggedObjectSize(); - ACCESSORS(InstructionSizeInBytes, INS_SIZE_OFFSET, DATA_OFFSET); - static constexpr size_t SIZE = DATA_OFFSET; - - DECL_DUMP() - - uintptr_t GetDataOffsetAddress() - { - return reinterpret_cast(this) + DATA_OFFSET; - } - - void SetData(const uint8_t *stackMapData, size_t codeLength) - { - if (stackMapData == nullptr) { - LOG_ECMA_MEM(ERROR) << "data is null in creating new code object"; - return; - } - if (memcpy_s(reinterpret_cast(this->GetDataOffsetAddress()), this->GetInstructionSizeInBytes().GetInt(), - stackMapData, codeLength) != EOK) { - LOG_ECMA_MEM(ERROR) << "memcpy fail in creating new code object "; - return; - } - } - - void VisitRangeSlot([[maybe_unused]] const EcmaObjectRangeVisitor &v) - { - // left blank deliberately,only need to visit TaggedObject type object. - } - - void VisitObjects([[maybe_unused]] const EcmaObjectRangeVisitor &visitor) const - { - // left blank deliberately,only need to visit TaggedObject type object. - } - - size_t GetMachineCodeObjectSize() - { - return SIZE + this->GetInstructionSizeInBytes().GetInt(); - } - - NO_COPY_SEMANTIC(MachineCode); - NO_MOVE_SEMANTIC(MachineCode); -}; -} // namespace panda::ecmascript - -#endif // PANDA_RUNTIME_ECMASCRIPT_MEM_MACHINE_CODE_H diff --git a/runtime/mem/mem_manager-inl.h b/runtime/mem/mem_manager-inl.h index bb070a4c4a9dde14debb704b81ad163be66f3894..a80fcbc62e8f24703c94823d440c97a8c00d2ec8 100644 --- a/runtime/mem/mem_manager-inl.h +++ b/runtime/mem/mem_manager-inl.h @@ -32,7 +32,7 @@ TaggedObject *MemManager::AllocateYoungGenerationOrHugeObject(JSHClass *hclass) TaggedObject *MemManager::AllocateYoungGenerationOrHugeObject(JSHClass *hclass, size_t size) { - auto object = heapManager_->AllocateObject(hclass->GetHClass(), size, DEFAULT_ALIGNMENT, thread_); + auto object = heap_manager_->AllocateObject(hclass->GetHClass(), size, DEFAULT_ALIGNMENT, thread_); // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) return TaggedObject::Cast(object); } @@ -46,9 +46,9 @@ TaggedObject *MemManager::AllocateNonMovableOrHugeObject(JSHClass *hclass, size_ { ObjectHeader *object = nullptr; if (hclass == nullptr) { - object = heapManager_->AllocateNonMovableObject(nullptr, size, DEFAULT_ALIGNMENT, thread_); + object = heap_manager_->AllocateNonMovableObject(nullptr, size, DEFAULT_ALIGNMENT, thread_); } else { - object = heapManager_->AllocateNonMovableObject(hclass->GetHClass(), size, DEFAULT_ALIGNMENT, thread_); + object = heap_manager_->AllocateNonMovableObject(hclass->GetHClass(), size, DEFAULT_ALIGNMENT, thread_); } // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) return TaggedObject::Cast(object); @@ -67,14 +67,14 @@ TaggedObject *MemManager::AllocateNonMovableOrHugeObject(JSHClass *hclass) TaggedObject *MemManager::AllocateOldGenerationOrHugeObject(JSHClass *hclass, size_t size) { - auto object = heapManager_->AllocateObject(hclass->GetHClass(), size, DEFAULT_ALIGNMENT, thread_); + auto object = heap_manager_->AllocateObject(hclass->GetHClass(), size, DEFAULT_ALIGNMENT, thread_); // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) return TaggedObject::Cast(object); } TaggedObject *MemManager::AllocateHugeObject(JSHClass *hclass, size_t size) { - auto object = heapManager_->AllocateObject(hclass->GetHClass(), size, DEFAULT_ALIGNMENT, thread_); + auto object = heap_manager_->AllocateObject(hclass->GetHClass(), size, DEFAULT_ALIGNMENT, thread_); // SUPPRESS_CSA_NEXTLINE(alpha.core.WasteObjHeader) return TaggedObject::Cast(object); } diff --git a/runtime/mem/mem_manager.cpp b/runtime/mem/mem_manager.cpp index 538d70935a3c58881139f7274ab52ca5ddabc96e..4776b01c0dfa48f7dcd8c646d20103c4ce54dff5 100644 --- a/runtime/mem/mem_manager.cpp +++ b/runtime/mem/mem_manager.cpp @@ -18,7 +18,7 @@ namespace panda::ecmascript { MemManager::MemManager(EcmaVM *vm) { - heapManager_ = vm->GetHeapManager(); + heap_manager_ = vm->GetHeapManager(); thread_ = vm->GetAssociatedJSThread(); } } // namespace panda::ecmascript diff --git a/runtime/mem/mem_manager.h b/runtime/mem/mem_manager.h index 325fd1a600e5b4231ffcdcf1e585c46664a613a8..e4264763f570cc541eb19e3b07340dcd595603b7 100644 --- a/runtime/mem/mem_manager.h +++ b/runtime/mem/mem_manager.h @@ -38,7 +38,7 @@ public: inline void SetClass(TaggedObject *header, JSHClass *hclass); private: - mem::HeapManager *heapManager_; + mem::HeapManager *heap_manager_; ManagedThread *thread_; }; } // namespace panda::ecmascript diff --git a/runtime/mem/object_xray-inl.h b/runtime/mem/object_xray-inl.h index 004be244acbf8884a6d4fa7a28b526bdfa9a8d50..1e2544a87d1d406327d9bed85cc9a43e3aec5db9 100644 --- a/runtime/mem/object_xray-inl.h +++ b/runtime/mem/object_xray-inl.h @@ -60,14 +60,13 @@ #include "plugins/ecmascript/runtime/js_typed_array.h" #include "plugins/ecmascript/runtime/js_weak_container.h" #include "plugins/ecmascript/runtime/mem/object_xray.h" -#include "plugins/ecmascript/runtime/mem/machine_code.h" #include "plugins/ecmascript/runtime/mem/mem.h" namespace panda::ecmascript { void ObjectXRay::VisitVMRoots(const RootVisitor &visitor, const RootRangeVisitor &range_visitor) const { - ecmaVm_->Iterate(visitor); - ecmaVm_->GetJSThread()->Iterate(visitor, range_visitor); + ecma_vm_->Iterate(visitor); + ecma_vm_->GetJSThread()->Iterate(visitor, range_visitor); } template @@ -314,9 +313,6 @@ void ObjectXRay::VisitObjectBody(TaggedObject *object, JSHClass *klass, const Ec case JSType::JS_PLURAL_RULES: JSPluralRules::Cast(object)->VisitRangeSlot(visitor); break; - case JSType::MACHINE_CODE_OBJECT: - MachineCode::Cast(object)->VisitRangeSlot(visitor); - break; case JSType::CLASS_INFO_EXTRACTOR: ClassInfoExtractor::Cast(object)->VisitRangeSlot(visitor); break; diff --git a/runtime/mem/object_xray.h b/runtime/mem/object_xray.h index 9fe7bc375c3196a220042f97f09a98d50e992209..c980a38db13f33d73f8dbad7176b66e8ed7bb5fd 100644 --- a/runtime/mem/object_xray.h +++ b/runtime/mem/object_xray.h @@ -44,18 +44,18 @@ using WeakRootVisitor = std::function; class ObjectXRay { public: - explicit ObjectXRay(EcmaVM *ecmaVm) : ecmaVm_(ecmaVm) {} + explicit ObjectXRay(EcmaVM *ecma_vm) : ecma_vm_(ecma_vm) {} ~ObjectXRay() = default; inline void VisitVMRoots(const RootVisitor &visitor, const RootRangeVisitor &range_visitor) const; - template + template inline void VisitObjectBody(TaggedObject *object, JSHClass *klass, const EcmaObjectRangeVisitor &visitor); DEFAULT_MOVE_SEMANTIC(ObjectXRay); DEFAULT_COPY_SEMANTIC(ObjectXRay); private: - EcmaVM *ecmaVm_ {nullptr}; + EcmaVM *ecma_vm_ {nullptr}; }; } // namespace panda::ecmascript diff --git a/runtime/mem/slots.h b/runtime/mem/slots.h index a2d3c37ef3c65a58997c19200a586f8d84f636bd..d22a0f0cbc5b901033015d9d6b832cebbbece7d9 100644 --- a/runtime/mem/slots.h +++ b/runtime/mem/slots.h @@ -22,7 +22,7 @@ namespace panda::ecmascript { class ObjectSlot { public: - explicit ObjectSlot(uintptr_t slotAddr) : slotAddress_(slotAddr) {} + explicit ObjectSlot(uintptr_t slot_addr) : slot_address_(slot_addr) {} ~ObjectSlot() = default; DEFAULT_COPY_SEMANTIC(ObjectSlot); @@ -36,7 +36,7 @@ public: void Update(JSTaggedType value) { // NOLINTNEXTLINE(clang-analyzer-core.NullDereference) - *reinterpret_cast(slotAddress_) = value; + *reinterpret_cast(slot_address_) = value; } TaggedObject *GetTaggedObjectHeader() const @@ -47,12 +47,12 @@ public: JSTaggedType GetTaggedType() const { // NOLINTNEXTLINE(clang-analyzer-core.NullDereference) - return *reinterpret_cast(slotAddress_); + return *reinterpret_cast(slot_address_); } ObjectSlot &operator++() { - slotAddress_ += sizeof(JSTaggedType); + slot_address_ += sizeof(JSTaggedType); return *this; } @@ -60,42 +60,42 @@ public: ObjectSlot operator++(int) { ObjectSlot ret = *this; - slotAddress_ += sizeof(JSTaggedType); + slot_address_ += sizeof(JSTaggedType); return ret; } uintptr_t SlotAddress() const { - return slotAddress_; + return slot_address_; } bool operator<(const ObjectSlot &other) const { - return slotAddress_ < other.slotAddress_; + return slot_address_ < other.slot_address_; } bool operator<=(const ObjectSlot &other) const { - return slotAddress_ <= other.slotAddress_; + return slot_address_ <= other.slot_address_; } bool operator>(const ObjectSlot &other) const { - return slotAddress_ > other.slotAddress_; + return slot_address_ > other.slot_address_; } bool operator>=(const ObjectSlot &other) const { - return slotAddress_ >= other.slotAddress_; + return slot_address_ >= other.slot_address_; } bool operator==(const ObjectSlot &other) const { - return slotAddress_ == other.slotAddress_; + return slot_address_ == other.slot_address_; } bool operator!=(const ObjectSlot &other) const { - return slotAddress_ != other.slotAddress_; + return slot_address_ != other.slot_address_; } private: - uintptr_t slotAddress_; + uintptr_t slot_address_; }; } // namespace panda::ecmascript diff --git a/runtime/object_factory.cpp b/runtime/object_factory.cpp index d90d851ea0d10a2be0ad62446e8239278e8d84e8..9b64ef0a2dac1b8ee6cb5ab0b250956158750566 100644 --- a/runtime/object_factory.cpp +++ b/runtime/object_factory.cpp @@ -164,7 +164,6 @@ void ObjectFactory::ObtainRootClass([[maybe_unused]] const JSHandle & prototypeHandlerClass_ = JSHClass::Cast(globalConst->GetPrototypeHandlerClass().GetTaggedObject()); functionExtraInfo_ = JSHClass::Cast(globalConst->GetFunctionExtraInfoClass().GetTaggedObject()); jsRealmClass_ = JSHClass::Cast(globalConst->GetJSRealmClass().GetTaggedObject()); - machineCodeClass_ = JSHClass::Cast(globalConst->GetMachineCodeClass().GetTaggedObject()); classInfoExtractorHClass_ = JSHClass::Cast(globalConst->GetClassInfoExtractorHClass().GetTaggedObject()); linkedHashMapClass_ = JSHClass::Cast(globalConst->GetLinkedHashMapClass().GetTaggedObject()); diff --git a/runtime/object_factory.h b/runtime/object_factory.h index 01f1dfd16cc662d3ee14cbe4a5ca0ca4da1204c4..b4bb35605a35b4ed95800ffb042ad2f0f33d8f62 100644 --- a/runtime/object_factory.h +++ b/runtime/object_factory.h @@ -24,7 +24,6 @@ #include "plugins/ecmascript/runtime/js_hclass.h" #include "plugins/ecmascript/runtime/js_native_pointer.h" #include "plugins/ecmascript/runtime/js_tagged_value.h" -#include "plugins/ecmascript/runtime/mem/machine_code.h" #include "plugins/ecmascript/runtime/mem/mem_manager.h" #include "plugins/ecmascript/runtime/object_wrapper.h" #include "plugins/ecmascript/runtime/tagged_array.h" @@ -100,7 +99,6 @@ class PropertyBox; class ProtoChangeMarker; class ProtoChangeDetails; class ProfileTypeInfo; -class MachineCode; class ClassInfoExtractor; enum class PrimitiveType : uint8_t; @@ -443,7 +441,6 @@ private: JSHClass *functionExtraInfo_ {nullptr}; JSHClass *jsRealmClass_ {nullptr}; JSHClass *programClass_ {nullptr}; - JSHClass *machineCodeClass_ {nullptr}; JSHClass *ecmaModuleClass_ {nullptr}; JSHClass *classInfoExtractorHClass_ {nullptr}; JSHClass *linkedHashMapClass_ {nullptr};