a261196ea7
Previously, when taking a tear-off, a separate Context object was allocated in order to capture receiver. Now, receiver is stored directly in the Closure object in the 'context' field. This saves 1 object allocation per tear-off and makes tear-offs cheaper compared to explicit closures which can share context with other closures. Benchmarks in AOT mode: x64: TearOff.NotInlined +40% TearOff.NotInlined.InTry +43% TearOff.Inlined.InTry +47% arm64: TearOff.NotInlined +27-43% TearOff.NotInlined.InTry +29-43% TearOff.Inlined.InTry +58-94% arm64c: TearOff.NotInlined +71% TearOff.NotInlined.InTry +72% TearOff.Inlined.InTry +96% TEST=ci Issue: https://github.com/dart-lang/sdk/issues/54808 Change-Id: I3ad95e8a8a4fc23f856bbc0fe238da58a9d25b8d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350945 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
Dart VM Compilation Pipeline
This folder contains Dart VM compilation pipeline.
Compilation pipeline is mainly responsible for converting AST or Kernel AST into IL flow graphs and then generating native code from IL.
It has the following structure:
| Directory | What goes there |
|---|---|
assembler/ |
Assemblers and disassemblers |
backend/ |
IL based compilation backend: optimization passes and architecture specific code generation rules |
frontend/ |
Frontends responsible for converting AST into IL |
jit/ |
JIT specific passes and compilation pipeline entry points |
aot/ |
AOT specific passes and compilation pipeline entry points |
. |
Shared code or code without clear designation. |
Currently there are no layering restrictions and components from different subfolders can reference each other.