chars[0] = 65535;
assertEquals(65535, chars[0]); // Do an update between the two max value updates, to avoid // optimizing the second away.
chars[index] = 0;
assertEquals(0, chars[index]);
chars[index] = 65535;
assertEquals(65535, chars[index]);
Object o1 = new Object();
objects[0] = o1;
assertEquals(o1, objects[0]);
Object o2 = new Object();
objects[index] = o2;
assertEquals(o2, objects[index]); // Longs are initially not supported in the linear scan register allocator // on 32bits. So we call out a long helper to ensure this method gets // optimized.
$opt$testLongWrites(longs, index);
float f = 1.0F;
floats[0] = f / (1 | 0);
assertEquals(f, floats[0]);
floats[index] = f / (1 | 0);
assertEquals(f, floats[index]);
double d = 1.0F;
doubles[0] = d / (1 | 0);
assertEquals(d, doubles[0]);
doubles[index] = d / (1 | 0);
assertEquals(d, doubles[index]);
}
publicstaticvoid $opt$testLongWrites(long[] longs, int index) { long l = -21876876876876876L;
longs[0] = l;
assertEquals(l, longs[0]);
l = -21876876876876877L;
longs[index] = l;
assertEquals(l, longs[index]);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.