emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp f2864e3 1/2: Rename lambda_gc_guard -> lambda_gc_gua


From: Andrea Corallo
Subject: feature/native-comp f2864e3 1/2: Rename lambda_gc_guard -> lambda_gc_guard_h
Date: Mon, 8 Jun 2020 17:49:14 -0400 (EDT)

branch: feature/native-comp
commit f2864e3354fd60174b1d8df05a301673a81cd3ea
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    Rename lambda_gc_guard -> lambda_gc_guard_h
    
        * src/comp.h (struct Lisp_Native_Comp_Unit): Rename
        lambda_gc_guard -> lambda_gc_guard_h
    
        * src/pdumper.c (dump_do_dump_relocation): Likewise.
    
        * src/comp.c (check_comp_unit_relocs, Fcomp__register_lambda)
        (Fnative_elisp_load): Likewise.
---
 src/comp.c    | 6 +++---
 src/comp.h    | 6 +++---
 src/pdumper.c | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/comp.c b/src/comp.c
index 960badb..521cadc 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4400,7 +4400,7 @@ check_comp_unit_relocs (struct Lisp_Native_Comp_Unit 
*comp_u)
        return false;
       else if (SUBR_NATIVE_COMPILEDP (x))
        {
-         if (NILP (Fgethash (x, comp_u->lambda_gc_guard, Qnil)))
+         if (NILP (Fgethash (x, comp_u->lambda_gc_guard_h, Qnil)))
            return false;
        }
       else if (!EQ (data_imp_relocs[i], AREF (comp_u->data_impure_vec, i)))
@@ -4601,7 +4601,7 @@ DEFUN ("comp--register-lambda", Fcomp__register_lambda, 
Scomp__register_lambda,
 
   /* We must protect it against GC because the function is not
      reachable through symbols.  */
-  Fputhash (tem, Qt, cu->lambda_gc_guard);
+  Fputhash (tem, Qt, cu->lambda_gc_guard_h);
   /* This is for fixing up the value in d_reloc while resurrecting
      from dump.  See 'dump_do_dump_relocation'.  */
   eassert (NILP (Fgethash (c_name, cu->lambda_c_name_idx_h, Qnil)));
@@ -4669,7 +4669,7 @@ DEFUN ("native-elisp-load", Fnative_elisp_load, 
Snative_elisp_load, 1, 2, 0,
   comp_u->cfile = xlispstrdup (file);
 #endif
   comp_u->data_vec = Qnil;
-  comp_u->lambda_gc_guard = CALLN (Fmake_hash_table, QCtest, Qeq);
+  comp_u->lambda_gc_guard_h = CALLN (Fmake_hash_table, QCtest, Qeq);
   comp_u->lambda_c_name_idx_h = CALLN (Fmake_hash_table, QCtest, Qequal);
   load_comp_unit (comp_u, false, !NILP (late_load));
 
diff --git a/src/comp.h b/src/comp.h
index 1f64a6d..d46cdc7 100644
--- a/src/comp.h
+++ b/src/comp.h
@@ -37,9 +37,9 @@ struct Lisp_Native_Comp_Unit
   /* Original eln file loaded. */
   Lisp_Object file;
   Lisp_Object optimize_qualities;
-  /* Guard anonymous lambdas against Garbage Collection and make them
-     dumpable.  */
-  Lisp_Object lambda_gc_guard;
+  /* Guard anonymous lambdas against Garbage Collection and serve
+     sanity checks.  */
+  Lisp_Object lambda_gc_guard_h;
   /* Hash c_name -> d_reloc_imp index.  */
   Lisp_Object lambda_c_name_idx_h;
   /* Hash doc-idx -> function documentaiton.  */
diff --git a/src/pdumper.c b/src/pdumper.c
index 8cb9284..3089adb 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5299,7 +5299,7 @@ dump_do_dump_relocation (const uintptr_t dump_base,
        static enum { UNKNOWN, LOCAL_BUILD, INSTALLED } installation_state;
        struct Lisp_Native_Comp_Unit *comp_u =
          dump_ptr (dump_base, reloc_offset);
-       comp_u->lambda_gc_guard = CALLN (Fmake_hash_table, QCtest, Qeq);
+       comp_u->lambda_gc_guard_h = CALLN (Fmake_hash_table, QCtest, Qeq);
        if (!CONSP (comp_u->file))
          error ("Trying to load incoherent dumped .eln");
 
@@ -5367,7 +5367,7 @@ dump_do_dump_relocation (const uintptr_t dump_base,
              &(comp_u->data_imp_relocs[XFIXNUM (lambda_data_idx)]);
            eassert (EQ (*fixup, Qlambda_fixup));
            *fixup = tem;
-           Fputhash (tem, Qt, comp_u->lambda_gc_guard);
+           Fputhash (tem, Qt, comp_u->lambda_gc_guard_h);
          }
        break;
       }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]