dart-sdk/sdk
Stephen Adams f997d62a6d [html] Better code for Element / _ChildrenElementList method
Two tricks let us compile this more efficiently:

    e.children.addAll(cs);

Normally, get$children is inlined, returning a _ChildrenElementList
wrapper, generating:

     new W._ChildrenElementList(e, e.children).addAll$1(0, cs);

The two tricks:

1. Split _ChildElementList.addAll into an 'unwrap' that then calls the
   logic in '_addAll'

2. Add information about the properties of e.children that allow it to
   be removed.

With these tricks, dart2js can optimize the code to this version that
avoids allocating a wrapper or accessing the 'children' property:

     W._ChildrenElementList__addAll(e, cs);

Change-Id: Ifdf533ac4f9790f09f87302e67304b5696097266
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153904
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-07-13 20:33:19 +00:00
..
bin [Core Libraries] Eliminate the fork in the core libraries. 2020-06-16 23:37:36 +00:00
lib [html] Better code for Element / _ChildrenElementList method 2020-07-13 20:33:19 +00:00
api_readme.md Update the API docs readme 2020-01-16 21:23:09 +00:00
BUILD.gn [vm/ffi] Expose a subset of dart_(native_)api.h for dynamic linking. 2020-06-18 07:30:43 +00:00