Diffing_with_keysWhen diffing lists where each element has a distinct key, we can refine the diffing patch by introducing two composite edit moves: swaps and moves.
Local_storeThis module provides some facilities for creating references (and hash tables) which can easily be snapshoted and restored to an arbitrary version.
LocationSource code locations (ranges of positions), used in parsetree.
ShapeShapes are an abstract representation of modules' implementations which allow the tracking of definitions through functor applications and other module-level operations.
Typedecl_separabilityThe OCaml runtime assumes for type-directed optimizations that all types are "separable". A type is "separable" if either all its inhabitants (the values of this type) are floating-point numbers, or none of them are.
Allocated_constConstants that are always allocated (possibly statically). Blocks are not included here since they are always encoded using Prim (Pmakeblock, ...).
Closure_idCR-someday lwhite: "Closure_id" is quite a generic name. I wonder whether something like "Closure_label" would better capture that it is the label of a projection.
Export_infoExported information (that is to say, information written into a .cmx file) about a compilation unit.
Export_info_for_packTransformations on export information that are only used for the building of packs.
Extract_projectionsIdentify projections from variables used in function bodies (free variables or specialised args, for example, according to which_variables below). Projections from variables that are also used boxed are not returned.
Lift_constantsThe aim of this pass is to assign symbols to values known to be constant (in other words, whose values we know at compile time), with appropriate sharing of constants, and replace the occurrences of the constants with their corresponding symbols.
Remove_free_vars_equal_to_argsReplace free variables in closures known to be equal to specialised arguments of such closures with those specialised arguments.
Share_constantsShare lifted constants that are eligible for sharing (e.g. not strings) and have equal definitions.
Simple_value_approxSimple approximations to the runtime results of computations. This pass is designed for speed rather than accuracy; the performance is important since it is used heavily during inlining.
Simplify_commonconst_*_expr expr v annot, where the expression expr is known to evaluate to the value v, attempt to produce a more simple expression together with its approximation and the benefit gained by replacing expr with this new expression. This simplification is only performed if expr is known to have no side effects. Otherwise, expr itself is returned, with an appropriate approximation but zero benefit.
Thread_sanitizerInstrumentation of memory accesses to use ThreadSanitizer (TSan) for data race detection. This module contains an instrumentation pass on Cmm, where most of the instrumentation happens.
Unbox_closuresTurn free variables of closures into specialised arguments. The aim is to cause the closure to become closed.
Unbox_free_vars_of_closuresWhen approximations of free variables of closures indicate that they are closures or blocks, rewrite projections from such blocks to new variables (which become free in the closures), with the defining expressions of the projections lifted out of the corresponding sets of closures.
Unbox_specialised_argsWhen approximations of specialised arguments indicate that they are closures or blocks, add more specialised arguments corresponding to the projections from such blocks (with definitions of such projections lifted out), such that the original specialised arguments may later be eliminated.
Var_within_closureAn identifier, unique across the whole program, that identifies a particular variable within a particular closure. Only Project_var, and not Var, nodes are tagged with these identifiers.
VariableVariable.t is the equivalent of a non-persistent Ident.t in the Flambda tree. It wraps an Ident.t together with its source compilation_unit. As such, it is unique within a whole program, not just one compilation unit.
TopcommonThis module provides common implementations for internals of Toploop, for bytecode and native code (see Topeval for the diverging parts of the implementation).