|
Size: 1483
Comment:
|
← Revision 6 as of 2009-09-20 21:55:29 ⇥
Size: 1492
Comment: converted to 1.6 markup
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| [[BR]][[BR]] The bytecode translator is responsible for converting incoming bytecode instructions into a [:../opcodes: high-level intermediate representation]. This IR is of a lower level than the bytecode and breaks complex bytecode operations into several simple instructions to expose more opportunities to later high-level optimization phases. For example, loading an object field is broken up into operations that perform a null check of the object reference, load the base address of the object, compute the address of the field, and load the value at that computed address. |
<<BR>><<BR>> The bytecode translator is responsible for converting incoming bytecode instructions into a [[../opcodes| high-level intermediate representation]]. This IR is of a lower level than the bytecode and breaks complex bytecode operations into several simple instructions to expose more opportunities to later high-level optimization phases. For example, loading an object field is broken up into operations that perform a null check of the object reference, load the base address of the object, compute the address of the field, and load the value at that computed address. |
| Line 5: | Line 5: |
| Source files: [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/ src/translator/*] | Source files: [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/|src/translator/*]] |
| Line 7: | Line 7: |
| !JavaTranslator::translateMethod() in [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaTranslator.cpp JavaTranslator.cpp] is for this translation. It scans all bytecodes one by one and generates Insts (HIR) associated with Nodes (BB) by calling !ByteCodeParser::parse() in [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/ByteCodeParser.h ByteCodeParser.h]. Then it calls !JavaFlowGraphBuilder::build() in [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaFlowGraphBuilder.cpp JavaFlowGraphBuilder.cpp] to build up the control flow graph. | !JavaTranslator::translateMethod() in [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaTranslator.cpp|JavaTranslator.cpp]] is for this translation. It scans all bytecodes one by one and generates Insts (HIR) associated with Nodes (BB) by calling !ByteCodeParser::parse() in [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/ByteCodeParser.h|ByteCodeParser.h]]. Then it calls !JavaFlowGraphBuilder::build() in [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaFlowGraphBuilder.cpp|JavaFlowGraphBuilder.cpp]] to build up the control flow graph. |
'translator' - translates Java language bytecode into High-level Intermediate representation (aka HIR)
The bytecode translator is responsible for converting incoming bytecode instructions into a high-level intermediate representation. This IR is of a lower level than the bytecode and breaks complex bytecode operations into several simple instructions to expose more opportunities to later high-level optimization phases. For example, loading an object field is broken up into operations that perform a null check of the object reference, load the base address of the object, compute the address of the field, and load the value at that computed address.
Source files: src/translator/*
JavaTranslator::translateMethod() in JavaTranslator.cpp is for this translation. It scans all bytecodes one by one and generates Insts (HIR) associated with Nodes (BB) by calling ByteCodeParser::parse() in ByteCodeParser.h. Then it calls JavaFlowGraphBuilder::build() in JavaFlowGraphBuilder.cpp to build up the control flow graph.