When javascript is run in a browser
当javascript在浏览器中运行时
alert('Hello World');
What environment executes it and manages it in memory?
I know this is vaugue! But thats the best place to start!
什么环境执行它并在内存中管理它?我知道这是vaugue!但那是最好的起点!
2 个解决方案
#1
This depends on the browser, The JavaScript engine, and what you mean by 'executes it'
这取决于浏览器,JavaScript引擎,以及“执行它”的含义
There is not much of an answer to give.
给出的答案并不多。
Look at some JavaScript engine's architectures ...
看看一些JavaScript引擎的架构......
http://www.mozilla.org/js/spidermonkey/
If you want to explore deeper, maybe read the first few chapters of the Dragon Book to learn a bit about how programs are interpreted and/or compiled to some intermediate or bytecode form.
如果你想深入探索,可以阅读龙书的前几章,以了解程序如何被解释和/或编译为某种中间或字节码形式。
Good Luck
#2
The browser's javascript engine.
浏览器的javascript引擎。
Here's a page that compares the performance of a bunch
这是一个比较一堆性能的页面
#1
This depends on the browser, The JavaScript engine, and what you mean by 'executes it'
这取决于浏览器,JavaScript引擎,以及“执行它”的含义
There is not much of an answer to give.
给出的答案并不多。
Look at some JavaScript engine's architectures ...
看看一些JavaScript引擎的架构......
http://www.mozilla.org/js/spidermonkey/
If you want to explore deeper, maybe read the first few chapters of the Dragon Book to learn a bit about how programs are interpreted and/or compiled to some intermediate or bytecode form.
如果你想深入探索,可以阅读龙书的前几章,以了解程序如何被解释和/或编译为某种中间或字节码形式。
Good Luck
#2
The browser's javascript engine.
浏览器的javascript引擎。
Here's a page that compares the performance of a bunch
这是一个比较一堆性能的页面