Re: diagrams

"Mark Hahn" <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
Laurent Dube wrote:
> I've spent part of the weekend studying your code. Compliments!
> Clean coding. Felt at home right away.
>
> About the diagrams, I was suggesting we make e-r type diagrams of
> the different proposals concerning:
>>   object, prototype, class, instance, factory, type, metaclass, etc.
>

I'm not familiar with the term e-r, but now I understand what you meant.

> Your response was to describe the contents of the C representation
> of "object". That's useful and interesting, and actually we can push
> this to documenting graphically the whole code, hopefully using
> automated tools. As an exercise, I've re-arranged what you sent
> into a text table format (see below).
>
> But... what I was hinting at was a description of the terms as to
> their hierarchy, contents, relationship, rules, restrictions, etc.
> and how these change between the various proposals.
>
> If not in a drawing, maybe as a table?
>
> We should at least do the current proposal, as it would be an
> essential part of the Vancouver presentation.

You should wait.  We are only days away from knowing which proposal we will
be using.  Vancouver isn't until the end of July.

> Prothon object
>
> * refers to:
>     prototypes      single or list
> * has:
>     attributes      optional
>     data            optional
> _______________________________________________________________________
> C representation of Prothon object
>
> * has:
>     immediate storage
>
>         status        32 bits     (details below)
>
>         composition   32 bits     pointer to single prototype or
>                                   pointer to prototype list and/or
>                                              attribute dictionary
>         data          64 bits     immediate data or
>                                   pointer to separate data
>
>       ? write lock    32 bits     write-lock semaphore ?

This acts as the temporary lock for accessing the parts of the object
structure and as the long-term write lock.  The APR has a MUTEX I'm using
for it now that requires 32 bits.  When I get around to optimizing things in
machine language this will shrink to 1-bit.  Other things will shrink also.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.