update Context::executableSize after allocating objectPool

This ensures that, if an exception is thrown later but before the
method has been fully compiled, we will know exactly how much memory
to free.  Previously, we would abort when trying to free the wrong
amount due to an assertion failure.
This commit is contained in:
Joel Dice 2013-04-09 18:43:46 -06:00
parent 8c1419fb89
commit 49d8ccb1bd

View File

@ -7307,6 +7307,9 @@ finish(MyThread* t, FixedAllocator* allocator, Context* context)
FixedSizeOfArray + ((context->objectPoolCount + 1) * BytesPerWord),
true);
context->executableSize = (allocator->base + allocator->offset)
- static_cast<uint8_t*>(context->executableStart);
initArray(t, pool, context->objectPoolCount + 1);
mark(t, pool, 0);