summaryrefslogtreecommitdiff
path: root/dx
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2009-04-17 14:01:41 -0700
committerDan Bornstein <danfuzz@android.com>2009-04-17 14:01:41 -0700
commit359f9296f8685fafd1e7611949d8101af32d7543 (patch)
tree0ac4c6909fe9aded4e1203c3042e2216e8cfeb7b /dx
parentd24414a5d1780ce25179f3467b228f9a53863fb4 (diff)
downloaddalvik-359f9296f8685fafd1e7611949d8101af32d7543.tar.gz
Update dx test #111 to reflect the new understanding of reality.
This is a followup to internal master change #277 (d24414a5), see which for further details.
Diffstat (limited to 'dx')
-rw-r--r--dx/tests/111-use-null-as-array/expected.txt10
-rw-r--r--dx/tests/111-use-null-as-array/info.txt9
2 files changed, 14 insertions, 5 deletions
diff --git a/dx/tests/111-use-null-as-array/expected.txt b/dx/tests/111-use-null-as-array/expected.txt
index 58d5699de..7e2116b92 100644
--- a/dx/tests/111-use-null-as-array/expected.txt
+++ b/dx/tests/111-use-null-as-array/expected.txt
@@ -2,7 +2,7 @@ Blort.test_getBooleanArray:()Z:
regs: 0002; ins: 0000; outs: 0000
0000: const/4 v0, #null // #0
0001: const/4 v1, #int 1 // #1
- 0002: aget-boolean v0, v0, v1
+ 0002: aget-byte v0, v0, v1
0004: return v0
Blort.test_getByteArray:()B:
regs: 0002; ins: 0000; outs: 0000
@@ -56,21 +56,21 @@ Blort.test_setBooleanArray:()V:
regs: 0002; ins: 0000; outs: 0000
0000: const/4 v1, #int 1 // #1
0001: const/4 v0, #null // #0
- 0002: aput-boolean v1, v0, v1
+ 0002: aput v1, v0, v1
0004: return-void
Blort.test_setByteArray:()V:
regs: 0003; ins: 0000; outs: 0000
0000: const/4 v0, #null // #0
0001: const/4 v1, #int 2 // #2
0002: const/4 v2, #int 3 // #3
- 0003: aput-byte v2, v0, v1
+ 0003: aput v2, v0, v1
0005: return-void
Blort.test_setCharArray:()V:
regs: 0003; ins: 0000; outs: 0000
0000: const/4 v0, #null // #0
0001: const/4 v1, #int 4 // #4
0002: const/4 v2, #int 5 // #5
- 0003: aput-char v2, v0, v1
+ 0003: aput v2, v0, v1
0005: return-void
Blort.test_setDoubleArray:()V:
regs: 0004; ins: 0000; outs: 0000
@@ -112,5 +112,5 @@ regs: 0003; ins: 0000; outs: 0000
0000: const/4 v0, #null // #0
0001: const/16 v1, #int 15 // #000f
0003: const/16 v2, #int 16 // #0010
- 0005: aput-short v2, v0, v1
+ 0005: aput v2, v0, v1
0007: return-void
diff --git a/dx/tests/111-use-null-as-array/info.txt b/dx/tests/111-use-null-as-array/info.txt
index fdcf844fa..624386d1e 100644
--- a/dx/tests/111-use-null-as-array/info.txt
+++ b/dx/tests/111-use-null-as-array/info.txt
@@ -4,6 +4,15 @@ converted to the type in question. When executed, this sort of code
will inevitably throw a NullPointerException, but if the opcode weren't
correct, they would instead incorrectly fail verification.
+If you inspect the expected output of this test, you will see that
+there are some surprising instructions in there, such as using
+aget-byte for what was a boolean[] in the source code. In these cases,
+the resulting output is still correct (passes verification and will
+throw a NullPointerException if ever executed). However, it happens
+that during translation there simply wasn't enough information to
+recover the "true" original meaning at the level of actual opcode
+selection.
+
This test compares emitted code against a known-good (via eyeballing)
version, so it is possible for this test to spuriously fail if other
aspects of conversion end up altering the output in innocuous ways.