[gjs/mozjs78: 22/22] docs: Update documentation for SpiderMonkey 78




commit 2673a397245fec762cdccd57bcdfa777b5fd5464
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Aug 5 21:34:18 2020 -0700

    docs: Update documentation for SpiderMonkey 78
    
    This updates build and hacking instructions where applicable, and
    describes the new language features in the NEWS file.
    
    See: GNOME/gjs#329

 NEWS           | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.MSVC.md | 26 +++++++++++++-------------
 doc/Hacking.md |  8 ++++----
 doc/Home.md    |  2 +-
 meson.build    |  2 +-
 5 files changed, 71 insertions(+), 19 deletions(-)
---
diff --git a/NEWS b/NEWS
index cb7fae55..2e136e8f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,55 @@
+NEXT
+----
+
+- New JavaScript features! This version of GJS is based on SpiderMonkey 78, an
+  upgrade from the previous ESR (Extended Support Release) of SpiderMonkey 68.
+  Here are the highlights of the new JavaScript features.
+  For more information, look them up on MDN or devdocs.io.
+
+  * New language features
+    + A new regular expression engine, supporting lookbehind and named capture
+      groups, among other things
+
+  * New syntax
+    + The ?? operator ("nullish coalescing operator") is now supported
+    + The ?. operator ("optional chaining operator") is now supported
+    + Public static class fields are now supported
+    + Separators in numeric literals are now supported: for example, 1_000_000
+
+  * New APIs
+    + String.replaceAll() for replacing all instances of a string inside another
+      string
+    + Promise.allSettled() for awaiting until all Promises in an array have
+      either fulfilled or rejected
+    + Intl.Locale
+    + Intl.ListFormat
+    + Intl.RelativeTimeFormat.formatToParts()
+
+  * New behaviour
+    + There are a lot of minor behaviour changes as SpiderMonkey's JS
+      implementation conforms ever closer to existing ECMAScript standards and
+      adopts new ones. For complete information, read the Firefox developer
+      release notes:
+      https://developer.mozilla.org/en-US/Firefox/Releases/69#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/70#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/71#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/72#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/73#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/74#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/75#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/76#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/77#JavaScript
+      https://developer.mozilla.org/en-US/Firefox/Releases/78#JavaScript
+
+  * Backwards-incompatible changes
+    + The Object.toSource() method has been removed
+    + The uneval() global function has been removed
+    + A leading zero is now never allowed for BigInt literals, making 08n and
+      09n invalid similar to the existing error when legacy octal numbers like
+      07n are used
+    + The Function.caller property now has the value of null if the caller is a
+      strict, async, or generator function, instead of throwing a TypeError
+
 Version 1.65.4
 --------------
 
diff --git a/README.MSVC.md b/README.MSVC.md
index c513c4d8..4707ea87 100644
--- a/README.MSVC.md
+++ b/README.MSVC.md
@@ -6,7 +6,7 @@ via Meson.  Due to C++-14 usage, Visual Studio 2017 15.6.x or later is
 required, as the compiler flag /Zc:externConstexpr is needed.
 
 You will need the following items to build GJS using Visual Studio:
--SpiderMonkey 68.4.x (mozjs-68).  Please see the below section carefully 
+-SpiderMonkey 78.x (mozjs-78).  Please see the below section carefully
  on this...
 -GObject-Introspection (G-I) 1.61.2 or later
 -GLib 2.58.x or later, (which includes GIO, GObject, and the associated tools)
@@ -28,12 +28,12 @@ for the suitable release series of SpiderMonkey that corresponds to
 the GJS version that is being built, as GJS depends on ESR (Extended 
 Service Release, a.k.a Long-term support) releases of SpiderMonkey.
 
-You may also be able to obtain the SpiderMonkey 68.4.x sources via the
-FireFox (ESR) or Thunderbird 68.4.x sources, in $(srcroot)/js.  Since
+You may also be able to obtain the SpiderMonkey 78.x sources via the
+FireFox (ESR) or Thunderbird 78.x sources, in $(srcroot)/js. Since
 this release of Firefox/Thunderbird/SpiderMonkey requires clang-cl
 from the LLVM project, you will need to install LLVM/CLang from the
 LLVM website and ensure that clang.exe can be found in your PATH in
-order to build SpiderMonkey 68.4.x.
+order to build SpiderMonkey 78.x.
 
 Please do note that the build must be done carefully, in addition to the
 official instructions that are posted on the Mozilla website:
@@ -50,7 +50,7 @@ JS_STANDALONE=1 $(mozjs_srcroot)/js/src/configure --enable-nspr-build --host=i68
 
 Notice that "JS_STANDALONE=1" and "--disable-jemalloc" are absolutely required,
 otherwise GJS will not build/run correctly.  If your GJS build crashes upon
-launch, use Depedency Walker to ensure that mozjs-68.dll does not depend on
+launch, use Depedency Walker to ensure that mozjs-78.dll does not depend on
 mozglue.dll!  If it does, or if GJS fails to link with missing arena_malloc() and
 friends symbols, you have built SpiderMoney incorrectly and will need to rebuild
 SpiderMonkey (with the build options as noted above) and retry the build.
@@ -79,7 +79,7 @@ $(buildroot)/dist/include.  Note that for PDB files and .lib files,
 you will need to search for them in $(buildroot),
 where the PDB file names match the filenames for the DLLs/EXEs in
 $(buildroot)/dist/bin, and you will need to look for the following .lib files:
--mozjs-68.lib
+-mozjs-78.lib
 -js_static.lib (optional)
 -nspr4.lib (optional, recommended for future use, if --enable-nspr-build is used)
 -plc4.lib (optional, recommended for future use, if --enable-nspr-build is used)
