Bytecode-to-sourcetranslators are static compilers that generate an intermediate high-level language, such as C, from the Java bytecodes (see Figure 2). A standard compiler for the intermediate language is then used to generate executable machine code. Choosing a high-level language such as C as an intermediate language allows the use of existing compiler technology, which is useful since many compilers that incorporate extensive optimization techniques are available for almost all platforms. Toba [Proebsting et al. 1997] is a bytecode-to-source translator for Irix, Solaris, and Linux platforms that converts Java class files directly into C code. The generated C code can then be compiled into machine code. Toba describes itself as a Way-Ahead-of-Time compiler since it compiles bytecodes before program execution in contrast to JIT compilers which compile the bytecodes immediately before execution. All versions of Toba provide support for garbage collection, exceptions, threads, and the BISS-AWT, an alternative to the Sun AWT (Abstract Window Toolkit). In addition, the Linux version of Toba also supports dynamic loading of classes using a JIT compiler. The Toba C code generator naively converts each bytecode directly into equivalent C statements without a complex intermediate representation, relying on the C compiler to eventually optimize the code. Harissa[Muller et al. 1997, Welcome to Harissa] is a Java environment that includes both a bytecode translator and an interpreter for SunOS, Solaris, Linux, and DEC Alpha platforms. The Harissa compiler reads in Java source code and converts it into an intermediate representation (IR). It then analyzes and optimizes the structure of the Java code and outputs optimized C files. Since existing C compilers can be used to perform more generalized optimizations, Harissa’s compiler focuses on IR optimizations such as static evaluation to eliminate the stack, elimination of redundant bounds checks, elimination of bounds checks on array indices that can be statically determined, and transforming virtual method calls into simple procedure calls using class hierarchy analysis. A complete interpreting JVM has been integrated into the runtime library to allow code to be dynamically loaded into previously compiled applications. Since data structures are compatible between the compiled code and the interpreter, Harissa provides an environment that cleanly allows the mixing of bytecodes and compiled code. TurboJ is a Java bytecode-to-source translator [TurboJ Java to Native Compiler] that also uses C as an intermediate representation. The generated code retains all of the Java run-time checks, although redundant checks are eliminated. TurboJ is not a stand-alone Java runtime system. Instead it operates in conjunction with a Java runtime system and uses the native JDK on a given platform for memory allocation, garbage collection, and access to the standard thread package. Vortexis an optimizing compiler that supports general object-oriented languages [UW Cecil/Vortex Project, Dean et al. 1996]. The Java, CCC, Cecil, and Modula-3 languages are all translated into a common IL. If the Java source code is not available, this system can use a modified version of thejavap bytecode disassembler to translate the bytecodes into the Vortex IL. The IL representation of the program is then optimized using such techniques as intraprocedural class analysis, class hierarchy analysis, receiver class prediction, and inlining. An enhanced CSE technique is also provided. Once optimization is complete, either C code or assembly code can be generated.
bytecode ไป sourcetranslators เป็นคอมไพเลอร์คงที่สร้างภาษากลางระดับสูงเช่น C, จาก bytecodes java (ดูรูปที่ 2) คอมไพเลอร์มาตรฐานสำหรับภาษากลางที่ใช้แล้วเพื่อสร้างรหัสเครื่องที่ปฏิบัติการ เลือกภาษาระดับสูงเช่นคเป็นภาษากลางที่ช่วยให้การใช้เทคโนโลยีคอมไพเลอร์ที่มีอยู่ซึ่งจะเป็นประโยชน์เนื่องจากคอมไพเลอร์หลายที่รวมเทคนิคการเพิ่มประสิทธิภาพที่ครอบคลุมที่มีอยู่สำหรับเกือบทุกแพลตฟอร์ม toba [proebsting ตอัล 1997] เป็นนักแปล bytecode การแหล่งที่มาสำหรับแพลตฟอร์ม irix, Solaris, และลินุกซ์ที่แปลงไฟล์ชั้นจาวาโดยตรงในรหัสค รหัสคที่สร้างขึ้นนั้นจะสามารถเรียบเรียงรหัสเครื่องtoba อธิบายตัวเองเป็นคอมไพเลอร์ทางข้างหน้าของเวลาเพราะมันรวบรวม bytecodes ก่อนที่การทำงานของโปรแกรมในทางตรงกันข้ามกับคอมไพเลอร์ JIT ซึ่งรวบรวม bytecodes ทันทีก่อนที่จะดำเนินการ ทุกรุ่นของ toba ให้การสนับสนุนสำหรับการเก็บขยะข้อยกเว้นหัวข้อและ Biss-AWT, ทางเลือกที่จะ AWT ดวงอาทิตย์ (หน้าต่างเครื่องมือที่เป็นนามธรรม) ในนอกจากนี้รุ่นลินุกซ์ของ toba ยังสนับสนุนการโหลดแบบไดนามิกของชั้นเรียนโดยใช้คอมไพเลอร์ JIT เครื่องกำเนิดไฟฟ้ารหัส toba คอย่างไร้เดียงสาแปลงแต่ละ bytecode โดยตรงในงบคเทียบเท่าโดยไม่ต้องเป็นตัวแทนกลางที่ซับซ้อนอาศัยคคอมไพเลอร์ไปในที่สุดเพิ่มประสิทธิภาพของรหัส Harissa [มุลเลอร์และอัล 1997ยินดีต้อนรับเข้าสู่ Harissa] เป็นสภาพแวดล้อม java ที่รวมทั้งนักแปล bytecode และล่าม SunOS, Solaris, Linux, และธันวาคมแพลตฟอร์มอัลฟา คอมไพเลอร์ Harissa อ่านในซอร์สโค้ดจาวาและแปลงเป็นตัวแทนกลาง (IR) มันแล้ววิเคราะห์และเพิ่มประสิทธิภาพของโครงสร้างของรหัสจาวาและผลไฟล์คที่ดีที่สุดตั้งแต่คอมไพเลอร์คที่มีอยู่สามารถนำมาใช้ในการดำเนินการเพิ่มประสิทธิภาพทั่วไปมากขึ้นคอมไพเลอร์ Harissa มุ่งเน้นไปที่การเพิ่มประสิทธิภาพ ir เช่นการประเมินผลแบบคงที่เพื่อขจัดกองการกำจัดของการตรวจสอบขอบเขตซ้ำซ้อนกำจัดของการตรวจสอบขอบเขตดัชนีอาร์เรย์ที่สามารถกำหนดแบบคงที่และเปลี่ยนเสมือน วิธีการโทรเข้าโทรขั้นตอนง่ายๆโดยใช้การวิเคราะห์ลำดับชั้นJVM ล่ามที่สมบูรณ์ได้รับการรวมอยู่ในห้องสมุด runtime เพื่อให้รหัสที่จะโหลดแบบไดนามิกในการใช้งานที่รวบรวมก่อนหน้านี้ ตั้งแต่โครงสร้างข้อมูลที่เข้ากันได้ระหว่างรหัสรวบรวมและล่าม Harissa มีสภาพแวดล้อมที่สะอาดช่วยให้การผสมของ bytecodes และรหัสเรียบเรียงturboj เป็น java bytecode ไปแหล่งที่มาแปล [turboj java เพื่อรวบรวมพื้นเมือง] ที่ยังใช้คในฐานะที่เป็นตัวแทนของกลาง รหัสที่สร้างขึ้นยังคงมีทั้งหมดของ java ตรวจสอบเวลาทำงานถึงแม้ว่าการตรวจสอบที่ซ้ำซ้อนจะถูกตัดออก turboj ไม่ได้เป็นระบบ runtime java สแตนด์อะโลนแทนมันทำงานร่วมกับระบบ runtime java และใช้ jdk พื้นเมืองบนแพลตฟอร์มที่กำหนดสำหรับการจัดสรรหน่วยความจำเก็บขยะและการเข้าถึงแพคเกจด้ายมาตรฐาน vortexis คอมไพเลอร์ที่สนับสนุนการเพิ่มประสิทธิภาพของภาษาเชิงวัตถุทั่วไป [โครงการ cecil / น้ำวน UW คณบดีและอัล 1996] java, CCC, cecil และ Modula-3 ภาษามีการแปลทั้งหมดลง il ทั่วไปถ้าซอร์สโค้ดจาวาไม่สามารถใช้งานระบบนี้สามารถใช้รุ่นที่ปรับเปลี่ยน disassembler bytecode thejavap แปล bytecodes il เป็นน้ำวน ตัวแทน il ของโปรแกรมคือการเพิ่มประสิทธิภาพแล้วใช้เทคนิคเช่นการวิเคราะห์ intraprocedural ชั้นลำดับชั้นการวิเคราะห์การทำนายชั้นรับและ inlining เทคนิค CSE เพิ่มนอกจากนี้ยังมีเมื่อเสร็จสิ้นการเพิ่มประสิทธิภาพทั้งรหัสคหรือรหัสการชุมนุมก็จะสามารถสร้าง
การแปล กรุณารอสักครู่..
