[vm/bytecode] Avoid crashes when trying to collect token positions without AST
[vm/bytecode] Avoid crashes when trying to collect token positions without AST

This is a temporary workaround for VM crashes when using observatory
in bytecode modes. Crashes heppen when CollectTokenPositionsFor
tries to access kernel AST (via kernel_offset()) but there isn't one.

Change-Id: I4c4dbb84653957c2f276f62216c12b58d2d666c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99084
Reviewed-by: Régis Crelier <c2bf536a10d9f2530c38e4e8da517718be8c39ce@google.com>
Commit-Queue: Alexander Markov <239e774fd29abc1267878f57afe1a8a03e0ca887@google.com>

dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk