Version / commit
v0.9.77 (v8 @ 5c7b847)
Environment
macOS, Python 3.13, clean checkout of v8.
What happens
A Java anonymous class (new Runnable() { … }) contributes nothing to the graph: its methods are not nodes, and every call made inside them is dropped. Anonymous listeners/callbacks are routine in Java, so a large slice of the call graph silently disappears. Kotlin's equivalent (object : Foo { … }, #2347) is already handled — Java is the gap.
Minimal reproduction
// App.java
class App {
void setup() {
Runnable r = new Runnable() {
public void run() { helper(); }
};
}
void helper() {}
}
from graphify.extract import extract_java
r = extract_java("App.java")
print([n["label"] for n in r["nodes"]])
# -> ['App.java', 'App', '.setup()', '.helper()'] # run() missing
print([(e["source"], e["target"]) for e in r["edges"] if e["relation"] == "calls"])
# -> [] # run() -> helper() lost
Expected vs actual
- Expected: a node for the anonymous class's
run() with a calls edge to helper() (as Kotlin's object : Foo already produces).
- Actual: the anonymous body and its calls are absent.
Root cause
The body hangs off an object_creation_expression as a class_body. That node is not in class_types and the function branch never recurses into bodies, so the members are never walked — the exact shape Kotlin #2347 fixed for object_literal.
A clean checkout of v8 reproduces it. Fix PR to follow.
Version / commit
v0.9.77 (v8 @ 5c7b847)
Environment
macOS, Python 3.13, clean checkout of
v8.What happens
A Java anonymous class (
new Runnable() { … }) contributes nothing to the graph: its methods are not nodes, and every call made inside them is dropped. Anonymous listeners/callbacks are routine in Java, so a large slice of the call graph silently disappears. Kotlin's equivalent (object : Foo { … }, #2347) is already handled — Java is the gap.Minimal reproduction
Expected vs actual
run()with acallsedge tohelper()(as Kotlin'sobject : Fooalready produces).Root cause
The body hangs off an
object_creation_expressionas aclass_body. That node is not inclass_typesand the function branch never recurses into bodies, so the members are never walked — the exact shape Kotlin #2347 fixed forobject_literal.A clean checkout of
v8reproduces it. Fix PR to follow.