mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
various bugfixes
This commit is contained in:
parent
d11af47dca
commit
af59c85deb
@ -255,9 +255,9 @@ vmInvoke_returnAddress:
|
||||
je LOCAL(vmInvoke_exit)
|
||||
|
||||
movl CONTINUATION_LENGTH(%ecx),%esi
|
||||
shll $3,%esi
|
||||
shll $2,%esi
|
||||
subl %esi,%esp
|
||||
subl $48,%esp
|
||||
subl $16,%esp
|
||||
|
||||
leal CONTINUATION_BODY(%ecx),%edi
|
||||
|
||||
@ -269,8 +269,8 @@ vmInvoke_returnAddress:
|
||||
|
||||
LOCAL(vmInvoke_continuationLoop):
|
||||
movl (%edi,%edx,1),%eax
|
||||
movl %eax,(%esp,%edx,1)
|
||||
addl $8,%edx
|
||||
movl %eax,8(%esp,%edx,1)
|
||||
addl $4,%edx
|
||||
|
||||
LOCAL(vmInvoke_continuationTest):
|
||||
cmpl %esi,%edx
|
||||
|
@ -5476,6 +5476,12 @@ callContinuation(MyThread* t, object continuation, object result,
|
||||
|
||||
if (method) {
|
||||
rewindMethod(t) = method;
|
||||
|
||||
compile(t, ::codeAllocator(t), 0, method);
|
||||
|
||||
if (UNLIKELY(t->exception)) {
|
||||
action = Throw;
|
||||
}
|
||||
} else {
|
||||
object message = makeString
|
||||
(t, "%s %s not found in %s",
|
||||
@ -5795,6 +5801,15 @@ class MyProcessor: public Processor {
|
||||
MyThread(m, javaThread, static_cast<MyThread*>(parent));
|
||||
t->init();
|
||||
|
||||
if (false) {
|
||||
fprintf(stderr, "%d\n", difference(&(t->continuation), t));
|
||||
fprintf(stderr, "%d\n", difference(&(t->exception), t));
|
||||
fprintf(stderr, "%d\n", difference(&(t->exceptionStack), t));
|
||||
fprintf(stderr, "%d\n", difference(&(t->exceptionOffset), t));
|
||||
fprintf(stderr, "%d\n", difference(&(t->exceptionHandler), t));
|
||||
exit(0);
|
||||
}
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
@ -6268,11 +6283,13 @@ class MyProcessor: public Processor {
|
||||
const char* const methodName = "wind";
|
||||
const char* const methodSpec
|
||||
= "(Ljava/lang/Runnable;Ljava/util/concurrent/Callable;"
|
||||
"Ljava/lang/Runnable;)Ljava/lang/Object;";
|
||||
"Ljava/lang/Runnable;)Lavian/Continuations$UnwindResult;";
|
||||
|
||||
windMethod = resolveMethod(t, className, methodName, methodSpec);
|
||||
|
||||
if (windMethod == 0) {
|
||||
if (windMethod) {
|
||||
compile(t, ::codeAllocator(t), 0, windMethod);
|
||||
} else {
|
||||
object message = makeString
|
||||
(t, "%s %s not found in %s", methodName, methodSpec, className);
|
||||
t->exception = makeNoSuchMethodError(t, message);
|
||||
|
Loading…
Reference in New Issue
Block a user