From: lutz@iks-jena.de (Lutz Donnerhacke)
Subject: Re: AdaYY wish list from current projects
Date: 23 Feb 2001 10:12:43 GMT
Date: 2001-02-23T10:12:43+00:00 [thread overview]
Message-ID: <slrn99cdnh.ju.lutz@taranis.iks-jena.de> (raw)
In-Reply-To: 87elwp3fw4.fsf@deneb.enyo.de
* Florian Weimer wrote:
>lutz@iks-jena.de (Lutz Donnerhacke) writes:
[Regenerating the access to an aggregate from an access to a component]
>> Very bad. I'd like to suggest a language feature in order to solve this.
>
>Perhaps general introspection? ;-)
Not yet. I'd like to obtain it from Objective-Ada.
>To be honest, I don't think that access-to-component variables can be
>added to Ada as transparently as it is possible in, say C++. The involved
>offset might not be constant for types with discriminants, which makes
>implementations of this feature quite complicated.
That's why I want to add it to the compiler, because only it can decide how
to determine it or reject it completly for such reasons. I can only write my
generic package, distribute it, and fail a few years later in a complicated
production enviroment (usually a few hours before deadline).
>>>> Problem 2: Defining Byte_Order of record representations
>
>> Unfortunly I have to deal with memory mapped I/O (i.e. network cards)
>
>You didn't mention this...
Sorry, I shortend the problem a bit.
>> You miss the point. Providing such packages does not allow the compiler to
>> generate good maschine code.
>
>You need the conversion package anyway, at least that's my experience.
>Otherwise, your code is quite unportable, as you're passing around
>invalid values.
If my suggestion is part of the AdaYY specification, it would be perfectly
portable. Currently only packed bit fields can be used to address
representation issues correctly in a portable way.
>> >> Problem 3: Static expressions of discriminants in record representations
>
>> *Gna* And now remove the limitation, that the discriminants have to appear
>> first.
>
>Aha, this was the intent of your comment (I thought you were talking
>about the source code location). Are trailing size specifies really
>common? To me, they don't make much sense.
>
>> Even better: Try to write a program, which derivates the type from a pointer.
>
>Sorry, what do you want to do?
The problem escaped from a 'multiprotocol router'. Please try to map a IPv4
header incl. payload and IP-header options.
head_len at 0 range 0 .. 3; -- or 4 .. 7 depending on the bit order.
...
payload at head_len*4 range 0 .. packet_len - 32*head_len;
next prev parent reply other threads:[~2001-02-23 10:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-20 20:50 AdaYY wish list from current projects Lutz Donnerhacke
2001-02-22 11:08 ` Florian Weimer
2001-02-22 13:02 ` Lutz Donnerhacke
2001-02-23 9:30 ` Florian Weimer
2001-02-23 10:12 ` Lutz Donnerhacke [this message]
2001-02-23 13:54 ` Florian Weimer
2001-02-23 14:16 ` Lutz Donnerhacke
2001-02-23 15:04 ` Florian Weimer
2001-02-23 15:15 ` Lutz Donnerhacke
2001-02-23 16:21 ` Florian Weimer
2001-02-23 16:31 ` Lutz Donnerhacke
2001-02-23 17:25 ` Florian Weimer
2001-02-26 11:22 ` Lutz Donnerhacke
2001-02-23 19:06 ` tmoran
2001-02-26 11:20 ` Lutz Donnerhacke
2001-02-23 19:06 ` tmoran
2001-02-26 11:21 ` Lutz Donnerhacke
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox