ibija-devel
[Top][All Lists]
Advanced

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

Re: [Ibija-devel] status of the native IbjClassFile progress.


From: Dodji Seketeli
Subject: Re: [Ibija-devel] status of the native IbjClassFile progress.
Date: Sun, 28 Jul 2002 12:46:22 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610

Mourad Haddouk wrote:
Hi,

Hi mourad,



That's a good news.

Yeah, we are going ahead.

Ok I'll take in charge coding the verifier class.

OK, if you think you can do it, that's great. We allways need
good programmers :)

Let's dig into tech considerations then.

I think we should discuss about the rough design of the verification
functionality.

1) Better code the pass 1 verif inside IbjClassFile class
============================================================
I've thought about it this nigth (yeah, i dream about ibija's design from time to time :) ) and i think that the first pass verification as
described by the chapter 4.9 of the jvm spec is really coupled with the
class file parsing. So don't you think that i would be better to
write the first pass verification functions in the IbjClassFile itself ?

For instance, when you parse the class file magic number, you have to check if the magic number is the good one. If it is not the good one, you should stop the parsing and report a parsing error. So, this kind of
verification facility _must_ be available during the parsing.
The same thing applies for all the fields of the class file.

So, there is no point coding these verifications in an other class. They should be public methods of the IbjClassFile instead.

An example of verification method would be:
ibj_class_file_check_magic_number (IbjClassFile *a_class_file) .

2) What about coding the pass 1 verif in an other class ?
========================================================

Another approach is to write a separate IbjCFVerifier class that would
provide facility to perform the pass 1 verifications.

That would help us work in parallel more simply eventhough cvs + diff + patch are wonderfull tools that would allow us to work in parallel on the same file. After thinking about it more concretely, i can say that i
strongly dislike this option because it introduces too much coupling
with IbjClassFile ...

For instance, the method that would perform the verification of the magic number would be for instance, ibj_cf_verifier_check_magic_number (IbjClassFile *a_class_file) . You see that the to compile the IbjCFVerifier class you will need the IbjClassFile . (look at the signature of ibj_cf_verfier_check_magic_number () method. ); and to compile IbjClassFile, you will need IbjCFVerifier to perform the first pass verifications ... that's awfull.

3) conclusion
==============

So i _really_ think that the first pass verification functionality should be included in the IbjClassFile itself. You just have to learn how to use diff + patch tools and you we will be able to work on the same file in parallel.


Feel free to give your point of view.

Cheers,


--
Dodji

To follow the path: look to the master, follow the master,
walk with the master, see through the master, become the master.




reply via email to

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