Ignore:
Timestamp:
Aug 3, 2016, 11:30:22 AM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
a14187f
Parents:
ff3fc93
Message:

Add note about what features to add concurrent with the resolver re-write

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/working/resolver_design.md

    rff3fc93 rac43954  
    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 a 
    954 an argument; if the argument is a type, it must be a complete type which is
    955 not a function type, if an expression, the expression must have a single
     953`sizeof` and `alignof` expressions take either a type or an expression as an
     954argument; if the argument is a type, it must be a complete type which is not a
     955function 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.