Limit transpilation to direct call on a regexp literal (otherwise, side-effects of multiple calls on a global regexp can't be easily replicated with Dart's RegExp; a quick visitation of the tree could tell us if a regexp is non-global or if exec is only called once on it, but that would be overkill so we're just backing out of x.exec(...) if x is not a /literal/)
Optimize case where exec result is only index-accessed
exec
is only called once on it, but that would be overkill so we're just backing out ofx.exec(...)
ifx
is not a/literal/
)exec
result is only index-accessed