Abstract:
Source code is compiled into intermediate code which includes object code instructions. Logical line markers are inserted within the intermediate code. Each logical line marker identifies a source code line from which originated object code instructions immediately adjacent to the logical line marker. Each logical line marker is associated with a specific basic block. Also, actual line markers are inserted so that an actual line marker is associated with every object code instruction. The actual line marker identifies a source code line from which originated the object code instruction associated with the actual line marker. The intermediate code is optimized to produce the optimized object code. During optimization, object code instructions are freely moved relative to the logical line markers; however, the logical line markers are not moved relative to each other. When an object code instruction is moved, the actual line marker associated with the moved object code instruction is also moved.