Changes between Initial Version and Version 1 of Ticket #4908


Ignore:
Timestamp:
Jan 28, 2011 8:56:24 AM (3 years ago)
Author:
simonpj
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4908 – Description

    initial v1  
    44 
    55There is a local recursive function function that looks like this: 
    6  
    7 """ 
     6{{{ 
    87letrec { 
    98  $wa_X1yE [Occ=LoopBreaker] 
     
    9493} 
    9594}; 
    96 """ 
     95}}} 
    9796 
    9897Is being specialised with a rule like: 
    9998 
    100 """ 
     99{{{ 
    101100[LclId, 
    102101 Arity=3, 
     
    124123              = $s$wa_s1zl 
    125124                  sc_s1yQ sc_s1yR sc_s1yS sc_s1yT] 
    126 """ 
     125}}} 
    127126 
    128127To the final code: 
    129128 
    130 """ 
     129{{{ 
    131130letrec { 
    132131  $s$wa_s1zl 
     
    205204        GHC.Bool.True -> (# sc_s1yQ, GHC.Unit.() #) 
    206205      }; 
    207 """ 
    208  
    209 But this is daft! We can see from $wa_X1yE that the third component of the STUArray is always (I# x_XNb). Why not unpack the constructor in the specialisation too? 
     206}}} 
     207 
     208But this is daft! We can see from `$wa_X1yE` that the third component of the STUArray is always `(I# x_XNb)`. Why not unpack the constructor in the specialisation too? 
    210209 
    211210(In fact, exactly the same pattern occurs at the original call site of the local recursive function, so this problem isn't because the specialisations are being seeded from the call site rather than the loop body).