[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] dfa: refactor to prepare for upcoming optimizations
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 3/4] dfa: refactor to prepare for upcoming optimizations |
Date: |
Tue, 07 Jun 2011 13:43:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 06/07/2011 01:34 PM, Jim Meyering wrote:
> It's slightly tighter and more readable to make this temporary "const".
> Only down-side is that inserting "const " pushes line-length to 80;-)
>
> ACK either way.
Since the const would disappear on the next patch, I pushed it without.
On the other hand, before pushing I changed the else branch from this:
+ addtok (CSET + work_mbc->cset);
to this:
+ {
+ /* The single-byte character set must be non-empty, or due to the
+ test above the entire MBCSET would be empty (which is invalid).
*/
+ assert (using_utf8() && work_mbc->cset != -1);
+ addtok (CSET + work_mbc->cset);
+ }
It all goes away in the next patch too, but the way that patch changes the
code is clearer with the assertion in place.
Paolo