Skip to content

Commit 3cf7a34

Browse files
move sidebars to always be before a section header or end of doc
1 parent 3160e54 commit 3cf7a34

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

doc/devdocs/eval.rst

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ Each chunk of code typically makes a trip through many esoteric acronyms such as
1212
`compile`, `parse`, `execute`, `JIT`, `interpret`, `box`, `unbox`, `intrinsic function`, `primitive function`
1313
before turning into the desired result (hopefully).
1414

15-
Julia Execution
16-
---------------
17-
18-
The 10,000 foot view of the whole process is as follows:
19-
2015
.. sidebar:: Definitions
2116

2217
REPL
@@ -29,6 +24,12 @@ The 10,000 foot view of the whole process is as follows:
2924
In this form the code has been tokenized for meaning
3025
so that it is more suitable for manipulation and execution.
3126

27+
28+
Julia Execution
29+
---------------
30+
31+
The 10,000 foot view of the whole process is as follows:
32+
3233
1. The user starts `julia`.
3334
2. The C function :c:func:`main` from `ui/repl.c` gets called.
3435
This function processes the command line arguments, filling in the :c:type:`jl_options` struct and setting the variable :code:`ARGS`.
@@ -97,11 +98,6 @@ This enables many future optimizations, such as unboxing of known immutable valu
9798
and compile-time hoisting of various run-time operations such as computing field offsets and function pointers.
9899
Type inference may also include other steps such as constant propagation and inlining.
99100

100-
.. _codegen:
101-
102-
JIT Code Generation
103-
-------------------
104-
105101
.. sidebar:: More Definitions
106102

107103
JIT
@@ -145,6 +141,11 @@ JIT Code Generation
145141
Since they operate on bits directly, they must be compiled into a function
146142
and surrounded by a call to `Core.Intrinsics.box(T, ...)` to reassign type information to the value.
147143

144+
.. _codegen:
145+
146+
JIT Code Generation
147+
-------------------
148+
148149
Codegen is the process of turning a Julia AST into native machine code.
149150

150151
The JIT environment is initialized by an early call to `jl_init_codegen in codegen.cpp <https://github.com/JuliaLang/julia/blob/master/src/codegen.cpp>`_.
@@ -168,11 +169,6 @@ Other parts of codegen are handled by various helper files:
168169
`intrinsics.cpp <https://github.com/JuliaLang/julia/blob/master/src/intrinsics.cpp>`_
169170
Handles the emission of various low-level intrinsic functions
170171

171-
.. _sysimg:
172-
173-
System Image
174-
------------
175-
176172
.. sidebar:: Bootstrapping
177173

178174
The process of creating a new system image is called "bootstrapping".
@@ -181,6 +177,11 @@ System Image
181177
and refers to the idea of starting from a very limited set of available functions and definitions
182178
and ending with the creation of a full-featured environment.
183179

180+
.. _sysimg:
181+
182+
System Image
183+
------------
184+
184185
The system image is a precompiled archive of a set of Julia files.
185186
The `sys.ji` file distributed with Julia is one such system image,
186187
generated by executing the file `sysimg.jl <https://github.com/JuliaLang/julia/blob/master/base/sysimg.jl>`_,

doc/devdocs/init.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,6 @@ initialises 8-bit serialisation tags for 256 frequently used
9292
``jl_value_t`` values. The serialisation mechanism uses these tags as
9393
shorthand (in lieu of storing whole objects) to save storage space.
9494

95-
.. sidebar:: sysimg
96-
97-
If there is a sysimg file, it contains a pre-cooked image of the :mod:`Core` and :mod:`Main` modules (and whatever else is created by ``boot.jl``). See :ref:`dev-sysimg`.
98-
99-
`jl_restore_system_image() <https://github.com/JuliaLang/julia/blob/master/src/dump.c>`_ de-serialises the saved sysimg into the current Julia runtime environment and initialisation continues after :c:func:`jl_init_box_caches` below...
100-
101-
Note: `jl_restore_system_image() (and dump.c in general) <https://github.com/JuliaLang/julia/blob/master/src/dump.c>`_ uses the :ref:`dev-ios`.
102-
103-
10495
If there is no sysimg file (:code:`!jl_options.image_file`) then
10596
then :mod:`Core` and :mod:`Main` modules are created and ``boot.jl`` is evaluated:
10697

@@ -164,6 +155,14 @@ Finally `sigint_handler() <https://github.com/JuliaLang/julia/blob/master/src/si
164155
:c:func:`_julia_init` then returns `back to main() in julia/ui/repl.c
165156
<https://github.com/JuliaLang/julia/blob/master/ui/repl.c>`_ and main() calls :code:`true_main(argc, (char**)argv)`.
166157

158+
.. sidebar:: sysimg
159+
160+
If there is a sysimg file, it contains a pre-cooked image of the :mod:`Core` and :mod:`Main` modules (and whatever else is created by ``boot.jl``). See :ref:`dev-sysimg`.
161+
162+
`jl_restore_system_image() <https://github.com/JuliaLang/julia/blob/master/src/dump.c>`_ de-serialises the saved sysimg into the current Julia runtime environment and initialisation continues after :c:func:`jl_init_box_caches` below...
163+
164+
Note: `jl_restore_system_image() (and dump.c in general) <https://github.com/JuliaLang/julia/blob/master/src/dump.c>`_ uses the :ref:`dev-ios`.
165+
167166
true_main()
168167
-----------
169168

doc/devdocs/object.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ then tagged with its type::
166166
jl_value_t *jl_gc_allocobj(size_t nbytes);
167167
void jl_set_typeof(jl_value_t *v, jl_datatype_t *type);
168168

169+
Note that all objects are allocated in multiples of 4 bytes and aligned to the platform pointer size.
170+
Memory is allocated from a pool for smaller objects, or directly with :c:func:`malloc` for large objects.
171+
169172
.. sidebar:: :ref:`man-singleton-types`
170173

171174
Singleton types have only one instance and no data fields.
@@ -174,6 +177,3 @@ then tagged with its type::
174177
e.g. :data:`nothing::Void`.
175178

176179
See :ref:`man-singleton-types` and :ref:`man-nothing`
177-
178-
Note that all objects are allocated in multiples of 4 bytes and aligned to the platform pointer size.
179-
Memory is allocated from a pool for smaller objects, or directly with :c:func:`malloc` for large objects.

0 commit comments

Comments
 (0)