Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Issue 7827009: Tiny change flags cleanups. (Closed)

Created:
9 years, 3 months ago by Sven Panne
Modified:
9 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

Tiny change flags cleanups. Introduced a getter for change flags, making a related helper function private. Do not print a '*' at the end of hydrogen instruction mnemonics with side effects, this is subsumed by the 'changes' info. Committed: http://code.google.com/p/v8/source/detail?r=9092

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -19 lines) Patch
M src/hydrogen.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/hydrogen-instructions.h View 3 chunks +11 lines, -13 lines 2 comments Download
M src/hydrogen-instructions.cc View 2 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Sven Panne
9 years, 3 months ago (2011-09-01 09:46:49 UTC) #1
Kevin Millikin (Chromium)
LGTM. http://codereview.chromium.org/7827009/diff/1/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): http://codereview.chromium.org/7827009/diff/1/src/hydrogen-instructions.h#newcode688 src/hydrogen-instructions.h:688: #define DECLARE_DO(type) result |= (1 << kChanges##type); This ...
9 years, 3 months ago (2011-09-01 10:03:26 UTC) #2
Sven Panne
9 years, 3 months ago (2011-09-01 11:05:37 UTC) #3
http://codereview.chromium.org/7827009/diff/1/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):

http://codereview.chromium.org/7827009/diff/1/src/hydrogen-instructions.h#new...
src/hydrogen-instructions.h:688: #define DECLARE_DO(type) result |= (1 <<
kChanges##type);
On 2011/09/01 10:03:27, Kevin Millikin wrote:
> This wasn't introduced in your change, but could you should rename this macro
> (though I find the name funny whenever I see it).
> 
> I once defined a macro called "DECLARE_DO", because it was declaring a bunch
of
> functions named DoXXX.
> 
> Then, somebody else copied it everywhere they could, and now we have
DECLARE_DO
> for things that are declaring something other than "Do" or that are not even
> declaring anything at all.  :)
> 
> #define ADD_FLAG(flag) result |= (1 << kChanges##flag);
>   GVN_FLAG_LIST(ADD_FLAG)
> #undef ADD_FLAG

Done. Your story explains the strange name, I was always curious about the
intention behind it. :-) Perhaps one should rename the FOO_LIST macros into
FOR_EACH_FOO, this would improve the readability of our high-tech 2nd-order
macros a bit IMHO...

Powered by Google App Engine
This is Rietveld 408576698