Skip to content

Commit 400db05

Browse files
authored
Merge pull request #1580 from NativeScript/darind/v8-8.0.426.16
feat: Upgrade V8 to 8.0.426.16
2 parents 0c81921 + 895be42 commit 400db05

File tree

174 files changed

+71386
-72004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+71386
-72004
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
env:
22
global:
33
- NODE_VERSION=10
4-
- NDK_VERSION=r20
4+
- NDK_VERSION=r21
55
- DATE=$(date +%Y-%m-%d)
66
- PACKAGE_VERSION=next-$DATE-$TRAVIS_BUILD_NUMBER
77
- EMULATOR_API_LEVEL=21

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
6.5.0
2+
==
3+
4+
## What's New
5+
6+
- [Upgrade v8 to 8.0.426.16 (#1579)](https://github.com/NativeScript/android-runtime/issues/1579)
7+
18
6.4.0
29
==
310

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"v8Version": "7.9.317.31",
3-
"ndkRevision": "20.0.5594570",
2+
"v8Version": "8.0.426.16",
3+
"ndkRevision": "21.0.6113669",
44
"mksnapshotParams": "--profile_deserialization --turbo_instruction_scheduling --target_os=android --no-native-code-counters"
55
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"version": "5.4.1",
1414
"android": "3.5.3"
1515
},
16-
"android_ndk_version": "20"
16+
"android_ndk_version": "21"
1717
}

test-app/runtime/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ endif (CCACHE_FOUND AND (USE_CCACHE))
1616
# "-DANDROID_STL=c++_static" is just not enough for clang++ to find some libraries in the ndk
1717
MESSAGE(STATUS "## ANDROID_NDK_ROOT: " ${ANDROID_NDK_ROOT})
1818

19-
set(COMMON_CMAKE_ARGUMENTS "-nostdinc++ -std=c++14 -Werror -Wno-unused-result -mstackrealign -fexceptions -fno-builtin-stpcpy -fno-rtti -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE")
19+
set(COMMON_CMAKE_ARGUMENTS "-nostdinc++ -std=c++14 -Werror -Wno-unused-result -mstackrealign -fexceptions -fno-builtin-stpcpy -fno-rtti -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_EMBEDDED_BUILTINS")
20+
21+
if("${ANDROID_ABI}" MATCHES "arm64-v8a$" OR "${ANDROID_ABI}" MATCHES "x86_64$")
22+
# Enable pointer compression on 64 bit platforms
23+
set(COMMON_CMAKE_ARGUMENTS "${COMMON_CMAKE_ARGUMENTS} -DV8_COMPRESS_POINTERS")
24+
endif()
2025

2126
# AOSP has switched to using LLD by default and the NDK will use it by default in the next release.
2227
# BFD and Gold will be removed once LLD has been through a release cycle with no major unresolved issues (estimated r21)
@@ -89,7 +94,6 @@ if (NOT OPTIMIZED_BUILD OR OPTIMIZED_WITH_INSPECTOR_BUILD)
8994
src/main/cpp/v8_inspector/src/inspector/v8-overlay-agent-impl.cpp
9095
src/main/cpp/v8_inspector/src/inspector/v8-page-agent-impl.cpp
9196

92-
src/main/cpp/v8_inspector/third_party/inspector_protocol/encoding/encoding.cc
9397
src/main/cpp/v8_inspector/src/inspector/custom-preview.cc
9498
src/main/cpp/v8_inspector/src/inspector/injected-script.cc
9599
src/main/cpp/v8_inspector/src/inspector/inspected-context.cc
@@ -105,7 +109,6 @@ if (NOT OPTIMIZED_BUILD OR OPTIMIZED_WITH_INSPECTOR_BUILD)
105109
src/main/cpp/v8_inspector/src/inspector/v8-debugger-script.cc
106110
src/main/cpp/v8_inspector/src/inspector/v8-heap-profiler-agent-impl.cc
107111
src/main/cpp/v8_inspector/src/inspector/v8-inspector-impl.cc
108-
src/main/cpp/v8_inspector/src/inspector/v8-inspector-protocol-encoding.cc
109112
src/main/cpp/v8_inspector/src/inspector/v8-inspector-session-impl.cc
110113
src/main/cpp/v8_inspector/src/inspector/v8-profiler-agent-impl.cc
111114
src/main/cpp/v8_inspector/src/inspector/v8-regex.cc

test-app/runtime/src/main/cpp/Profiler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,13 @@ bool Profiler::Write(CpuProfile* cpuProfile) {
147147
ss << "RegExp_" << scriptName << "_" << lineNumber << "_" << columnNumber;
148148
funcName = ss.str();
149149
}
150-
snprintf(buff, sizeof(buff), "{\"functionName\":\"%s\",\"scriptId\":%d,\"url\":\"%s\",\"lineNumber\":%d,\"columnNumber\":%d,\"hitCount\":%u,\"callUID\":%u,\"deoptReason\":\"%s\",\"id\":%u,\"children\":[",
150+
snprintf(buff, sizeof(buff), "{\"functionName\":\"%s\",\"scriptId\":%d,\"url\":\"%s\",\"lineNumber\":%d,\"columnNumber\":%d,\"hitCount\":%u,\"deoptReason\":\"%s\",\"id\":%u,\"children\":[",
151151
funcName.c_str(),
152152
node->GetScriptId(),
153153
scriptName.c_str(),
154154
lineNumber,
155155
columnNumber,
156156
node->GetHitCount(),
157-
node->GetCallUid(),
158157
node->GetBailoutReason(),
159158
node->GetNodeId());
160159
fwrite(buff, sizeof(char), strlen(buff), fp);

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

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,10 @@ set(files
6262
deque
6363
errno.h
6464
exception
65+
execution
6566
experimental/__config
6667
experimental/__memory
6768
experimental/algorithm
68-
experimental/any
69-
experimental/chrono
7069
experimental/coroutine
7170
experimental/deque
7271
experimental/filesystem
@@ -76,17 +75,11 @@ set(files
7675
experimental/list
7776
experimental/map
7877
experimental/memory_resource
79-
experimental/numeric
80-
experimental/optional
8178
experimental/propagate_const
82-
experimental/ratio
8379
experimental/regex
8480
experimental/set
8581
experimental/simd
8682
experimental/string
87-
experimental/string_view
88-
experimental/system_error
89-
experimental/tuple
9083
experimental/type_traits
9184
experimental/unordered_map
9285
experimental/unordered_set
@@ -208,6 +201,14 @@ else()
208201
)
209202
endif()
210203

204+
# In some build configurations (like bootstrapping clang), we need to be able to
205+
# install the libcxx headers before the CMake configuration for libcxx runs. Making
206+
# the name of this target configurable allows LLVM/runtimes/CMakeLists.txt to
207+
# add this subdirectory to the LLVM build to put libcxx's headers in place
208+
# before libcxx's build configuration is run.
209+
if (NOT CXX_HEADER_TARGET)
210+
set(CXX_HEADER_TARGET cxx-headers)
211+
endif()
211212
if(NOT LIBCXX_USING_INSTALLED_LLVM AND LIBCXX_HEADER_DIR)
212213
set(output_dir ${LIBCXX_HEADER_DIR}/include/c++/v1)
213214

@@ -233,18 +234,18 @@ if(NOT LIBCXX_USING_INSTALLED_LLVM AND LIBCXX_HEADER_DIR)
233234
list(APPEND out_files ${dst})
234235
endif()
235236

236-
add_custom_target(cxx-headers ALL DEPENDS ${out_files} ${LIBCXX_CXX_ABI_HEADER_TARGET})
237+
add_custom_target(${CXX_HEADER_TARGET} ALL DEPENDS ${out_files} ${LIBCXX_CXX_ABI_HEADER_TARGET})
237238
else()
238-
add_custom_target(cxx-headers)
239+
add_custom_target(${CXX_HEADER_TARGET})
239240
endif()
240-
set_target_properties(cxx-headers PROPERTIES FOLDER "Misc")
241+
set_target_properties(${CXX_HEADER_TARGET} PROPERTIES FOLDER "Misc")
241242

242243
if (LIBCXX_INSTALL_HEADERS)
243244
foreach(file ${files})
244245
get_filename_component(dir ${file} DIRECTORY)
245246
install(FILES ${file}
246247
DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
247-
COMPONENT cxx-headers
248+
COMPONENT ${CXX_HEADER_TARGET}
248249
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
249250
)
250251
endforeach()
@@ -255,19 +256,19 @@ if (LIBCXX_INSTALL_HEADERS)
255256
DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1
256257
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
257258
RENAME __config
258-
COMPONENT cxx-headers)
259+
COMPONENT ${CXX_HEADER_TARGET})
259260
endif()
260261

