124 MyValue1 v = MyValue1.createDefaultInline(); 125 test5(v); 126 } 127 */ 128 129 // Test hashCode() method 130 @Test() 131 public int test6(MyValue1 v) { 132 return v.hashCode(); 133 } 134 135 @DontCompile 136 public void test6_verifier(boolean warmup) { 137 MyValue1 v = MyValue1.createWithFieldsInline(rI, rL); 138 int res = test6(v); 139 Asserts.assertEQ(res, v.hashCode()); 140 } 141 142 // Test default value type array creation via reflection 143 @Test() 144 public Object[] test7(Class<?> componentType, int len, long hash) { 145 Object[] va = (Object[])Array.newInstance(componentType, len); 146 return va; 147 } 148 149 @DontCompile 150 public void test7_verifier(boolean warmup) { 151 int len = Math.abs(rI) % 42; 152 long hash = MyValue1.createDefaultDontInline().hashPrimitive(); 153 Object[] va = test7(MyValue1.class, len, hash); 154 for (int i = 0; i < len; ++i) { 155 Asserts.assertEQ(((MyValue1)va[i]).hashPrimitive(), hash); 156 } 157 } 158 159 // Class.isInstance 160 @Test() 161 public boolean test8(Class c, MyValue1 vt) { 162 return c.isInstance(vt); 163 } 164 165 @DontCompile 166 public void test8_verifier(boolean warmup) { 167 MyValue1 vt = MyValue1.createWithFieldsInline(rI, rL); 168 boolean result = test8(MyValue1.class, vt); 169 Asserts.assertTrue(result); 170 } 171 172 @Test() 173 public boolean test9(Class c, MyValue1 vt) { | 124 MyValue1 v = MyValue1.createDefaultInline(); 125 test5(v); 126 } 127 */ 128 129 // Test hashCode() method 130 @Test() 131 public int test6(MyValue1 v) { 132 return v.hashCode(); 133 } 134 135 @DontCompile 136 public void test6_verifier(boolean warmup) { 137 MyValue1 v = MyValue1.createWithFieldsInline(rI, rL); 138 int res = test6(v); 139 Asserts.assertEQ(res, v.hashCode()); 140 } 141 142 // Test default value type array creation via reflection 143 @Test() 144 public Object[] test7(Class<?> componentType, int len) { 145 Object[] va = (Object[])Array.newInstance(componentType, len); 146 return va; 147 } 148 149 @DontCompile 150 public void test7_verifier(boolean warmup) { 151 int len = Math.abs(rI) % 42; 152 long hash = MyValue1.createDefaultDontInline().hashPrimitive(); 153 Object[] va = test7(MyValue1.class, len); 154 for (int i = 0; i < len; ++i) { 155 Asserts.assertEQ(((MyValue1)va[i]).hashPrimitive(), hash); 156 } 157 } 158 159 // Class.isInstance 160 @Test() 161 public boolean test8(Class c, MyValue1 vt) { 162 return c.isInstance(vt); 163 } 164 165 @DontCompile 166 public void test8_verifier(boolean warmup) { 167 MyValue1 vt = MyValue1.createWithFieldsInline(rI, rL); 168 boolean result = test8(MyValue1.class, vt); 169 Asserts.assertTrue(result); 170 } 171 172 @Test() 173 public boolean test9(Class c, MyValue1 vt) { |