From: "Jörg W Mittag" Date: 2009-08-10T21:10:24+09:00 Subject: Re: Kind of ParsTree for 1.9.1 Robert Dober wrote: > On Sun, Aug 9, 2009 at 3:24 AM, Charles Oliver > Nutter wrote: >> On Wed, Aug 5, 2009 at 9:56 AM, Brian Candler wrote: >> >> And again, that ignores that the AST is ever-changing and usually very >> different across impls. > I guess if I could really chose I would like a switch, and would like > the VM to keep the AST iff that switch is set (-a|--ast). > Goo{df} idea? Unfortunately, by then it will already be too late. There's nothing the VM can do about it. That's exactly the reason why ParseTree doesn't work on YARV: the only component that needs the parsetree is the compiler. By the time the compiler hands off the code to the VM, the parsetree is long gone. The same applies to XRuby and Ruby.NET as well as the AOT modes of Rubinius, JRuby, IronRuby and MacRuby. And remember that the compiler and the VM need not be run by the same person, on the same machine or at the same time. In HotRuby, for example, the compiler is generally run by the web developer on the web server at development time whereas the VM is run by the user inside the browser on the client, maybe months after the code was compiled. jwm