透過您的圖書館登入
IP:18.188.20.56
  • 學位論文

為混合執行模式設計之JavaScript靜態編譯器

JSComp: A Static Compiler for Hybrid Execution of JavaScript Programs

指導教授 : 游逸平

摘要


JavaScript是一種被廣泛應用在瀏覽器中的動態語言,執行JavaScript的程式我們稱之為JavaScript Engine。JavaScript engine的實作通常為直譯器(interpreter)或是JIT編譯器(Just-in-time compiler)。然而因為JavaScript其動態語言特性的影響,其表現通常受到極大的限制。 在這篇論文中,我們提出了一個JavaScript的編譯器,透過在靜態時期的分析將JavaScript部分編譯為Native Client或asm.js以達到性能的提升。並且透過混合執行模型(結合了靜態編譯優化及執行期的編譯),得到了性能的優勢,並保留了動態之特性。 而在我們的實驗中顯示,我們所提出的這個方法可以在SunSpider benchmark中平均大約得到50%之效能提升。

關鍵字

JavaScript 型別推理 編譯器

並列摘要


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%.

並列關鍵字

JavaScript Type inference Compiler

參考文獻


[14] Bennet Yee, David Sehr, Gregory Dardyk, J. Bradley Chen, Robert Muth, Tavis
Mason Chang, and Michael Franz. Trace-based just-in-time type specialization
Guilherme Ottoni, Andrew Paroski, Scott MacVicar, Jason Evans, and Stephen
Orendorff, Jesse Ruderman, Edwin W. Smith, Rick Reitmaier, Michael Bebenita,
[12] Andreas Gal, Brendan Eich, Mike Shaver, David Anderson, David Mandelin,

延伸閱讀