November 02, 2011 [dmd-internals] [D-Programming-Language/dmd] 72e750: 6800 [CTFE] dangerous pointer casts should be reje... | ||||
---|---|---|---|---|
| ||||
Branch: refs/heads/master Home: https://github.com/D-Programming-Language/dmd Commit: 72e750209b370b66157f320d3517c5816a3951d7 https://github.com/D-Programming-Language/dmd/commit/72e750209b370b66157f320d3517c5816a3951d7 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- 6800 [CTFE] dangerous pointer casts should be rejected Allow casts of the form int* <-> uint*, and const casts, and casts to and from void*. Disallow all other pointer casts. Also disallow pointer arithmetic on void* pointers. Commit: 75ead2e342a63e19487e20e8899a8e99ab7a968c https://github.com/D-Programming-Language/dmd/commit/75ead2e342a63e19487e20e8899a8e99ab7a968c Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test cases for 6800 There are twenty tests in this commit. Commit: a43357eb9bdfb8ecaa091efcabe572821471a9f4 https://github.com/D-Programming-Language/dmd/commit/a43357eb9bdfb8ecaa091efcabe572821471a9f4 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- 6792 [CTFE] ICE with pointer cast of indexed array When dereferencing, need to distinguish between a real indexing operation, and a fake AddrExp/IndexExp which is just used for CTFE implementation of pointers. Commit: 5106df85e36379a82469f3d2163165671c6ba3df https://github.com/D-Programming-Language/dmd/commit/5106df85e36379a82469f3d2163165671c6ba3df Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test cases for 6792 Commit: 0eb9ccc6c8b9b1fb5f68904195bfc41c09fd397e https://github.com/D-Programming-Language/dmd/commit/0eb9ccc6c8b9b1fb5f68904195bfc41c09fd397e Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c M test/compilable/interpret3.d Log Message: ----------- CTFE: extra case of bug 6792 Commit: 578fb35069d2ad3cb6f13bc25e323ae107471564 https://github.com/D-Programming-Language/dmd/commit/578fb35069d2ad3cb6f13bc25e323ae107471564 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- 6603 [CTFE] Can't call through a manifest constant function pointer This was a trivial omission Commit: af12758c242a026408c739d4dee1b32747bdf9ec https://github.com/D-Programming-Language/dmd/commit/af12758c242a026408c739d4dee1b32747bdf9ec Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test case for 6603 Commit: 8abd36399965094a7a342894dc8fad1860e556ce https://github.com/D-Programming-Language/dmd/commit/8abd36399965094a7a342894dc8fad1860e556ce Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- 6817 [CTFE] Error on interpreting inlined IfStatement With && and ||, don't create a return value unless it is actually required. This solves the error when it has been cast to void by the inliner. Commit: 1c5cc732dfd40ed9a1ebc3c7d43f6ccb60bf89e0 https://github.com/D-Programming-Language/dmd/commit/1c5cc732dfd40ed9a1ebc3c7d43f6ccb60bf89e0 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: Allow expressions to be cast to void Commit: 449565b27d3ec83b508ab3909681db967edfd408 https://github.com/D-Programming-Language/dmd/commit/449565b27d3ec83b508ab3909681db967edfd408 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test cases for 6817 and CTFE cast to void Commit: 1a2b8e3729ae158c66322432d6cbcccb7a197135 https://github.com/D-Programming-Language/dmd/commit/1a2b8e3729ae158c66322432d6cbcccb7a197135 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: begin support for classes Allow 'new Class', where Class doesn't have a constructor. At the moment it stores everything in a StructLiteralExp, with derived class data FIRST (instead of last). Doesn't actually let you DO anything with it yet! Commit: 3ef3410ff40c4315fc7b593c01ede91e6ab0f660 https://github.com/D-Programming-Language/dmd/commit/3ef3410ff40c4315fc7b593c01ede91e6ab0f660 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: support class dotvar expressions Now stores members in the correct order (ie, base class first). Allows reading to and writing from members of base and derived classes. Commit: 0dbd36c8d49d12e9a3a1a7a85370bc69076a921f https://github.com/D-Programming-Language/dmd/commit/0dbd36c8d49d12e9a3a1a7a85370bc69076a921f Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: Allow (safe) casts between classes Since we always know the original class, we allow class casts only when the original class can implicitly cast to the target class. Commit: e9b0e6de76b7119de50a01f6cdfdf6967c5d8854 https://github.com/D-Programming-Language/dmd/commit/e9b0e6de76b7119de50a01f6cdfdf6967c5d8854 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: Support assignment to class members Allow dotvar assignment, eg c.m = x. Commit: 4ca2d82c6d18318c05eaded1b87dd8045e97d8e3 https://github.com/D-Programming-Language/dmd/commit/4ca2d82c6d18318c05eaded1b87dd8045e97d8e3 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: Support virtual function calls Commit: b1f97debf01e3494da73e6ab441daca8d6f5a5c0 https://github.com/D-Programming-Language/dmd/commit/b1f97debf01e3494da73e6ab441daca8d6f5a5c0 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: Support interfaces The technique I used before for looking up virtual functions didn't work for interfaces, because the vtable doesn't get populated until the glue layer. Commit: 15a8e4a3528d78b7cbb3b4827f5b1312b1a779ee https://github.com/D-Programming-Language/dmd/commit/15a8e4a3528d78b7cbb3b4827f5b1312b1a779ee Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/func.c M src/interpret.c Log Message: ----------- CTFE: Support class constructors To implement this, I had to fix a bug in FuncDeclaration: scope wasn't saved for class constructors. Commit: ffdcc616201c091353a6dfb7b5f3ad75356d4df0 https://github.com/D-Programming-Language/dmd/commit/ffdcc616201c091353a6dfb7b5f3ad75356d4df0 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: Prevent class literals from escaping CTFE Otherwise they cause an ugly error message in the glue layer. Commit: 62041f5877dffe06d8a5e4fcd22368f1e7f46f52 https://github.com/D-Programming-Language/dmd/commit/62041f5877dffe06d8a5e4fcd22368f1e7f46f52 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test cases for CTFE classes and interfaces Commit: 1ab54895d6adffb4352e70f5cb3e9395cb522fb0 https://github.com/D-Programming-Language/dmd/commit/1ab54895d6adffb4352e70f5cb3e9395cb522fb0 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/interpret.c M test/compilable/interpret3.d Log Message: ----------- 6816 [CTFE] nested function can't access this Patch by dawg. Commit: 2a8beb301711813d98095333176a6ea0e9542aec https://github.com/D-Programming-Language/dmd/commit/2a8beb301711813d98095333176a6ea0e9542aec Author: Walter Bright <walter at walterbright.com> Date: 2011-11-02 (Wed, 02 Nov 2011) Changed paths: M src/func.c M src/interpret.c M test/compilable/interpret3.d Log Message: ----------- Merge pull request #488 from donc/ctfeclass Support classes and interfaces in CTFE Compare: https://github.com/D-Programming-Language/dmd/compare/85549f1...2a8beb3 |
Copyright © 1999-2021 by the D Language Foundation