-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert resolveInstanceMethod in TyphoonAssembly to forwardInvocation/NSInvocation #214
Comments
Perhaps we should use: https://github.com/steipete/Aspects |
Another interesting link: https://github.com/OliverLetterer/SPLMessageLogger |
I dislike the last solution, since it platform dependent. Previous two links uses same approach, and they used forwarding NSInvocation (but seems that they used private API?), as we discussed before. I prefer writing own implementation to not depend on another library, lightweight and code simplicity/readability. |
I think the last one uses custom jump tables (platform dependent assembly) and I only included it because it looked interesting and complicated. The others were serious suggestions. As far as I know the library doesn't use any private APIs though it might have platform issues. Anyway, I agree it's better to write a simple NSInvocation/forwarding solution. |
I'll write full answer when come back to Omsk. четверг, 8 мая 2014 г. пользователь Jasper Blues написал:
Sincerely, Aleksey |
I recall now that I started on this last y ear, during early plans to capture run-time args. Not that I anticipated the current problem with va_args - I didn't realize that was an option. . . because I thought it would be neater than having a table of IMPs to jump to. I started using a proxy-based approach, but ran into problems: |
Unit tests are passed, but I think we should test changes on real projects on 64bit devices, because it was a key change ( affects to whole typhoon ) |
Will convert the tests so that they can be run on device in the coming days. Meanwhile, testing on current project. |
Runtime args fail if one of the args is nill. This (presumably) is irrespective of platform (32 bit or 64bit). |
Strange. I have test for nil arguments (named test_runtime_knight_with_nil) but it was success. Can you check/add failed test? |
Ha. Got it. It crashes when argument is method parameter with right? Have you same crash? |
Yes, same crash. |
Good catch! This crash not related to latest changes - it can be reproduced on released code. |
👍 A real project always helps. Though once we have the CI builds back in shape, I'll start increasing test coverage again. |
Works fine! |
bumping CocoaPods minor version. |
This change will:
The text was updated successfully, but these errors were encountered: