[M3devel] manual initialization order?
jay.krell at cornell.edu
jay.krell at cornell.edu
Wed Apr 29 03:35:28 CEST 2009
Ok I figured it might be. These modules should probably be disallowed
from having any initializers, via a pragma. Require it all to be more
explicit, in init.
- Jay (phone)
On Apr 28, 2009, at 2:41 PM, Tony Hosking <hosking at cs.purdue.edu> wrote:
> Indeed it is fragile, but necessary to bootstrap the system.
>
> On 29 Apr 2009, at 00:15, Jay wrote:
>
>>
>> Um, if initializers are so acceptable (I'm skeptical, but everyone
>> here disagrees with me..) and circularities are not allowed (that
>> helps I guess..but is it really true? the garbage collector uses
>> threads, the threading library allocates traced references..I sense
>> circularity...)...why does RTLinker manually pick an initialization
>> order? This is fragile.
>>
>>
>> (* initialize the rest of the modules we'll be calling *)
>> AddUnit (RTLinkerX.RTLinker_I3); (* myself! *)
>> AddUnit (RTLinkerX.RT0_I3);
>> AddUnit (RTLinkerX.RTSignal_I3);
>> AddUnit (RTLinkerX.RTParams_I3);
>> AddUnit (RTLinkerX.RTDebug_I3);
>> AddUnit (RTLinkerX.RTError_I3);
>> AddUnit (RTLinkerX.RTHeapRep_I3);
>> AddUnit (RTLinkerX.ThreadF_I3);
>> AddUnit (RTLinkerX.RTHeapInfo_I3);
>> AddUnit (RTLinkerX.RTIO_I3);
>> AddUnit (RTLinkerX.RTCollectorSRC_I3);
>> AddUnit (RTLinkerX.Word_I3);
>>
>>
>>
>> (* finally, initialize the runtime. *)
>> RTSignal.InstallHandlers ();
>> RTParams.Init ();
>> RTHeapRep.Init ();
>> ThreadF.Init ();
>> RTDebug.Init ();
>> RTHeapInfo.Init ();
>> IF RTParams.IsPresent("tracelinker") THEN
>> traceInit := TRUE;
>> END;
>>
>>
>> AddUnit (RTLinkerX.RTDebug_M3);
>> AddUnit (RTLinkerX.RTError_M3);
>> AddUnit (RTLinkerX.RTType_M3);
>> AddUnit (RTLinkerX.RTPacking_M3);
>> AddUnit (RTLinkerX.RTTipe_M3);
>> AddUnit (RTLinkerX.RTException_M3);
>
>
More information about the M3devel
mailing list