Highlights
Rhino 1.8.0 contains some significant changes, so we're incrementing the final version number for the first time in a very long time. Here are a few highlights:
- Rhino now requires Java 11 minimum. We currently test against Java 11, 17, and 21.
- Rhino has been broken down into individual Java modules that are properly encapsulated as Java Modules. See README.md for a breakdown of which modules are which -- short answer is that everyone will need the "rhino" module and many will need others.
- Older code not able to adapt to using multiple JARS can still use the "rhino-all" module, which publishes an "all-in-one" JAR like the old "rhino.jar".
- The default language level is "VERSION_ES6". That means that modern JavaScript features supported by Rhino will work by default.
- There are big improvements in compatibility, including support for "super", reflect and proxy, and lots of other language features. See the compatibility table for the details.
JARs have been published to Maven Central and GitHub packages.
Thanks to all who contributed -- we had 24 contributors to this release, with some new contributors who added significant capabilities. Please keep the contributions and attention coming!
What's Changed
- Update github publish so it might work by @gbrail in #1473
- Get ready for new snapshot by @gbrail in #1472
- Fixed deadlock when sealing objects with a LazyCtor by @andreabergia in #1476
- Reorganize the entire source code tree into modern Java modules by @gbrail in #1479
- Add code coverage reports by @gbrail in #1484
- Object.defineProperty() has to take care of ConsString (issue #1482) by @rbri in #1489
- Rbri simplify rebase by @gbrail in #1492
- Rename the main module and all-in-one JAR by @gbrail in #1493
- Change root project name to "rhino-root" by @gbrail in #1495
- NativeRegexp should only call ScriptRuntime.addInstructionCount when instruction counting is enabled (issue #1497) by @rbri in #1498
- Fix a few problems that were causing build warnings and errors by @gbrail in #1505
- Allow Dependabot to run by @gbrail in #1507
- Do we need to fix name of report upload? by @gbrail in #1512
- Bump actions/upload-artifact from 3.pre.node20 to 4.3.3 by @dependabot in #1508
- Implement computed properties by @andreabergia in #1503
- Add support for Junit 5 and use it for test262 by @gbrail in #1515
- Peel known functions in interpreter so they don't break continuations by @szegedi in #1510
- Bump actions/setup-java from 3.13.0 to 4.2.1 by @dependabot in #1516
- Fix a dependency problem in rhino-all by @gbrail in #1522
- Add one more dependency so that we can eliminate some Gradle warnings by @gbrail in #1523
- Catch ParserException in IRFactory by @tuchida in #1519
- Fixed Function.prototype.toString as per the latest specification by @tuchida in #1520
- Make Array.prototype.sort stable -- version that builds by @gbrail in #1526
- Adopt "errorprone" tool instead of Spotbugs by @gbrail in #1525
- Bump ossf/scorecard-action from 2.3.1 to 2.3.3 by @dependabot in #1532
- Add all directories to test262.properties by @tuchida in #1531
- Add Byte to list of java Numbers by @tonygermano in #1501
- Fix destructuring assignment errors by @tuchida in #1529
- Streamline object operations through a better SlotMap interface by @gbrail in #1533
- Remove Icode_SWAP as it was unused by @szegedi in #1536
- add an additional null check by @rbri in #1538
- Bump github/codeql-action from 3.24.9 to 3.25.15 by @dependabot in #1539
- Update README.md by @petergrewsome in #1547
- Fix problem with regex constructor by @andreabergia in #1552
- fix #1074 Fixed error with yeild in ComputedPropertyName by @tuchida in #1553
- FEAT: Implement Symbol.unscopables by @0xe in #1556
- Bump github/codeql-action from 3.25.15 to 3.26.0 by @dependabot in #1560
- Rationalize benchmark setup and time units by @gbrail in #1559
- Remove obsolete "ObjArray" class by @gbrail in #1562
- Add
Array.findLast
andfindLastIndex
from ES2023 by @andreabergia in #1557 - Remove more obsolete classes: ObjToIntMap and UintMap by @gbrail in #1564
- Ensure that generator functions pass parameters properly by @gbrail in #1566
- Bump github/codeql-action from 3.26.0 to 3.26.2 by @dependabot in #1567
- Aggressively try to use Integers for arithmetic by @gbrail in #1563
- Implement ES2023 copy methods on Array and TypedArray by @andreabergia in #1569
- NativeError: Add ES2022
cause
by @camnwalter in #1570 - Fixed a bug with interpreter peeling introduced in #1510 by @andreabergia in #1578
- Add a benchmark to measure Rhino startup time by @gbrail in #1582
- Fix javadoc generation by @rPraml in #1574
- Silenced all warnings by @andreabergia in #1576
- Bump com.tngtech.archunit:archunit-junit4 from 1.2.0 to 1.3.0 by @dependabot in #1587
- Bump actions/upload-artifact from 4.3.3 to 4.3.6 by @dependabot in #1586
- force LF as newLine character to let out test suite pass on windows also by @rbri in #1585
- make tests more robust by @rbri in #1588
- Implement ES2024
groupBy
by @camnwalter in #1581 - Use UTF-8 decoding for java source files by @tonygermano in #1590
- Revert "make tests more robust" by @gbrail in #1595
- Bump gradle/actions from 3.1.0 to 4.0.1 by @dependabot in #1604
- Update documentation link for GroupBy by @camnwalter in #1603
- Adding LambdaAccessorSlot by @nabacg in #1577
- Implement logical assigment operators
||=
and&&=
by @andreabergia in #1597 - Set initial line number to -1 and fix StackTraceTests by @camnwalter in #1609
- Fix publishing scripts by @gbrail in #1605
- Bump actions/upload-artifact from 4.3.6 to 4.4.0 by @dependabot in #1613
- Publish to GitHub packages manually and on a schedule by @gbrail in #1618
- FEAT: Implement
??
by @0xe in #1591 - Implement ES2021 Promise.any by @camnwalter in #1610
- Bump actions/setup-java from 4.2.1 to 4.3.0 by @dependabot in #1630
- FIX: Evaluation of ?? by @0xe in #1624
- Update test262 suite + include resizable-arraybuffer in unsupported feature list by @p-bakker in #1626
- Update Shell to use Context.VERSION_ES6 by default by @tonygermano in #1594
- Extend LambdaConstructor for more flexibility by @gbrail in #1622
- Add well formed JSON.stringify, String.prototype.isWellFormed, and String.prototype.toWellFormed by @camnwalter in #1628
- Bump github/codeql-action from 3.26.2 to 3.26.8 by @dependabot in #1638
- FEAT: Support default parameters by @0xe in #1640
- Try a different strategy for Java versions by @gbrail in #1627
- FIX: test for nested literals in DefaultParametersTest by @0xe in #1642
- Use the Constructable interface instead of Function if appropriate by @rbri in #1635
- Optimize map accesses in several places by @rPraml in #1644
- Update usage of Errorprone and also warnings by @gbrail in #1643
- Always upload the logs! by @gbrail in #1646
- regenerate test262.properties, seems to be a bit outdated by @rbri in #1652
- Compute Token and Icode constants by @rPraml in #1648
- Updated: Implement Symbol.prototype.description by @gbrail in #1651
- Pass correct parameters in splitScope by @rPraml in #1654
- Bump github/codeql-action from 3.26.8 to 3.26.9 by @dependabot in #1657
- feat: implement Symbol.toStringTag by @naijun0403 in #1656
- fix a bunch of typos by @rbri in #1659
- updating v8-symbols.js by @rbri in #1662
- use our test Utils at more places by @rbri in #1665
- Add support for covariant return types by @rPraml in #1575
- improve our test Utils a bit and use it at more places by @rbri in #1666
- The $262 object does not use LiveConnect any more by @rPraml in #1664
- improved ScriptRuntime.toPrimitive() (taken from #1611 done by @tonygermano) by @rbri in #1661
- Add exception property only in enhanced java access by @rPraml in #1663
- Build snapshot and publication builds on Java 21 by @gbrail in #1667
- Performance optimizations in initSafeStandardObjects by @rPraml in #1669
- Removed obsolete IOException by @rPraml in #1668
- Fix flaky ShellTimerTest by @gbrail in #1672
- Fixed printing tokens - added two missing cases by @andreabergia in #1675
- Optimize performance in test262 by @rPraml in #1671
- minor test suite improvements by @rbri in #1673
- Optimize performance of SlotMap a bit by @rPraml in #1670
- remove unused var 'declaredAsVar' from class InterpreterData by @rbri in #1678
- add tests for #1608 by @rbri in #1681
- Bump ossf/scorecard-action from 2.3.3 to 2.4.0 by @dependabot in #1682
- use our test Utils at more places by @rbri in #1683
- Begin to use invokedynamic in the bytecode by @gbrail in #1645
- Fixed ScriptRuntime.toPrimitive() and use it for toXXX() (taken from #1611 done by @tonygermano) by @rbri in #1674
- Use to primitive for plus operation and date (taken from #1611 done by @tonygermano) by @rbri in #1685
- Turn off the most time-consuming Date tests in MozillaSuiteTest by @gbrail in #1690
- When dumping icode, include string constants by @andreabergia in #1693
- Add a dynamic linker that understands consts by @gbrail in #1686
- Bump actions/setup-java from 4.3.0 to 4.4.0 by @dependabot in #1695
- fix endless loop in ScriptRuntimem toString() and toNumber() and add tests to ensure backward comatibility by @rbri in #1701
- Bump actions/upload-artifact from 4.4.0 to 4.4.3 by @dependabot in #1707
- Reimplement optional chain and nullish coalesce by @andreabergia in #1694
- FIX: Transform default values correctly in destructuring by @0xe in #1708
- Implement optional chaining for function call by @andreabergia in #1702
- Bump github/codeql-action from 3.26.9 to 3.27.0 by @dependabot in #1712
- Convert NativeArrayBuffer, NativeDataView, and TypedArrays to lambda by @camnwalter in #1709
- Nullish assign operator
??=
by @andreabergia in #1705 - Add INDY ops for math operations by @gbrail in #1711
- Allow passing
Undefined.instance
toScriptRuntime.evalSpecial
by @andreabergia in #1714 - Bump actions/setup-java from 4.4.0 to 4.5.0 by @dependabot in #1716
- Allow more PRs from dependabot by @gbrail in #1715
- Bump actions/checkout from 3.6.0 to 4.2.2 by @dependabot in #1717
- Create codeql.yml by @gbrail in #1718
- make sure, equivalentValues(Object) is used if available by @rbri in #1721
- Allow usage of
require
in the debugger and use ES6 by @andreabergia in #1723 - Introduce column number in AST nodes by @andreabergia in #1724
- Console should always flush after writing a newline by @andreabergia in #1726
- Implement
String.prototype.matchAll
and related by @andreabergia in #1731 - Fixed cleanup in unit test
DynamicScopeTest
by @andreabergia in #1740 - Literal object creation rework by @andreabergia in #1734
- implement some test cases for issues #626 and #645 by @rbri in #1744
- fix tokenEnd and cursor for string, template, xml literals and comments when using multibyte characters by @meraedit in #1745
- Add runtime optimizations for math operations by @gbrail in #1733
- Ensure
next
andorderedNext
are null for slots inHashSlotMap
. by @aardvark179 in #1748 - Implement
super
by @andreabergia in #1735 - Fixed computed property in object literal with negative integers by @andreabergia in #1752
- Support generator methods in object literals, e.g.
o = {*g() {...}}
by @andreabergia in #1747 - SlotMap.compute can lead to deadlock in ThreadSafeSlotMapContainer by @nabacg in #1746
- Allow symbol keys in getter/setter in object literal syntax by @andreabergia in #1749
- Reflect and Proxy implementation by @rbri in #1660
- Consolidate multiple optimization levels down to one by @gbrail in #1754
- Change default version to VERSION_ES6 by @gbrail in #1755
- Shell: improve handling of unhandled promise rejection by @andreabergia in #1758
- Add a "testutils" module and move common test code there by @gbrail in #1760
- Go back to the pre-Java-9 stack trace API by @gbrail in #1761
- Bump actions/upload-artifact from 4.4.3 to 4.5.0 by @dependabot in #1765
- Bump actions/setup-java from 4.5.0 to 4.6.0 by @dependabot in #1766
- simplify tests by @rbri in #1757
- fix border checks for typedarray set by @rbri in #1763
- make the report backward compatible by @rbri in #1768
- Update docs around optimization levels for tests. by @gbrail in #1769
- Fix: handle stack frames in the correct order by @andreabergia in #1762
- Skip importing the same class twice -- re-mastered by @gbrail in #1770
- Fix another old reference to optimization levels by @gbrail in #1772
- Support more spec-compliant ScriptableObject extensions by @gbrail in #1771
- Fix: add file name in stack traces for compiled classes by @andreabergia in #1773
- Refactor the interpreter loop to avoid performance degradation. by @aardvark179 in #1777
New Contributors
- @dependabot made their first contribution in #1508
- @petergrewsome made their first contribution in #1547
- @camnwalter made their first contribution in #1570
- @nabacg made their first contribution in #1577
- @meraedit made their first contribution in #1745
- @aardvark179 made their first contribution in #1748
Full Changelog: Rhino1_7_15_Release...Rhino1_8_0_Release