Commit Graph

4 Commits

Author SHA1 Message Date
Alexander Markov 5129cff930 [vm/aot] Discard Code objects from the heap
While deserializing AOT snapshot, Code objects which do not contain
valuable information besides entry point and stack maps are discarded
and not allocated on the heap (they are replaced with
StubCode::UnknownDartCode()).

PC -> Code/CompressedStackMaps lookup is implemented using a separate
table (InstructionsTable).

Flutter gallery in release-sizeopt mode:
Heap size of snapshot objects: arm -26.89%, arm64 -27.68%

Large Flutter application in release mode with --dwarf-stack-traces:
Heap size of snapshot objects: -24.3%.
Discarded Code objects: 72.5% of all Code objects.

Issue: https://github.com/dart-lang/sdk/issues/44852.

TEST=existing tests; "--dwarf_stack_traces --no-retain_function_objects
--no-retain_code_objects" mode is enabled for a few tests.

Change-Id: I5fe3e283630c8e8f4442319d5dcae38d174dd0d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189560
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-04-13 02:36:16 +00:00
Paul Berry 4c3fad39f2 Strong mode fix for apply2_test.dart
The type signature of throwsNSME needs to be specified so that map and
list literals appearing later in the source file have their types
correctly inferred.

Change-Id: Ifa60670dc5fb7d39b6f8f028e1b55152e736554c
Reviewed-on: https://dart-review.googlesource.com/19480
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-08 23:34:50 +00:00
Bob Nystrom 07b9df22ac Use the Expect.throws___() helper methods throughout tests.
No behavioral changes, just getting rid of a lot of redundant closures
and helper functions.

Change-Id: I55c52c2cc9e5505bb64203c31aad8d76847f8eeb
Reviewed-on: https://dart-review.googlesource.com/14320
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-17 23:37:15 +00:00
Janice Collins 70935d97c5 Migrate test block 1 to Dart 2.0.
This change makes big_integer_arith_vm_test strong-mode compatible, and allows
dartdevc/dart2js to build and run big_integer tests where they can.
New issue 30170 filed to track DDC big integer handling.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2978013002 .
2017-07-19 07:55:05 -07:00