Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

Comments

add TypeInfo to GC calls#821

Merged
WalterBright merged 1 commit intodlang:masterfrom
rainers:gc_typeinfo
Jun 2, 2014
Merged

add TypeInfo to GC calls#821
WalterBright merged 1 commit intodlang:masterfrom
rainers:gc_typeinfo

Conversation

@rainers
Copy link
Member

@rainers rainers commented Jun 1, 2014

This is a small but inevitable step for precise scanning of GC managed objects.
It currently only passes TypeInfo for newed class and struct objects to the GC, ignoring it within the GC.

More changes are needed for dynamic and associative arrays.

If we are changing the GC API anyway, how about using an interface instead of the proxy object? That would remove a null-check and a lot of confusion.

@etcimon
Copy link
Contributor

etcimon commented Jun 1, 2014

Is the m_RTInfo currently available for structs and classes? I'm curious to see an example of what it looks like before I can study this part of the upcoming GC updates on precise scanning..

@rainers
Copy link
Member Author

rainers commented Jun 2, 2014

Is the m_RTInfo currently available for structs and classes?

Yes, if it is not hit by compiler bugs. See dlang/dmd#2480

I'm curious to see an example of what it looks like before I can study this part of the upcoming GC updates on precise scanning..

Here is the precise GC as presented at last years dconf: https://github.com/rainers/druntime/tree/gcx_precise2
RTInfo generation is mostly in https://github.com/rainers/druntime/blob/gcx_precise2/src/gc/gctemplates.d

@etcimon
Copy link
Contributor

etcimon commented Jun 2, 2014

Yes, if it is not hit by compiler bugs.

What is currently keeping it back from being in druntime master? Do you have a todo list?

WalterBright added a commit that referenced this pull request Jun 2, 2014
@WalterBright WalterBright merged commit c47e85c into dlang:master Jun 2, 2014
@rainers
Copy link
Member Author

rainers commented Jun 3, 2014

Thanks for merging.

@rainers
Copy link
Member Author

rainers commented Jun 3, 2014

What is currently keeping it back from being in druntime master? Do you have a todo list?

IMO the main drawback is that it slows down compilation a bit. There are other concerns regarding the implementation, see the discussion here: http://forum.dlang.org/thread/51C49D27.8070809@gmx.de

#2 from the list has now been merged ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants