Changes between Version 2 and Version 3 of Commentary/Compiler/CodeGen


Ignore:
Timestamp:
May 1, 2007 8:48:29 AM (8 years ago)
Author:
guest
Comment:

Added section "Generated Cmm Naming Convention"

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/CodeGen

    v2 v3  
    3333  [[GhcFile(compiler/main/Constants.lhs)]].  This is the way that these offsets are made 
    3434  available to GHC's code generator. 
     35 
     36== Generated Cmm Naming Convention== 
     37 
     38See [[GhcFile(compiler/cmm/CLabel.hs)]] 
     39 
     40Labels generated by the code generator are of the form {{{<name>_<type>}}} 
     41where {{{<name>}}} is {{{<Module>_<name>}}} for external names and {{{<unique>}}} for 
     42internal names. {{{<type>}}} is one of the following: 
     43 
     44  info::                   Info table 
     45  srt::                    Static reference table 
     46  srtd::                   Static reference table descriptor 
     47  entry::                  Entry code (function, closure) 
     48  slow::                   Slow entry code (if any) 
     49  ret::                    Direct return address     
     50  vtbl::                   Vector table 
     51  <n>_alt::                Case alternative (tag n) 
     52  dflt::                   Default case alternative 
     53  btm::                    Large bitmap vector 
     54  closure::                Static closure 
     55  con_entry::              Dynamic Constructor entry code 
     56  con_info::               Dynamic Constructor info table 
     57  static_entry::           Static Constructor entry code 
     58  static_info::            Static Constructor info table 
     59  sel_info::               Selector info table 
     60  sel_entry::              Selector entry code 
     61  cc::                     Cost centre 
     62  ccs::                    Cost centre stack 
     63 
     64Many of these distinctions are only for documentation reasons.  For 
     65example, _ret is only distinguished from _entry to make it easy to 
     66tell whether a code fragment is a return point or a closure/function 
     67entry.