Bill Coffman writes: > I can see that there is true magic in the power of using references in > this way. Nonetheless, how can the compiler figure out that it can't > use an integer here? The compiler should use integers when it can, > but it sounds like you are saying that when a variable crosses a sub > call (which might invoke a continuation) it will then have to be a PMC > or String to do the right thing.
Yep. And that's something that the compiler will just have to know (or give IMCC enough information to do something about it). And, IIRC, an S register wouldn't work either, since strings are value types at the bytecode level. Luke > > Remember the PMC and string registers > > hold pointers to pmc/string structures, which is all we're preserving > > -- the *pointer* to the structure, not the contents of the structure. > > (Though that's an interesting thing to do for other reasons, like, > > say, transactions, we're not going to be doing that) The contents can > > change over and over without the register itself ever changing. > > > > > > > > ># these two lines are "main" > > >outer() > > >$saved.call > > > > > Bill > > > >JEff > > > > -- > > Dan >