[cleanup] Remove NeverReadOnlySpaceObject class
... as its existence gives us nothing. Bug: v8:9183 Change-Id: I80234e4ca8b0c9f596a7a3ff79a926d0dda98db8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1672937 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#62334}
This commit is contained in:
parent
f21537a2e8
commit
6d5731d596
@ -3537,8 +3537,7 @@ MaybeLocal<Uint32> Value::ToUint32(Local<Context> context) const {
|
||||
}
|
||||
|
||||
i::Isolate* i::IsolateFromNeverReadOnlySpaceObject(i::Address obj) {
|
||||
return i::NeverReadOnlySpaceObject::GetIsolate(
|
||||
i::HeapObject::cast(i::Object(obj)));
|
||||
return i::GetIsolateFromWritableObject(i::HeapObject::cast(i::Object(obj)));
|
||||
}
|
||||
|
||||
bool i::ShouldThrowOnError(i::Isolate* isolate) {
|
||||
|
@ -7,9 +7,6 @@
|
||||
|
||||
#include "src/objects/heap-object.h"
|
||||
|
||||
// TODO(jkummerow): Get rid of this by moving NROSO::GetIsolate elsewhere.
|
||||
#include "src/execution/isolate-utils-inl.h"
|
||||
|
||||
// Has to be the last include (doesn't have include guards):
|
||||
#include "src/objects/object-macros.h"
|
||||
|
||||
@ -23,16 +20,6 @@ HeapObject::HeapObject(Address ptr, AllowInlineSmiStorage allow_smi)
|
||||
IsHeapObject());
|
||||
}
|
||||
|
||||
// static
|
||||
Heap* NeverReadOnlySpaceObject::GetHeap(HeapObject object) {
|
||||
return GetHeapFromWritableObject(object);
|
||||
}
|
||||
|
||||
// static
|
||||
Isolate* NeverReadOnlySpaceObject::GetIsolate(HeapObject object) {
|
||||
return GetIsolateFromWritableObject(object);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -212,16 +212,6 @@ class HeapObject : public Object {
|
||||
OBJECT_CONSTRUCTORS_IMPL(HeapObject, Object)
|
||||
CAST_ACCESSOR(HeapObject)
|
||||
|
||||
// Helper class for objects that can never be in RO space.
|
||||
class NeverReadOnlySpaceObject {
|
||||
public:
|
||||
// The Heap the object was allocated in. Used also to access Isolate.
|
||||
static inline Heap* GetHeap(HeapObject object);
|
||||
|
||||
// Convenience method to get current isolate.
|
||||
static inline Isolate* GetIsolate(HeapObject object);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -37,12 +37,10 @@
|
||||
|
||||
// TODO(leszeks): Add checks in the factory that we never allocate these
|
||||
// objects in RO space.
|
||||
#define NEVER_READ_ONLY_SPACE_IMPL(Type) \
|
||||
Heap* Type::GetHeap() const { \
|
||||
return NeverReadOnlySpaceObject::GetHeap(*this); \
|
||||
} \
|
||||
Isolate* Type::GetIsolate() const { \
|
||||
return NeverReadOnlySpaceObject::GetIsolate(*this); \
|
||||
#define NEVER_READ_ONLY_SPACE_IMPL(Type) \
|
||||
Heap* Type::GetHeap() const { return GetHeapFromWritableObject(*this); } \
|
||||
Isolate* Type::GetIsolate() const { \
|
||||
return GetIsolateFromWritableObject(*this); \
|
||||
}
|
||||
|
||||
#define DECL_PRIMITIVE_ACCESSORS(name, type) \
|
||||
|
@ -9,7 +9,8 @@
|
||||
|
||||
#include "include/v8-internal.h"
|
||||
#include "src/common/ptr-compr-inl.h"
|
||||
#include "src/objects/heap-object-inl.h"
|
||||
#include "src/objects/maybe-object.h"
|
||||
#include "src/objects/objects.h"
|
||||
#include "src/objects/oddball.h"
|
||||
#include "src/objects/tagged-impl-inl.h"
|
||||
#include "src/roots/roots-inl.h"
|
||||
|
Loading…
Reference in New Issue
Block a user