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

Function Avian_java_lang_Class_getEnclosingMethod

src/builtin.cpp:1258–1293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256}
1257
1258extern "C" AVIAN_EXPORT int64_t JNICALL
1259 Avian_java_lang_Class_getEnclosingMethod(Thread* t,
1260 object,
1261 uintptr_t* arguments)
1262{
1263 GcClass* c
1264 = cast<GcJclass>(t, reinterpret_cast<object>(arguments[0]))->vmClass();
1265 PROTECT(t, c);
1266
1267 GcClassAddendum* addendum = c->addendum();
1268 if (addendum) {
1269 PROTECT(t, addendum);
1270
1271 GcByteArray* enclosingClass
1272 = cast<GcByteArray>(t, addendum->enclosingClass());
1273
1274 if (enclosingClass) {
1275 GcClass* enclosing = resolveClass(t, c->loader(), enclosingClass);
1276
1277 GcPair* enclosingMethod = cast<GcPair>(t, addendum->enclosingMethod());
1278
1279 if (enclosingMethod) {
1280 return reinterpret_cast<uintptr_t>(t->m->classpath->makeJMethod(
1281 t,
1282 cast<GcMethod>(
1283 t,
1284 findMethodInClass(
1285 t,
1286 enclosing,
1287 cast<GcByteArray>(t, enclosingMethod->first()),
1288 cast<GcByteArray>(t, enclosingMethod->second())))));
1289 }
1290 }
1291 }
1292 return 0;
1293}
1294
1295extern "C" AVIAN_EXPORT int64_t JNICALL
1296 Avian_java_lang_Class_getEnclosingClass(Thread* t,

Calls 5

findMethodInClassFunction · 0.85
vmClassMethod · 0.80
resolveClassFunction · 0.70
firstMethod · 0.65
makeJMethodMethod · 0.45

Tested by

no test coverage detected