Changeset be567e9 for src/AST/porting.md


Ignore:
Timestamp:
May 15, 2019, 10:15:52 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
54db6ba, 69bafd2
Parents:
6d51bd7 (diff), 62315a0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/porting.md

    r6d51bd7 rbe567e9  
    33## Pointer Types ##
    44* raw pointer `T*` is used for construction, but not storage
    5 * strong pointer `ast::ptr<T>` is used for an ownership relationship
    6 * weak pointer `ast::readonly<T>` is used for an observation relationship
     5* `ast::ptr_base<T,R>` is a pointer to AST node `T` with reference type `R`
     6  * specialization: strong pointer `ast::ptr<T>` is used for an ownership relationship
     7  * specialization: weak pointer `ast::readonly<T>` is used for an observation relationship
     8  * added `ast::ptr_base<T,R>::as<S>()` with same semantics as `dynamic_cast<S*>(p)`
    79
    810## Visitors ##
     
    6062* Strong justification required for private fields
    6163  * No `get_` prefix on getters (including for generated fields)
     64    * exception is `DeclWithType::get_type()`
    6265* Notable changes:
    6366  * for concision and consistency with subclasses:
     
    112115* Still a `std::list` for children, rather than `std::vector`
    113116  * allows more-efficient splicing for purposes of later code generation
     117
     118`Type`
     119* `forall` field split off into `ParameterizedType` subclass
     120  * any type that needs it can inherit from `ParameterizedType`
     121* `get_qualifiers()` replaced with accessor `qualifiers()` and mutator `set_qualifiers()`
     122  * `get_CV()` replaced with `is_CV()` variants
     123* A number of features only supported on aggregates pushed down to `ReferenceToType`:
     124  * `attributes`: per docs [1] GCC only supports type attributes on aggregates and typedefs
     125    * suggest adding a `TypeWithAttributes` wrapper type if this proves insufficient
     126  * `getAggr()`
     127  * `genericSubstitution()`
     128
     129`BasicType`
     130* does not inherit from `Type` to allow pointer inlining
     131* moved `Kind` before qualifiers in constructor to allow for default
     132* **TODO** move `kind`, `typeNames` into code generator
     133
     134[1] https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Type-Attributes.html#Type-Attributes
     135
Note: See TracChangeset for help on using the changeset viewer.