mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
progress towards cross-architecture bootimage builds
This monster commit is the first step towards supporting cross-architecture bootimage builds. The challenge is to build a heap and code image for the target platform where the word size and endianess may differ from those of the build architecture. That means the memory layout of objects may differ due to alignment and size differences, so we can't just copy objects into the heap image unchanged; we must copy field by field, resizing values, reversing endianess and shifting offsets as necessary. This commit also removes POD (plain old data) type support from the type generator because it added a lot of complication and little value.
This commit is contained in:
@ -665,7 +665,7 @@ store(Thread* t, unsigned index)
|
||||
BytesPerWord * 2);
|
||||
}
|
||||
|
||||
ExceptionHandler*
|
||||
uint64_t
|
||||
findExceptionHandler(Thread* t, object method, unsigned ip)
|
||||
{
|
||||
PROTECT(t, method);
|
||||
@ -674,7 +674,7 @@ findExceptionHandler(Thread* t, object method, unsigned ip)
|
||||
|
||||
if (eht) {
|
||||
for (unsigned i = 0; i < exceptionHandlerTableLength(t, eht); ++i) {
|
||||
ExceptionHandler* eh = exceptionHandlerTableBody(t, eht, i);
|
||||
uint64_t eh = exceptionHandlerTableBody(t, eht, i);
|
||||
|
||||
if (ip - 1 >= exceptionHandlerStart(eh)
|
||||
and ip - 1 < exceptionHandlerEnd(eh))
|
||||
@ -708,7 +708,7 @@ findExceptionHandler(Thread* t, object method, unsigned ip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ExceptionHandler*
|
||||
uint64_t
|
||||
findExceptionHandler(Thread* t, int frame)
|
||||
{
|
||||
return findExceptionHandler(t, frameMethod(t, frame), frameIp(t, frame));
|
||||
@ -2673,7 +2673,7 @@ interpret3(Thread* t, const int base)
|
||||
|
||||
pokeInt(t, t->frame + FrameIpOffset, t->ip);
|
||||
for (; frame >= base; popFrame(t)) {
|
||||
ExceptionHandler* eh = findExceptionHandler(t, frame);
|
||||
uint64_t eh = findExceptionHandler(t, frame);
|
||||
if (eh) {
|
||||
sp = frame + FrameFootprint;
|
||||
ip = exceptionHandlerIp(eh);
|
||||
|
Reference in New Issue
Block a user