Patent attributes
A method and apparatus for creating and using cached blocks of bytecode are disclosed. An example apparatus includes a virtual machine execution engine configured to load an input variable value in conjunction with starting execution of bytecode associated with an application. The execution engine is also configured to read a cache table entry stored in a class file related to the application. The cache table entry includes a demarcation of a selected portion of the bytecode of the application that is stored within a cache block, a cache block input variable, and a cache block output variable. The execution engine is further configured to compare the loaded input variable value to the cache block input variable. Responsive to the input variable value matching the cache block input variable, the execution engine is configured to skip execution of the selected portion of the bytecode and read the cache block output variable.