{"id":161169,"date":"2019-10-29T08:06:44","date_gmt":"2019-10-29T00:06:44","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=161169"},"modified":"2019-10-14T14:57:19","modified_gmt":"2019-10-14T06:57:19","slug":"javascript-engine-understand","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/javascript-engine-understand.html","title":{"rendered":"\u4e86\u89e3JavaScript\u5f15\u64ce"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | JavaScript \u662f\u4e00\u95e8\u9ad8\u7ea7\u8bed\u8a00\uff0c\u4f46\u662f\u6700\u7ec8\u8ba1\u7b97\u673a\u80fd\u7406\u89e3\u53ea\u67091\u548c0\u3002 \u90a3\u4e48\u6211\u4eec\u7f16\u5199\u7684\u4ee3\u7801\u662f\u5982\u4f55\u88ab\u8ba1\u7b97\u673a\u7406\u89e3\u7684\u5462\uff1f \u638c\u63e1\u6240\u5b66\u7f16\u7a0b\u8bed\u8a00\u7684\u57fa\u7840\u77e5\u8bc6\u5c06\u8ba9\u60a8\u80fd\u7f16\u5199\u51fa\u66f4\u597d\u7684\u4ee3\u7801\u3002 \u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ec5\u63a2\u8ba8\u4e00\u4e2a\u95ee\u9898\uff1aJavaScript \u662f\u5982\u4f55\u5de5\u4f5c\u7684\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u524d\u8a00<\/strong><\/div>\n \u6700\u521d\uff0cJavaScript \u53ea\u80fd\u5728 Web \u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\uff0c\u4f46\u662f\u968f\u7740 Node \u7684\u51fa\u73b0\uff0c\u73b0\u5728 JavaScript \u4e5f\u53ef\u4ee5\u5728\u670d\u52a1\u7aef\u8fd0\u884c\u3002\u867d\u7136\u6211\u4eec\u53ef\u80fd\u77e5\u9053\u5e94\u8be5\u5728\u4f55\u65f6\u4f55\u5730\u53bb\u4f7f\u7528\u5b83\uff0c \u4f46\u662f\u6211\u4eec\u771f\u7684\u4e86\u89e3\u8fd9\u4e9b\u811a\u672c\u6267\u884c\u7684\u80cc\u540e\u53d1\u751f\u4e86\u4ec0\u4e48\u5417\uff1f<\/p>\n \u5982\u679c\u60a8\u89c9\u5f97\u81ea\u5df1\u5bf9 JavaScript \u5f15\u64ce\u6709\u4e86\u4e00\u4e9b\u4e86\u89e3\u7684\u8bdd\uff0c\u53ef\u4ee5\u5148\u7ed9\u81ea\u5df1\u9f13\u4e2a\u638c\uff0c\u4f46\u4e0d\u8981\u6025\u7740\u5173\u6389\u672c\u6587\uff0c\u6211\u76f8\u4fe1\u9605\u8bfb\u5b8c\u6210\u540e\u60a8\u4ecd\u7136\u53ef\u4ee5\u4ece\u4e2d\u5b66\u5230\u4e00\u4e9b\u4e1c\u897f\u3002<\/p>\n JavaScript \u662f\u4e00\u95e8\u9ad8\u7ea7\u8bed\u8a00\uff0c\u4f46\u662f\u6700\u7ec8\u8ba1\u7b97\u673a\u80fd\u7406\u89e3\u53ea\u67091\u548c0\u3002 \u90a3\u4e48\u6211\u4eec\u7f16\u5199\u7684\u4ee3\u7801\u662f\u5982\u4f55\u88ab\u8ba1\u7b97\u673a\u7406\u89e3\u7684\u5462\uff1f \u638c\u63e1\u6240\u5b66\u7f16\u7a0b\u8bed\u8a00\u7684\u57fa\u7840\u77e5\u8bc6\u5c06\u8ba9\u60a8\u80fd\u7f16\u5199\u51fa\u66f4\u597d\u7684\u4ee3\u7801\u3002 \u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ec5\u63a2\u8ba8\u4e00\u4e2a\u95ee\u9898\uff1aJavaScript \u662f\u5982\u4f55\u5de5\u4f5c\u7684\uff1f<\/p>\n \u4e0b\u9762\u8ba9\u6211\u4eec\u8fdb\u5165\u6b63\u9898~<\/p>\n JavaScript \u5f15\u64ce<\/strong><\/div>\n \u8fd9\u662f\u672c\u6587\u5c06\u8981\u63a2\u7d22\u7684\u4e3b\u8981\u5185\u5bb9\uff0c\u5b83\u8d1f\u8d23\u4f7f\u8ba1\u7b97\u673a\u7406\u89e3\u6211\u4eec\u7f16\u5199\u7684 JS \u4ee3\u7801\u3002JavaScript \u5f15\u64ce\u662f\u4e00\u79cd\u7528\u4e8e\u5c06\u6211\u4eec\u7684\u4ee3\u7801\u8f6c\u6362\u4e3a\u673a\u5668\u53ef\u8bfb\u8bed\u8a00\u7684\u5f15\u64ce\u3002\u5982\u679c\u6ca1\u6709 JavaScript \u5f15\u64ce\uff0c\u60a8\u7f16\u5199\u7684\u4ee3\u7801\u5bf9\u8ba1\u7b97\u673a\u6765\u8bf4\u7b80\u76f4\u662f\u4e00\u5806\u201c\u80e1\u8a00\u4e71\u8bed\u201d\u3002\u4e0d\u4ec5\u4ec5\u662f JavaScript \uff0c\u5176\u4ed6\u6240\u6709\u7f16\u7a0b\u8bed\u8a00\u90fd\u9700\u8981\u4e00\u4e2a\u7c7b\u4f3c\u7684\u5f15\u64ce\uff0c\u6765\u5c06\u8fd9\u4e9b\u201c\u80e1\u8a00\u4e71\u8bed\u201d\u8f6c\u6362\u6210\u5bf9\u8ba1\u7b97\u673a\u6709\u610f\u4e49\u7684\u8bed\u8a00\u3002<\/p>\n \u76ee\u524d\u6709\u591a\u79cd JavaScript \u5f15\u64ce\u5728\u53ef\u4f9b\u4f7f\u7528\u3002\u60a8\u53ef\u4ee5\u5728 Wikipedia \u4e0a\u67e5\u9605\u6240\u6709\u53ef\u7528\u7684 JavaScript \u5f15\u64ce\u3002\u5b83\u4eec\u4e5f\u88ab\u79f0\u4e3a ECMAScript \u5f15\u64ce\uff0c\u8fd9\u6837\u53eb\u7684\u5177\u4f53\u539f\u56e0\u4f1a\u5728\u4e0b\u6587\u4e2d\u63d0\u53ca\u3002 \u4e0b\u9762\u662f\u4e00\u4e9b\u6211\u4eec\u65e5\u5e38\u53ef\u80fd\u4f1a\u7528\u5230\u7684 JavaScript \u5f15\u64ce\uff1a<\/p>\n
\n SpiderMonkey, FireFox \n V8, Chrome\n<\/ol>\n \u9664\u6b64\u4e4b\u5916\u7684\u5176\u5b83\u5f15\u64ce\uff0c\u53ef\u4ee5\u81ea\u884c\u641c\u7d22\u4e86\u89e3\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u7814\u7a76\u8fd9\u4e9b\u5f15\u64ce\uff0c\u4ee5\u4e86\u89e3\u5b83\u4eec\u662f\u5982\u4f55\u7ffb\u8bd1 JavaScript \u6587\u4ef6\u7684\u3002<\/p>\n JavaScript \u5f15\u64ce\u7684\u5185\u91cc<\/strong><\/div>\n \u6211\u4eec\u5df2\u7ecf\u77e5\u9053\u4e86\u5f15\u64ce\u662f\u5fc5\u987b\u7684\uff0c\u7531\u6b64\u53ef\u80fd\u4e0d\u7981\u4f1a\u60f3\uff1a<\/p>\n \u662f\u8c01\u53d1\u660e\u4e86 JavaScript \u5f15\u64ce\uff1f<\/p>\n \u7b54\u6848\u662f\uff0c\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u3002\u5b83\u53ea\u662f\u5206\u6790\u6211\u4eec\u7684\u4ee3\u7801\u5e76\u5c06\u5176\u7ffb\u8bd1\u7684\u53e6\u4e00\u79cd\u8bed\u8a00\u7684\u5de5\u5177\u3002V8 \u662f\u6700\u53d7\u6b22\u8fce\u7684 JavaScript \u5f15\u64ce\u4e4b\u4e00\uff0c\u4e5f\u662f Chrome \u548c NodeJS \u4f7f\u7528\u7684\u5f15\u64ce\u3002\u5b83\u662f\u7528 C++\uff08\u4e00\u79cd\u5e95\u5c42\u8bed\u8a00\uff09\u7f16\u5199\u7684\u3002\u4f46\u662f\u5982\u679c\u6bcf\u4e2a\u4eba\u90fd\u521b\u9020\u4e00\u4e2a\u5f15\u64ce\uff0c\u90a3\u573a\u9762\u5c31\u4e0d\u662f\u53ef\u63a7\u8303\u56f4\u5185\u7684\u4e86\u3002<\/p>\n \u56e0\u6b64\uff0c\u4e3a\u4e86\u7ed9\u8fd9\u4e9b\u5f15\u64ce\u786e\u7acb\u4e00\u4e2a\u89c4\u8303\uff0cECMA \u7684\u6807\u51c6\u8bde\u751f\u4e86\uff0c\u8be5\u6807\u51c6\u4e3b\u8981\u63d0\u4f9b\u5982\u4f55\u7f16\u5199\u5f15\u64ce\u548c JavaScript \u6240\u6709\u529f\u80fd\u7684\u89c4\u8303\u3002\u8fd9\u5c31\u662f\u65b0\u529f\u80fd\u80fd\u5728 ECMAScript 6\u30017\u30018 \u4e0a\u5b9e\u73b0\u7684\u539f\u56e0\u3002\u540c\u65f6\uff0c\u5f15\u64ce\u4e5f\u8fdb\u884c\u4e86\u66f4\u65b0\u4ee5\u652f\u6301\u8fd9\u4e9b\u65b0\u529f\u80fd\u3002 \u4e8e\u662f\uff0c\u6211\u4eec\u4fbf\u53ef\u4ee5\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u68c0\u67e5\u4e86\u6d4f\u89c8\u5668\u4e2d JS \u9ad8\u7ea7\u529f\u80fd\u7684\u53ef\u7528\u6027\u3002<\/p>\n \u4e0b\u9762\u6211\u4eec\u5bf9 V8 \u5f15\u64ce\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u63a2\u7d22\uff0c\u56e0\u4e3a\u57fa\u672c\u6982\u5ff5\u5728\u6240\u6709\u5f15\u64ce\u4e2d\u662f\u4e00\u81f4\u7684\u3002<\/p>\n |