Possible Duplicate:
How does a JavaScript parser work?
How do browsers compile Javascript scripts? What type of compiler it used?
Possible Duplicate:
How does a JavaScript parser work?
How do browsers compile Javascript scripts? What type of compiler it used?
The browsers don't compile javascript, it just parse the file and execute it.
Look here: JavaScript_engine
JavaScript isn't compiled, but rather parsed and interpreted. This differs from browser to browser.
Chrome, uses V8, which happens to also be used by node.js. Internet Explorer has a proprietary engine known as Chakra.
As for general rules, the Annotated ES5 shares some insight: