Re: druntime investigation troubles

2012-05-25 Thread Jacob Carlborg
On 2012-05-24 21:49, Sean Kelly wrote: There's a difference in how unittest execution is handled. This could probably be sorted out though. Yeah, I've noticed that. Does the unit test really need to run when you call rt_init from C? -- /Jacob Carlborg

Re: druntime investigation troubles

2012-05-25 Thread Steven Schveighoffer
On Thu, 24 May 2012 16:40:46 -0400, Sean Kelly s...@invisibleduck.org wrote: It's not STI_monitor specifically. STI_anything is a module ctor and STD_anything is a module dtor. Or at least that's my recollection. There are a few places in the DMC runtime that have initializers like this. I

Re: druntime investigation troubles

2012-05-25 Thread Sean Kelly
On May 24, 2012, at 11:25 PM, Jacob Carlborg d...@me.com wrote: On 2012-05-24 21:49, Sean Kelly wrote: There's a difference in how unittest execution is handled. This could probably be sorted out though. Yeah, I've noticed that. Does the unit test really need to run when you call

Re: druntime investigation troubles

2012-05-24 Thread Jacob Carlborg
On 2012-05-23 21:58, Steven Schveighoffer wrote: +1 dmain2 has that magic runtime feel where you look at it and are so confused that you are afraid to touch anything :P -Steve I previously made a pull request and tried to fix code duplication in dmain2.d. Unfortunately some test case

Re: druntime investigation troubles

2012-05-24 Thread Sean Kelly
On May 23, 2012, at 7:49 AM, Jacob Carlborg wrote: On 2012-05-23 13:31, Steven Schveighoffer wrote: On Wed, 23 May 2012 02:21:14 -0400, Jacob Carlborg d...@me.com wrote: On 2012-05-22 23:01, Steven Schveighoffer wrote: It looks like code that is not called on Windows. Which doesn't make

Re: druntime investigation troubles

2012-05-24 Thread Sean Kelly
On May 22, 2012, at 2:01 PM, Steven Schveighoffer wrote: On Tue, 22 May 2012 15:16:30 -0400, Denis Shelomovskij verylonglogin@gmail.com wrote: 21.05.2012 2:13, Alex Rønne Petersen написал: On 20-05-2012 22:13, Jacob Carlborg wrote: On 2012-05-20 18:25, Alex Rønne Petersen wrote:

Re: druntime investigation troubles

