62b145efbb
Previously there were two separate implementations of the same initialization code, one in object.cc and one in interpreter.cc. Now they both use Object::InitializeHeader. Make TryAllocate a static method of Interpreter instead of a file-local function in interpreter.cc so that it gets access to the private method Object::InitializeHeader. TEST=ci (just code refactoring) Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try Change-Id: I4e042fbf0db84e02c88f7ca0f3e025723660001b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476120 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Tess Strickland <sstrickl@google.com>