发明名称 Object oriented method and apparatus for class variable initialization
摘要 A compiler for object-oriented programming code in a language which employs run-time static initialization semantics analyzes the static initialization code to find a subset of initialization statements which must execute under all conditions, creates an pre-initialized image of the static storage using the subset, and removes statements which were pre-initialized from the final compiled code. Preferably, the compiler is a back-end compiler for the Java language, which converts Java bytecode into machine executable instructions. A static initializer method for each class is decomposed to construct a control flow graph for the method, which is then analyzed to identify statements in the source which must necessarily execute whenever the initialization method is called. The compile-time static storage image is pre-initialized to zero, except where affected by these identified statements, which are set at compile time as if the identified statements had executed. The identified statements are then removed from the code being compiled. Code size is thus reduced at the same time that performance at run time is improved as a result of not having to execute the removed initialization statements.
申请公布号 US6832369(B1) 申请公布日期 2004.12.14
申请号 US20000630376 申请日期 2000.08.01
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人 KRYKA JAMES ALBERT;ROBINSON SCOTT THOMAS;SCHMIDT WILLIAM JON
分类号 G06F9/45;(IPC1-7):G06F9/45 主分类号 G06F9/45
代理机构 代理人
主权项
地址