Commit b51f8f66 authored by jgruber's avatar jgruber Committed by Commit Bot

Reland "Remove isolate.h include from external-reference.h"

This is a reland of 25207bf8

Original change's description:
> 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: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52103}

TBR=petermarshall@chromium.org

Bug: v8:6666
Change-Id: Ibbcf2c116dc3b202d325fd7644e8755ffe583ef1
Reviewed-on: https://chromium-review.googlesource.com/973062Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52108}
parent 250b9cf8
......@@ -9,6 +9,7 @@
#include "src/arm/assembler-arm-inl.h"
#include "src/arm/simulator-arm.h"
#include "src/codegen.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
namespace v8 {
......
......@@ -8,6 +8,7 @@
#include "src/arm64/macro-assembler-arm64-inl.h"
#include "src/arm64/simulator-arm64.h"
#include "src/codegen.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
namespace v8 {
......
......@@ -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_;
};
......
......@@ -7,6 +7,7 @@
#include "src/codegen.h"
#include "src/factory-inl.h"
#include "src/heap/heap.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
namespace v8 {
......
......@@ -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 <memory>
#include "src/codegen.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
#include "src/mips/simulator-mips.h"
......
......@@ -7,6 +7,7 @@
#include <memory>
#include "src/codegen.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
#include "src/mips64/simulator-mips64.h"
......
......@@ -7,6 +7,7 @@
#include <memory>
#include "src/codegen.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
#include "src/ppc/simulator-ppc.h"
......
......@@ -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"
......
......@@ -7,6 +7,7 @@
#include <memory>
#include "src/codegen.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
#include "src/s390/simulator-s390.h"
......
......@@ -5,6 +5,7 @@
#if V8_TARGET_ARCH_X64
#include "src/codegen.h"
#include "src/isolate.h"
#include "src/macro-assembler.h"
#include "src/x64/assembler-x64-inl.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