Changes between Version 1 and Version 2 of Commentary/Compiler/StrictnessAnalysis/KirstenNotes


Ignore:
Timestamp:
Oct 24, 2006 12:38:32 PM (7 years ago)
Author:
kirsten
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/StrictnessAnalysis/KirstenNotes

    v1 v2  
    1212We keep track of demands on partial applications. 
    1313 
    14 After calling dmd_anal on the body of a let, which results in demand type {{{dmd_ty}}} with DmdEnv {{{dmd_env}}}, we do the following for each let-bound variable {{{f}}}: 
     14After calling dmd_anal on the body of a let, which results in demand type {{{dmd_ty}}} with demand env {{{dmd_env}}}, we do the following for each let-bound variable {{{f}}}: 
    15151. Iterate through all the keys in {{{dmd_env}}}, finding all applications of {{{f}}} to ''n'' arguments. 
    16161. For each ''i'' from 1 through ''n'' (where ''n'' is {{{f}}}'s arity), if each of the applications of {{{f}}} to ''i'' arguments has usage demand {{{OneOrZero}}}, then it's safe to mark the corresponding lambda-expression as a one-shot lambda.