Skip to content

Commit b2f8393

Browse files
author
bors-servo
authored
Auto merge of #186 - jdm:smup67, r=asajeffrey
Upgrade to SpiderMonkey 67 <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/186) <!-- Reviewable:end -->
2 parents 4e2062a + 220ffbe commit b2f8393

File tree

13,898 files changed

+184643
-187527
lines changed

Some content is hidden

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

13,898 files changed

+184643
-187527
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "mozjs_sys"
33
description = "System crate for the Mozilla SpiderMonkey JavaScript engine."
44
repository = "https://github.com/servo/mozjs/"
5-
version = "0.66.1"
5+
version = "0.67.0"
66
authors = ["Mozilla"]
77
links = "mozjs"
88
build = "build.rs"

etc/COMMIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9c35dcbaa8999f989f14f1e98a4a40a43f234131
1+
455c1065dcbe14b73771df2db56aae43a44dfcf8

etc/patches/broken-sdk.patch

Lines changed: 0 additions & 15 deletions
This file was deleted.

etc/patches/configure-override-android-ndk-paths.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ index 66cf3e16ad..8f0b0582b3 100644
8282
+ if value:
8383
+ return value[0]
8484
+
85-
llvm_path = '%s/toolchains/llvm/prebuilt/%s-%s/bin' % (ndk,
86-
host.kernel.lower(),
87-
host.cpu)
85+
llvm_format = '%s/toolchains/llvm/prebuilt/%s-%s/bin'
86+
llvm_path = llvm_format % (ndk, host.kernel.lower(), host.cpu)
87+
if not isdir(llvm_path) and host.cpu == 'x86_64':
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/mozjs/build/moz.configure/bindgen.configure b/mozjs/build/moz.configure/bindgen.configure
2+
index 1658c8f93e..f7082ea6d4 100644
3+
--- a/mozjs/build/moz.configure/bindgen.configure
4+
+++ b/mozjs/build/moz.configure/bindgen.configure
5+
@@ -246,6 +246,9 @@ set_config('MOZ_CLANG_PATH', bindgen_config_paths.clang_path)
6+
@depends(target, target_is_unix, cxx_compiler, bindgen_cflags_android,
7+
bindgen_config_paths.clang_path)
8+
def basic_bindgen_cflags(target, is_unix, compiler_info, android_cflags, clang_path):
9+
+ if not clang_path:
10+
+ return []
11+
+
12+
args = [
13+
'-x', 'c++', '-fno-sized-deallocation',
14+
'-DTRACING=1', '-DIMPL_LIBXUL', '-DMOZILLA_INTERNAL_API',

etc/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def remove_cargo_tomls():
4242
os.path.join("mozjs", "testing"),
4343
]
4444
exclude = [
45-
os.path.join("mozjs", "js", "src", "frontend", "binsource"),
45+
os.path.join("mozjs", "js", "src", "frontend", "binast"),
4646
]
4747
for dir in problem_dirs:
4848
for root, dirs, files in os.walk(dir):

mozjs/.cargo/config.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ git = "https://github.com/froydnj/winapi-rs"
1717
branch = "aarch64"
1818
replace-with = "vendored-sources"
1919

20+
[source."https://github.com/alexcrichton/cc-rs"]
21+
git = "https://github.com/glandium/cc-rs"
22+
branch = "1.0.23-clang-cl-aarch64"
23+
replace-with = "vendored-sources"
24+
2025
[source.vendored-sources]
2126
directory = '@top_srcdir@/third_party/rust'
2227

mozjs/Makefile.in

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,19 @@ binaries::
163163
@$(MAKE) install-manifests install_manifests=dist/include
164164
endif
165165

