This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:crosscompiler:arrays [2015/03/29 09:46] – [Multidimensional Arrays] ursgraf | dev:crosscompiler:arrays [2016/02/25 13:33] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 81: | Line 81: | ||
etc. | etc. | ||
</ | </ | ||
- | The problem with the first case is, that only the type descriptor //[[I// would be linked. However, //[I// must be created as well. Im Heapmanager muss die Methode | + | The problem with the first case is, that only the type descriptor //[[I// would be linked. However, //[I// must be created as well. In the method |
- | Die gleichen Überlegungen gelten auch für Arrays mit höheren Dimensionen. Auch dort wird // | + | Similar thoughts are true for arrays with higher dimensions. As well, the instruction |
==== Generating an Multidimensional Array of Objects ==== | ==== Generating an Multidimensional Array of Objects ==== | ||
- | Hier gelten grundsätzlich die gleichen Bedingungen wie oben. | + | Here, the same conditions are true as described above. |
- | Der folgende Javacode | + | |
<code java> | <code java> | ||
ClassA[][][] a1 = new ClassA[3][2][2]; | ClassA[][][] a1 = new ClassA[3][2][2]; | ||
</ | </ | ||
- | wird in den Bytecode | + | This leads to Bytecode |
< | < | ||
0 iconst_3 | 0 iconst_3 | ||
Line 97: | Line 96: | ||
7 astore_1 [a1] | 7 astore_1 [a1] | ||
</ | </ | ||
- | übersetzt. Hier wird also bereits also bereits die korrekte Referenz auf // | + | The reference to // |