- Timestamp:
- Aug 10, 2017, 3:39:08 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- cd7ef0b
- Parents:
- 2edd80ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/working/resolver_design.md
r2edd80ae r275f4b4 91 91 ## Conversion Costs ## 92 92 Each possible resolution of an expression has a _cost_ tuple consisting of 93 the following components: _unsafe_ conversion cost, _polymorphic_ 94 specialization cost, _safe_ conversion cost, a count of _explicit_ 95 conversions, and _qualifier_ conversion cost. 93 the following components: 94 1. _unsafe_ conversion cost: summed degree of unsafe conversions; unlike CFA03, this is not a simple count of conversions (for symmetry with the safe conversions) 95 2. _polymorphic unifications_: count of parameters and return values bound to some polymorphic type for boxing 96 3. _type variables_: number of polymorphic type variables bound 97 4. negated _type specializations_: Each type assertion specializes the polymorphism, thus decreasing the cost; nested polymorphic types (e.g. `T*`) are also counted as specializations 98 5. _safe_ conversions: summed degree of safe conversions 99 6. _qualifier_ conversions: summed degree of qualifier and reference conversions 96 100 These components are lexically-ordered and can be summed element-wise; 97 101 summation starts at `(0, 0, 0, 0, 0)`. 102 103 **TODO** update below for consistency with this 98 104 99 105 ### Lvalue and Qualifier Conversions ###
Note: See TracChangeset
for help on using the changeset viewer.