mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
implement Unsafe.{put|get}Char
This commit is contained in:
parent
af9e162827
commit
b1840a297d
@ -2699,6 +2699,16 @@ Avian_sun_misc_Unsafe_getShort__Ljava_lang_Object_2J
|
|||||||
return fieldAtOffset<int16_t>(o, offset);
|
return fieldAtOffset<int16_t>(o, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" JNIEXPORT int64_t JNICALL
|
||||||
|
Avian_sun_misc_Unsafe_getChar__Ljava_lang_Object_2J
|
||||||
|
(Thread*, object, uintptr_t* arguments)
|
||||||
|
{
|
||||||
|
object o = reinterpret_cast<object>(arguments[1]);
|
||||||
|
int64_t offset; memcpy(&offset, arguments + 2, 8);
|
||||||
|
|
||||||
|
return fieldAtOffset<uint16_t>(o, offset);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT int64_t JNICALL
|
extern "C" JNIEXPORT int64_t JNICALL
|
||||||
Avian_sun_misc_Unsafe_getInt__Ljava_lang_Object_2J
|
Avian_sun_misc_Unsafe_getInt__Ljava_lang_Object_2J
|
||||||
(Thread*, object, uintptr_t* arguments)
|
(Thread*, object, uintptr_t* arguments)
|
||||||
@ -2805,6 +2815,17 @@ Avian_sun_misc_Unsafe_putShort__Ljava_lang_Object_2JS
|
|||||||
fieldAtOffset<int16_t>(o, offset) = value;
|
fieldAtOffset<int16_t>(o, offset) = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" JNIEXPORT void JNICALL
|
||||||
|
Avian_sun_misc_Unsafe_putChar__Ljava_lang_Object_2JC
|
||||||
|
(Thread*, object, uintptr_t* arguments)
|
||||||
|
{
|
||||||
|
object o = reinterpret_cast<object>(arguments[1]);
|
||||||
|
int64_t offset; memcpy(&offset, arguments + 2, 8);
|
||||||
|
uint16_t value = arguments[4];
|
||||||
|
|
||||||
|
fieldAtOffset<uint16_t>(o, offset) = value;
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT void JNICALL
|
extern "C" JNIEXPORT void JNICALL
|
||||||
Avian_sun_misc_Unsafe_putInt__Ljava_lang_Object_2JI
|
Avian_sun_misc_Unsafe_putInt__Ljava_lang_Object_2JI
|
||||||
(Thread*, object, uintptr_t* arguments)
|
(Thread*, object, uintptr_t* arguments)
|
||||||
|
Loading…
Reference in New Issue
Block a user