166+
# Host binaries are not produced for macOS consumers: that is, there's
167+
# no macOS-hosted job to produce them at this time. Therefore we
168+
# enable --host-bins only for automation builds, which only require Linux and
169+
# Windows host binaries.
166170
recurse_artifact:
167-
$(topsrcdir)/mach --log-no-times artifact install
171+
$(topsrcdir)/mach --log-no-times artifact install$(if $(MOZ_ARTIFACT_BUILD_SYMBOLS), --symbols$(addprefix =,$(filter full,$(MOZ_ARTIFACT_BUILD_SYMBOLS))))$(if $(MOZ_AUTOMATION), --host-bins)
172+
173+
ifdef MOZ_EME_WIN32_ARTIFACT
174+
recurse_win32-artifact:
175+
rm -rf $(DIST)/i686
176+
$(topsrcdir)/mach --log-no-times artifact install --job $(if $(MOZ_PGO),win32-pgo,win32-opt) --no-tests --distdir $(DIST)/i686
177+
mv $(DIST)/i686/bin/* $(DIST)/i686
178+
endif
168179

169180
ifdef MOZ_WIDGET_TOOLKIT
170181
ifdef ENABLE_TESTS
@@ -180,7 +191,7 @@ default all::
180191
profiledbuild::
181192
$(call BUILDSTATUS,TIERS pgo_profile_generate pgo_package pgo_profile pgo_clobber pgo_profile_use)
182193
$(call BUILDSTATUS,TIER_START pgo_profile_generate)
183-
$(MAKE) default MOZ_PROFILE_GENERATE=1
194+
$(MAKE) default MOZ_PROFILE_GENERATE=1 MOZ_LTO=
184195
$(call BUILDSTATUS,TIER_FINISH pgo_profile_generate)
185196
$(call BUILDSTATUS,TIER_START pgo_package)
186197
$(MAKE) package MOZ_INTERNAL_SIGNING_FORMAT= MOZ_EXTERNAL_SIGNING_FORMAT=
@@ -272,22 +283,15 @@ update-packaging:
272283
package-generated-sources:
273284
$(call py_action,package_generated_sources,'$(DIST)/$(PKG_PATH)$(GENERATED_SOURCE_FILE_PACKAGE)')
274285

275-
#XXX: this is a hack, since we don't want to clobber for MSVC
276286
# PGO support, but we can't do this test in client.mk
277287
# No point in clobbering if PGO has been explicitly disabled.
278288
ifdef NO_PROFILE_GUIDED_OPTIMIZE
279289
maybe_clobber_profiledbuild:
280290
else
281-
ifneq ($(CC_TYPE),msvc)
282291
maybe_clobber_profiledbuild: clean
283292
ifneq (,$(findstring clang,$(CC_TYPE)))
284293
$(LLVM_PROFDATA) merge -o $(DEPTH)/merged.profdata $(DEPTH)/*.profraw
285294
endif
286-
else
287-
maybe_clobber_profiledbuild:
288-
$(RM) $(DIST)/bin/*.pgc
289-
find $(DIST)/$(MOZ_APP_NAME) -name '*.pgc' -exec mv {} $(DIST)/bin \;
290-
endif # msvc
291295
endif # NO_PROFILE_GUIDED_OPTIMIZE
292296

293297
.PHONY: maybe_clobber_profiledbuild

mozjs/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
This directory contains SpiderMonkey 66.
1+
This directory contains SpiderMonkey 67.
22

3-
This release is based on a revision of Mozilla 66:
3+
This release is based on a revision of Mozilla 67:
44
https://hg.mozilla.org/releases/
55
The changes in the patches/ directory were applied.
66

7-
MDN hosts the latest SpiderMonkey 66 release notes:
8-
https://developer.mozilla.org/en-US/docs/SpiderMonkey/66
7+
MDN hosts the latest SpiderMonkey 67 release notes:
8+
https://developer.mozilla.org/en-US/docs/SpiderMonkey/67

mozjs/build/autoconf/alloc.m4

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,11 @@ AC_EGREP_HEADER(valloc, unistd.h,
4747
AC_MSG_RESULT([yes]),
4848
AC_MSG_RESULT([no]))
4949
50+
AC_MSG_CHECKING([for _aligned_malloc in malloc.h])
51+
AC_EGREP_HEADER(_aligned_malloc, malloc.h,
52+
AC_DEFINE(HAVE_ALIGNED_MALLOC)
53+
AC_MSG_RESULT([yes]),
54+
AC_MSG_RESULT([no]))
55+
5056
5157
])

mozjs/build/autoconf/android.m4

Lines changed: 1 addition & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ case "$target" in
2222
CXXFLAGS="-fno-short-enums -fno-exceptions $CXXFLAGS $stlport_cppflags"
2323
ASFLAGS="$directory_include_args -DANDROID $ASFLAGS"
2424
25-
dnl Add --allow-shlib-undefined, because libGLESv2 links to an
26-
dnl undefined symbol (present on the hardware, just not in the
27-
dnl NDK.)
28-
LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -Wl,--allow-shlib-undefined $LDFLAGS"
25+
LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
2926
ANDROID_PLATFORM="${android_platform}"
3027
3128
AC_DEFINE(ANDROID)
@@ -91,87 +88,9 @@ AC_SUBST_LIST([STLPORT_LIBS])
9188

9289

9390
dnl Configure an Android SDK.
94-
dnl Arg 1: compile SDK version, like 23.
95-
dnl Arg 2: target SDK version, like 23.
96-
dnl Arg 3: list of build-tools versions, like "23.0.3 23.0.1".
9791
AC_DEFUN([MOZ_ANDROID_SDK],
9892
[
9993
100-
MOZ_ARG_WITH_STRING(android-sdk,
101-
[ --with-android-sdk=DIR
102-
location where the Android SDK can be found (like ~/.mozbuild/android-sdk-linux)],
103-
android_sdk_root=$withval)
104-
105-
android_sdk_root=${withval%/platforms/android-*}
106-
107-
case "$target" in
108-
*-android*|*-linuxandroid*)
109-
if test -z "$android_sdk_root" ; then
110-
AC_MSG_ERROR([You must specify --with-android-sdk=/path/to/sdk when targeting Android.])
111-
fi
112-
113-
# We were given an old-style
114-
# --with-android-sdk=/path/to/sdk/platforms/android-*. We could warn, but
115-
# we'll get compliance by forcing the issue.
116-
if test -e "$withval"/source.properties ; then
117-
AC_MSG_ERROR([Including platforms/android-* in --with-android-sdk arguments is deprecated. Use --with-android-sdk=$android_sdk_root.])
118-
fi
119-
120-
android_target_sdk=$2
121-
122-
AC_MSG_CHECKING([for Android build-tools])
123-
android_build_tools_base="$android_sdk_root"/build-tools
124-
for version in $3; do
125-
android_build_tools="$android_build_tools_base"/$version
126-
if test -d "$android_build_tools" -a -f "$android_build_tools/zipalign"; then
127-
AC_MSG_RESULT([$android_build_tools])
128-
break
129-
fi
130-
done
131-
132-
MOZ_PATH_PROG(ZIPALIGN, zipalign, :, [$android_build_tools])
133-
if test -z "$ZIPALIGN" -o "$ZIPALIGN" = ":"; then
134-
AC_MSG_ERROR([The program zipalign was not found. Try |mach bootstrap|.])
135-
fi
136-
137-
android_platform_tools="$android_sdk_root"/platform-tools
138-
AC_MSG_CHECKING([for Android platform-tools])
139-
if test -d "$android_platform_tools" -a -f "$android_platform_tools/adb"; then
140-
AC_MSG_RESULT([$android_platform_tools])
141-
else
142-
AC_MSG_ERROR([You must install the Android platform-tools. Try |mach bootstrap|. (Looked for $android_platform_tools)])
143-
fi
144-
145-
MOZ_PATH_PROG(ADB, adb, :, [$android_platform_tools])
146-
if test -z "$ADB" -o "$ADB" = ":"; then
147-
AC_MSG_ERROR([The program adb was not found. Try |mach bootstrap|.])
148-
fi
149-
150-
android_tools="$android_sdk_root"/tools
151-
AC_MSG_CHECKING([for Android tools])
152-
if test -d "$android_tools" -a -f "$android_tools/emulator"; then
153-
AC_MSG_RESULT([$android_tools])
154-
else
155-
AC_MSG_ERROR([You must install the Android tools. Try |mach bootstrap|. (Looked for $android_tools)])
156-
fi
157-
158-
dnl Android Tools 26 changes emulator path.
159-
dnl Although android_sdk_root/tools still has emulator command,
160-
dnl it doesn't work correctly
161-
MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_sdk_root/emulator:$android_tools])
162-
if test -z "$EMULATOR" -o "$EMULATOR" = ":"; then
163-
AC_MSG_ERROR([The program emulator was not found. Try |mach bootstrap|.])
164-
fi
165-
166-
ANDROID_TARGET_SDK="${android_target_sdk}"
167-
ANDROID_SDK_ROOT="${android_sdk_root}"
168-
ANDROID_TOOLS="${android_tools}"
169-
AC_SUBST(ANDROID_TARGET_SDK)
170-
AC_SUBST(ANDROID_SDK_ROOT)
171-
AC_SUBST(ANDROID_TOOLS)
172-
;;
173-
esac
174-
17594
MOZ_ARG_WITH_STRING(android-min-sdk,
17695
[ --with-android-min-sdk=[VER] Impose a minimum Firefox for Android SDK version],
17796
[ MOZ_ANDROID_MIN_SDK_VERSION=$withval ])

mozjs/build/autoconf/clang-plugin.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ if test -n "$ENABLE_CLANG_PLUGIN"; then
3636
dnl For some reason the llvm-config downloaded from clang.llvm.org for clang3_8
3737
dnl produces a -isysroot flag for a sysroot which might not ship when passed
3838
dnl --cxxflags. We use sed to remove this argument so that builds work on OSX
39-
LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags | sed -e 's/-isysroot [[^ ]]*//'`
39+
dnl
40+
dnl For a similar reason, we remove any -gcc-toolchain arguments, since the
41+
dnl directories specified by such arguments might not exist on the current
42+
dnl machine.
43+
LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags | sed -e 's/-isysroot [[^ ]]*//' -e 's/-gcc-toolchain [[^ ]]*//'`
4044
4145
LLVM_LDFLAGS=`$LLVMCONFIG --ldflags | tr '\n' ' '`
4246

mozjs/build/autoconf/compiler-opts.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF" -a -z "$DEVELOPE
124124
# the same address
125125
if AC_TRY_COMMAND([${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2]) &&
126126
test -s conftest${ac_exeext} &&
127-
objdump -t conftest${ac_exeext} | awk changequote(<<, >>)'{a[<<$>>6] = <<$>>1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'changequote([, ]); then
127+
$LLVM_OBJDUMP -t conftest${ac_exeext} | awk changequote(<<, >>)'{a[<<$>>6] = <<$>>1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'changequote([, ]); then
128128
LD_SUPPORTS_ICF=yes
129129
else
130130
LD_SUPPORTS_ICF=no

mozjs/build/autoconf/expandlibs.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ AC_CACHE_CHECK(what kind of list files are supported by the linker,
2020
dnl https://sourceware.org/bugzilla/show_bug.cgi?id=23600
2121
if AC_TRY_COMMAND(${CC-cc} -o conftest.${OBJ_SUFFIX} -c $MOZ_LTO_CFLAGS $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5) && test -s conftest.${OBJ_SUFFIX}; then
2222
echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list
23-
if test "$CC_TYPE" = "msvc" -o "$CC_TYPE" = "clang-cl"; then
23+
if test "$CC_TYPE" = "clang-cl"; then
2424
link="$LINKER -OUT:conftest${ac_exeext}"
2525
else
2626
link="${CC-cc} -o conftest${ac_exeext}"

mozjs/build/autoconf/frameptr.m4

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [
1212
MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer -funwind-tables"
1313
else
1414
case "$target" in
15+
dnl some versions of clang-cl don't support -Oy-; accommodate them.
16+
aarch64-windows*)
17+
if test "$CC_TYPE" = "clang-cl"; then
18+
MOZ_ENABLE_FRAME_PTR="-Xclang -mdisable-fp-elim"
19+
MOZ_DISABLE_FRAME_PTR="-Xclang -mdisable-fp-elim"
20+
else
21+
MOZ_ENABLE_FRAME_PTR="-Oy-"
22+
MOZ_DISABLE_FRAME_PTR="-Oy"
23+
fi
24+
;;
1525
dnl Oy (Frame-Pointer Omission) is only support on x86 compilers
1626
*-mingw32*)
1727
MOZ_ENABLE_FRAME_PTR="-Oy-"

mozjs/build/autoconf/hooks.m4

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,17 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1515
dnl Print error messages in config.log as well as stderr
1616
define([AC_MSG_ERROR],
1717
[{ echo "configure: error: $1" 1>&2; echo "configure: error: $1" 1>&5; exit 1; }])
18+
19+
dnl Divert AC_TRY_COMPILER to make ac_cv_prog_*_works actually cached.
20+
dnl This will allow to just skip the test when python configure has set
21+
dnl the value for us. But since ac_cv_prog_*_cross is calculated at the same
22+
dnl time, and has a different meaning as in python configure, we only want to
23+
dnl use its value to display whether a cross-compile is happening. We forbid
24+
dnl configure tests that would rely on ac_cv_prog_*_cross autoconf meaning
25+
dnl (being able to execute the product of compilation), which are already bad
26+
dnl for cross compiles anyways, so it's a win to get rid of them.
27+
define([_MOZ_AC_TRY_COMPILER], defn([AC_TRY_COMPILER]))
28+
define([AC_TRY_COMPILER], [AC_CACHE_VAL($2, _MOZ_AC_TRY_COMPILER($1, $2, $3))])
29+
30+
define([AC_TRY_RUN], [m4_fatal([AC_TRY_RUN is forbidden])])
31+
define([AC_CHECK_FILE], [m4_fatal([AC_CHECK_FILE is forbidden])])
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Workaround segfault in clang's mangling code that is tickled when
2+
attempting to mangle the declaration:
3+
std:__ndk1::__find_detail::__find_exactly_one_checked::__matches
4+
in the <tuple> header in the Android NDK.
5+
This codepath is exercised by MozsearchIndexer.cpp (the searchfox
6+
indexer) when indexing on Android. See also
7+
https://bugs.llvm.org/show_bug.cgi?id=40747
8+
9+
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
10+
index 2dc04f2f3d8..054fc27003d 100644
11+
--- a/clang/lib/AST/ItaniumMangle.cpp
12+
+++ b/clang/lib/AST/ItaniumMangle.cpp
13+
@@ -3495,16 +3495,21 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity) {
14+
// ::= <expr-primary>
15+
// <expr-primary> ::= L <type> <value number> E # integer literal
16+
// ::= L <type <value float> E # floating literal
17+
// ::= L <mangled-name> E # external name
18+
// ::= fpT # 'this' expression
19+
QualType ImplicitlyConvertedToType;
20+
21+
recurse:
22+
+ if (!E) {
23+
+ Out << "MOZ_WE_HACKED_AROUND_BUG_1500941";
24+
+ return;
25+
+ }
26+
+
27+
switch (E->getStmtClass()) {
28+
case Expr::NoStmtClass:
29+
#define ABSTRACT_STMT(Type)
30+
#define EXPR(Type, Base)
31+
#define STMT(Type, Base) \
32+
case Expr::Type##Class:
33+
#include "clang/AST/StmtNodes.inc"
34+
// fallthrough

0 commit comments

Comments
 (0)