dotgnu-general
[Top][All Lists]
Advanced

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

Re: [DotGNU]Java and Portable.NET


From: Rhys Weatherley
Subject: Re: [DotGNU]Java and Portable.NET
Date: Sat, 05 Jan 2002 16:35:19 +1000

Yonas Jongkind wrote:

> To me this seems like the best option. What exactly about the variables in 
> Java makes this so problematic? Is it
> determining the type of a variable due to Java's requirement that you infer 
> this from previous uses.

That is essentially the problem.  IL assumes that the variables
have been declared with their correct types ahead of time.
As you mention, to convert JVM into IL requires that a process
similar to a bytecode verifier be used to intuit the types before
writing out the IL code.  This isn't a difficult piece of code to
write, but it isn't trivial either.

If one were to write a verifier for JVM within the pnet framework,
then there isn't much point using it to convert JVM -> IL and then
have pnet convert the IL into CVM to execute it.  It would be
better to bolt the JVM verifier directly onto the front of the CVM
coder system and convert JVM -> CVM directly.  This is what
the second option does.

Outside of the pnet framework, the third option may be better,
but there would also be a lot of duplicate code to write.

> Could CVM be extended to handle a new type of variable?

With direct JVM -> CVM conversion by way of a verifier, the
variable problems can be handled on the fly, more or less.
Some minor modifications may be needed to the coder API,
but it would be fairly straight-forward.

I certainly don't want to discourage people from exploring
these kinds of options.  Go ahead - prove me wrong.  It won't
be the first time. :-)

Cheers,

Rhys.




reply via email to

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