b9a2e1026b
There should be no GCs between Instructions::New and all write into the instructions object, because GC indiscriminately write protects all code objects at the end of the GC. In the previous version of the code assembler->GetCodeComments would potentially trigger a GC and the code would crash trying to write pointers into the code. Also move FlushICache to the point after everything is written into the code object. Fixes #34030 Change-Id: I83742715f825f897a8612dda5ef7352c572517ee Reviewed-on: https://dart-review.googlesource.com/72103 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>