Commit 013cf15d authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[Refactoring] Make external references more independent of the isolate

With this CL we do the redirection of ExternalReferences for simulators
independent of the isolate but instead use the redirector provided by
the simulator directly. Thereby we make the code independent of the
isolate.

I plan to remove the redirector from the isolate in a separate CL.

R=mstarzinger@chromium.org

Change-Id: I2ae0b2184da214cf7606fabeabc9bec35bf0616e
Reviewed-on: https://chromium-review.googlesource.com/1012039Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52648}
parent 0cd4b3d6
This diff is collapsed.
......@@ -286,7 +286,7 @@ class ExternalReference BASE_EMBEDDED {
: address_(reinterpret_cast<Address>(address)) {}
explicit ExternalReference(Address address) : address_(address) {}
static Address Redirect(Isolate* isolate, Address address_arg,
static Address Redirect(Address address_arg,
Type type = ExternalReference::BUILTIN_CALL);
Address address_;
......
......@@ -35,6 +35,10 @@ class SimulatorBase {
static base::Mutex* i_cache_mutex() { return i_cache_mutex_; }
static base::CustomMatcherHashMap* i_cache() { return i_cache_; }
// Runtime call support.
static Address RedirectExternalReference(Address external_function,
ExternalReference::Type type);
protected:
template <typename Return, typename SimT, typename CallImpl, typename... Args>
static Return VariadicCall(SimT* sim, CallImpl call, Address entry,
......@@ -67,10 +71,6 @@ class SimulatorBase {
intptr_t ret) {}
private:
// Runtime call support.
static Address RedirectExternalReference(Address external_function,
ExternalReference::Type type);
static base::Mutex* redirection_mutex_;
static Redirection* redirection_;
......
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