Confirmed users
156
edits
mNo edit summary |
|||
Line 40: | Line 40: | ||
=File Layout= | =File Layout= | ||
All IonMonkey files are contained in <tt>js/src/ion</tt>. The entry point is <tt>ion/Ion.cpp</tt>, which mostly contains random assorted small functions. The rest | All IonMonkey files are contained in <tt>js/src/ion</tt>. The entry point is <tt>ion/Ion.cpp</tt>, which mostly contains random assorted small functions for IonCode, IonScript, and IonCompartment. The rest are: | ||
*Helpers: | *Helpers: | ||
Line 72: | Line 72: | ||
**LOpcodes.* - LIR opcodes shared by all platforms. | **LOpcodes.* - LIR opcodes shared by all platforms. | ||
***shared/Lowering-x86-shared.* - LIR generation that is shared between x86 and x64. | ***shared/Lowering-x86-shared.* - LIR generation that is shared between x86 and x64. | ||
*** | ***<arch>/Lowering-<arch>.* - LIR generation specific to <arch>. | ||
*** | ***<arch>/LIR-<arch>.h - LIR instructions specific to <arch>. | ||
*** | ***<arch>/LOpcodes-<arch>.h - LIR opcodes specific to <arch>. | ||
*** | *Code generation logic: | ||
*** | **GreedyAllocator.* - Greedy register allocator. | ||
***x64/ | **LinearScan.* - Linear scan register allocator. | ||
**CodeGenerator.* - Entry point to code generation and contains a lot of shared code. | |||
***shared/CodeGenerator-shared.* - Code generation logic that can be re-used among all architectures. | |||
***shared/CodeGenerator-x86-shared.* - Code generation that is shared between x86 and x64. | |||
***<arch>/CodeGenerator-<arch>.* - Code generation specific to <arch>. | |||
**MoveResolver.* - Performs cycle detection and topological sorting of parallel moves. | |||
**shared/MoveEmitter-x86-shared.* - Emits a sequence of parallel moves that have been cycle-detected and topologically sorted. | |||
**<arch>/StackAssignment-<arch>.h - Helper for allocating stack slots during register allocation. | |||
*Code generation bit-banging: | |||
**<arch>/Architecture-<arch>.h - Information about the architecture, such as which registers are available, their names, the calling convention, stack properties, etc. | |||
**IonRegisters.h - C++ helpers and classes for interacting with registers. | |||
**IonMacroAssembler.h - Entry point to assembling native code. Contains platform-neutral helpers. | |||
(**shared/MacroAssembler-x86-shared.h - Contains abstracted assembler logic shared between x86 and x64. | |||
***<arch>/MacroAssembler-<arch>.h - Contains abstracted assembler logic for x86. | |||
**Assembler-shared.h - Data structures used for assembling native code. | |||
***shared/Assembler-x86-shared.h - Instruction set shared between x86 and x64. | |||
***<arch>/Assembler-<arch>.* - Instruction set helpers specific to <arch>. | |||
**IonLinker.h* - Moves generated assembly into executable memory. | |||
*Runtime support: | |||
**Bailouts.* - Logic for resuming Ion methods in the interpreter. | |||
***<arch>/Bailouts-<arch>.* - Platform-specific bailout helpers. | |||
**<arch>/Trampolines-<arch>.cpp - Platform-specific trampolines requires to enter and exit Ion code. |