tree: 6d4d54a34c421c1b96c8d0fe8980e29c0fb1fe1e [path history] [tgz]
  1. .gitignore
  2. benchmark_data.tar.gz.sha1
  3. dart2js_benchmark.dart
  4. dart2js_benchmark_test.dart
  5. dill_hierachy_test.dart
  6. fasta_legacy_upper_bound_test.dart
  7. fasta_types_test.dart
  8. hashcode_test.dart
  9. kernel_legacy_upper_bound_test.dart
  10. kernel_type_parser.dart
  11. kernel_type_parser_test.dart
  12. large_app_benchmark.dart
  13. large_app_benchmark_test.dart
  14. legacy_erasure_test.dart
  15. legacy_upper_bound_helper.dart
  16. mock_sdk.dart
  17. nnbd_top_merge_test.dart
  18. README.md
  19. shared_type_tests.dart
  20. subtypes_benchmark.dart
  21. type_parser.dart
  22. type_parser_test.dart
  23. type_test_helper.dart
pkg/front_end/test/fasta/types/README.md

Type Relation Test and Benchmarks

This directory contains tests and benchmarks of type relations, for example, isSubtypeOf.

Create or Update Benchmark Data

To collect new data for a benchmark, follow these steps:

  1. Identify the program that the benchmark is based on, for example, pkg/compiler/bin/dart2js.dart.

  2. Modify pkg/kernel/lib/type_environment.dart as described in the method SubtypeTester._collect_isSubtypeOf.

  3. Compile the program using Fasta, for example:

    ./sdk/bin/dart pkg/front_end/tool/_fasta/compile.dart pkg/compiler/bin/dart2js.dart

  4. This produces a file named type_checks.json in the current directory.

  5. Compress the file using gzip.