June 10, 2011 [dmd-internals] [D-Programming-Language/dmd] c1ae91: 6053 [CTFE] Two ICEs involving pointers (dereferen... | ||||
---|---|---|---|---|
| ||||
Branch: refs/heads/master Home: https://github.com/D-Programming-Language/dmd Commit: c1ae91d4149122daeab67fe76a0fe1e77cf30b79 https://github.com/D-Programming-Language/dmd/commit/c1ae91d4149122daeab67fe76a0fe1e77cf30b79 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M src/interpret.c Log Message: ----------- 6053 [CTFE] Two ICEs involving pointers (dereference and assign; pointer variable on stack) Fixed by implemented basic CTFE pointer operations. Currently only supports pointers to built-in types and to array elements. Commit: f36d571f444d90971958074b9e3408f9fe524899 https://github.com/D-Programming-Language/dmd/commit/f36d571f444d90971958074b9e3408f9fe524899 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M src/expression.h M src/interpret.c Log Message: ----------- CTFE: Add support for AddrExp Commit: de33d381af7be0bc0bdd11214f9b58c7b959764c https://github.com/D-Programming-Language/dmd/commit/de33d381af7be0bc0bdd11214f9b58c7b959764c Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: Allow pointer arithmetic and comparison Pointers to are permitted to point to anything in the range [0..$], where $ is the length of the originally allocated memory block. Dereferencing the element at $ generates an error. Comparisons <, >=, etc are permitted only if both pointers point to the same memory block. is, !is, ==, != are permitted in all cases. This is a work in progress: pointer +=, -= is not yet implemented. Commit: 23e4b606e63e5f6838018819f2d7df6c311e8345 https://github.com/D-Programming-Language/dmd/commit/23e4b606e63e5f6838018819f2d7df6c311e8345 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- CTFE Test cases for pointer arithmetic Commit: 52181b09cf582a0a05d005b70e8e0c79a3342c32 https://github.com/D-Programming-Language/dmd/commit/52181b09cf582a0a05d005b70e8e0c79a3342c32 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: support ptr - integer Commit: 2603f9f3735cfaf475e6f4cbd01e54c06ddc1950 https://github.com/D-Programming-Language/dmd/commit/2603f9f3735cfaf475e6f4cbd01e54c06ddc1950 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test case for 6100 Commit: 846aa2683ec63c364e72281c4c655387806558e2 https://github.com/D-Programming-Language/dmd/commit/846aa2683ec63c364e72281c4c655387806558e2 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M src/interpret.c Log Message: ----------- (Fixes 6123) CTFE pointers: fix &, implement += assert(&x) now works. += works on pointers. Also improved the debugging functions. Commit: 4c6d0d14ce0c2f96f0b9eff8d9ed84042ebe02c4 https://github.com/D-Programming-Language/dmd/commit/4c6d0d14ce0c2f96f0b9eff8d9ed84042ebe02c4 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test case for 6120 Commit: 9c9a6978f30be61e86d9256578cb7d025d41e77a https://github.com/D-Programming-Language/dmd/commit/9c9a6978f30be61e86d9256578cb7d025d41e77a Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test cases for 6123 and CTFE pointer += Commit: 610d4fe1cf8aeaf8f04d5f32ccce72ab827b1f25 https://github.com/D-Programming-Language/dmd/commit/610d4fe1cf8aeaf8f04d5f32ccce72ab827b1f25 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M src/interpret.c Log Message: ----------- (Fixes 5615) CTFE: dont resolve slices internally This is necessary to allow passed parameters to retain their original memory block, so that pointer comparisons are possible. This is a major change: the entire CTFE engine now has to allow slices as rvalues. (This lazy evaluation is beneficial for memory consumption, as well). The slices are scrubbed off when we leave CTFE. Commit: 14d37a18e423ef55c05a582c8024990191979b71 https://github.com/D-Programming-Language/dmd/commit/14d37a18e423ef55c05a582c8024990191979b71 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M src/init.c Log Message: ----------- Prevent non-const CTFE pointers from escaping Although pointers can be used inside CTFE, they must not be used in intializers, or the back-end will go nuts. Putting the check in init.c rather than in the CTFE enginer means that pointers can still be used in static asserts, etc. Commit: ec2d4d6a99c37abc9350d5cbbef90445c8e53e0b https://github.com/D-Programming-Language/dmd/commit/ec2d4d6a99c37abc9350d5cbbef90445c8e53e0b Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-09 (Thu, 09 Jun 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test cases for 4825, 5615, escaping pointers Bug 4825 was fixed long ago but wasn't in the test suite. Commit: 924f9ad4811e9014c82518024112302507a5e03d https://github.com/D-Programming-Language/dmd/commit/924f9ad4811e9014c82518024112302507a5e03d Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-10 (Fri, 10 Jun 2011) Changed paths: M src/interpret.c Log Message: ----------- CTFE: Pointers to struct members and to pointers Commit: 77ad0bb88cc20b161d12b2dd81f6f35b72f322a0 https://github.com/D-Programming-Language/dmd/commit/77ad0bb88cc20b161d12b2dd81f6f35b72f322a0 Author: Don Clugston <dclugston at googlemail.com> Date: 2011-06-10 (Fri, 10 Jun 2011) Changed paths: M test/compilable/interpret3.d Log Message: ----------- Test cases for CTFE pointers to struct members Commit: dfefdd59411e4f40ce1697c69597df61eaca7be2 https://github.com/D-Programming-Language/dmd/commit/dfefdd59411e4f40ce1697c69597df61eaca7be2 Author: Walter Bright <walter at walterbright.com> Date: 2011-06-10 (Fri, 10 Jun 2011) Changed paths: M src/expression.h M src/init.c M src/interpret.c M test/compilable/interpret3.d Log Message: ----------- Merge pull request #102 from donc/ctfeptr Support pointers in CTFE Compare: https://github.com/D-Programming-Language/dmd/compare/84f0bcb...dfefdd5 |
Copyright © 1999-2021 by the D Language Foundation