Font Size: a A A

Trace-based Just-in-time Compilat-ion Technique For Secd Machine

Posted on:2015-07-07Degree:MasterType:Thesis
Country:ChinaCandidate:C L YuFull Text:PDF
GTID:2298330452953147Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The implementation methods of high-level languages can be divided into threecategories: compilation, interpretation and hybrid approach. For languagesimplemented by compilation approach, programs are compiled intoplatform-dependent native code by a compiler before execution in order to get a goodperformance. For languages implemented by interpretation approach, programs areexecuted directly by an interpreter, without previously being compiled into machinecode. Interpretive execution is slower than compilation execution in general. In hybridapproach, programs are translated into intermediate code and intermediate code isexecuted by a virtual machine.Just-in-time (a.k.a JIT) compilation is one of the techniques that implementhigh-level languages by hybrid approach. In JIT compilation, the frequently executedparts of a program are compiled into target code at runtime and target code isexecuted later instead of interpreting the frequently executed parts. JIT compilers canbe categorized by their compilation scope. Method-based JIT compilers translate onemethod at a time to target code. Trace-based JIT compilers use the frequentlyexecuted paths, which are called traces, as their unit of compilation.A general trace-based JIT compilation technique, which is based on SECDmachine, is proposed in this paper. SECD machine is a highly influential abstractmachine intended as a target for functional programming language compilers. Byusing of this technique, SECD instructions of a program are interpreted and profiledby a SECD interpreter at runtime. Those frequently executed parts are identified ashot traces, then compiled to Java bytecodes and executed by Java virtual machine(a.k.a JVM). This technique can be applied to any programming language, which canbe implemented on SECD machine, to improve the performance of execution.An instruction set and an implementation method of SECD machine are given.The translation algorithm from SECD instructions to Java bytecodes is also given.Since SECD instructions are interpreted by SECD machine and Java bytecodes areexecuted by JVM, runtime environments of different execution mode are not same. Toensure that target code runs correctly, this paper discusses an alternation approachbetween interpretation execution environment and compilation execution environmentat runtime.This paper also discusses a general framework of execution engine applied this technique. We use this framework to implement XQuery and the experimental resultsshow this technique effectively improves the execution performance of XQueryprogram.
Keywords/Search Tags:just-in-time compilation, SECD machine, Java bytecode, trace
PDF Full Text Request
Related items