Zero overhead exception handling
AssigneeSun Microsystems, Inc.
InventorsJudith E. Schwabe, Joshua B. Susser
Life of this patent
Estimating the term…
Abstract
Apparatus and processes, including computer implemented processes, for managing exceptions throwable during execution of methods in one or more classes by a machine. Each method includes an exception handler array defining exception handlers associated with the method. The method includes combining the exception handler arrays for all methods into a single exception handler table.
Claims29
A computer implemented managing process for managing one or more exceptions throwable during execution of one or more methods in one or more classes by a machine, at least one method component comprising executable code and an exception handler array, said exception handler array defining exception handlers associated with the at least one method component, the managing process comprising:
- combining the exception handler arrays for two or more method components into a single exception handler table, wherein the machine is a virtual machine implemented on a resource-constrained device.
A method for minimizing an amount of storage required for a runtime stack when executing a program, the runtime stack maintained at runtime during execution of a program by a machine for storing one or more frames comprising a return pointer to an invoking method component that called a currently executing method component in the program, the minimizing method comprising:
- combining exception handler information for one or more method components in the program into a combined exception handler table;
- and
- searching the combined exception handler table when an exception is thrown during execution of the one or more method components to locate exception handler information without requiring the storage on the runtime stack of a pointer to the exception handler information.
A method of converting class files into a converted applet for execution on a resource-constrained device, the method comprising:
- receiving one or more class files comprising one or more method components, at least one method component comprising an exception handler array defining exception handlers catchable by the at least one method component;
- defining a data structure for storing the at least one method component and exception handlers for the converted applet comprising a first portion and a second portion;
- defining an ordering for the at least one method component;
- loading the at least one method component according to the ordering in the second portion of the data structure;
- combining the exception handler arrays for all method components in a single exception handler table, said combining further comprising ordering the exception handler arrays according to the ordering defined for the at least one method component;
- and
- storing the single exception handler array in the first portion of the data structure.
A computer implemented managing process for managing one or more exceptions throwable during execution of two or more method components in one or more classes by a virtual machine, at least one method component included in a class and comprising executable code and an exception handler array, said exception handler array defining exception handlers associated with the at least one method component, the individual exception handler arrays combined and forming a single exception handler table for the two or more method components, the managing process comprising:
- searching the single exception handler table when an exception is thrown while executing the at least one method component, said searching further comprising locating a first matching exception in the single exception handler table wherein said virtual machine is implemented on a resource-constrained device.
A computer system for managing one or more exceptions throwable during execution of method components in one or more classes by a machine, at least one method component comprising an exception handler array defining exception handlers associated with the at least one method component, the system comprising:
- a processor configured to combine the exception handler arrays for all method components into a single exception handler table wherein the machine includes a virtual machine implemented on a resource-constrained device.
A computer system for minimizing the amount of storage required for a runtime stack when executing a program, the runtime stack maintained at runtime during the execution of the program by a machine for storing one or more frames comprising a return pointer to an invoking method component that called a currently executing method component in the program, the system comprising:
- a first processor configured to combine exception handler information for two or more method components in the program into a combined exception handler table;
- and
- a second processor configured to search the combined exception handler table when an exception is thrown during execution of one of the at least one method components to locate the exception handler information without requiring the storage on the runtime stack of a pointer to the exception handler information.
A computer system for converting class files into a converted applet for execution on a resource-constrained device, the system comprising a processor configured to:
- receive one or more class files comprising one or more method components, at least one method component comprising an exception handler array defining exception handlers catchable by the at least one method component;
- define a data structure for storing the at least one method component and exception handlers for the converted applet comprising first and second portions;
- define an ordering for the one or more method components and loading the at least one method component according to the ordering in the second portion of the data structure;
- combine the exception handler arrays for all method components in a single exception handler table comprising ordering the exception handler arrays according to the order defined for the at least one method component;
- and
- storing the single exception handler array in the first portion of the data structure.
A computer-implemented system for managing one or more exceptions throwable during execution of method components in one or more classes by a virtual machine, at least one method component in a class described by a class file and comprising an exception handler array defining exception handlers associated with the at least one method component, the individual exception handler arrays combining and forming a single exception handler table for two or more method components, the system comprising a processor configured to search the single exception handler table when an exception is thrown while executing one of the two or more method components comprising locating a first matching exception in the single exception handler table wherein the processor includes said virtual machine implemented on a resource-constrained device.
Dependencies are inferred from the claim text.