Files
sdk/pkg/vm
Tess Strickland 80c79a3d84 [vm/test] Support declaring multiple instruction attributes.
Using the preprocessor string literal operator # on __VA_ARGS__
in a variadic macro does not separately stringize each argument,
but instead creates a single string of the expanded arguments.

Thus, rename DECLARE_ATTRIBUTES to DECLARE_ATTRIBUTE and have it take a
single expression. For multiple attributes, DECLARE_ATTRIBUTES_NAMED
must be used instead.

Also, use a comma fold expression in AttributesSerializer::WriteTuple to
separately call WriteAttribute with each element of the tuple in turn,
instead of calling WriteAttribute once with all the tuple contents as
arguments.

Move the demangling of attribute names that are directly stringized
from expressions from the JSON consumer to the JSON producer.

To illustrate how to add multiple attributes to an instruction, this CL
adds two attributes to the StoreField instruction: slot and
is_initialization.

When printing an instruction in the IL matcher, if the instruction has
any boolean attributes, don't print the attribute if the value is false
and only print the name if the attribute is true to reduce clutter.

TEST=ci

Change-Id: Ie541364374171c3dcbee4b609942d415a1c464e8
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327864
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-09-27 13:40:06 +00:00
..

This package hosts VM specific Dart code and helper scripts.