diff options
| author | Andrea Corallo | 2019-11-17 12:01:59 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:38:06 +0100 |
| commit | 437c75cfcda4a0e9fd387d22aa8c0177c835c66b (patch) | |
| tree | ab03dd605548ae51ef997cf5a4f0d5bce5486024 /src/comp.c | |
| parent | 13f3b52fa422bed85fd7d50b43a167bb011e9070 (diff) | |
| download | emacs-437c75cfcda4a0e9fd387d22aa8c0177c835c66b.tar.gz emacs-437c75cfcda4a0e9fd387d22aa8c0177c835c66b.zip | |
add native-units-loaded
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/comp.c b/src/comp.c index 066440bcf87..2638290859f 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -3305,6 +3305,12 @@ DEFUN ("native-elisp-load", Fnative_elisp_load, Snative_elisp_load, 1, 1, 0, | |||
| 3305 | (Lisp_Object file) | 3305 | (Lisp_Object file) |
| 3306 | { | 3306 | { |
| 3307 | CHECK_STRING (file); | 3307 | CHECK_STRING (file); |
| 3308 | |||
| 3309 | if (NILP (Fhash_table_p (Vnative_units_loaded))) | ||
| 3310 | Vnative_units_loaded = CALLN (Fmake_hash_table, QCtest, Qequal); | ||
| 3311 | |||
| 3312 | Fputhash (file, Qt, Vnative_units_loaded); | ||
| 3313 | |||
| 3308 | dynlib_handle_ptr handle = dynlib_open (SSDATA (file)); | 3314 | dynlib_handle_ptr handle = dynlib_open (SSDATA (file)); |
| 3309 | load_handle_stack = Fcons (make_mint_ptr (handle), load_handle_stack); | 3315 | load_handle_stack = Fcons (make_mint_ptr (handle), load_handle_stack); |
| 3310 | if (!handle) | 3316 | if (!handle) |
| @@ -3387,10 +3393,14 @@ syms_of_comp (void) | |||
| 3387 | comp.emitter_dispatcher = Qnil; | 3393 | comp.emitter_dispatcher = Qnil; |
| 3388 | 3394 | ||
| 3389 | DEFVAR_LISP ("comp-ctxt", Vcomp_ctxt, | 3395 | DEFVAR_LISP ("comp-ctxt", Vcomp_ctxt, |
| 3390 | doc: /* | 3396 | doc: /* The compiler context. */); |
| 3391 | The compiler context. */); | ||
| 3392 | Vcomp_ctxt = Qnil; | 3397 | Vcomp_ctxt = Qnil; |
| 3393 | 3398 | ||
| 3399 | DEFVAR_LISP ("native-units-loaded", Vnative_units_loaded, | ||
| 3400 | doc: /* Hash table containing all the currently loaded | ||
| 3401 | compilation units file names. */); | ||
| 3402 | Vnative_units_loaded = Qnil; | ||
| 3403 | |||
| 3394 | /* Load mechanism. */ | 3404 | /* Load mechanism. */ |
| 3395 | staticpro (&Vnative_elisp_refs_hash); | 3405 | staticpro (&Vnative_elisp_refs_hash); |
| 3396 | Vnative_elisp_refs_hash | 3406 | Vnative_elisp_refs_hash |