emacs-diffs
[Top][All Lists]
Advanced

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

scratch/comp-static-data 4385d8e590 4/9: comp: Use the correct integer t


From: Vibhav Pant
Subject: scratch/comp-static-data 4385d8e590 4/9: comp: Use the correct integer types and values for storing mark bits
Date: Tue, 20 Dec 2022 11:29:40 -0500 (EST)

branch: scratch/comp-static-data
commit 4385d8e590a2164917927deed4a40ebfce9f84bd
Author: Vibhav Pant <vibhavp@gmail.com>
Commit: Vibhav Pant <vibhavp@gmail.com>

    comp: Use the correct integer types and values for storing mark bits
    
    * src/comp.c (cons_block_emit_constructor,
    float_block_emit_constructor): Emit long types for the base type for
    the mark bits array in a statically emitted cons/float block, with the
    initialized value set to BITS_WORD_MAX to ensure all conses/floats in
    the block are perma-marked.
---
 src/comp.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/comp.c b/src/comp.c
index 6c6935ea78..78e10baf9d 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -2676,8 +2676,9 @@ cons_block_emit_constructor (Lisp_Object block)
   SAFE_NALLOCA (gcmarkbits, 1, cons_block_gcmarkbits_length);
   for (ptrdiff_t i = 0; i < cons_block_gcmarkbits_length; i++)
     gcmarkbits[i]
-      = gcc_jit_context_new_rvalue_from_int (comp.ctxt,
-                                            comp.ptrdiff_type, ~0u);
+      = gcc_jit_context_new_rvalue_from_long (comp.ctxt,
+                                             comp.ptrdiff_type,
+                                             BITS_WORD_MAX);
 
   gcc_jit_field *fields[] = {
     comp.cons_block_conses,
@@ -2728,7 +2729,8 @@ float_block_emit_constructor (Lisp_Object block)
   for (ptrdiff_t i = 0; i < float_block_gcmarkbits_length; i++)
     gcmarkbits[i]
       = gcc_jit_context_new_rvalue_from_long (comp.ctxt,
-                                             comp.ptrdiff_type, ~0u);
+                                             comp.ptrdiff_type,
+                                             BITS_WORD_MAX);
 
   gcc_jit_field *fields[] = {
     comp.float_block_floats,



reply via email to

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