forked from SSheldon/rust-objc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache selectors so we don't call
sel_registerName
over and over.
Improves SSheldon#49. This is what the assembly looks like. The fast path is only 4 instructions. lea r15, [rip + 0xbf936] ; cocoa::foundation::NSString::alloc::register_sel::SEL::h005daf5ee04d2745 mov rbx, qword ptr [r15] test rbx, rbx jne ok lea rdi, [rip + 0x95b2c] ; byte_str.o.llvm.2369336028792347561 call 0x10008fa02 ; symbol stub for: sel_registerName mov rbx, rax mov qword ptr [r15], rbx ok:
- Loading branch information
Showing
3 changed files
with
46 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters