[Webkit-unassigned] [Bug 115022] [SH4] Misc bugfix and cleaning in sh4 base JIT
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 24 14:40:39 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=115022
Oliver Hunt <oliver at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #199219|review?, commit-queue? |review-, commit-queue-
Flag| |
--- Comment #9 from Oliver Hunt <oliver at apple.com> 2013-04-24 14:38:58 PST ---
(From update of attachment 199219)
View in context: https://bugs.webkit.org/attachment.cgi?id=199219&action=review
>>> Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:1920
>>> + result = (cond == NonZero) ? false : true;
>>
>> I’d suggest simplifying this to "result = (cond != NonZero);”.
>
> I thought of that, but I think it's easier to read and understand with the current version: if (cond == NonZero) we get a branchFalse, and a branchTrue otherwise. Of course I'm not opposed to change that if you think this is better.
I disagree, result = cond != NonZero; is much clearer (there aren't other places where we use ?: on a boolean operation to distinguish true from false
An alternative would be
enum { BranchTrue, BranchFalse } result;
...
return result == BranchTrue ? branchTrue() : branchFalse();
That might be the cleanest and clearest
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list