(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
(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.
: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
(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.
(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
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;
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 *
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 (
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);
/* 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 =
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,
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];
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. */
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");