deep

a Cross Development Platform for Java

User Tools

Site Tools


dev:crosscompiler:arrays

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
dev:crosscompiler:arrays [2019/07/16 12:01]
ursgraf [Multidimensional Arrays]
dev:crosscompiler:arrays [2021/07/30 12:18] (current)
ursgraf [Arrays]
Line 5: Line 5:
 The field //length// denotes the number of elements of the array (16 bit). //heap// is used for the garbage collection ([[..:rts:heap|Heap Manager and Garbage Collection]]). In between there is a byte which contains an array bit. This is used for type checking. The //P// bit is for garbage collection. It is set for arrays of primitive types\\ The field //length// denotes the number of elements of the array (16 bit). //heap// is used for the garbage collection ([[..:rts:heap|Heap Manager and Garbage Collection]]). In between there is a byte which contains an array bit. This is used for type checking. The //P// bit is for garbage collection. It is set for arrays of primitive types\\
 When accessing array elements the code generator inserts code to check if the element index is in the range 0 to //length//.\\ When accessing array elements the code generator inserts code to check if the element index is in the range 0 to //length//.\\
-If the field //length// is used in Java the Bytecode instruktion //arraylength// is used. This instruktion has to be translated such as the //length// field is accessed.+If the field //length// is used in Java the Bytecode instruktion //arraylength// is used. This instruktion has to be translated so that the //length// field is accessed.
  
 ===== Generating Arrays ===== ===== Generating Arrays =====
dev/crosscompiler/arrays.txt · Last modified: 2021/07/30 12:18 by ursgraf