b9dfd1a651
This change introduces specialized stubs and IL instruction for allocating records with 2 or 3 fields. This makes allocation of small records slightly faster compared to a construction of similar class instances and makes code size of record allocation smaller. Benchmark: MultipleReturns.NotInlined.Record(RunTime) 77150 -> 66222 MultipleReturns.NotInlined.RecordNamed(RunTime) 78073 -> 67044 MultipleReturns.Forwarded.Record(RunTime) 97130 -> 77635 MultipleReturns.Forwarded.RecordNamed(RunTime) 96495 -> 77904 TEST=ci Issue: https://github.com/dart-lang/sdk/issues/49719 Change-Id: I8ed7add06b39ba79dfd78bbe2afaefe606cc505b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266420 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Slava Egorov <vegorov@google.com>