Le jeu. 29 nov. 2018 à 11:15, Marcus Denker <marcus.den...@inria.fr> a écrit : > > > > > On 29 Nov 2018, at 10:45, Thierry Goubier <thierry.goub...@gmail.com> wrote: > > > > Hi Manuel, > > > > would that extend to testing what happens if you add many, many > > metalinks in a method? > > > > yes, it would be nice to test that. > > > > I tried to rewrite the automated code tracer I had to use metalinks, > > and I gave up once I discovered that going over a certain number of > > metalinks in a method would stop working. > > > > > If you add a lot of code, you need to use the new byte code set as the old > one is extremely limited for everything (number of temps, jump offset…)
Well, it failed before that limit; once the context was complex enough, it would fail in various ways, such as being unable to bind to the proper temporary, writing incorrect byte sequences, and so on As anyway, it was injecting the same code that my tracer was already doing, but in a less debuggable way, so I sort of gave up and kept MetaLink use to simpler things, such as a type checker that inject type checks on arguments based on the type inferred from arguments names. Now, when I see how you're improving metalinks in this thread, I'd be interested in a higher view (source-level) of the transformations you're doing for implementing metalinks: I think they then could be reused in different contexts (i.e. refactorings, for example), or generalised outside Smalltalk itself. It may probably already been expressed that way, but I haven't looked into the metalink code itself. Thierry > > Marcus