2012-05-24 Thread Sean Kelly
On May 23, 2012, at 12:46 PM, Jacob Carlborg wrote: On 2012-05-23 19:32, Denis Shelomovskij wrote: What call have you found in _d_criticalenter? By the way, `_STI_critical_init` is called before C main (uncomment printf's and check), so it is definitely called not by druntime.

Re: druntime investigation troubles

2012-05-24 Thread Steven Schveighoffer
On Thu, 24 May 2012 15:44:28 -0400, Sean Kelly s...@invisibleduck.org wrote: On May 22, 2012, at 2:01 PM, Steven Schveighoffer wrote: On Tue, 22 May 2012 15:16:30 -0400, Denis Shelomovskij verylonglogin@gmail.com wrote: 21.05.2012 2:13, Alex Rønne Petersen написал: On 20-05-2012

Re: druntime investigation troubles

2012-05-24 Thread Sean Kelly
On May 24, 2012, at 1:27 PM, Steven Schveighoffer schvei...@yahoo.com wrote: On Thu, 24 May 2012 15:44:28 -0400, Sean Kelly s...@invisibleduck.org wrote: On May 22, 2012, at 2:01 PM, Steven Schveighoffer wrote: On Tue, 22 May 2012 15:16:30 -0400, Denis Shelomovskij

Re: druntime investigation troubles

2012-05-23 Thread Jacob Carlborg
On 2012-05-22 23:01, Steven Schveighoffer wrote: It looks like code that is not called on Windows. Which doesn't make sense. It would seem that you must initialize a critical section in order to use it. I can't find any reference to STI_monitor in dmd, dmc, or druntime source code, except

Re: druntime investigation troubles

2012-05-23 Thread Jacob Carlborg
On 2012-05-22 23:01, Steven Schveighoffer wrote: It looks like code that is not called on Windows. Which doesn't make sense. It would seem that you must initialize a critical section in order to use it. I can't find any reference to STI_monitor in dmd, dmc, or druntime source code, except

Re: druntime investigation troubles

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 02:21:14 -0400, Jacob Carlborg d...@me.com wrote: On 2012-05-22 23:01, Steven Schveighoffer wrote: It looks like code that is not called on Windows. Which doesn't make sense. It would seem that you must initialize a critical section in order to use it. I can't find any

Re: druntime investigation troubles

2012-05-23 Thread Jacob Carlborg
On 2012-05-23 13:31, Steven Schveighoffer wrote: On Wed, 23 May 2012 02:21:14 -0400, Jacob Carlborg d...@me.com wrote: On 2012-05-22 23:01, Steven Schveighoffer wrote: It looks like code that is not called on Windows. Which doesn't make sense. It would seem that you must initialize a

Re: druntime investigation troubles

2012-05-23 Thread Denis Shelomovskij
23.05.2012 10:21, Jacob Carlborg написал: On 2012-05-22 23:01, Steven Schveighoffer wrote: It looks like code that is not called on Windows. Which doesn't make sense. It would seem that you must initialize a critical section in order to use it. I can't find any reference to STI_monitor in

Re: druntime investigation troubles

2012-05-23 Thread Jacob Carlborg
On 2012-05-23 19:32, Denis Shelomovskij wrote: What call have you found in _d_criticalenter? By the way, `_STI_critical_init` is called before C main (uncomment printf's and check), so it is definitely called not by druntime. _STI_critical_init is called here: *

Re: druntime investigation troubles

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 15:46:16 -0400, Jacob Carlborg d...@me.com wrote: On 2012-05-23 19:32, Denis Shelomovskij wrote: What call have you found in _d_criticalenter? By the way, `_STI_critical_init` is called before C main (uncomment printf's and check), so it is definitely called not by

Re: druntime investigation troubles

2012-05-22 Thread Denis Shelomovskij
21.05.2012 2:13, Alex Rønne Petersen написал: On 20-05-2012 22:13, Jacob Carlborg wrote: On 2012-05-20 18:25, Alex Rønne Petersen wrote: Seems like I misunderstood what you were saying. Right, the C runtime on *Windows* is closed source. But, I don't know why you think that function is called

Re: druntime investigation troubles

2012-05-22 Thread Steven Schveighoffer
On Tue, 22 May 2012 15:16:30 -0400, Denis Shelomovskij verylonglogin@gmail.com wrote: 21.05.2012 2:13, Alex Rønne Petersen написал: On 20-05-2012 22:13, Jacob Carlborg wrote: On 2012-05-20 18:25, Alex Rønne Petersen wrote: Seems like I misunderstood what you were saying. Right, the C

Re: druntime investigation troubles

2012-05-20 Thread Alex Rønne Petersen
On 20-05-2012 10:41, Denis Shelomovskij wrote: Looks like `_STI_monitor_staticctor` is called by C runtime on Windows. And C runtime isn't open-source. It creates troubles for investigation druntime (for me at least). Why is it so? Why not to call everything in C `main`, what's the reason? If

Re: druntime investigation troubles

2012-05-20 Thread Alex Rønne Petersen
On 20-05-2012 18:20, Alex Rønne Petersen wrote: On 20-05-2012 10:41, Denis Shelomovskij wrote: Looks like `_STI_monitor_staticctor` is called by C runtime on Windows. And C runtime isn't open-source. It creates troubles for investigation druntime (for me at least). Why is it so? Why not to

Re: druntime investigation troubles

2012-05-20 Thread Jacob Carlborg
On 2012-05-20 18:25, Alex Rønne Petersen wrote: Seems like I misunderstood what you were saying. Right, the C runtime on *Windows* is closed source. But, I don't know why you think that function is called by the C runtime; see src/rt/dmain2.d. Have a look again. It's only called on Posix:

Re: druntime investigation troubles

2012-05-20 Thread Alex Rønne Petersen
On 20-05-2012 22:13, Jacob Carlborg wrote: On 2012-05-20 18:25, Alex Rønne Petersen wrote: Seems like I misunderstood what you were saying. Right, the C runtime on *Windows* is closed source. But, I don't know why you think that function is called by the C runtime; see src/rt/dmain2.d. Have