dart-sdk/pkg/dart2native
Tess Strickland be4d469e38 [pkg/dart2native] Refactor MachO parsing.
* Move parsing functions to static methods of the classes that
  represent the data being parsed.

* Move calculations for adjusting offsets in load commands into the
  corresponding classes.

* Make function to insert a new payload segment an instance method
  of MachOFile.

* Remove unnecessary abstractions and definitions for MachO load
  commands that we don't need to parse.

These refactorings are being done to make later changes easier to
review, by first lifting the initial refactorings out into a
separate CL.

Issue: https://github.com/dart-lang/sdk/issues/49783
Change-Id: I133eb368cbb9ee0d8e4f3998ba1a0bbe8555b8aa
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,pkg-mac-release-arm64-try,pkg-mac-release-try,vm-kernel-precomp-mac-product-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256821
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-07 11:32:37 +00:00
..
lib [pkg/dart2native] Refactor MachO parsing. 2022-09-07 11:32:37 +00:00
analysis_options.yaml [pkg/dart2native] switch to use package:lints 2021-06-23 00:51:17 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
pubspec.yaml [pkg/dart2native] Refactor MachO parsing. 2022-09-07 11:32:37 +00:00