[vm] Return empty array for constant table rather than null when there are no libraries.

This is follow-up to https://dart-review.googlesource.com/c/sdk/+/87613.

Change-Id: I4c26b07c36b1db31a20c11c1194f66f9ce56a03f
Reviewed-on: https://dart-review.googlesource.com/c/88201
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
Alexander Aprelev 2019-01-03 17:17:54 +00:00 committed by commit-bot@chromium.org
parent d200089583
commit 15b1c1c401

View file

@ -391,7 +391,7 @@ KernelLoader::KernelLoader(const Script& script,
const Array& KernelLoader::ReadConstantTable() {
if (program_->library_count() == 0) {
return Array::null_array();
return Array::empty_array();
}
// We use the very first library's toplevel class as an owner for an
// [ActiveClassScope]