jw
07/21/2023, 4:50 PMequals
, hashCode
, and toString
with real implementations. This works on JVM and as-is on the newly-added JS target. On native targets, however, only hashCode
and toString
work. Replacing the body of the fake equals
function and marking it as non-fake somehow isn't enough. Debugging at runtime, I always end up in kotlin_Any_equals
. Dumping the LLVM IR after the VerifyBitcode
phase shows that the equals
function is completely absent. Dumping the IR after the plugin matches on the equals
method shows that it successfully replaced the function body with the new IR, but somewhere it's getting removed still. Any ideas?jw
07/21/2023, 4:50 PMjw
07/21/2023, 4:54 PMPavel Kunyavskiy [JB]
07/21/2023, 5:03 PMjw
07/21/2023, 5:06 PMexternal = false
fixes it. gratitude thank yougratitude thank yougratitude thank yougratitude thank yougratitude thank you
I think long term the better approach is replacing the whole function rather than trying to update it, but I'm migrating the project slowly and that's a big change.Drew Hamilton
07/21/2023, 5:27 PMPavel Kunyavskiy [JB]
07/21/2023, 5:28 PMDrew Hamilton
07/21/2023, 5:29 PMPavel Kunyavskiy [JB]
07/21/2023, 5:32 PM