Changes in / [a14187f:aea7168]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/working/resolver_design.md

    ra14187f raea7168  
    3737
    3838An alternate possibility would be to only count two-arg constructors
    39 `void ?{} ( To*, From )` as unsafe conversions; under this semantics, safe and
     39`void ?{} ( To*, From )` as unsafe conversions; under this semantics, safe and  
    4040explicit conversions should also have a compiler-enforced restriction to
    4141ensure that they are two-arg functions (this restriction may be valuable
     
    6969two chains of conversions, one among the signed integral types, another among
    7070the unsigned, and to use monomorphic conversions to allow conversions between
    71 signed and unsigned integer types).
     71signed and unsigned integer types).   
    7272
    7373### Implementation Details ###
     
    509509A variant of the above scheme would be to fix a maximum depth of polymorphic
    510510type variables (16 seems like a reasonable choice) at which a parameter would
    511 be considered to be effectively monomorphic, and to subtract the value
     511be considered to be effectively monomorphic, and to subtract the value  
    512512described above from that maximum, clamping the result to a minimum of 0.
    513513Under this scheme, assuming a maximum value of 4, `int` has value 0, `T` has
     
    577577specifying the (completely arbitrary) maximum depth as part of the language or
    578578allowing the compiler to refuse to accept otherwise well-typed deeply-nested
    579 polymorphic types.
     579polymorphic types. 
    580580
    581581For purposes of determining polymorphism, the list of return types of a
     
    951951`sizeof`, `alignof`, and `offsetof` expressions have at most a single
    952952interpretation, of type `size_t`.
    953 `sizeof` and `alignof` expressions take either a type or an expression as an
    954 argument; if the argument is a type, it must be a complete type which is not a
    955 function type, if an expression, the expression must have a single
     953`sizeof` and `alignof` expressions take either a type or an expression as a 
     954an argument; if the argument is a type, it must be a complete type which is
     955not a function type, if an expression, the expression must have a single
    956956interpretation, the type of which conforms to the same rules.
    957957`offsetof` takes two arguments, a type and a member name; the type must be
     
    16201620                        = delete;
    16211621        }
    1622 
    1623 ## Appendix E: Features to Add in Resolver Re-write ##
    1624 * Reference types
    1625 * Special types for 0 and 1 literals
    1626 * Expression type for return statement that resolves similarly to ?=?
    1627   - This is to get rid of the kludge in the box pass that effectively
    1628     re-implements the resolver poorly.
Note: See TracChangeset for help on using the changeset viewer.