Related articles |
---|
Different string format options, benefits? coxs2@rpi.edu (Sean C. Cox) (1991-10-16) |
Re: Different string format options, benefits? bliss@sp64.csrd.uiuc.edu (1991-11-05) |
Re: Different data structure (was: string) format options, benefits? kevin@simd.stanford.edu (1991-11-05) |
Newsgroups: | comp.compilers |
From: | kevin@simd.stanford.edu (Kevin W. Rudd) |
Keywords: | code, optimize |
Organization: | Stanford University |
References: | 91-10-061 91-11-015 |
Date: | Tue, 5 Nov 1991 23:36:43 GMT |
An idea which I have been periodically thinking about that might solve
this problem is to have the compiler use as a reference point the MIDDLE
of a data structure instead of the end of the structure. This of course
requires some kind of encapsulation of data to ensure that the data
structures don't get munged by an over zealous user, but...
The string case could be thus seen as:
<length>.<string><null>
^
|__ "pointer" to "string" object
This kind of structure could be utilized for any number of data types
(both simple and structured) to provide some form of information which
is "hidden".
Perhaps this has been tried somewhere...
The biggest problem is the corruption of the "hidden" portion of the data.
Also, with encapsulation, this may be a moot point...
Just some ramblings,
-- Kevin
--
kevin@umunhum.Stanford.EDU
kevinw@leland.Stanford.EDU
[One pragmatic problem is that many architectures use unsigned index offsets,
making negative offsets like this relatively expensive to handle. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.