# State-of-the-art JS compilers: no bytecode, no intermediate representation other than source

A brief note; something I discovered recently found surprising:
JavaScript compilers, which these days end up essentially compiling the
same source code into machine code multiple times (the same function
might sometimes take ints and sometimes take floats, for example), do it
by going back to the source code and re-parsing the source. In
particular, they don’t start from an intermediate representation like an
AST or bytecode. This applies both the
[v8](http://wingolog.org/archives/2011/07/05/v8-a-tale-of-two-compilers)
and
[Firefox](http://www.hanselman.com/blog/JavaScriptisAssemblyLanguagefortheWebPart2MadnessorjustInsanity.aspx).
(Actually it’s not clear that Firefox actually operates this way, but
Eich says that it could.) I wonder if they have essentially two versions
of the parser, one for unverified source code (better debugging
information, but slower) and another for source code known to be
syntactically correct? And what does this mean for
[Parrot](http://www.parrot.org/)?
