Commit 10afbb7e authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[cleanup] Split out v8-internal.h from include/v8.h

Move everything defined in the v8::internal namespace from include/v8.h
into a separate header that can be included by globals.h/checks.h
instead of the whole v8.h.

Also moves V8_EXPORT into v8config.h (so it can be use in the new
v8-internal.h).

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I22cdc2728d91a94b309a3d030ed06c0f8a06c723
Reviewed-on: https://chromium-review.googlesource.com/1210102Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55707}
parent 8c64f614
......@@ -1482,6 +1482,7 @@ v8_header_set("v8_headers") {
configs = [ ":internal_config" ]
sources = [
"include/v8-internal.h",
"include/v8.h",
"include/v8config.h",
]
......@@ -1503,6 +1504,7 @@ v8_source_set("v8_base") {
### gcmole(all) ###
"include/v8-inspector-protocol.h",
"include/v8-inspector.h",
"include/v8-internal.h",
"include/v8-platform.h",
"include/v8-profiler.h",
"include/v8-testing.h",
......
This diff is collapsed.
This diff is collapsed.
......@@ -420,6 +420,36 @@ namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; }
#define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */
#endif
#ifdef V8_OS_WIN
// Setup for Windows DLL export/import. When building the V8 DLL the
// BUILDING_V8_SHARED needs to be defined. When building a program which uses
// the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
// static library or building a program which uses the V8 static library neither
// BUILDING_V8_SHARED nor USING_V8_SHARED should be defined.
#ifdef BUILDING_V8_SHARED
# define V8_EXPORT __declspec(dllexport)
#elif USING_V8_SHARED
# define V8_EXPORT __declspec(dllimport)
#else
# define V8_EXPORT
#endif // BUILDING_V8_SHARED
#else // V8_OS_WIN
// Setup for Linux shared library export.
#if V8_HAS_ATTRIBUTE_VISIBILITY
# ifdef BUILDING_V8_SHARED
# define V8_EXPORT __attribute__ ((visibility("default")))
# else
# define V8_EXPORT
# endif
#else
# define V8_EXPORT
#endif
#endif // V8_OS_WIN
// clang-format on
#endif // V8CONFIG_H_
......@@ -5,7 +5,7 @@
#ifndef V8_CHECKS_H_
#define V8_CHECKS_H_
#include "include/v8.h"
#include "include/v8-internal.h"
#include "src/base/logging.h"
#include "src/globals.h"
......
......@@ -11,7 +11,7 @@
#include <limits>
#include <ostream>
#include "include/v8.h"
#include "include/v8-internal.h"
#include "src/base/build_config.h"
#include "src/base/flags.h"
#include "src/base/logging.h"
......
......@@ -13,6 +13,7 @@
// Clients of this interface shouldn't depend on lots of heap internals.
// Do not include anything from src/heap here!
#include "include/v8-internal.h"
#include "include/v8.h"
#include "src/accessors.h"
#include "src/allocation.h"
......
......@@ -12,6 +12,7 @@
#include <vector>
#include "include/v8-inspector.h"
#include "include/v8-internal.h"
#include "include/v8.h"
#include "src/allocation.h"
#include "src/base/atomicops.h"
......
......@@ -8,6 +8,7 @@
#include <iosfwd>
#include <memory>
#include "include/v8-internal.h"
#include "include/v8.h"
#include "include/v8config.h"
#include "src/assert-scope.h"
......
......@@ -5,6 +5,7 @@
#ifndef V8_OBJECTS_MAYBE_OBJECT_H_
#define V8_OBJECTS_MAYBE_OBJECT_H_
#include "include/v8-internal.h"
#include "include/v8.h"
#include "src/globals.h"
#include "src/objects.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