Skip to content
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

Issue 5939 - Cannot copy std.algorithm.map #728

Merged
merged 2 commits into from Jul 30, 2012
Merged

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Jul 30, 2012

http://d.puremagic.com/issues/show_bug.cgi?id=5939

There is no way other than this for the current dmd. But I hope more better way in the future.

@dsimcha
Copy link
Collaborator

dsimcha commented Jul 30, 2012

Was the second commit supposed to be in this pull request?

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 30, 2012

The separation of unittest building is necessary. In my environment (Win7 64bit), the original win32.mak generates wrong unittest.exe, and running it causes Access Violation. I don't know why.

@andralex
Copy link
Member

Pasting the content of an email Ijust sent to dmd-beta:

OK, let's step back for just a second here.

The first response to #728 is it reflects a problem with the compiler.

My conjecture (and please correct me if I'm wrong) is there should be no difference between a Voldemort static struct (emphasis on STATIC, which is not currently used in map) and a classic struct defined outside map. I'm saying this because I see no difference in what state is available and how code would be generated between the two. It's a simple name visibility issue.

If that's correct, the fix in #728 should simply add "static" to the Voldemorts, and implement the same functionality that it's currently implementing.

Longer term, it has become obvious to me that we need a clear and simple mechanism for a function to save another function passed by alias, even if that function holds state. That must happen regardless of interaction with Voldemort types. We must have a mean do e.g. define a scope delegate that holds the alias function and is able to call it. This has been a long-standing problem that we've avoided in limited cases by relying on the built-in frame pointer.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 30, 2012

Auto tester result is now all green.
http://d.puremagic.com/test-results/pull-history.ghtml?projectid=3&pullid=728

@andralex
Copy link
Member

I guess I'll need to pull this. Sigh.

andralex added a commit that referenced this pull request Jul 30, 2012
Issue 5939 - Cannot copy std.algorithm.map
@andralex andralex merged commit 09ea7f5 into dlang:master Jul 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants