Differences between revisions 2 and 3
Revision 2 as of 2008-04-11 14:59:58
Size: 2710
Comment:
Revision 3 as of 2009-09-20 23:35:13
Size: 2710
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Project

Java Bytecode Translator Refactoring

Student

Okonechnikov Konstantin (okko73313@gmail.com)

Synopsis

Currently Jitrino OPT compiler has some problems with Java bytecode translator. Translator has unobvious and complex structure that makes difficult further expansion and evolution.

  • The idea of the project is to create new Java bytecode translator, which will solve these problems.

Project details and success criteria

The translator should have flexible and comprehensive architecture. The first steps of development will be analysis & design. This process will allow me to define specifications, elaborate development scheme and work out project model.

  • Work of the translator can be divided into following steps:
  • parse bytecode in order to establish basic block boundaries
  • perform data analysis
  • translate Java bytecode into HIR, generate CFG

To implement it I will use existing code. Some good approaches to the first step can be found in Jitrino JET. (For example, the first pass of JET determines basic blocks) To perform data analysis I will check with JavaLabelPrepass methods from current implementation of Java bytecode translator. To build Internal Representation, current translator invokes IRBuilder, which will be used in new implementation.

  • Translator should have clear and simple structure. The goal is to make it easy to understand and maintain. Project successfully finished if generated CFG correctly represents Java bytecode and 100% Harmony tests accomplished.

Schedule

  • Till the midst of June I will study essential documentation, develop the architecture of the translator. I will adjust my ideas with mentor and community.

  • 6-7 weeks – coding time, implementation of the translator.

  • 2-3 weeks - testing, debugging and writing documentation.

Roadmap

These are important milestones of project implementation, witch will represent the progress:

  1. Bytecode prepass
  2. Data flow analysis
  3. Bytecode mapping
  4. Add support for call instructions,lazy resolution, etc
  5. (!) HelloWorld runs successfully

  6. Add support for JSR/RET instructions (using current approach - CFG optimzer pass)
  7. Add support for inliner
  8. (!) All tests pass and Eclipse works in JIT opt mode

  9. Remaining features implementation, testing, debugging

Profit to Apache Harmony

Adding new functionality, expanding existing features are essential principles of successful development. The implementation of new translator will make it easier to maintain Harmony DRLVM; it will promote further development of Apache Harmony project.

WikiTranslatorRefactoringProposal (last edited 2009-09-20 23:35:13 by localhost)