mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
fix openjdk build
This commit is contained in:
parent
8546ca5670
commit
d152f8cf74
@ -319,7 +319,7 @@ class MyClasspath : public Classpath {
|
||||
}
|
||||
|
||||
virtual void
|
||||
boot(Thread* t)
|
||||
preBoot(Thread* t)
|
||||
{
|
||||
{ object runtimeClass = resolveClass
|
||||
(t, root(t, Machine::BootLoader), "java/lang/Runtime", false);
|
||||
@ -348,6 +348,12 @@ class MyClasspath : public Classpath {
|
||||
JNI_OnLoad(reinterpret_cast< ::JavaVM*>(t->m), 0);
|
||||
}
|
||||
|
||||
virtual void
|
||||
boot(Thread*)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
|
||||
virtual const char*
|
||||
bootClasspath()
|
||||
{
|
||||
|
@ -109,6 +109,12 @@ class MyClasspath : public Classpath {
|
||||
vm::resolveNative(t, method);
|
||||
}
|
||||
|
||||
virtual void
|
||||
preBoot(Thread*)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
|
||||
virtual void
|
||||
boot(Thread*)
|
||||
{
|
||||
|
@ -639,6 +639,12 @@ class MyClasspath : public Classpath {
|
||||
vm::resolveNative(t, method);
|
||||
}
|
||||
|
||||
virtual void
|
||||
preBoot(Thread*)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
|
||||
virtual void
|
||||
boot(Thread* t)
|
||||
{
|
||||
@ -786,6 +792,47 @@ class MyClasspath : public Classpath {
|
||||
}
|
||||
}
|
||||
|
||||
virtual object
|
||||
makeDirectByteBuffer(Thread* t, void* p, jlong capacity)
|
||||
{
|
||||
object c = resolveClass
|
||||
(t, root(t, Machine::BootLoader), "java/nio/DirectByteBuffer");
|
||||
PROTECT(t, c);
|
||||
|
||||
object instance = makeNew(t, c);
|
||||
PROTECT(t, instance);
|
||||
|
||||
object constructor = resolveMethod(t, c, "<init>", "(JI)V");
|
||||
|
||||
t->m->processor->invoke
|
||||
(t, constructor, instance, reinterpret_cast<int64_t>(p),
|
||||
static_cast<int32_t>(capacity));
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
virtual void*
|
||||
getDirectBufferAddress(Thread* t, object b)
|
||||
{
|
||||
PROTECT(t, b);
|
||||
|
||||
object field = resolveField(t, objectClass(t, b), "address", "J");
|
||||
|
||||
return reinterpret_cast<void*>
|
||||
(fieldAtOffset<int64_t>(b, fieldOffset(t, field)));
|
||||
}
|
||||
|
||||
virtual int64_t
|
||||
getDirectBufferCapacity(Thread* t, object b)
|
||||
{
|
||||
PROTECT(t, b);
|
||||
|
||||
object field = resolveField
|
||||
(t, objectClass(t, b), "capacity", "I");
|
||||
|
||||
return fieldAtOffset<int32_t>(b, fieldOffset(t, field));
|
||||
}
|
||||
|
||||
virtual void
|
||||
dispose()
|
||||
{
|
||||
|
@ -3513,7 +3513,7 @@ boot(Thread* t, uintptr_t*)
|
||||
|
||||
setRoot(t, Machine::Shutdown, makeThrowable(t, Machine::ThrowableType));
|
||||
|
||||
t->m->classpath->boot(t);
|
||||
t->m->classpath->preBoot(t);
|
||||
|
||||
t->javaThread = t->m->classpath->makeThread(t, 0);
|
||||
|
||||
@ -3523,6 +3523,8 @@ boot(Thread* t, uintptr_t*)
|
||||
|
||||
threadDaemon(t, root(t, Machine::FinalizerThread)) = true;
|
||||
|
||||
t->m->classpath->boot(t);
|
||||
|
||||
enter(t, Thread::IdleState);
|
||||
|
||||
return 1;
|
||||
|
@ -1561,6 +1561,9 @@ class Classpath {
|
||||
virtual void
|
||||
resolveNative(Thread* t, object method) = 0;
|
||||
|
||||
virtual void
|
||||
preBoot(Thread* t) = 0;
|
||||
|
||||
virtual void
|
||||
boot(Thread* t) = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user