diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:43:57 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:43:57 -0800 |
| commit | 5d709784bbf5001012d7f25172927d46f6c1abe1 (patch) | |
| tree | a49c3dafdeed5037e5ad85aba23e5666b1faf57d /docs/dalvik-bytecode.html | |
| parent | bcd637a94f10b49d18b87a74a015f9d3453ed77a (diff) | |
| download | android_dalvik-5d709784bbf5001012d7f25172927d46f6c1abe1.tar.gz android_dalvik-5d709784bbf5001012d7f25172927d46f6c1abe1.tar.bz2 android_dalvik-5d709784bbf5001012d7f25172927d46f6c1abe1.zip | |
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'docs/dalvik-bytecode.html')
| -rw-r--r-- | docs/dalvik-bytecode.html | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/docs/dalvik-bytecode.html b/docs/dalvik-bytecode.html index 28e6fb48d..2bbffe6b0 100644 --- a/docs/dalvik-bytecode.html +++ b/docs/dalvik-bytecode.html @@ -24,15 +24,17 @@ such as (but not limited to) the program counter and a reference to the <code>.dex</code> file that contains the method. </li> - <li>The <i>N</i> arguments to a method land in the last <i>N</i> registers - of the method's invocation frame. - </li> <li>Registers are 32 bits wide. Adjacent register pairs are used for 64-bit values. </li> <li>In terms of bitwise representation, <code>(Object) null == (int) 0</code>. </li> + <li>The <i>N</i> arguments to a method land in the last <i>N</i> registers + of the method's invocation frame, in order. Wide arguments consume + two registers. Instance methods are passed a <code>this</code> reference + as their first argument. + </li> </ul> <li>The storage unit in the instruction stream is a 16-bit unsigned quantity. Some bits in some instructions are ignored / must-be-zero. @@ -385,9 +387,13 @@ <td>check-cast vAA, type@BBBB</td> <td><code>A:</code> reference-bearing register (8 bits)<br/> <code>B:</code> type index (16 bits)</td> - <td>Throw if the reference in the given register cannot be cast to the - indicated type. The type must be a reference type (not a primitive - type).</td> + <td>Throw a <code>ClassCastException</code> if the reference in the + given register cannot be cast to the indicated type. + <p><b>Note:</b> Since <code>A</code> must always be a reference + (and not a primitive value), this will necessarily fail at runtime + (that is, it will throw an exception) if <code>B</code> refers to a + primitive type.</p> + </td> </tr> <tr> <td>20 22c</td> @@ -397,8 +403,11 @@ <code>C:</code> type index (16 bits)</td> <td>Store in the given destination register <code>1</code> if the indicated reference is an instance of the given type, - or <code>0</code> if not. The type must be a - reference type (not a primitive type).</td> + or <code>0</code> if not. + <p><b>Note:</b> Since <code>B</code> must always be a reference + (and not a primitive value), this will always result + in <code>0</code> being stored if <code>C</code> refers to a primitive + type.</td> </tr> <tr> <td>21 12x</td> @@ -462,7 +471,9 @@ </td> <td>Fill the given array with the indicated data. The reference must be to an array of primitives, and the data table must match it in type and - size. + must contain no more elements than will fit in the array. That is, + the array may be larger than the table, and if so, only the initial + elements of the array are set, leaving the remainder alone. </td> </tr> <tr> |
