[nem-bug] [Nemerle 0000815]: if/else generates unneccessary code
feedback at nemerle.org
feedback at nemerle.org
Mon Jan 1 13:03:18 CET 2007
The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=815>
======================================================================
Reported By: Evin Robertson
Assigned To: malekith
======================================================================
Project: Nemerle
Issue ID: 815
Category: Compiler
Reproducibility: always
Severity: feature
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 12-31-2006 21:30 CET
Last Modified: 01-01-2007 13:03 CET
======================================================================
Summary: if/else generates unneccessary code
Description:
{ if(a < b) x else y } is transformed to { if((a < b) == (true :> bool)) x
else y } which generates slightly inefficient code.
Attached is a patch that recognizes this pattern and generates shorter
IL.
======================================================================
----------------------------------------------------------------------
malekith - 01-01-07 13:03
----------------------------------------------------------------------
Patch applied on trunk, r7182. Thank you!
(wouldn't you want a SVN write access? ;-)
Issue History
Date Modified Username Field Change
======================================================================
12-31-06 21:30 Evin Robertson New Issue
12-31-06 21:30 Evin Robertson File Added: ShortenIfElse.patch
01-01-07 13:03 malekith Status new => resolved
01-01-07 13:03 malekith Resolution open => fixed
01-01-07 13:03 malekith Assigned To => malekith
01-01-07 13:03 malekith Note Added: 0001596
======================================================================
More information about the bugs
mailing list