Commit 59d74d4
committed
inference,codegen: connect source directly to jit
This avoids unnecessary compression when running (not generating code).
While generating code, we continue the legacy behavior of storing
compressed code, since restarting from a ji without that is quite slow.
Eventually, we should also remove that code also once we have generated
the object file from it.
This replaces the defective SOURCE_MODE_FORCE_SOURCE option with a new
`typeinf_ext_toplevel` batch-mode interface for compilation which
returns all required source code. Only two options remain now:
SOURCE_MODE_NOT_REQUIRED :
Require only that the IPO information (e.g. rettype and friends) is
present.
SOURCE_MODE_FORCE_ABI :
Require that the IPO information is present (for ABI computation)
and that the returned CodeInstance can be invoked on the host target
(preferably after inference, called directly, but perfectly
acceptable for Base.Compiler to instead force the runtime to use a
stub there or call into it with the interpreter instead by having
failed to provide any code).
This replaces the awkward `jl_create_native` interface (which is now
just a shim for calling the new batch-mode `typeinf_ext_toplevel`) with
a simpler `jl_emit_native` API, which does not do any inference or other
callbacks, but simply is a batch-mode call to `jl_emit_codeinfo` and
the work to build the external wrapper around them for linkage.1 parent 835c8ac commit 59d74d4
File tree
20 files changed
+501
-502
lines changed- Compiler
- src
- test
- base
- src
- test
20 files changed
+501
-502
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | | - | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
72 | 83 | | |
| 84 | + | |
| 85 | + | |
73 | 86 | | |
74 | 87 | | |
75 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
2115 | 2114 | | |
2116 | 2115 | | |
2117 | 2116 | | |
2118 | | - | |
| 2117 | + | |
2119 | 2118 | | |
2120 | 2119 | | |
2121 | 2120 | | |
| |||
2131 | 2130 | | |
2132 | 2131 | | |
2133 | 2132 | | |
2134 | | - | |
| 2133 | + | |
2135 | 2134 | | |
2136 | 2135 | | |
2137 | 2136 | | |
| |||
2166 | 2165 | | |
2167 | 2166 | | |
2168 | 2167 | | |
2169 | | - | |
| 2168 | + | |
2170 | 2169 | | |
2171 | 2170 | | |
2172 | 2171 | | |
| |||
2247 | 2246 | | |
2248 | 2247 | | |
2249 | 2248 | | |
2250 | | - | |
| 2249 | + | |
2251 | 2250 | | |
2252 | 2251 | | |
2253 | 2252 | | |
| |||
2263 | 2262 | | |
2264 | 2263 | | |
2265 | 2264 | | |
| 2265 | + | |
2266 | 2266 | | |
2267 | 2267 | | |
2268 | 2268 | | |
| |||
0 commit comments