From 2800ffe82645b450b70a7580399fd8eb6f673965 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Fri, 8 Nov 2013 08:35:10 -0700 Subject: [PATCH] rename JNIEXPORT to AVIAN_EXPORT in common.h, to avoid conflicting with jni.h --- include/avian/vm/system/system.h | 2 +- src/avian/common.h | 5 +- src/avian/finder.h | 2 +- src/avian/machine.h | 6 +- src/builtin.cpp | 114 ++++---- src/classpath-android.cpp | 180 ++++++------ src/classpath-avian.cpp | 92 +++--- src/classpath-openjdk.cpp | 488 +++++++++++++++---------------- src/finder.cpp | 2 +- src/jnienv.cpp | 6 +- src/machine.cpp | 6 +- src/vm/system/posix.cpp | 2 +- src/vm/system/windows.cpp | 2 +- 13 files changed, 453 insertions(+), 454 deletions(-) diff --git a/include/avian/vm/system/system.h b/include/avian/vm/system/system.h index cbdc0ddeff..014b288a60 100644 --- a/include/avian/vm/system/system.h +++ b/include/avian/vm/system/system.h @@ -192,7 +192,7 @@ sysAbort(System* s) // #endif // not NDEBUG -JNIEXPORT System* +AVIAN_EXPORT System* makeSystem(const char* crashDumpDirectory); } // namespace vm diff --git a/src/avian/common.h b/src/avian/common.h index daff4d9c84..f46e523699 100644 --- a/src/avian/common.h +++ b/src/avian/common.h @@ -142,12 +142,11 @@ typedef intptr_t __attribute__((__may_alias__)) intptr_alias_t; #endif // not _MSC_VER -#undef JNIEXPORT #ifdef PLATFORM_WINDOWS -# define JNIEXPORT __declspec(dllexport) +# define AVIAN_EXPORT __declspec(dllexport) # define PATH_SEPARATOR ';' #else // not PLATFORM_WINDOWS -# define JNIEXPORT __attribute__ ((visibility("default"))) \ +# define AVIAN_EXPORT __attribute__ ((visibility("default"))) \ __attribute__ ((used)) # define PATH_SEPARATOR ':' #endif // not PLATFORM_WINDOWS diff --git a/src/avian/finder.h b/src/avian/finder.h index c7fdbd547b..08d2c061ca 100644 --- a/src/avian/finder.h +++ b/src/avian/finder.h @@ -174,7 +174,7 @@ class Finder { virtual void dispose() = 0; }; -JNIEXPORT Finder* +AVIAN_EXPORT Finder* makeFinder(System* s, Allocator* a, const char* path, const char* bootLibrary); Finder* diff --git a/src/avian/machine.h b/src/avian/machine.h index 3ae45687b7..a2d05facd8 100644 --- a/src/avian/machine.h +++ b/src/avian/machine.h @@ -2699,10 +2699,10 @@ popResources(Thread* t); } // namespace vm -JNIEXPORT void +AVIAN_EXPORT void vmPrintTrace(vm::Thread* t); -JNIEXPORT void +AVIAN_EXPORT void vmfPrintTrace(vm::Thread* t, FILE* out); namespace vm { @@ -3971,7 +3971,7 @@ errorLog(Thread* t) } // namespace vm -JNIEXPORT void* +AVIAN_EXPORT void* vmAddressFromLine(vm::Thread* t, vm::object m, unsigned line); #endif//MACHINE_H diff --git a/src/builtin.cpp b/src/builtin.cpp index 7fda369dbf..984e1e5f32 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -50,7 +50,7 @@ resolveSystemClassThrow(Thread* t, object loader, object spec) } // namespace -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Classes_initialize (Thread* t, object, uintptr_t* arguments) { @@ -59,21 +59,21 @@ Avian_avian_Classes_initialize initClass(t, this_); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Classes_acquireClassLock (Thread* t, object, uintptr_t*) { acquire(t, t->m->classLock); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Classes_releaseClassLock (Thread* t, object, uintptr_t*) { release(t, t->m->classLock); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Classes_resolveVMClass (Thread* t, object, uintptr_t* arguments) { @@ -84,7 +84,7 @@ Avian_avian_Classes_resolveVMClass (resolveClass(t, loader, spec, true, Machine::ClassNotFoundExceptionType)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Classes_defineVMClass (Thread* t, object, uintptr_t* arguments) { @@ -104,7 +104,7 @@ Avian_avian_Classes_defineVMClass return reinterpret_cast(defineClass(t, loader, buffer, length)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_SystemClassLoader_findLoadedVMClass (Thread* t, object, uintptr_t* arguments) { @@ -114,7 +114,7 @@ Avian_avian_SystemClassLoader_findLoadedVMClass return search(t, loader, name, findLoadedClass, true); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_SystemClassLoader_vmClass (Thread* t, object, uintptr_t* arguments) { @@ -122,7 +122,7 @@ Avian_avian_SystemClassLoader_vmClass (jclassVmClass(t, reinterpret_cast(arguments[0]))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_SystemClassLoader_findVMClass (Thread* t, object, uintptr_t* arguments) { @@ -132,7 +132,7 @@ Avian_avian_SystemClassLoader_findVMClass return search(t, loader, name, resolveSystemClassThrow, true); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_SystemClassLoader_resourceURLPrefix (Thread* t, object, uintptr_t* arguments) { @@ -152,7 +152,7 @@ Avian_avian_SystemClassLoader_resourceURLPrefix } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_SystemClassLoader_00024ResourceEnumeration_nextResourceURLPrefix (Thread* t, object, uintptr_t* arguments) { @@ -176,7 +176,7 @@ Avian_avian_SystemClassLoader_00024ResourceEnumeration_nextResourceURLPrefix } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_SystemClassLoader_getClass (Thread* t, object, uintptr_t* arguments) { @@ -186,7 +186,7 @@ Avian_avian_SystemClassLoader_getClass #ifdef AVIAN_HEAPDUMP -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Machine_dumpHeap (Thread* t, object, uintptr_t* arguments) { @@ -209,7 +209,7 @@ Avian_avian_Machine_dumpHeap #endif//AVIAN_HEAPDUMP -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Runtime_exit (Thread* t, object, uintptr_t* arguments) { @@ -218,7 +218,7 @@ Avian_java_lang_Runtime_exit t->m->system->exit(arguments[1]); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_avianvmresource_Handler_00024ResourceInputStream_getContentLength (Thread* t, object, uintptr_t* arguments) { @@ -242,7 +242,7 @@ Avian_avian_avianvmresource_Handler_00024ResourceInputStream_getContentLength return -1; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_avianvmresource_Handler_00024ResourceInputStream_open (Thread* t, object, uintptr_t* arguments) { @@ -263,7 +263,7 @@ Avian_avian_avianvmresource_Handler_00024ResourceInputStream_open } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_avianvmresource_Handler_00024ResourceInputStream_available (Thread*, object, uintptr_t* arguments) { @@ -274,7 +274,7 @@ Avian_avian_avianvmresource_Handler_00024ResourceInputStream_available return static_cast(region->length()) - position; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_avianvmresource_Handler_00024ResourceInputStream_read__JI (Thread*, object, uintptr_t* arguments) { @@ -289,7 +289,7 @@ Avian_avian_avianvmresource_Handler_00024ResourceInputStream_read__JI } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_avianvmresource_Handler_00024ResourceInputStream_read__JI_3BII (Thread* t, object, uintptr_t* arguments) { @@ -314,7 +314,7 @@ Avian_avian_avianvmresource_Handler_00024ResourceInputStream_read__JI_3BII } } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_avianvmresource_Handler_00024ResourceInputStream_close (Thread*, object, uintptr_t* arguments) { @@ -322,7 +322,7 @@ Avian_avian_avianvmresource_Handler_00024ResourceInputStream_close reinterpret_cast(peer)->dispose(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Continuations_callWithCurrentContinuation (Thread* t, object, uintptr_t* arguments) { @@ -332,7 +332,7 @@ Avian_avian_Continuations_callWithCurrentContinuation abort(t); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Continuations_dynamicWind2 (Thread* t, object, uintptr_t* arguments) { @@ -344,7 +344,7 @@ Avian_avian_Continuations_dynamicWind2 abort(t); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Continuations_00024Continuation_handleResult (Thread* t, object, uintptr_t* arguments) { @@ -355,7 +355,7 @@ Avian_avian_Continuations_00024Continuation_handleResult abort(t); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_avian_Continuations_00024Continuation_handleException (Thread* t, object, uintptr_t* arguments) { @@ -366,7 +366,7 @@ Avian_avian_Continuations_00024Continuation_handleException abort(t); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Singleton_getObject (Thread* t, object, uintptr_t* arguments) { @@ -374,7 +374,7 @@ Avian_avian_Singleton_getObject (singletonObject(t, reinterpret_cast(arguments[0]), arguments[1])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Singleton_getInt (Thread* t, object, uintptr_t* arguments) { @@ -382,7 +382,7 @@ Avian_avian_Singleton_getInt (t, reinterpret_cast(arguments[0]), arguments[1]); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Singleton_getLong (Thread* t, object, uintptr_t* arguments) { @@ -392,7 +392,7 @@ Avian_avian_Singleton_getLong return v; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_allocateMemory (Thread* t, object, uintptr_t* arguments) { @@ -405,7 +405,7 @@ Avian_sun_misc_Unsafe_allocateMemory } } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_freeMemory (Thread*, object, uintptr_t* arguments) { @@ -415,7 +415,7 @@ Avian_sun_misc_Unsafe_freeMemory } } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_setMemory (Thread* t, object, uintptr_t* arguments) { @@ -439,7 +439,7 @@ Avian_sun_misc_Unsafe_setMemory // interpreter. The JIT/AOT compiler implements them as intrinsics, // so these versions will be ignored. -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putByte__JB (Thread*, object, uintptr_t* arguments) { @@ -449,7 +449,7 @@ Avian_sun_misc_Unsafe_putByte__JB *reinterpret_cast(p) = v; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putShort__JS (Thread*, object, uintptr_t* arguments) { @@ -459,14 +459,14 @@ Avian_sun_misc_Unsafe_putShort__JS *reinterpret_cast(p) = v; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putChar__JC (Thread* t, object method, uintptr_t* arguments) { Avian_sun_misc_Unsafe_putShort__JS(t, method, arguments); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putInt__JI (Thread*, object, uintptr_t* arguments) { @@ -476,14 +476,14 @@ Avian_sun_misc_Unsafe_putInt__JI *reinterpret_cast(p) = v; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putFloat__JF (Thread* t, object method, uintptr_t* arguments) { Avian_sun_misc_Unsafe_putInt__JI(t, method, arguments); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putLong__JJ (Thread*, object, uintptr_t* arguments) { @@ -493,14 +493,14 @@ Avian_sun_misc_Unsafe_putLong__JJ *reinterpret_cast(p) = v; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putDouble__JD (Thread* t, object method, uintptr_t* arguments) { Avian_sun_misc_Unsafe_putLong__JJ(t, method, arguments); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putAddress__JJ (Thread*, object, uintptr_t* arguments) { @@ -510,7 +510,7 @@ Avian_sun_misc_Unsafe_putAddress__JJ *reinterpret_cast(p) = v; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getByte__J (Thread*, object, uintptr_t* arguments) { @@ -519,7 +519,7 @@ Avian_sun_misc_Unsafe_getByte__J return *reinterpret_cast(p); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getShort__J (Thread*, object, uintptr_t* arguments) { @@ -528,14 +528,14 @@ Avian_sun_misc_Unsafe_getShort__J return *reinterpret_cast(p); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getChar__J (Thread* t, object method, uintptr_t* arguments) { return Avian_sun_misc_Unsafe_getShort__J(t, method, arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getInt__J (Thread*, object, uintptr_t* arguments) { @@ -544,14 +544,14 @@ Avian_sun_misc_Unsafe_getInt__J return *reinterpret_cast(p); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getFloat__J (Thread* t, object method, uintptr_t* arguments) { return Avian_sun_misc_Unsafe_getInt__J(t, method, arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getLong__J (Thread*, object, uintptr_t* arguments) { @@ -560,14 +560,14 @@ Avian_sun_misc_Unsafe_getLong__J return *reinterpret_cast(p); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getDouble__J (Thread* t, object method, uintptr_t* arguments) { return Avian_sun_misc_Unsafe_getLong__J(t, method, arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getAddress__J (Thread*, object, uintptr_t* arguments) { @@ -576,7 +576,7 @@ Avian_sun_misc_Unsafe_getAddress__J return *reinterpret_cast(p); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_copyMemory (Thread* t, object, uintptr_t* arguments) { @@ -602,14 +602,14 @@ Avian_sun_misc_Unsafe_copyMemory memcpy(dst, src, count); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_arrayBaseOffset (Thread*, object, uintptr_t*) { return ArrayBody; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_nio_FixedArrayByteBuffer_allocateFixed (Thread* t, object, uintptr_t* arguments) { @@ -628,7 +628,7 @@ Avian_java_nio_FixedArrayByteBuffer_allocateFixed return reinterpret_cast(array); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getObject (Thread*, object, uintptr_t* arguments) { @@ -638,7 +638,7 @@ Avian_sun_misc_Unsafe_getObject return fieldAtOffset(o, offset); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putObject (Thread* t, object, uintptr_t* arguments) { @@ -649,7 +649,7 @@ Avian_sun_misc_Unsafe_putObject set(t, o, offset, reinterpret_cast(value)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_compareAndSwapObject (Thread* t, object, uintptr_t* arguments) { @@ -668,7 +668,7 @@ Avian_sun_misc_Unsafe_compareAndSwapObject return success; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_compareAndSwapInt (Thread*, object, uintptr_t* arguments) { @@ -681,7 +681,7 @@ Avian_sun_misc_Unsafe_compareAndSwapInt (&fieldAtOffset(target, offset), expect, update); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_unpark (Thread* t, object, uintptr_t* arguments) { @@ -693,7 +693,7 @@ Avian_sun_misc_Unsafe_unpark monitorRelease(t, interruptLock(t, thread)); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_park (Thread* t, object, uintptr_t* arguments) { @@ -737,7 +737,7 @@ Avian_sun_misc_Unsafe_park monitorRelease(t, interruptLock(t, t->javaThread)); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putIntVolatile (Thread*, object, uintptr_t* arguments) { @@ -750,14 +750,14 @@ Avian_sun_misc_Unsafe_putIntVolatile storeLoadMemoryBarrier(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putOrderedInt (Thread* t, object method, uintptr_t* arguments) { Avian_sun_misc_Unsafe_putIntVolatile(t, method, arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Classes_primitiveClass (Thread* t, object, uintptr_t* arguments) { diff --git a/src/classpath-android.cpp b/src/classpath-android.cpp index f4b83c324d..392f1052f5 100644 --- a/src/classpath-android.cpp +++ b/src/classpath-android.cpp @@ -25,7 +25,7 @@ extern "C" int JNI_OnLoad(JavaVM*, void*); using namespace vm; -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Classes_defineVMClass (Thread*, object, uintptr_t*); @@ -752,7 +752,7 @@ register_org_apache_harmony_dalvik_NativeTestTarget(_JNIEnv*) return 0; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_String_compareTo (Thread* t, object, uintptr_t* arguments) { @@ -774,28 +774,28 @@ Avian_java_lang_String_compareTo return stringLength(t, a) - stringLength(t, b); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_String_isEmpty (Thread* t, object, uintptr_t* arguments) { return stringLength(t, reinterpret_cast(arguments[0])) == 0; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_String_length (Thread* t, object, uintptr_t* arguments) { return stringLength(t, reinterpret_cast(arguments[0])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_String_charAt (Thread* t, object, uintptr_t* arguments) { return stringCharAt(t, reinterpret_cast(arguments[0]), arguments[1]); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_String_equals (Thread* t, object, uintptr_t* arguments) { @@ -804,7 +804,7 @@ Avian_java_lang_String_equals reinterpret_cast(arguments[1])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_String_fastIndexOf (Thread* t, object, uintptr_t* arguments) { @@ -821,7 +821,7 @@ Avian_java_lang_String_fastIndexOf return -1; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getInterfaces (Thread* t, object, uintptr_t* arguments) { @@ -849,7 +849,7 @@ Avian_java_lang_Class_getInterfaces (makeObjectArray(t, type(t, Machine::JclassType), 0)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_newInstanceImpl (Thread* t, object, uintptr_t* arguments) { @@ -866,7 +866,7 @@ Avian_java_lang_Class_newInstanceImpl return reinterpret_cast(instance); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getComponentType (Thread* t, object, uintptr_t* arguments) { @@ -886,7 +886,7 @@ Avian_java_lang_Class_getComponentType } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_classForName (Thread* t, object, uintptr_t* arguments) { @@ -905,7 +905,7 @@ Avian_java_lang_Class_classForName (t, method, 0, name, static_cast(arguments[1]), loader)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getDeclaredField (Thread* t, object, uintptr_t* arguments) { @@ -930,7 +930,7 @@ Avian_java_lang_Class_getDeclaredField } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getDeclaredConstructorOrMethod (Thread* t, object, uintptr_t* arguments) { @@ -959,11 +959,11 @@ Avian_java_lang_Class_getDeclaredConstructorOrMethod } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_SystemClassLoader_findLoadedVMClass (Thread*, object, uintptr_t*); -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_VMClassLoader_findLoadedClass (Thread* t, object method, uintptr_t* arguments) { @@ -978,7 +978,7 @@ Avian_java_lang_VMClassLoader_findLoadedClass } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_VMClassLoader_defineClass__Ljava_lang_ClassLoader_2Ljava_lang_String_2_3BII (Thread* t, object method, uintptr_t* arguments) { @@ -995,28 +995,28 @@ Avian_java_lang_VMClassLoader_defineClass__Ljava_lang_ClassLoader_2Ljava_lang_St } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_dalvik_system_VMRuntime_bootClassPath (Thread* t, object, uintptr_t*) { return reinterpret_cast(root(t, Machine::BootLoader)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_dalvik_system_VMRuntime_classPath (Thread* t, object, uintptr_t*) { return reinterpret_cast(root(t, Machine::AppLoader)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_dalvik_system_VMRuntime_vmVersion (Thread* t, object, uintptr_t*) { return reinterpret_cast(makeString(t, "%s", AVIAN_VERSION)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_dalvik_system_VMRuntime_properties (Thread* t, object, uintptr_t*) { @@ -1030,14 +1030,14 @@ Avian_dalvik_system_VMRuntime_properties return reinterpret_cast(array); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Runtime_gc (Thread* t, object, uintptr_t*) { collect(t, Heap::MajorCollection); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Runtime_nativeLoad (Thread* t, object, uintptr_t* arguments) { @@ -1055,7 +1055,7 @@ Avian_java_lang_Runtime_nativeLoad } } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_System_arraycopy (Thread* t, object, uintptr_t* arguments) { @@ -1066,7 +1066,7 @@ Avian_java_lang_System_arraycopy arguments[4]); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_objectFieldOffset (Thread* t, object, uintptr_t* arguments) { @@ -1078,7 +1078,7 @@ Avian_sun_misc_Unsafe_objectFieldOffset jfieldSlot(t, jfield))); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_VMThread_interrupt (Thread* t, object, uintptr_t* arguments) { @@ -1093,14 +1093,14 @@ Avian_java_lang_VMThread_interrupt (threadPeer(t, fieldAtOffset(vmThread, fieldOffset(t, field))))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_VMThread_interrupted (Thread* t, object, uintptr_t*) { return getAndClearInterrupted(t, t); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_VMThread_isInterrupted (Thread* t, object, uintptr_t* arguments) { @@ -1114,7 +1114,7 @@ Avian_java_lang_VMThread_isInterrupted (t, fieldAtOffset(vmThread, fieldOffset(t, field))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_VMThread_getStatus (Thread*, object, uintptr_t*) { @@ -1122,14 +1122,14 @@ Avian_java_lang_VMThread_getStatus return 1; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_VMThread_currentThread (Thread* t, object, uintptr_t*) { return reinterpret_cast(t->javaThread); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_VMThread_create (Thread* t, object, uintptr_t* arguments) { @@ -1140,7 +1140,7 @@ Avian_java_lang_VMThread_create startThread(t, thread); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_VMThread_sleep (Thread* t, object, uintptr_t* arguments) { @@ -1158,7 +1158,7 @@ Avian_java_lang_VMThread_sleep release(t, threadSleepLock(t, t->javaThread)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_dalvik_system_VMStack_getThreadStackTrace (Thread* t, object, uintptr_t* arguments) { @@ -1172,7 +1172,7 @@ Avian_dalvik_system_VMStack_getThreadStackTrace : t->m->processor->getStackTrace(t, p))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_dalvik_system_VMStack_getCallingClassLoader (Thread* t, object, uintptr_t*) { @@ -1201,21 +1201,21 @@ Avian_dalvik_system_VMStack_getCallingClassLoader return reinterpret_cast(v.loader); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Math_min (Thread*, object, uintptr_t* arguments) { return min(static_cast(arguments[0]), static_cast(arguments[1])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Math_max (Thread*, object, uintptr_t* arguments) { return max(static_cast(arguments[0]), static_cast(arguments[1])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Math_cos (Thread*, object, uintptr_t* arguments) { @@ -1223,7 +1223,7 @@ Avian_java_lang_Math_cos return doubleToBits(cos(bitsToDouble(v))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Math_sin (Thread*, object, uintptr_t* arguments) { @@ -1231,7 +1231,7 @@ Avian_java_lang_Math_sin return doubleToBits(sin(bitsToDouble(v))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Math_sqrt (Thread*, object, uintptr_t* arguments) { @@ -1239,35 +1239,35 @@ Avian_java_lang_Math_sqrt return doubleToBits(sqrt(bitsToDouble(v))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Math_abs__I (Thread*, object, uintptr_t* arguments) { return abs(static_cast(arguments[0])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Math_abs__J (Thread*, object, uintptr_t* arguments) { return llabs(arguments[0]); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Math_abs__F (Thread*, object, uintptr_t* arguments) { return floatToBits(abs(bitsToFloat(arguments[0]))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Float_intBitsToFloat (Thread*, object, uintptr_t* arguments) { return arguments[0]; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Float_floatToIntBits (Thread*, object, uintptr_t* arguments) { @@ -1280,7 +1280,7 @@ Avian_java_lang_Float_floatToIntBits } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Double_doubleToRawLongBits (Thread*, object, uintptr_t* arguments) { @@ -1291,7 +1291,7 @@ Avian_java_lang_Double_doubleToRawLongBits return v; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Object_wait (Thread* t, object, uintptr_t* arguments) { @@ -1300,14 +1300,14 @@ Avian_java_lang_Object_wait wait(t, reinterpret_cast(arguments[0]), milliseconds); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Object_notifyAll (Thread* t, object, uintptr_t* arguments) { notifyAll(t, reinterpret_cast(arguments[0])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Object_getClass (Thread* t, object, uintptr_t* arguments) { @@ -1315,14 +1315,14 @@ Avian_java_lang_Object_getClass (getJClass(t, objectClass(t, reinterpret_cast(arguments[0])))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Object_hashCode (Thread* t, object, uintptr_t* arguments) { return objectHash(t, reinterpret_cast(arguments[0])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Object_internalClone (Thread* t, object, uintptr_t* arguments) { @@ -1330,7 +1330,7 @@ Avian_java_lang_Object_internalClone (clone(t, reinterpret_cast(arguments[1]))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getModifiers (Thread* t, object, uintptr_t* arguments) { @@ -1338,7 +1338,7 @@ Avian_java_lang_Class_getModifiers (t, jclassVmClass(t, reinterpret_cast(arguments[0]))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getSuperclass (Thread* t, object, uintptr_t* arguments) { @@ -1351,14 +1351,14 @@ Avian_java_lang_Class_getSuperclass } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_desiredAssertionStatus (Thread*, object, uintptr_t*) { return 1; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getNameNative (Thread* t, object, uintptr_t* arguments) { @@ -1373,7 +1373,7 @@ Avian_java_lang_Class_getNameNative (makeString(t, "%s", RUNTIME_ARRAY_BODY(s))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_isInterface (Thread* t, object, uintptr_t* arguments) { @@ -1382,7 +1382,7 @@ Avian_java_lang_Class_isInterface & ACC_INTERFACE) != 0; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_isPrimitive (Thread* t, object, uintptr_t* arguments) { @@ -1391,7 +1391,7 @@ Avian_java_lang_Class_isPrimitive & PrimitiveFlag) != 0; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getClassLoader (Thread* t, object, uintptr_t* arguments) { @@ -1400,7 +1400,7 @@ Avian_java_lang_Class_getClassLoader (t, jclassVmClass(t, reinterpret_cast(arguments[0])))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_isAssignableFrom (Thread* t, object, uintptr_t* arguments) { @@ -1415,7 +1415,7 @@ Avian_java_lang_Class_isAssignableFrom } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_isInstance (Thread* t, object, uintptr_t* arguments) { @@ -1429,7 +1429,7 @@ Avian_java_lang_Class_isInstance } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getDeclaredMethods (Thread* t, object, uintptr_t* arguments) { @@ -1446,7 +1446,7 @@ Avian_java_lang_Class_getDeclaredMethods (t->m->processor->invoke(t, get, 0, jclassVmClass(t, c), publicOnly)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Method_invokeNative (Thread* t, object, uintptr_t* arguments) { @@ -1460,7 +1460,7 @@ Avian_java_lang_reflect_Method_invokeNative return reinterpret_cast(invoke(t, method, instance, args)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Method_getMethodModifiers (Thread* t, object, uintptr_t* arguments) { @@ -1471,7 +1471,7 @@ Avian_java_lang_reflect_Method_getMethodModifiers arguments[1])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Method_isAnnotationPresent (Thread* t, object, uintptr_t* arguments) { @@ -1497,7 +1497,7 @@ Avian_java_lang_reflect_Method_isAnnotationPresent return false; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Method_getAnnotation (Thread* t, object, uintptr_t* arguments) { @@ -1534,7 +1534,7 @@ Avian_java_lang_reflect_Method_getAnnotation return false; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Method_getDeclaredAnnotations (Thread* t, object, uintptr_t* arguments) { @@ -1581,7 +1581,7 @@ Avian_java_lang_reflect_Method_getDeclaredAnnotations 0)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Constructor_constructNative (Thread* t, object, uintptr_t* arguments) { @@ -1601,7 +1601,7 @@ Avian_java_lang_reflect_Constructor_constructNative return reinterpret_cast(instance); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Field_getField (Thread* t, object, uintptr_t* arguments) { @@ -1621,7 +1621,7 @@ Avian_java_lang_reflect_Field_getField } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Field_getFieldModifiers (Thread* t, object, uintptr_t* arguments) { @@ -1632,14 +1632,14 @@ Avian_java_lang_reflect_Field_getFieldModifiers arguments[2])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Throwable_nativeFillInStackTrace (Thread* t, object, uintptr_t*) { return reinterpret_cast(getTrace(t, 2)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Throwable_nativeGetStackTrace (Thread* t, object, uintptr_t* arguments) { @@ -1647,7 +1647,7 @@ Avian_java_lang_Throwable_nativeGetStackTrace (local::translateStackTrace(t, reinterpret_cast(arguments[0]))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Classes_makeMethod (Thread* t, object, uintptr_t* arguments) { @@ -1656,7 +1656,7 @@ Avian_avian_Classes_makeMethod (t, reinterpret_cast(arguments[0]), arguments[1])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Array_createObjectArray (Thread* t, object, uintptr_t* arguments) { @@ -1666,7 +1666,7 @@ Avian_java_lang_reflect_Array_createObjectArray arguments[1])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_nio_ByteOrder_isLittleEndian (Thread*, object, uintptr_t*) { @@ -1677,7 +1677,7 @@ Avian_java_nio_ByteOrder_isLittleEndian #endif } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_dalvik_system_VMRuntime_newNonMovableArray (Thread* t, object, uintptr_t* arguments) { @@ -1698,14 +1698,14 @@ Avian_dalvik_system_VMRuntime_newNonMovableArray } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_dalvik_system_VMRuntime_addressOf (Thread*, object, uintptr_t* arguments) { return arguments[1] + ArrayBody; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_libcore_io_Memory_pokeLong (Thread*, object, uintptr_t* arguments) { @@ -1717,7 +1717,7 @@ Avian_libcore_io_Memory_pokeLong memcpy(reinterpret_cast(address), &v, 8); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_libcore_io_Memory_peekLong (Thread*, object, uintptr_t* arguments) { @@ -1726,7 +1726,7 @@ Avian_libcore_io_Memory_peekLong return arguments[2] ? swapV8(v) : v; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_libcore_io_Memory_pokeInt (Thread*, object, uintptr_t* arguments) { @@ -1735,7 +1735,7 @@ Avian_libcore_io_Memory_pokeInt memcpy(reinterpret_cast(address), &v, 4); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_libcore_io_Memory_peekInt (Thread*, object, uintptr_t* arguments) { @@ -1744,7 +1744,7 @@ Avian_libcore_io_Memory_peekInt return arguments[2] ? swapV4(v) : v; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_libcore_io_Memory_pokeShort (Thread*, object, uintptr_t* arguments) { @@ -1753,7 +1753,7 @@ Avian_libcore_io_Memory_pokeShort memcpy(reinterpret_cast(address), &v, 2); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_libcore_io_Memory_peekShort (Thread*, object, uintptr_t* arguments) { @@ -1762,7 +1762,7 @@ Avian_libcore_io_Memory_peekShort return arguments[2] ? swapV2(v) : v; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_libcore_io_Memory_pokeByte (Thread*, object, uintptr_t* arguments) { @@ -1770,7 +1770,7 @@ Avian_libcore_io_Memory_pokeByte *reinterpret_cast(address) = arguments[2]; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_libcore_io_Memory_peekByte (Thread*, object, uintptr_t* arguments) { @@ -1778,28 +1778,28 @@ Avian_libcore_io_Memory_peekByte return *reinterpret_cast(address); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_System_nanoTime (Thread* t, object, uintptr_t*) { return t->m->system->now() * 1000 * 1000; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_System_currentTimeMillis (Thread* t, object, uintptr_t*) { return t->m->system->now(); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_System_identityHashCode (Thread* t, object, uintptr_t* arguments) { return objectHash(t, reinterpret_cast(arguments[0])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_System_mapLibraryName (Thread* t, object, uintptr_t* arguments) { @@ -1827,7 +1827,7 @@ void register_libcore_io_Posix(_JNIEnv*) { } void register_libcore_net_RawSocket(_JNIEnv*) { } void register_org_apache_harmony_xnet_provider_jsse_NativeCrypto(_JNIEnv*) { } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_libcore_io_OsConstants_initConstants (Thread* t, object method, uintptr_t*) { @@ -1847,7 +1847,7 @@ Avian_libcore_io_OsConstants_initConstants fieldAtOffset(table, fieldOffset(t, field)) = 2; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_libcore_io_Posix_getenv(Thread* t, object, uintptr_t* arguments) { object name = reinterpret_cast(arguments[1]); @@ -1873,7 +1873,7 @@ Avian_libcore_io_Posix_getenv(Thread* t, object, uintptr_t* arguments) } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_libcore_io_Posix_uname(Thread* t, object, uintptr_t*) { object c = resolveClass @@ -1911,7 +1911,7 @@ Avian_libcore_io_Posix_uname(Thread* t, object, uintptr_t*) return reinterpret_cast(instance); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_libcore_io_Posix_writeBytes(Thread* t, object, uintptr_t* arguments) { object fd = reinterpret_cast(arguments[1]); diff --git a/src/classpath-avian.cpp b/src/classpath-avian.cpp index 52442d0e0c..2836bd086c 100644 --- a/src/classpath-avian.cpp +++ b/src/classpath-avian.cpp @@ -230,7 +230,7 @@ makeClasspath(System*, Allocator* allocator, const char*, const char*) } // namespace vm -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Object_toString (Thread* t, object, uintptr_t* arguments) { @@ -245,7 +245,7 @@ Avian_java_lang_Object_toString return reinterpret_cast(s); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Object_getVMClass (Thread* t, object, uintptr_t* arguments) { @@ -253,7 +253,7 @@ Avian_java_lang_Object_getVMClass (objectClass(t, reinterpret_cast(arguments[0]))); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Object_wait (Thread* t, object, uintptr_t* arguments) { @@ -263,7 +263,7 @@ Avian_java_lang_Object_wait vm::wait(t, this_, milliseconds); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Object_notify (Thread* t, object, uintptr_t* arguments) { @@ -272,7 +272,7 @@ Avian_java_lang_Object_notify notify(t, this_); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Object_notifyAll (Thread* t, object, uintptr_t* arguments) { @@ -281,7 +281,7 @@ Avian_java_lang_Object_notifyAll notifyAll(t, this_); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Object_hashCode (Thread* t, object, uintptr_t* arguments) { @@ -290,7 +290,7 @@ Avian_java_lang_Object_hashCode return objectHash(t, this_); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Object_clone (Thread* t, object, uintptr_t* arguments) { @@ -298,7 +298,7 @@ Avian_java_lang_Object_clone (clone(t, reinterpret_cast(arguments[0]))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_io_ObjectInputStream_makeInstance (Thread* t, object, uintptr_t* arguments) { @@ -307,14 +307,14 @@ Avian_java_io_ObjectInputStream_makeInstance return reinterpret_cast(make(t, c)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_LegacyObjectInputStream_makeInstance (Thread* t, object, uintptr_t* arguments) { return Avian_java_io_ObjectInputStream_makeInstance(t, NULL, arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Field_getPrimitive (Thread* t, object, uintptr_t* arguments) { @@ -344,7 +344,7 @@ Avian_java_lang_reflect_Field_getPrimitive } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Field_getObject (Thread*, object, uintptr_t* arguments) { @@ -354,7 +354,7 @@ Avian_java_lang_reflect_Field_getObject return reinterpret_cast(fieldAtOffset(instance, offset)); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_reflect_Field_setPrimitive (Thread* t, object, uintptr_t* arguments) { @@ -393,7 +393,7 @@ Avian_java_lang_reflect_Field_setPrimitive } } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_reflect_Field_setObject (Thread* t, object, uintptr_t* arguments) { @@ -404,7 +404,7 @@ Avian_java_lang_reflect_Field_setObject set(t, instance, offset, value); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Constructor_make (Thread* t, object, uintptr_t* arguments) { @@ -413,14 +413,14 @@ Avian_java_lang_reflect_Constructor_make return reinterpret_cast(make(t, c)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Method_getCaller (Thread* t, object, uintptr_t*) { return reinterpret_cast(getCaller(t, 2)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Method_invoke (Thread* t, object, uintptr_t* arguments) { @@ -443,7 +443,7 @@ Avian_java_lang_reflect_Method_invoke (t, returnCode, t->m->processor->invokeArray(t, method, instance, args))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Array_getLength (Thread* t, object, uintptr_t* arguments) { @@ -462,7 +462,7 @@ Avian_java_lang_reflect_Array_getLength } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_reflect_Array_makeObjectArray (Thread* t, object, uintptr_t* arguments) { @@ -473,21 +473,21 @@ Avian_java_lang_reflect_Array_makeObjectArray (makeObjectArray(t, jclassVmClass(t, elementType), length)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Float_floatToRawIntBits (Thread*, object, uintptr_t* arguments) { return static_cast(*arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Float_intBitsToFloat (Thread*, object, uintptr_t* arguments) { return static_cast(*arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Double_doubleToRawLongBits (Thread*, object, uintptr_t* arguments) { @@ -495,7 +495,7 @@ Avian_java_lang_Double_doubleToRawLongBits return v; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Double_longBitsToDouble (Thread*, object, uintptr_t* arguments) { @@ -503,7 +503,7 @@ Avian_java_lang_Double_longBitsToDouble return v; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_String_intern (Thread* t, object, uintptr_t* arguments) { @@ -512,7 +512,7 @@ Avian_java_lang_String_intern return reinterpret_cast(intern(t, this_)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_System_getVMProperty (Thread* t, object, uintptr_t* arguments) { @@ -546,7 +546,7 @@ Avian_java_lang_System_getVMProperty return r; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_System_arraycopy (Thread* t, object, uintptr_t* arguments) { @@ -557,7 +557,7 @@ Avian_java_lang_System_arraycopy arguments[4]); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_System_identityHashCode (Thread* t, object, uintptr_t* arguments) { @@ -570,7 +570,7 @@ Avian_java_lang_System_identityHashCode } } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Runtime_load (Thread* t, object, uintptr_t* arguments) { @@ -584,14 +584,14 @@ Avian_java_lang_Runtime_load loadLibrary(t, "", RUNTIME_ARRAY_BODY(n), mapName, true); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Runtime_gc (Thread* t, object, uintptr_t*) { collect(t, Heap::MajorCollection); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Runtime_freeMemory (Thread*, object, uintptr_t*) { @@ -599,7 +599,7 @@ Avian_java_lang_Runtime_freeMemory return 0; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Runtime_totalMemory (Thread*, object, uintptr_t*) { @@ -607,7 +607,7 @@ Avian_java_lang_Runtime_totalMemory return 0; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Runtime_addShutdownHook (Thread* t, object, uintptr_t* arguments) { @@ -620,14 +620,14 @@ Avian_java_lang_Runtime_addShutdownHook makePair(t, hook, root(t, Machine::ShutdownHooks))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Throwable_trace (Thread* t, object, uintptr_t* arguments) { return reinterpret_cast(getTrace(t, arguments[0])); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Throwable_resolveTrace (Thread* t, object, uintptr_t* arguments) { @@ -647,14 +647,14 @@ Avian_java_lang_Throwable_resolveTrace return reinterpret_cast(array); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Thread_currentThread (Thread* t, object, uintptr_t*) { return reinterpret_cast(t->javaThread); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Thread_doStart (Thread* t, object, uintptr_t* arguments) { @@ -662,7 +662,7 @@ Avian_java_lang_Thread_doStart (startThread(t, reinterpret_cast(*arguments))); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Thread_interrupt (Thread* t, object, uintptr_t* arguments) { @@ -671,7 +671,7 @@ Avian_java_lang_Thread_interrupt threadInterrupt(t, reinterpret_cast(peer)->javaThread); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Thread_interrupted (Thread* t, object, uintptr_t* arguments) { @@ -681,7 +681,7 @@ Avian_java_lang_Thread_interrupted (t, reinterpret_cast(peer)->javaThread, true); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Thread_getStackTrace (Thread* t, object, uintptr_t* arguments) { @@ -695,14 +695,14 @@ Avian_java_lang_Thread_getStackTrace } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Thread_activeCount (Thread* t, object, uintptr_t*) { return t->m->liveCount; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Thread_enumerate (Thread* t, object, uintptr_t* arguments) { @@ -716,14 +716,14 @@ Avian_java_lang_Thread_enumerate return count; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_java_lang_Thread_yield (Thread* t, object, uintptr_t*) { t->m->system->yield(); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Atomic_getOffset (Thread* t, object, uintptr_t* arguments) { @@ -731,7 +731,7 @@ Avian_avian_Atomic_getOffset (t, jfieldVmField(t, reinterpret_cast(arguments[0]))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Atomic_compareAndSwapObject (Thread* t, object, uintptr_t* arguments) { @@ -750,7 +750,7 @@ Avian_avian_Atomic_compareAndSwapObject return success; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Classes_isAssignableFrom (Thread* t, object, uintptr_t* arguments) { @@ -764,7 +764,7 @@ Avian_avian_Classes_isAssignableFrom } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Classes_getVMClass (Thread* t, object, uintptr_t* arguments) { @@ -772,7 +772,7 @@ Avian_avian_Classes_getVMClass (objectClass(t, reinterpret_cast(arguments[0]))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_avian_Classes_makeMethod (Thread* t, object, uintptr_t* arguments) { diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index 0232c30b44..89ab018d31 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -1896,10 +1896,10 @@ getBootstrapResources(Thread* t, object, uintptr_t* arguments) } } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL net_JNI_OnLoad(JavaVM*, void*); -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL management_JNI_OnLoad(JavaVM*, void*); void JNICALL @@ -2525,7 +2525,7 @@ makeClasspath(System* s, Allocator* allocator, const char* javaHome, } // namespace vm -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_lang_Class_getSuperclass (Thread* t, object, uintptr_t* arguments) { @@ -2538,21 +2538,21 @@ Avian_java_lang_Class_getSuperclass } } -extern "C" JNIEXPORT void +extern "C" AVIAN_EXPORT void Avian_sun_misc_Unsafe_registerNatives (Thread*, object, uintptr_t*) { // ignore } -extern "C" JNIEXPORT void +extern "C" AVIAN_EXPORT void Avian_sun_misc_Perf_registerNatives (Thread*, object, uintptr_t*) { // ignore } -extern "C" JNIEXPORT int64_t +extern "C" AVIAN_EXPORT int64_t Avian_sun_misc_Perf_createLong (Thread* t, object, uintptr_t*) { @@ -2563,14 +2563,14 @@ Avian_sun_misc_Perf_createLong "(I)Ljava/nio/ByteBuffer;"), 0, 8)); } -extern "C" JNIEXPORT int64_t +extern "C" AVIAN_EXPORT int64_t Avian_sun_misc_Unsafe_addressSize (Thread*, object, uintptr_t*) { return BytesPerWord; } -extern "C" JNIEXPORT int64_t +extern "C" AVIAN_EXPORT int64_t Avian_sun_misc_Unsafe_defineClass__Ljava_lang_String_2_3BIILjava_lang_ClassLoader_2Ljava_security_ProtectionDomain_2 (Thread* t, object, uintptr_t* arguments) { @@ -2592,7 +2592,7 @@ Avian_sun_misc_Unsafe_defineClass__Ljava_lang_String_2_3BIILjava_lang_ClassLoade (getJClass(t, defineClass(t, loader, buffer, length))); } -extern "C" JNIEXPORT int64_t +extern "C" AVIAN_EXPORT int64_t Avian_sun_misc_Unsafe_allocateInstance (Thread* t, object, uintptr_t* arguments) { @@ -2604,7 +2604,7 @@ Avian_sun_misc_Unsafe_allocateInstance return reinterpret_cast(make(t, c)); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_staticFieldOffset (Thread* t, object, uintptr_t* arguments) { @@ -2615,7 +2615,7 @@ Avian_sun_misc_Unsafe_staticFieldOffset (t, jclassVmClass(t, jfieldClazz(t, jfield))), jfieldSlot(t, jfield))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_arrayIndexScale (Thread* t, object, uintptr_t* arguments) { @@ -2637,7 +2637,7 @@ Avian_sun_misc_Unsafe_arrayIndexScale } } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_staticFieldBase (Thread* t, object, uintptr_t* arguments) { @@ -2647,7 +2647,7 @@ Avian_sun_misc_Unsafe_staticFieldBase (t, jfieldClazz(t, reinterpret_cast(arguments[1]))))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_objectFieldOffset (Thread* t, object, uintptr_t* arguments) { @@ -2658,7 +2658,7 @@ Avian_sun_misc_Unsafe_objectFieldOffset (t, jclassVmClass(t, jfieldClazz(t, jfield))), jfieldSlot(t, jfield))); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getShort__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) { @@ -2668,7 +2668,7 @@ Avian_sun_misc_Unsafe_getShort__Ljava_lang_Object_2J return fieldAtOffset(o, offset); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getChar__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) { @@ -2678,7 +2678,7 @@ Avian_sun_misc_Unsafe_getChar__Ljava_lang_Object_2J return fieldAtOffset(o, offset); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getInt__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) { @@ -2688,7 +2688,7 @@ Avian_sun_misc_Unsafe_getInt__Ljava_lang_Object_2J return fieldAtOffset(o, offset); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getFloat__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) { @@ -2698,7 +2698,7 @@ Avian_sun_misc_Unsafe_getFloat__Ljava_lang_Object_2J return fieldAtOffset(o, offset); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getIntVolatile (Thread* t, object, uintptr_t* arguments) { @@ -2714,7 +2714,7 @@ Avian_sun_misc_Unsafe_getIntVolatile return result; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getLong__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) { @@ -2724,7 +2724,7 @@ Avian_sun_misc_Unsafe_getLong__Ljava_lang_Object_2J return fieldAtOffset(o, offset); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getDouble__Ljava_lang_Object_2J (Thread* t, object method, uintptr_t* arguments) { @@ -2732,7 +2732,7 @@ Avian_sun_misc_Unsafe_getDouble__Ljava_lang_Object_2J (t, method, arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getLongVolatile (Thread* t, object, uintptr_t* arguments) { @@ -2762,7 +2762,7 @@ Avian_sun_misc_Unsafe_getLongVolatile return result; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putByte__Ljava_lang_Object_2JB (Thread*, object, uintptr_t* arguments) { @@ -2773,7 +2773,7 @@ Avian_sun_misc_Unsafe_putByte__Ljava_lang_Object_2JB fieldAtOffset(o, offset) = value; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putShort__Ljava_lang_Object_2JS (Thread*, object, uintptr_t* arguments) { @@ -2784,7 +2784,7 @@ Avian_sun_misc_Unsafe_putShort__Ljava_lang_Object_2JS fieldAtOffset(o, offset) = value; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putChar__Ljava_lang_Object_2JC (Thread*, object, uintptr_t* arguments) { @@ -2795,7 +2795,7 @@ Avian_sun_misc_Unsafe_putChar__Ljava_lang_Object_2JC fieldAtOffset(o, offset) = value; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putInt__Ljava_lang_Object_2JI (Thread*, object, uintptr_t* arguments) { @@ -2806,7 +2806,7 @@ Avian_sun_misc_Unsafe_putInt__Ljava_lang_Object_2JI fieldAtOffset(o, offset) = value; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putFloat__Ljava_lang_Object_2JF (Thread*, object, uintptr_t* arguments) { @@ -2817,7 +2817,7 @@ Avian_sun_misc_Unsafe_putFloat__Ljava_lang_Object_2JF fieldAtOffset(o, offset) = value; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getByte__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) { @@ -2827,7 +2827,7 @@ Avian_sun_misc_Unsafe_getByte__Ljava_lang_Object_2J return fieldAtOffset(o, offset); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getBoolean__Ljava_lang_Object_2J (Thread* t, object method, uintptr_t* arguments) { @@ -2835,7 +2835,7 @@ Avian_sun_misc_Unsafe_getBoolean__Ljava_lang_Object_2J (t, method, arguments); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putBoolean__Ljava_lang_Object_2JZ (Thread*, object, uintptr_t* arguments) { @@ -2846,7 +2846,7 @@ Avian_sun_misc_Unsafe_putBoolean__Ljava_lang_Object_2JZ fieldAtOffset(o, offset) = value; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putLong__Ljava_lang_Object_2JJ (Thread*, object, uintptr_t* arguments) { @@ -2857,7 +2857,7 @@ Avian_sun_misc_Unsafe_putLong__Ljava_lang_Object_2JJ fieldAtOffset(o, offset) = value; } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getObjectVolatile (Thread* t, object, uintptr_t* arguments) { @@ -2873,7 +2873,7 @@ Avian_sun_misc_Unsafe_getObjectVolatile return value; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putObjectVolatile (Thread* t, object, uintptr_t* arguments) { @@ -2886,14 +2886,14 @@ Avian_sun_misc_Unsafe_putObjectVolatile storeLoadMemoryBarrier(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_putOrderedObject (Thread* t, object method, uintptr_t* arguments) { Avian_sun_misc_Unsafe_putObjectVolatile(t, method, arguments); } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_compareAndSwapLong (Thread* t UNUSED, object, uintptr_t* arguments) { @@ -2916,28 +2916,28 @@ Avian_sun_misc_Unsafe_compareAndSwapLong #endif } -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_sun_misc_Unsafe_pageSize (Thread*, object, uintptr_t*) { return local::PageSize; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_ensureClassInitialized (Thread* t, object, uintptr_t* arguments) { initClass(t, jclassVmClass(t, reinterpret_cast(arguments[1]))); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_monitorEnter (Thread* t, object, uintptr_t* arguments) { acquire(t, reinterpret_cast(arguments[1])); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL Avian_sun_misc_Unsafe_monitorExit (Thread* t, object, uintptr_t* arguments) { @@ -2948,13 +2948,13 @@ namespace { namespace local { -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetInterfaceVersion)() { return local::InterfaceVersion; } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_IHashCode)(Thread* t, jobject o) { ENTER(t, Thread::ActiveState); @@ -2973,7 +2973,7 @@ jvmWait(Thread* t, uintptr_t* arguments) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_MonitorWait)(Thread* t, jobject o, jlong milliseconds) { uintptr_t arguments[1 + (sizeof(jlong) / BytesPerWord)]; @@ -2993,7 +2993,7 @@ jvmNotify(Thread* t, uintptr_t* arguments) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_MonitorNotify)(Thread* t, jobject o) { uintptr_t arguments[] = { reinterpret_cast(o) }; @@ -3011,7 +3011,7 @@ jvmNotifyAll(Thread* t, uintptr_t* arguments) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_MonitorNotifyAll)(Thread* t, jobject o) { uintptr_t arguments[] = { reinterpret_cast(o) }; @@ -3027,7 +3027,7 @@ jvmClone(Thread* t, uintptr_t* arguments) return reinterpret_cast(makeLocalReference(t, clone(t, *o))); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_Clone)(Thread* t, jobject o) { uintptr_t arguments[] = { reinterpret_cast(o) }; @@ -3043,7 +3043,7 @@ jvmInternString(Thread* t, uintptr_t* arguments) return reinterpret_cast(makeLocalReference(t, intern(t, *o))); } -extern "C" JNIEXPORT jstring JNICALL +extern "C" AVIAN_EXPORT jstring JNICALL EXPORT(JVM_InternString)(Thread* t, jstring s) { uintptr_t arguments[] = { reinterpret_cast(s) }; @@ -3051,13 +3051,13 @@ EXPORT(JVM_InternString)(Thread* t, jstring s) return reinterpret_cast(run(t, jvmInternString, arguments)); } -extern "C" JNIEXPORT jlong JNICALL +extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_CurrentTimeMillis)(Thread* t, jclass) { return t->m->system->now(); } -extern "C" JNIEXPORT jlong JNICALL +extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_NanoTime)(Thread* t, jclass) { return t->m->system->now() * 1000 * 1000; @@ -3077,7 +3077,7 @@ jvmArrayCopy(Thread* t, uintptr_t* arguments) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_ArrayCopy)(Thread* t, jclass, jobject src, jint srcOffset, jobject dst, jint dstOffset, jint length) { @@ -3194,7 +3194,7 @@ jvmInitProperties(Thread* t, uintptr_t* arguments) return reinterpret_cast(properties); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_InitProperties)(Thread* t, jobject properties) { uintptr_t arguments[] = { reinterpret_cast(properties) }; @@ -3202,16 +3202,16 @@ EXPORT(JVM_InitProperties)(Thread* t, jobject properties) return reinterpret_cast(run(t, jvmInitProperties, arguments)); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_OnExit)(void (*)(void)) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_Exit)(jint code) { exit(code); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_Halt)(jint code) { exit(code); @@ -3225,7 +3225,7 @@ jvmGC(Thread* t, uintptr_t*) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_GC)() { Thread* t = static_cast(local::globalMachine->localThread->get()); @@ -3233,37 +3233,37 @@ EXPORT(JVM_GC)() run(t, jvmGC, 0); } -extern "C" JNIEXPORT jlong JNICALL +extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_MaxObjectInspectionAge)(void) { return 0; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_TraceInstructions)(jboolean) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_TraceMethodCalls)(jboolean) { abort(); } -extern "C" JNIEXPORT jlong JNICALL +extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_TotalMemory)() { return 0; } -extern "C" JNIEXPORT jlong JNICALL +extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_FreeMemory)() { return 0; } -extern "C" JNIEXPORT jlong JNICALL +extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_MaxMemory)() { return local::globalMachine->heap->limit(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_ActiveProcessorCount)() { #ifdef PLATFORM_WINDOWS @@ -3289,7 +3289,7 @@ jvmLoadLibrary(Thread* t, uintptr_t* arguments) RUNTIME_ARRAY_BODY(p), false, false)); } -extern "C" JNIEXPORT void* JNICALL +extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_LoadLibrary)(const char* path) { Thread* t = static_cast(local::globalMachine->localThread->get()); @@ -3299,13 +3299,13 @@ EXPORT(JVM_LoadLibrary)(const char* path) return reinterpret_cast(run(t, jvmLoadLibrary, arguments)); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_UnloadLibrary)(void*) { // todo: implement this correctly for POSIX and Windows } -extern "C" JNIEXPORT void* JNICALL +extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_FindLibraryEntry)(void* library, const char* name) { Thread* t = static_cast(local::globalMachine->localThread->get()); @@ -3319,13 +3319,13 @@ EXPORT(JVM_FindLibraryEntry)(void* library, const char* name) return static_cast(library)->resolve(name); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsSupportedJNIVersion)(jint version) { return version <= JNI_VERSION_1_6; } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsNaN)(jdouble) { abort(); } uint64_t @@ -3339,7 +3339,7 @@ jvmFillInStackTrace(Thread* t, uintptr_t* arguments) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_FillInStackTrace)(Thread* t, jobject throwable) { uintptr_t arguments[] = { reinterpret_cast(throwable) }; @@ -3347,10 +3347,10 @@ EXPORT(JVM_FillInStackTrace)(Thread* t, jobject throwable) run(t, jvmFillInStackTrace, arguments); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_PrintStackTrace)(Thread*, jobject, jobject) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetStackTraceDepth)(Thread* t, jobject throwable) { ENTER(t, Thread::ActiveState); @@ -3370,7 +3370,7 @@ jvmGetStackTraceElement(Thread* t, uintptr_t* arguments) (t, objectArrayBody(t, throwableTrace(t, *throwable), index)))); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_GetStackTraceElement)(Thread* t, jobject throwable, jint index) { uintptr_t arguments[] = { reinterpret_cast(throwable), @@ -3379,34 +3379,34 @@ EXPORT(JVM_GetStackTraceElement)(Thread* t, jobject throwable, jint index) return reinterpret_cast(run(t, jvmGetStackTraceElement, arguments)); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_InitializeCompiler) (Thread*, jclass) { abort(); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsSilentCompiler)(Thread*, jclass) { abort(); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_CompileClass)(Thread*, jclass, jclass) { return false; } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_CompileClasses)(Thread*, jclass, jstring) { return false; } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_CompilerCommand)(Thread*, jclass, jobject) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_EnableCompiler)(Thread*, jclass) { // ignore } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_DisableCompiler)(Thread*, jclass) { // ignore @@ -3420,7 +3420,7 @@ jvmStartThread(Thread* t, uintptr_t* arguments) return startThread(t, *thread) != 0; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_StartThread)(Thread* t, jobject thread) { uintptr_t arguments[] = { reinterpret_cast(thread) }; @@ -3428,10 +3428,10 @@ EXPORT(JVM_StartThread)(Thread* t, jobject thread) run(t, jvmStartThread, arguments); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_StopThread)(Thread*, jobject, jobject) { abort(); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsThreadAlive)(Thread* t, jobject thread) { ENTER(t, Thread::ActiveState); @@ -3440,19 +3440,19 @@ EXPORT(JVM_IsThreadAlive)(Thread* t, jobject thread) return p and (p->flags & Thread::ActiveFlag) != 0; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SuspendThread)(Thread*, jobject) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_ResumeThread)(Thread*, jobject) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SetThreadPriority)(Thread*, jobject, jint) { // ignore } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_Yield)(Thread* t, jclass) { t->m->system->yield(); @@ -3479,7 +3479,7 @@ jvmSleep(Thread* t, uintptr_t* arguments) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_Sleep)(Thread* t, jclass, jlong milliseconds) { uintptr_t arguments[sizeof(jlong) / BytesPerWord]; @@ -3488,7 +3488,7 @@ EXPORT(JVM_Sleep)(Thread* t, jclass, jlong milliseconds) run(t, jvmSleep, arguments); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_CurrentThread)(Thread* t, jclass) { ENTER(t, Thread::ActiveState); @@ -3496,7 +3496,7 @@ EXPORT(JVM_CurrentThread)(Thread* t, jclass) return makeLocalReference(t, t->javaThread); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_CountStackFrames)(Thread*, jobject) { abort(); } uint64_t @@ -3507,7 +3507,7 @@ jvmInterrupt(Thread* t, uintptr_t* arguments) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_Interrupt)(Thread* t, jobject thread) { uintptr_t arguments[] = { reinterpret_cast(thread) }; @@ -3524,7 +3524,7 @@ jvmIsInterrupted(Thread* t, uintptr_t* arguments) return threadIsInterrupted(t, *thread, clear); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsInterrupted)(Thread* t, jobject thread, jboolean clear) { uintptr_t arguments[] = { reinterpret_cast(thread), clear }; @@ -3540,7 +3540,7 @@ jvmHoldsLock(Thread* t, uintptr_t* arguments) return m and monitorOwner(t, m) == t; } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_HoldsLock)(Thread* t, jclass, jobject o) { uintptr_t arguments[] = { reinterpret_cast(o) }; @@ -3548,10 +3548,10 @@ EXPORT(JVM_HoldsLock)(Thread* t, jclass, jobject o) return run(t, jvmHoldsLock, arguments); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_DumpAllStacks)(Thread*, jclass) { abort(); } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetAllThreads)(Thread*, jclass) { abort(); } uint64_t @@ -3594,7 +3594,7 @@ jvmDumpThreads(Thread* t, uintptr_t* arguments) return reinterpret_cast(makeLocalReference(t, result)); } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_DumpThreads)(Thread* t, jclass, jobjectArray threads) { uintptr_t arguments[] = { reinterpret_cast(threads) }; @@ -3602,10 +3602,10 @@ EXPORT(JVM_DumpThreads)(Thread* t, jclass, jobjectArray threads) return reinterpret_cast(run(t, jvmDumpThreads, arguments)); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_CurrentLoadedClass)(Thread*) { abort(); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_CurrentClassLoader)(Thread*) { // just return null, i.e. tell SecurityManager.currentClassLoader @@ -3634,16 +3634,16 @@ jvmGetClassContext(Thread* t, uintptr_t*) return reinterpret_cast(makeLocalReference(t, context)); } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetClassContext)(Thread* t) { return reinterpret_cast(run(t, jvmGetClassContext, 0)); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_ClassDepth)(Thread*, jstring) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_ClassLoaderDepth)(Thread*) { abort(); } uint64_t @@ -3671,7 +3671,7 @@ jvmGetSystemPackage(Thread* t, uintptr_t* arguments) } } -extern "C" JNIEXPORT jstring JNICALL +extern "C" AVIAN_EXPORT jstring JNICALL EXPORT(JVM_GetSystemPackage)(Thread* t, jstring s) { uintptr_t arguments[] = { reinterpret_cast(s) }; @@ -3689,21 +3689,21 @@ jvmGetSystemPackages(Thread* t, uintptr_t*) (t, root(t, Machine::BootLoader), "java/lang/Package"), 0))); } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetSystemPackages)(Thread* t) { return reinterpret_cast(run(t, jvmGetSystemPackages, 0)); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_AllocateNewObject)(Thread*, jobject, jclass, jclass) { abort(); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_AllocateNewArray)(Thread*, jobject, jclass, jint) { abort(); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_LatestUserDefinedLoader)(Thread* t) { ENTER(t, Thread::ActiveState); @@ -3739,11 +3739,11 @@ EXPORT(JVM_LatestUserDefinedLoader)(Thread* t) return makeLocalReference(t, v.loader); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_LoadClass0)(Thread*, jobject, jclass, jstring) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetArrayLength)(Thread* t, jobject array) { ENTER(t, Thread::ActiveState); @@ -3800,7 +3800,7 @@ jvmGetArrayElement(Thread* t, uintptr_t* arguments) } } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_GetArrayElement)(Thread* t, jobject array, jint index) { uintptr_t arguments[] = { reinterpret_cast(array), @@ -3809,10 +3809,10 @@ EXPORT(JVM_GetArrayElement)(Thread* t, jobject array, jint index) return reinterpret_cast(run(t, jvmGetArrayElement, arguments)); } -extern "C" JNIEXPORT jvalue JNICALL +extern "C" AVIAN_EXPORT jvalue JNICALL EXPORT(JVM_GetPrimitiveArrayElement)(Thread*, jobject, jint, jint) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SetArrayElement)(Thread* t, jobject array, jint index, jobject value) { @@ -3852,7 +3852,7 @@ EXPORT(JVM_SetArrayElement)(Thread* t, jobject array, jint index, } } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SetPrimitiveArrayElement)(Thread*, jobject, jint, jvalue, unsigned char) { abort(); } @@ -3894,7 +3894,7 @@ jvmNewArray(Thread* t, uintptr_t* arguments) (t, makeNewArray(t, jclassVmClass(t, *elementClass), length))); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_NewArray)(Thread* t, jclass elementClass, jint length) { uintptr_t arguments[] = { reinterpret_cast(elementClass), @@ -3929,7 +3929,7 @@ jvmNewMultiArray(Thread* t, uintptr_t* arguments) return reinterpret_cast(makeLocalReference(t, array)); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_NewMultiArray)(Thread* t, jclass elementClass, jintArray dimensions) { @@ -3939,7 +3939,7 @@ EXPORT(JVM_NewMultiArray)(Thread* t, jclass elementClass, return reinterpret_cast(run(t, jvmNewMultiArray, arguments)); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_GetCallerClass)(Thread* t, int target) { ENTER(t, Thread::ActiveState); @@ -3950,7 +3950,7 @@ EXPORT(JVM_GetCallerClass)(Thread* t, int target) (t, getJClass(t, methodClass(t, method))) : 0; } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_FindPrimitiveClass)(Thread* t, const char* name) { ENTER(t, Thread::ActiveState); @@ -4004,7 +4004,7 @@ jvmResolveClass(Thread* t, uintptr_t* arguments) return 1; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_ResolveClass)(Thread* t, jclass c) { uintptr_t arguments[] = { reinterpret_cast(c) }; @@ -4034,7 +4034,7 @@ jvmFindClassFromClassLoader(Thread* t, uintptr_t* arguments) return reinterpret_cast(makeLocalReference(t, getJClass(t, c))); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_FindClassFromClassLoader)(Thread* t, const char* name, jboolean init, jobject loader, jboolean throwError) @@ -4048,13 +4048,13 @@ EXPORT(JVM_FindClassFromClassLoader)(Thread* t, const char* name, (run(t, jvmFindClassFromClassLoader, arguments)); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL JVM_FindClassFromBootLoader(Thread* t, const char* name) { return EXPORT(JVM_FindClassFromClassLoader)(t, name, false, 0, false); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_FindClassFromClass)(Thread*, const char*, jboolean, jclass) { abort(); } @@ -4077,7 +4077,7 @@ jvmFindLoadedClass(Thread* t, uintptr_t* arguments) (c ? makeLocalReference(t, getJClass(t, c)) : 0); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_FindLoadedClass)(Thread* t, jobject loader, jstring name) { uintptr_t arguments[] = { reinterpret_cast(loader), @@ -4098,7 +4098,7 @@ jvmDefineClass(Thread* t, uintptr_t* arguments) (t, getJClass(t, defineClass(t, *loader, data, length)))); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_DefineClass)(Thread* t, const char*, jobject loader, const uint8_t* data, jsize length, jobject) { @@ -4109,7 +4109,7 @@ EXPORT(JVM_DefineClass)(Thread* t, const char*, jobject loader, return reinterpret_cast(run(t, jvmDefineClass, arguments)); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_DefineClassWithSource)(Thread* t, const char*, jobject loader, const uint8_t* data, jsize length, jobject, const char*) @@ -4117,7 +4117,7 @@ EXPORT(JVM_DefineClassWithSource)(Thread* t, const char*, jobject loader, return EXPORT(JVM_DefineClass)(t, 0, loader, data, length, 0); } -extern "C" JNIEXPORT jstring JNICALL +extern "C" AVIAN_EXPORT jstring JNICALL EXPORT(JVM_GetClassName)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4154,7 +4154,7 @@ jvmGetClassInterfaces(Thread* t, uintptr_t* arguments) (t, makeObjectArray(t, type(t, Machine::JclassType), 0))); } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetClassInterfaces)(Thread* t, jclass c) { uintptr_t arguments[] = { reinterpret_cast(c) }; @@ -4162,7 +4162,7 @@ EXPORT(JVM_GetClassInterfaces)(Thread* t, jclass c) return reinterpret_cast(run(t, jvmGetClassInterfaces, arguments)); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_GetClassLoader)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4188,7 +4188,7 @@ EXPORT(JVM_GetClassLoader)(Thread* t, jclass c) } } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsInterface)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4196,7 +4196,7 @@ EXPORT(JVM_IsInterface)(Thread* t, jclass c) return (classFlags(t, jclassVmClass(t, *c)) & ACC_INTERFACE) != 0; } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetClassSigners)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4207,7 +4207,7 @@ EXPORT(JVM_GetClassSigners)(Thread* t, jclass c) (t, classRuntimeDataSigners(t, runtimeData)) : 0; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SetClassSigners)(Thread* t, jclass c, jobjectArray signers) { ENTER(t, Thread::ActiveState); @@ -4231,7 +4231,7 @@ jvmGetProtectionDomain(Thread* t, uintptr_t* arguments) (t, t->m->processor->invoke(t, method, 0, jclassVmClass(t, *c)))); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_GetProtectionDomain)(Thread* t, jclass c) { uintptr_t arguments[] = { reinterpret_cast(c) }; @@ -4239,10 +4239,10 @@ EXPORT(JVM_GetProtectionDomain)(Thread* t, jclass c) return reinterpret_cast(run(t, jvmGetProtectionDomain, arguments)); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SetProtectionDomain)(Thread*, jclass, jobject) { abort(); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsArrayClass)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4250,7 +4250,7 @@ EXPORT(JVM_IsArrayClass)(Thread* t, jclass c) return classArrayDimensions(t, jclassVmClass(t, *c)) != 0; } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsPrimitiveClass)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4278,7 +4278,7 @@ jvmGetComponentType(Thread* t, uintptr_t* arguments) } } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_GetComponentType)(Thread* t, jclass c) { uintptr_t arguments[] = { reinterpret_cast(c) }; @@ -4286,7 +4286,7 @@ EXPORT(JVM_GetComponentType)(Thread* t, jclass c) return reinterpret_cast(run(t, jvmGetComponentType, arguments)); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetClassModifiers)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4342,7 +4342,7 @@ jvmGetDeclaredClasses(Thread* t, uintptr_t* arguments) (t, makeObjectArray(t, type(t, Machine::JclassType), 0))); } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetDeclaredClasses)(Thread* t, jclass c) { uintptr_t arguments[] = { reinterpret_cast(c) }; @@ -4380,7 +4380,7 @@ jvmGetDeclaringClass(Thread* t, uintptr_t* arguments) return 0; } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_GetDeclaringClass)(Thread* t, jclass c) { uintptr_t arguments[] = { reinterpret_cast(c) }; @@ -4406,7 +4406,7 @@ jvmGetClassSignature(Thread* t, uintptr_t* arguments) return 0; } -extern "C" JNIEXPORT jstring JNICALL +extern "C" AVIAN_EXPORT jstring JNICALL EXPORT(JVM_GetClassSignature)(Thread* t, jclass c) { uintptr_t arguments[] = { reinterpret_cast(c) }; @@ -4414,7 +4414,7 @@ EXPORT(JVM_GetClassSignature)(Thread* t, jclass c) return reinterpret_cast(run(t, jvmGetClassSignature, arguments)); } -extern "C" JNIEXPORT jbyteArray JNICALL +extern "C" AVIAN_EXPORT jbyteArray JNICALL EXPORT(JVM_GetClassAnnotations)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4463,7 +4463,7 @@ jvmGetClassDeclaredMethods(Thread* t, uintptr_t* arguments) } } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetClassDeclaredMethods)(Thread* t, jclass c, jboolean publicOnly) { uintptr_t arguments[] = { reinterpret_cast(c), publicOnly }; @@ -4509,7 +4509,7 @@ jvmGetClassDeclaredFields(Thread* t, uintptr_t* arguments) } } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetClassDeclaredFields)(Thread* t, jclass c, jboolean publicOnly) { uintptr_t arguments[] = { reinterpret_cast(c), publicOnly }; @@ -4559,7 +4559,7 @@ jvmGetClassDeclaredConstructors(Thread* t, uintptr_t* arguments) } } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetClassDeclaredConstructors)(Thread* t, jclass c, jboolean publicOnly) { @@ -4569,7 +4569,7 @@ EXPORT(JVM_GetClassDeclaredConstructors)(Thread* t, jclass c, (run(t, jvmGetClassDeclaredConstructors, arguments)); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetClassAccessFlags)(Thread* t, jclass c) { return EXPORT(JVM_GetClassModifiers)(t, c); @@ -4601,7 +4601,7 @@ jvmInvokeMethod(Thread* t, uintptr_t* arguments) (t, vmMethod, instance ? *instance : 0, args ? *args : 0))); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_InvokeMethod)(Thread* t, jobject method, jobject instance, jobjectArray args) { @@ -4632,7 +4632,7 @@ jvmNewInstanceFromConstructor(Thread* t, uintptr_t* arguments) return reinterpret_cast(makeLocalReference(t, instance)); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_NewInstanceFromConstructor)(Thread* t, jobject constructor, jobjectArray args) { @@ -4643,7 +4643,7 @@ EXPORT(JVM_NewInstanceFromConstructor)(Thread* t, jobject constructor, (run(t, jvmNewInstanceFromConstructor, arguments)); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_GetClassConstantPool)(Thread* t, jclass c) { ENTER(t, Thread::ActiveState); @@ -4664,7 +4664,7 @@ EXPORT(JVM_GetClassConstantPool)(Thread* t, jclass c) return makeLocalReference(t, makeConstantPool(t, pool)); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_ConstantPoolGetSize)(Thread* t, jobject, jobject pool) { if (pool == 0) return 0; @@ -4674,35 +4674,35 @@ EXPORT(JVM_ConstantPoolGetSize)(Thread* t, jobject, jobject pool) return singletonCount(t, *pool); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_ConstantPoolGetClassAt)(Thread*, jobject, jobject, jint) { abort(); } -extern "C" JNIEXPORT jclass JNICALL +extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_ConstantPoolGetClassAtIfLoaded)(Thread*, jobject, jobject, jint) { abort(); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_ConstantPoolGetMethodAt)(Thread*, jobject, jobject, jint) { abort(); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_ConstantPoolGetMethodAtIfLoaded)(Thread*, jobject, jobject, jint) { abort(); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_ConstantPoolGetFieldAt)(Thread*, jobject, jobject, jint) { abort(); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_ConstantPoolGetFieldAtIfLoaded)(Thread*, jobject, jobject, jint) { abort(); } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_ConstantPoolGetMemberRefInfoAt)(Thread*, jobject, jobject, jint) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_ConstantPoolGetIntAt)(Thread* t, jobject, jobject pool, jint index) { ENTER(t, Thread::ActiveState); @@ -4710,7 +4710,7 @@ EXPORT(JVM_ConstantPoolGetIntAt)(Thread* t, jobject, jobject pool, jint index) return singletonValue(t, *pool, index - 1); } -extern "C" JNIEXPORT jlong JNICALL +extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_ConstantPoolGetLongAt)(Thread* t, jobject, jobject pool, jint index) { ENTER(t, Thread::ActiveState); @@ -4721,7 +4721,7 @@ EXPORT(JVM_ConstantPoolGetLongAt)(Thread* t, jobject, jobject pool, jint index) return v; } -extern "C" JNIEXPORT jfloat JNICALL +extern "C" AVIAN_EXPORT jfloat JNICALL EXPORT(JVM_ConstantPoolGetFloatAt)(Thread* t, jobject, jobject pool, jint index) { @@ -4730,7 +4730,7 @@ EXPORT(JVM_ConstantPoolGetFloatAt)(Thread* t, jobject, jobject pool, return bitsToFloat(singletonValue(t, *pool, index - 1)); } -extern "C" JNIEXPORT jdouble JNICALL +extern "C" AVIAN_EXPORT jdouble JNICALL EXPORT(JVM_ConstantPoolGetDoubleAt)(Thread* t, jobject, jobject pool, jint index) { @@ -4742,7 +4742,7 @@ EXPORT(JVM_ConstantPoolGetDoubleAt)(Thread* t, jobject, jobject pool, return v; } -extern "C" JNIEXPORT jstring JNICALL +extern "C" AVIAN_EXPORT jstring JNICALL EXPORT(JVM_ConstantPoolGetStringAt)(Thread*, jobject, jobject, jint) { abort(); } @@ -4760,7 +4760,7 @@ jvmConstantPoolGetUTF8At(Thread* t, uintptr_t* arguments) (t, array, 0, fieldAtOffset(array, BytesPerWord) - 1))); } -extern "C" JNIEXPORT jstring JNICALL +extern "C" AVIAN_EXPORT jstring JNICALL EXPORT(JVM_ConstantPoolGetUTF8At)(Thread* t, jobject, jobject pool, jint index) { uintptr_t arguments[] = { reinterpret_cast(pool), @@ -4833,7 +4833,7 @@ jvmDoPrivileged(Thread* t, uintptr_t* arguments) (makeLocalReference(t, t->m->processor->invoke(t, method, *action))); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_DoPrivileged) (Thread* t, jclass, jobject action, jobject, jboolean wrapException) { @@ -4843,151 +4843,151 @@ EXPORT(JVM_DoPrivileged) return reinterpret_cast(run(t, jvmDoPrivileged, arguments)); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_GetInheritedAccessControlContext)(Thread*, jclass) { abort(); } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_GetStackAccessControlContext)(Thread*, jclass) { return 0; } -extern "C" JNIEXPORT void* JNICALL +extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_RegisterSignal)(jint, void*) { abort(); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_RaiseSignal)(jint) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_FindSignal)(const char*) { return -1; } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_DesiredAssertionStatus)(Thread*, jclass, jclass) { return false; } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_AssertionStatusDirectives)(Thread*, jclass) { abort(); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_SupportsCX8)() { return true; } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetClassNameUTF)(Thread*, jclass) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_GetClassCPTypes)(Thread*, jclass, unsigned char*) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetClassCPEntriesCount)(Thread*, jclass) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetClassFieldsCount)(Thread*, jclass) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetClassMethodsCount)(Thread*, jclass) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_GetMethodIxExceptionIndexes)(Thread*, jclass, jint, unsigned short*) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetMethodIxExceptionsCount)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_GetMethodIxByteCode)(Thread*, jclass, jint, unsigned char*) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetMethodIxByteCodeLength)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_GetMethodIxExceptionTableEntry)(Thread*, jclass, jint, jint, local::JVM_ExceptionTableEntryType*) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetMethodIxExceptionTableLength)(Thread*, jclass, int) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetFieldIxModifiers)(Thread*, jclass, int) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetMethodIxModifiers)(Thread*, jclass, int) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetMethodIxLocalsCount)(Thread*, jclass, int) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetMethodIxArgsSize)(Thread*, jclass, int) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetMethodIxMaxStack)(Thread*, jclass, int) { abort(); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsConstructorIx)(Thread*, jclass, int) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetMethodIxNameUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetMethodIxSignatureUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetCPFieldNameUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetCPMethodNameUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetCPMethodSignatureUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetCPFieldSignatureUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetCPClassNameUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetCPFieldClassNameUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT const char* JNICALL +extern "C" AVIAN_EXPORT const char* JNICALL EXPORT(JVM_GetCPMethodClassNameUTF)(Thread*, jclass, jint) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetCPFieldModifiers)(Thread*, jclass, int, jclass) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetCPMethodModifiers)(Thread*, jclass, int, jclass) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_ReleaseUTF)(const char*) { abort(); } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsSameClassPackage)(Thread*, jclass, jclass) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetLastErrorString)(char* dst, int length) { strncpy(dst, strerror(errno), length); return strlen(dst); } -extern "C" JNIEXPORT char* JNICALL +extern "C" AVIAN_EXPORT char* JNICALL EXPORT(JVM_NativePath)(char* path) { return path; } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Open)(const char* path, jint flags, jint mode) { int r = OPEN(path, flags & 0xFFFF, mode); @@ -4998,25 +4998,25 @@ EXPORT(JVM_Open)(const char* path, jint flags, jint mode) } } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Close)(jint fd) { return CLOSE(fd); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Read)(jint fd, char* dst, jint length) { return READ(fd, dst, length); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Write)(jint fd, char* src, jint length) { return WRITE(fd, src, length); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Available)(jint fd, jlong* result) { struct STAT buffer; @@ -5043,13 +5043,13 @@ EXPORT(JVM_Available)(jint fd, jlong* result) return 1; } -extern "C" JNIEXPORT jlong JNICALL +extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_Lseek)(jint fd, jlong offset, jint seek) { return LSEEK(fd, offset, seek); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_SetLength)(jint fd, jlong length) { #ifdef PLATFORM_WINDOWS @@ -5077,7 +5077,7 @@ EXPORT(JVM_SetLength)(jint fd, jlong length) #endif } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Sync)(jint fd) { #ifdef PLATFORM_WINDOWS @@ -5098,7 +5098,7 @@ EXPORT(JVM_Sync)(jint fd) #endif } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_InitializeSocketLibrary)() { #ifdef PLATFORM_WINDOWS @@ -5116,13 +5116,13 @@ EXPORT(JVM_InitializeSocketLibrary)() return 0; } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Socket)(jint domain, jint type, jint protocol) { return socket(domain, type, protocol); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_SocketClose)(jint socket) { #ifdef PLATFORM_WINDOWS @@ -5132,43 +5132,43 @@ EXPORT(JVM_SocketClose)(jint socket) #endif } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_SocketShutdown)(jint socket, jint how) { return shutdown(socket, how); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Recv)(jint socket, char* dst, jint count, jint flags) { return recv(socket, dst, count, flags); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Send)(jint socket, char* src, jint count, jint flags) { return send(socket, src, count, flags); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Timeout)(int, long) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Listen)(jint socket, jint count) { return listen(socket, count); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Connect)(jint socket, sockaddr* address, jint addressLength) { return connect(socket, address, addressLength); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Bind)(jint, struct sockaddr*, jint) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Accept)(jint socket, struct sockaddr* address, jint* addressLength) { socklen_t length = *addressLength; @@ -5177,15 +5177,15 @@ EXPORT(JVM_Accept)(jint socket, struct sockaddr* address, jint* addressLength) return r; } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_RecvFrom)(jint, char*, int, int, struct sockaddr*, int*) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_SendTo)(jint, char*, int, int, struct sockaddr*, int) { abort(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_SocketAvailable)(jint socket, jint* count) { #ifdef PLATFORM_WINDOWS @@ -5198,7 +5198,7 @@ EXPORT(JVM_SocketAvailable)(jint socket, jint* count) #endif } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetSockName)(jint socket, struct sockaddr* address, int* addressLength) { @@ -5208,7 +5208,7 @@ EXPORT(JVM_GetSockName)(jint socket, struct sockaddr* address, return r; } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetSockOpt)(jint socket, int level, int optionName, char* optionValue, int* optionLength) { @@ -5218,29 +5218,29 @@ EXPORT(JVM_GetSockOpt)(jint socket, int level, int optionName, return rv; } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_SetSockOpt)(jint socket, int level, int optionName, const char* optionValue, int optionLength) { return setsockopt(socket, level, optionName, optionValue, optionLength); } -extern "C" JNIEXPORT struct protoent* JNICALL +extern "C" AVIAN_EXPORT struct protoent* JNICALL EXPORT(JVM_GetProtoByName)(char*) { abort(); } -extern "C" JNIEXPORT struct hostent* JNICALL +extern "C" AVIAN_EXPORT struct hostent* JNICALL EXPORT(JVM_GetHostByAddr)(const char*, int, int) { abort(); } -extern "C" JNIEXPORT struct hostent* JNICALL +extern "C" AVIAN_EXPORT struct hostent* JNICALL EXPORT(JVM_GetHostByName)(char*) { abort(); } -extern "C" JNIEXPORT int JNICALL +extern "C" AVIAN_EXPORT int JNICALL EXPORT(JVM_GetHostName)(char* name, int length) { return gethostname(name, length); } -extern "C" JNIEXPORT void* JNICALL +extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_RawMonitorCreate)(void) { System* s = local::globalMachine->system; @@ -5252,13 +5252,13 @@ EXPORT(JVM_RawMonitorCreate)(void) } } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_RawMonitorDestroy)(void* lock) { static_cast(lock)->dispose(); } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_RawMonitorEnter)(void* lock) { static_cast(lock)->acquire @@ -5268,7 +5268,7 @@ EXPORT(JVM_RawMonitorEnter)(void* lock) return 0; } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_RawMonitorExit)(void* lock) { static_cast(lock)->release @@ -5374,7 +5374,7 @@ GetMemoryPools(Thread* t, jobject) return reinterpret_cast(run(t, getMemoryPools, 0)); } -extern "C" JNIEXPORT void* JNICALL +extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_GetManagement)(jint version) { if (version == JMM_VERSION_1_0) { @@ -5398,7 +5398,7 @@ EXPORT(JVM_GetManagement)(jint version) } } -extern "C" JNIEXPORT jobject JNICALL +extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_InitAgentProperties)(Thread*, jobject) { abort(); } uint64_t @@ -5447,7 +5447,7 @@ getEnclosingMethodInfo(Thread* t, uintptr_t* arguments) } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetEnclosingMethodInfo)(Thread* t, jclass c) { uintptr_t arguments[] = { reinterpret_cast(c) }; @@ -5456,44 +5456,44 @@ EXPORT(JVM_GetEnclosingMethodInfo)(Thread* t, jclass c) (run(t, getEnclosingMethodInfo, arguments)); } -extern "C" JNIEXPORT jintArray JNICALL +extern "C" AVIAN_EXPORT jintArray JNICALL EXPORT(JVM_GetThreadStateValues)(JNIEnv*, jint) { abort(); } -extern "C" JNIEXPORT jobjectArray JNICALL +extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetThreadStateNames)(JNIEnv*, jint, jintArray) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_GetVersionInfo)(JNIEnv*, local::jvm_version_info* info, size_t size) { memset(info, 0, size); info->jvm_version = 0x01070000; } -extern "C" JNIEXPORT jboolean JNICALL +extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_CX8Field)(JNIEnv*, jobject*, jfieldID*, jlong, jlong) { abort(); } -extern "C" JNIEXPORT void JNICALL +extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SetNativeThreadName)(JNIEnv*, jobject, jstring) { abort(); } } // namespace local } // namespace -extern "C" JNIEXPORT int +extern "C" AVIAN_EXPORT int jio_vsnprintf(char* dst, size_t size, const char* format, va_list a) { return vm::vsnprintf(dst, size, format, a); } -extern "C" JNIEXPORT int +extern "C" AVIAN_EXPORT int jio_vfprintf(FILE* stream, const char* format, va_list a) { return vfprintf(stream, format, a); } #ifdef PLATFORM_WINDOWS -extern "C" JNIEXPORT void* JNICALL +extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_GetThreadInterruptEvent)() { // hack: We don't want to expose thread interruption implementation @@ -5524,7 +5524,7 @@ extern "C" void* JDK_FindJvmEntry(const char* name) extern "C" char* findJavaTZ_md(const char*, const char*); -extern "C" JNIEXPORT int64_t JNICALL +extern "C" AVIAN_EXPORT int64_t JNICALL Avian_java_util_TimeZone_getSystemTimeZoneID (Thread* t, object, uintptr_t* arguments) { @@ -5605,7 +5605,7 @@ Avian_java_util_TimeZone_getSystemTimeZoneID } } # else // not AVIAN_OPENJDK_SRC -extern "C" JNIEXPORT int +extern "C" AVIAN_EXPORT int jio_snprintf(char* dst, size_t size, const char* format, ...) { va_list a; @@ -5618,7 +5618,7 @@ jio_snprintf(char* dst, size_t size, const char* format, ...) return r; } -extern "C" JNIEXPORT int +extern "C" AVIAN_EXPORT int jio_fprintf(FILE* stream, const char* format, ...) { va_list a; diff --git a/src/finder.cpp b/src/finder.cpp index 27969321ba..a9b7b41c34 100644 --- a/src/finder.cpp +++ b/src/finder.cpp @@ -966,7 +966,7 @@ class MyFinder: public Finder { namespace vm { -JNIEXPORT Finder* +AVIAN_EXPORT Finder* makeFinder(System* s, Allocator* a, const char* path, const char* bootLibrary) { return new (a->allocate(sizeof(MyFinder))) MyFinder(s, a, path, bootLibrary); diff --git a/src/jnienv.cpp b/src/jnienv.cpp index 824f6d0f9c..66f2f2ef5c 100644 --- a/src/jnienv.cpp +++ b/src/jnienv.cpp @@ -3785,20 +3785,20 @@ populateJNITables(JavaVMVTable* vmTable, JNIEnvVTable* envTable) } // namespace vm -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL JNI_GetDefaultJavaVMInitArgs(void*) { return 0; } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL JNI_GetCreatedJavaVMs(Machine**, jsize, jsize*) { // todo return -1; } -extern "C" JNIEXPORT jint JNICALL +extern "C" AVIAN_EXPORT jint JNICALL JNI_CreateJavaVM(Machine** m, Thread** t, void* args) { local::JavaVMInitArgs* a = static_cast(args); diff --git a/src/machine.cpp b/src/machine.cpp index 3bf59a6fe9..cb3186c216 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -5272,7 +5272,7 @@ noop() } // namespace vm // for debugging -JNIEXPORT void +AVIAN_EXPORT void vmfPrintTrace(Thread* t, FILE* out) { class Visitor: public Processor::StackVisitor { @@ -5314,14 +5314,14 @@ vmfPrintTrace(Thread* t, FILE* out) fflush(out); } -JNIEXPORT void +AVIAN_EXPORT void vmPrintTrace(Thread* t) { vmfPrintTrace(t, stderr); } // also for debugging -JNIEXPORT void* +AVIAN_EXPORT void* vmAddressFromLine(Thread* t, object m, unsigned line) { object code = methodCode(t, m); diff --git a/src/vm/system/posix.cpp b/src/vm/system/posix.cpp index 3531182877..b2531ff05f 100644 --- a/src/vm/system/posix.cpp +++ b/src/vm/system/posix.cpp @@ -1051,7 +1051,7 @@ handleSignal(int signal, siginfo_t*, void* context) namespace vm { -JNIEXPORT System* +AVIAN_EXPORT System* makeSystem(const char*) { return new (malloc(sizeof(MySystem))) MySystem(); diff --git a/src/vm/system/windows.cpp b/src/vm/system/windows.cpp index 8a9c5cc24b..f7b364131d 100644 --- a/src/vm/system/windows.cpp +++ b/src/vm/system/windows.cpp @@ -1149,7 +1149,7 @@ handleException(LPEXCEPTION_POINTERS e) namespace vm { -JNIEXPORT System* +AVIAN_EXPORT System* makeSystem(const char* crashDumpDirectory) { return new (malloc(sizeof(MySystem))) MySystem(crashDumpDirectory);