[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pnetlib architecture (was Re: [DotGNU]Gnome to be based on .NET)

From: Rhys Weatherley
Subject: Re: pnetlib architecture (was Re: [DotGNU]Gnome to be based on .NET)
Date: Tue, 05 Feb 2002 18:48:00 +1000

"Gopal.V" wrote:

> PS: Native methods are methods *outside* the VM which can be called from
>     a C# class. Internal-calls are methods *inside* the VM which can be
>     called using an abstracted C# method. eg...System.Math.Log()

I used the term "native methods" because the term is more
familar to Java programmers.

Technically speaking, methods inside the VM are "internal
call" methods, and methods outside the are VM "platform
invoke" (or PInvoke) methods.

But, essentially Stephen and Gopal have correctly described
what is happening.  The lowest level of the C# library has
certain features that cannot be implemented in C#.  e.g. the
"Object.GetType()" method needs to access the place
within an object that stores the class information.  This is
not accessible from C#, so a call into the VM is necessary.

There are tons of cases like this in the low-level libraries,
and they are VM or OS specific.  The high-level libraries
can usually be written completely in C#, or can access
native code through PInvoke, which isn't VM-specific.

e.g. I would classify Mono's GTK+ binding for C# as a
high-level library, because it uses PInvoke to import the
GTK+ features, and then wraps them using features of
the low-level libraries.

Assuming that they don't deliberately build some Mono
VM dependency into their code, it should run on top of
some future version of pnetlib just fine, even though the
pnet VM has a different set of internal call methods.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]