Repository navigation
cl: compileFuncOrMethod bugfix - ctx.methodCheck should before tryToMethod - #954
Conversation
There was a problem hiding this comment.
Review summary
This PR restructures the C-global-function-to-method conversion in compileFuncOrMethod so that methodCheck(cName) now gates whether tryToMethod runs at all, rather than only being consulted inside the isPtr branch for logical-class remapping. The regenerated pythread.go testdata reflects the new output (Py_IsTrue -> free IsTrue, PyObject_IsTrue -> (*Object).IsTrue).
Assessment: The restructuring is correct and the control flow is sound. methodCheck returns ("", true) when no MethodCheck patterns are configured, so the default path is unchanged. The isPtr && cls != "" && cls != typName guard correctly folds the former nested conditions with identical semantics, and fn.Argument(0) remains safe since it is only reached when typRecv != nil. No correctness, performance, security, or documentation-accuracy defects were found. Two minor items below.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #954 +/- ##
==========================================
- Coverage 87.99% 87.98% -0.01%
==========================================
Files 23 23
Lines 2665 2664 -1
==========================================
- Hits 2345 2344 -1
Misses 320 320
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
MethodCheck— Type Method Detection in llcppg #945