Skip to content

Releases: sebastienros/jint

v3.1.1

26 Apr 17:28
f767670
Compare
Choose a tag to compare

What's Changed

  • Backport var declaration and reference resolving performance improvements by @lahma in #1841
  • Backport improve System.Text.Json numeric type conversion under interop by @lahma in #1844

Full Changelog: v3.1.0...v3.1.1

v3.1.0

10 Apr 15:38
ed7e3e7
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.0.2...v3.1.0

v3.0.2

05 Apr 15:45
b6f99b9
Compare
Choose a tag to compare

What's Changed

  • Try to initialize interop object members with upper and lower first char by @lahma in #1795
  • Remove Newtonsoft package by @MikeAlhayek in #1799
  • Improve STJ operability tests by @sebastienros in #1802
  • Add test code to validate boolean vlue in the if condition. by @hyzx86 in #1803
  • Obsolete and cleanup some ObjectInstance access patterns by @lahma in #1809
  • Create separate ObjectWrapper.Create factory method by @lahma in #1810
  • Add partial support for yield via experimental flag by @lahma in #1815
  • Use global usings and aliases for Esprima namespaces and types by @lahma in #1824
  • Add more Acornima friendly type aliases by @lahma in #1825
  • Support interop against System.Text.Json types on NET8+ by @lahma in #1826
  • Add support for wrapped lists to push and pop items by @ejsmith in #1822
  • Adding ArrayLikeWrapper to support more interop array operations by @ejsmith in #1828
  • Make task to promise wrapping an opt-in experimental feature by @lahma in #1830
  • UnwrapIfPromise Call RunAvailableContinuations by @scgm0 in #1813

New Contributors

Full Changelog: v3.0.1...v3.0.2

v3.0.1

25 Feb 16:08
895b8d4
Compare
Choose a tag to compare

What's Changed

  • Update README and version prefix by @lahma in #1752
  • Fix module builder loader interaction by @tomatosalat0 in #1753
  • Use version suffix for MyGet publish by @lahma in #1754
  • Compile Regex instances in ScriptPreparation by @lahma in #1757
  • Fix Aot use enum by @scgm0 in #1760
  • Don't compile Regex instances containing negative lookahead by @lahma in #1761
  • Sync WIP generator structures to main by @lahma in #1762
  • Update GH actions/checkout to v4 by @lahma in #1763
  • Improve AOT usage scenarios with metadata by @lahma in #1764
  • Move interop tests to the public interface test project by @BhaaLseN in #1767
  • Change GH Actions for PR to run on macos-14 instead of macos-latest by @lahma in #1769
  • Json \u escape sequence was not case insensitive by @tomatosalat0 in #1770
  • Reset Jint.Benchmark project build properties by @lahma in #1774
  • Upgrade to Test262Harness 1.0.0 by @lahma in #1779
  • Ensure deterministic build for releases by @lahma in #1780
  • feat: implicit convert DataView and ArrayBuffer to byte array by @viceice in #1786
  • Add tasks to defaultobjectconverter by @tom-b-iodigital in #1787
  • Improve TypeDescriptor analysis logic by @lahma in #1788
  • Ensure modules have always source specified by @kkohno in #1791
  • Improve interop performance against CLR list types by @lahma in #1792

New Contributors

Full Changelog: v3.0.0...v3.0.1

v3.0.0

19 Jan 18:15
6cfde52
Compare
Choose a tag to compare

So v3 is finally here after some seven years of sweat and tears. A big thank you to everyone who helped by contributing new features, fixed and reported problems (you can see the huge list of contributors and their valuable work at the bottom of these release notes).

Jint is now arguably the most feature complete and standards compliant JavaScript engine running purely on top of .NET runtime. All the features listed as supported pass the ECMAScript standard suite for the feature flags. That's almost 60 000 passing tests on top of Jint's own test cases.

💡 If you are benefiting from Jint or otherwise would like to show your gratitude, don't forget to sponsor the project, even a one-time donation makes a difference.

