October 21, 2015 [dmd-internals] [D-Programming-Language/dmd] ac65fb: Improve code style for maintenability | ||||
---|---|---|---|---|
| ||||
Attachments:
| Branch: refs/heads/stable Home: https://github.com/D-Programming-Language/dmd Commit: ac65fbb1d12be83c2384a459ebab1fb9c9ca71c8 https://github.com/D-Programming-Language/dmd/commit/ac65fbb1d12be83c2384a459ebab1fb9c9ca71c8 Author: k-hara <k.hara.pg@gmail.com> Date: 2015-10-20 (Tue, 20 Oct 2015) Changed paths: M src/declaration.d M src/dinterpret.d M src/expression.d M src/func.d M src/inline.d Log Message: ----------- Improve code style for maintenability - Too squashed code blocks hard to understand. - Too long condition lines are hard to read. Commit: 3606ede4836265a04986593a180c3e0f9b008c0b https://github.com/D-Programming-Language/dmd/commit/3606ede4836265a04986593a180c3e0f9b008c0b Author: k-hara <k.hara.pg@gmail.com> Date: 2015-10-20 (Tue, 20 Oct 2015) Changed paths: M src/e2ir.c M src/expression.d M src/expression.h Log Message: ----------- Add enum MemorySet and name flags for AssignExp Commit: 3224f462eacbcd2d1cab663ea2af1e46d8bfd6fd https://github.com/D-Programming-Language/dmd/commit/3224f462eacbcd2d1cab663ea2af1e46d8bfd6fd Author: k-hara <k.hara.pg@gmail.com> Date: 2015-10-20 (Tue, 20 Oct 2015) Changed paths: M src/dinterpret.d M src/e2ir.c M src/expression.d M src/expression.h M src/inline.d M test/runnable/inline.d Log Message: ----------- fix Issue 15207 - Wrong codegen with -inline When issue 14944 fixed, the ref variable content initializing form had been flagged by `MemorySet.refValueInit`. However, inilining may replace `AssignExp.e1` operand with a `STCref` temporary variable. When it happens, the `MemorySet.refValueInit` flag will be ignored in `AssignExp.toElem` and wrong code had generated. To avoid the issue, instead flag the case "ref varaible initialization" by `MemorySet.referenceInit`. Its meaning will be kept beyond inlining stage, and the bug won't happen. Commit: ab3497b681125a2b945d5fdbdedcc3abe60004fd https://github.com/D-Programming-Language/dmd/commit/ab3497b681125a2b945d5fdbdedcc3abe60004fd Author: k-hara <k.hara.pg@gmail.com> Date: 2015-10-20 (Tue, 20 Oct 2015) Changed paths: M src/e2ir.c M src/inline.d Log Message: ----------- Move STClazy variable assignment handling from inlining to glue layer Commit: ffb19cb00b0221f2f430f65546c2644497bb5f73 https://github.com/D-Programming-Language/dmd/commit/ffb19cb00b0221f2f430f65546c2644497bb5f73 Author: k-hara <k.hara.pg@gmail.com> Date: 2015-10-20 (Tue, 20 Oct 2015) Changed paths: M src/declaration.d M src/e2ir.c M src/expression.d M src/expression.h M src/func.d M src/inline.d Log Message: ----------- Reduce branches around the use of BlitExp and ConstructExp After this change, the frontend code for internal code generation would be simple: - If value assignment (construction) may need postblit call, use `ConstructExp`. - If bare memory copy is necessary, use `BlitExp`. Commit: cbe73499c1ec2ed4d3845d4240517227879f8f73 https://github.com/D-Programming-Language/dmd/commit/cbe73499c1ec2ed4d3845d4240517227879f8f73 Author: k-hara <k.hara.pg@gmail.com> Date: 2015-10-20 (Tue, 20 Oct 2015) Changed paths: M src/expression.d M src/expression.h M src/func.d M src/inline.d Log Message: ----------- Add convenient (Construct|Blit)Exp constructors for internal use A referernce variable initialization is not normally generated from source code. It's always introduced by internal AST generation or inlining. So, the ref variables handling is necessary only when the new convenient constructos used for them. Commit: 77463d7b0503a96d0ea367f5f29df15ed7655cad https://github.com/D-Programming-Language/dmd/commit/77463d7b0503a96d0ea367f5f29df15ed7655cad Author: Martin Nowak <code@dawg.eu> Date: 2015-10-21 (Wed, 21 Oct 2015) Changed paths: M src/declaration.d M src/dinterpret.d M src/e2ir.c M src/expression.d M src/expression.h M src/func.d M src/inline.d M test/runnable/inline.d Log Message: ----------- Merge pull request #5206 from 9rnsr/fix15207 [REG2.069.0-b1] Issue 15207 - Wrong codegen with -inline Compare: https://github.com/D-Programming-Language/dmd/compare/1e5d3b0427cc...77463d7b0503 |
Copyright © 1999-2021 by the D Language Foundation