System and method supporting nonlocal values
In typical data processing systems, a compiler reads source code and creates the object code which is ultimately processed. Typically, the compiler creates a data structure which will support property values which are defined later in the source code or during run time. In an object oriented system,...
Gespeichert in:
Hauptverfasser: | , , , |
---|---|
Format: | Patent |
Sprache: | eng |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | In typical data processing systems, a compiler reads source code and creates the object code which is ultimately processed. Typically, the compiler creates a data structure which will support property values which are defined later in the source code or during run time. In an object oriented system, the compiler may create a class and a mechanism for creating instances of that class with defined fields of preallocated memory space into which the values are stored.
To support values of properties, a class includes fields to support values in preallocated memory space and with an option data structure which supports, in instances of the class, references to option values without preallocation of memory space. The field and option values are accessed in an instance object of the class using expressions of the same syntactic form. During compilation, the compiler checks the type of an option value against a type description within the option data structure. If a value has not been set for an instance object, a get operation results in getting of the default value for the class. Different classes may support different forms of data structures such as a linked list or a hash table. During compilation, a method call to an object is encoded without regard to the form of the option data structure. When an option value is changed, a change handler identified by an option binding of the data structure is processed. That option binding may be located by first searching a mapping data structure for a previously computed mapping to the option binding or by computing the mapping to the option binding. An option value may be set in an option data structure from an initialization expression which includes the name of the option value and, as an argument, the option value. Nonlocal option values may be applied to plural objects in a nonlocal option hierarchy such as a graphical hierarchy. |
---|