Update dependency Jint to 4.14.0 - autoclosed#1185
Closed
renovate[bot] wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.13.0→4.14.0Release Notes
sebastienros/jint (Jint)
v4.14.0Jint 4.14.0 is an interop-focused performance release: CLR arrays now cross into script as live views instead of copies, recently wrapped host objects reuse their wrappers, single-candidate interop method calls dispatch through compiled invokers, and
JSON.parseinterns repeated keys and values. Host collection traversal is 10.9× faster than 4.13.0. Two interop defaults changed in this release — read the first two highlights if you pass CLR arrays to scripts or rely on per-crossing conversion behavior; everything else needs no code changes to benefit.Highlights
CLR arrays are live views by default (behavior change).
Options.Interop.ArrayConversionnow defaults toArrayConversionMode.LiveView(#2721, #2728, #2735): a single-rankT[]crossing into script becomes a live, fixed-size view over the underlying array — the way wrappedList<T>already behaves — instead of being copied into a new JS array on every read. Writes go through in both directions, and arrays exposed through read-only-declared members (e.g.IReadOnlyList<T>) produce read-only views. Iteration,Array.prototypemethods, JSON serialization, index-key enumeration (Object.keys/for..inyield"0".."n-1") andundefinedfor out-of-range reads all behave array-like, butArray.isArrayreturnsfalse, and because CLR arrays are fixed-size, resizing operations (push/pop/lengthwrites) throw aTypeErrorlike integer-indexed exotic objects do —shift/splicemay move elements before their length change throws, as for typed arrays. SetOptions.Interop.ArrayConversion = ArrayConversionMode.Copyto restore the 4.13 behavior.Recently wrapped CLR objects reuse their wrappers (behavior change). The new
Options.Interop.CacheRecentObjectWrappersdefaults totrue(#2734): a small bounded ring (8 entries, keyed by reference identity and exposed type) reuses wrappers for host objects that repeatedly cross into script. Wrapper identity becomes stable (host.Obj === host.Obj), script-attached state (freeze,defineProperty, expandos) survives crossings, and the per-crossing wrapper allocation disappears. UnderCopyarray conversion this also means repeated reads of the same CLR array reuse the firstJsArraysnapshot while it stays cached — CLR-side mutations are not re-copied; set the option tofalsefor the pre-4.14 fresh-snapshot-per-crossing behavior.Engine.Dispose()releases the ring.Interop fast lanes. Single-candidate method calls run through a compiled invoker that binds and invokes without argument arrays or boxing (#2733), with per-parameter binding flags precomputed (#2719). Resolved
ObjectWrappermembers get a per-call-site inline cache (#2722) and the member-call fast path covers primitive string receivers (#2717). Array-like wrapper creation is a cached factory call with lazily materializedlength(#2730), primitive elements convert without boxing on both indexed reads andArray.prototypeiteration (#2731, #2735), the wrapper identity caches cover CLR arrays (#2716), and implicitly implemented interface methods are deduplicated in member resolution (#2711).JSON.
JSON.parseinterns property keys and string values within a parse, parses numbers off the span with an exactly-rounded fast path and scans string content in bulk (#2718, #2725, #2732) — thejson-parse-moderncomparison row is 6% faster with 23% less allocation than 4.13.0. Parsing is also aligned with the JSON grammar (#2738): malformed numbers like-09and1.are now rejected as in V8, while raw U+2028/U+2029 in strings and escaped control characters in keys — both valid JSON — are now accepted.Strings. Chained
slice/substringandsplitsegments stay zero-copy views (#2720), whole-stringsubstring/substrreturn the receiver, and mismatched-length comparisons no longer materialize views (#2740).Execution constraints at host boundaries. Timeouts and cancellation are re-checked when control returns from host CLR code, so detection latency is bounded by one host call instead of a statement-count window, without adding per-statement cost — gated on execution depth so host-side reads of wrapped objects on an idle engine never observe a stale timer (#2713, #2714, #2715). Execution-context depth stays balanced when constraint exceptions unwind generator/async frames, and a host callback that re-enters the engine no longer resets the outer script's budget (#2736).
Correctness (including a pre-release review). A review of everything since 4.13.0 fixed: spurious TDZ when a for-header reads a name the loop body shadows (#2709) and stale closure captures from destructuring defaults in for-loop headers (#2739); the compiled-invoker lane now defers to custom
ITypeConverters and preserves reflection exception types (#2737); and the new wrapper defaults were hardened — declared-type contracts for arrays (anIReadOnlyList<T>-typed member no longer yields a writable view), a static type-mapper poisoning crash,Engine.Disposereleasing the wrapper caches, and JS-arrayin/enumeration/out-of-range semantics on array views (#2735). Closure reads memoize slot-cache chain reachability (#2726).On the engine comparison benchmarks, Jint 4.14.0 beats ClearScript (native V8) by 7.1×–9.1× on every script ↔ host interop row — host collection traversal went from last to second among all engines at 15,597 → 1,433 µs with 99% less allocation — while remaining the fastest managed engine on 10 of 12 pure-JS scripts and the fastest interpreter on all 12, and now leading
array-stressanddromaeo-object-array, rows V8 narrowly led at 4.13.0.What's Changed
Full Changelog: sebastienros/jint@v4.13.0...v4.14.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.