On 8/21/15 7:03 AM, Mike wrote:
On Friday, 21 August 2015 at 08:11:37 UTC, Kagamin wrote:
On Friday, 21 August 2015 at 06:00:44 UTC, Mike wrote:
Disabling TypeInfo forces one to compromise on slicing, postblit

Why slicing and postblit would need typeinfo?

See below for the source code.  Some obvious, some not.

* dynamic cast -
https://github.com/D-Programming-GDC/GDC/pull/100/files?diff=unified#diff-83bcb64558f947e39f87d7435709dfe7R364

You need some static data to hold the vtable. I think typeinfo is fine to have for this, but I don't think it's actually necessary.


* array literal -
https://github.com/D-Programming-GDC/GDC/pull/100/files?diff=unified#diff-bed7d2226948b1e098749985d7a60633R2353

* postblit -
https://github.com/D-Programming-GDC/GDC/pull/100/files?diff=unified#diff-1f51c84492753de4c1863d02e24318bbR918

* destructor -
https://github.com/D-Programming-GDC/GDC/pull/100/files?diff=unified#diff-1f51c84492753de4c1863d02e24318bbR1039,
https://github.com/D-Programming-GDC/GDC/pull/100/files?diff=unified#diff-867588d7078efd0364c256152fb5a2e7R2053

* new -
https://github.com/D-Programming-GDC/GDC/pull/100/files?diff=unified#diff-5960d486a42197785b9eee4ba95c6b95R5091

* AAs -
https://github.com/D-Programming-GDC/GDC/pull/100/files?diff=unified#diff-5960d486a42197785b9eee4ba95c6b95R10710

* slicing -
https://github.com/D-Programming-GDC/GDC/pull/100/files?diff=unified#diff-5960d486a42197785b9eee4ba95c6b95R11857

These are all runtime limitations rooted in legacy that could be lifted. If druntime was just hooks that the compiler called with the type as a template parameter, we could fix all this.

-Steve

Reply via email to