Changeset eef8dfb for src/AST/porting.md


Ignore:
Timestamp:
Jan 7, 2021, 2:55:57 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
58fe85a
Parents:
bdfc032 (diff), 44e37ef (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' into dkobets-vector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/porting.md

    rbdfc032 reef8dfb  
    3030  * Base nodes now override `const Node * accept( Visitor & v ) const = 0` with, e.g. `const Stmt * accept( Visitor & v ) const override = 0`
    3131* `PassVisitor` is replaced with `ast::Pass`
     32  * Most one shot uses can use `ast::Pass::run` and `ast::Pass::read`.
     33
     34`WithConstTypeSubstitution`
     35* `env` => `typeSubs`
    3236
    3337## Structural Changes ##
     
    4751      template<typename node_t>
    4852      friend node_t * mutate(const node_t * node);
     53      template<typename node_t>
     54      friend node_t * shallowCopy(const node_t * node);
     55    or equilant.
     56* You should use the `mutate` function where possible as it avoids extra copies.
     57  * If you must copy use `shallowCopy` or `deepCopy` as required.
    4958
    5059All leaves of the `Node` inheritance tree are now declared `final`
     
    141150  * allows `newObject` as just default settings
    142151
     152`FunctionDecl`
     153* `params` and `returns` added.
     154  * Contain the declarations of the parameters and return variables.
     155  * Types should match (even be shared with) the fields of `type`.
     156
    143157`NamedTypeDecl`
    144158* `parameters` => `params`
     
    149163`AggregateDecl`
    150164* `parameters` => `params`
     165
     166`StructDecl`
     167* `makeInst` replaced by better constructor on `StructInstType`.
    151168
    152169`Expr`
     
    240257* **TODO** move `kind`, `typeNames` into code generator
    241258
    242 `ReferenceToType`
     259`ReferenceToType` => `BaseInstType`
    243260* deleted `get_baseParameters()` from children
    244261  * replace with `aggr() ? aggr()->params : nullptr`
     
    256273* `returnVals` => `returns`
    257274* `parameters` => `params`
     275  * Both now just point at types.
    258276* `bool isVarArgs;` => `enum ArgumentFlag { FixedArgs, VariableArgs }; ArgumentFlag isVarArgs;`
     277
     278`SueInstType`
     279* Template class, with specializations and using to implement some other types:
     280  * `StructInstType`, `UnionInstType` & `EnumInstType`
    259281
    260282`TypeInstType`
Note: See TracChangeset for help on using the changeset viewer.