@@ -14,9 +14,9 @@ extern "C" {
1414/* *
1515 * Related sysimg exported symbols
1616 *
17- * In the following text function refer to an abstract identity .
18- * It corresponds to a `Function` that we emit in the codegen and there might be multiple copy
19- * of it in the system image. Only one of those copy will be used in a given session.
17+ * In the following text, function refers to an abstract entity .
18+ * It corresponds to a `Function` that we emit in the codegen, and there might be multiple copies
19+ * of it in the system image. Only one of those copies will be used in a given session.
2020 * Function pointers refer to a real piece of code in the system image.
2121 * Each function might have multiple function pointers in the system image
2222 * and each function pointer will correspond to only one function.
@@ -34,28 +34,28 @@ extern "C" {
3434 * The default function pointer is used if the function is cloned.
3535 * The first element is the size of the array, which should **NOT** be used as the number
3636 * of julia functions in the sysimg.
37- * Each entry in this array uniquely identifies a function which we are interested in
37+ * Each entry in this array uniquely identifies a function we are interested in
3838 * (the function may have multiple function pointers corresponding to different versions).
39- * In other sysimg info, all information of functions are stored as function index which are
40- * `uint32_t` index in this array.
39+ * In other sysimg info, all references to functions are stored as their `uint32_t` index
40+ * in this array.
4141 *
4242 * # Target data and dispatch slots (Only needed by runtime during loading)
4343 * `jl_dispatch_target_ids`: [static data] serialize target data.
4444 * This contains the number of targets which is needed to decode `jl_dispatch_fvars_idxs`
45- * in additional to the name and feature set of each target.
45+ * in addition to the name and feature set of each target.
4646 * `jl_dispatch_reloc_slots`: [static data] location and index of relocation slots.
4747 * Stored as pairs of function indices and `int32_t` offsets from `jl_sysimg_gvars_base`.
4848 * The first element is an `uint32_t` giving the number of relocations.
4949 * This is needed for functions whose address is used in a way that requires dispatch.
5050 * We currently only support one type of relocation (i.e. absolute pointer) which is enough
51- * for all use in functions as well as global GOT slot (for "PLT" callback).
51+ * for all use in functions as well as GOT slot (for "PLT" callback).
5252 * Note that not all functions being cloned are assigned a slot.
5353 * This array is sorted by the function indices.
5454 * There can be more than one slot per-function,
5555 * i.e. there can be duplicated function indices.
5656 *
5757 * # Target functions
58- * `jl_dispatch_fvars_idxs`: [static data] Target specific functions indices.
58+ * `jl_dispatch_fvars_idxs`: [static data] Target- specific function indices.
5959 * For each target, this includes a tagged `uint32_t` length, an optional `uint32_t` index
6060 * of the base target followed by an array of tagged function indices.
6161 * The base target index is required to be smaller than the index of the current target
@@ -74,25 +74,25 @@ extern "C" {
7474 * the base one since this is the only way we currently represent relocations.)
7575 * A tagged length implicitly tags all the indices and the indices will not have the tag bit
7676 * set. The lengths in this variable is needed to decode `jl_dispatch_fvars_offsets`.
77- * `jl_dispatch_fvars_offsets`: [static data] Target specific function pointer offsets.
78- * This contains all the cloned functions that we are interested and it needs to be decoded
77+ * `jl_dispatch_fvars_offsets`: [static data] Target- specific function pointer offsets.
78+ * This contains all the cloned functions that we are interested in and it needs to be decoded
7979 * and used along with `jl_dispatch_fvars_idxs`.
8080 * For the default target, there's no entries in this variable, if there's any relocations
8181 * needed for the default target, the function pointers are taken from the global offset
8282 * arrays directly.
8383 * For a `clone_all` target (i.e. with the length in `jl_dispatch_fvars_idxs` tagged), this
84- * variable contains an offset array the same length as the global one. Only the indices
85- * appeared in `jl_dispatch_fvars_idxs` needs relocation and the dispatch code should return
84+ * variable contains an offset array of the same length as the global one. Only the indices
85+ * appearing in `jl_dispatch_fvars_idxs` need relocation and the dispatch code should return
8686 * this array as the original/base function offsets.
8787 * For other targets, this variable contains an offset array with the length defined in
88- * `jl_dispatch_fvars_idxs`. Tagged indices needs relocations.
88+ * `jl_dispatch_fvars_idxs`. Tagged indices need relocations.
8989 */
9090
9191enum {
9292 JL_TARGET_VEC_CALL = 1 << 0 ,
9393 // Clone all functions
9494 JL_TARGET_CLONE_ALL = 1 << 1 ,
95- // Clone when there's scalar math operations that can benefit from target specific
95+ // Clone when there's scalar math operations that can benefit from target- specific
9696 // optimizations. This includes `muladd`, `fma`, `fast`/`contract` flags.
9797 JL_TARGET_CLONE_MATH = 1 << 2 ,
9898 // Clone when the function has a loop
0 commit comments