mirror of
https://github.com/corda/corda.git
synced 2025-02-05 10:39:13 +00:00
more build fixes
This commit is contained in:
parent
2176c32cee
commit
48e49f1fa1
@ -65,6 +65,7 @@ class System {
|
|||||||
virtual void* allocate(unsigned size) = 0;
|
virtual void* allocate(unsigned size) = 0;
|
||||||
virtual void zero(void*, unsigned size) = 0;
|
virtual void zero(void*, unsigned size) = 0;
|
||||||
virtual void free(void*) = 0;
|
virtual void free(void*) = 0;
|
||||||
|
virtual void copy(void* src, void* dst, unsigned size);
|
||||||
virtual Status start(Thread*) = 0;
|
virtual Status start(Thread*) = 0;
|
||||||
virtual Status make(Monitor**) = 0;
|
virtual Status make(Monitor**) = 0;
|
||||||
virtual Status open(File**, const char* path, int flags, int mode) = 0;
|
virtual Status open(File**, const char* path, int flags, int mode) = 0;
|
||||||
|
35
src/vm.cpp
35
src/vm.cpp
@ -1062,8 +1062,8 @@ run(Thread* t)
|
|||||||
|
|
||||||
parameterCount = methodParameterCount(method);
|
parameterCount = methodParameterCount(method);
|
||||||
if (t->stack[t->sp - parameterCount]) {
|
if (t->stack[t->sp - parameterCount]) {
|
||||||
t->code = methodCode
|
t->code = findInterfaceMethod
|
||||||
(findInterfaceMethod(t, method, t->stack[t->sp - parameterCount]));
|
(t, method, t->stack[t->sp - parameterCount]);
|
||||||
if (t->exception) goto throw_;
|
if (t->exception) goto throw_;
|
||||||
|
|
||||||
goto invoke;
|
goto invoke;
|
||||||
@ -1084,11 +1084,11 @@ run(Thread* t)
|
|||||||
parameterCount = methodParameterCount(method);
|
parameterCount = methodParameterCount(method);
|
||||||
if (t->stack[t->sp - parameterCount]) {
|
if (t->stack[t->sp - parameterCount]) {
|
||||||
if (isSpecialMethod(method, t->stack[t->sp - parameterCount])) {
|
if (isSpecialMethod(method, t->stack[t->sp - parameterCount])) {
|
||||||
t->code = methodCode
|
t->code = findSpecialMethod
|
||||||
(findSpecialMethod(t, method, t->stack[t->sp - parameterCount]));
|
(t, method, t->stack[t->sp - parameterCount]);
|
||||||
if (t->exception) goto throw_;
|
if (t->exception) goto throw_;
|
||||||
} else {
|
} else {
|
||||||
t->code = methodCode(t, method);
|
t->code = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto invoke;
|
goto invoke;
|
||||||
@ -1114,7 +1114,7 @@ run(Thread* t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameterCount = methodParameterCount(method);
|
parameterCount = methodParameterCount(method);
|
||||||
t->code = methodCode(t, method);
|
t->code = method;
|
||||||
} goto invoke;
|
} goto invoke;
|
||||||
|
|
||||||
case invokevirtual: {
|
case invokevirtual: {
|
||||||
@ -1127,8 +1127,7 @@ run(Thread* t)
|
|||||||
|
|
||||||
parameterCount = methodParameterCount(method);
|
parameterCount = methodParameterCount(method);
|
||||||
if (t->stack[t->sp - parameterCount]) {
|
if (t->stack[t->sp - parameterCount]) {
|
||||||
t->code = methodCode
|
t->code = findVirtualMethod(t, method, t->stack[t->sp - parameterCount]);
|
||||||
(t, findVirtualMethod(t, method, t->stack[t->sp - parameterCount]));
|
|
||||||
if (t->exception) goto throw_;
|
if (t->exception) goto throw_;
|
||||||
|
|
||||||
goto invoke;
|
goto invoke;
|
||||||
@ -1626,18 +1625,19 @@ run(Thread* t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
invoke:
|
invoke:
|
||||||
if (codeMaxStack(t, t->code) + t->sp - parameterCount > Thread::StackSize) {
|
if (codeMaxStack(t, methodCode(t, t->code)) + t->sp - parameterCount
|
||||||
|
> Thread::StackSize)
|
||||||
|
{
|
||||||
t->exception = makeStackOverflowException(t, 0);
|
t->exception = makeStackOverflowException(t, 0);
|
||||||
goto throw_;
|
goto throw_;
|
||||||
}
|
}
|
||||||
|
|
||||||
frameIp(t, t->frame) = ip;
|
frameIp(t, t->frame) = ip;
|
||||||
|
|
||||||
t->frame = makeFrame(t, t->code, t->frame);
|
|
||||||
memcpy(frameLocals(t, t->frame),
|
|
||||||
t->stack + t->sp - parameterCount,
|
|
||||||
parameterCount);
|
|
||||||
t->sp -= parameterCount;
|
t->sp -= parameterCount;
|
||||||
|
t->frame = makeFrame(t, t->code, t->frame, 0, t->sp,
|
||||||
|
codeMaxLocals(t, methodCode(t, t->code)));
|
||||||
|
t->vm->sys->copy(t->stack + t->sp, frameLocals(t, t->frame), parameterCount);
|
||||||
ip = 0;
|
ip = 0;
|
||||||
goto loop;
|
goto loop;
|
||||||
|
|
||||||
@ -1646,8 +1646,8 @@ run(Thread* t)
|
|||||||
t->code = methodCode(t, frameMethod(t, t->frame));
|
t->code = methodCode(t, frameMethod(t, t->frame));
|
||||||
object eht = codeExceptionHandlerTable(t, t->code);
|
object eht = codeExceptionHandlerTable(t, t->code);
|
||||||
if (eht) {
|
if (eht) {
|
||||||
for (unsigned i = 0; i < exceptionHandleTableLength(t, eht); ++i) {
|
for (unsigned i = 0; i < exceptionHandlerTableLength(t, eht); ++i) {
|
||||||
ExceptionHandler* eh = exceptionHandlerTableBody(t, eht)[i];
|
ExceptionHandler* eh = exceptionHandlerTableBody(t, eht, i);
|
||||||
uint16_t catchType = exceptionHandlerCatchType(eh);
|
uint16_t catchType = exceptionHandlerCatchType(eh);
|
||||||
if (catchType == 0 or
|
if (catchType == 0 or
|
||||||
instanceOf(rawArrayBody(t, codePool(t, t->code))[catchType],
|
instanceOf(rawArrayBody(t, codePool(t, t->code))[catchType],
|
||||||
@ -1663,8 +1663,9 @@ run(Thread* t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
t->code = defaultExceptionHandler(t);
|
object method = defaultExceptionHandler(t);
|
||||||
t->frame = makeFrame(t, t->code);
|
t->code = methodCode(t, method);
|
||||||
|
t->frame = makeFrame(t, method, 0, 0, 0, codeMaxLocals(t, t->code));
|
||||||
t->sp = 0;
|
t->sp = 0;
|
||||||
ip = 0;
|
ip = 0;
|
||||||
push(t, t->exception);
|
push(t, t->exception);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user