You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
before turning into the desired result (hopefully).
14
14
15
-
Julia Execution
16
-
---------------
17
-
18
-
The 10,000 foot view of the whole process is as follows:
19
-
20
15
.. sidebar:: Definitions
21
16
22
17
REPL
@@ -29,6 +24,12 @@ The 10,000 foot view of the whole process is as follows:
29
24
In this form the code has been tokenized for meaning
30
25
so that it is more suitable for manipulation and execution.
31
26
27
+
28
+
Julia Execution
29
+
---------------
30
+
31
+
The 10,000 foot view of the whole process is as follows:
32
+
32
33
1. The user starts `julia`.
33
34
2. The C function :c:func:`main` from `ui/repl.c` gets called.
34
35
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
97
98
and compile-time hoisting of various run-time operations such as computing field offsets and function pointers.
98
99
Type inference may also include other steps such as constant propagation and inlining.
99
100
100
-
.. _codegen:
101
-
102
-
JIT Code Generation
103
-
-------------------
104
-
105
101
.. sidebar:: More Definitions
106
102
107
103
JIT
@@ -145,6 +141,11 @@ JIT Code Generation
145
141
Since they operate on bits directly, they must be compiled into a function
146
142
and surrounded by a call to `Core.Intrinsics.box(T, ...)` to reassign type information to the value.
147
143
144
+
.. _codegen:
145
+
146
+
JIT Code Generation
147
+
-------------------
148
+
148
149
Codegen is the process of turning a Julia AST into native machine code.
149
150
150
151
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:
Copy file name to clipboardExpand all lines: doc/devdocs/init.rst
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,15 +92,6 @@ initialises 8-bit serialisation tags for 256 frequently used
92
92
``jl_value_t`` values. The serialisation mechanism uses these tags as
93
93
shorthand (in lieu of storing whole objects) to save storage space.
94
94
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
-
104
95
If there is no sysimg file (:code:`!jl_options.image_file`) then
105
96
then :mod:`Core` and :mod:`Main` modules are created and ``boot.jl`` is evaluated:
:c:func:`_julia_init` then returns `back to main() in julia/ui/repl.c
165
156
<https://github.com/JuliaLang/julia/blob/master/ui/repl.c>`_ and main() calls :code:`true_main(argc, (char**)argv)`.
166
157
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`.
0 commit comments