| 2901 | } |
| 2902 | |
| 2903 | GcClass* makeArrayClass(Thread* t, |
| 2904 | GcClassLoader* loader, |
| 2905 | unsigned dimensions, |
| 2906 | GcByteArray* spec, |
| 2907 | GcClass* elementClass) |
| 2908 | { |
| 2909 | if (type(t, GcJobject::Type)->vmFlags() & BootstrapFlag) { |
| 2910 | PROTECT(t, loader); |
| 2911 | PROTECT(t, spec); |
| 2912 | PROTECT(t, elementClass); |
| 2913 | |
| 2914 | // Load java.lang.Object if present so we can use its vtable, but |
| 2915 | // don't throw an exception if we can't find it. This way, we |
| 2916 | // avoid infinite recursion due to trying to create an array to |
| 2917 | // make a stack trace for a ClassNotFoundException. |
| 2918 | resolveSystemClass( |
| 2919 | t, roots(t)->bootLoader(), type(t, GcJobject::Type)->name(), false); |
| 2920 | } |
| 2921 | |
| 2922 | GcArray* vtable = cast<GcArray>(t, type(t, GcJobject::Type)->virtualTable()); |
| 2923 | |
| 2924 | GcClass* c = t->m->processor->makeClass(t, |
| 2925 | 0, |
| 2926 | 0, |
| 2927 | 2 * BytesPerWord, |
| 2928 | BytesPerWord, |
| 2929 | dimensions, |
| 2930 | elementClass, |
| 2931 | type(t, GcArray::Type)->objectMask(), |
| 2932 | spec, |
| 2933 | 0, |
| 2934 | type(t, GcJobject::Type), |
| 2935 | roots(t)->arrayInterfaceTable(), |
| 2936 | vtable, |
| 2937 | 0, |
| 2938 | 0, |
| 2939 | 0, |
| 2940 | 0, |
| 2941 | loader, |
| 2942 | vtable->length()); |
| 2943 | |
| 2944 | PROTECT(t, c); |
| 2945 | |
| 2946 | t->m->processor->initVtable(t, c); |
| 2947 | |
| 2948 | return c; |
| 2949 | } |
| 2950 | |
| 2951 | void saveLoadedClass(Thread* t, GcClassLoader* loader, GcClass* c) |
| 2952 | { |
no test coverage detected