Skip to content

Commit 44be6b5

Browse files
committed
Upgrade V8 to 7.5.288.22
1 parent cc355eb commit 44be6b5

142 files changed

Lines changed: 49806 additions & 47862 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"v8Version": "7.4.288.25",
3-
"mksnapshotParams": "--profile_deserialization --turbo_instruction_scheduling"
2+
"v8Version": "7.5.288.22",
3+
"mksnapshotParams": "--profile_deserialization --turbo_instruction_scheduling --target_os=android --no-native-code-counters"
44
}
587 KB
Binary file not shown.
667 KB
Binary file not shown.
745 KB
Binary file not shown.

test-app/runtime/CMakeLists.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,7 @@ MESSAGE(STATUS "# CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS})
201201
# Command info: https://cmake.org/cmake/help/v3.4/command/target_link_libraries.html
202202
# linking v8 and custom STL libraries to the runtime (NativeScript library)
203203
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libzip.a)
204-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_base.a)
205-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_external_snapshot.a)
206-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_init.a)
207-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_initializers.a)
208-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libplatform.a)
209-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libsampler.a)
210-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8_libbase.a)
211-
212-
# This is the custom STL produced during the V8 build
213-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libc++.a)
214-
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libc++abi.a)
204+
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8.a)
215205

216206
if("${ANDROID_ABI}" MATCHES "armeabi-v7a" OR "${ANDROID_ABI}" MATCHES "x86")
217207
# On API Level 19 and lower we need to link with android_support

test-app/runtime/src/main/cpp/include/libc++/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ if(LIBCXX_INSTALL_SUPPORT_HEADERS)
183183
support/xlocale/__nop_locale_mgmt.h
184184
support/xlocale/__posix_l_fallback.h
185185
support/xlocale/__strtonum_fallback.h
186-
support/xlocale/xlocale.h
187186
)
188187
endif()
189188

test-app/runtime/src/main/cpp/include/libc++/__config

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
# define _LIBCPP_ABI_VERSION 1
3939
#endif
4040

41+
#ifndef __STDC_HOSTED__
42+
# define _LIBCPP_FREESTANDING
43+
#endif
44+
4145
#ifndef _LIBCPP_STD_VER
4246
# if __cplusplus <= 201103L
4347
# define _LIBCPP_STD_VER 11
@@ -92,10 +96,12 @@
9296
// Enable optimized version of __do_get_(un)signed which avoids redundant copies.
9397
# define _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
9498
// Use the smallest possible integer type to represent the index of the variant.
95-
// Previously libc++ used "unsigned int" exclusivly.
99+
// Previously libc++ used "unsigned int" exclusively.
96100
# define _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
97101
// Unstable attempt to provide a more optimized std::function
98102
# define _LIBCPP_ABI_OPTIMIZED_FUNCTION
103+
// All the regex constants must be distinct and nonzero.
104+
# define _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
99105
#elif _LIBCPP_ABI_VERSION == 1
100106
# if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
101107
// Enable compiling copies of now inline methods into the dylib to support
@@ -200,6 +206,10 @@
200206
# endif
201207
#endif
202208

209+
#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
210+
# define _LIBCPP_ABI_VCRUNTIME
211+
#endif
212+
203213
// Need to detect which libc we're using if we're on Linux.
204214
#if defined(__linux__)
205215
# include <features.h>
@@ -256,7 +266,7 @@
256266
# define _LIBCPP_WIN32API
257267
# define _LIBCPP_LITTLE_ENDIAN
258268
# define _LIBCPP_SHORT_WCHAR 1
259-
// Both MinGW and native MSVC provide a "MSVC"-like enviroment
269+
// Both MinGW and native MSVC provide a "MSVC"-like environment
260270
# define _LIBCPP_MSVCRT_LIKE
261271
// If mingw not explicitly detected, assume using MS C runtime only if
262272
// a MS compatibility version is specified.
@@ -776,7 +786,7 @@ typedef __char32_t char32_t;
776786
#else
777787
// Try to approximate the effect of exclude_from_explicit_instantiation
778788
// (which is that entities are not assumed to be provided by explicit
779-
// template instantitations in the dylib) by always inlining those entities.
789+
// template instantiations in the dylib) by always inlining those entities.
780790
# define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE
781791
#endif
782792

@@ -842,22 +852,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
842852
# define _NOEXCEPT_(x)
843853
#endif
844854

845-
#if defined(_LIBCPP_DEBUG_USE_EXCEPTIONS)
846-
# if !defined(_LIBCPP_DEBUG)
847-
# error cannot use _LIBCPP_DEBUG_USE_EXCEPTIONS unless _LIBCPP_DEBUG is defined
848-
# endif
849-
# ifdef _LIBCPP_HAS_NO_NOEXCEPT
850-
# define _NOEXCEPT_DEBUG
851-
# define _NOEXCEPT_DEBUG_(x)
852-
# else
853-
# define _NOEXCEPT_DEBUG noexcept(false)
854-
# define _NOEXCEPT_DEBUG_(x) noexcept(false)
855-
# endif
856-
#else
857-
# define _NOEXCEPT_DEBUG _NOEXCEPT
858-
# define _NOEXCEPT_DEBUG_(x) _NOEXCEPT_(x)
859-
#endif
860-
861855
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
862856
typedef unsigned short char16_t;
863857
typedef unsigned int char32_t;
@@ -910,9 +904,9 @@ template <unsigned> struct __static_assert_check {};
910904
#endif
911905

912906
#ifdef __GNUC__
913-
# define _NOALIAS __attribute__((__malloc__))
907+
# define _LIBCPP_NOALIAS __attribute__((__malloc__))
914908
#else
915-
# define _NOALIAS
909+
# define _LIBCPP_NOALIAS
916910
#endif
917911

918912
#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) || \
@@ -985,16 +979,12 @@ template <unsigned> struct __static_assert_check {};
985979
#define _DECLARE_C99_LDBL_MATH 1
986980
#endif
987981

988-
#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
989-
# define _LIBCPP_DEFER_NEW_TO_VCRUNTIME
990-
#endif
991-
992982
// If we are getting operator new from the MSVC CRT, then allocation overloads
993983
// for align_val_t were added in 19.12, aka VS 2017 version 15.3.
994984
#if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912
995985
# define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
996-
#elif defined(_LIBCPP_DEFER_NEW_TO_VCRUNTIME) && !defined(__cpp_aligned_new)
997-
// We're defering to Microsoft's STL to provide aligned new et al. We don't
986+
#elif defined(_LIBCPP_ABI_VCRUNTIME) && !defined(__cpp_aligned_new)
987+
// We're deferring to Microsoft's STL to provide aligned new et al. We don't
998988
// have it unless the language feature test macro is defined.
999989
# define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
1000990
#endif
@@ -1025,8 +1015,10 @@ template <unsigned> struct __static_assert_check {};
10251015
#endif
10261016

10271017
// Deprecation macros.
1028-
// Deprecations warnings are only enabled when _LIBCPP_ENABLE_DEPRECATION_WARNINGS is defined.
1029-
#if defined(_LIBCPP_ENABLE_DEPRECATION_WARNINGS)
1018+
//
1019+
// Deprecations warnings are always enabled, except when users explicitly opt-out
1020+
// by defining _LIBCPP_DISABLE_DEPRECATION_WARNINGS.
1021+
#if !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
10301022
# if __has_attribute(deprecated)
10311023
# define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
10321024
# elif _LIBCPP_STD_VER > 11
@@ -1220,9 +1212,18 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
12201212
# define _LIBCPP_HAS_GCC_ATOMIC_IMP
12211213
#endif
12221214

1223-
#if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)) \
1215+
#if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && \
1216+
!defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) && \
1217+
!defined(_LIBCPP_HAS_EXTERNAL_ATOMIC_IMP)) \
12241218
|| defined(_LIBCPP_HAS_NO_THREADS)
1225-
#define _LIBCPP_HAS_NO_ATOMIC_HEADER
1219+
# define _LIBCPP_HAS_NO_ATOMIC_HEADER
1220+
#else
1221+
# ifndef _LIBCPP_ATOMIC_FLAG_TYPE
1222+
# define _LIBCPP_ATOMIC_FLAG_TYPE bool
1223+
# endif
1224+
# ifdef _LIBCPP_FREESTANDING
1225+
# define _LIBCPP_ATOMIC_ONLY_USE_BUILTINS
1226+
# endif
12261227
#endif
12271228

