Commit 3c6ecf71 authored by Seth Brenith's avatar Seth Brenith Committed by Commit Bot

[cleanup] Remove operator-> implementations from Object subclasses

Object::operator-> was removed in
https://chromium-review.googlesource.com/c/v8/v8/+/1624788 but a few
subclasses still had their own implementations.

Change-Id: Ie2c4df4cd0af0bdba8838aaf2f3852c61e227aa4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1884950Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#64619}
parent 6f6942db
......@@ -918,7 +918,7 @@ Handle<Object> LoadIC::ComputeHandler(LookupIterator* lookup) {
Handle<Object> value = lookup->GetDataValue();
if (value->IsThinString()) {
value = handle(ThinString::cast(*value)->actual(), isolate());
value = handle(ThinString::cast(*value).actual(), isolate());
}
// Non internalized strings could turn into thin/cons strings
......
......@@ -43,9 +43,6 @@ class FieldType : public Object {
V8_EXPORT_PRIVATE void PrintTo(std::ostream& os) const;
FieldType* operator->() { return this; }
const FieldType* operator->() const { return this; }
private:
explicit constexpr FieldType(Address ptr) : Object(ptr) {}
};
......
......@@ -51,7 +51,6 @@ class Managed : public Foreign {
public:
Managed() : Foreign() {}
explicit Managed(Address ptr) : Foreign(ptr) {}
Managed* operator->() { return this; }
// Get a raw pointer to the C++ object.
V8_INLINE CppType* raw() { return GetSharedPtrPtr()->get(); }
......
......@@ -30,8 +30,6 @@ class Smi : public Object {
DCHECK(HAS_SMI_TAG(ptr));
#endif
}
Smi* operator->() { return this; }
const Smi* operator->() const { return this; }
// Returns the integer value.
inline int value() const { return Internals::SmiValue(ptr()); }
......
......@@ -3147,9 +3147,6 @@ void CppClassGenerator::GenerateClassConstructors() {
hdr_ << " \"class " << gen_name_ << " should be used as direct base for "
<< name_ << ".\");\n";
hdr_ << " }\n";
hdr_ << " D* operator->() { return static_cast<D*>(this); }\n";
hdr_ << " const D* operator->() const { return static_cast<const D*>(this); "
"}\n\n";
hdr_ << "protected:\n";
hdr_ << " inline explicit " << gen_name_ << "(Address ptr);\n";
......
......@@ -1561,7 +1561,7 @@ auto Func::call(const Val args[], Val results[]) const -> own<Trap> {
i::Address FuncData::v8_callback(i::Address host_data_foreign,
i::Address argv) {
FuncData* self =
i::Managed<FuncData>::cast(i::Object(host_data_foreign))->raw();
i::Managed<FuncData>::cast(i::Object(host_data_foreign)).raw();
StoreImpl* store = impl(self->store);
i::Isolate* isolate = store->i_isolate();
i::HandleScope scope(isolate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment