From b7eb3f3c92ac6ef6eb7b4c1beecaf603bac08c1a Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Mon, 5 Feb 2024 10:36:59 +0000 Subject: [PATCH] [CFE] Introduce `forEachMember` on kernel Library and class; change verifier slightly verify_with_lazy_loading: instructions:u: -0.1311% +/- 0.0001% (-1182610.00 +/- 971.82) verify_without_lazy_loading: instructions:u: -0.1267% +/- 0.0002% (-1124839.67 +/- 1776.77) Change-Id: Idef856c7f6ad99c12deaa07ab95598e77a51f57e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349863 Reviewed-by: Johnni Winther Commit-Queue: Jens Johansen --- .../tool/verify_with_lazy_loading.dart | 28 ++++++++ .../tool/verify_without_lazy_loading.dart | 29 ++++++++ pkg/kernel/lib/ast.dart | 11 +++ pkg/kernel/lib/verifier.dart | 70 +++++-------------- 4 files changed, 87 insertions(+), 51 deletions(-) create mode 100644 pkg/front_end/tool/verify_with_lazy_loading.dart create mode 100644 pkg/front_end/tool/verify_without_lazy_loading.dart diff --git a/pkg/front_end/tool/verify_with_lazy_loading.dart b/pkg/front_end/tool/verify_with_lazy_loading.dart new file mode 100644 index 00000000000..46acbb11e14 --- /dev/null +++ b/pkg/front_end/tool/verify_with_lazy_loading.dart @@ -0,0 +1,28 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import "dart:io"; + +import "package:kernel/binary/ast_from_binary.dart"; +import "package:kernel/kernel.dart"; +import "package:kernel/target/targets.dart"; +import "package:kernel/verifier.dart"; +import "package:vm/target/vm.dart"; + +void main(List args) { + if (args.length != 1) throw "Usage: dart