D4rtRunner constructor

D4rtRunner({
  1. bool reuseAcrossRuns = true,
})

Creates a D4rtRunner instance for executing pre-parsed AST.

reuseAcrossRuns controls the cross-run performance caches (the warm parent and the per-bridged-module environments). When true (the default) those caches are kept alive across repeated executeBundle* calls so the expensive bridge-binding surface is built once and reused — the fast path, safe for almost all callers since generated bridges hold no per-run state and cannot leak between runs.

Set it to false only when you need full isolation between successive runs on the same runner: the warm parent and bridged module environments are then rebuilt fresh on every run. Migrated runners (those using providePackage) still never share state across instances regardless of this flag — it governs reuse within a runner and, for migrated runners, participation in the process-global caches.

Implementation

D4rtRunner({this.reuseAcrossRuns = true});