Comments (6)
Not sure about 86_64.
from cidre.
I've implemented parts of this in madsmtm/objc2#462, the message sending changes will take a bit more to do.
from cidre.
Starting with Xcode 14
Apple changed how they generate code for selectors. More info at WWDC video 3:10.
I noticed that change, tested and rewrote my old msg_send to new one.
// clang -ObjC -S test.h
#import <Foundation/Foundation.h>
void test(void) {
NSNumber * num = [NSNumber numberWithBool:YES];
}
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 13, 0 sdk_version 13, 3
.globl _test ; -- Begin function test
.p2align 2
_test: ; @test
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #16] ; 16-byte Folded Spill
add x29, sp, #16
.cfi_def_cfa w29, 16
.cfi_offset w30, -8
.cfi_offset w29, -16
; implicit-def: $x1
adrp x8, _OBJC_CLASSLIST_REFERENCES_$_@PAGE
ldr x0, [x8, _OBJC_CLASSLIST_REFERENCES_$_@PAGEOFF]
mov w8, #1
and w2, w8, #0x1
bl "_objc_msgSend$numberWithBool:"
str x0, [sp, #8]
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.section __DATA,__objc_classrefs,regular,no_dead_strip
.p2align 3 ; @"OBJC_CLASSLIST_REFERENCES_$_"
_OBJC_CLASSLIST_REFERENCES_$_:
.quad _OBJC_CLASS_$_NSNumber
.section __DATA,__objc_imageinfo,regular,no_dead_strip
L_OBJC_IMAGE_INFO:
.long 0
.long 64
.subsections_via_symbols
One downside - they turn it as optimization. So I have to add opt-level = 1
Another - this is very platform specific, but I'm ok with that if we get zero cost.
from cidre.
Also implement objc_release
optimization.
from cidre.
Oh that's very, very cool! Thanks for the video link, I'll probably incorporate something similar into objc2
soon, behind an experimental feature-flag.
Do you know if it only works on Aarch64, or are these also available for x86_64?
from cidre.
Closing this issue. Feel free to reopen if needed.
from cidre.
Related Issues (10)
- Plans for collaboration with `objc2`? HOT 3
- Soundess issues HOT 8
- Try to implement
- Error building on macOS x86_64 HOT 6
- Strict types for vt::CompressionSession::new specs HOT 2
- A sync API to get SharableContent::current HOT 8
- Memory release without allocation panic after "New blocks" commit HOT 4
- NL (natural language) module HOT 2
- Add AVPlayerLayer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cidre.