MCPcopy Create free account
hub / github.com/ReadyTalk/avian / libraryClassLoader

Method libraryClassLoader

src/classpath-openjdk.cpp:826–2761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

824 }
825
826 virtual GcClassLoader* libraryClassLoader(Thread* t, GcMethod* caller)
827 {
828#ifdef AVIAN_OPENJDK_SRC
829 return (caller->class_() == type(t, GcClassLoader::Type)
830 and t->libraryLoadStack)
831 ? t->libraryLoadStack->classLoader
832#else
833 return strcmp("java/lang/ClassLoader$NativeLibrary",
834 reinterpret_cast<char*>(
835 caller->class_()->name()->body().begin())) == 0
836 ? cast<GcClass>(
837 t,
838 cast<GcJclass>(t,
839 t->m->processor->invoke(
840 t,
841 resolveMethod(t,
842 caller->class_(),
843 "getFromClass",
844 "()Ljava/lang/Class;"),
845 0))->vmClass())->loader()
846#endif
847 : caller->class_()->loader();
848 }
849
850 virtual void shutDown(Thread* t)
851 {
852 GcClass* c
853 = resolveClass(t, roots(t)->bootLoader(), "java/lang/Shutdown", false);
854
855 if (c) {
856 GcMethod* m = findMethodOrNull(t, c, "shutdown", "()V");
857
858 if (m) {
859 t->m->processor->invoke(t, m, 0);
860 }
861 }
862 }
863
864 virtual void dispose()
865 {
866 allocator->free(buffer, bufferSize);
867 allocator->free(this, sizeof(*this));
868 }
869
870 Allocator* allocator;
871 const char* javaHome;
872 const char* classpath;
873 const char* libraryPath;
874 const char* tzMappings;
875 const char* embedPrefix;
876 char* buffer;
877 unsigned bufferSize;
878 unsigned tzMappingsLength;
879 unsigned embedPrefixLength;
880 unsigned filePathField;
881 unsigned fileDescriptorFdField;
882 unsigned fileInputStreamFdField;
883 unsigned zipFileJzfileField;

Callers

nothing calls this directly

Calls 13

typeFunction · 0.85
strcmpFunction · 0.85
shutDownFunction · 0.85
rootsFunction · 0.85
findMethodOrNullFunction · 0.85
bodyMethod · 0.80
vmClassMethod · 0.80
resolveMethodFunction · 0.70
resolveClassFunction · 0.70
invokeMethod · 0.65
beginMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected