b6b8b00daa
TryCatchOptimizer pass reasonably expects for all MayThrow instructions to have environment. AllocateSmallRecord instruction which is inserted when boxing an unboxed record result of a call didn't have environment, which caused crash in TryCatchOptimizer. The fix is to copy the environment from a call instruction when inserting AllocateSmallRecord. TEST=runtime/tests/vm/dart/records_return_value_unboxing_il_test.dart Fixes https://github.com/dart-lang/sdk/issues/51972 Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-x64-try Change-Id: I5b7a097329ee10638eeba2ab0d4eb2f272afebc5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293966 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>