tom_d4rt_ast 0.1.12
tom_d4rt_ast: ^0.1.12 copied to clipboard
Serializable AST model for Dart code interpretation without analyzer dependency.
0.1.12 #
Fixed — enum bridging for Map<String, Enum> args and native-stored round-trips (RCC7) #
- Keeps the analyzer-free runtime in sync with
tom_d4rt1.12.0. A scriptMapwhose values are bridged enums now coerces to a nativeMap<String, Enum>(D4._coerceMapValueunwrapsBridgedEnumValue.nativeValue, mirroring_coerceMapKey), andwrapNativeReturnValuere-wraps a nativeEnumas itsBridgedEnumValueso a native-stored enum round-trips and compares equal with==.
0.1.11 #
Added — static method dispatch on bridged enums (GitHub issue #2) #
BridgedEnumDefinitionandBridgedEnumgained astaticMethodsmap (Map<String, BridgedStaticMethodAdapter>), wired throughbuildBridgedEnum(), plusBridgedEnum.findStaticMethodAdapter(name).- The analyzer-free
InterpreterVisitornow dispatches a static method call where the target is a bridged enum type (e.g.PageFormat.fromString('A4')). Previously only instance methods on enum values were reachable. - Backward compatible:
staticMethodsdefaults to an empty map. Twin oftom_d4rt1.11.0; the analyzer-free interpreter shares the fix.
0.1.10 #
Fixed — native→bridge resolution: precise match must beat fuzzy prefix across scopes #
Environment.toBridgedClassnow walks the entire enclosing scope chain doing only precise matching (exactType,_FooImpl→Foocanonicalization, generic-base name /nativeNames, suffix, name-exact, longest-nativeNames-prefix) before a second full-chain walk applies the G-DCLI-05 fuzzystartsWithfallback. Previously the fuzzy fallback ran within each frame before advancing, so under the lazy warm-parent split aMappedListIterablefromList.map(...).toList()resolved to the nearerMapbridge ("MappedListIterable".startsWith("Map")) instead of the preciseIterablenativeNamesmatch in the enclosing warm-parent frame, failing with "Bridged class 'Map' has no instance method named 'toList'".- Twin of
tom_d4rt1.10.1; the analyzer-free interpreter shares the fix.
0.1.9 #
Added — import-optimization API (additive, backward compatible) #
D4rtRunner.providePackage(String)— process-global package pool gate: returnsfalsethe first time a package is seen (caller registers its bridges) andtrueonce pooled (caller skips registration and reuses the pooled definitions). The granted set is the instance's security whitelist, exposed read-only viaallowedPackages.D4rtRunner.registerExtensions(String package, void Function() callback)/finalizeBridges()— queued bridge-package extension hooks that fire exactly once per package per process (at pool population), replacing the old once-per-instance firing.warmup()finalizes and builds the warm parent for the instance's allowed-set.- Warm-parent reuse: each
executeBundle*runs in a fresh childEnvironmentchained off a shared, immutable warm parent built at most once per allowed-set signature (migrated instances) or per instance (legacy) — script declarations never leak across executes or instances. executeBundleAs<T>/executeBundleAsAsync<T>route the result throughD4.unwrapAs<T>so consumers get a nativeTrather than aBridgedInstance.- Test/diagnostic introspection:
debugPooledPackages,debugPooledClassCount,debugWarmParentCacheSize,debugResetPool.
See doc/extension_registration.md for the canonical registration pattern.
0.1.8 #
Fixes #
- Mirror the
tom_d4rt 1.8.24same-name bridge fix (B2 "MarkdownParser clash"): theEnvironmentstashes displaced same-name bridges andInterpreterVisitorfalls back to a sibling bridge that declares the requested static/constructor member, so identically namedBridgedClasses from different libraries resolve to the one that actually declares the member.
0.1.7 #
- Housekeeping: test artifacts now live in a gitignored
testlog/folder;doc/no longer ships machine-generated baselines or last_testrun.json. No code changes.
0.1.6 #
- Mirror the
tom_d4rt 1.8.22interpreter fixes: instance members shadow bridged top-level functions (FIX-20260613-1038-C); no exception-as-control- flow on implicit-thisreads. - Mirror the
tom_d4rt 1.8.22performance work: per-instance bound-method tear-off cache, no-bindingEnvironmentframe collapse, no primitive-operand wrapping in binary expressions. - Documentation: limitations consolidated; user guide and README updated to
point at
tom_d4rt's canonical limitations reference.
0.1.5 #
- Consume
tom_ast_model ^0.1.1for theStaticResolverslot-resolution members (resolvedSlot/declSlot); the AST-drivenInterpreterVisitornow serves resolved reads from frame slots instead of name-map walks. - Mirror the
tom_d4rt 1.8.21interpreter fixes (redirecting factories, sibling static-field writes, native-side reset).
0.1.4 #
- First public release on pub.dev.
- Kept in sync with
tom_d4rtinterpreter fixes (generic type matching, enum handling,isSubtypeOfsuperclass-chain walk, stdlib native names). - AST-driven
InterpreterVisitorexecutes the analyzer-free mirror AST (SAstNode) with full bridging, permissions, and callable support.
0.1.1 #
- Support extensible dart: library bridges - unknown dart: URIs now check for bridged content before throwing an error
- Allows external packages (like tom_d4rt_flutterm) to register bridges for dart:ui and other dart: libraries
1.0.0 #
- Initial version.