Bump Jint from 4.5.0 to 4.12.0#29
Conversation
--- updated-dependencies: - dependency-name: Jint dependency-version: 4.12.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
AssigneesThe following users could not be added as assignees: Please fix the above issues or remove invalid values from |
|
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting If you change your mind, just re-open this PR and I'll resolve any conflicts on it. |
Updated Jint from 4.5.0 to 4.12.0.
Release notes
Sourced from Jint's releases.
4.12.0
Jint 4.12.0 is a performance- and correctness-focused release. It completes the move to hidden-class shapes across the whole object model, extends the unboxed interpreter fast lanes to more operators and call shapes, and adds a layer of per-engine caching so re-executed scripts and re-created functions reuse their compiled metadata and environments. A pre-release review of everything since 4.11.0 also fixed several correctness regressions. No code changes are required to benefit.
Highlights
Object model — shapes everywhere. The hidden-class shape model now backs the built-in prototypes and constructors,
TypedArrays, the global object, andIntl/Temporal(#2580, #2581, #2582, #2590, #2595, #2597).JSON.parsebuilds its result objects as shapes, so an array of like-shaped records costs one allocation per record instead of a property dictionary each (#2634). Object literals inside generator/async frames and object spread{...src}adopt shapes too (#2596, #2648, #2635), and a provably-simple constructor shapes its instances from the third construction (#2636).Interpreter fast lanes. New unboxed operand lanes for equality, bitwise, modulo-equality and sum-of-products expressions remove per-iteration boxing (#2602, #2604, #2611, #2628), and comparison operands are served from the validated global-descriptor cache (#2603). Expression-only and
if/elsefor-loop bodies run through a tight per-iteration cycle with a member-bound loop test (i < arr.length) (#2605, #2617, #2623), env-less leaf calls run against the captured environment directly (#2627), and functions that cannot observe theirthisskipthis-binding (#2626).Caching & reuse. Nested-scope global reads and writes are served from a validated global-binding cache (#2584, #2625); hoisted function and class definitions, and the top-level statement handler tree, are reused across re-evaluations on an engine (#2613, #2615, #2649); and
for-of/for-inreuse a fixed-slot per-iteration environment, skipping per-iteration TDZ re-init where it is provably safe (#2586, #2632).Lower allocations. A coverage campaign added benchmarks for common patterns the suite did not exercise and then closed the hotspots they surfaced (#2630): resolved
awaitchains and engine-internal promise reactions (#2639),for-inenumeration (#2640),throw/catch(#2641), primitive number/boolean/bigint methods (no wrapper object, #2642), and tagged templates (#2638) all allocate far less.Correctness. Fixes for sticky + global
[Symbol.match]returning wrong results (#2600), an unlabeledbreakescaping a labeledswitch(#2607),-0in integer multiplication (#2620), and raw property writes on shaped hosts (#2591, #2601). A pre-release review (#2651) additionally fixedfor-inre-enumerating a shadowed key (a mid-loop delete and a pooled-iterator reuse case), mapped-argumentswrites being lost after the call returns (and duplicate-parameter mapping now follows the spec), and hardened the object-literal and built-in-shape paths.Across the managed JavaScript engines for .NET, Jint 4.12.0 is the fastest engine on 17 of the 21 comparison scripts — and the fastest interpreter on all 21 — leading by up to ~5.4× over the next-fastest engine while allocating 2×–63× less memory than the closest competitor. See the engine comparison benchmarks for the full table.
What's Changed
... (truncated)
4.11.0
Jint 4.11.0 is a performance-focused release. It completes the move to a hidden-class shape model for the object system and adds a family of unboxed interpreter fast lanes, so the most common patterns — object and array construction, property access, tight numeric loops, and
eval— do less work and allocate far less memory, with no change to behavior.Highlights
evalruns in slot-backed environments (#2565), direct-recursive calls pool their environments (#2549), andFunction-constructor instances reuse a definition-level environment (#2579).Function.prototype.toStringsource-text retention is now opt-in (#2562), and the changes above cut allocations across the board — direct recursion, for example, allocates up to ~99% less.await(#2567),Mapiteration during mutation (#2570), andShadowRealmevaluation ofsuper/new.target(#2573).Across the managed JavaScript engines for .NET, Jint 4.11.0 is the fastest on most object, string and regex workloads — 1.7–5× over the next-fastest engine — while allocating 2–63× less memory than the closest competitor. See the engine comparison benchmarks for the full table.
What's Changed
obj.methodresolved on the direct prototype by @lahma in Prototype-method inline cache forobj.methodresolved on the direct prototype sebastienros/jint#2558New Contributors
Full Changelog: sebastienros/jint@v4.10.1...v4.11.0
... (truncated)
4.10.1
Overview
Jint 4.10.1 is a small follow-up to 4.10.0 that continues the memory-reduction work. Arrays no longer carry a dedicated
PropertyDescriptorfor theirlength(#2540) and an extraPropertyDescriptorallocation on the data-property creation path was removed (#2537), trimming GC pressure further with no code changes required. It also fixes a strict-mode spec gap where writing to a read-only array index failed to throw aTypeError(#2542), and refreshes the engine-comparison benchmarks (#2517) and dependencies (#2545).What's Changed
Full Changelog: sebastienros/jint@v4.10.0...v4.10.1
4.10.0
Overview
Jint 4.10.0 is a performance- and memory-focused release. The bulk of this cycle went into making the interpreter run faster and allocate less, with additional work on CLR interop speed and diagnostics, plus a handful of correctness and spec-compliance fixes.
If you execute the same scripts repeatedly, run interop-heavy workloads, or care about GC pressure, this release should give you a meaningful, no-code-changes-required speedup.
Highlights
Interpreter performance
x++updates via version-gated inline caches (#2507, #2514).FunctionDeclarationInstantiationskipped entirely when there's nothing to do (#2502), lazy constructor.prototypecreation (#2512), and no more per-call closure allocation inEvaluateBody(#2534).evalandnew Functionsources (#2503), and a fix for prepared scripts that were running slower than re-parsed source (#2504).String.prototype.splitwith a string separator (#2519).Reduced allocations & memory footprint
slice/substring/substrresults, extended to bounded-waste substrings (#2506, #2518).RegExpsplit,Iterator.toArray, and object enumeration (#2524, #2526).JsDateshrunk by 8 bytes (#2535) andObjectInstanceslimmed by relocating_privateElementsto a per-engine weak table (#2536).CLR interop
for..inover wrapped objects (#2516).Correctness & spec compliance
Evaluate()during module execution (#2493).DefaultTypeConverter.Convertbypassing subclassTryConvertoverrides (#2498).4.10.0 contains no new breaking changes, but if you skip past 4.9.3 note its host-side breaking change:
Error.prototype.stackbecame aget/setaccessor on%Error.prototype%(it is no longer an own property of each error instance), so host code reading the trace viaObjectInstance.TryGetValue("stack", …)now getsundefined— useerrorObject.Get("stack")instead. See the v4.9.3 release notes for details (#2489).What's Changed
List<T>by @jnyrup in Parenthesize expressions to correctly pre-allocateList<T>sebastienros/jint#2501... (truncated)
4.9.3
Highlights
Jint 4.9.3 is a maintenance release on top of 4.9.2 that closes the remaining test262 gaps from the 4.9.x line, hardens bulk built-ins against runaway inputs, and delivers large TypedArray performance gains. There are no public API surface changes, but host code that reads an error's
stackshould review the breaking-change note below, plus one additional minor behavioral note.ECMAScript spec coverage
The bundled test262 suite was bumped to its latest snapshot and the spec gaps it surfaced were implemented — the full conformance suite now passes with 0 failures (#2489, #2490):
Error.prototype.stackaccessor (error-stack-accessor proposal) —stackis now a configurableget/setaccessor on%Error.prototype%rather than an own data property on each instance. This is a breaking change for host (C#) code that readsstack— see the breaking-change note below.ArrayBufferwrite rejection —%TypedArray%.prototypemutators (copyWithin/fill/reverse/set/sort), theAtomicsread-modify-write ops, andUint8ArraysetFromBase64/setFromHexnow throwTypeErrorbefore any observable side effect when the backing buffer is immutable.NumberFormatandDateTimeFormat, plus the newIntl.PluralRulescompactDisplayoption.Temporal.ZonedDateTime— rejects not-yet-adopted calendar annotations and correctly rounds to start-of-day when midnight occurs twice across a fall-back DST transition.import source x from "…"; export { x };is now supported (#2490).Performance
System.Array.Copy/Span<T>instead of per-element decode/encode loops.set,slice,copyWithin,with,fill,reverse,toReversed, and theindexOf/lastIndexOf/includesscans are now roughly 80×–350× faster with drastically lower allocations (#2488).Robustness
'x'.padStart(2147483647)orArray.from({ length: 50000000 }), along with theArray/%TypedArray%/RegExp/JSON/Stringbulk loops, now honorTimeoutInterval/MaxStatements/LimitMemoryand raise a catchableRangeErrorinstead of hanging or throwing an uncatchableOutOfMemoryException.Correctness
vpatterns that were incorrectly rejected (e.g./-/v,/&&/v,/[\!]/v) (#2481).new RegExp(...),RegExp(...),.compile(...),String.prototype.match, etc. (#2482).stackfrom host codeThe
Error.prototype.stackaccessor change above also affects host (C#) code that inspects an error's stack trace. Previouslystackwas an own data property of every error instance, so an own-property read found the trace directly. It is now aget/setaccessor defined on%Error.prototype%and is no longer an own property of the instance (#2489).As a result, reading the trace with
ObjectInstance.TryGetValue("stack", out var v)now yieldsundefined.TryGetValuestill walks the prototype chain and finds the accessor on%Error.prototype%, but it invokes the inherited getter with the prototype as the receiver instead of the original error instance. The prototype has no[[ErrorData]]internal slot, so the getter returnsundefinedand the captured trace is lost.Read the value through the accessor-aware
Get, which threads the correct receiver:For .NET
Regexobjects exposed to the engine,JsRegExp.Source/ToString()now return the placeholder?[native regex]instead of the raw .NET pattern — the .NET pattern was misleading because it isn't a valid JS pattern (#2482).What's Changed
... (truncated)
4.9.2
What's Changed
New Contributors
Full Changelog: sebastienros/jint@v4.9.1...v4.9.2
4.9.1
A bug-fix release focused on async correctness, number-to-string conversion, and CLR interop edge cases.
Highlights
Async correctness
Three fixes together close a set of holes in
async/awaitand event-loop behavior:WaitForEventAsyncwaiters are all signaled now — previously only one waiter would wake when an event arrived (#2427).if/for/while/try/switch) (#2469) and through every expression type (#2475). Awaiting inside these constructs no longer drops state or fails to resume.If you use Jint's async API, this release is worth picking up.
Number.prototype.toString(radix)no longer overflows(-12345e+30).toString(2)and other large-magnitude calls used to cast directly tolong, overflowing at ~9.22e18 and returning wrong digits (or throwing). The integer part now goes throughBigIntegeronce it exceedslongrange, producing the mathematically exact base-rrepresentation for radix 2 through 36 (#2471).CLR interop: oversize numeric inputs
Numeric values that don't fit in the target CLR type now surface as a JavaScript
RangeErrorinstead of silently overflowing (#2465).Spec conformance
Updated test262 to commit
673e9bacand fixed the issues that surfaced (#2473).What's Changed
New Contributors
Full Changelog: sebastienros/jint@v4.9.0...v4.9.1
4.9.0
Highlights
Jint 4.9.0 is a large release focused on performance, CLR interop ergonomics, and ECMAScript spec coverage.
New language features
import defer * as ns from "mod"/import.defer()andimport source x from "mod"/import.source()(TC39 proposals; 346 + 428 test262 tests pass) (#2396)import txt from "./file.txt" with { type: "text" }(TC39 Stage 3; complements the existingjson/bytespaths) (#2403)Performance
The interpreter and built-ins got broad attention this release — see the v4.8.0 → v4.9.0 comparison table below for measured deltas.
Array.prototype.sort/indexOf/includes/concatand sparse-array conversion optimized (#2408)new Array(N)plusArray.Copyfast paths forshift/unshift/splice(#2451)FunctionEnvironmentpooled perJintFunctionDefinition.State(#2413)JsStringprimitive reads (#2450)CLR interop
Options.Interop.PreferJsPrototypeMethods()makes JS prototype methods win over CLR methods on wrapped objects (list.reverse()/list.sort()now do the JS thing onIList<T>) (#2440)Dictionary<string, object>(#2392)ThrowOnUnresolvedMemberno longer throws on missing dictionary keys (#2446)MissingMemberExceptionon implicit string coercion of CLR objects (#2439)JintException.TryGetJavaScriptLocation/TryGetJavaScriptCallStack, or viaJavaScriptException.Locationwhen usingCatchClrExceptions()(#2459)Correctness & spec coverage
for-ofdestructuring resume bugs fixed (#2453, #2456)Function.prototype.toString()returns the original source text for non-native functions (#2394)RegexTimeout(#2457)NumberFormatpath and a newICalendarProviderextension point (#2390, #2407, #2409, #2411, #2414, #2423)Performance: Jint 4.8.0 → 4.9.0
Same machine, same scripts, default BenchmarkDotNet settings on the v4.8.0 and v4.9.0 tags. Lower is better. Negative deltas are improvements.
Hardware: AMD Ryzen 9 5950X · Windows 11 · .NET 10.0.7 · BenchmarkDotNet 0.15.8.
Cold path —
Engine.Execute(string)(parses on every call)... (truncated)
4.8.0
What's Changed
New Contributors
Full Changelog: sebastienros/jint@v4.7.1...v4.8.0
4.7.1
What's Changed
Full Changelog: sebastienros/jint@v4.7.0...v4.7.1
4.7.0
What's Changed
Full Changelog: sebastienros/jint@v4.6.4...v4.7.0
4.6.4
What's Changed
PreparedScriptBenchmarkclass closer to the original by @Taritsyn in Make aPreparedScriptBenchmarkclass closer to the original sebastienros/jint#2325New Contributors
Full Changelog: sebastienros/jint@v4.6.3...v4.6.4
4.6.3
What's Changed
Full Changelog: sebastienros/jint@v4.6.2...v4.6.3
4.6.2
What's Changed
New Contributors
Full Changelog: sebastienros/jint@v4.6.1...v4.6.2
4.6.1
What's Changed
toJSONmethod invocation inJSON.stringifyby @Copilot in Fix CLR toJSON method invocation in JSON.stringify sebastienros/jint#2292UnwrapIfPromiseAsyncextension method for non-blocking promise resolution by @Copilot in AddUnwrapIfPromiseAsyncextension method for non-blocking promise resolution sebastienros/jint#2298Object.freeze()support for CLR dictionary-backedObjectWrapperby @Copilot in Fix Object.freeze() support for CLR dictionary-backed ObjectWrapper sebastienros/jint#2296InvalidCastExceptionwhen a property getter is a bound function by @Copilot in Fix InvalidCastException when a property getter is a bound function sebastienros/jint#2301Dateoperations and object resolution by @Copilot in Optimize Date operations and object resolution sebastienros/jint#2288Full Changelog: sebastienros/jint@v4.6.0...v4.6.1
4.6.0
This release brings Temporal and internationalization APIs available. There still might be some rough edges and specific non-English cultures might be missing specific formatting. There's a breaking change for custom
IReferenceResolverin #2266 ,undefinedandnullsemantics changed to make engine work as required by the official specification.Temporal and internationalization APIs are augmented with plugins to provide data from NodaTime and ICU4N, see https://github.com/sebastienros/jint/tree/main/Jint.Tests.Test262 for example implementations.
What's Changed
New Contributors
Full Changelog: sebastienros/jint@v4.5.0...v4.6.0
Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)