At least according to a description of Mono's exception handling implementation, all the x86 registers are saved when an exception is thrown. Besides the stack pointer (ESP), frame pointers (EBP), instruction pointers (EIP), and the register that holds the exception object, why are the other registers saved as well? Why save that the entire context when in .NET is there is no mechanism to continuing executing at the point immediately after a throw?
UPDATE:
EMCA states the following in section 12.3.2.4 Overview of exception handling:
An exception object describing the exception is automatically created by the CLI and pushed onto the evaluation stack as the first item upon entry of a filter or catch clause.
Execution cannot be resumed at the location of the exception, except with a filter handler.
I don't know how the "except with a filter handler" can be accomplished in light of the previous statement. Also the description of the endfilter opcode only has two outcomes: "continue searching for another exception handler" or to execute the handler (which would execute another block of CIL opcodes.) It's missing a "resume" option. Therefore, I interpret this discrepancy in the specification to basically mean .NET does not support continuing executing at the point immediately after a throw. Maybe it was considered at some point but never fully realized and implemented.
UPDATE 2:
Someone pointed out that "resume" could simply happen if no filter handler opts to catch the exception. However, the specification for throw states: "the throw instruction throws the exception object on the stack and empties the stack." The emptying of the stack would make it impossible to execute the code immediately after the throw statement, as that code might require something on the stack.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)