dart-sdk/runtime/vm/compiler
Alexander Markov 63e170a242 [vm/compiler] More consistent handling of inputs of IL instructions
This change removes duplicate management of inputs in variadic
IL instructions by introducing VariadicDefinition and
VariadicDefinitionWithEmbeddedInputs base classes.

TemplateInstruction and TemplateDefinition are used in more
places where appropriate.

Number of inputs no longer depends on the values of the inputs
(DropTempsInstr and AllocateObjectInstr).

This change also prepares IL for the future implementation of binary
serialization/deserialization in the following ways:
* Environment now holds Function and not ParsedFunction
  (which are not going to be serialized).
* Instructions no longer keep Zone* pointer (it's redundant).
* NativeCallInstr keeps references to handles instead of pointers.

TEST=ci (pure refactoring)

Change-Id: I932b62c1c207bbf60cddbded8a39b41beabd3e83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253480
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-08-03 14:49:55 +00:00
..
aot [vm, compiler] Discover the sole implementation of an interface when it is a different class than the interface. 2022-07-26 17:33:37 +00:00
api Fix typos 2022-07-12 19:35:22 +00:00
assembler Revert "[vm, compiler] Implement unboxed SIMD for RISC-V via lowering." 2022-08-03 10:32:46 +00:00
backend [vm/compiler] More consistent handling of inputs of IL instructions 2022-08-03 14:49:55 +00:00
ffi Revert "[vm] Fix building simriscv64 on Mac." 2022-07-18 21:39:13 +00:00
frontend [vm/compiler] More consistent handling of inputs of IL instructions 2022-08-03 14:49:55 +00:00
jit [vm, compiler] Rename StoreInstanceFieldInstr to StoreFieldInstr to match LoadFieldInstr and GuardFieldXYZInstr. 2022-07-27 20:00:49 +00:00
asm_intrinsifier.cc [vm/compiler] Add check to prevent inclusion of compiler headers into AOT runtime 2020-04-17 13:11:08 +00:00
asm_intrinsifier.h [vm] Cleanup workarounds for removed flag --throw_on_javascript_int_overflow. 2022-02-03 21:10:46 +00:00
asm_intrinsifier_arm.cc Reland "[vm] Generate event ids for synchronous begin and end events." 2022-07-22 19:13:47 +00:00
asm_intrinsifier_arm64.cc Reland "[vm] Generate event ids for synchronous begin and end events." 2022-07-22 19:13:47 +00:00
asm_intrinsifier_ia32.cc Reland "[vm] Generate event ids for synchronous begin and end events." 2022-07-22 19:13:47 +00:00
asm_intrinsifier_riscv.cc Reland "[vm] Generate event ids for synchronous begin and end events." 2022-07-22 19:13:47 +00:00
asm_intrinsifier_test.cc [vm] Refactor generation of identity hashes. 2021-12-13 22:31:46 +00:00
asm_intrinsifier_x64.cc Reland "[vm] Generate event ids for synchronous begin and end events." 2022-07-22 19:13:47 +00:00
call_specializer.cc [vm, compiler] Rename StoreInstanceFieldInstr to StoreFieldInstr to match LoadFieldInstr and GuardFieldXYZInstr. 2022-07-27 20:00:49 +00:00
call_specializer.h [vm, compiler] Discover the sole implementation of an interface when it is a different class than the interface. 2022-07-26 17:33:37 +00:00
cha.cc [vm, compiler] Discover the sole implementation of an interface when it is a different class than the interface. 2022-07-26 17:33:37 +00:00
cha.h [vm, compiler] Discover the sole implementation of an interface when it is a different class than the interface. 2022-07-26 17:33:37 +00:00
cha_test.cc [vm/concurrency] Change references to class_table/object_store/heap from Isolate to IsolateGroup 2021-01-06 15:22:11 +00:00
compiler_pass.cc [vm/ffi] Introduce CCallInstr and replace handle instructions 2022-05-30 20:58:03 +00:00
compiler_pass.h Fix typos 2022-07-12 19:35:22 +00:00
compiler_sources.gni [vm] Support RISC-V. 2022-01-20 00:57:57 +00:00
compiler_state.cc Fix typos 2022-07-12 19:35:22 +00:00
compiler_state.h [vm] Include compiler state in crash reports. 2021-11-11 14:30:52 +00:00
compiler_timings.cc [vm/compiler] Add --print-precompiler-timings 2021-05-11 11:15:53 +00:00
compiler_timings.h [vm/compiler] Minor improvements for AOT compilation time 2021-09-13 21:25:30 +00:00
graph_intrinsifier.cc [vm, compiler] Rename StoreInstanceFieldInstr to StoreFieldInstr to match LoadFieldInstr and GuardFieldXYZInstr. 2022-07-27 20:00:49 +00:00
graph_intrinsifier.h [vm] Move implementation of dart:math intrinsics to flow graph builder 2021-08-27 17:42:27 +00:00
intrinsifier.cc [vm] Cleanup workarounds for removed flag --throw_on_javascript_int_overflow. 2022-02-03 21:10:46 +00:00
intrinsifier.h Reland "[vm/concurrency] When generating Store/Load instructions use guard information that is kept on a slot." 2021-11-30 21:45:55 +00:00
method_recognizer.cc [vm] Give mutable and immutable arrays a common superclass. 2022-02-23 18:34:03 +00:00
method_recognizer.h [vm/ffi] ABI-specific integers 2021-12-16 22:07:00 +00:00
offsets_extractor.cc [vm] Support RISC-V. 2022-01-20 00:57:57 +00:00
README.md
recognized_methods_list.h Reland "[vm] Generate event ids for synchronous begin and end events." 2022-07-22 19:13:47 +00:00
relocation.cc [vm] Remove support for non-bare AOT snapshots 2021-11-24 13:03:52 +00:00
relocation.h [vm/compiler] Improve precision of AOT code relocator 2021-04-29 15:12:15 +00:00
relocation_test.cc [vm] Support RISC-V. 2022-01-20 00:57:57 +00:00
runtime_api.cc [vm, compiler] Fix loading Smis from the pool instead of as immediates due to polluted upper bits under compressed pointers. 2022-07-07 16:08:15 +00:00
runtime_api.h Reland "[vm] Generate event ids for synchronous begin and end events." 2022-07-22 19:13:47 +00:00
runtime_offsets_extracted.h [vm, compiler] Discover the sole implementation of an interface when it is a different class than the interface. 2022-07-26 17:33:37 +00:00
runtime_offsets_list.h Reland "[vm] Generate event ids for synchronous begin and end events." 2022-07-22 19:13:47 +00:00
stub_code_compiler.cc [vm] Reduce number of callbacks used in sync* functions 2022-07-12 19:30:12 +00:00
stub_code_compiler.h [vm] Reduce number of callbacks used in sync* functions 2022-07-12 19:30:12 +00:00
stub_code_compiler_arm.cc [vm] Avoid clobbering array length in AllocateArray stub on ARM 2022-07-01 12:31:47 +00:00
stub_code_compiler_arm64.cc [ VM ] Ensure TypeArguments register is preserved when regenerating allocation stubs for parameterized classes 2022-05-06 12:57:44 +00:00
stub_code_compiler_ia32.cc [ VM ] Ensure TypeArguments register is preserved when regenerating allocation stubs for parameterized classes 2022-05-06 12:57:44 +00:00
stub_code_compiler_riscv.cc [vm, compiler] Support ShadowCallStack on Fuchsia RISC-V. 2022-05-16 22:35:55 +00:00
stub_code_compiler_x64.cc [ VM ] Ensure TypeArguments register is preserved when regenerating allocation stubs for parameterized classes 2022-05-06 12:57:44 +00:00
write_barrier_elimination.cc [vm, compiler] Rename StoreInstanceFieldInstr to StoreFieldInstr to match LoadFieldInstr and GuardFieldXYZInstr. 2022-07-27 20:00:49 +00:00
write_barrier_elimination.h [vm/compiler] Add check to prevent inclusion of compiler headers into AOT runtime 2020-04-17 13:11:08 +00:00
write_barrier_elimination_test.cc [vm, compiler] Rename StoreInstanceFieldInstr to StoreFieldInstr to match LoadFieldInstr and GuardFieldXYZInstr. 2022-07-27 20:00:49 +00:00

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.