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

Function bootJavaClass

src/machine.cpp:3156–3189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3154}
3155
3156void 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
3191void nameClass(Thread* t, Gc::Type type, const char* name)
3192{

Callers

nothing calls this directly

Calls 6

makeByteArrayFunction · 0.85
typeFunction · 0.85
hashMapInsertFunction · 0.85
rootsFunction · 0.85
setNameMethod · 0.80
initVtableMethod · 0.45

Tested by

no test coverage detected