use const Link so that empty Link is always identical

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2033873002 .
This commit is contained in:
Harry Terkelsen 2016-06-02 14:25:09 -07:00
parent c2f04d2dc2
commit 88dd7c8f37

View file

@ -61,7 +61,7 @@ class LinkEntry<T> extends Link<T> {
Link<T> tail;
LinkEntry(T this.head, [Link<T> tail])
: this.tail = ((tail == null) ? new Link<T>() : tail);
: this.tail = ((tail == null) ? const Link() : tail);
Link<T> prepend(T element) {
// TODO(ahe): Use new Link<T>, but this cost 8% performance on VM.