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

Java混階編譯器

Java Mixed-Level Compiler

指導教授 : 廖賀田

摘要


J2ME(Java 2 Platform Micro Edition)被廣泛應用在手機市場。可攜性在手機市場是很重要的訴求,它讓手機軟體開發廠商節省開發時間與金錢,軟體開發者透過J2ME只需撰寫一套Java應用程式,便可在不同平台的手機上執行。 J2ME提供KVM(Kilobyte Virtual Machine)讓資源受限的消費性電子產品執行Java類別檔,但因記憶體容量的限制以致無法運用JIT(Just-In-Time)技術來提升效能,使得在效能上為人詬病。雖然直接將Java原始碼編譯成處理器(Processor)之原生機器碼(Native Machine Code)可以提升執行之效能,但卻喪失了可攜性。 本論文所提出的混階編譯器,讓程式員可在Java原始碼內同時撰寫高階語法與JAsm語言(Java Assembly Language)。混階原始碼經過剖析與連結成為混階語法樹,接著將混階語法樹生成JAsm組譯碼,最終輸出類別檔。 實證證實經過混階語法的引用,使得程式在J2ME之執行時效能有顯著的增進。因此程式員可以透過混階編譯器,依實務上之需求針對程式碼片段用JAsm語法撰寫,使混階編譯後的類別檔在J2ME之執行效能上能有所提升。

關鍵字

Java J2ME 混階語法 編譯器 最佳化

並列摘要


In recent years J2ME(Java 2 Platform Micro Edition) has been wildly applied in cell phone market. Therefore, J2ME’s ability to work with different platforms is important in the fragmented cell phone market. This capability lets a Java-enabled phone run applications and services written for other mobile platforms and also lets software vendors save time and money by writing a single, Java-based version of an application to run on multiple platforms. J2ME platform provides KVM(Kilobyte Virtual Machine) , which is an implementation optimized for use on small devices. However, limited memories constraints make JIT techniques untenable. Although it can compile java source code to native machine code for performance, it will loose the portability. We have developed a Java mixed-level compiler for compiling Java high-level language and JAsm(Java Assembly Language). The programmer can use mixed-level language to optimize original source code. The compiler translates mixed-level source code to mixed-level syntax tree. Then, it transforms mixed-level syntax tree into Java assembly code, and writes out the class file. Based on the experimental results, it can be seen that our approach can achieve better performance. Consequently, the programmer can use JAsm to optimize java source code.

並列關鍵字

Java J2ME mixed-level compiler optimization

參考文獻


[1] 郭肇安,『Java語法樹與直譯機制』,淡江大學資訊管理所碩士論文,Jun 2005。
[4] D. Low, “Protecting Java Code Via Code Obfuscation,” ACM Crossroads 4 3, pp. 21–23, 1998.
[5] G. Lawton, "Moving Java into Mobile Phones," Computer, vol. 35, no. 6, pp. 17-20, June 2002.
[6] I.H. Kazi, H.H. Chen, B. Stanley, and D.J. Lilja, “Techniques for Obtaining High Performance in Java Programs,” ACM Computing Surveys, Vol. 32, No. 3, pp. 213–240, September 2000.
[8] J. L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software-Practice and Experience, vol. 23(11), pp. 1249-1265 , November 1993.

延伸閱讀


國際替代計量