Skip to content
PatentGenius

United States Patent

US Patent 6061520: Method and system for performing static…

US 6061520  ·  granted 2000-05-09

Patent Number 6061520
Title Method and system for performing static initialization
Filed 1998-04-07
Granted 2000-05-09
Inventor(s) Frank Yellin, Richard D. Tuck
Assignee Sun Microsystems Inc
CPC Classification G06F8/40, G06F8/44, G06F8/41
Number of Claims 4

Abstract

The disclosed system represents an improvement over conventional systems for initializing static arrays by reducing the amount of code executed by the virtual machine to statically initialize an array. To realize this reduction, when consolidating class files, the preloader identifies all methods and play executes these methods to determine the static initialization performed by them. The preloader then creates an expression indicating the static initialization performed by the method and stores this expression in the .mclass file, replacing the method. As such, the code of the method, containing many instructions, is replaced by a single expression instructing the virtual machine to perform static initialization, thus saving a significant amount of memory. The virtual machine is modified to recognize this expression and perform the appropriate static initialization of an array.

Claims Summary

1. A method in a data processing system for statically initializing an array, comprising the steps of:compiling source code containing the array with static values to generate a class file with a clinit method containing byte codes to statically initialize the array to the static values;

Inventors

Assignee

Sun Microsystems Inc