Initialize for mozjs60
This commit is contained in:
commit
99dbc4f295
23 changed files with 1677 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
firefox-60.9.0esr.source.tar.xz
|
1
.mozjs60.metadata
Normal file
1
.mozjs60.metadata
Normal file
|
@ -0,0 +1 @@
|
|||
5425cc4de1748090950c24ffa43a433b12b4ecb543af71281ae1982de4d6967d firefox-60.9.0esr.source.tar.xz
|
100
Always-use-the-equivalent-year-to-determine-the-time-zone.patch
Normal file
100
Always-use-the-equivalent-year-to-determine-the-time-zone.patch
Normal file
|
@ -0,0 +1,100 @@
|
|||
From: =?utf-8?q?Andr=C3=A9_Bargull?= <andrebargull@googlemail.com>
|
||||
Date: Wed, 8 Nov 2017 03:23:41 -0800
|
||||
Subject: Always use the equivalent year to determine the time zone offset and
|
||||
name
|
||||
|
||||
Reviewed-by: Jeff Walden
|
||||
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1415202
|
||||
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1479687
|
||||
Origin: upstream
|
||||
Applied-upstream: 62, commit:https://hg.mozilla.org/mozilla-central/rev/ce9f1466ec78
|
||||
---
|
||||
js/src/jsdate.cpp | 11 +++++++----
|
||||
js/src/vm/Time.cpp | 14 ++++----------
|
||||
js/src/vm/Time.h | 2 +-
|
||||
3 files changed, 12 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp
|
||||
index 07af3d18c865..ff8fd6c3763c 100644
|
||||
--- a/js/src/jsdate.cpp
|
||||
+++ b/js/src/jsdate.cpp
|
||||
@@ -2353,12 +2353,15 @@ static PRMJTime ToPRMJTime(double localTime, double utcTime) {
|
||||
static size_t FormatTime(char* buf, int buflen, const char* fmt, double utcTime,
|
||||
double localTime) {
|
||||
PRMJTime prtm = ToPRMJTime(localTime, utcTime);
|
||||
- int eqivalentYear = IsRepresentableAsTime32(utcTime)
|
||||
- ? prtm.tm_year
|
||||
- : EquivalentYearForDST(prtm.tm_year);
|
||||
+ // If an equivalent year was used to compute the date/time components, use
|
||||
+ // the same equivalent year to determine the time zone name and offset in
|
||||
+ // PRMJ_FormatTime(...).
|
||||
+ int timeZoneYear = IsRepresentableAsTime32(utcTime)
|
||||
+ ? prtm.tm_year
|
||||
+ : EquivalentYearForDST(prtm.tm_year);
|
||||
int offsetInSeconds = (int)floor((localTime - utcTime) / msPerSecond);
|
||||
|
||||
- return PRMJ_FormatTime(buf, buflen, fmt, &prtm, eqivalentYear,
|
||||
+ return PRMJ_FormatTime(buf, buflen, fmt, &prtm, timeZoneYear,
|
||||
offsetInSeconds);
|
||||
}
|
||||
|
||||
diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp
|
||||
index f59977f0d0e9..5ee4794b3e83 100644
|
||||
--- a/js/src/vm/Time.cpp
|
||||
+++ b/js/src/vm/Time.cpp
|
||||
@@ -247,7 +247,7 @@ static void PRMJ_InvalidParameterHandler(const wchar_t* expression,
|
||||
|
||||
/* Format a time value into a buffer. Same semantics as strftime() */
|
||||
size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
|
||||
- const PRMJTime* prtm, int equivalentYear,
|
||||
+ const PRMJTime* prtm, int timeZoneYear,
|
||||
int offsetInSeconds) {
|
||||
size_t result = 0;
|
||||
#if defined(XP_UNIX) || defined(XP_WIN)
|
||||
@@ -280,7 +280,8 @@ size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
|
||||
* Fill out |td| to the time represented by |prtm|, leaving the
|
||||
* timezone fields zeroed out. localtime_r will then fill in the
|
||||
* timezone fields for that local time according to the system's
|
||||
- * timezone parameters.
|
||||
+ * timezone parameters. Use |timeZoneYear| for the year to ensure the
|
||||
+ * time zone name matches the time zone offset used by the caller.
|
||||
*/
|
||||
struct tm td;
|
||||
memset(&td, 0, sizeof(td));
|
||||
@@ -290,19 +291,12 @@ size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
|
||||
td.tm_mday = prtm->tm_mday;
|
||||
td.tm_mon = prtm->tm_mon;
|
||||
td.tm_wday = prtm->tm_wday;
|
||||
- td.tm_year = prtm->tm_year - 1900;
|
||||
+ td.tm_year = timeZoneYear - 1900;
|
||||
td.tm_yday = prtm->tm_yday;
|
||||
td.tm_isdst = prtm->tm_isdst;
|
||||
|
||||
time_t t = mktime(&td);
|
||||
|
||||
- // If |prtm| cannot be represented in |time_t| the year is probably
|
||||
- // out of range, try again with the DST equivalent year.
|
||||
- if (t == static_cast<time_t>(-1)) {
|
||||
- td.tm_year = equivalentYear - 1900;
|
||||
- t = mktime(&td);
|
||||
- }
|
||||
-
|
||||
// If either mktime or localtime_r failed, fill in the fallback time
|
||||
// zone offset |offsetInSeconds| and set the time zone identifier to
|
||||
// the empty string.
|
||||
diff --git a/js/src/vm/Time.h b/js/src/vm/Time.h
|
||||
index 3a51d869c922..37b7faeec028 100644
|
||||
--- a/js/src/vm/Time.h
|
||||
+++ b/js/src/vm/Time.h
|
||||
@@ -49,7 +49,7 @@ inline void PRMJ_NowShutdown() {}
|
||||
|
||||
/* Format a time value into a buffer. Same semantics as strftime() */
|
||||
extern size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
|
||||
- const PRMJTime* tm, int equivalentYear,
|
||||
+ const PRMJTime* tm, int timeZoneYear,
|
||||
int offsetInSeconds);
|
||||
|
||||
/**
|
||||
--
|
||||
2.21.0
|
||||
|
15
Don-t-run-non262-extensions-clone-errors.js-on-s390x.patch
Normal file
15
Don-t-run-non262-extensions-clone-errors.js-on-s390x.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
Index: firefox-60.9.0/js/src/tests/jstests.list
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/tests/jstests.list 2019-12-10 11:03:40.064246162 +0100
|
||||
+++ firefox-60.9.0/js/src/tests/jstests.list 2019-12-10 11:04:22.464247245 +0100
|
||||
@@ -447,6 +447,10 @@
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1321616
|
||||
skip script test262/annexB/built-ins/Function/createdynfn-html-close-comment-params.js
|
||||
|
||||
+# Crashes on s390x and ppc64, avoid it
|
||||
+#
|
||||
+skip-if(xulRuntime.XPCOMABI.match(/s390x|ppc64-/)) script non262/extensions/clone-errors.js
|
||||
+
|
||||
|
||||
###########################################################
|
||||
# Tests disabled due to issues in test262 importer script #
|
373
LICENSE.txt
Normal file
373
LICENSE.txt
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -0,0 +1,64 @@
|
|||
# HG changeset patch
|
||||
# User Lars T Hansen <lhansen@mozilla.com>
|
||||
# Date 1519822672 -3600
|
||||
# Node ID 800abe66894d6b07b24bccecbf6a65e2261076f6
|
||||
# Parent 223c97459e96183eb616aed39147207bdb953ba8
|
||||
Bug 1375074 - Save and restore non-volatile x28 on ARM64 for generated unboxed object constructor. r=sstangl
|
||||
|
||||
Origin: upstream
|
||||
Applied-upstream: 61, commit: https://hg.mozilla.org/mozilla-central/rev/800abe66894d
|
||||
---
|
||||
js/src/vm/UnboxedObject.cpp | 30 ++++++++++++++++++++++++++----
|
||||
1 file changed, 26 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp
|
||||
index 35ca20d7405f..1c20a1093d13 100644
|
||||
--- a/js/src/vm/UnboxedObject.cpp
|
||||
+++ b/js/src/vm/UnboxedObject.cpp
|
||||
@@ -86,9 +86,16 @@ static const uintptr_t CLEAR_CONSTRUCTOR_CODE_TOKEN = 0x1;
|
||||
#endif
|
||||
|
||||
#ifdef JS_CODEGEN_ARM64
|
||||
- // ARM64 communicates stack address via sp, but uses a pseudo-sp for
|
||||
- // addressing.
|
||||
- masm.initStackPtr();
|
||||
+ // ARM64 communicates stack address via sp, but uses a pseudo-sp (PSP) for
|
||||
+ // addressing. The register we use for PSP may however also be used by
|
||||
+ // calling code, and it is nonvolatile, so save it. Do this as a special
|
||||
+ // case first because the generic save/restore code needs the PSP to be
|
||||
+ // initialized already.
|
||||
+ MOZ_ASSERT(PseudoStackPointer64.Is(masm.GetStackPointer64()));
|
||||
+ masm.Str(PseudoStackPointer64, vixl::MemOperand(sp, -16, vixl::PreIndex));
|
||||
+
|
||||
+ // Initialize the PSP from the SP.
|
||||
+ masm.initStackPtr();
|
||||
#endif
|
||||
|
||||
MOZ_ASSERT(propertiesReg.volatile_());
|
||||
@@ -239,7 +246,22 @@ static const uintptr_t CLEAR_CONSTRUCTOR_CODE_TOKEN = 0x1;
|
||||
if (ScratchDoubleReg.volatile_()) masm.pop(ScratchDoubleReg);
|
||||
masm.PopRegsInMask(savedNonVolatileRegisters);
|
||||
|
||||
- masm.abiret();
|
||||
+#ifdef JS_CODEGEN_ARM64
|
||||
+ // Now restore the value that was in the PSP register on entry, and return.
|
||||
+
|
||||
+ // Obtain the correct SP from the PSP.
|
||||
+ masm.Mov(sp, PseudoStackPointer64);
|
||||
+
|
||||
+ // Restore the saved value of the PSP register, this value is whatever the
|
||||
+ // caller had saved in it, not any actual SP value, and it must not be
|
||||
+ // overwritten subsequently.
|
||||
+ masm.Ldr(PseudoStackPointer64, vixl::MemOperand(sp, 16, vixl::PostIndex));
|
||||
+
|
||||
+ // Perform a plain Ret(), as abiret() will move SP <- PSP and that is wrong.
|
||||
+ masm.Ret(vixl::lr);
|
||||
+#else
|
||||
+ masm.abiret();
|
||||
+#endif
|
||||
|
||||
masm.bind(&failureStoreOther);
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
97
Save-x28-before-clobbering-it-in-the-regex-compiler.patch
Normal file
97
Save-x28-before-clobbering-it-in-the-regex-compiler.patch
Normal file
|
@ -0,0 +1,97 @@
|
|||
# HG changeset patch
|
||||
# User Lars T Hansen <lhansen@mozilla.com>
|
||||
# Date 1521449886 -3600
|
||||
# Node ID 903a79a1efff18fc7cc50db09a3fe5d768adc9a8
|
||||
# Parent 4d2955a9ca7e30ca4c3af9c214ccc77fb2fe7fb8
|
||||
Bug 1445907 - Save x28 before clobbering it in the regex compiler. r=sstangl
|
||||
|
||||
Origin: upstream
|
||||
Applied-upstream: 61, commit: https://hg.mozilla.org/mozilla-central/rev/903a79a1efff
|
||||
---
|
||||
diff --git a/js/src/irregexp/NativeRegExpMacroAssembler.cpp b/js/src/irregexp/NativeRegExpMacroAssembler.cpp
|
||||
--- a/js/src/irregexp/NativeRegExpMacroAssembler.cpp
|
||||
+++ b/js/src/irregexp/NativeRegExpMacroAssembler.cpp
|
||||
@@ -118,17 +118,25 @@ NativeRegExpMacroAssembler::GenerateCode
|
||||
|
||||
Label return_temp0;
|
||||
|
||||
// Finalize code - write the entry point code now we know how many
|
||||
// registers we need.
|
||||
masm.bind(&entry_label_);
|
||||
|
||||
#ifdef JS_CODEGEN_ARM64
|
||||
- // ARM64 communicates stack address via sp, but uses a pseudo-sp for addressing.
|
||||
+ // ARM64 communicates stack address via SP, but uses a pseudo-sp (PSP) for
|
||||
+ // addressing. The register we use for PSP may however also be used by
|
||||
+ // calling code, and it is nonvolatile, so save it. Do this as a special
|
||||
+ // case first because the generic save/restore code needs the PSP to be
|
||||
+ // initialized already.
|
||||
+ MOZ_ASSERT(PseudoStackPointer64.Is(masm.GetStackPointer64()));
|
||||
+ masm.Str(PseudoStackPointer64, vixl::MemOperand(sp, -16, vixl::PreIndex));
|
||||
+
|
||||
+ // Initialize the PSP from the SP.
|
||||
masm.initStackPtr();
|
||||
#endif
|
||||
|
||||
// Push non-volatile registers which might be modified by jitcode.
|
||||
size_t pushedNonVolatileRegisters = 0;
|
||||
for (GeneralRegisterForwardIterator iter(savedNonVolatileRegisters); iter.more(); ++iter) {
|
||||
masm.Push(*iter);
|
||||
pushedNonVolatileRegisters++;
|
||||
@@ -416,17 +424,32 @@ NativeRegExpMacroAssembler::GenerateCode
|
||||
masm.pop(temp0);
|
||||
masm.movePtr(temp0, StackPointer);
|
||||
#endif
|
||||
|
||||
// Restore non-volatile registers which were saved on entry.
|
||||
for (GeneralRegisterBackwardIterator iter(savedNonVolatileRegisters); iter.more(); ++iter)
|
||||
masm.Pop(*iter);
|
||||
|
||||
+#ifdef JS_CODEGEN_ARM64
|
||||
+ // Now restore the value that was in the PSP register on entry, and return.
|
||||
+
|
||||
+ // Obtain the correct SP from the PSP.
|
||||
+ masm.Mov(sp, PseudoStackPointer64);
|
||||
+
|
||||
+ // Restore the saved value of the PSP register, this value is whatever the
|
||||
+ // caller had saved in it, not any actual SP value, and it must not be
|
||||
+ // overwritten subsequently.
|
||||
+ masm.Ldr(PseudoStackPointer64, vixl::MemOperand(sp, 16, vixl::PostIndex));
|
||||
+
|
||||
+ // Perform a plain Ret(), as abiret() will move SP <- PSP and that is wrong.
|
||||
+ masm.Ret(vixl::lr);
|
||||
+#else
|
||||
masm.abiret();
|
||||
+#endif
|
||||
|
||||
// Backtrack code (branch target for conditional backtracks).
|
||||
if (backtrack_label_.used()) {
|
||||
masm.bind(&backtrack_label_);
|
||||
Backtrack();
|
||||
}
|
||||
|
||||
// Backtrack stack overflow code.
|
||||
diff --git a/js/src/jit-test/tests/regexp/bug1445907.js b/js/src/jit-test/tests/regexp/bug1445907.js
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/js/src/jit-test/tests/regexp/bug1445907.js
|
||||
@@ -0,0 +1,15 @@
|
||||
+// On ARM64, we failed to save x28 properly when generating code for the regexp
|
||||
+// matcher.
|
||||
+//
|
||||
+// There's wasm and Debugger code here because the combination forces the use of
|
||||
+// x28 and exposes the bug when running on the simulator.
|
||||
+
|
||||
+if (!wasmIsSupported())
|
||||
+ quit();
|
||||
+
|
||||
+var g = newGlobal('');
|
||||
+var dbg = new Debugger(g);
|
||||
+g.eval(`var m = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (export "test")))')))`);
|
||||
+var re = /./;
|
||||
+dbg.onEnterFrame = function(frame) { re.exec("x") };
|
||||
+result = g.eval("m.exports.test()");
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Wed, 12 Sep 2018 09:46:34 +0100
|
||||
Subject: Skip some i18n tests because we are now using system ICU
|
||||
|
||||
Forwarded: not-needed, Debian-specific
|
||||
---
|
||||
js/src/tests/jstests.list | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
Index: firefox-60.9.0/js/src/tests/jstests.list
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/tests/jstests.list 2019-12-10 09:57:46.072145154 +0100
|
||||
+++ firefox-60.9.0/js/src/tests/jstests.list 2019-12-10 09:57:48.344145212 +0100
|
||||
@@ -454,6 +454,10 @@
|
||||
# Assumes little-endian IEEE representation of floating point numbers
|
||||
fails-if(xulRuntime.XPCOMABI.match(/s390x|ppc64-|ppc-/)) script test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js
|
||||
|
||||
+# Fails with system ICU due to different data?
|
||||
+skip script non262/Intl/DateTimeFormat/tz-environment-variable.js
|
||||
+skip script non262/Intl/NumberFormat/formatToParts.js
|
||||
+
|
||||
###########################################################
|
||||
# Tests disabled due to issues in test262 importer script #
|
||||
###########################################################
|
59
Update-to-ICU-61-Part-3-Update-tests.patch
Normal file
59
Update-to-ICU-61-Part-3-Update-tests.patch
Normal file
|
@ -0,0 +1,59 @@
|
|||
From: =?utf-8?q?Andr=C3=A9_Bargull?= <andre.bargull@gmail.com>
|
||||
Date: Tue, 27 Mar 2018 07:40:40 -0700
|
||||
Subject: Update to ICU 61, Part 3: Update tests
|
||||
|
||||
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1445465
|
||||
Applied-upstream: 61, commit:https://hg.mozilla.org/mozilla-central/rev/3214fb35ccd6
|
||||
---
|
||||
.../tests/non262/Intl/NumberFormat/StringBuffer.js | 26 +++++++++++++++++++---
|
||||
.../non262/Intl/NumberFormat/formatToParts.js | 1 -
|
||||
2 files changed, 23 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: mozjs-60.8.0/js/src/tests/non262/Intl/NumberFormat/StringBuffer.js
|
||||
===================================================================
|
||||
--- mozjs-60.8.0.orig/js/src/tests/non262/Intl/NumberFormat/StringBuffer.js
|
||||
+++ mozjs-60.8.0/js/src/tests/non262/Intl/NumberFormat/StringBuffer.js
|
||||
@@ -10,8 +10,28 @@
|
||||
|
||||
var format = new Intl.NumberFormat("it-IT", {minimumFractionDigits: 1});
|
||||
|
||||
-assertEq(format.format(1123123123123123123123.1), "1.123.123.123.123.120.000.000,0");
|
||||
-assertEq(format.format(12123123123123123123123.1), "12.123.123.123.123.100.000.000,0");
|
||||
-assertEq(format.format(123123123123123123123123.1), "123.123.123.123.123.000.000.000,0");
|
||||
+assertEq(format.format(1123123123123123123123.1), "1.123.123.123.123.123.100.000,0");
|
||||
+assertEq(format.format(12123123123123123123123.1), "12.123.123.123.123.122.000.000,0");
|
||||
+assertEq(format.format(123123123123123123123123.1), "123.123.123.123.123.120.000.000,0");
|
||||
+
|
||||
+// Ensure the ICU output matches Number.prototype.toFixed.
|
||||
+function formatToFixed(x) {
|
||||
+ var mfd = format.resolvedOptions().maximumFractionDigits;
|
||||
+ var s = x.toFixed(mfd);
|
||||
+
|
||||
+ // To keep it simple we assume |s| is always in exponential form.
|
||||
+ var m = s.match(/^(\d)\.(\d+)e\+(\d+)$/);
|
||||
+ assertEq(m !== null, true);
|
||||
+ s = m[1] + m[2].padEnd(m[3], "0");
|
||||
+
|
||||
+ // Group digits and append fractional part.
|
||||
+ m = s.match(/\d{1,3}(?=(?:\d{3})*$)/g);
|
||||
+ assertEq(m !== null, true);
|
||||
+ return m.join(".") + ",0";
|
||||
+}
|
||||
+
|
||||
+assertEq(formatToFixed(1123123123123123123123.1), "1.123.123.123.123.123.100.000,0");
|
||||
+assertEq(formatToFixed(12123123123123123123123.1), "12.123.123.123.123.122.000.000,0");
|
||||
+assertEq(formatToFixed(123123123123123123123123.1), "123.123.123.123.123.120.000.000,0");
|
||||
|
||||
reportCompare(0, 0, "ok");
|
||||
Index: mozjs-60.8.0/js/src/tests/non262/Intl/NumberFormat/formatToParts.js
|
||||
===================================================================
|
||||
--- mozjs-60.8.0.orig/js/src/tests/non262/Intl/NumberFormat/formatToParts.js
|
||||
+++ mozjs-60.8.0/js/src/tests/non262/Intl/NumberFormat/formatToParts.js
|
||||
@@ -215,7 +215,6 @@ assertParts(arPercentFormatter, -135.32,
|
||||
Integer("٥٣٢"),
|
||||
Decimal("٫"),
|
||||
Fraction("٠٠"),
|
||||
- Literal("\xA0"),
|
||||
PercentSign("٪\u{061C}")]);
|
||||
|
||||
// Decimals.
|
64
Update-to-ICU-65-Part-3-Update-tests.patch
Normal file
64
Update-to-ICU-65-Part-3-Update-tests.patch
Normal file
|
@ -0,0 +1,64 @@
|
|||
From d2125e5768325579866948baf295477e3f67c550 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andr=C3=A9=20Bargull?= <andre.bargull@gmail.com>
|
||||
Date: Tue, 22 Oct 2019 08:36:58 +0000
|
||||
Subject: [PATCH] Bug 1583269 - Part 3: Update tests after ICU update.
|
||||
r=jwalden
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
js/src/tests/jstests.list
|
||||
- Enable now passing test262 tests.
|
||||
|
||||
non262/Intl/RelativeTimeFormat/format.js
|
||||
- "minute" and "hour" are now supported in 'text' contexts for relative time formatting.
|
||||
- Also see the now passing test262 tests.
|
||||
|
||||
non262/Intl/NumberFormat/currency-sign-accounting.js
|
||||
non262/Intl/NumberFormat/sign-display.js
|
||||
- Referenced ICU bug has been fixed in ICU 65.
|
||||
|
||||
non262/Intl/NumberFormat/notation-compact-short.js
|
||||
- 万亿 is preferred over 兆 in mainland China; CLDR sources were updated accordingly.
|
||||
|
||||
non262/Intl/NumberFormat/notation-engineering.js
|
||||
non262/Intl/NumberFormat/notation-scientific.js
|
||||
- ICU removed "E0" suffix for non-finite numbers in engineering and scientific contexts.
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D49445
|
||||
|
||||
--HG--
|
||||
extra : moz-landing-system : lando
|
||||
---
|
||||
js/src/tests/jstests.list | 4 ----
|
||||
.../tests/non262/Intl/ListFormat/conjunction-long.js | 2 +-
|
||||
.../Intl/NumberFormat/currency-sign-accounting.js | 3 +--
|
||||
.../non262/Intl/NumberFormat/notation-compact-short.js | 10 +++++-----
|
||||
.../non262/Intl/NumberFormat/notation-engineering.js | 8 ++++----
|
||||
.../non262/Intl/NumberFormat/notation-scientific.js | 8 ++++----
|
||||
js/src/tests/non262/Intl/NumberFormat/sign-display.js | 3 +--
|
||||
js/src/tests/non262/Intl/RelativeTimeFormat/format.js | 8 ++++----
|
||||
8 files changed, 20 insertions(+), 26 deletions(-)
|
||||
|
||||
Index: firefox-60.9.0/js/src/tests/non262/Intl/RelativeTimeFormat/format.js
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/tests/non262/Intl/RelativeTimeFormat/format.js 2019-09-01 15:09:18.000000000 +0200
|
||||
+++ firefox-60.9.0/js/src/tests/non262/Intl/RelativeTimeFormat/format.js 2019-12-09 17:36:51.720845023 +0100
|
||||
@@ -58,13 +58,13 @@
|
||||
assertEq(rtf.format(-1, "second"), "1 second ago");
|
||||
assertEq(rtf.format(1, "second"), "in 1 second");
|
||||
|
||||
- assertEq(rtf.format(0, "minute"), "in 0 minutes");
|
||||
- assertEq(rtf.format(-0, "minute"), "in 0 minutes");
|
||||
+ assertEq(rtf.format(0, "minute"), "this minute");
|
||||
+ assertEq(rtf.format(-0, "minute"), "this minute");
|
||||
assertEq(rtf.format(-1, "minute"), "1 minute ago");
|
||||
assertEq(rtf.format(1, "minute"), "in 1 minute");
|
||||
|
||||
- assertEq(rtf.format(0, "hour"), "in 0 hours");
|
||||
- assertEq(rtf.format(-0, "hour"), "in 0 hours");
|
||||
+ assertEq(rtf.format(0, "hour"), "this hour");
|
||||
+ assertEq(rtf.format(-0, "hour"), "this hour");
|
||||
assertEq(rtf.format(-1, "hour"), "1 hour ago");
|
||||
assertEq(rtf.format(1, "hour"), "in 1 hour");
|
||||
|
15
emitter.patch
Normal file
15
emitter.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
--- a/python/mozbuild/mozbuild/frontend/emitter.py
|
||||
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
|
||||
@@ -1127,11 +1127,6 @@
|
||||
raise SandboxValidationError('Path specified in LOCAL_INCLUDES '
|
||||
'does not exist: %s (resolved to %s)' % (local_include,
|
||||
full_path), context)
|
||||
- if (full_path == context.config.topsrcdir or
|
||||
- full_path == context.config.topobjdir):
|
||||
- raise SandboxValidationError('Path specified in LOCAL_INCLUDES '
|
||||
- 'is not allowed: %s (resolved to %s)' % (local_include,
|
||||
- full_path), context)
|
||||
include_obj = LocalInclude(context, local_include)
|
||||
local_includes.append(include_obj.path.full_path)
|
||||
yield include_obj
|
||||
|
26
emitter_test.patch
Normal file
26
emitter_test.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
|
||||
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
|
||||
@@ -999,22 +999,6 @@
|
||||
|
||||
self.assertEqual(local_includes, expected)
|
||||
|
||||
- def test_local_includes_invalid(self):
|
||||
- """Test that invalid LOCAL_INCLUDES are properly detected."""
|
||||
- reader = self.reader('local_includes-invalid/srcdir')
|
||||
-
|
||||
- with self.assertRaisesRegexp(
|
||||
- SandboxValidationError,
|
||||
- 'Path specified in LOCAL_INCLUDES is not allowed:'):
|
||||
- objs = self.read_topsrcdir(reader)
|
||||
-
|
||||
- reader = self.reader('local_includes-invalid/objdir')
|
||||
-
|
||||
- with self.assertRaisesRegexp(
|
||||
- SandboxValidationError,
|
||||
- 'Path specified in LOCAL_INCLUDES is not allowed:'):
|
||||
- objs = self.read_topsrcdir(reader)
|
||||
-
|
||||
def test_generated_includes(self):
|
||||
"""Test that GENERATED_INCLUDES is emitted correctly."""
|
||||
reader = self.reader('generated_includes')
|
||||
|
224
enddianness.patch
Normal file
224
enddianness.patch
Normal file
|
@ -0,0 +1,224 @@
|
|||
From f66d410f3ba767efb91c6b9545d373267cd975f2 Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Sat, 7 Sep 2019 20:43:40 +0200
|
||||
Subject: [PATCH] enddianness.patch
|
||||
|
||||
Bug 1488552 - Ensure proper running on 64-bit and 32-bit BE platforms.
|
||||
---
|
||||
js/src/gc/Marking-inl.h | 16 ++++++++++++++++
|
||||
js/src/gc/RelocationOverlay.h | 13 ++++++++++++-
|
||||
js/src/jsfriendapi.h | 8 ++++++++
|
||||
js/src/vm/StringType.h | 13 +++++++++++++
|
||||
4 files changed, 49 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: firefox-60.9.0/js/src/gc/Marking-inl.h
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/gc/Marking-inl.h 2019-09-01 15:09:17.000000000 +0200
|
||||
+++ firefox-60.9.0/js/src/gc/Marking-inl.h 2019-12-09 11:42:31.024301901 +0100
|
||||
@@ -82,12 +82,28 @@
|
||||
MOZ_ASSERT(!isForwarded());
|
||||
// The location of magic_ is important because it must never be valid to see
|
||||
// the value Relocated there in a GC thing that has not been moved.
|
||||
+#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
|
||||
+ // On 32-bit, the magic_ aliases with whatever comes after the first
|
||||
+ // pointer; on little-endian 64-bit, the magic_ aliases with the
|
||||
+ // 32 most significant bits of the pointer, which are the second half.
|
||||
static_assert(offsetof(RelocationOverlay, magic_) ==
|
||||
offsetof(JSObject, group_) + sizeof(uint32_t),
|
||||
"RelocationOverlay::magic_ is in the wrong location");
|
||||
static_assert(offsetof(RelocationOverlay, magic_) ==
|
||||
offsetof(js::Shape, base_) + sizeof(uint32_t),
|
||||
"RelocationOverlay::magic_ is in the wrong location");
|
||||
+#elif JS_BITS_PER_WORD == 64
|
||||
+ // On big-endian 64-bit, the magic_ aliases with the 32 most
|
||||
+ // significant bits of the pointer, but now that's the first half.
|
||||
+ static_assert(offsetof(RelocationOverlay, magic_) ==
|
||||
+ offsetof(JSObject, group_),
|
||||
+ "RelocationOverlay::magic_ is in the wrong location");
|
||||
+ static_assert(offsetof(RelocationOverlay, magic_) ==
|
||||
+ offsetof(js::Shape, base_),
|
||||
+ "RelocationOverlay::magic_ is in the wrong location");
|
||||
+#else
|
||||
+# error "Unknown endianness or word size"
|
||||
+#endif
|
||||
static_assert(
|
||||
offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length),
|
||||
"RelocationOverlay::magic_ is in the wrong location");
|
||||
Index: firefox-60.9.0/js/src/gc/RelocationOverlay.h
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/gc/RelocationOverlay.h 2019-09-01 15:09:17.000000000 +0200
|
||||
+++ firefox-60.9.0/js/src/gc/RelocationOverlay.h 2019-12-09 11:42:31.024301901 +0100
|
||||
@@ -33,14 +33,25 @@
|
||||
/* See comment in js/public/HeapAPI.h. */
|
||||
static const uint32_t Relocated = js::gc::Relocated;
|
||||
|
||||
+#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
|
||||
/*
|
||||
- * Keep the low 32 bits untouched. Use them to distinguish strings from
|
||||
+ * Keep the first 32 bits untouched. Use them to distinguish strings from
|
||||
* objects in the nursery.
|
||||
*/
|
||||
uint32_t preserve_;
|
||||
|
||||
/* Set to Relocated when moved. */
|
||||
uint32_t magic_;
|
||||
+#elif JS_BITS_PER_WORD == 64
|
||||
+ /*
|
||||
+ * On big-endian, we need to reorder to keep preserve_ lined up with the
|
||||
+ * low 32 bits of the aligned group_ pointer in JSObject.
|
||||
+ */
|
||||
+ uint32_t magic_;
|
||||
+ uint32_t preserve_;
|
||||
+#else
|
||||
+# error "Unknown endianness or word size"
|
||||
+#endif
|
||||
|
||||
/* The location |this| was moved to. */
|
||||
Cell* newLocation_;
|
||||
Index: firefox-60.9.0/js/src/jsfriendapi.h
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/jsfriendapi.h 2019-09-01 15:09:18.000000000 +0200
|
||||
+++ firefox-60.9.0/js/src/jsfriendapi.h 2019-12-09 11:42:31.024301901 +0100
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/Casting.h"
|
||||
+#include "mozilla/EndianUtils.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
@@ -609,8 +610,15 @@
|
||||
static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6);
|
||||
static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5);
|
||||
static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1;
|
||||
+#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
|
||||
uint32_t flags;
|
||||
uint32_t length;
|
||||
+#elif JS_BITS_PER_WORD == 64
|
||||
+ uint32_t length;
|
||||
+ uint32_t flags;
|
||||
+#else
|
||||
+# error "Unknown endianness or word size"
|
||||
+#endif
|
||||
union {
|
||||
const JS::Latin1Char* nonInlineCharsLatin1;
|
||||
const char16_t* nonInlineCharsTwoByte;
|
||||
Index: firefox-60.9.0/js/src/vm/StringType.h
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/vm/StringType.h 2019-09-01 15:09:39.000000000 +0200
|
||||
+++ firefox-60.9.0/js/src/vm/StringType.h 2019-12-09 11:42:31.028301901 +0100
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef vm_StringType_h
|
||||
#define vm_StringType_h
|
||||
|
||||
+#include "mozilla/EndianUtils.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
#include "mozilla/Range.h"
|
||||
@@ -168,8 +169,20 @@
|
||||
struct Data {
|
||||
union {
|
||||
struct {
|
||||
+#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
|
||||
uint32_t flags; /* JSString */
|
||||
uint32_t length; /* JSString */
|
||||
+#elif JS_BITS_PER_WORD == 64
|
||||
+ /*
|
||||
+ * On big-endian, we need to reorder to keep flags lined up
|
||||
+ * with the low 32 bits of the aligned group_ pointer in
|
||||
+ * JSObject.
|
||||
+ */
|
||||
+ uint32_t length; /* JSString */
|
||||
+ uint32_t flags; /* JSString */
|
||||
+#else
|
||||
+# error "Unknown endianness or word size"
|
||||
+#endif
|
||||
};
|
||||
uintptr_t flattenData; /* JSRope (temporary while flattening) */
|
||||
} u1;
|
||||
Index: firefox-60.9.0/js/src/js-config.h.in
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/js-config.h.in 2019-09-01 15:09:18.000000000 +0200
|
||||
+++ firefox-60.9.0/js/src/js-config.h.in 2019-12-09 11:43:13.052302975 +0100
|
||||
@@ -38,6 +38,13 @@
|
||||
/* Define to 1 if SpiderMonkey should include ctypes support. */
|
||||
#undef JS_HAS_CTYPES
|
||||
|
||||
+/* Define to 1 if SpiderMonkey should include trace logging support. */
|
||||
+#undef JS_TRACE_LOGGING
|
||||
+
|
||||
+/* Define to 1 if SpiderMonkey should include a breakpoint function for
|
||||
+ * artificial OOMs. */
|
||||
+#undef JS_OOM_BREAKPOINT
|
||||
+
|
||||
/* Define to 1 if SpiderMonkey should support the ability to perform
|
||||
entirely too much GC. */
|
||||
#undef JS_GC_ZEAL
|
||||
@@ -48,12 +55,25 @@
|
||||
/* Define to 1 to perform extra assertions and heap poisoning. */
|
||||
#undef JS_CRASH_DIAGNOSTICS
|
||||
|
||||
+/* Define to 1 if SpiderMonkey is compiled with support for private values at
|
||||
+ * odd-numbered memory addresses. */
|
||||
+#undef JS_UNALIGNED_PRIVATE_VALUES
|
||||
+
|
||||
/* Define to 1 if SpiderMonkey is in NUNBOX32 mode. */
|
||||
#undef JS_NUNBOX32
|
||||
|
||||
/* Define to 1 if SpiderMonkey is in PUNBOX64 mode. */
|
||||
#undef JS_PUNBOX64
|
||||
|
||||
+/* Define exactly one of these to 1 to indicate JIT code generation mode. */
|
||||
+#undef JS_CODEGEN_NONE
|
||||
+#undef JS_CODEGEN_ARM
|
||||
+#undef JS_CODEGEN_ARM64
|
||||
+#undef JS_CODEGEN_MIPS32
|
||||
+#undef JS_CODEGEN_MIPS64
|
||||
+#undef JS_CODEGEN_X86
|
||||
+#undef JS_CODEGEN_X64
|
||||
+
|
||||
/* MOZILLA JSAPI version number components */
|
||||
#undef MOZJS_MAJOR_VERSION
|
||||
#undef MOZJS_MINOR_VERSION
|
||||
Index: firefox-60.9.0/js/src/jsapi.cpp
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/jsapi.cpp 2019-09-01 15:09:18.000000000 +0200
|
||||
+++ firefox-60.9.0/js/src/jsapi.cpp 2019-12-09 11:43:13.052302975 +0100
|
||||
@@ -115,6 +115,14 @@
|
||||
#define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
|
||||
#endif
|
||||
|
||||
+// See preprocessor definition of JS_BITS_PER_WORD in jstypes.h; make sure
|
||||
+// JS_64BIT (used internally) agrees with it
|
||||
+#ifdef JS_64BIT
|
||||
+static_assert(JS_BITS_PER_WORD == 64, "values must be in sync");
|
||||
+#else
|
||||
+static_assert(JS_BITS_PER_WORD == 32, "values must be in sync");
|
||||
+#endif
|
||||
+
|
||||
JS_PUBLIC_API bool JS::CallArgs::requireAtLeast(JSContext* cx,
|
||||
const char* fnname,
|
||||
unsigned required) const {
|
||||
Index: firefox-60.9.0/js/src/jstypes.h
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/jstypes.h 2019-09-01 15:09:18.000000000 +0200
|
||||
+++ firefox-60.9.0/js/src/jstypes.h 2019-12-09 11:43:13.052302975 +0100
|
||||
@@ -141,12 +141,17 @@
|
||||
#define JS_BITS_PER_BYTE 8
|
||||
#define JS_BITS_PER_BYTE_LOG2 3
|
||||
|
||||
-#if defined(JS_64BIT)
|
||||
+#if (defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 8) || \
|
||||
+ (defined(UINTPTR_MAX) && UINTPTR_MAX == 0xFFFFFFFFFFFFFFFFu)
|
||||
#define JS_BITS_PER_WORD 64
|
||||
#else
|
||||
#define JS_BITS_PER_WORD 32
|
||||
#endif
|
||||
|
||||
+static_assert(sizeof(void*) == 8 ? JS_BITS_PER_WORD == 64
|
||||
+ : JS_BITS_PER_WORD == 32,
|
||||
+ "preprocessor and compiler must agree");
|
||||
+
|
||||
/***********************************************************************
|
||||
** MACROS: JS_FUNC_TO_DATA_PTR
|
||||
** JS_DATA_TO_FUNC_PTR
|
34
icu_sources_data-Write-command-output-to-our-stderr.patch
Normal file
34
icu_sources_data-Write-command-output-to-our-stderr.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Mon, 9 Oct 2017 09:23:14 +0100
|
||||
Subject: icu_sources_data: Write command output to our stderr
|
||||
|
||||
Saying "See output in /tmp/foobar" is all very well for a developer
|
||||
build, but on a buildd our /tmp is going to get thrown away after
|
||||
the build. Just log the usual way instead.
|
||||
---
|
||||
intl/icu_sources_data.py | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/intl/icu_sources_data.py b/intl/icu_sources_data.py
|
||||
index 8cf9290..7d2d983 100644
|
||||
--- a/intl/icu_sources_data.py
|
||||
+++ b/intl/icu_sources_data.py
|
||||
@@ -84,16 +84,13 @@ def update_sources(topsrcdir):
|
||||
|
||||
def try_run(name, command, cwd=None, **kwargs):
|
||||
try:
|
||||
- with tempfile.NamedTemporaryFile(prefix=name, delete=False) as f:
|
||||
- subprocess.check_call(command, cwd=cwd, stdout=f,
|
||||
+ subprocess.check_call(command, cwd=cwd, stdout=sys.stderr,
|
||||
stderr=subprocess.STDOUT, **kwargs)
|
||||
except subprocess.CalledProcessError:
|
||||
- print('''Error running "{}" in directory {}
|
||||
- See output in {}'''.format(' '.join(command), cwd, f.name),
|
||||
+ print('''Error running "{}" in directory {}'''.format(' '.join(command), cwd),
|
||||
file=sys.stderr)
|
||||
return False
|
||||
else:
|
||||
- os.unlink(f.name)
|
||||
return True
|
||||
|
||||
|
26
icu_sources_data.py-Decouple-from-Mozilla-build-system.patch
Normal file
26
icu_sources_data.py-Decouple-from-Mozilla-build-system.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Mon, 9 Oct 2017 09:22:12 +0100
|
||||
Subject: icu_sources_data.py: Decouple from Mozilla build system
|
||||
|
||||
mozpack.path is a wrapper around os.path that normalizes path
|
||||
separators on Windows, but on Unix we only have one path separator
|
||||
so there's nothing to normalize. Avoid needing to import all of it.
|
||||
---
|
||||
intl/icu_sources_data.py | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/intl/icu_sources_data.py b/intl/icu_sources_data.py
|
||||
index 98c0ccb..8cf9290 100644
|
||||
--- a/intl/icu_sources_data.py
|
||||
+++ b/intl/icu_sources_data.py
|
||||
@@ -19,7 +19,9 @@ import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
-from mozpack import path as mozpath
|
||||
+# Close enough
|
||||
+import os.path as mozpath
|
||||
+mozpath.normsep = lambda p: p
|
||||
|
||||
|
||||
def find_source_file(dir, filename):
|
12
init_patch.patch
Normal file
12
init_patch.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- a/python/mozbuild/mozbuild/configure/__init__.py
|
||||
+++ b/python/mozbuild/mozbuild/configure/__init__.py
|
||||
@@ -421,7 +421,7 @@
|
||||
# All options should have been removed (handled) by now.
|
||||
for arg in self._helper:
|
||||
without_value = arg.split('=', 1)[0]
|
||||
- raise InvalidOptionError('Unknown option: %s' % without_value)
|
||||
+ # raise InvalidOptionError('Unknown option: %s' % without_value)
|
||||
|
||||
# Run the execution queue
|
||||
for func, args in self._execution_queue:
|
||||
|
36
jsproperty-endian.patch
Normal file
36
jsproperty-endian.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
From a95105b7846c29c5bd3868719621ab3679d9932b Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Sat, 7 Sep 2019 21:45:58 +0200
|
||||
Subject: [PATCH] jsproperty-endian.patch
|
||||
|
||||
Bug 1543659 - fix JSPropertySpec::ValueWrapper on 64-bit big-endian platforms
|
||||
|
||||
Add some padding to make the union's int32 member correspond to the
|
||||
low-order bits of the string member. This fixes TypedArray tests on
|
||||
s390x.
|
||||
---
|
||||
js/src/jsapi.h | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/js/src/jsapi.h b/js/src/jsapi.h
|
||||
index 0f11787f6..f1c084f6a 100644
|
||||
--- a/js/src/jsapi.h
|
||||
+++ b/js/src/jsapi.h
|
||||
@@ -1581,7 +1581,14 @@ struct JSPropertySpec {
|
||||
uintptr_t type;
|
||||
union {
|
||||
const char* string;
|
||||
+#if MOZ_BIG_ENDIAN && JS_BITS_PER_WORD == 64
|
||||
+ struct {
|
||||
+ uint32_t padding;
|
||||
+ int32_t int32;
|
||||
+ };
|
||||
+#else
|
||||
int32_t int32;
|
||||
+#endif
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
11
mozjs60-fix-armv6-build.patch
Normal file
11
mozjs60-fix-armv6-build.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- firefox-52.6.0esr.orig/build/autoconf/arch.m4 2018-05-22 15:30:36.618747357 +0200
|
||||
+++ firefox-52.6.0esr/build/autoconf/arch.m4 2018-05-22 15:30:59.518836761 +0200
|
||||
@@ -216,7 +216,7 @@ if test "$CPU_ARCH" = "arm"; then
|
||||
|
||||
AC_MSG_CHECKING(ARM version support in compiler)
|
||||
dnl Determine the target ARM architecture (5 for ARMv5, v5T, v5E, etc.; 6 for ARMv6, v6K, etc.)
|
||||
- ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]][[0-9]]*\).*/\1/p'`
|
||||
+ ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]][[0-9]]*\).*/\1/p' | head -n 1`
|
||||
AC_MSG_RESULT("$ARM_ARCH")
|
||||
|
||||
AC_MSG_CHECKING(for ARM NEON support in compiler)
|
25
mozjs60-mozilla-s390-bigendian.patch
Normal file
25
mozjs60-mozilla-s390-bigendian.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
# HG changeset patch
|
||||
# Parent 20a1a6ad46d5a4ec83d9800614fc288bf79e14a8
|
||||
|
||||
diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4
|
||||
--- a/build/autoconf/icu.m4
|
||||
+++ b/build/autoconf/icu.m4
|
||||
@@ -73,17 +73,17 @@ if test -n "$USE_ICU"; then
|
||||
if test x"$version" = x; then
|
||||
AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno])
|
||||
fi
|
||||
MOZ_ICU_VERSION="$version"
|
||||
|
||||
# TODO: the l is actually endian-dependent
|
||||
# We could make this set as 'l' or 'b' for little or big, respectively,
|
||||
# but we'd need to check in a big-endian version of the file.
|
||||
- ICU_DATA_FILE="icudt${version}l.dat"
|
||||
+ ICU_DATA_FILE="icudt${version}b.dat"
|
||||
|
||||
MOZ_ICU_DATA_ARCHIVE=
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_ICU_VERSION)
|
||||
AC_SUBST(ENABLE_INTL_API)
|
||||
AC_SUBST(USE_ICU)
|
||||
AC_SUBST(ICU_DATA_FILE)
|
120
mozjs60.changes
Normal file
120
mozjs60.changes
Normal file
|
@ -0,0 +1,120 @@
|
|||
* Thu Dec 19 2019 fcrozat@suse.com
|
||||
- SLE 15 SP2 will ship with ICU 65, apply patches accordingly
|
||||
(jsc#SLE-11118).
|
||||
* Fri Dec 13 2019 fcrozat@suse.com
|
||||
- Remove Update-to-ICU-64-Part-3-Update-tests.patch, SLE is back to
|
||||
ICU 60.x.
|
||||
* Tue Dec 10 2019 fcrozat@suse.com
|
||||
- Add Don-t-run-non262-extensions-clone-errors.js-on-s390x.patch,
|
||||
based on Debian patch, to enable back tests on s390x (and ppc64).
|
||||
- Add tests-Expect-a-test-to-fail-on-big-endian.patch, based on
|
||||
Debian patch, accept a test failure on big-endian like s390x.
|
||||
- Ensure build for x86 is with SSE2 (SSE for floating point math),*
|
||||
required by upstream (requires switching package to i686).
|
||||
- enable back tests on s390x and i586
|
||||
- Remove build workaround on ppc64le.
|
||||
- Reorder/change build flags to follow Debian and Fedora.
|
||||
- Enable back tests on all platforms (except JIT on s390).
|
||||
- Ensure we don't build bundled security libs.
|
||||
- Don't ship a icu bundle for big-endian, recreate it instead, with
|
||||
patches icu_sources_data-Write-command-output-to-our-stderr.patch
|
||||
and icu_sources_data.py-Decouple-from-Mozilla-build-system.patch.
|
||||
- Update patch enddianness.patch with more fixes from
|
||||
bmo#1590907 to fix strings usage on s390x (bsc#1158355).
|
||||
- Add Skip-some-i18n-tests-because-we-are-now-using-system-ICU.patch
|
||||
Update-to-ICU-61-Part-3-Update-tests.patch,
|
||||
Update-to-ICU-64-Part-3-Update-tests.patch,
|
||||
Update-to-ICU-65-Part-3-Update-tests.patch to allow building
|
||||
with system icu
|
||||
- Add flag to switch between system icu and embedded icu and
|
||||
enable system icu.
|
||||
* Fri Oct 4 2019 mgorse@suse.com
|
||||
- Update to version 60.9.0
|
||||
- rebased riscv-support.patch
|
||||
- Remove source modifications that made some private functions
|
||||
public. Probably not needed anymore, and was introducing a
|
||||
build error
|
||||
- Regenerate icudt60b.dat.xz
|
||||
- Added some upstream bug fixes included in Debian and Fedora:
|
||||
Always-use-the-equivalent-year-to-determine-the-time-zone.patch
|
||||
emitter.patch
|
||||
emitter_test.patch
|
||||
init_patch.patch
|
||||
enddianness.patch
|
||||
jsproperty-endian.patch
|
||||
Save-x28-before-clobbering-it-in-the-regex-compiler.patch
|
||||
Save-and-restore-non-volatile-x28-on-ARM64-for-generated-unboxed-object-constructor.patch
|
||||
* Thu Jun 20 2019 dimstar@opensuse.org
|
||||
- Drop python-wheel BuildRequires: causes a build cycle, and is not
|
||||
needed.
|
||||
* Wed May 29 2019 bjorn.lie@gmail.com
|
||||
- No longer pass --enable-debug to configure. It is not needed for
|
||||
our endusers, and will only slow down the engine. Nor have we
|
||||
built it with debug in the past.
|
||||
* Mon Feb 11 2019 schwab@suse.de
|
||||
- riscv-support.patch: fix last change
|
||||
* Sun Feb 3 2019 wr@rosenauer.org
|
||||
- update to ESR codebase (60.4.0)
|
||||
- rebased riscv-support.patch
|
||||
* Sat Feb 2 2019 schwab@suse.de
|
||||
- mozjs60-mozilla-s390-bigendian.patch: rediff and apply on more big
|
||||
endian archs
|
||||
- mozjs60-xulrunner-24.0-s390-inlines.patch: remove
|
||||
- Replace icudt58b.dat.xz by icudt60b.dat.xz
|
||||
- riscv-support.patch: add basic support for riscv64
|
||||
* Wed Oct 24 2018 bjorn.lie@gmail.com
|
||||
- Update to version 60.2.2:
|
||||
* Bug fix release.
|
||||
- Drop mozjs60-fix-memory-leak-in-LCovCompartment-esr60.patch and
|
||||
mozjs60-prevent-an-internal-gcc-8_0_1-error.patch: Fixed upstream
|
||||
* Thu Sep 13 2018 guillaume.gardet@opensuse.org
|
||||
- Use memory-constraints to avoid OOM errors
|
||||
* Wed Aug 1 2018 luc14n0@linuxmail.org
|
||||
- Initial package (based on mozjs52), version 60.1.0:
|
||||
* New syntax:
|
||||
- `for await (... of ...)` syntax is used for async iteration;
|
||||
- The rest operator is now supported in object destructuring:
|
||||
e.g. `({a, b, ...cd} = {a: 1, b: 2, c: 3, d: 4});`;
|
||||
- The spread operator is now supported in object literals: e.g.
|
||||
`mergedObject = {...obj1, ...obj2};`;
|
||||
- Generator methods can now be async, using the `async
|
||||
function*` syntax, or `async* f() {...}` method shorthand;
|
||||
- It's now allowed to omit the variable binding from a catch
|
||||
statement, if you don't need to access the thrown exception:
|
||||
`try {...} catch {}`.
|
||||
* New APIs:
|
||||
- Promise.prototype.finally(), popular in many third-party
|
||||
Promise libraries, is now available natively;
|
||||
- String.prototype.toLocaleLowerCase() and
|
||||
String.prototype.toLocaleUpperCase() now take an optional
|
||||
locale or array of locales;
|
||||
- Intl.PluralRules is now available;
|
||||
- Intl.NumberFormat.protoype.formatToParts() is now available;
|
||||
- Intl.Collator now has a caseFirst option;
|
||||
- Intl.DateTimeFormat now has an hourCycle option.
|
||||
* New behaviour: There are a lot of minor behaviour changes as
|
||||
SpiderMonkey's JS implementation conforms ever closer to
|
||||
ECMAScript standards.
|
||||
* Backwards-incompatible changes:
|
||||
- Conditional catch clauses have been removed, as they were a
|
||||
Mozilla extension which will not be standardized;
|
||||
- The nonstandard `for each (... in ...)` loop was removed;
|
||||
- The nonstandard legacy lambda syntax (`function(x) x*x`) was
|
||||
removed;
|
||||
- The nonstandard Mozilla iteration protocol was removed, as
|
||||
well as nonstandard Mozilla generators, including the
|
||||
Iterator and StopIteration objects, and the
|
||||
Function.prototype.isGenerator() method.
|
||||
- Array comprehensions and generator comprehensions have been
|
||||
removed.
|
||||
- Several nonstandard methods were removed: ArrayBuffer.slice()
|
||||
(but not the standard version, ArrayBuffer.prototype.\
|
||||
slice()), Date.prototype.toLocaleFormat(), Function.\
|
||||
prototype.isGenerator(), Object.prototype.watch(), and
|
||||
Object.prototype.unwatch().
|
||||
- Drop bmo1176787.patch inherited from mozjs52: fixed upstream.
|
||||
- Add patches:
|
||||
mozjs60-fix-memory-leak-in-LCovCompartment-esr60.patch
|
||||
(bmo#1478679) and
|
||||
mozjs60-prevent-an-internal-gcc-8_0_1-error.patch
|
||||
(bmo#1458382).
|
247
mozjs60.spec
Normal file
247
mozjs60.spec
Normal file
|
@ -0,0 +1,247 @@
|
|||
#
|
||||
# spec file for package mozjs60
|
||||
#
|
||||
# Copyright (c) 2022-2023 ZhuningOS
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
# Firefox only supports i686
|
||||
%ifarch %ix86
|
||||
ExclusiveArch: i586 i686
|
||||
BuildArch: i686
|
||||
%{expand:%%global optflags %(echo "%optflags"|sed -e s/i586/i686/) -march=i686 -mtune=generic -msse2 -mfpmath=sse}
|
||||
%endif
|
||||
|
||||
# use system icu
|
||||
# keep fallback if something goes wrong
|
||||
%bcond_without system_icu
|
||||
|
||||
%global major 60
|
||||
Name: mozjs%{major}
|
||||
Version: 60.9.0
|
||||
Release: 4.40
|
||||
Summary: MozJS, or SpiderMonkey, is Mozilla's JavaScript engine written in C and C++
|
||||
License: MPL-2.0
|
||||
Group: Development/Libraries/Other
|
||||
URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
|
||||
Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
|
||||
Source1: LICENSE.txt
|
||||
Patch0: mozjs60-fix-armv6-build.patch
|
||||
Patch1: mozjs60-mozilla-s390-bigendian.patch
|
||||
Patch2: riscv-support.patch
|
||||
Patch3: Always-use-the-equivalent-year-to-determine-the-time-zone.patch
|
||||
# Build fixes - https://hg.mozilla.org/mozilla-central/rev/ca36a6c4f8a4a0ddaa033fdbe20836d87bbfb873
|
||||
Patch4: emitter.patch
|
||||
Patch5: emitter_test.patch
|
||||
Patch6: init_patch.patch
|
||||
# s390x fixes:
|
||||
# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/enddianness.patch
|
||||
Patch7: enddianness.patch
|
||||
# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/jsproperty-endian.patch
|
||||
Patch8: jsproperty-endian.patch
|
||||
# aarch64 fixes for -O2
|
||||
Patch9: Save-x28-before-clobbering-it-in-the-regex-compiler.patch
|
||||
Patch10: Save-and-restore-non-volatile-x28-on-ARM64-for-generated-unboxed-object-constructor.patch
|
||||
# based on https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/tests-Skip-a-test-on-s390x.patch
|
||||
Patch11: Don-t-run-non262-extensions-clone-errors.js-on-s390x.patch
|
||||
# based on https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/tests-Expect-a-test-to-fail-on-big-endian.patch
|
||||
Patch12: tests-Expect-a-test-to-fail-on-big-endian.patch
|
||||
# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/icu_sources_data.py-Decouple-from-Mozilla-build-system.patch
|
||||
Patch13: icu_sources_data.py-Decouple-from-Mozilla-build-system.patch
|
||||
# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/icu_sources_data-Write-command-output-to-our-stderr.patch
|
||||
Patch14: icu_sources_data-Write-command-output-to-our-stderr.patch
|
||||
# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/Skip-some-i18n-tests-because-we-are-now-using-system-ICU.patch
|
||||
Patch15: Skip-some-i18n-tests-because-we-are-now-using-system-ICU.patch
|
||||
# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/Update-to-ICU-61-Part-3-Update-tests.patch
|
||||
Patch16: Update-to-ICU-61-Part-3-Update-tests.patch
|
||||
# fix testsuite when built with ICU 65 https://phabricator.services.mozilla.com/D49445 https://unicode-org.atlassian.net/browse/ICU-20654
|
||||
Patch17: Update-to-ICU-65-Part-3-Update-tests.patch
|
||||
|
||||
BuildRequires: autoconf213
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: memory-constraints
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-pip
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: pkgconfig(libffi)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
%if %{with system_icu}
|
||||
BuildRequires: pkgconfig(icu-i18n)
|
||||
%endif
|
||||
|
||||
%description
|
||||
JavaScript is the Netscape-developed object scripting language used in millions
|
||||
of web pages and server applications worldwide. Netscape's JavaScript is a
|
||||
super set of the ECMA-262 Edition 3 (ECMAScript) standard scripting language,
|
||||
with only mild differences from the published standard.
|
||||
|
||||
This package contains the JavaScript's executable.
|
||||
|
||||
%package -n libmozjs-%{major}
|
||||
Summary: JavaScript's library
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libmozjs-%{major}
|
||||
JavaScript is the Netscape-developed object scripting language used in millions
|
||||
of web pages and server applications worldwide. Netscape's JavaScript is a
|
||||
superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language,
|
||||
with only mild differences from the published standard.
|
||||
|
||||
This package contains the JavaScript's library.
|
||||
|
||||
%package devel
|
||||
Summary: Development files and tools for %{name}
|
||||
Group: Development/Libraries/Other
|
||||
Requires: libmozjs-%{major} = %{version}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
JavaScript is the Netscape-developed object scripting language used in millions
|
||||
of web pages and server applications worldwide. Netscape's JavaScript is a
|
||||
super set of the ECMA-262 Edition 3 (ECMAScript) standard scripting language,
|
||||
with only mild differences from the published standard.
|
||||
|
||||
This package contains the header file and tools to develop with JavaScript.
|
||||
|
||||
%prep
|
||||
%setup -q -n firefox-%{version}
|
||||
%patch0 -p1
|
||||
%ifarch s390 s390x ppc ppc64 m68k
|
||||
%patch1 -p1
|
||||
%endif
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
|
||||
# only supported with ICU >= 61
|
||||
%patch16 -p1
|
||||
# only supported with ICU >= 65 (https://unicode-org.atlassian.net/browse/ICU-20654)
|
||||
%patch17 -p1
|
||||
%endif
|
||||
|
||||
# make sure we don't ever accidentally link against bundled security libs
|
||||
rm -rf security/
|
||||
|
||||
# Remove zlib directory to make sure the use of zlib from distro:
|
||||
rm -rf modules/zlib
|
||||
|
||||
# FIX-ME: This should be removed when bmo#1322212 and bmo#1264836 are resolved:
|
||||
%if !%{with system_icu}
|
||||
%ifarch s390 s390x ppc ppc64 m68k
|
||||
echo "Generate big endian version of config/external/icu/data/icud58l.dat"
|
||||
python intl/icu_sources_data.py .
|
||||
ls -l config/external/icu/data
|
||||
rm -f config/external/icu/data/icudt*l.dat
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%build
|
||||
cd js/src
|
||||
# No need to add build time to the binaries:
|
||||
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
|
||||
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
||||
TIME="\"$(date -d "${modified}" "+%%R")\""
|
||||
find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
|
||||
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS=$CFLAGS
|
||||
autoconf-2.13
|
||||
# An out of source directory build is wanted here to prevent failures:
|
||||
mkdir build_OPT.OBJ
|
||||
cd build_OPT.OBJ
|
||||
../configure \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} \
|
||||
--includedir=%{_includedir} \
|
||||
%if %{with system_icu}
|
||||
--with-system-icu \
|
||||
%else
|
||||
--without-system-icu \
|
||||
%endif
|
||||
--enable-posix-nspr-emulation \
|
||||
--with-system-zlib \
|
||||
--enable-tests \
|
||||
--disable-strip \
|
||||
--with-intl-api \
|
||||
--enable-readline \
|
||||
--enable-shared-js \
|
||||
--disable-optimize \
|
||||
--enable-pie \
|
||||
--disable-jemalloc \
|
||||
|
||||
# do not eat all memory
|
||||
%limit_build -m 1300
|
||||
|
||||
%make_build
|
||||
|
||||
%install
|
||||
cd js/src/build_OPT.OBJ
|
||||
%make_install
|
||||
# Remove unneeded executable bits:
|
||||
chmod a-x %{buildroot}%{_libdir}/pkgconfig/*.pc \
|
||||
%if !%{with system_icu}
|
||||
%{buildroot}%{_includedir}/mozjs-%{major}/unicode/selfmt.h \
|
||||
%endif
|
||||
%{buildroot}%{_includedir}/mozjs-%{major}/js-config.h
|
||||
# Do not install static libraries:
|
||||
rm -f %{buildroot}%{_libdir}/*.a %{buildroot}%{_libdir}/*.ajs %{buildroot}%{_bindir}/js-config
|
||||
# Install files, not symlinks to build directory:
|
||||
pushd %{buildroot}%{_includedir}
|
||||
for link in `find . -type l`; do
|
||||
header=`readlink $link`
|
||||
rm -f $link
|
||||
cp -p $header $link
|
||||
done
|
||||
popd
|
||||
install -m 755 dist/bin/js-gdb.py %{buildroot}%{_bindir}
|
||||
# Install license file
|
||||
install -m 644 %{SOURCE1} .
|
||||
|
||||
%check
|
||||
# NEVER DISABLE THOSE TESTS : if they aren't passing, something is wrong,
|
||||
# don't submit with tests disabled
|
||||
cd js/src/build_OPT.OBJ
|
||||
# Run SpiderMonkey tests:
|
||||
../tests/jstests.py -d -s -t 1800 --no-progress ../build_OPT.OBJ/js/src/shell/js \
|
||||
%ifnarch s390
|
||||
;
|
||||
%else
|
||||
|| :
|
||||
%endif
|
||||
|
||||
# Run basic JIT tests. JIT is disabled on s390 (see bmo#1415360 comment 6):
|
||||
%ifnarch s390
|
||||
../jit-test/jit_test.py -s -t 1800 --no-progress ../build_OPT.OBJ/js/src/shell/js basic
|
||||
%endif
|
||||
|
||||
%post -n libmozjs-%{major} -p /sbin/ldconfig
|
||||
%postun -n libmozjs-%{major} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license js/src/build_OPT.OBJ/LICENSE.txt
|
||||
%doc README.txt
|
||||
%{_bindir}/js%{major}
|
||||
|
||||
%files -n libmozjs-%{major}
|
||||
%{_libdir}/*.so
|
||||
|
||||
%files devel
|
||||
%{_bindir}/js%{major}-config
|
||||
%{_bindir}/js-gdb.py
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_includedir}/mozjs-%{major}
|
||||
|
||||
%changelog
|
80
riscv-support.patch
Normal file
80
riscv-support.patch
Normal file
|
@ -0,0 +1,80 @@
|
|||
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
|
||||
index 83b8d70..e5f3182 100644
|
||||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -676,6 +676,9 @@ def split_triplet(triplet, allow_unknown
|
||||
elif cpu == 'sh4':
|
||||
canonical_cpu = 'sh4'
|
||||
endianness = 'little'
|
||||
+ elif cpu == 'riscv64':
|
||||
+ canonical_cpu = 'riscv64'
|
||||
+ endianness = 'little'
|
||||
elif allow_unknown:
|
||||
canonical_cpu = cpu
|
||||
endianness = 'unknown'
|
||||
diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h
|
||||
index a8970b0..41503c8 100644
|
||||
--- a/js/src/jit/AtomicOperations.h
|
||||
+++ b/js/src/jit/AtomicOperations.h
|
||||
@@ -393,6 +393,8 @@ inline bool AtomicOperations::isLockfree
|
||||
#include "jit/none/AtomicOperations-feeling-lucky.h"
|
||||
#elif defined(__s390__) || defined(__s390x__)
|
||||
#include "jit/none/AtomicOperations-feeling-lucky.h"
|
||||
+#elif defined(__riscv)
|
||||
+# include "jit/none/AtomicOperations-feeling-lucky.h"
|
||||
#else
|
||||
#error "No AtomicOperations support provided for this platform"
|
||||
#endif
|
||||
diff --git a/js/src/jit/none/AtomicOperations-feeling-lucky.h b/js/src/jit/none/AtomicOperations-feeling-lucky.h
|
||||
index da57228..5167e82 100644
|
||||
--- a/js/src/jit/none/AtomicOperations-feeling-lucky.h
|
||||
+++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h
|
||||
@@ -80,6 +80,14 @@
|
||||
#define GNUC_COMPATIBLE
|
||||
#endif
|
||||
|
||||
+#ifdef __riscv
|
||||
+# define GNUC_COMPATIBLE
|
||||
+# if __riscv_xlen == 64
|
||||
+# define HAS_64BIT_ATOMICS
|
||||
+# define HAS_64BIT_LOCKFREE
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
// The default implementation tactic for gcc/clang is to use the newer
|
||||
// __atomic intrinsics added for use in C++11 <atomic>. Where that
|
||||
// isn't available, we use GCC's older __sync functions instead.
|
||||
diff --git a/mfbt/tests/TestPoisonArea.cpp b/mfbt/tests/TestPoisonArea.cpp
|
||||
index 06c24ed..fba9263 100644
|
||||
--- a/mfbt/tests/TestPoisonArea.cpp
|
||||
+++ b/mfbt/tests/TestPoisonArea.cpp
|
||||
@@ -168,6 +168,9 @@ static const ia64_instr _return_instr =
|
||||
#define RETURN_INSTR _return_instr
|
||||
#define RETURN_INSTR_TYPE ia64_instr
|
||||
|
||||
+#elif defined __riscv
|
||||
+#define RETURN_INSTR 0x80828082 /* ret; ret */
|
||||
+
|
||||
#else
|
||||
#error "Need return instruction for this architecture"
|
||||
#endif
|
||||
diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
|
||||
index 33ae5a4..b7be8ce 100644
|
||||
--- a/python/mozbuild/mozbuild/configure/constants.py
|
||||
+++ b/python/mozbuild/mozbuild/configure/constants.py
|
||||
@@ -50,6 +50,7 @@ CPU_bitness = {
|
||||
'mips64': 64,
|
||||
'ppc': 32,
|
||||
'ppc64': 64,
|
||||
+ 'riscv64': 64,
|
||||
's390': 32,
|
||||
's390x': 64,
|
||||
'sh4': 32,
|
||||
@@ -89,6 +90,7 @@ CPU_preprocessor_checks = OrderedDict((
|
||||
('mips64', '__mips64'),
|
||||
('mips32', '__mips__'),
|
||||
('sh4', '__sh__'),
|
||||
+ ('riscv64', '__riscv && __riscv_xlen == 64'),
|
||||
))
|
||||
|
||||
assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
|
23
tests-Expect-a-test-to-fail-on-big-endian.patch
Normal file
23
tests-Expect-a-test-to-fail-on-big-endian.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Fri, 28 Sep 2018 09:51:33 +0100
|
||||
Subject: tests: Expect a test to fail on big-endian
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Forwarded: no
|
||||
---
|
||||
js/src/tests/jstests.list | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
Index: firefox-60.9.0/js/src/tests/jstests.list
|
||||
===================================================================
|
||||
--- firefox-60.9.0.orig/js/src/tests/jstests.list 2019-12-10 11:04:22.464247245 +0100
|
||||
+++ firefox-60.9.0/js/src/tests/jstests.list 2019-12-10 11:15:21.496264080 +0100
|
||||
@@ -451,6 +451,8 @@
|
||||
#
|
||||
skip-if(xulRuntime.XPCOMABI.match(/s390x|ppc64-/)) script non262/extensions/clone-errors.js
|
||||
|
||||
+# Assumes little-endian IEEE representation of floating point numbers
|
||||
+fails-if(xulRuntime.XPCOMABI.match(/s390x|ppc64-|ppc-/)) script test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js
|
||||
|
||||
###########################################################
|
||||
# Tests disabled due to issues in test262 importer script #
|
Loading…
Add table
Reference in a new issue