It is one object of the present invention to provide a program execution
method for performing greater optimization. A program execution apparatus
according to the present invention performs a transfer from an
interpreter process to a compiled code process in the course of the
execution of a method. At this time, if no problem occurs when a transfer
point is moved to the top of a loop, the transfer point for code is so
moved. And when a transfer point is located inside a loop, a point that
post-dominates the top of the loop and the transfer point is copied to a
position immediately preceding the loop. Then, information for generating
recalculation code is provided for the transfer point, and a
recalculation is performed.