-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cached
dealloc
selector and optimize NSObject class fetching
- Loading branch information
Showing
18 changed files
with
689 additions
and
715 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//! Common selectors. | ||
//! | ||
//! These are put here to deduplicate the cached selector, and when using | ||
//! `unstable-static-sel`, the statics. | ||
//! | ||
//! Note that our assembly tests of `unstable-static-sel-inlined` output a GOT | ||
//! entry for such accesses, but that is just a limitation of our tests - the | ||
//! actual assembly is as one would expect. | ||
use crate::runtime::Sel; | ||
use crate::{__sel_data, __sel_inner}; | ||
|
||
#[inline] | ||
pub fn alloc_sel() -> Sel { | ||
__sel_inner!(__sel_data!(alloc), "alloc") | ||
} | ||
|
||
#[inline] | ||
pub fn init_sel() -> Sel { | ||
__sel_inner!(__sel_data!(init), "init") | ||
} | ||
|
||
#[inline] | ||
pub fn new_sel() -> Sel { | ||
__sel_inner!(__sel_data!(new), "new") | ||
} | ||
|
||
#[inline] | ||
pub fn dealloc_sel() -> Sel { | ||
__sel_inner!(__sel_data!(dealloc), "dealloc") | ||
} |
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
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
Oops, something went wrong.