|
Authored by: bugstomper on Sunday, May 13 2012 @ 03:23 AM EDT |
There is a simpler explanation then knowledge of the patent.
The simulator class simulates individual Java VM byte code instructions and
outputs the equivalent Dalvik byte code instructions that achieve the same
results. It has to be a simulator so that it can keep track of the state of
memory as the program is executing, in case the actions performed by the Java VM
instructions depend on the state of memory.
In addition to using the simulator to translate Java VM byte code instructions,
there is an optimization that looks for static array initialization patterns in
the instruction stream. When it finds such a pattern it produces some optimized
Dalvik VM byte code instructions.
The Java code doesn't use a simulator for translating Java VM byte code into
some other byte code, because it doesn't have to do such translation. It does
have an optimizer for static array initializers and that optimizer uses a
simulator.
The Android code does use a simulator for translating Java VM byte code into
Dalvik VM byte code. It also has an optimizer for static array initializers.
That optimizer is simpler than the one in Java, using a pattern matcher rather
than a simulator.
The simulator that is used to translate Java VM byte code instructions into
Dalvik VM byte code instructions was not written to perform the more complicated
task of recognizing static array initialization. It was written for a very
different task. The static array initialization optimizer was not written to use
a simulator. It was written to use the easier to write pattern matching method.
Since the simulator in Android was written for a different purpose there is no
reason to deduce that Google knew of the patent when they did not come up with a
simulator-based solution for doing the optimization.
[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Sunday, May 13 2012 @ 10:31 AM EDT |
I highly doubt they had looked at the patent when developing Dalvik -- most
engineers I've met treat software patents like toxic waste. (I worked on a Java
VM for a while 10 years ago, and I certainly never read any of these patents
back then.)
Its more likely that somebody wanted to optimize the array initialization, and
chose the simplest way they could think of to do that (pattern matching).[ Reply to This | Parent | # ]
|
|
|
|
|