• Home
  • History
  • Annotate
  • only in /dalvik/dx/src/com/android/dx/cf/code/
History log of /dalvik/dx/src/com/android/dx/cf/code/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
333201833d506a3accdeac6ceb7caba8d4b95797 13-Apr-2011 Jesse Wilson <jessewilson@google.com> Combine CstUtf8 and CstString.

The only benefit we were seeing is that one wrapped its toHuman
in quotes, the other didn't.

It was far too easy to use the wrong one. We had code defending
against that in NameValuePair and CstArray.

Change-Id: Ib2e6a1596b97decced37952d46e1831b7bcd0d5d
asicBlocker.java
oncreteMethod.java
ocalVariableList.java
opperMachine.java
imulator.java
ed0fe6c2f310f8c2cc28c35c2b473d8de36db8a4 14-Apr-2011 Jesse Wilson <jessewilson@google.com> Bare-bones dex code generator.

This is functional but incomplete. In particular, the following
are still coming:
- instructions for cast/instanceof/arrays/float comparison/try/catch
- debug information
- annotations

The API is also incomplete. When this is done I'm going to remove
the type parameters to see if that's a net win. I suspect it will
be because generics currently hurt the ability to do assignments
between unknown types - you can't currently assign from Label<?> to
Label<?>, for example.

I'm anticipating changes to the way Code instances are created.
In the current API these are created without an attached method and
later attached to a method with Method.declare(). This doesn't work
very well, particularly since the code blocks don't know how many
parameters they take, whether they're static, or what their return
type is. I'm tempted to make declare() return a writable Code instance,
or to simply combine the Code and Method classes.

This code can benefit from more error detection. It's currently quite
easy to do bad things with labels: use them on the wrong Code instance,
reuse them, don't use them, etc. Better error checking is due here.

Change-Id: I4fe20552f2c571e41bedba6ff9db6686688d97ee
http://code.google.com/p/android/issues/detail?id=6322
oncreteMethod.java
c31f795aef67a0d6af9abe4610db5ecae8d30c19 12-Mar-2011 jeffhao <jeffhao@google.com> Verifier allows certain errors so they can fail at runtime.

Specifically, this relaxes array typing in the absense of local variable
info.

Change-Id: I1b1aeb64a0842be3cffe70c02418444457abe972
aseMachine.java
xecutionStack.java
achine.java
imulator.java
6b386bfb92ef6efe8f963270fc5a4b756fca225e 15-Feb-2011 jeffhao <jeffhao@google.com> Fix for complex jsr nesting causing NullPointerException.

Happens when one jsr calls another that ultimates throws an exception.
The subroutine inliner assumes the return block of the first jsr is
reachable when it's not, causing access to a null field. Fixed by
checking the field for null before accessing it.

Change-Id: Id1fb376c9f14ffebc77cdbd253a713eb6d949c1f
ytecodeArray.java
opper.java
19cefdcde26ea31d06cef031032b2ef78013d976 01-Feb-2011 Dan Bornstein <danfuzz@android.com> Add ShortArrayCodeInput.

This is analogous to ByteArrayInputStream, and is hopefully useful
as-is to be the impedence matcher between CodeReader and InstructionCodec.

I also modified CodeInput's methods to throw EOFException, implementing
ShortArrayCodeInput to throw it in the expected cases.

Change-Id: Id46366590ed5a2607bc6672d040f9d11fa8a445d
Bonus: Fixed a comment in BytecodeArray that I happened to notice.
ytecodeArray.java
4596322b12a72cdeea8deba1242d9b74da5ba12a 25-Jan-2011 jeffhao <jeffhao@google.com> Allow dx to properly generate sub-const and rsub-const insns.

Dx can now handle instructions of the form "reg - const" by converting
it into an equivalent add-const with negative constant. Also, dx can
handle instructions of the form "const - reg" by creating an rsub-const
instruction, which was previously unused.

Change-Id: I67d869b5e14b65f6bbd1daae8bf0c662296af5de
opperMachine.java
3d0823c03df73acc786940489dcdd5b8e0d7cefe 28-Oct-2010 Dan Bornstein <danfuzz@android.com> Fix propagation of constants.

In particular, when constructing a rop instruction for a move, if
the source has a known constant value, make the target end up also
having that value.

Change-Id: If172337889134e4a682bb0d8eb4e07ca284ac80e
aseMachine.java
opperMachine.java
9c907e0f7dd74ef351d0116783e088bb9ed68bdb 27-Oct-2010 Dan Bornstein <danfuzz@android.com> The failure of dx test 105 wasn't actually spurious. Fixed the code.

In particular, for array load and store instructions, dx was being too
aggressive about letting the contents of the stack override the
implied type expected by the instructions. This led to cases where dx
would emit code instead of reporting an error.

The failure on the array load side of things implied that there also
needed to be a new regression test on the store side, since the
existing array store test didn't catch this. So, I added that too in
this change.

Finally, I took this opportunity to do minor whitespace-type cleanups
in a couple of related files that I opened during the course of the
investigation.

Change-Id: I72c644f66afb1108ae43a129ac81b010d072155a
ytecodeArray.java
imulator.java
de75089fb7216d19e9c22cce4dc62a49513477d3 09-Jun-2010 Carl Shapiro <cshapiro@google.com> Remove trailing whitespace.

Change-Id: I95534bb2b88eaf48f2329282041118cd034c812b
aseMachine.java
asicBlocker.java
yteBlock.java
yteCatchList.java
yteOps.java
ytecodeArray.java
oncreteMethod.java
xecutionStack.java
rame.java
ineNumberList.java
ocalVariableList.java
ocalsArray.java
ocalsArraySet.java
achine.java
erger.java
eturnAddress.java
opperMachine.java
imulator.java
witchList.java
alueAwareMachine.java
2859440d31dcb5de958d32a6012c1f8b3c509344 11-Dec-2009 Dan Bornstein <danfuzz@android.com> am c51439a5: Fix a bug where, in static synchronized methods that had no other uses of registers (no locals, no parameters, no method calls with arguments), v0 would be used both to hold the object being synchronized on and to hold a caught exception.

Merge commit 'c51439a513d4cc3c2be4a7cce7b3e9ae480fd5c2' into eclair-mr2-plus-aosp

* commit 'c51439a513d4cc3c2be4a7cce7b3e9ae480fd5c2':
Fix a bug where, in static synchronized methods that had no other uses
c51439a513d4cc3c2be4a7cce7b3e9ae480fd5c2 10-Dec-2009 Dan Bornstein <danfuzz@android.com> Fix a bug where, in static synchronized methods that had no other uses
of registers (no locals, no parameters, no method calls with arguments),
v0 would be used both to hold the object being synchronized on and to hold
a caught exception.

The result was code that, if an exception was thrown through it, would
in turn throw an IllegalMonitorStateException, as the vm would be
asked to monitor-exit the exception object and not the monitor-entered
class.

Dx test 062 has a couple new cases to cover this case as well as the
parallel instance method case (not that the latter was problematic,
but I like the symmetry).
opper.java
78199efa7615ac896c9a116737bb87f3724ead0b 10-Dec-2009 Dan Bornstein <danfuzz@android.com> am 39c5899d: Preflight cleanup of Ropper.java for style, whitespace, etc., before doing some more drastic modifications. Also, bumped up the version number, rather than making changes first and then forgetting that important detail.

Merge commit '39c5899d0359c386815f5f72991a3a2573135dbd' into eclair-mr2-plus-aosp

* commit '39c5899d0359c386815f5f72991a3a2573135dbd':
Preflight cleanup of Ropper.java for style, whitespace, etc., before doing
39c5899d0359c386815f5f72991a3a2573135dbd 10-Dec-2009 Dan Bornstein <danfuzz@android.com> Preflight cleanup of Ropper.java for style, whitespace, etc., before doing
some more drastic modifications. Also, bumped up the version number, rather
than making changes first and then forgetting that important detail.
opper.java
92f4f58df944fd10c77e3d39d200c38c1491a941 15-Sep-2009 Jean-Baptiste Queru <jbq@google.com> merge from open-source master
30d4c4a0e63f5bd6f1887bb987d7836ea091144e 30-Aug-2009 Alexey Tarasov <tarasov@dodologics.com> Cosmetic change: cst -> type in javadoc @param
ytecodeArray.java
55423dcd081e30c4fc27b997f127db7b00f1b981 15-May-2009 Dan Bornstein <danfuzz@android.com> Fix a bunch of little problems noticed by FindBugs, and cleaned up some
spacing issues that I happened to notice along the way.
asicBlocker.java
ocalVariableList.java
opper.java
41aecd0a6bfea1e9a6713014b2b3d56fec8c552c 04-May-2009 Dan Bornstein <danfuzz@android.com> Tweaks, Mostly grep-based, to better conform to the coding guidelines.
ocalsArraySet.java
opper.java
d24414a5d1780ce25179f3467b228f9a53863fb4 17-Apr-2009 Dan Bornstein <danfuzz@android.com> Fix issue #1794388.

In particular, when encountering a known-null being used as an array,
always emit an instruction that's compatible with the element type
expected/encountered in context. This will sometimes lead to
surprising instruction choices, such as "aget-byte" when the original
source used a boolean[], but in all of these cases the output is valid
and behaves correctly, where "correctly" in this case means (a)
passing verification, and (b) throwing a NullPointerException if ever
executed.

The test case (dx test #111) reflects unsurprising expectations and
so needs updating, which I will do in a follow-up to this patch.

I know this makes me an awful git user, but I fixed some comments and
whitespace while I was in the territory and *didn't* turn these into
separate commits.
opperMachine.java
imulator.java
alueAwareMachine.java
99409883d9c4c0ffb49b070ce307bb33a9dfe9f1 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import //branches/master/...@140412
aseMachine.java
asicBlocker.java
yteBlock.java
yteBlockList.java
yteCatchList.java
yteOps.java
ytecodeArray.java
oncreteMethod.java
xecutionStack.java
rame.java
ineNumberList.java
ocalVariableList.java
ocalsArray.java
ocalsArraySet.java
achine.java
erger.java
neLocalsArray.java
eturnAddress.java
opper.java
opperMachine.java
imulator.java
witchList.java
alueAwareMachine.java
f6c387128427e121477c1b32ad35cdcaa5101ba3 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
aseMachine.java
asicBlocker.java
yteBlock.java
yteBlockList.java
yteCatchList.java
yteOps.java
ytecodeArray.java
oncreteMethod.java
xecutionStack.java
rame.java
ineNumberList.java
ocalVariableList.java
ocalsArray.java
ocalsArraySet.java
achine.java
erger.java
neLocalsArray.java
eturnAddress.java
opper.java
opperMachine.java
imException.java
imulator.java
witchList.java
alueAwareMachine.java
ackage.html
f72d5de56a522ac3be03873bdde26f23a5eeeb3c 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
aseMachine.java
asicBlocker.java
yteBlock.java
yteBlockList.java
yteCatchList.java
yteOps.java
ytecodeArray.java
oncreteMethod.java
xecutionStack.java
rame.java
ineNumberList.java
ocalVariableList.java
ocalsArray.java
ocalsArraySet.java
achine.java
erger.java
neLocalsArray.java
eturnAddress.java
opper.java
opperMachine.java
imException.java
imulator.java
witchList.java
alueAwareMachine.java
ackage.html
2ad60cfc28e14ee8f0bb038720836a4696c478ad 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
aseMachine.java
asicBlocker.java
yteBlock.java
yteBlockList.java
yteCatchList.java
yteOps.java
ytecodeArray.java
oncreteMethod.java
xecutionStack.java
rame.java
ineNumberList.java
ocalVariableList.java
ocalsArray.java
ocalsArraySet.java
achine.java
erger.java
neLocalsArray.java
eturnAddress.java
opper.java
opperMachine.java
imException.java
imulator.java
witchList.java
alueAwareMachine.java
ackage.html