[nem-bug] [Nemerle 0000815]: if/else generates unneccessary code

feedback at nemerle.org feedback at nemerle.org
Sun Dec 31 21:30:59 CET 2006


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=815> 
======================================================================
Reported By:                Evin Robertson
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   815
Category:                   Compiler
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             12-31-2006 21:30 CET
Last Modified:              12-31-2006 21:30 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.

======================================================================

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                   

======================================================================




More information about the bugs mailing list