1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html> 4 5 <head> 6 <title>filled-new-array/range</title> 7 <link rel=stylesheet href="opcode.css"> 8 </head> 9 10 <body> 11 12 <h1>filled-new-array/range</h1> 13 14 <h2>Purpose</h2> 15 16 <p> 17 Construct an array of the given type and size, filling it with the supplied 18 contents. Clarifications and restrictions are the same as filled-new-array, 19 described above. 20 </p> 21 22 <h2>Details</h2> 23 24 <table class="instruc"> 25 <thead> 26 <tr> 27 <th>Op & Format</th> 28 <th>Mnemonic / Syntax</th> 29 <th>Arguments</th> 30 </tr> 31 </thead> 32 <tbody> 33 <tr> 34 <td>25 3rc</td> 35 <td>filled-new-array/range {vCCCC .. vNNNN}, type@BBBB</td> 36 <td><code>A:</code> array size and argument word count (8 bits)<br/> 37 <code>B:</code> type index (16 bits)<br/> 38 <code>C:</code> first argument register (16 bits)<br/> 39 <code>N = A + C - 1</code></td> 40 </tr> 41 </tbody> 42 </table> 43 44 <h2>Constraints</h2> 45 46 <ul> 47 <li> 48 vN must be a valid register index in the current stack frame (this means 49 everything below vN is valid, too). 50 </li> 51 <li> 52 For all values I in the interval [C .. N] the following must hold: 53 <ul> 54 <li> 55 vI must not be part of a register pair 56 </li> 57 <li> 58 If the array type is a simple type, vI must be a simple type, too. 59 </li> 60 <li> 61 If the array type is a reference type, vI must be a reference type, too. 62 </li> 63 </ul> 64 </li> 65 <li> 66 B must be a valid index into the type pool. 67 </li> 68 <li> 69 The type denoted by B must be an array type. 70 </li> 71 <li> 72 The element size of the type denoted by B must be no larger than 32 bits. 73 </li> 74 </ul> 75 76 <h2>Behavior</h2> 77 78 <ul> 79 <li> 80 An attempt is made to get a reference to the type T the name of which is 81 contained in type pool entry B. 82 </li> 83 <li> 84 If T has not been loaded and resolved before, it is being loaded and 85 resolved. All exceptions that are possible during class loading can occur at 86 this point. 87 </li> 88 <li> 89 An attempt is made to create a new instance J of type T and length vA. All 90 exceptions that are possible during instantiation can occur at this point. 91 </li> 92 <li> 93 The elements of R are filled according to the following rules: 94 <ul> 95 <li> 96 J[0] = vC 97 </li> 98 <li> 99 J[1] = v(C+1) 100 </li> 101 <li> 102 ... 103 </li> 104 <li> 105 J[vA] = vN 106 </li> 107 </ul> 108 </li> 109 <li> 110 No reference to J is stored in any register. Instead, J can be accessed by a 111 move-result-object instruction immediately following this filled-new-array 112 instruction. 113 </li> 114 </ul> 115 116 <h2>Exceptions</h2> 117 118 <ul> 119 <li> 120 NegativeArraySizeException if vA < 0 121 </li> 122 </ul> 123 124 </body> 125 </html> 126