We hope you'll like the new release 🚀

Features

ECMAScript

During v3 development a a huge set of both modern ECMAScript syntax and library features were completed, to name a few:

  • arrow functions
  • let and const support
  • class support
  • rest, spread and destructuring
  • template strings
  • modules
  • async/await
  • nullish coalescing and optional chaining (a ?? b and a?.b?.c)
  • library features like ArrayBuffer, BigInt, DataView, Map, Promise, Proxy, Reflect, Set

Unfortunately generator support and some corner cases for async/await support which will require some internal engine logic refactoring didn't make the cut and will be part of some later release.

You can always refer to the main README to see the state of supported features.

Interop

A lot of interop scenarios were improved and for example extensions methods can now accessed via JavaScript code. Plenty of bugs were fixed and interop performance was improved.

Performance

Performance was a big concern when re-writing the Jint internals. Jint is being heavily used in databases like RavenDB and EventStore where execution performance is crucial. We lowered memory traffic considerably and optimized the runtime in many ways. Generally one can say that Jint v3 is at least twice as fast if not multiple times faster than previous v2 on different workloads. There's also benchmark results comparing Jint to other alternatives available.

Here's results from two well-known test suites comparing v2 and v3.

BenchmarkDotNet v0.13.12, Windows 11 (10.0.23615.1000)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK 8.0.100
  [Host]     : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2

Dromaeo

Engine FileName Mean Error Allocated
v2 dromaeo-3d-cube 65.91 ms 0.455 ms 129.78 MB
v3 22.514 ms (-66%) 0.1484 ms 6284.46 KB (-95%)
v2 dromaeo-core-eval 14.11 ms 0.228 ms 49.55 MB
v3 4.186 ms (-70%) 0.0160 ms 311.57 KB (-99%)
v2 dromaeo-object-array 684.73 ms 1.320 ms 1698.01 MB
v3 44.332 ms (-94%) 0.2200 ms 100363.04 KB (-94%)
v2 droma(...)egexp [21] 1,593.67 ms 18.104 ms 1825.65 MB
v3 154.681 ms (-90%) 1.3777 ms 163817.22 KB (-91%)
v2 droma(...)tring [21] 1,427.76 ms 15.110 ms 17368.44 MB
v3 415.977 ms (-71%) 19.4907 ms 1321449.47 KB (-93%)
v2 droma(...)ase64 [21] 201.81 ms 1.183 ms 988.21 MB
v3 49.754 ms (-75%) 0.2706 ms 6045.42 KB (-99%)

SunSpider

