mirror of
https://github.com/corda/corda.git
synced 2025-04-27 22:39:44 +00:00
backport getstatic/putstatic optimization from compiler branch
This commit is contained in:
parent
f49174da28
commit
1d7b00baff
@ -2457,10 +2457,14 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip,
|
|||||||
Operand* table;
|
Operand* table;
|
||||||
|
|
||||||
if (instruction == getstatic) {
|
if (instruction == getstatic) {
|
||||||
c->indirectCall
|
if ((classVmFlags(t, fieldClass(t, field)) & NeedInitFlag)
|
||||||
(c->constant(reinterpret_cast<intptr_t>(tryInitClass)),
|
and (classVmFlags(t, fieldClass(t, field)) & InitFlag) == 0)
|
||||||
frame->trace(0, false),
|
{
|
||||||
2, c->thread(), frame->append(fieldClass(t, field)));
|
c->indirectCall
|
||||||
|
(c->constant(reinterpret_cast<intptr_t>(tryInitClass)),
|
||||||
|
frame->trace(0, false),
|
||||||
|
2, c->thread(), frame->append(fieldClass(t, field)));
|
||||||
|
}
|
||||||
|
|
||||||
table = frame->append(classStaticTable(t, fieldClass(t, field)));
|
table = frame->append(classStaticTable(t, fieldClass(t, field)));
|
||||||
} else {
|
} else {
|
||||||
@ -3408,10 +3412,14 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip,
|
|||||||
object staticTable = 0;
|
object staticTable = 0;
|
||||||
|
|
||||||
if (instruction == putstatic) {
|
if (instruction == putstatic) {
|
||||||
c->indirectCall
|
if ((classVmFlags(t, fieldClass(t, field)) & NeedInitFlag)
|
||||||
(c->constant(reinterpret_cast<intptr_t>(tryInitClass)),
|
and (classVmFlags(t, fieldClass(t, field)) & InitFlag) == 0)
|
||||||
frame->trace(0, false),
|
{
|
||||||
2, c->thread(), frame->append(fieldClass(t, field)));
|
c->indirectCall
|
||||||
|
(c->constant(reinterpret_cast<intptr_t>(tryInitClass)),
|
||||||
|
frame->trace(0, false),
|
||||||
|
2, c->thread(), frame->append(fieldClass(t, field)));
|
||||||
|
}
|
||||||
|
|
||||||
staticTable = classStaticTable(t, fieldClass(t, field));
|
staticTable = classStaticTable(t, fieldClass(t, field));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user