mirror of
https://github.com/dart-lang/sdk
synced 2024-07-01 07:14:29 +00:00
[vm] Prevent tree shaking of fields in SendPort benchmark
In AOT the SendPort.{Send,Receive}.BinaryTree.* are really fast, because the tree shaker will remove the fields, which will make us actually not construct a tree at all but only one root node without fields. TEST=Changes benchmark to work as intended Change-Id: Idbcb1e15613b1fd071591be40c4ffd9eadc86ce5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207121 Auto-Submit: Martin Kustermann <kustermann@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
1ab1438431
commit
b15f99bdbf
|
@ -175,8 +175,11 @@ class SendPortBenchmark {
|
|||
}
|
||||
|
||||
class TreeNode {
|
||||
@pragma('vm:entry-point') // Prevent tree shaking of this field.
|
||||
final TreeNode? left;
|
||||
@pragma('vm:entry-point') // Prevent tree shaking of this field.
|
||||
final TreeNode? right;
|
||||
@pragma('vm:entry-point') // Prevent tree shaking of this field.
|
||||
final int value;
|
||||
|
||||
TreeNode(this.left, this.right, this.value);
|
||||
|
|
|
@ -177,8 +177,11 @@ class SendPortBenchmark {
|
|||
}
|
||||
|
||||
class TreeNode {
|
||||
@pragma('vm:entry-point') // Prevent tree shaking of this field.
|
||||
final TreeNode left;
|
||||
@pragma('vm:entry-point') // Prevent tree shaking of this field.
|
||||
final TreeNode right;
|
||||
@pragma('vm:entry-point') // Prevent tree shaking of this field.
|
||||
final int value;
|
||||
|
||||
TreeNode(this.left, this.right, this.value);
|
||||
|
|
Loading…
Reference in New Issue
Block a user