Andrea Corallo
6e09597e27
Introduce load-true-file-name
...
* src/comp.c (maybe_defer_native_compilation): Use
`load-true-file-name' instead of `load-file-name'.
* src/lread.c (Fload, end_of_file_error, read1, read_list)
(init_lread, syms_of_lread): Add new `load-true-file-name' and
fake `load-file-name' value when loading .eln files.
2020-04-13 10:32:43 +01:00
Andrea Corallo
a04c960a35
* src/comp.c (emit_FIXNUMP): Don't emit a shift when unnecessary.
2020-04-06 19:04:43 +01:00
Andrea Corallo
4263f2fd15
* src/comp.c (emit_XFIXNUM): Fix for LSB_TAG plus annotate a FIXME.
2020-04-05 22:05:53 +01:00
Andrea Corallo
346d50989a
* src/comp.c (emit_const_lisp_obj, emit_mvar_val): Fix.
2020-04-05 21:11:07 +01:00
Andrea Corallo
598380416c
* src/comp.c (hash_native_abi): Fix assertion.
2020-04-05 21:11:05 +01:00
Andrea Corallo
7009e8af05
* src/comp.c (emit_binary_op): New function.
...
Wrap gcc_jit_context_new_binary_op within emit_binary_op to make sure
input type are coherent and save a slew of code.
2020-04-05 21:11:02 +01:00
Andrea Corallo
e3dff709b7
* src/comp.c: Emit cast only when necessary.
...
Coerce only when the destination type is different from the current
one.
2020-04-05 21:10:59 +01:00
Andrea Corallo
49a3790e68
* src/comp.c: Add MSB TAG and wide int support.
2020-04-05 21:10:56 +01:00
Andrea Corallo
70cb964481
* src/comp.c: Clean-up unnecessary field declaration.
2020-04-05 21:10:52 +01:00
Andrea Corallo
9bf9550836
src/comp.c: Fix i386
...
In i386 ABI parameter passing of structs (and unions) is done as
pointer + size. Surprisingly this is done *always* even if the
structure is known to be word size.
2020-04-03 19:05:15 +01:00
Andrea Corallo
d5f6dc131b
Prevent collisions in C namespace and function shadowing
...
This rework make functions being indexed by their unique C symbol name
preventing multiple lisp function with the same name colliding.
2020-03-29 12:30:33 +01:00
Andrea Corallo
9d8ce520f0
* comp.c (maybe_defer_native_compilation): Compile comp dependecies.
...
Make maybe_defer_native_compilation able to compile comp dependecies
breaking circularity.
2020-03-29 12:30:33 +01:00
Andrea Corallo
05f89e8ef4
src/comp.c (Fcomp__init_ctxt): Aesthetic
2020-03-29 12:28:39 +01:00
Andrea Corallo
bb0496e7e5
* comp.c (emit_mvar_access): Fix speed 1 compilation
...
At speed 1 propagate does not run and all mvars are allocated in array
0.
2020-03-24 18:47:39 +00:00
Andrea Corallo
f8b07ff4f3
Guard against function redefinition during deferred load
2020-03-23 20:37:59 +00:00
Andrea Corallo
855940df6b
* comp.c (maybe_defer_native_compilation): Fix
...
Prevent recursive compilation while deferring compilation.
2020-03-22 16:11:45 +00:00
Andrea Corallo
07e314569b
* comp.c (maybe_defer_native_compilation): Add some debug code
2020-03-22 16:11:45 +00:00
Andrea Corallo
0179d95630
* comp.c (native-elisp-load): Guard against misisng file.
2020-03-18 20:00:43 +00:00
Andrea Corallo
7565a4a117
Command late load when deferring compilation
2020-03-19 13:50:25 +00:00
Andrea Corallo
b53fc68535
Extend low level code for late load
2020-03-19 13:50:25 +00:00
Andrea Corallo
159f61baa9
Trigger native compilation when loading bytecode
...
Introduce a first mechanism to trigger compilation when lex elc files
are loaded. This is off by default and has to be better tested.
2020-03-16 23:08:34 +00:00
Andrea Corallo
144e8f64b6
Prefix native compilation folders with "eln-"
2020-03-13 22:21:08 +00:00
AndreaCorallo
566f0f1b63
* Improve load_comp_unit
...
Fix uninitialized ephemeral data relocation for the case when a dumped
compilation unit is manually reloaded.
Guard also data_ephemeral_vec against compiler optimizations.
2020-03-10 10:47:27 +00:00
AndreaCorallo
43b6f05dfb
Hash eln ABI once and add it to the output compilation path
2020-03-03 22:23:41 +00:00
AndreaCorallo
8788fab9e1
; Nit fix in comment
2020-02-26 21:36:48 +00:00
AndreaCorallo
0da62d94e2
Change parameter name into comp--compile-ctxt-to-file
2020-02-06 20:41:52 +00:00
AndreaCorallo
b41d76fa5e
Remove relocation index form LIMPLE setimm
...
Given that every object identify a relocation class simplify setimm too.
2020-03-01 19:22:27 +00:00
Andrea Corallo
5543338b0c
Optimize relocation classes for object duplication
...
Merge duplicated objects during final. Precendece is:
1 d-default
2 d-impure
3 d-ephemeral
Now every object identify uniquely a relocation class. Because of
this there's no need to keep the reloc class into m-var.
2020-03-01 19:22:27 +00:00
AndreaCorallo
511415f6f6
Store optimize qualities into .eln files
...
For now just comp-speed and comp-debug are stored.
2020-02-26 12:57:45 +00:00
AndreaCorallo
6898161a2b
Rename d-base allocation classe into d-default
2020-02-26 10:40:29 +00:00
AndreaCorallo
94dcb69256
Add ephemeral relocation data class
...
Add a new class of relocated objects that is in use just during load
process. This in order to avoid having to maintain them in the heap
and traverse them at every GC.
2020-02-26 10:40:29 +00:00
Andrea Corallo
81c34a35aa
Update copyright years plus two style nits
2020-02-16 18:34:22 +01:00
Andrea Corallo
c27394da7e
Rework frame layout
...
Every function call by reference gets use one unique array of
arguments.
2020-02-15 10:17:08 +01:00
Andrea Corallo
d71801ea34
Clean-up unused variable into load_comp_unit
2020-02-06 22:57:58 +01:00
Andrea Corallo
ea56b58098
Add assertion in load_comp_unit
...
While resurrecting from an image dump loading more than once the
same compilation unit does not make any sense.
2020-02-04 11:03:13 +00:00
Andrea Corallo
7c93bb113e
Rework load mechanism to make Vcomp_loaded_handles unnecessary
2020-02-03 21:56:46 +00:00
AndreaCorallo
6696b561d4
Fix load_comp_unit for non zero speeds
...
'dlopen' returns the same handle when trying to load two times
the same shared.
Touching 'd_reloc' etc leads to fails in case a frame with a reference
to it in a register is active. (comp-speed >= 0)
2020-02-03 12:58:09 +01:00
Andrea Corallo
c1d034fc27
Split relocated data into two separate arrays
...
Rework the functionality of the previous commit to be more efficient.
2020-01-12 13:22:30 +01:00
Andrea Corallo
93ed2c32df
Move function reloc data into pure space during bootstrap
2020-01-11 14:34:58 +01:00
Andrea Corallo
3039c55642
Do not block sw interrupts in batch mode (don't ignore C-c)
2020-01-02 23:01:33 +01:00
Andrea Corallo
c4b886831a
compile each eln to a temporary one and rename it as last
2020-01-01 11:38:18 +01:00
Andrea Corallo
2875340c9f
fix nit
2020-01-01 11:38:18 +01:00
Andrea Corallo
00f7fd7d42
fix non local propagation handling
2020-01-01 11:38:18 +01:00
Andrea Corallo
c00236a880
sign and check function link table
2020-01-01 11:38:17 +01:00
Andrea Corallo
1c08dc8212
some rework to please --enable-check-lisp-object-type
2020-01-01 11:38:17 +01:00
Andrea Corallo
f4cb9cc903
rename IMPORTED_FUNC_LINK_TABLE -> FUNC_LINK_TABLE_SYM
2020-01-01 11:38:17 +01:00
Andrea Corallo
a5a1b53807
do not force function inlining
2020-01-01 11:38:17 +01:00
Andrea Corallo
5f63ac26cc
always fill freloc before compiling too
2020-01-01 11:38:17 +01:00
Andrea Corallo
44db9b912f
never load a compilation unit without filling the func link table
2020-01-01 11:38:16 +01:00
Andrea Corallo
ef59b67e46
mitigate ifdef proliferation
2020-01-01 11:38:16 +01:00