mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Compare commits
3 commits
f7052a107c
...
7a84008270
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a84008270 | ||
|
|
5b56436f35 | ||
|
|
40a68167e7 |
4 changed files with 28 additions and 33 deletions
|
|
@ -116,16 +116,6 @@ command alias go process launch --disable-aslr false --working-dir ../lisp
|
|||
#settings set -- target.run-args --batch -l loadup --temacs=pbootstrap --bin-dest /Users/gerd/emacs/github/igc-copy/nextstep/Emacs.app/Contents/MacOS/ --eln-dest /Users/gerd/emacs/github/igc-copy/nextstep/Emacs.app/Contents/Frameworks/
|
||||
#command alias go process launch --working-dir .
|
||||
|
||||
# Start process with stderr 2> log, open log and auto-revert-tail-mode
|
||||
#process attach --waitfor --name emacs (--continue)
|
||||
|
||||
# Attach to future Emacs
|
||||
|
||||
# target create temacs
|
||||
# settings set -- target.run-args --batch -l loadup --temacs=pbootstrap --bin-dest '/Users/gerd/emacs/github/cl-packages/carbon/Emacs.app/Contents/MacOS/' --eln-dest '/Users/gerd/emacs/github/cl-packages/carbon/Emacs.app/Contents/Frameworks/'
|
||||
# command alias go process launch --working-dir .
|
||||
# ##settings set target.disable-aslr false
|
||||
|
||||
target create bootstrap-emacs
|
||||
settings set -- target.run-args -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)" --eval "(setq org--inhibit-version-check t)" -l comp -f byte-compile-refresh-preloaded -f batch-byte+native-compile ../lisp/dos-w32.el
|
||||
command alias go process launch --working-dir ../lisp/
|
||||
target create emacs
|
||||
settings set -- target.run-args
|
||||
command alias go process launch --working-dir .
|
||||
|
|
|
|||
31
src/comp.c
31
src/comp.c
|
|
@ -95,6 +95,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
|||
#undef gcc_jit_context_set_int_option
|
||||
#undef gcc_jit_context_set_logfile
|
||||
#undef gcc_jit_context_set_str_option
|
||||
#undef gcc_jit_context_zero
|
||||
#undef gcc_jit_function_get_param
|
||||
#undef gcc_jit_function_new_block
|
||||
#undef gcc_jit_function_new_local
|
||||
|
|
@ -271,6 +272,8 @@ DEF_DLL_FN (void, gcc_jit_context_set_logfile,
|
|||
DEF_DLL_FN (void, gcc_jit_context_set_str_option,
|
||||
(gcc_jit_context *ctxt, enum gcc_jit_str_option opt,
|
||||
const char *value));
|
||||
DEF_DLL_FN (gcc_jit_rvalue *, gcc_jit_context_zero,
|
||||
(gcc_jit_context *ctxt, gcc_jit_type *numeric_type));
|
||||
DEF_DLL_FN (void, gcc_jit_struct_set_fields,
|
||||
(gcc_jit_struct *struct_type, gcc_jit_location *loc, int num_fields,
|
||||
gcc_jit_field **fields));
|
||||
|
|
@ -334,6 +337,7 @@ init_gccjit_functions (void)
|
|||
LOAD_DLL_FN (library, gcc_jit_context_set_int_option);
|
||||
LOAD_DLL_FN (library, gcc_jit_context_set_logfile);
|
||||
LOAD_DLL_FN (library, gcc_jit_context_set_str_option);
|
||||
LOAD_DLL_FN (library, gcc_jit_context_zero);
|
||||
LOAD_DLL_FN (library, gcc_jit_function_get_param);
|
||||
LOAD_DLL_FN (library, gcc_jit_function_new_block);
|
||||
LOAD_DLL_FN (library, gcc_jit_function_new_local);
|
||||
|
|
@ -415,6 +419,7 @@ init_gccjit_functions (void)
|
|||
#define gcc_jit_context_set_int_option fn_gcc_jit_context_set_int_option
|
||||
#define gcc_jit_context_set_logfile fn_gcc_jit_context_set_logfile
|
||||
#define gcc_jit_context_set_str_option fn_gcc_jit_context_set_str_option
|
||||
#define gcc_jit_context_zero fn_gcc_jit_context_zero
|
||||
#define gcc_jit_function_get_param fn_gcc_jit_function_get_param
|
||||
#define gcc_jit_function_new_block fn_gcc_jit_function_new_block
|
||||
#define gcc_jit_function_new_local fn_gcc_jit_function_new_local
|
||||
|
|
@ -952,11 +957,11 @@ obj_to_reloc (Lisp_Object obj)
|
|||
comp.ptrdiff_type,
|
||||
XFIXNUM (idx));
|
||||
|
||||
#ifdef USE_POINTER_TO_CONSTANTS
|
||||
/* If we are using pointers to constant vectors instead of copying to
|
||||
vectors in the data segment, construct an indirect access. Note
|
||||
that there is no decay of arrays to pointers or similar in
|
||||
libgccjit. */
|
||||
#ifdef USE_POINTER_TO_CONSTANTS
|
||||
libgccjit. */
|
||||
gcc_jit_rvalue *zero = gcc_jit_context_zero (comp.ctxt, comp.ptrdiff_type);
|
||||
gcc_jit_lvalue *constants =
|
||||
gcc_jit_context_new_array_access (comp.ctxt, NULL, reloc.array.r_val, zero);
|
||||
|
|
@ -2713,8 +2718,9 @@ emit_static_object (const char *name, Lisp_Object obj)
|
|||
const char *p = SSDATA (str);
|
||||
|
||||
# if defined(LIBGCCJIT_HAVE_gcc_jit_global_set_initializer)
|
||||
/* FIXME; What is this if-condition for? This is the name of
|
||||
function and should always be true. */
|
||||
/* This if-condition could only be false on MS-Windows if libgccjit
|
||||
lacks 'gcc_jit_global_set_initializer', whose function pointer will
|
||||
then be left at its original NULL value. */
|
||||
if (gcc_jit_global_set_initializer)
|
||||
{
|
||||
ptrdiff_t str_size = len + 1;
|
||||
|
|
@ -2738,9 +2744,8 @@ emit_static_object (const char *name, Lisp_Object obj)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* FIXME; Is the following still needed? The above case
|
||||
seems to always be taken nowadays. */
|
||||
|
||||
/* This is for older versions of libgccjit, which lack some functions,
|
||||
and therefore cannot use the above code. */
|
||||
gcc_jit_type *a_type =
|
||||
gcc_jit_context_new_array_type (comp.ctxt,
|
||||
NULL,
|
||||
|
|
@ -2909,7 +2914,7 @@ declare_imported_data_relocs (Lisp_Object container, const char *code_symbol,
|
|||
Lisp_Object tem = CALLNI (comp-data-container-l, container);
|
||||
Lisp_Object constants = Fvconcat (1, &tem);
|
||||
|
||||
/* Emit the printed representation of the constants as a C string. */
|
||||
/* Emit the printed representation of the constants as a C string. */
|
||||
emit_static_object (text_symbol, constants);
|
||||
|
||||
*nconstants = XFIXNUM (CALLNI (hash-table-count,
|
||||
|
|
@ -2921,7 +2926,7 @@ declare_imported_data_relocs (Lisp_Object container, const char *code_symbol,
|
|||
EMACS_INT len = 1;
|
||||
gcc_jit_type *type = comp.lisp_obj_ptr_type;
|
||||
#else
|
||||
/* Lisp_Object CODE_SYMBOL[N], N = number of constants. */
|
||||
/* Lisp_Object CODE_SYMBOL[N], N = number of constants. */
|
||||
EMACS_INT len = *nconstants;
|
||||
gcc_jit_type *type = comp.lisp_obj_type;
|
||||
#endif
|
||||
|
|
@ -3035,7 +3040,7 @@ emit_abi_version (void)
|
|||
comp.void_ptr_type, ABI_VERSION_SYM);
|
||||
}
|
||||
|
||||
/* Check ABI version of CU against the current version. Do this because
|
||||
/* Check ABI version of CU against the current version. Do this because
|
||||
relying on a substring of an MD5 checksum as part of an eln's file
|
||||
name is prone to fail. */
|
||||
|
||||
|
|
@ -5331,8 +5336,8 @@ unset_cu_load_ongoing (Lisp_Object comp_u)
|
|||
}
|
||||
|
||||
/* Setup constatns vector in the data segment VEC from Lisp vector
|
||||
CONSTANTS. Store in *N the number of elements in VEC. Store in *ROOT
|
||||
an MPS root for VEC, if one is needed. */
|
||||
CONSTANTS. Store in *N the number of elements in VEC. Store in
|
||||
*ROOT an MPS root for VEC, if one is needed. */
|
||||
|
||||
static void
|
||||
setup_constants (comp_data_vector_t vec, Lisp_Object constants,
|
||||
|
|
@ -5487,7 +5492,7 @@ load_comp_unit (struct Lisp_Native_Comp_Unit *comp_u, bool loading_dump,
|
|||
&comp_u->data_eph_vec_pin);
|
||||
# endif
|
||||
/* No longer needed after top-level code has run. Let the
|
||||
vector be GC'd. */
|
||||
vector be GC'd. */
|
||||
comp_u->data_eph_vec = Qnil;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,8 +97,8 @@ struct Lisp_Native_Comp_Unit
|
|||
Lisp_Object data_eph_vec;
|
||||
|
||||
/* A Lisp vector read from a string contained in the text segment of
|
||||
the .eln (TEXT_DATA_RELOC_SYM). The elements of the vector are
|
||||
constants used in the native code. */
|
||||
the .eln (TEXT_DATA_RELOC_SYM). The elements of the vector are
|
||||
constants used in the native code. */
|
||||
Lisp_Object data_vec;
|
||||
|
||||
/* STUFF WE DO NOT DUMP!! */
|
||||
|
|
@ -107,12 +107,12 @@ struct Lisp_Native_Comp_Unit
|
|||
stored (COMP_UNIT_SYM), and an exact root for it. */
|
||||
Lisp_Object *comp_unit;
|
||||
|
||||
/* Pointers into data segment where constant vectors are found. */
|
||||
/* Pointers into data segment where constant vectors are found. */
|
||||
comp_data_vector_t data_relocs;
|
||||
comp_data_vector_t data_eph_relocs;
|
||||
|
||||
/* Size of the vectors above. 1 in the USE_POINTER_TO_CONSTANTS
|
||||
case. */
|
||||
case. */
|
||||
size_t n_data_relocs;
|
||||
size_t n_data_eph_relocs;
|
||||
|
||||
|
|
|
|||
|
|
@ -5870,7 +5870,7 @@ dump_do_dump_relocation (const uintptr_t dump_base,
|
|||
if (!NILP (lambda_data_idx))
|
||||
{
|
||||
/* FIXME/elnroot: why is the fixup not done in the Lisp
|
||||
vector? does it not exist? */
|
||||
vector? does it not exist? */
|
||||
eassert (VECTORP (comp_u->data_vec));
|
||||
|
||||
/* This is an anonymous lambda.
|
||||
|
|
@ -5878,9 +5878,9 @@ dump_do_dump_relocation (const uintptr_t dump_base,
|
|||
by code. */
|
||||
Lisp_Object tem;
|
||||
XSETSUBR (tem, subr);
|
||||
/* No need to fix something if pointers are used because
|
||||
there are no copies in vectors in the data segments. */
|
||||
# ifndef USE_POINTER_TO_CONSTANTS
|
||||
/* No need to fix something if pointers are used because
|
||||
there are no copies in vectors in the data segments. */
|
||||
Lisp_Object *fixup =
|
||||
&(comp_u->data_relocs[XFIXNUM (lambda_data_idx)]);
|
||||
eassert (EQ (*fixup, Vcomp__hashdollar));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue