diff --git a/BUILD.gn b/BUILD.gn index 6abb6bd7ec..a523180813 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -130,17 +130,6 @@ config("libplatform_config") { include_dirs = [ "include" ] } -# This config should be applied to code using the libbase. -config("libbase_config") { - if (is_component_build) { - defines = [ "USING_V8_BASE_SHARED" ] - } - libs = [] - if (is_android && current_toolchain != host_toolchain) { - libs += [ "log" ] - } -} - # This config should be applied to code using the libsampler. config("libsampler_config") { include_dirs = [ "include" ] @@ -156,6 +145,10 @@ config("external_config") { if (v8_enable_inspector_override) { include_dirs += [ "$target_gen_dir/include" ] } + libs = [] + if (is_android && current_toolchain != host_toolchain) { + libs += [ "log" ] + } } # This config should only be applied to code that needs to be explicitly @@ -2159,7 +2152,9 @@ v8_source_set("v8_base") { } } -v8_component("v8_libbase") { +v8_source_set("v8_libbase") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + sources = [ "src/base/adapters.h", "src/base/atomic-utils.h", @@ -2175,7 +2170,6 @@ v8_component("v8_libbase") { "src/base/atomicops_internals_x86_gcc.cc", "src/base/atomicops_internals_x86_gcc.h", "src/base/atomicops_internals_x86_msvc.h", - "src/base/base-export.h", "src/base/bits.cc", "src/base/bits.h", "src/base/build_config.h", @@ -2226,14 +2220,8 @@ v8_component("v8_libbase") { configs = [ ":internal_config_base" ] - public_configs = [ ":libbase_config" ] - defines = [] - if (is_component_build) { - defines = [ "BUILDING_V8_BASE_SHARED" ] - } - if (is_posix) { sources += [ "src/base/platform/platform-posix.cc" ] } @@ -2377,7 +2365,6 @@ v8_source_set("fuzzer_support_nocomponent") { ] public_deps = [ - ":v8_libbase", ":v8_libplatform", ] } @@ -2406,7 +2393,6 @@ if (current_toolchain == v8_snapshot_toolchain) { deps = [ ":v8_base", - ":v8_libbase", ":v8_libplatform", ":v8_nosnapshot", "//build/config/sanitizers:deps", @@ -2529,7 +2515,6 @@ v8_executable("d8") { deps = [ ":d8_js2c", ":v8", - ":v8_libbase", ":v8_libplatform", "//build/config/sanitizers:deps", "//build/win:default_exe_manifest", @@ -2570,7 +2555,6 @@ v8_executable("v8_hello_world") { deps = [ ":v8", - ":v8_libbase", ":v8_libplatform", "//build/config/sanitizers:deps", "//build/win:default_exe_manifest", @@ -2595,7 +2579,6 @@ v8_executable("v8_sample_process") { deps = [ ":v8", - ":v8_libbase", ":v8_libplatform", "//build/config/sanitizers:deps", "//build/win:default_exe_manifest", @@ -2618,7 +2601,6 @@ v8_executable("v8_parser_shell") { ] deps = [ - ":v8_libbase", ":v8_libplatform", "//build/config/sanitizers:deps", "//build/win:default_exe_manifest", @@ -2662,7 +2644,6 @@ if (want_v8_shell) { deps = [ ":v8", - ":v8_libbase", ":v8_libplatform", "//build/config/sanitizers:deps", "//build/win:default_exe_manifest", diff --git a/samples/samples.gyp b/samples/samples.gyp index e7c26cf262..e5e9ef0f8c 100644 --- a/samples/samples.gyp +++ b/samples/samples.gyp @@ -36,7 +36,6 @@ 'type': 'executable', 'dependencies': [ '../src/v8.gyp:v8', - '../src/v8.gyp:v8_libbase', '../src/v8.gyp:v8_libplatform', ], 'include_dirs': [ diff --git a/src/base/atomicops_internals_x86_gcc.h b/src/base/atomicops_internals_x86_gcc.h index 8bd0c3bd9e..55bc44cd8b 100644 --- a/src/base/atomicops_internals_x86_gcc.h +++ b/src/base/atomicops_internals_x86_gcc.h @@ -7,8 +7,6 @@ #ifndef V8_BASE_ATOMICOPS_INTERNALS_X86_GCC_H_ #define V8_BASE_ATOMICOPS_INTERNALS_X86_GCC_H_ -#include "src/base/base-export.h" - namespace v8 { namespace base { @@ -23,8 +21,7 @@ struct AtomicOps_x86CPUFeatureStruct { bool has_sse2; // Processor has SSE2. #endif }; -V8_BASE_EXPORT extern struct AtomicOps_x86CPUFeatureStruct - AtomicOps_Internalx86CPUFeatures; +extern struct AtomicOps_x86CPUFeatureStruct AtomicOps_Internalx86CPUFeatures; #define ATOMICOPS_COMPILER_BARRIER() __asm__ __volatile__("" : : : "memory") diff --git a/src/base/base-export.h b/src/base/base-export.h deleted file mode 100644 index a2b3dacaf7..0000000000 --- a/src/base/base-export.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2016 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef V8_BASE_BASE_EXPORT_H_ -#define V8_BASE_BASE_EXPORT_H_ - -#include "include/v8config.h" - -#if V8_OS_WIN - -#ifdef BUILDING_V8_BASE_SHARED -#define V8_BASE_EXPORT __declspec(dllexport) -#elif USING_V8_BASE_SHARED -#define V8_BASE_EXPORT __declspec(dllimport) -#else -#define V8_BASE_EXPORT -#endif // BUILDING_V8_BASE_SHARED - -#else // !V8_OS_WIN - -// Setup for Linux shared library export. -#ifdef BUILDING_V8_BASE_SHARED -#define V8_BASE_EXPORT __attribute__((visibility("default"))) -#else -#define V8_BASE_EXPORT -#endif - -#endif // V8_OS_WIN - -#endif // V8_BASE_BASE_EXPORT_H_ diff --git a/src/base/bits.h b/src/base/bits.h index b1864940b8..da12ee60fe 100644 --- a/src/base/bits.h +++ b/src/base/bits.h @@ -6,8 +6,6 @@ #define V8_BASE_BITS_H_ #include - -#include "src/base/base-export.h" #include "src/base/macros.h" #if V8_CC_MSVC #include @@ -174,7 +172,8 @@ inline bool IsPowerOfTwo64(uint64_t value) { // power of two, it is returned as is. |value| must be less than or equal to // 0x80000000u. Implementation is from "Hacker's Delight" by Henry S. Warren, // Jr., figure 3-3, page 48, where the function is called clp2. -V8_BASE_EXPORT uint32_t RoundUpToPowerOfTwo32(uint32_t value); +uint32_t RoundUpToPowerOfTwo32(uint32_t value); + // RoundDownToPowerOfTwo32(value) returns the greatest power of two which is // less than or equal to |value|. If you pass in a |value| that is already a @@ -242,7 +241,7 @@ inline bool SignedSubOverflow32(int32_t lhs, int32_t rhs, int32_t* val) { // SignedMulOverflow32(lhs,rhs,val) performs a signed multiplication of |lhs| // and |rhs| and stores the result into the variable pointed to by |val| and // returns true if the signed multiplication resulted in an overflow. -V8_BASE_EXPORT bool SignedMulOverflow32(int32_t lhs, int32_t rhs, int32_t* val); +bool SignedMulOverflow32(int32_t lhs, int32_t rhs, int32_t* val); // SignedAddOverflow64(lhs,rhs,val) performs a signed summation of |lhs| and // |rhs| and stores the result into the variable pointed to by |val| and @@ -266,28 +265,31 @@ inline bool SignedSubOverflow64(int64_t lhs, int64_t rhs, int64_t* val) { // SignedMulOverflow64(lhs,rhs,val) performs a signed multiplication of |lhs| // and |rhs| and stores the result into the variable pointed to by |val| and // returns true if the signed multiplication resulted in an overflow. -V8_BASE_EXPORT bool SignedMulOverflow64(int64_t lhs, int64_t rhs, int64_t* val); +bool SignedMulOverflow64(int64_t lhs, int64_t rhs, int64_t* val); // SignedMulHigh32(lhs, rhs) multiplies two signed 32-bit values |lhs| and // |rhs|, extracts the most significant 32 bits of the result, and returns // those. -V8_BASE_EXPORT int32_t SignedMulHigh32(int32_t lhs, int32_t rhs); +int32_t SignedMulHigh32(int32_t lhs, int32_t rhs); + // SignedMulHighAndAdd32(lhs, rhs, acc) multiplies two signed 32-bit values // |lhs| and |rhs|, extracts the most significant 32 bits of the result, and // adds the accumulate value |acc|. -V8_BASE_EXPORT int32_t SignedMulHighAndAdd32(int32_t lhs, int32_t rhs, - int32_t acc); +int32_t SignedMulHighAndAdd32(int32_t lhs, int32_t rhs, int32_t acc); + // SignedDiv32(lhs, rhs) divides |lhs| by |rhs| and returns the quotient // truncated to int32. If |rhs| is zero, then zero is returned. If |lhs| // is minint and |rhs| is -1, it returns minint. -V8_BASE_EXPORT int32_t SignedDiv32(int32_t lhs, int32_t rhs); +int32_t SignedDiv32(int32_t lhs, int32_t rhs); + // SignedMod32(lhs, rhs) divides |lhs| by |rhs| and returns the remainder // truncated to int32. If either |rhs| is zero or |lhs| is minint and |rhs| // is -1, it returns zero. -V8_BASE_EXPORT int32_t SignedMod32(int32_t lhs, int32_t rhs); +int32_t SignedMod32(int32_t lhs, int32_t rhs); + // UnsignedAddOverflow32(lhs,rhs,val) performs an unsigned summation of |lhs| // and |rhs| and stores the result into the variable pointed to by |val| and @@ -317,16 +319,18 @@ inline uint32_t UnsignedMod32(uint32_t lhs, uint32_t rhs) { // Clamp |value| on overflow and underflow conditions. -V8_BASE_EXPORT int64_t -FromCheckedNumeric(const internal::CheckedNumeric value); +int64_t FromCheckedNumeric(const internal::CheckedNumeric value); + // SignedSaturatedAdd64(lhs, rhs) adds |lhs| and |rhs|, // checks and returns the result. -V8_BASE_EXPORT int64_t SignedSaturatedAdd64(int64_t lhs, int64_t rhs); +int64_t SignedSaturatedAdd64(int64_t lhs, int64_t rhs); + // SignedSaturatedSub64(lhs, rhs) substracts |lhs| by |rhs|, // checks and returns the result. -V8_BASE_EXPORT int64_t SignedSaturatedSub64(int64_t lhs, int64_t rhs); +int64_t SignedSaturatedSub64(int64_t lhs, int64_t rhs); + } // namespace bits } // namespace base diff --git a/src/base/cpu.h b/src/base/cpu.h index e0fcea1ca0..19d4102f5b 100644 --- a/src/base/cpu.h +++ b/src/base/cpu.h @@ -13,7 +13,6 @@ #ifndef V8_BASE_CPU_H_ #define V8_BASE_CPU_H_ -#include "src/base/base-export.h" #include "src/base/macros.h" namespace v8 { @@ -29,7 +28,7 @@ namespace base { // architectures. For each architecture the file cpu_.cc contains the // implementation of these static functions. -class V8_BASE_EXPORT CPU final { +class CPU final { public: CPU(); diff --git a/src/base/debug/stack_trace.h b/src/base/debug/stack_trace.h index 1361bb545a..e938ef2868 100644 --- a/src/base/debug/stack_trace.h +++ b/src/base/debug/stack_trace.h @@ -13,7 +13,6 @@ #include #include -#include "src/base/base-export.h" #include "src/base/build_config.h" #if V8_OS_POSIX @@ -32,8 +31,8 @@ namespace debug { // Enables stack dump to console output on exception and signals. // When enabled, the process will quit immediately. This is meant to be used in // tests only! -V8_BASE_EXPORT bool EnableInProcessStackDumping(); -V8_BASE_EXPORT void DisableSignalStackDump(); +bool EnableInProcessStackDumping(); +void DisableSignalStackDump(); // A stacktrace can be helpful in debugging. For example, you can include a // stacktrace member in a object (probably around #ifndef NDEBUG) so that you diff --git a/src/base/division-by-constant.cc b/src/base/division-by-constant.cc index 3d8fc1a4a9..5167b7a60c 100644 --- a/src/base/division-by-constant.cc +++ b/src/base/division-by-constant.cc @@ -12,6 +12,13 @@ namespace v8 { namespace base { +template +bool MagicNumbersForDivision::operator==( + const MagicNumbersForDivision& rhs) const { + return multiplier == rhs.multiplier && shift == rhs.shift && add == rhs.add; +} + + template MagicNumbersForDivision SignedDivisionByConstant(T d) { STATIC_ASSERT(static_cast(0) < static_cast(-1)); @@ -93,6 +100,9 @@ MagicNumbersForDivision UnsignedDivisionByConstant(T d, // ----------------------------------------------------------------------------- // Instantiations. +template struct MagicNumbersForDivision; +template struct MagicNumbersForDivision; + template MagicNumbersForDivision SignedDivisionByConstant(uint32_t d); template MagicNumbersForDivision SignedDivisionByConstant(uint64_t d); diff --git a/src/base/division-by-constant.h b/src/base/division-by-constant.h index d018ea5ff1..02e7e14b01 100644 --- a/src/base/division-by-constant.h +++ b/src/base/division-by-constant.h @@ -5,10 +5,6 @@ #ifndef V8_BASE_DIVISION_BY_CONSTANT_H_ #define V8_BASE_DIVISION_BY_CONSTANT_H_ -#include - -#include "src/base/base-export.h" - namespace v8 { namespace base { @@ -18,12 +14,10 @@ namespace base { // Delight", chapter 10. The template parameter must be one of the unsigned // integral types. template -struct V8_BASE_EXPORT MagicNumbersForDivision { +struct MagicNumbersForDivision { MagicNumbersForDivision(T m, unsigned s, bool a) : multiplier(m), shift(s), add(a) {} - bool operator==(const MagicNumbersForDivision& rhs) const { - return multiplier == rhs.multiplier && shift == rhs.shift && add == rhs.add; - } + bool operator==(const MagicNumbersForDivision& rhs) const; T multiplier; unsigned shift; @@ -34,29 +28,17 @@ struct V8_BASE_EXPORT MagicNumbersForDivision { // Calculate the multiplier and shift for signed division via multiplication. // The divisor must not be -1, 0 or 1 when interpreted as a signed value. template -V8_BASE_EXPORT MagicNumbersForDivision SignedDivisionByConstant(T d); +MagicNumbersForDivision SignedDivisionByConstant(T d); + // Calculate the multiplier and shift for unsigned division via multiplication, // see Warren's "Hacker's Delight", chapter 10. The divisor must not be 0 and // leading_zeros can be used to speed up the calculation if the given number of // upper bits of the dividend value are known to be zero. template -V8_BASE_EXPORT MagicNumbersForDivision UnsignedDivisionByConstant( +MagicNumbersForDivision UnsignedDivisionByConstant( T d, unsigned leading_zeros = 0); -template struct V8_BASE_EXPORT MagicNumbersForDivision; -template struct V8_BASE_EXPORT MagicNumbersForDivision; - -extern template V8_BASE_EXPORT MagicNumbersForDivision -SignedDivisionByConstant(uint32_t d); -extern template V8_BASE_EXPORT MagicNumbersForDivision -SignedDivisionByConstant(uint64_t d); - -extern template V8_BASE_EXPORT MagicNumbersForDivision -UnsignedDivisionByConstant(uint32_t d, unsigned leading_zeros); -extern template V8_BASE_EXPORT MagicNumbersForDivision -UnsignedDivisionByConstant(uint64_t d, unsigned leading_zeros); - } // namespace base } // namespace v8 diff --git a/src/base/file-utils.cc b/src/base/file-utils.cc index 31b1b41190..2262df97d0 100644 --- a/src/base/file-utils.cc +++ b/src/base/file-utils.cc @@ -10,13 +10,13 @@ #include "src/base/platform/platform.h" namespace v8 { -namespace base { +namespace internal { char* RelativePath(char** buffer, const char* exec_path, const char* name) { DCHECK(exec_path); int path_separator = static_cast(strlen(exec_path)) - 1; while (path_separator >= 0 && - !OS::isDirectorySeparator(exec_path[path_separator])) { + !base::OS::isDirectorySeparator(exec_path[path_separator])) { path_separator--; } if (path_separator >= 0) { @@ -32,5 +32,5 @@ char* RelativePath(char** buffer, const char* exec_path, const char* name) { return *buffer; } -} // namespace base +} // namespace internal } // namespace v8 diff --git a/src/base/file-utils.h b/src/base/file-utils.h index 271f0ffb05..ce9e9a1c41 100644 --- a/src/base/file-utils.h +++ b/src/base/file-utils.h @@ -2,20 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef V8_BASE_FILE_UTILS_H_ -#define V8_BASE_FILE_UTILS_H_ - -#include "src/base/base-export.h" +#ifndef V8_FILE_UTILS_H_ +#define V8_FILE_UTILS_H_ namespace v8 { -namespace base { +namespace internal { // Helper functions to manipulate file paths. -V8_BASE_EXPORT char* RelativePath(char** buffer, const char* exec_path, - const char* name); +char* RelativePath(char** buffer, const char* exec_path, const char* name); -} // namespace base +} // namespace internal } // namespace v8 #endif // V8_FILE_UTILS_H_ diff --git a/src/base/functional.h b/src/base/functional.h index 634e7bac85..ff0d8075b9 100644 --- a/src/base/functional.h +++ b/src/base/functional.h @@ -13,7 +13,6 @@ #include #include -#include "src/base/base-export.h" #include "src/base/macros.h" namespace v8 { @@ -68,7 +67,7 @@ struct hash; V8_INLINE size_t hash_combine() { return 0u; } V8_INLINE size_t hash_combine(size_t seed) { return seed; } -V8_BASE_EXPORT size_t hash_combine(size_t seed, size_t value); +size_t hash_combine(size_t seed, size_t value); template V8_INLINE size_t hash_combine(T const& v, Ts const&... vs) { return hash_combine(hash_combine(vs...), hash()(v)); @@ -92,9 +91,9 @@ V8_BASE_HASH_VALUE_TRIVIAL(unsigned char) V8_BASE_HASH_VALUE_TRIVIAL(unsigned short) // NOLINT(runtime/int) #undef V8_BASE_HASH_VALUE_TRIVIAL -V8_BASE_EXPORT size_t hash_value(unsigned int); -V8_BASE_EXPORT size_t hash_value(unsigned long); // NOLINT(runtime/int) -V8_BASE_EXPORT size_t hash_value(unsigned long long); // NOLINT(runtime/int) +size_t hash_value(unsigned int); +size_t hash_value(unsigned long); // NOLINT(runtime/int) +size_t hash_value(unsigned long long); // NOLINT(runtime/int) #define V8_BASE_HASH_VALUE_SIGNED(type) \ V8_INLINE size_t hash_value(signed type v) { \ diff --git a/src/base/ieee754.h b/src/base/ieee754.h index 72f3db15ef..80523a1414 100644 --- a/src/base/ieee754.h +++ b/src/base/ieee754.h @@ -5,75 +5,73 @@ #ifndef V8_BASE_IEEE754_H_ #define V8_BASE_IEEE754_H_ -#include "src/base/base-export.h" - namespace v8 { namespace base { namespace ieee754 { // Returns the arc cosine of |x|; that is the value whose cosine is |x|. -V8_BASE_EXPORT double acos(double x); +double acos(double x); // Returns the inverse hyperbolic cosine of |x|; that is the value whose // hyperbolic cosine is |x|. -V8_BASE_EXPORT double acosh(double x); +double acosh(double x); // Returns the arc sine of |x|; that is the value whose sine is |x|. -V8_BASE_EXPORT double asin(double x); +double asin(double x); // Returns the inverse hyperbolic sine of |x|; that is the value whose // hyperbolic sine is |x|. -V8_BASE_EXPORT double asinh(double x); +double asinh(double x); // Returns the principal value of the arc tangent of |x|; that is the value // whose tangent is |x|. -V8_BASE_EXPORT double atan(double x); +double atan(double x); // Returns the principal value of the arc tangent of |y/x|, using the signs of // the two arguments to determine the quadrant of the result. -V8_BASE_EXPORT double atan2(double y, double x); +double atan2(double y, double x); // Returns the cosine of |x|, where |x| is given in radians. -V8_BASE_EXPORT double cos(double x); +double cos(double x); // Returns the base-e exponential of |x|. -V8_BASE_EXPORT double exp(double x); +double exp(double x); -V8_BASE_EXPORT double atanh(double x); +double atanh(double x); // Returns the natural logarithm of |x|. -V8_BASE_EXPORT double log(double x); +double log(double x); // Returns a value equivalent to |log(1+x)|, but computed in a way that is // accurate even if the value of |x| is near zero. -V8_BASE_EXPORT double log1p(double x); +double log1p(double x); // Returns the base 2 logarithm of |x|. -V8_BASE_EXPORT double log2(double x); +double log2(double x); // Returns the base 10 logarithm of |x|. -V8_BASE_EXPORT double log10(double x); +double log10(double x); // Returns the cube root of |x|. -V8_BASE_EXPORT double cbrt(double x); +double cbrt(double x); // Returns exp(x)-1, the exponential of |x| minus 1. -V8_BASE_EXPORT double expm1(double x); +double expm1(double x); // Returns the sine of |x|, where |x| is given in radians. -V8_BASE_EXPORT double sin(double x); +double sin(double x); // Returns the tangent of |x|, where |x| is given in radians. -V8_BASE_EXPORT double tan(double x); +double tan(double x); // Returns the hyperbolic cosine of |x|, where |x| is given radians. -V8_BASE_EXPORT double cosh(double x); +double cosh(double x); // Returns the hyperbolic sine of |x|, where |x| is given radians. -V8_BASE_EXPORT double sinh(double x); +double sinh(double x); // Returns the hyperbolic tangent of |x|, where |x| is given radians. -V8_BASE_EXPORT double tanh(double x); +double tanh(double x); } // namespace ieee754 } // namespace base diff --git a/src/base/logging.h b/src/base/logging.h index 7bbb82a485..50fceca88b 100644 --- a/src/base/logging.h +++ b/src/base/logging.h @@ -9,11 +9,10 @@ #include #include -#include "src/base/base-export.h" #include "src/base/build_config.h" #include "src/base/compiler-specific.h" -extern "C" PRINTF_FORMAT(3, 4) V8_NORETURN V8_BASE_EXPORT +extern "C" PRINTF_FORMAT(3, 4) V8_NORETURN void V8_Fatal(const char* file, int line, const char* format, ...); // The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during @@ -88,8 +87,8 @@ std::string* MakeCheckOpString(Lhs const& lhs, Rhs const& rhs, // Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated // in logging.cc. -#define DEFINE_MAKE_CHECK_OP_STRING(type) \ - extern template V8_BASE_EXPORT std::string* MakeCheckOpString( \ +#define DEFINE_MAKE_CHECK_OP_STRING(type) \ + extern template std::string* MakeCheckOpString( \ type const&, type const&, char const*); DEFINE_MAKE_CHECK_OP_STRING(int) DEFINE_MAKE_CHECK_OP_STRING(long) // NOLINT(runtime/int) @@ -118,11 +117,10 @@ DEFINE_MAKE_CHECK_OP_STRING(void const*) char const* msg) { \ return V8_LIKELY(lhs op rhs) ? nullptr : MakeCheckOpString(lhs, rhs, msg); \ } \ - extern template V8_BASE_EXPORT std::string* Check##NAME##Impl( \ + extern template std::string* Check##NAME##Impl( \ float const& lhs, float const& rhs, char const* msg); \ - extern template V8_BASE_EXPORT std::string* \ - Check##NAME##Impl(double const& lhs, double const& rhs, \ - char const* msg); + extern template std::string* Check##NAME##Impl( \ + double const& lhs, double const& rhs, char const* msg); DEFINE_CHECK_OP_IMPL(EQ, ==) DEFINE_CHECK_OP_IMPL(NE, !=) DEFINE_CHECK_OP_IMPL(LE, <=) diff --git a/src/base/once.h b/src/base/once.h index 8008812d75..790a8866e0 100644 --- a/src/base/once.h +++ b/src/base/once.h @@ -55,7 +55,6 @@ #include #include "src/base/atomicops.h" -#include "src/base/base-export.h" namespace v8 { namespace base { @@ -80,8 +79,7 @@ struct OneArgFunction { typedef void (*type)(T); }; -V8_BASE_EXPORT void CallOnceImpl(OnceType* once, PointerArgFunction init_func, - void* arg); +void CallOnceImpl(OnceType* once, PointerArgFunction init_func, void* arg); inline void CallOnce(OnceType* once, NoArgFunction init_func) { if (Acquire_Load(once) != ONCE_STATE_DONE) { diff --git a/src/base/platform/condition-variable.h b/src/base/platform/condition-variable.h index 48e7c369ca..72d6f28507 100644 --- a/src/base/platform/condition-variable.h +++ b/src/base/platform/condition-variable.h @@ -5,7 +5,6 @@ #ifndef V8_BASE_PLATFORM_CONDITION_VARIABLE_H_ #define V8_BASE_PLATFORM_CONDITION_VARIABLE_H_ -#include "src/base/base-export.h" #include "src/base/lazy-instance.h" #include "src/base/platform/mutex.h" @@ -29,7 +28,7 @@ class TimeDelta; // the mutex and suspend the execution of the calling thread. When the condition // variable is notified, the thread is awakened, and the mutex is reacquired. -class V8_BASE_EXPORT ConditionVariable final { +class ConditionVariable final { public: ConditionVariable(); ~ConditionVariable(); diff --git a/src/base/platform/mutex.h b/src/base/platform/mutex.h index e7231bdd9e..61df19d66a 100644 --- a/src/base/platform/mutex.h +++ b/src/base/platform/mutex.h @@ -5,7 +5,6 @@ #ifndef V8_BASE_PLATFORM_MUTEX_H_ #define V8_BASE_PLATFORM_MUTEX_H_ -#include "src/base/base-export.h" #include "src/base/lazy-instance.h" #if V8_OS_WIN #include "src/base/win32-headers.h" @@ -34,7 +33,7 @@ namespace base { // |TryLock()|. The behavior of a program is undefined if a mutex is destroyed // while still owned by some thread. The Mutex class is non-copyable. -class V8_BASE_EXPORT Mutex final { +class Mutex final { public: Mutex(); ~Mutex(); @@ -128,7 +127,7 @@ typedef LazyStaticInstance, // The behavior of a program is undefined if a recursive mutex is destroyed // while still owned by some thread. The RecursiveMutex class is non-copyable. -class V8_BASE_EXPORT RecursiveMutex final { +class RecursiveMutex final { public: RecursiveMutex(); ~RecursiveMutex(); diff --git a/src/base/platform/platform.h b/src/base/platform/platform.h index 5d570e7048..d3b6c9c1cf 100644 --- a/src/base/platform/platform.h +++ b/src/base/platform/platform.h @@ -25,7 +25,6 @@ #include #include -#include "src/base/base-export.h" #include "src/base/build_config.h" #include "src/base/compiler-specific.h" #include "src/base/platform/mutex.h" @@ -70,7 +69,7 @@ inline intptr_t InternalGetExistingThreadLocal(intptr_t index) { #define V8_FAST_TLS_SUPPORTED 1 -extern V8_BASE_EXPORT intptr_t kMacTlsBaseOffset; +extern intptr_t kMacTlsBaseOffset; INLINE(intptr_t InternalGetExistingThreadLocal(intptr_t index)); @@ -103,7 +102,7 @@ class TimezoneCache; // functions. Add methods here to cope with differences between the // supported platforms. -class V8_BASE_EXPORT OS { +class OS { public: // Initialize the OS class. // - random_seed: Used for the GetRandomMmapAddress() if non-zero. @@ -212,7 +211,7 @@ class V8_BASE_EXPORT OS { char text[kStackWalkMaxTextLen]; }; - class V8_BASE_EXPORT MemoryMappedFile { + class MemoryMappedFile { public: virtual ~MemoryMappedFile() {} virtual void* memory() const = 0; @@ -287,7 +286,7 @@ class V8_BASE_EXPORT OS { // Control of the reserved memory can be assigned to another VirtualMemory // object by assignment or copy-contructing. This removes the reserved memory // from the original object. -class V8_BASE_EXPORT VirtualMemory { +class VirtualMemory { public: // Empty VirtualMemory object, controlling no reserved memory. VirtualMemory(); @@ -419,7 +418,7 @@ class V8_BASE_EXPORT VirtualMemory { // thread. The Thread object should not be deallocated before the thread has // terminated. -class V8_BASE_EXPORT Thread { +class Thread { public: // Opaque data type for thread-local storage keys. typedef int32_t LocalStorageKey; diff --git a/src/base/platform/semaphore.h b/src/base/platform/semaphore.h index 31aeca3d9b..39029c83fc 100644 --- a/src/base/platform/semaphore.h +++ b/src/base/platform/semaphore.h @@ -5,7 +5,6 @@ #ifndef V8_BASE_PLATFORM_SEMAPHORE_H_ #define V8_BASE_PLATFORM_SEMAPHORE_H_ -#include "src/base/base-export.h" #include "src/base/lazy-instance.h" #if V8_OS_WIN #include "src/base/win32-headers.h" @@ -32,7 +31,7 @@ class TimeDelta; // count reaches zero, threads waiting for the semaphore blocks until the // count becomes non-zero. -class V8_BASE_EXPORT Semaphore final { +class Semaphore final { public: explicit Semaphore(int count); ~Semaphore(); diff --git a/src/base/platform/time.h b/src/base/platform/time.h index ed1751268f..be62014f91 100644 --- a/src/base/platform/time.h +++ b/src/base/platform/time.h @@ -9,7 +9,6 @@ #include #include -#include "src/base/base-export.h" #include "src/base/bits.h" #include "src/base/macros.h" #include "src/base/safe_math.h" @@ -43,7 +42,7 @@ class TimeBase; // This class represents a duration of time, internally represented in // microseonds. -class V8_BASE_EXPORT TimeDelta final { +class TimeDelta final { public: TimeDelta() : delta_(0) {} @@ -278,7 +277,7 @@ class TimeBase { // This class represents an absolute point in time, internally represented as // microseconds (s/1,000,000) since 00:00:00 UTC, January 1, 1970. -class V8_BASE_EXPORT Time final : public time_internal::TimeBase