Commit 25207bf8 authored by jgruber's avatar jgruber Committed by Commit Bot

Remove isolate.h include from external-reference.h

This triggers a bunch of other necessary include tweaks for files that
used to work until now because they indirectly included isolate.h
through external-reference.h.

Bug: v8:6666
Change-Id: I8d48db44dcc321fa32a6279f3ddacb41ab58f975
Reviewed-on: https://chromium-review.googlesource.com/972042
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52103}
parent b9c46e3f
......@@ -37,13 +37,17 @@
#include <forward_list>
#include <iosfwd>
#include <map>
#include "src/allocation.h"
#include "src/contexts.h"
#include "src/deoptimize-reason.h"
#include "src/double.h"
#include "src/external-reference.h"
#include "src/flags.h"
#include "src/globals.h"
#include "src/label.h"
#include "src/objects.h"
#include "src/register-configuration.h"
#include "src/reglist.h"
......
......@@ -6,6 +6,7 @@
#include "src/base/adapters.h"
#include "src/base/utils/random-number-generator.h"
#include "src/isolate.h"
namespace v8 {
namespace internal {
......
......@@ -14,6 +14,7 @@
#include "src/deoptimize-reason.h"
#include "src/feedback-vector.h"
#include "src/frame-constants.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
#include "src/source-position.h"
#include "src/zone/zone-chunk-list.h"
......
......@@ -7,6 +7,7 @@
#include <vector>
#include "src/accessors.h"
#include "src/address-map.h"
#include "src/builtins/builtins.h"
#include "src/external-reference.h"
......
......@@ -15,6 +15,7 @@
#include "src/heap/heap.h"
#include "src/ic/stub-cache.h"
#include "src/interpreter/interpreter.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/regexp/regexp-stack.h"
#include "src/string-search.h"
......@@ -213,6 +214,18 @@ void ExternalReference::set_redirector(
reinterpret_cast<ExternalReferenceRedirectorPointer*>(redirector));
}
// static
void* ExternalReference::Redirect(Isolate* isolate, Address address_arg,
Type type) {
ExternalReferenceRedirector* redirector =
reinterpret_cast<ExternalReferenceRedirector*>(
isolate->external_reference_redirector());
void* address = reinterpret_cast<void*>(address_arg);
void* answer =
(redirector == nullptr) ? address : (*redirector)(address, type);
return answer;
}
ExternalReference ExternalReference::stress_deopt_count(Isolate* isolate) {
return ExternalReference(isolate->stress_deopt_count_address());
}
......
......@@ -6,7 +6,6 @@
#define V8_EXTERNAL_REFERENCE_H_
#include "src/globals.h"
#include "src/isolate.h"
#include "src/runtime/runtime.h"
namespace v8 {
......@@ -16,6 +15,7 @@ class ApiFunction;
namespace internal {
class Isolate;
class Page;
class SCTableReference;
class StatsCounter;
......@@ -286,15 +286,7 @@ class ExternalReference BASE_EMBEDDED {
explicit ExternalReference(void* address) : address_(address) {}
static void* Redirect(Isolate* isolate, Address address_arg,
Type type = ExternalReference::BUILTIN_CALL) {
ExternalReferenceRedirector* redirector =
reinterpret_cast<ExternalReferenceRedirector*>(
isolate->external_reference_redirector());
void* address = reinterpret_cast<void*>(address_arg);
void* answer =
(redirector == nullptr) ? address : (*redirector)(address, type);
return answer;
}
Type type = ExternalReference::BUILTIN_CALL);
void* address_;
};
......
......@@ -9,6 +9,8 @@
#include "src/factory.h"
#include "src/feedback-vector.h"
#include "src/ic/stub-cache.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
#include "src/messages.h"
#include "src/objects/map.h"
......
......@@ -9,6 +9,7 @@
#include "src/assembler.h"
#include "src/globals.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
namespace v8 {
......
......@@ -7,6 +7,7 @@
#include "src/assembler.h"
#include "src/frames.h"
#include "src/heap/heap.h"
// Helper types to make boolean flag easier to read at call-site.
enum InvokeFlag {
......
......@@ -7,6 +7,7 @@
#include "src/allocation.h"
#include "src/assembler.h"
#include "src/isolate.h"
#include "src/objects/js-regexp.h"
#include "src/regexp/regexp-ast.h"
#include "src/regexp/regexp-macro-assembler.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