IonMonkey/Overview: Difference between revisions

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 is:
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.
***x86/Lowering-x86.* - LIR generation specific to x86.
***<arch>/Lowering-<arch>.* - LIR generation specific to <arch>.
***x86/LIR-x86.h - LIR instructions specific to x86.
***<arch>/LIR-<arch>.h - LIR instructions specific to <arch>.
***x86/LOpcodes-x86.h - LIR opcodes specific to x86.
***<arch>/LOpcodes-<arch>.h - LIR opcodes specific to <arch>.
***x64/Lowering-x64.* - LIR generation specific to x64.
*Code generation logic:
***x64/LIR-x64.h - LIR instructions specific to x64.
**GreedyAllocator.* - Greedy register allocator.
***x64/LOpcodes-x64.h - LIR opcodes specific to 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.
Confirmed users
156

edits