On the 0x39E day of Apache Harmony Dan Bornstein wrote: > > I wonder if there any possibility of code reuse > > between DRLVM and Dalvik. > > > > Which chances have JIT, GC, a verifier, or any other part of DRLVM to > > be reused? > > If the JIT or verifier are based on the bytecode you might find in a > typical .class file, then I doubt those components will be reusable. > Dalvik uses a different bytecode. We already verify it, and if/when we > do a JIT, the JIT would be taking Dalvik bytecode / .dex files as > input.
In case some Android phone runs on an x86 processor (doubtful, but..why not?), we could reuse the optimizing code-generator from Harmony JIT (Jitrino). It uses register-based IR, so writing a translator from .dex should be fairly simple. Though, it is reasonable for Android to start from IR-less JIT like Jitrino.JET. And I see no obvious field for reuse here. So, it is too early to speak about reusing Harmony JIT in Android. > Our allocator today is a fairly simple one built on top of dlmalloc. I > know we will want something a bit more complex at some point, and the > DRLVM related code very well may fit the bill. The overriding concerns > we will have will be minimizing memory overhead and maximizing cache > locality. We already know, for example, that we will want to do stuff > to ensure that we can have a (section of the) heap which is shared > copy-on-write between processes, but where running gc wouldn't force a > copy; this means that mark bits would have to be segregated from the > objects that are being marked. > > > Are you interested in developing common runtime building > > blocks in Apache? > > Put perhaps overly bluntly: I am interested in shipping a good solid > Android 1.0. I am also interested in sharing as much of the Android > work as makes sense. But shipping is my #1 priority. > > -dan > -- Egor Pasko
