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>const-class</title> 7<link rel=stylesheet href="opcode.css"> 8</head> 9 10<body> 11 12<h1>const-class</h1> 13 14<h2>Purpose</h2> 15 16<p> 17Move a reference to the class specified by the given index into the specified 18register. In the case where the indicated type is primitive, this will store a 19reference to the primitive type's degenerate class. 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>1c 21c</td> 35 <td>const-class vAA, type@BBBB</td> 36 <td><code>A:</code> destination register (8 bits)<br/> 37 <code>B:</code> type index</td> 38</tr> 39</tbody> 40</table> 41 42<h2>Constraints</h2> 43 44<ul> 45 <li> 46 A must be a valid register index in the current stack frame. 47 </li> 48 <li> 49 B must be a valid index into the type constant pool. 50 </li> 51</ul> 52 53<h2>Behavior</h2> 54 55<ul> 56 <li> 57 An attempt is made to get a reference to the class C the name of which is 58 contained in type pool entry B. 59 </li> 60 <li> 61 If B refers to a primitive type, the corresponding degenerate class is used 62 instead. 63 </li> 64 <li> 65 If C has not been loaded and resolved before, it is being loaded and 66 resolved. All exceptions that are possible during class loading can occur at 67 this point. 68 </li> 69 <li> 70 A reference to C is moved into register vA, that is, vA' = C. 71 </li> 72 <li> 73 If v(A-1) is the lower half of a register pair, v(A-1)' becomes undefined. 74 </li> 75 <li> 76 If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined. 77 </li> 78</ul> 79 80<h2>Exceptions</h2> 81 82<ul> 83 <li> 84 ClassNotFoundException is thrown if the class does not exist at all. 85 </li> 86 <li> 87 VerifyError is thrown if the class does exist, but could not be verified. 88 </li> 89</ul> 90 91</body> 92</html> 93