-
-
Notifications
You must be signed in to change notification settings - Fork 711
Concept: druntime getting rid of libc dependency #23498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
denizzzka
wants to merge
32
commits into
dlang:master
Choose a base branch
from
denizzzka:libc_gone
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
327e916
core.system.Mem.reallocate alias added and used in registerGCFactory()
denizzzka 2cb303c
core.system.Mem: allocate and free aliases added and used in Runtime.…
denizzzka 90237dc
Mem.allocateBlank() added
denizzzka c8e5b4e
calloc() and free() replaced by Mem in core.internal.gc.os module
denizzzka f17cea9
Mem.allocateBlank() on Posix uses calloc()
denizzzka 6c69083
module rt.minfo now uses core.system.Mem
denizzzka afb47cc
core.internal.gc.impl.manual.gc uses core.system.Mem
denizzzka 80eff15
module core.runtime uses core.system.Mem
denizzzka 95a13a7
core.gc.registry uses core.system.Mem
denizzzka f121ab9
rt.dmain2: core.stdc.stdlib.alloca() replaced by Mem.allocateOnStack
denizzzka 6f8d22b
rt.dmain2: free, malloc, realloc replaced by Mem.* calls
denizzzka c2658a3
Merge branch 'master' into libc_gone
denizzzka 8ae2a8f
allocateBlank() commented-out code removed
denizzzka 01dc104
Mem.allocate -> Mem.allocateOne
denizzzka 417361a
allocateBlank() -> allocateOneBlank()
denizzzka 85de307
allocateFew() and allocateFewBlank() added
denizzzka 76191c4
GC Config: initialization method does not need access to the outer scope
denizzzka a34c6de
Merge branch 'gc_cfg_init_changed' into libc_gone
denizzzka f20ede3
GC Config defined in core.system.Opt
denizzzka 7075d9f
Opt.Config -> Opt.GcConfig
denizzzka 21fb5a1
Attempt to fix build fo Windows by adding module core.system.opt
denizzzka 4b9b386
druntime: -debug=PRINTF compilation fix
denizzzka b426feb
core.system: Sys.abort() and printf() added
denizzzka 43eb8f8
core.system comment about debugging added, aliases added
denizzzka ec6e2ec
more correct printf result value check
denizzzka e79d4d2
Sys.print() added
denizzzka f82da6f
core.system.Sys.printf() implemented (depends on libc version) and used
denizzzka b8d39b9
Sys.print() can print non-null-terminated strings
denizzzka c188f6c
free() -> freeMem()
denizzzka 3755f54
core.system.Mem code moved to new core.system.memory module
denizzzka 8298709
Merge branch 'master' into libc_gone
denizzzka 5de3953
modules renamed: core.system.* -> core.internal.config.*
denizzzka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| /// | ||
| module core.system; | ||
|
|
||
| package: | ||
|
|
||
| struct Mem | ||
| { | ||
| import core.stdc.stdlib; | ||
|
|
||
| alias allocate = malloc; | ||
| alias reallocate = realloc; | ||
| alias free = core.stdc.stdlib.free; | ||
|
|
||
| static void* allocateBlank(size_t size) nothrow @nogc | ||
| { | ||
| ubyte* p = cast(ubyte*) allocate(size); | ||
| p[0 .. size] = 0; | ||
| return cast(void*) p; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.