摘要 |
PROBLEM TO BE SOLVED: To provide a method and a device which allocate and use a stack space. SOLUTION: The method implemented by a computer which allocates a stack space in an object-based system includes a process for obtaining source codes which include definitions relating to variables and are suitable for compilation. While registers are allocated, stack slots and machine registers are handled almost equally. This includes a process for structuring an interference graph, a process for putting copies together, a process for coloring the interference graph, and a process for determining whether or not the trial of the coloring of the interference graph is successful. When the coloring trial is not successful, an inter-register copy such as a 'reg-reg' copy is inserted between source codes instead of an ordinary spill code. The 'reg-reg' copy includes a copy relating to both the stack slots and machine registers.
|