Okay, the more I look at Mono runtime stuff, the more tempted I am to use
some of their type names when coding SharpOS runtime stuff. Because, I'm
afraid, whether we like it or not, I think some of our basic runtime support
types will work the exact same way as Mono.
For example, MonoObject, represents the prefix before a managed object's
main data, that points to the sync-block data and the vtable for that object
instance. Originally, I was calling ours ManagedObjectHeader - and
regardless as to what I coded, what Mono coded, and what Microsoft says
about Microsoft's way of doing it. No biggie, right? Simple enough concept?
Well, what about representing arrays? And some basic type descriptors? I
almost feel like I am cheating, because I've looked at Mono so much. But I
don't know how licensing issues stand. I know that we can easily make our
stuff work the same, but if I Alt+Tab back and forth to make sure the
mimickry is accurate, than aren't I just porting some of Mono's code? If so,
then we have to address Mono <--> SharpOS licensing issues.
Some of our runtime-support types *have* to be identical to Mono, at least
in structure, because of how they are marshaled into the Mono corlib at
runtime. For example:
>From Mono's corlib's System.String:
> private int length;
> private char start_char;
...those are the only two fields.
And surprise surprise, those are the same two fields, with the same size,
type, and position, as the ones from MonoString, in Mono's runtime code:
> gint32 length;
> gunichar2 chars [MONO_ZERO_LEN_ARRAY];
>
So, more or less, we need to write our runtime string type the same, don't
we? (Unless we want invent some round-about way to marshal types between the
EDC and EIC.)
Granted, ours would look more like:
> public struct MonoString
> {
> int length;
> char* firstChar;
> }
>
But I want to know what you guys have to say before I sweet-talk Dennis into
pestering the Mono-dev list...
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers