[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scratch/comp-static-data 87a249440f 1/2: src/comp.c: Use `long' rval
From: |
Po Lu |
Subject: |
Re: scratch/comp-static-data 87a249440f 1/2: src/comp.c: Use `long' rvalues for storing values with GC bits. |
Date: |
Sun, 20 Nov 2022 08:45:04 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Vibhav Pant <vibhavp@gmail.com> writes:
> * src/comp.c (emit_lisp_string_constructor_rval,
> float_block_emit_constructor, emit_comp_lisp_obj): Use
> `gcc_jit_context_new_rvalue_from_long' to ensure that GC bits are
> correctly encoded in any ptrdiff_t rvalue.
Here, you wrapped the files _inside_ the parentheses in the first line
of the commit message. Not OK! It should be:
* src/comp.c (emit_lisp_string_constructor_rval)
(float_block_emit_constructor, emit_comp_lisp_obj): Use
`gcc_jit_context_new_rvalue_from_long' to ensure that GC
bits are correctly encoded in any ptrdiff_t value.
In addition, did you check this on a build with wide ints on a 32 bit
machine? Maybe even one with 68000 byte order?
> gcc_jit_rvalue *size_bytes
> = STRING_MULTIBYTE (str)
> - ? gcc_jit_context_new_rvalue_from_int (comp.ctxt,
> + ? gcc_jit_context_new_rvalue_from_long (comp.ctxt,
> comp.ptrdiff_type,
> SBYTES (str))
> // Mark unibyte strings as immovable, so that pin_string does
> // not attempt to modify them.
> - : gcc_jit_context_new_rvalue_from_int (comp.ctxt,
> + : gcc_jit_context_new_rvalue_from_long (comp.ctxt,
> comp.ptrdiff_type, -3);
Would you please place parentheses around the whole ternary, and indent
accordingly?
Thanks.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: scratch/comp-static-data 87a249440f 1/2: src/comp.c: Use `long' rvalues for storing values with GC bits.,
Po Lu <=