1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-29 08:31:35 -08:00

Rename d-base allocation classe into d-default

This commit is contained in:
AndreaCorallo 2020-02-25 21:39:59 +00:00 committed by Andrea Corallo
parent 94dcb69256
commit 6898161a2b
2 changed files with 18 additions and 18 deletions

View file

@ -114,9 +114,9 @@ Can be used by code that wants to expand differently in this case.")
(defvar comp-pass nil
"Every pass has the right to bind what it likes here.")
(defvar comp-curr-allocation-class 'd-base
(defvar comp-curr-allocation-class 'd-default
"Current allocation class.
Can be one of: 'd-base', 'd-impure' or 'd-ephemeral'. See `comp-ctxt'.")
Can be one of: 'd-default', 'd-impure' or 'd-ephemeral'. See `comp-ctxt'.")
(defconst comp-passes '(comp-spill-lap
comp-limplify
@ -196,7 +196,7 @@ Can be one of: 'd-base', 'd-impure' or 'd-ephemeral'. See `comp-ctxt'.")
(funcs-h (make-hash-table) :type hash-table
:documentation "lisp-func-name -> comp-func.
This is to build the prev field.")
(d-base (make-comp-data-container) :type comp-data-container
(d-default (make-comp-data-container) :type comp-data-container
:documentation "Standard data relocated in use by functions.")
(d-impure (make-comp-data-container) :type comp-data-container
:documentation "Relocated data that cannot be moved into pure space.
@ -320,7 +320,7 @@ structure.")
:documentation "When non nil indicates the type when known at compile
time.")
(alloc-class nil :type symbol
:documentation "Can be one of: 'd-base' 'd-impure'
:documentation "Can be one of: 'd-default' 'd-impure'
or 'd-ephemeral'."))
;; Special vars used by some passes
@ -360,8 +360,8 @@ The corresponding index is returned."
(defsubst comp-alloc-class-to-container (alloc-class)
"Given ALLOC-CLASS return the data container for the current context.
Assume allocaiton class 'd-base as default."
(cl-struct-slot-value 'comp-ctxt (or alloc-class 'd-base) comp-ctxt))
Assume allocaiton class 'd-default as default."
(cl-struct-slot-value 'comp-ctxt (or alloc-class 'd-default) comp-ctxt))
(defun comp-add-const-to-relocs (obj)
"Keep track of OBJ into the ctxt relocations.
@ -1970,7 +1970,7 @@ These are substituted with a normal 'set' op."
(defun comp-compile-ctxt-to-file (name)
"Compile as native code the current context naming it NAME.
Prepare every function for final compilation and drive the C back-end."
(comp-data-container-check (comp-ctxt-d-base comp-ctxt))
(comp-data-container-check (comp-ctxt-d-default comp-ctxt))
(comp-data-container-check (comp-ctxt-d-impure comp-ctxt))
(comp-data-container-check (comp-ctxt-d-ephemeral comp-ctxt))
(unless comp-dry-run

View file

@ -389,7 +389,7 @@ register_emitter (Lisp_Object key, void *func)
static gcc_jit_rvalue *
alloc_class_to_reloc (Lisp_Object alloc_class)
{
if (alloc_class == Qd_base)
if (alloc_class == Qd_default)
return comp.data_relocs;
else if (alloc_class == Qd_impure)
return comp.data_relocs_impure;
@ -942,7 +942,7 @@ static gcc_jit_rvalue *
emit_NILP (gcc_jit_rvalue *x)
{
emit_comment ("NILP");
return emit_EQ (x, emit_const_lisp_obj (Qnil, Qd_base));
return emit_EQ (x, emit_const_lisp_obj (Qnil, Qd_default));
}
static gcc_jit_rvalue *
@ -1045,7 +1045,7 @@ emit_CHECK_CONS (gcc_jit_rvalue *x)
gcc_jit_rvalue *args[] =
{ emit_CONSP (x),
emit_const_lisp_obj (Qconsp, Qd_base),
emit_const_lisp_obj (Qconsp, Qd_default),
x };
gcc_jit_block_add_eval (
@ -1192,7 +1192,7 @@ emit_set_internal (Lisp_Object args)
gcc_jit_rvalue *gcc_args[4];
FOR_EACH_TAIL (args)
gcc_args[i++] = emit_mvar_val (XCAR (args));
gcc_args[2] = emit_const_lisp_obj (Qnil, Qd_base);
gcc_args[2] = emit_const_lisp_obj (Qnil, Qd_default);
gcc_args[3] = gcc_jit_context_new_rvalue_from_int (comp.ctxt,
comp.int_type,
SET_INTERNAL_SET);
@ -1837,7 +1837,7 @@ declare_imported_data (void)
/* Imported objects. */
comp.data_relocs =
declare_imported_data_relocs (CALL1I (comp-ctxt-d-base, Vcomp_ctxt),
declare_imported_data_relocs (CALL1I (comp-ctxt-d-default, Vcomp_ctxt),
DATA_RELOC_SYM,
TEXT_DATA_RELOC_SYM);
comp.data_relocs_impure =
@ -2440,11 +2440,11 @@ define_CAR_CDR (void)
comp.block = is_nil_b;
gcc_jit_block_end_with_return (comp.block,
NULL,
emit_const_lisp_obj (Qnil, Qd_base));
emit_const_lisp_obj (Qnil, Qd_default));
comp.block = not_nil_b;
gcc_jit_rvalue *wrong_type_args[] =
{ emit_const_lisp_obj (Qlistp, Qd_base), c };
{ emit_const_lisp_obj (Qlistp, Qd_default), c };
gcc_jit_block_add_eval (comp.block,
NULL,
@ -2453,7 +2453,7 @@ define_CAR_CDR (void)
false));
gcc_jit_block_end_with_return (comp.block,
NULL,
emit_const_lisp_obj (Qnil, Qd_base));
emit_const_lisp_obj (Qnil, Qd_default));
}
comp.car = func[0];
comp.cdr = func[1];
@ -2833,12 +2833,12 @@ define_bool_to_lisp_obj (void)
comp.block = ret_t_block;
gcc_jit_block_end_with_return (ret_t_block,
NULL,
emit_const_lisp_obj (Qt, Qd_base));
emit_const_lisp_obj (Qt, Qd_default));
comp.block = ret_nil_block;
gcc_jit_block_end_with_return (ret_nil_block,
NULL,
emit_const_lisp_obj (Qnil, Qd_base));
emit_const_lisp_obj (Qnil, Qd_default));
}
/* Declare a function being compiled and add it to comp.exported_funcs_h. */
@ -3554,7 +3554,7 @@ syms_of_comp (void)
DEFSYM (Qintegerp, "integerp");
/* Allocation classes. */
DEFSYM (Qd_base, "d-base");
DEFSYM (Qd_default, "d-default");
DEFSYM (Qd_impure, "d-impure");
DEFSYM (Qd_ephemeral, "d-ephemeral");