OSDN Git Service

Add opcode-emission backward compatibility.
authorDan Bornstein <danfuzz@android.com>
Thu, 17 Mar 2011 01:00:19 +0000 (18:00 -0700)
committerDan Bornstein <danfuzz@android.com>
Mon, 21 Mar 2011 20:32:57 +0000 (13:32 -0700)
commitf4955a1a2eb1c06aafc9e314b221c448d15623d9
tree7142af32af9b5d92531cea4db2dbc770bc83a1d3
parent4153c081e8560d701785ecfe386be33818aec2de
Add opcode-emission backward compatibility.

This makes it so that when you pass dx --target-api=N, where N is an
API level representing Honeycomb or earlier, dx will not emit any of
the new extended opcodes.

N is currently baked into the code as 12 or larger being
post-Honeycomb, but it is subject to change if there are more revs of
the API under the Honeycomb umbrella (which wouldn't be surprising).

Bug: 4094709
Change-Id: Iaf5177f179b22586bcf806ecb53de20b6e989777
dx/src/com/android/dx/dex/code/Dops.java
dx/src/com/android/dx/io/Opcodes.java
dx/tests/120-disable-extended-ops/Blort.java [new file with mode: 0644]
dx/tests/120-disable-extended-ops/expected.txt [new file with mode: 0644]
dx/tests/120-disable-extended-ops/info.txt [new file with mode: 0644]
dx/tests/120-disable-extended-ops/run [new file with mode: 0644]