mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
ensure that array classes implement Cloneable and Serializable in bootimage build
This commit is contained in:
parent
96a4b6e508
commit
3309a9f4ad
@ -2650,6 +2650,20 @@ nameClass(Thread* t, Machine::Type type, const char* name)
|
|||||||
set(t, arrayBody(t, t->m->types, type), ClassName, n);
|
set(t, arrayBody(t, t->m->types, type), ClassName, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
makeArrayInterfaceTable(Thread* t)
|
||||||
|
{
|
||||||
|
object interfaceTable = makeArray(t, 4);
|
||||||
|
|
||||||
|
set(t, interfaceTable, ArrayBody, type
|
||||||
|
(t, Machine::SerializableType));
|
||||||
|
|
||||||
|
set(t, interfaceTable, ArrayBody + (2 * BytesPerWord),
|
||||||
|
type(t, Machine::CloneableType));
|
||||||
|
|
||||||
|
setRoot(t, Machine::ArrayInterfaceTable, interfaceTable);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
boot(Thread* t)
|
boot(Thread* t)
|
||||||
{
|
{
|
||||||
@ -2761,15 +2775,7 @@ boot(Thread* t)
|
|||||||
|
|
||||||
setRoot(t, Machine::StringMap, makeWeakHashMap(t, 0, 0));
|
setRoot(t, Machine::StringMap, makeWeakHashMap(t, 0, 0));
|
||||||
|
|
||||||
{ object interfaceTable = makeArray(t, 4);
|
makeArrayInterfaceTable(t);
|
||||||
|
|
||||||
set(t, interfaceTable, ArrayBody, type(t, Machine::SerializableType));
|
|
||||||
|
|
||||||
set(t, interfaceTable, ArrayBody + (2 * BytesPerWord),
|
|
||||||
type(t, Machine::CloneableType));
|
|
||||||
|
|
||||||
setRoot(t, Machine::ArrayInterfaceTable, interfaceTable);
|
|
||||||
}
|
|
||||||
|
|
||||||
set(t, type(t, Machine::BooleanArrayType), ClassInterfaceTable,
|
set(t, type(t, Machine::BooleanArrayType), ClassInterfaceTable,
|
||||||
root(t, Machine::ArrayInterfaceTable));
|
root(t, Machine::ArrayInterfaceTable));
|
||||||
@ -3228,6 +3234,7 @@ Thread::init()
|
|||||||
|
|
||||||
if (image and code) {
|
if (image and code) {
|
||||||
m->processor->boot(this, image, code);
|
m->processor->boot(this, image, code);
|
||||||
|
makeArrayInterfaceTable(this);
|
||||||
} else {
|
} else {
|
||||||
boot(this);
|
boot(this);
|
||||||
}
|
}
|
||||||
|
@ -250,5 +250,11 @@ public class Misc {
|
|||||||
μInstance.μMethod(8933);
|
μInstance.μMethod(8933);
|
||||||
expect(μInstance.μField == 8933);
|
expect(μInstance.μField == 8933);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expect(new int[0] instanceof Cloneable);
|
||||||
|
expect(new int[0] instanceof java.io.Serializable);
|
||||||
|
|
||||||
|
expect(new Object[0] instanceof Cloneable);
|
||||||
|
expect(new Object[0] instanceof java.io.Serializable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user