It is one object of the present invention to provide effective
optimization for a program that includes commands that may cause
exception processes. A novel compiler for converting source code for a
program written in a programming language into object code in a machine
language comprises: an optimization execution unit for performing an
optimization process for an object program written in a machine language;
and a pre-processor and a post-processor for modifying the object program
in order to absorb a difference in content between the point of origin of
an exception process, which occurs in response to the execution of a
command in the object program, and a location whereat the exception
process is performed.