Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!snorkelwacker!think!yale!cmcl2!lanl!lambda!jlg From: jlg@lambda.UUCP (Jim Giles) Newsgroups: comp.lang.misc Subject: Re: Pointers as 3-tuples Message-ID: <14324@lambda.UUCP> Date: 10 Apr 90 20:38:08 GMT References: <6531@brazos.Rice.edu> Lines: 20 From article <6531@brazos.Rice.edu>, by preston@titan.rice.edu (Preston Briggs): > In article flee@shire.cs.psu.edu (Felix Lee) writes: >>If pointers were implemented as 3-tuples, >>then the compiler could generate run-time checks for aliasing, and >>then switch to either a fast- or slow-coded loop. > > Jim Giles has suggested this in terms of arrays and fortran > (presumably extended to allow aliasing). Actually, I recommended it as something _NOT_ to do. The only way to make it genuinely useful is to have special versions of the code code each combination of aliased/non-aliased arguments. Since this increases combinatorially (by the definition of combinatorial :-) with the number of _prtentially_ aliased items, this leads to an unacceptably large number of alternatives. You can't efficiently implement this as a run-time test. Hence (as I've said before), the only solutions are to outlaw aliasing or to insist on sophisticated implementations which do interprocedural dataflow analysis. J. Giles