Ignore:
Timestamp:
Aug 10, 2017, 3:39:08 PM (4 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
cd7ef0b
Parents:
2edd80ae
Message:

Update discussion of cost tuple

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/working/resolver_design.md

    r2edd80ae r275f4b4  
    9191## Conversion Costs ##
    9292Each 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.
     93the following components:
     941. _unsafe_ conversion cost: summed degree of unsafe conversions; unlike CFA03, this is not a simple count of conversions (for symmetry with the safe conversions)
     952. _polymorphic unifications_: count of parameters and return values bound to some polymorphic type for boxing
     963. _type variables_: number of polymorphic type variables bound
     974. negated _type specializations_: Each type assertion specializes the polymorphism, thus decreasing the cost; nested polymorphic types (e.g. `T*`) are also counted as specializations
     985. _safe_ conversions: summed degree of safe conversions
     996. _qualifier_ conversions: summed degree of qualifier and reference conversions
    96100These components are lexically-ordered and can be summed element-wise;
    97101summation starts at `(0, 0, 0, 0, 0)`.
     102
     103**TODO** update below for consistency with this
    98104
    99105### Lvalue and Qualifier Conversions ###
Note: See TracChangeset for help on using the changeset viewer.