[Sablevm-developer] Re: trivial <clinit>s at bootstrap [was: Re: [Sablevm-developer] _svmt_interned
Brought to you by:
egagnon
From: Etienne G. <gag...@uq...> - 2004-03-29 03:00:26
|
Grzegorz B. Prokopski wrote: > from ex. java.io.Serializable and apparently, when the code is compiled > with the latest jikes SableVM bombs out in initialization.c when finds > <clinit> method that contains initialization of this field. I think I found the motivation for this change... (unless somebody has a better explanation; maybe someone should ask on jikes ML): This field being a constant, any reference to its value would be hardcoded in compiled code (instead of using GETSTATIC) as mandated by the specification, yet most probably, if another class refers to this constant, it is because it wants to check the "current" value against some value encoded in a serialized file... > Q: Assuming for the moment that I don't care what is inside of <clinit> > what method should I call here, from within > svmf_special_initialization (_svmt_JNIEnv *env, _svmt_class_info > *class) to execute this method ? If you really didn't care, you would call the usual _svmf_initialization(). > Q: Do we have any flag that says that we're in bootstrap stage > (I haven't found any), or should I add one (in env, I guess)? Not sure about this way to go about it. We should discuss this in person (emails would be too long). > Q: Wouldn't prepare_code.c be good place to restrict what bytecodes > can be prepared for execution at bootstrap stage? Yes, it would. Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |