unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: emacs-devel@gnu.org
Cc: Vibhav Pant <vibhavp@gmail.com>
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	[thread overview]
Message-ID: <87h6yu8ne7.fsf@yahoo.com> (raw)
In-Reply-To: <20221119164403.530B7C009EC@vcs2.savannah.gnu.org> (Vibhav Pant's message of "Sat, 19 Nov 2022 11:44:03 -0500 (EST)")

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.



      parent reply	other threads:[~2022-11-20  0:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166887624274.20851.208849360159299364@vcs2.savannah.gnu.org>
     [not found] ` <20221119164403.6C791C00B0F@vcs2.savannah.gnu.org>
2022-11-20  0:41   ` scratch/comp-static-data b5fc7dabb5 2/2: src/alloc.h: Add new header Po Lu
     [not found] ` <20221119164403.530B7C009EC@vcs2.savannah.gnu.org>
2022-11-20  0:45   ` Po Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6yu8ne7.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=vibhavp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).