261262
if (NOT CMAKE_CONFIGURATION_TYPES)
262-
add_custom_target(install-cxx-headers
263-
DEPENDS cxx-headers ${generated_config_deps}
263+
add_custom_target(install-${CXX_HEADER_TARGET}
264+
DEPENDS ${CXX_HEADER_TARGET} ${generated_config_deps}
264265
COMMAND "${CMAKE_COMMAND}"
265-
-DCMAKE_INSTALL_COMPONENT=cxx-headers
266+
-DCMAKE_INSTALL_COMPONENT=${CXX_HEADER_TARGET}
266267
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
267268
# Stripping is a no-op for headers
268-
add_custom_target(install-cxx-headers-stripped DEPENDS install-cxx-headers)
269+
add_custom_target(install-${CXX_HEADER_TARGET}-stripped DEPENDS install-${CXX_HEADER_TARGET})
269270

270-
add_custom_target(install-libcxx-headers DEPENDS install-cxx-headers)
271-
add_custom_target(install-libcxx-headers-stripped DEPENDS install-cxx-headers-stripped)
271+
add_custom_target(install-libcxx-headers DEPENDS install-${CXX_HEADER_TARGET})
272+
add_custom_target(install-libcxx-headers-stripped DEPENDS install-${CXX_HEADER_TARGET}-stripped)
272273
endif()
273274
endif()

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public:
6868

6969
_LIBCPP_INLINE_VISIBILITY void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
7070
_LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
71-
{return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__ctz(__mask_)));}
71+
{return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
7272
private:
7373
_LIBCPP_INLINE_VISIBILITY
7474
__bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
@@ -140,7 +140,7 @@ public:
140140
{return static_cast<bool>(*__seg_ & __mask_);}
141141

142142
_LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
143-
{return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__ctz(__mask_)));}
143+
{return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
144144
private:
145145
_LIBCPP_INLINE_VISIBILITY
146146
_LIBCPP_CONSTEXPR
@@ -167,7 +167,7 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
167167
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
168168
__storage_type __b = *__first.__seg_ & __m;
169169
if (__b)
170-
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
170+
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
171171
if (__n == __dn)
172172
return __first + __n;
173173
__n -= __dn;
@@ -176,14 +176,14 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
176176
// do middle whole words
177177
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
178178
if (*__first.__seg_)
179-
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(*__first.__seg_)));
179+
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(*__first.__seg_)));
180180
// do last partial word
181181
if (__n > 0)
182182
{
183183
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
184184
__storage_type __b = *__first.__seg_ & __m;
185185
if (__b)
186-
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
186+
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
187187
}
188188
return _It(__first.__seg_, static_cast<unsigned>(__n));
189189
}
@@ -203,7 +203,7 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
203203
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
204204
__storage_type __b = ~*__first.__seg_ & __m;
205205
if (__b)
206-
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
206+
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
207207
if (__n == __dn)
208208
return __first + __n;
209209
__n -= __dn;
@@ -214,15 +214,15 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
214214
{
215215
__storage_type __b = ~*__first.__seg_;
216216
if (__b)
217-
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
217+
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
218218
}
219219
// do last partial word
220220
if (__n > 0)
221221
{
222222
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
223223
__storage_type __b = ~*__first.__seg_ & __m;
224224
if (__b)
225-
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
225+
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
226226
}
227227
return _It(__first.__seg_, static_cast<unsigned>(__n));
228228
}
@@ -254,18 +254,18 @@ __count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
254254
__storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
255255
__storage_type __dn = _VSTD::min(__clz_f, __n);
256256
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
257-
__r = _VSTD::__popcount(*__first.__seg_ & __m);
257+
__r = _VSTD::__libcpp_popcount(*__first.__seg_ & __m);
258258
__n -= __dn;
259259
++__first.__seg_;
260260
}
261261
// do middle whole words
262262
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
263-
__r += _VSTD::__popcount(*__first.__seg_);
263+
__r += _VSTD::__libcpp_popcount(*__first.__seg_);
264264
// do last partial word
265265
if (__n > 0)
266266
{
267267
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
268-
__r += _VSTD::__popcount(*__first.__seg_ & __m);
268+
__r += _VSTD::__libcpp_popcount(*__first.__seg_ & __m);
269269
}
270270
return __r;
271271
}
@@ -285,18 +285,18 @@ __count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_typ
285285
__storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
286286
__storage_type __dn = _VSTD::min(__clz_f, __n);
287287
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
288-
__r = _VSTD::__popcount(~*__first.__seg_ & __m);
288+
__r = _VSTD::__libcpp_popcount(~*__first.__seg_ & __m);
289289
__n -= __dn;
290290
++__first.__seg_;
291291
}
292292
// do middle whole words
293293
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
294-
__r += _VSTD::__popcount(~*__first.__seg_);
294+
__r += _VSTD::__libcpp_popcount(~*__first.__seg_);
295295
// do last partial word
296296
if (__n > 0)
297297
{
298298
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
299-
__r += _VSTD::__popcount(~*__first.__seg_ & __m);
299+
__r += _VSTD::__libcpp_popcount(~*__first.__seg_ & __m);
300300
}
301301
return __r;
302302
}

0 commit comments

Comments
 (0)