@@ -87,16 +87,16 @@ $(buildroot)/dist/bin, and you will need to look for the following .lib files:
 
 You may want to put the .lib's and DLLs/EXEs into $(PREFIX)\lib and 
 $(PREFIX)\bin respectively, and put the headers into
-$(PREFIX)\include\mozjs-68 for convenience.
+$(PREFIX)\include\mozjs-78 for convenience.
 
-You will need to place the generated mozjs-68.pc pkg-config file into
+You will need to place the generated mozjs-78.pc pkg-config file into
 $(PREFIX)\lib\pkgconfig and ensure that pkg-config can find it by
 setting PKG_CONFIG_PATH.  Ensure that the 'includedir' and 'libdir'
 in there is correct, and remove the 'nspr' entry from the
 'Requires.private:' line and change
-'-include ${includedir}/mozjs-68/js/RequiredDefines.h' to
-'-FI${includedir}/mozjs-68/js/RequiredDefines.h', so that the
-mozjs-68.pc can be used correctly in Visual Studio builds.  You
+'-include ${includedir}/mozjs-78/js/RequiredDefines.h' to
+'-FI${includedir}/mozjs-78/js/RequiredDefines.h', so that the
+mozjs-78.pc can be used correctly in Visual Studio builds.  You
 will also need to ensure that the existing GObject-Introspection
 installation (if used) is on the same drive where the GJS sources
 are (and therefore where the GJS build is being carried out).
@@ -106,7 +106,7 @@ note that some SpideMonkey headers might need be updated as follows, before
 or after building SpiderMonkey, since there are some GCC-ish assumptions
 here:
 
--Update $(includedir)/mozjs-68/mozilla/DbgMacro.h:
+-Update $(includedir)/mozjs-78/mozilla/DbgMacro.h:
 
 // Change this... (ca. line 174)
 #ifndef MOZILLA_OFFICIAL
@@ -141,7 +141,7 @@ here:
   }
 
 
--Update $(includedir)/mozjs-68/js/AllocPolicy.h (after the build):
+-Update $(includedir)/mozjs-78/js/AllocPolicy.h (after the build):
 
 Get rid of the 'JS_FRIEND_API' macro from the class
 'TempAllocPolicy : public AllocPolicyBase' (ca. line 110 and 175),
diff --git a/doc/Hacking.md b/doc/Hacking.md
index 18794d96..7c62cfaa 100644
--- a/doc/Hacking.md
+++ b/doc/Hacking.md
@@ -13,7 +13,7 @@ you'll need to manually format your code before it gets merged.
 You can also skip this step if you are not writing any C++ code.)
 
 GJS requires four other libraries to be installed: GLib, libffi,
-gobject-introspection, and SpiderMonkey (also called "mozjs68" on some
+gobject-introspection, and SpiderMonkey (also called "mozjs78" on some
 systems.)
 The readline library is not required, but strongly recommended.
 We recommend installing your system's development packages for GLib,
@@ -32,7 +32,7 @@ These debugging features reduce performance by quite a lot, but they
 will help catch mistakes in the API that could otherwise go unnoticed
 and cause crashes in gnome-shell later on.
 
-To build SpiderMonkey, follow the instructions on [this 
page](https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr68/docs/Building%20SpiderMonkey.md)
 to download the source code and build the library.
+To build SpiderMonkey, follow the instructions on [this 
page](https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md)
 to download the source code and build the library.
 If you are using `-Dprefix` to build GJS into a different path, then
 make sure to use the same build prefix for SpiderMonkey with `--prefix`.
 
@@ -92,7 +92,7 @@ more likely to show up.
 
 To see which GC zeal options are available:
 ```sh
-JS_GC_ZEAL=-1 js68
+JS_GC_ZEAL=-1 js78
 ```
 
 We include three test setups, `extra_gc`, `pre_verify`, and
@@ -156,4 +156,4 @@ This will build GJS into a separate build directory with code coverage
 instrumentation enabled, run the test suite to collect the coverage
 data, and open the generated HTML report.
 
-[embedder](https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr68/docs/Building%20SpiderMonkey.md)
\ No newline at end of file
+[embedder](https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md)
\ No newline at end of file
diff --git a/doc/Home.md b/doc/Home.md
index 54e010d1..30ea8f5c 100644
--- a/doc/Home.md
+++ b/doc/Home.md
@@ -1,6 +1,6 @@
 # GJS: Javascript Bindings for GNOME
 
-The current stable series (1.60.x) is built on Mozilla's SpiderMonkey 68 featuring **ECMAScript 2019** and 
GObjectIntrospection making most of the **GNOME API library** available.
+The current stable series is built on Mozilla's SpiderMonkey 78 featuring **ECMAScript 2019** and 
GObjectIntrospection making most of the **GNOME API library** available.
 
 To find out when a language feature was implemented in GJS, review [NEWS][gjs-news] in the GitLab 
repository. In many cases older versions of GJS can be supported using [polyfills][mdn-polyfills] and 
[legacy-style GJS classes](Modules.md#lang).
 
diff --git a/meson.build b/meson.build
index d2a883e8..dcc12ddf 100644
--- a/meson.build
+++ b/meson.build
@@ -245,7 +245,7 @@ if not minimal_program.compiled() or minimal_program.returncode() != 0
     error('''A minimal SpiderMonkey program
 could not be compiled, linked, or run. Most likely you should build it with a
 different configuration. Check the recommended configuration:
-https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr60/docs/Building%20SpiderMonkey.md''')
+https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md''')
 endif
 
 have_printf_alternative_int = cc.compiles('''


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]