12281229
#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
@@ -1312,7 +1313,8 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
13121313
#if !defined(_LIBCPP_BUILDING_LIBRARY) && \
13131314
!defined(_LIBCPP_DISABLE_AVAILABILITY) && \
13141315
__has_feature(attribute_availability_with_strict) && \
1315-
__has_feature(attribute_availability_in_templates)
1316+
__has_feature(attribute_availability_in_templates) && \
1317+
__has_extension(pragma_clang_attribute_external_declaration)
13161318
# ifdef __APPLE__
13171319
# define _LIBCPP_USE_AVAILABILITY_APPLE
13181320
# endif
@@ -1355,6 +1357,21 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
13551357
# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \
13561358
__attribute__((availability(macosx,strict,introduced=10.9))) \
13571359
__attribute__((availability(ios,strict,introduced=7.0)))
1360+
# define _LIBCPP_AVAILABILITY_FILESYSTEM \
1361+
__attribute__((availability(macosx,strict,unavailable))) \
1362+
__attribute__((availability(ios,strict,unavailable))) \
1363+
__attribute__((availability(tvos,strict,unavailable))) \
1364+
__attribute__((availability(watchos,strict,unavailable)))
1365+
# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \
1366+
_Pragma("clang attribute push(__attribute__((availability(macosx,strict,unavailable))), apply_to=any(function,record))") \
1367+
_Pragma("clang attribute push(__attribute__((availability(ios,strict,unavailable))), apply_to=any(function,record))") \
1368+
_Pragma("clang attribute push(__attribute__((availability(tvos,strict,unavailable))), apply_to=any(function,record))") \
1369+
_Pragma("clang attribute push(__attribute__((availability(watchos,strict,unavailable))), apply_to=any(function,record))")
1370+
# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \
1371+
_Pragma("clang attribute pop") \
1372+
_Pragma("clang attribute pop") \
1373+
_Pragma("clang attribute pop") \
1374+
_Pragma("clang attribute pop")
13581375
#else
13591376
# define _LIBCPP_AVAILABILITY_SHARED_MUTEX
13601377
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
@@ -1366,6 +1383,9 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
13661383
# define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
13671384
# define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
13681385
# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
1386+
# define _LIBCPP_AVAILABILITY_FILESYSTEM
1387+
# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
1388+
# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP
13691389
#endif
13701390

13711391
// Define availability that depends on _LIBCPP_NO_EXCEPTIONS.

test-app/runtime/src/main/cpp/include/libc++/__debug

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#define _LIBCPP_DEBUG_H
1212

1313
#include <__config>
14+
#include <iosfwd>
1415

1516
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1617
#pragma GCC system_header
@@ -24,7 +25,6 @@
2425
# include <cstdlib>
2526
# include <cstdio>
2627
# include <cstddef>
27-
# include <exception>
2828
#endif
2929

3030
#if _LIBCPP_DEBUG_LEVEL >= 1 && !defined(_LIBCPP_ASSERT)
@@ -49,10 +49,6 @@
4949
#define _LIBCPP_DEBUG_MODE(...) ((void)0)
5050
#endif
5151

52-
#if _LIBCPP_DEBUG_LEVEL < 1
53-
class _LIBCPP_EXCEPTION_ABI __libcpp_debug_exception;
54-
#endif
55-
5652
_LIBCPP_BEGIN_NAMESPACE_STD
5753

5854
struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
@@ -62,6 +58,9 @@ struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
6258
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
6359
__libcpp_debug_info(const char* __f, int __l, const char* __p, const char* __m)
6460
: __file_(__f), __line_(__l), __pred_(__p), __msg_(__m) {}
61+
62+
_LIBCPP_FUNC_VIS std::string what() const;
63+
6564
const char* __file_;
6665
int __line_;
6766
const char* __pred_;
@@ -79,38 +78,11 @@ extern _LIBCPP_EXPORTED_FROM_ABI __libcpp_debug_function_type __libcpp_debug_fun
7978
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
8079
void __libcpp_abort_debug_function(__libcpp_debug_info const&);
8180

82-
/// __libcpp_throw_debug_function - A debug handler that throws
83-
/// an instance of __libcpp_debug_exception when called.
84-
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
85-
void __libcpp_throw_debug_function(__libcpp_debug_info const&);
86-
8781
/// __libcpp_set_debug_function - Set the debug handler to the specified
8882
/// function.
8983
_LIBCPP_FUNC_VIS
9084
bool __libcpp_set_debug_function(__libcpp_debug_function_type __func);
9185

92-
// Setup the throwing debug handler during dynamic initialization.
93-
#if _LIBCPP_DEBUG_LEVEL >= 1 && defined(_LIBCPP_DEBUG_USE_EXCEPTIONS)
94-
# if defined(_LIBCPP_NO_EXCEPTIONS)
95-
# error _LIBCPP_DEBUG_USE_EXCEPTIONS cannot be used when exceptions are disabled.
96-
# endif
97-
static bool __init_dummy = __libcpp_set_debug_function(__libcpp_throw_debug_function);
98-
#endif
99-
100-
#if _LIBCPP_DEBUG_LEVEL >= 1 || defined(_LIBCPP_BUILDING_LIBRARY)
101-
class _LIBCPP_EXCEPTION_ABI __libcpp_debug_exception : public exception {
102-
public:
103-
__libcpp_debug_exception() _NOEXCEPT;
104-
explicit __libcpp_debug_exception(__libcpp_debug_info const& __i);
105-
__libcpp_debug_exception(__libcpp_debug_exception const&);
106-
~__libcpp_debug_exception() _NOEXCEPT;
107-
const char* what() const _NOEXCEPT;
108-
private:
109-
struct __libcpp_debug_exception_imp;
110-
__libcpp_debug_exception_imp *__imp_;
111-
};
112-
#endif
113-
11486
#if _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY)
11587

11688
struct _LIBCPP_TYPE_VIS __c_node;
@@ -250,16 +222,22 @@ public:
250222
__db_c_const_iterator __c_end() const;
251223
__db_i_const_iterator __i_end() const;
252224

225+
typedef __c_node*(_InsertConstruct)(void*, void*, __c_node*);
226+
227+
template <class _Cont>
228+
_LIBCPP_INLINE_VISIBILITY static __c_node* __create_C_node(void *__mem, void *__c, __c_node *__next) {
229+
return ::new(__mem) _C_node<_Cont>(__c, __next);
230+
}
231+
253232
template <class _Cont>
254233
_LIBCPP_INLINE_VISIBILITY
255234
void __insert_c(_Cont* __c)
256235
{
257-
__c_node* __n = __insert_c(static_cast<void*>(__c));
258-
::new(__n) _C_node<_Cont>(__n->__c_, __n->__next_);
236+
__insert_c(static_cast<void*>(__c), &__create_C_node<_Cont>);
259237
}
260238

261239
void __insert_i(void* __i);
262-
__c_node* __insert_c(void* __c);
240+
void __insert_c(void* __c, _InsertConstruct* __fn);
263241
void __erase_c(void* __c);
264242

265243
void __insert_ic(void* __i, const void* __c);

test-app/runtime/src/main/cpp/include/libc++/__hash_table

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -875,9 +875,9 @@ struct __enforce_unordered_container_requirements {
875875
template <class _Key, class _Hash, class _Equal>
876876
#ifndef _LIBCPP_CXX03_LANG
877877
_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Equal const&, _Key const&, _Key const&>::value,
878-
"the specified comparator type does not provide a const call operator")
878+
"the specified comparator type does not provide a viable const call operator")
879879
_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Hash const&, _Key const&>::value,
880-
"the specified hash functor does not provide a const call operator")
880+
"the specified hash functor does not provide a viable const call operator")
881881
#endif
882882
typename __enforce_unordered_container_requirements<_Key, _Hash, _Equal>::type
883883
__diagnose_unordered_container_requirements(int);
@@ -1260,15 +1260,15 @@ public:
12601260

12611261
void swap(__hash_table& __u)
12621262
#if _LIBCPP_STD_VER <= 11
1263-
_NOEXCEPT_DEBUG_(
1263+
_NOEXCEPT_(
12641264
__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
12651265
&& (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
12661266
|| __is_nothrow_swappable<__pointer_allocator>::value)
12671267
&& (!__node_traits::propagate_on_container_swap::value
12681268
|| __is_nothrow_swappable<__node_allocator>::value)
12691269
);
12701270
#else
1271-
_NOEXCEPT_DEBUG_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value);
1271+
_NOEXCEPT_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value);
12721272
#endif
12731273

12741274
_LIBCPP_INLINE_VISIBILITY
@@ -2807,15 +2807,15 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
28072807
void
28082808
__hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
28092809
#if _LIBCPP_STD_VER <= 11
2810-
_NOEXCEPT_DEBUG_(
2810+
_NOEXCEPT_(
28112811
__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
28122812
&& (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
28132813
|| __is_nothrow_swappable<__pointer_allocator>::value)
28142814
&& (!__node_traits::propagate_on_container_swap::value
28152815
|| __is_nothrow_swappable<__node_allocator>::value)
28162816
)
28172817
#else
2818-
_NOEXCEPT_DEBUG_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value)
2818+
_NOEXCEPT_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value)
28192819
#endif
28202820
{
28212821
_LIBCPP_ASSERT(__node_traits::propagate_on_container_swap::value ||

0 commit comments

Comments
 (0)