摘要 |
A method of handling exceptions during native binding under program code conversion from subject code ( 17 ) executable by a subject computing architecture to target code ( 21 ) executable by a target computing architecture. Performing native binding executes a portion of native code ( 28 ) in place of translating a portion of the subject code ( 17 ) into the target code ( 21 ). When an exception occurs during the portion of native code ( 28 ), the method comprises saving a target state (T') which represents a current point of execution in the target computing architecture for the portion of native code ( 28 ), and creating a subject state (S') which represents an emulated point of execution in the subject computing architecture. The exception is handled through a subject exception handler ( 170, 170 ') with reference to the subject state (S'), such that, upon resuming execution from the exception using the provided subject state (S'), the saved target state (T') is restored to resume execution in the section of portion of native code ( 28 ). In one embodiment, the subject state (S') links to the saved target state (T') through a recovery unit ( 192 ). |