標題: 為混合執行模式設計之JavaScript靜態編譯器
JSComp: A Static Compiler for Hybrid Execution of JavaScript Programs
作者: 陳柏裕
Chen, Po-Yu
游逸平
You, Yi-Ping
資訊科學與工程研究所
關鍵字: JavaScript;型別推理;編譯器;JavaScript;Type inference;Compiler
公開日期: 2013
摘要: JavaScript是一種被廣泛應用在瀏覽器中的動態語言,執行JavaScript的程式我們稱之為JavaScript Engine。JavaScript engine的實作通常為直譯器(interpreter)或是JIT編譯器(Just-in-time compiler)。然而因為JavaScript其動態語言特性的影響,其表現通常受到極大的限制。 在這篇論文中,我們提出了一個JavaScript的編譯器,透過在靜態時期的分析將JavaScript部分編譯為Native Client或asm.js以達到性能的提升。並且透過混合執行模型(結合了靜態編譯優化及執行期的編譯),得到了性能的優勢,並保留了動態之特性。 而在我們的實驗中顯示,我們所提出的這個方法可以在SunSpider benchmark中平均大約得到50%之效能提升。
JavaScript is a dynamic language that is widely supported in modern Web browsers.JavaScript programs are usually executed by a JavaScript engine, which is implemented using an interpreter or a just-in-time compiler. However, the dynamic aspects of interpretation and run-time compilation intrinsically limit the performance of JavaScript programs. In this paper, we propose a JavaScript compiler, called JSComp,that statically translates partial JavaScript programs into Native Client modules or asm.js programs for improving the execution performance and also a hybrid execution model (a combination of static compilation and dynamic interpretation) for JavaScript programs so as to take advantages of high-performance execution in the compilation model and dynamic code evaluation in the interpretation model. Our evaluations demonstrated that the proposed mechanisms were effective in improving the execution performance of JavaScript programs in the SunSpider benchmark suite by an average of 50%.
URI: http://140.113.39.130/cdrfb3/record/nctu/#GT070156060
http://hdl.handle.net/11536/74666
顯示於類別:畢業論文