Patent ID: 8689198
Filing Date: 2014-04-01
Classification: G06F

Abstract:
1. A compiling method for optimizing binary code, comprising the steps of: giving, for inlined code included in the binary code, a corresponding call number to each of the call instructions for the inlining code and the inlined code; creating a parent-child relationship information for each call number given to each of the call instructions, wherein said parent-child relationship information designates a caller's call number from the corresponding call instruction as a parent and a callee's call number from the corresponding call instruction as a child; for each use of a stack pointer in the binary code to perform a corresponding memory access, if the use of the stack pointer is an escape condition, registering the corresponding memory access in a registered escape list; replacing unprohibited memory accesses with corresponding local variable accesses, wherein the unprohibited memory accesses are accesses to a memory area known not to be aliased, wherein said local variable accesses are determined based on a corresponding offset stack pointer; subsequent to said registering, deleting said replaced unprohibited memory accesses from the registered escape list; subsequent to said deleting, for each instruction remaining in the registered escape list, prohibiting a replacement of a prohibited memory access by storing, on a replacement prohibition list, a call number of an instruction causing escape and a root call number from a call number having said local variable access; and replacing each memory access that is not stored in the replacement prohibition list with a corresponding local variable access; wherein the steps are carried out using a computer device.