[Dlang-internal] druntime: proposed changes in code organization
Denis Feklushkin
feklushkin.denis at gmail.com
Fri Dec 1 05:29:31 UTC 2023
On Monday, 20 November 2023 at 13:39:21 UTC, IGotD- wrote:
> On Sunday, 19 November 2023 at 19:53:53 UTC, Denis Feklushkin
> wrote:
>> On Thursday, 16 November 2023 at 17:13:37 UTC, Denis
>> Feklushkin wrote:
>>
>> I made update of the proposal description text,
>> https://github.com/dlang/dmd/pull/15822
>
> Not sure If I'm going to reply here or on github.
Doesn't matter. Sorry for a response delay, I was away
> First, I think that you need to more precisely explain what a
> "tag" is.
Okay, I'll write here and when everything is discussed I’ll add
it to the PR description
> What is the underlying data type and how does it differ from a
> version identifier. I don't understand what a tag is by reading
> the PR.
Proposed tags are similar to a D's versions, but I decided to
separate its name because tags become not corresponding to a
built-in D versions, at least.
For example, most likely, tags with names like
“posix_compatible_threads” will appear, because in the future we
will understand that some OSes use Posix interace API to provide
threads functionality but while not being a Posix system. The
same goes for working with files, etc.
I also suggest to write sets of tags for each target in this form:
```
x86_64,posix,osx
```
and not in:
```
x86_64-posix-osx
```
to prevent attempts to combine proposed druntime tags with
compiler target triplets
> The PR doesn't mention anything about the generic part of the
> implementation. Where should the generic part be?
I don’t understand what is meant by "generic part" here
> Also how the source code hierarchy, how would it look like?
All tags-driven code will be placed into druntime/config/
directory
Inside of config/ each tag provides it's own files hierarchy
corresponding to main druntime modules hierarchy.
For example, file:
```
druntime/config/posix/core/sync/event.d
```
will be used as module "core.sync.event" if "posix" tag choised
> Let's take really small example like setjmp.d and show how it
> should be implemented, both inside the file and where the files
> should located.
For now, all *.d files involved into discussed PR is a such
examples
More information about the Dlang-internal
mailing list