Engine FileName Mean Error Allocated
v2 3d-cube 450.6 ms 1.97 ms 792.97 MB
v3 172.67 ms (-62%) 0.600 ms 45144.06 KB (-94%)
v2 3d-morph 492.0 ms 5.71 ms 678.52 MB
v3 150.45 ms (-69%) 0.424 ms 46255.62 KB (-93%)
v2 3d-raytrace 419.9 ms 2.95 ms 713.45 MB
v3 149.09 ms (-64%) 0.368 ms 86384.38 KB (-88%)
v2 access-binary-trees 168.1 ms 0.86 ms 310.48 MB
v3 80.74 ms (-52%) 0.074 ms 62246.13 KB (-80%)
v2 access-fannkuch 1,466.3 ms 12.18 ms 2981.09 MB
v3 373.35 ms (-75%) 0.494 ms 97.83 KB (-100%)
v2 access-nbody 380.5 ms 1.08 ms 595.76 MB
v3 167.46 ms (-56%) 0.466 ms 53285.7 KB (-91%)
v2 access-nsieve 537.9 ms 10.60 ms 995.61 MB
v3 134.59 ms (-75%) 0.171 ms 17140.71 KB (-98%)
v2 bitop(...)-byte [24] 288.3 ms 1.63 ms 523.8 MB
v3 134.42 ms (-53%) 0.511 ms 61947.89 KB (-88%)
v2 bitops-bits-in-byte 446.3 ms 3.46 ms 780.24 MB
v3 207.84 ms (-53%) 0.719 ms 40543.92 KB (-95%)
v2 bitops-bitwise-and 282.8 ms 2.62 ms 347.92 MB
v3 105.52 ms (-63%) 1.131 ms 55938.53 KB (-84%)
v2 bitops-nsieve-bits 594.0 ms 8.18 ms 1004.71 MB
v3 193.02 ms (-68%) 1.755 ms 53915 KB (-95%)
v2 contr(...)rsive [21] 233.6 ms 1.50 ms 526.25 MB
v3 98.93 ms (-58%) 0.613 ms 92772.26 KB (-83%)
v2 crypto-aes 455.7 ms 6.86 ms 968.64 MB
v3 121.08 ms (-73%) 1.201 ms 10756.26 KB (-99%)
v2 crypto-md5 236.3 ms 0.94 ms 427.65 MB
v3 95.99 ms (-59%) 0.531 ms 82152.38 KB (-81%)
v2 crypto-sha1 234.2 ms 0.84 ms 436.18 MB
v3 92.25 ms (-61%) 0.892 ms 68857.23 KB (-85%)
v2 date-format-tofte 300.9 ms 3.97 ms 560.51 MB
v3 95.31 ms (-68%) 1.891 ms 50129.5 KB (-91%)
v2 date-format-xparb 209.1 ms 0.77 ms 176.21 MB
v3 54.85 ms (-74%) 0.163 ms 26391.45 KB (-85%)
v2 math-cordic 652.8 ms 10.72 ms 1129.32 MB
v3 308.55 ms (-53%) 0.822 ms 86856.08 KB (-92%)
v2 math-partial-sums 208.6 ms 1.53 ms 247.64 MB
v3 103.45 ms (-50%) 0.154 ms 49364.48 KB (-81%)
v2 math-spectral-norm 288.0 ms 2.25 ms 501.69 MB
v3 115.15 ms (-60%) 0.205 ms 56614.34 KB (-89%)
v2 regexp-dna 103.3 ms 1.58 ms 20.14 MB
v3 117.40 ms (+14%) 0.548 ms 17610.08 KB (-15%)
v2 string-base64 278.1 ms 3.48 ms 1332.74 MB
v3 74.22 ms (-73%) 0.105 ms 8672.83 KB (-99%)
v2 string-fasta 387.8 ms 2.55 ms 755.15 MB
v3 159.71 ms (-59%) 0.459 ms 104781.26 KB (-86%)
v2 string-tagcloud 366.7 ms 25.90 ms 1035.44 MB
v3 70.38 ms (-81%) 0.245 ms 41768.32 KB (-96%)
v2 string-unpack-code 138.2 ms 1.67 ms 242.91 MB
v3 71.54 ms (-48%) 0.291 ms 73552.28 KB (-70%)
v2 strin(...)input [21] 1,113.3 ms 17.34 ms 6419.52 MB
v3 59.09 ms (-95%) 0.129 ms 20684.41 KB (-100%)

What's Changed

The full pull request list for v3.

Read more

v3.0.0-rc-1

17 Jan 16:48
511523b
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.0.0-beta-2060...v3.0.0-rc-1

v3.0.0-beta-2060

13 Jan 10:35
d3e65ac
Compare
Choose a tag to compare

What's Changed

  • Remove some unnecessary JsString allocations by @lahma in #1728
  • Add custom strategy for array read access by @lahma in #1729
  • Add fast case for single statement in a block by @lahma in #1730
  • Refactoring for custom module loader support by @tomatosalat0 in #1731
  • Make JsArguments public by @lahma in #1734
  • Internalize Environment services and use Key as name by @lahma in #1735
  • Use FNV hash for Key by @lahma in #1736
  • Replace some string usage with Key when suitable by @lahma in #1737

Full Changelog: v3.0.0-beta-2059...v3.0.0-beta-2060

v3.0.0-beta-2059

