Wednesday, August 10, 2005

Workaround (sort of)

I have come up with a workaround for my problem: I am going to retain object and Class as independent classes, but cast from one to the other on a case-by-case basis. I know I am throwing type correctness out the window, but I seem to have no other easily implementable solution. But I think things will be OK because the casting is going to happen in code that is in my control as VM implementer -- either in my implementation of JNI, or in the invocation of native methods by the VM (in particular, the way arguments are passed to these methods).

I have managed to take Vajra past the point of the previous failure, so I think this approach will work. But there is still a lot of work left to do to implement this strategy in all the required places.