Commit 38a0bf1e authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

Revert "[ic] Shadow smi_handler on LoadHandler to always be Smi"

This reverts commit 5f0e7dd4.

Reason for revert: Turns out this isn't true: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/ic/ic.cc;l=946

Original change's description:
> [ic] Shadow smi_handler on LoadHandler to always be Smi
>
> StoreHandlers can store either a Code object or a Smi, so the
> smi_handler field on DataHandler is a Code|Smi. But, LoadHandlers can
> only store Smis here so add a shadowing smi_handler definition which
> only allows / returns Smis.
>
> Change-Id: Icc1c508db268950990b9c84b9e682b9a9b1f43e5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663745
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80775}

Change-Id: Ia2c14141ab5929be3ded883f0cecb40645a72dfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672419
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80776}
parent 5f0e7dd4
...@@ -136,15 +136,6 @@ Handle<Smi> LoadHandler::LoadWasmArrayElement(Isolate* isolate, ...@@ -136,15 +136,6 @@ Handle<Smi> LoadHandler::LoadWasmArrayElement(Isolate* isolate,
return handle(Smi::FromInt(config), isolate); return handle(Smi::FromInt(config), isolate);
} }
DEF_GETTER(LoadHandler, smi_handler, Smi) {
// Only StoreHandler smi_handler can ever be a Code object.
return Smi::cast(DataHandler::smi_handler(cage_base));
}
void LoadHandler::set_smi_handler(Smi value) {
DataHandler::set_smi_handler(value, SKIP_WRITE_BARRIER);
}
OBJECT_CONSTRUCTORS_IMPL(StoreHandler, DataHandler) OBJECT_CONSTRUCTORS_IMPL(StoreHandler, DataHandler)
CAST_ACCESSOR(StoreHandler) CAST_ACCESSOR(StoreHandler)
......
...@@ -232,9 +232,6 @@ class LoadHandler final : public DataHandler { ...@@ -232,9 +232,6 @@ class LoadHandler final : public DataHandler {
static void PrintHandler(Object handler, std::ostream& os); static void PrintHandler(Object handler, std::ostream& os);
#endif // defined(OBJECT_PRINT) #endif // defined(OBJECT_PRINT)
DECL_GETTER(smi_handler, Smi)
inline void set_smi_handler(Smi value);
OBJECT_CONSTRUCTORS(LoadHandler, DataHandler); OBJECT_CONSTRUCTORS(LoadHandler, DataHandler);
}; };
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
#include "src/execution/isolate.h" #include "src/execution/isolate.h"
#include "src/heap/factory.h" #include "src/heap/factory.h"
#include "src/heap/heap-inl.h" #include "src/heap/heap-inl.h"
#include "src/ic/handler-configuration-inl.h" #include "src/ic/handler-configuration.h"
#include "src/objects/data-handler-inl.h"
#include "src/objects/smi.h" #include "src/objects/smi.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-tester.h" #include "test/cctest/heap/heap-tester.h"
......
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