05 Jan 12:10
8d2d986
Compare
Choose a tag to compare

This release aims to unify and clarify public APIs and hiding services that shouldn't be needed for normal usage. Services can always be exposed again if it seems necessary. If you find some API missing that you need, please create a PR with suggested API change and a test case against Jint.Tests.PublicInterface which will ensure that the API won't be broken that easily.

  • Rename FunctionInstance -> Function
  • Rename BindFunctionInstance -> BindFunction
  • Rename ClrFunctionInstance -> ClrFunction
  • Rename GetterFunctionInstance -> GetterFunction and made internal
  • Rename IPrimitiveInstance -> IJsPrimitive
  • Rename ScriptFunctionInstance -> ScriptFunction
  • Rename SetterFunctionInstance -> SetterFunction and made internal
  • Rename Engine.ClrTypeConverter to Engine.TypeConverter
  • Rename Engine.DebugHandler to Engine.Debugger
  • Move Engine.ResetCallStack to Engine.Advanced
  • Move constraint related methods to Engine.Constraints
  • Move module related methods to Engine.Modules and shorten method names
  • Move Engine.RegisterPromise to Engine.Advanced
  • Make ObjectInstance.IsLooselyEqual() protected
  • Hide JsonInstance
  • Hide ObjectInstance.CanPut()
  • Hide ObjectInstance.DefinePropertyOrThrow()
  • Hide ObjectInstance.DeletePropertyOrThrow()
  • Hide ObjectInstance.IsArray() and add JsValueExtensions.IsArray()
  • Hide ObjectInstance.SetPrototypeOf() and allow set via ObjectInstance.Prototype property set
  • Hide ObjectInstance.IsArrayLike
  • Hide ObjectInstance.Length and only expose JsArray.Length and JsTypedArray.Length properties
  • Remove ObjectInstance.Invoke
  • Remove Engine.Realm, expose Engine.Intrinsics and Engine.Global directly

What's Changed

  • Debug StepInto stops at beginning of arrow function by @tomatosalat0 in #1715
  • Remove Record suffix from types by @lahma in #1716
  • Move CreateDeclarativeEnvironment and FindConstraint to Engine.Advanced by @lahma in #1717
  • Remove some Instance suffixes by @lahma in #1718
  • Hide, rename and move some methods by @lahma in #1719
  • Cleanup ObjectInstance public API by @lahma in #1720
  • Rename FunctionInstance to Function by @lahma in #1721
  • Remove Engine.Realm, expose Engine.Intrinsics and Engine.Global directly by @lahma in #1722
  • Hide GlobalObject public methods by @lahma in #1723

Full Changelog: v3.0.0-beta-2058...v3.0.0-beta-2059

v3.0.0-beta-2058

01 Jan 09:49
3dcae81
Compare
Choose a tag to compare

What's Changed

  • Further optimize Dtoa and string building by @lahma in #1698
  • Ensure proper ValueStringBuilder dispose when needed by @lahma in #1699
  • Add GetUtcNow to ITimeSystem by @ejsmith in #1701
  • Groundwork for generators by @lahma in #1705
  • Upgrade Esprima to version 3.0.3 by @lahma in #1706
  • Implement resizable ArrayBuffer by @lahma in #1707
  • Adding cultural check to the "ToUpperCase" string prototype. by @LuisMerinoP in #1693
  • Implement SharedArrayBuffer by @lahma in #1708
  • Implement ArrayBuffer.transfer by @lahma in #1709
  • Implement import attributes by @lahma in #1710
  • Implement JSON modules by @lahma in #1711
  • Add Engine.Advanced.StackTrace to get current stack trace string by @lahma in #1712
  • Make JsValue implement IConvertible by @lahma in #1713
  • Unify recursion constraints between invoke and call by @lahma in #1714

New Contributors

Full Changelog: v3.0.0-beta-2057...v3.0.0-beta-2058

v3.0.0-beta-2057

07 Dec 19:22
90691bb
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.0.0-beta-2056...v3.0.0-beta-2057