backport GC safety fixes from gnu branch

This commit is contained in:
Joel Dice 2009-07-20 14:32:25 -06:00
parent 47ab980550
commit afdab27e02
2 changed files with 5 additions and 1 deletions

View File

@ -5984,9 +5984,11 @@ class MyProcessor: public Processor {
virtual void
initVtable(Thread* t, object c)
{
PROTECT(t, c);
for (int i = classLength(t, c) - 1; i >= 0; --i) {
classVtable(t, c, i) = reinterpret_cast<void*>
void* thunk = reinterpret_cast<void*>
(virtualThunk(static_cast<MyThread*>(t), i));
classVtable(t, c, i) = thunk;
}
}

View File

@ -2439,6 +2439,8 @@ parseClass(Thread* t, const uint8_t* data, unsigned size)
classLoader(t, class_),
vtableLength);
PROTECT(t, real);
t->m->processor->initVtable(t, real);
updateClassTables(t, real, class_);