Re: Linker-hacking out the D runtime

2017-01-09 Thread sarn via Digitalmars-d-announce
On Monday, 9 January 2017 at 13:42:01 UTC, Mike wrote: On Sunday, 8 January 2017 at 22:14:36 UTC, Iain Buclaw wrote: 1) -fno-rtti should be a flag that is honoured by the compiler. The more I think about it the more I dislike the whole idea of -fno-rtti. All I've ever wanted from the D

Re: Linker-hacking out the D runtime

2017-01-09 Thread Mike via Digitalmars-d-announce
On Sunday, 8 January 2017 at 22:14:36 UTC, Iain Buclaw wrote: 1) -fno-rtti should be a flag that is honoured by the compiler. The more I think about it the more I dislike the whole idea of -fno-rtti. All I've ever wanted from the D compiler is to not put code in my binary that has not

Re: Linker-hacking out the D runtime

2017-01-08 Thread Iain Buclaw via Digitalmars-d-announce
On 20 December 2016 at 12:24, Mike via Digitalmars-d-announce wrote: > On Monday, 19 December 2016 at 19:53:06 UTC, Iain Buclaw wrote: > >> The compiler doesn't actually generate any code that peeks inside >> TypeInfo. It only generates the reference to the

Re: Linker-hacking out the D runtime

2016-12-20 Thread Mike via Digitalmars-d-announce
On Monday, 19 December 2016 at 19:53:06 UTC, Iain Buclaw wrote: The compiler doesn't actually generate any code that peeks inside TypeInfo. It only generates the reference to the right typeinfo to pass to library runtime functions - or on request via typeid(). It doesn't actually care

Re: Linker-hacking out the D runtime

2016-12-19 Thread Iain Buclaw via Digitalmars-d-announce
On 19 December 2016 at 12:41, Mike via Digitalmars-d-announce wrote: > On Sunday, 18 December 2016 at 12:57:08 UTC, Iain Buclaw wrote: >> >> On 18 December 2016 at 03:37, Mike via Digitalmars-d-announce >> wrote: >>> >>>

Re: Linker-hacking out the D runtime

2016-12-19 Thread Iain Buclaw via Digitalmars-d-announce
On 19 December 2016 at 01:36, Mike via Digitalmars-d-announce wrote: > On Sunday, 18 December 2016 at 12:57:08 UTC, Iain Buclaw wrote: > >> As a response to my last message in that thread, the changes for classinfo >> generation is now ready to go in master.

Re: Linker-hacking out the D runtime

2016-12-19 Thread Mike via Digitalmars-d-announce
On Sunday, 18 December 2016 at 12:57:08 UTC, Iain Buclaw wrote: On 18 December 2016 at 03:37, Mike via Digitalmars-d-announce wrote: On Sunday, 18 December 2016 at 00:04:54 UTC, sarn wrote: I thought I'd write something up to help other people experiment

Re: Linker-hacking out the D runtime

2016-12-18 Thread Mike via Digitalmars-d-announce
On Sunday, 18 December 2016 at 12:57:08 UTC, Iain Buclaw wrote: As a response to my last message in that thread, the changes for classinfo generation is now ready to go in master. Ok, I'll give it a test in the next week or so. However I already have ideas for future implementation that is

Re: Linker-hacking out the D runtime

2016-12-18 Thread sarn via Digitalmars-d-announce
On Sunday, 18 December 2016 at 02:37:22 UTC, Mike wrote: I abandoned D sometime ago largely because of https://issues.dlang.org/show_bug.cgi?id=14758 (but there were other reasons), so your blog post is interesting to me. It is unfortunate that we have to resort to such hackery, but its nice

Re: Linker-hacking out the D runtime

2016-12-17 Thread Iain Buclaw via Digitalmars-d-announce
On 18 December 2016 at 01:04, sarn via Digitalmars-d-announce wrote: > As it stands, the -betterC flag is still immature and only removes a bit of > the D runtime. -betterC removes module info and module helpers, not the D runtime. You will find it in gdc

Linker-hacking out the D runtime

2016-12-17 Thread sarn via Digitalmars-d-announce
As it stands, the -betterC flag is still immature and only removes a bit of the D runtime. I've been playing around a bit to see what could be possible. To do that, I've had to do some linker hacking to make code that's completely free of D runtime dependencies. I thought I'd write