Suggest run-time data structures and appropriate code to


The Java JVM is unusual in that it provides explicit instructions for throwing and catching exceptions. On most other architectures, these mechanisms must be "synthesized" using conventional instructions.

To throw an exception object O, we must do two things. First, we must decide whether the throw statement appears within a try statement prepared to catch O. If it is, O is passed to the innermost catch block declared to handle O (or one of O's super classes). If no try block that catches O encloses the throw, the exception is propagated- a return is effected and O is rethrown at the return point.

Suggest run-time data structures and appropriate code to efficiently implement a throw statement. Note that ordinary calls should not be unduly slowed just to prepare for a throw that may never occur. That is, most (or all) of the cost of a throw should be paid only after the throw is executed.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Suggest run-time data structures and appropriate code to
Reference No:- TGS01487080

Expected delivery within 24 Hours