Bump Jint from 4.11.0 to 4.14.0#325
Open
dependabot[bot] wants to merge 1 commit into
Open
Conversation
--- updated-dependencies: - dependency-name: Jint dependency-version: 4.14.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
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.
Updated Jint from 4.11.0 to 4.14.0.
Release notes
Sourced from Jint's releases.
4.14.0
Jint 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
... (truncated)
4.13.0
Jint 4.13.0 is a performance- and correctness-focused release. It brings a Proxy overhaul — trap dispatch rebuilt to forward with near-zero allocation, plus a new public API for implementing traps in .NET — extends the unboxed interpreter fast lanes to more operators and loop shapes, and cuts allocations on
for..of, nested-function calls and array enumeration. A thorough pre-release review of everything since 4.12.0 also fixed several correctness bugs. No code changes are required to benefit.Highlights
Proxy overhaul, and a CLR trap API. Proxy trap dispatch was rebuilt around a shared skeleton with lazy argument construction and pooled arrays, so a proxy with no matching trap forwards to its target with effectively zero allocation (#2674, #2675, #2676). Proxies can now be implemented from .NET:
Engine.Advanced.CreateProxy/CreateRevocableProxyaccept aProxyHandlerwhose virtual methods are the traps, with the same invariant enforcement as JavaScript handlers (#2678). Several Proxy spec fixes came along —getPrototypeOf/setPrototypeOfwith null prototypes (#2668), theconstructtrap's argument array (#2670), capturing[[Construct]]at creation (#2669), and thegettrap firing for a property namedrevoke(#2667) — and theObjectWrapperiterator helpers are hardened against foreign and revoked receivers (#2681).Interpreter fast lanes. New unboxed operand lanes for the arithmetic binary operators (#2664) and an int32 fast lane for remainder (#2671) remove per-iteration boxing; flag-proven casts use
Unsafe.Ason the hot paths (#2673) andJsNumber.Createavoids a nativefmod(#2662). Strict-equality guards againstundefined/null/typeofare fused (#2658), member-expression identifier reads route through the identifier caches (#2660), and the identifier slot cache is restructured hop-0-first (#2689). The tight-loop fast lane now coverswhileanddo-whilebodies (#2688).Lower allocations.
for..ofover an array no longer allocates an iterator-result object per element (#2700); per-call nested-function instantiation is allocation-free (#2684);for-inover arrays enumerates dense indices lazily without materializing a key list (#2656); and observation-only constraint checks are amortized so tight loops stay fast under a timeout (#2672).RegExp. Quantified groups without capture or lookaround hazards prefer the .NET
Regexengine (#2682), reused .NET adaptations adaptively upgrade toRegexOptions.Compiled(#2690), and the custom engine's match timeout is enforced by an inline deadline rather than a thread-pool timer (#2686).Correctness (including a pre-release review). A review of everything since 4.12.0 fixed: a regex routing regression that silently truncated matches for nullable non-capturing quantified groups (#2694) and a custom-engine bug dropping iterations for multi-atom quantified groups (#2699); Proxy trap dispatch is now atomic against a mid-dispatch revoke (#2696); top-level
awaitof a .NETTaskin a module (#2665), plus prompt cancellation of the await drain (#2697); theargumentsobject escaping a short-circuiting logical compound assignment un-materialized (#2698);for-innow includes inherited enumerable index properties onArray.prototype(#2655); and the memory limit stays exact in tight loops (#2695).Across the managed JavaScript engines for .NET, Jint 4.13.0 is the fastest engine on 17 of the 21 comparison scripts — and the fastest interpreter on all 21 — while allocating far less memory than the other engines;
dromaeo-3d-cubeis ~9% faster anddromaeo-string-base64~10% faster than 4.12.0. See the engine comparison benchmarks for the full table.What's Changed
... (truncated)
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)
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)