[M3devel] bind_segment vs. declare_segment?
Tony Hosking
hosking at cs.purdue.edu
Tue Nov 23 02:17:54 CET 2010
It doesn't do multiple passes at code generation time. It simply declares the segment at beginning of code generation, and once it is done binds the size of the segment.
Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484
On Nov 22, 2010, at 7:23 PM, Jay K wrote:
>
> Tony, What surprises me a bit here is that the frontend already makes multiple passes over everything.
> I think. Right?
> So here it could do that just as well. Right?
>
> - Jay
>
>
> ________________________________
>> From: hosking at cs.purdue.edu
>> Date: Fri, 19 Nov 2010 09:43:03 -0500
>> To: jay.krell at cornell.edu
>> CC: m3devel at elegosoft.com
>> Subject: Re: [M3devel] bind_segment vs. declare_segment?
>>
>> declare_segment doesn't have the size because it is unknown at the time
>> of the declaration, which comes before the module is compiled.
>> Only as the module is compiled does the size become known, with
>> Bind_segment emitted at the end.
>>
>>
>> On Nov 19, 2010, at 5:01 AM, Jay K wrote:
>>
>> I'm not looking at m3front. I should.
>>
>> Why does declare_segment not have the size?
>>
>> I'm going to just live with whatever the frontend does for now.
>> Make an extra pass to find the bind_segments, so that when
>> I do things "for real", declare_segment can set the size correctly.
>>
>> Later I'll do better -- making the segment contain fields.
>> So that globals become debuggable, in stock gdb (as big records).
>>
>> But first I want configure enable-checking to work.
>> (with one exception, the static link stuff..)
>>
>> - Jay
>>
>>
>>
>>
>>
More information about the M3devel
mailing list