Changeset ac43954 for doc/working
 Timestamp:
 Aug 3, 2016, 11:30:22 AM (6 years ago)
 Branches:
 aaronthesis, armeh, cleanupdtors, ctor, deferred_resn, demangler, enum, forallpointerdecay, jacob/cs343translation, jenkinssandbox, master, memory, newast, newastuniqueexpr, newenv, no_list, persistentindexer, pthreademulation, qualifiedEnum, resolvnew, with_gc
 Children:
 a14187f
 Parents:
 ff3fc93
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

doc/working/resolver_design.md
rff3fc93 rac43954 37 37 38 38 An alternate possibility would be to only count twoarg 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 40 40 explicit conversions should also have a compilerenforced restriction to 41 41 ensure that they are twoarg functions (this restriction may be valuable … … 69 69 two chains of conversions, one among the signed integral types, another among 70 70 the unsigned, and to use monomorphic conversions to allow conversions between 71 signed and unsigned integer types). 71 signed and unsigned integer types). 72 72 73 73 ### Implementation Details ### … … 509 509 A variant of the above scheme would be to fix a maximum depth of polymorphic 510 510 type variables (16 seems like a reasonable choice) at which a parameter would 511 be considered to be effectively monomorphic, and to subtract the value 511 be considered to be effectively monomorphic, and to subtract the value 512 512 described above from that maximum, clamping the result to a minimum of 0. 513 513 Under this scheme, assuming a maximum value of 4, `int` has value 0, `T` has … … 577 577 specifying the (completely arbitrary) maximum depth as part of the language or 578 578 allowing the compiler to refuse to accept otherwise welltyped deeplynested 579 polymorphic types. 579 polymorphic types. 580 580 581 581 For purposes of determining polymorphism, the list of return types of a … … 951 951 `sizeof`, `alignof`, and `offsetof` expressions have at most a single 952 952 interpretation, of type `size_t`. 953 `sizeof` and `alignof` expressions take either a type or an expression as a 954 a n argument; if the argument is a type, it must be a complete type which is955 not afunction type, if an expression, the expression must have a single953 `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 956 956 interpretation, the type of which conforms to the same rules. 957 957 `offsetof` takes two arguments, a type and a member name; the type must be … … 1620 1620 = delete; 1621 1621 } 1622 1623 ## Appendix E: Features to Add in Resolver Rewrite ## 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 reimplements the resolver poorly.
Note: See TracChangeset
for help on using the changeset viewer.