[Sablevm-developer] prepare_invoke and exception
Brought to you by:
egagnon
From: David <db...@cs...> - 2003-03-24 22:40:27
|
Hello, When testing my JIT with athrow I noticed this and I thought it would be good to report it. The PREPARE_INVOKE* special instruction both prepare the method and invok= e it. The REPLACE instruction is after the PREPARE_INVOKE*. This means that if the methods terminates abruptly due to an exception the REPLACE will not get executed. This will not lead to incorrect behaviour but if the method is always throwing exception at a call site, the REPLACEment will never occur for that call site. If it is always throwing exception, the previous statement applies to all call sites. Since this is a rare case and exceptions are already inefficient it may not be worth the effort to change. (My JIT compiler was never compiling my test method for this reason since= I didn't have a JIT entry point in that code.) David --- David B=E9langer Graduate Student School of Computer Science McGill University Office: MC226 Web page: http://www.cs.mcgill.ca/~dbelan2/ Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt |