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

Comments

[refactor] remove gratuitous forward references in lifetime.d#749

Merged
andralex merged 1 commit intodlang:masterfrom
rainers:cleanup_lifetime
Mar 22, 2014
Merged

[refactor] remove gratuitous forward references in lifetime.d#749
andralex merged 1 commit intodlang:masterfrom
rainers:cleanup_lifetime

Conversation

@rainers
Copy link
Member

@rainers rainers commented Mar 22, 2014

this revealed a bad call to onFinalizeError.

I verified that the extra wrapper call is removed with -inline -O.

this revealed a bad call to onFinalizeError
@rainers
Copy link
Member Author

rainers commented Mar 22, 2014

Another reason to do this PR is to use the common core.memory.GC interface instead of gc_* calls.

@andralex
Copy link
Member

Noice. Do those replacement of gc_xxx calls with GC.xxx calls affect speed?

@rainers
Copy link
Member Author

rainers commented Mar 22, 2014

I checked the assembly output of lifetime.d compiled with -O -inline on Win32/Win64: there were no references to core.memory.GC in there, all the functions seemed to be inlined.

andralex added a commit that referenced this pull request Mar 22, 2014
[refactor] remove gratuitous forward references in lifetime.d
@andralex andralex merged commit dd367da into dlang:master Mar 22, 2014
@andralex
Copy link
Member

looking at assembly == guaranteed merge :)

@rainers
Copy link
Member Author

rainers commented Mar 23, 2014

Thanks.

Unfortunately, this has removed onOutOfMemoryError calls due to https://d.puremagic.com/issues/show_bug.cgi?id=11461 as the workaround is not added to the declaration in core.exception.

The fix is also found as part of #751, but
there is an alternative workaround suggested in the bug report which doesn't remove the "pure" attribute and seems better.

@rainers
Copy link
Member Author

rainers commented Mar 23, 2014

I created #753 to fix it.

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.

2 participants