February 02, 2015 [dmd-internals] [D-Programming-Language/dmd] 2d8e6a: [refactor] Use optimize method for UnaExp and BinE... | ||||
---|---|---|---|---|
| ||||
Attachments:
| Branch: refs/heads/master Home: https://github.com/D-Programming-Language/dmd Commit: 2d8e6a069fbd4621b51c118e2051ca06770d8ddd https://github.com/D-Programming-Language/dmd/commit/2d8e6a069fbd4621b51c118e2051ca06770d8ddd Author: Anders Ro <anders.ronnbrant@gmail.com> Date: 2015-02-02 (Mon, 02 Feb 2015) Changed paths: M src/optimize.c M test/runnable/constfold.d Log Message: ----------- [refactor] Use optimize method for UnaExp and BinExp visitors Instead of having boiler plate code in visit() methods replace with a method (optimizeChildren). Adds error checking in CatExp for e1 and e2, i.e. check if e1 and e2 are != TOKerror which was not done before. Update to runnable test case "constfold.d" to capture expression of type ```x && 1/0``` and ```x || 1/0``` that shall ignore rhs when x is compile time constant false/true respectively. Commit: e7b9661b79577b929a18cd1e379de004c9e8dcf9 https://github.com/D-Programming-Language/dmd/commit/e7b9661b79577b929a18cd1e379de004c9e8dcf9 Author: Daniel Murphy <yebblies@gmail.com> Date: 2015-02-02 (Mon, 02 Feb 2015) Changed paths: M src/optimize.c M test/runnable/constfold.d Log Message: ----------- Merge pull request #3697 from andron/refactor-optimize Refactor optimize Compare: https://github.com/D-Programming-Language/dmd/compare/37e6395849fd...e7b9661b7957 |
Copyright © 1999-2021 by the D Language Foundation