| 3154 | } |
| 3155 | |
| 3156 | void bootJavaClass(Thread* t, |
| 3157 | Gc::Type type, |
| 3158 | int superType, |
| 3159 | const char* name, |
| 3160 | int vtableLength, |
| 3161 | object bootMethod) |
| 3162 | { |
| 3163 | PROTECT(t, bootMethod); |
| 3164 | |
| 3165 | GcByteArray* n = makeByteArray(t, name); |
| 3166 | PROTECT(t, n); |
| 3167 | |
| 3168 | GcClass* class_ = vm::type(t, type); |
| 3169 | PROTECT(t, class_); |
| 3170 | |
| 3171 | class_->setName(t, n); |
| 3172 | |
| 3173 | GcArray* vtable; |
| 3174 | if (vtableLength >= 0) { |
| 3175 | vtable = makeArray(t, vtableLength); |
| 3176 | for (int i = 0; i < vtableLength; ++i) { |
| 3177 | vtable->setBodyElement(t, i, bootMethod); |
| 3178 | } |
| 3179 | } else { |
| 3180 | vtable = cast<GcArray>( |
| 3181 | t, vm::type(t, static_cast<Gc::Type>(superType))->virtualTable()); |
| 3182 | } |
| 3183 | |
| 3184 | class_->setVirtualTable(t, vtable); |
| 3185 | |
| 3186 | t->m->processor->initVtable(t, class_); |
| 3187 | |
| 3188 | hashMapInsert(t, roots(t)->bootstrapClassMap(), n, class_, byteArrayHash); |
| 3189 | } |
| 3190 | |
| 3191 | void nameClass(Thread* t, Gc::Type type, const char* name) |
| 3192 | { |
nothing calls this directly
no test coverage detected