Changes in src/AST/porting.md [3aec25f:033ff37]
- File:
-
- 1 edited
-
src/AST/porting.md (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/porting.md
r3aec25f r033ff37 30 30 * Base nodes now override `const Node * accept( Visitor & v ) const = 0` with, e.g. `const Stmt * accept( Visitor & v ) const override = 0` 31 31 * `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`36 32 37 33 ## Structural Changes ## … … 51 47 template<typename node_t> 52 48 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.58 49 59 50 All leaves of the `Node` inheritance tree are now declared `final` … … 150 141 * allows `newObject` as just default settings 151 142 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 157 143 `NamedTypeDecl` 158 144 * `parameters` => `params` … … 163 149 `AggregateDecl` 164 150 * `parameters` => `params` 165 166 `StructDecl`167 * `makeInst` replaced by better constructor on `StructInstType`.168 151 169 152 `Expr` … … 257 240 * **TODO** move `kind`, `typeNames` into code generator 258 241 259 `ReferenceToType` => `BaseInstType`242 `ReferenceToType` 260 243 * deleted `get_baseParameters()` from children 261 244 * replace with `aggr() ? aggr()->params : nullptr` … … 273 256 * `returnVals` => `returns` 274 257 * `parameters` => `params` 275 * Both now just point at types.276 258 * `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`281 259 282 260 `TypeInstType`
Note:
See TracChangeset
for help on using the changeset viewer.