I think Kevin is referring to JIT (Just In Time) compilation. While it's true that actionscript source code is always compiled to platform-independent bytecode, this bytecode still has to be converted into native code before being run. That's what JIT (basically a compiler embedded into the virtual machine) does, at runtime.
In some environments, such as .NET if I recall correctly, this happends upfront. The VM compiles the bytecode to native code, caches it and always runs the native code. In Java, this happens on demand, I think, but the VM detects code that is run often, so it caches a native version of it. Last I heard, the AVM JIT compiles and caches all the native code, except for code in the constructors (I don't know whether this is up to date, or why are constructors exceptions to what seems to be the general rule). Cheers Juan Pablo Califano 2011/4/5 Kerry Thompson <al...@cyberiantiger.biz> > Kevin Newman wrote: > > > A long while ago I read that the constructor is interpreted, unlike the > rest > > of the class methods, which are compiled. Is that still true? > > It depends on what you mean by compiled. All your ActionScript > compiles down to bytecode, or tokens, that are interpreted at run > time. The native classes and all their methods (e.g. MovieClip) are > actually compiled to machine code, which can run many times faster > than bytecode. > > I don't think anything, including a constructor, is actually > interpreted a character at a time like old-time interpreters (e.g. > Applesoft Basic in the late '70s). I'm not sure if a constructor is > handled any differently than the rest of the code, but I don't know > everything that happens under the hood. Somebody will correct me if > I'm wrong. > > Cordially, > > Kerry Thompson > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders