[D-runtime] [D-Programming-Language/druntime] 977c7f: The GC will now call destructors on heap allocated...
GitHub via D-runtime
d-runtime at puremagic.com
Thu Jan 15 02:49:10 PST 2015
Branch: refs/heads/master
Home: https://github.com/D-Programming-Language/druntime
Commit: 977c7f7a6e8a5f4e52c8adbe0adc93a497475bc7
https://github.com/D-Programming-Language/druntime/commit/977c7f7a6e8a5f4e52c8adbe0adc93a497475bc7
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M mak/SRCS
M src/core/exception.d
M src/core/memory.d
M src/gc/gc.d
A src/gc/structinfo.d
M src/object.di
M src/object_.d
M src/rt/lifetime.d
Log Message:
-----------
The GC will now call destructors on heap allocated structs. It is impossible to feasibly implement the invokation of arrays of finalizable structs, due to the inability to know which elements in the array, which may, or may not have been, initialized to begin with. There is also no way to know what the actual length of the array is, you can know how much memory was allocated for it, but not whether there was ever a reference to that point in the array. The destructors for structs in classes are still called as they were previously, which is immediately after the body of the outer class's finalizer.
Commit: 800f1007115b0bb1bd5dfd27fb7e9ce879c54f86
https://github.com/D-Programming-Language/druntime/commit/800f1007115b0bb1bd5dfd27fb7e9ce879c54f86
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M mak/SRCS
M src/gc/gc.d
R src/gc/structinfo.d
M src/rt/lifetime.d
Log Message:
-----------
Added _d_delstruct for use by the delete operator when deleting a pointer to a struct. Also removed the need for a separate array of struct infos by storing the pointer to it at the end of the page for structs allocated by the GC that have finalizers.
Commit: 86beca005535cba388a4da21d73ba34296a8dd64
https://github.com/D-Programming-Language/druntime/commit/86beca005535cba388a4da21d73ba34296a8dd64
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/core/memory.d
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Removed the STRUCT_FINALIZE block attribute. Also fixed an issue in my initial implementation of the type info being moved to the end of the page.
Commit: edd5666c639466b0f865358a587f6498d4f57e76
https://github.com/D-Programming-Language/druntime/commit/edd5666c639466b0f865358a587f6498d4f57e76
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Destructors of structs in arrays are now called as well.
Commit: a54dc00e6c2d928932bc42e27da4b4096215938a
https://github.com/D-Programming-Language/druntime/commit/a54dc00e6c2d928932bc42e27da4b4096215938a
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/core/exception.d
M src/gc/gc.d
M src/object.di
M src/object_.d
M src/rt/lifetime.d
Log Message:
-----------
As discussed on the PR, removed StructInfo, and replaced all uses of it with TypeInfo_Struct.
I also made the runtime entirely responsible for managing the type info of a finalizable struct. Previously the GC first had to retrieve this info before calling the runtime to do the finalization, even though it's the runtime that determined where to put the type info.
Commit: 3301868a8e6efb2bce1bb66da3428cb9a01efd74
https://github.com/D-Programming-Language/druntime/commit/3301868a8e6efb2bce1bb66da3428cb9a01efd74
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/object_.d
Log Message:
-----------
TypeInfo_Struct.destroy needed to check if the pointer is owned by the GC, and if so, have the GC run it's finalizers rather than calling the finalizer directly.
Commit: cd1a9cba614085148c5ce077b0458a3a01047a11
https://github.com/D-Programming-Language/druntime/commit/cd1a9cba614085148c5ce077b0458a3a01047a11
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
Fixed an edge case where an array that didn't have a large enough allocation was incorrectly being treated as if it did.
Commit: c4243466307843908d1a59b1da16e18a9f97f91a
https://github.com/D-Programming-Language/druntime/commit/c4243466307843908d1a59b1da16e18a9f97f91a
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/core/exception.d
M src/core/memory.d
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Minor changes for effeciency to array finalization, as well as added callStructDtorsDuringGC to core.memory.
Commit: f8e9bfb7c97d77b68469a2e492e987d5f2a2e837
https://github.com/D-Programming-Language/druntime/commit/f8e9bfb7c97d77b68469a2e492e987d5f2a2e837
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/core/memory.d
M src/rt/lifetime.d
Log Message:
-----------
Fixed a couple of places where ti.next was still being used.
Also fixed a minor issue with an import.
Commit: 3232060c2e0873130410f8af68f2de550632f606
https://github.com/D-Programming-Language/druntime/commit/3232060c2e0873130410f8af68f2de550632f606
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Use GC.qalloc rather than GC.malloc + GC.sizeOf.
Also fixed the BlkInfo calculations to account for the sentinal bytes.
Commit: fc64733ed754428add88317e0ad96b86df5fbb74
https://github.com/D-Programming-Language/druntime/commit/fc64733ed754428add88317e0ad96b86df5fbb74
Author: Orvid King <blah38621 at gmail.com>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
I missed a piece when merging with master.
Commit: 6d0fbb9a55db8ee75bd77c516750ff93ed0cfd09
https://github.com/D-Programming-Language/druntime/commit/6d0fbb9a55db8ee75bd77c516750ff93ed0cfd09
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/gc/gc.d
M src/object_.d
M src/rt/lifetime.d
Log Message:
-----------
refactorings for less GC information callbacks
Commit: 0b87997722bbcba6c062d710c161df7e37a5268f
https://github.com/D-Programming-Language/druntime/commit/0b87997722bbcba6c062d710c161df7e37a5268f
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/gc/gc.d
Log Message:
-----------
fix shared library finalize issue
Commit: 5699a47cab37614b42dee1fac3357885a4f5f7e4
https://github.com/D-Programming-Language/druntime/commit/5699a47cab37614b42dee1fac3357885a4f5f7e4
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
move struct TypeInfo to the end of the memory block, after SMALLPAD/MEDPAD
Commit: 99d879ddaeb69bdf143ff8b1054f391ef79d8127
https://github.com/D-Programming-Language/druntime/commit/99d879ddaeb69bdf143ff8b1054f391ef79d8127
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/core/memory.d
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
refactor: only pass BlkAttr.STRUCTFINAL bit to GC
Commit: 8c461a911fbac1a66d2675b67d9782733ffa79ac
https://github.com/D-Programming-Language/druntime/commit/8c461a911fbac1a66d2675b67d9782733ffa79ac
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/core/exception.d
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
- remove StructFinalizers, preallocate FinalizeError
- remove TypeInfo from gc.setAttr/setBita
- assumeSafeAppend now calls struct destructors, checks whether the array is really shrinked
- remove rt_ prefix from internal functions
- add tests
Commit: 391a4913603255d57c2dc0b035270e55a33a97b9
https://github.com/D-Programming-Language/druntime/commit/391a4913603255d57c2dc0b035270e55a33a97b9
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
fix calling destructors on qualified structs
optimize by not calling TypeInfo.next again and again
remove type info argument from GC.setAttr/setBits
Commit: ac403db4e08abb744261d0fa2cdc145be1c10300
https://github.com/D-Programming-Language/druntime/commit/ac403db4e08abb744261d0fa2cdc145be1c10300
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
check postblit for array of const struct
Commit: daf7e6270ff63ec0fe3590956322e630e316f1e4
https://github.com/D-Programming-Language/druntime/commit/daf7e6270ff63ec0fe3590956322e630e316f1e4
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-12 (Fri, 12 Dec 2014)
Changed paths:
M src/core/memory.d
M src/rt/dmain2.d
M src/rt/lifetime.d
Log Message:
-----------
configure callStructDtorsDuringGC through rt_configOption
Commit: e25cab10d763b36b9c63c62e3713134a137e2760
https://github.com/D-Programming-Language/druntime/commit/e25cab10d763b36b9c63c62e3713134a137e2760
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2014-12-17 (Wed, 17 Dec 2014)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
relax assertion in _d_arrayshrinkfit
Commit: 3f06283a5e2c36fe45d47129f04e257a2c1f83e0
https://github.com/D-Programming-Language/druntime/commit/3f06283a5e2c36fe45d47129f04e257a2c1f83e0
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M mak/SRCS
M src/core/exception.d
M src/core/memory.d
M src/gc/gc.d
A src/gc/structinfo.d
M src/object.di
M src/object_.d
M src/rt/lifetime.d
Log Message:
-----------
The GC will now call destructors on heap allocated structs. It is impossible to feasibly implement the invokation of arrays of finalizable structs, due to the inability to know which elements in the array, which may, or may not have been, initialized to begin with. There is also no way to know what the actual length of the array is, you can know how much memory was allocated for it, but not whether there was ever a reference to that point in the array. The destructors for structs in classes are still called as they were previously, which is immediately after the body of the outer class's finalizer.
Commit: 621b66590ea2748f28ac55737ca094ba6c97575f
https://github.com/D-Programming-Language/druntime/commit/621b66590ea2748f28ac55737ca094ba6c97575f
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M mak/SRCS
M src/gc/gc.d
R src/gc/structinfo.d
M src/rt/lifetime.d
Log Message:
-----------
Added _d_delstruct for use by the delete operator when deleting a pointer to a struct. Also removed the need for a separate array of struct infos by storing the pointer to it at the end of the page for structs allocated by the GC that have finalizers.
Commit: f54084f05042e85a3f690cc21be9f5b5d926ae93
https://github.com/D-Programming-Language/druntime/commit/f54084f05042e85a3f690cc21be9f5b5d926ae93
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/core/memory.d
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Removed the STRUCT_FINALIZE block attribute. Also fixed an issue in my initial implementation of the type info being moved to the end of the page.
Commit: 4166460f03ba93cdc6f93785d011349f109894d9
https://github.com/D-Programming-Language/druntime/commit/4166460f03ba93cdc6f93785d011349f109894d9
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Destructors of structs in arrays are now called as well.
Commit: 5b070f65fa0674fe012dc23340fe965ea221f950
https://github.com/D-Programming-Language/druntime/commit/5b070f65fa0674fe012dc23340fe965ea221f950
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/core/exception.d
M src/gc/gc.d
M src/object.di
M src/object_.d
M src/rt/lifetime.d
Log Message:
-----------
As discussed on the PR, removed StructInfo, and replaced all uses of it with TypeInfo_Struct.
I also made the runtime entirely responsible for managing the type info of a finalizable struct. Previously the GC first had to retrieve this info before calling the runtime to do the finalization, even though it's the runtime that determined where to put the type info.
Commit: 3c83c5c3b70124174237d036bbdb1e384660f63a
https://github.com/D-Programming-Language/druntime/commit/3c83c5c3b70124174237d036bbdb1e384660f63a
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/object_.d
Log Message:
-----------
TypeInfo_Struct.destroy needed to check if the pointer is owned by the GC, and if so, have the GC run it's finalizers rather than calling the finalizer directly.
Commit: df15742c96d068b7ca235835d6d94226de28673e
https://github.com/D-Programming-Language/druntime/commit/df15742c96d068b7ca235835d6d94226de28673e
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
Fixed an edge case where an array that didn't have a large enough allocation was incorrectly being treated as if it did.
Commit: 14354222c904fe75aface9bdec02a4f2f044a6e7
https://github.com/D-Programming-Language/druntime/commit/14354222c904fe75aface9bdec02a4f2f044a6e7
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/core/exception.d
M src/core/memory.d
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Minor changes for effeciency to array finalization, as well as added callStructDtorsDuringGC to core.memory.
Commit: 381419e3eeb8260de017037f115997ba5f0997e4
https://github.com/D-Programming-Language/druntime/commit/381419e3eeb8260de017037f115997ba5f0997e4
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/core/memory.d
M src/rt/lifetime.d
Log Message:
-----------
Fixed a couple of places where ti.next was still being used.
Also fixed a minor issue with an import.
Commit: 17b9522edb447d8a7100255a12e47dcd70d9121f
https://github.com/D-Programming-Language/druntime/commit/17b9522edb447d8a7100255a12e47dcd70d9121f
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Use GC.qalloc rather than GC.malloc + GC.sizeOf.
Also fixed the BlkInfo calculations to account for the sentinal bytes.
Commit: b2a24bca497a5c39c0226eddbce500125e0810df
https://github.com/D-Programming-Language/druntime/commit/b2a24bca497a5c39c0226eddbce500125e0810df
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
I missed a piece when merging with master.
Commit: c277680690bf4390c2c912b178f5528cba996f1f
https://github.com/D-Programming-Language/druntime/commit/c277680690bf4390c2c912b178f5528cba996f1f
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/gc/gc.d
M src/object_.d
M src/rt/lifetime.d
Log Message:
-----------
refactorings for less GC information callbacks
Commit: 3a044633a0793371ad8e4fc724e35b57f58ac16c
https://github.com/D-Programming-Language/druntime/commit/3a044633a0793371ad8e4fc724e35b57f58ac16c
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/gc/gc.d
Log Message:
-----------
fix shared library finalize issue
Commit: 2b557852e4175f2c2b69ceecc5ee6a5a8c870c2b
https://github.com/D-Programming-Language/druntime/commit/2b557852e4175f2c2b69ceecc5ee6a5a8c870c2b
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
move struct TypeInfo to the end of the memory block, after SMALLPAD/MEDPAD
Commit: afc057bfc3f68d97e0dc6dbcaadcd8cf1970e370
https://github.com/D-Programming-Language/druntime/commit/afc057bfc3f68d97e0dc6dbcaadcd8cf1970e370
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/core/memory.d
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
refactor: only pass BlkAttr.STRUCTFINAL bit to GC
Commit: 0b72987df17354c83bc302672f4f132fe03db65a
https://github.com/D-Programming-Language/druntime/commit/0b72987df17354c83bc302672f4f132fe03db65a
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/core/exception.d
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
- remove StructFinalizers, preallocate FinalizeError
- remove TypeInfo from gc.setAttr/setBita
- assumeSafeAppend now calls struct destructors, checks whether the array is really shrinked
- remove rt_ prefix from internal functions
- add tests
Commit: 9cb7331efe344e0f445a898a6efb3494a4078ba1
https://github.com/D-Programming-Language/druntime/commit/9cb7331efe344e0f445a898a6efb3494a4078ba1
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
fix calling destructors on qualified structs
optimize by not calling TypeInfo.next again and again
remove type info argument from GC.setAttr/setBits
Commit: b61df57e9970a662464f3e7abc437506ee429bd7
https://github.com/D-Programming-Language/druntime/commit/b61df57e9970a662464f3e7abc437506ee429bd7
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
check postblit for array of const struct
Commit: fe68143f4247549e89bf534ec8b59cabb9a9519a
https://github.com/D-Programming-Language/druntime/commit/fe68143f4247549e89bf534ec8b59cabb9a9519a
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/rt/dmain2.d
M src/rt/lifetime.d
Log Message:
-----------
Merging PR #6
Commit: 8a60fab88f4accbc8ef7bd503791ad3306d0e344
https://github.com/D-Programming-Language/druntime/commit/8a60fab88f4accbc8ef7bd503791ad3306d0e344
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/rt/lifetime.d
Log Message:
-----------
Merge commit 'refs/pull/head/7' into structDestructors
Commit: f0027c7962978161c4ada2d317cf7a3f5869cbf5
https://github.com/D-Programming-Language/druntime/commit/f0027c7962978161c4ada2d317cf7a3f5869cbf5
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/gc/gc.d
M src/rt/lifetime.d
Log Message:
-----------
Fixed some tabs that made it into the PR while doing the rebase.
Commit: 17ef8cd81c65d39dd1ceccff82cb3a1fde03845d
https://github.com/D-Programming-Language/druntime/commit/17ef8cd81c65d39dd1ceccff82cb3a1fde03845d
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-13 (Tue, 13 Jan 2015)
Changed paths:
M src/gc/gc.d
Log Message:
-----------
Accidentally removed the optional type info argument to mallocNoSync.
Commit: bfaa9189acc9e8c275356986d64129b15d028c87
https://github.com/D-Programming-Language/druntime/commit/bfaa9189acc9e8c275356986d64129b15d028c87
Author: Orvid King <blah38621 at gmail.com>
Date: 2015-01-14 (Wed, 14 Jan 2015)
Changed paths:
M src/core/memory.d
M src/rt/lifetime.d
Log Message:
-----------
Removed the callStructDtorsDuringGC field in core/memory.d.
Trimmed the trailing whitespace on a couple of lines in rt/lifetime.d.
Commit: dbbea7c5bd4d8936dc8cb523b65f771842f2a487
https://github.com/D-Programming-Language/druntime/commit/dbbea7c5bd4d8936dc8cb523b65f771842f2a487
Author: Martin Nowak <code at dawg.eu>
Date: 2015-01-15 (Thu, 15 Jan 2015)
Changed paths:
M src/core/exception.d
M src/core/memory.d
M src/gc/gc.d
M src/object_.d
M src/rt/dmain2.d
M src/rt/lifetime.d
Log Message:
-----------
Merge pull request #864 from Orvid/structDestructors
Fix Issue 2834 - The GC will now call destructors on heap allocated structs
Compare: https://github.com/D-Programming-Language/druntime/compare/9dfde19ff0f2...dbbea7c5bd4d
More information about the D-runtime
mailing list