Skip to content

objc_msgSend汇编源码分析 | Alex's Blog #4

@AlexTing0

Description

@AlexTing0

https://alexting0.github.io/2019/05/13/objc-msgSend%E6%B1%87%E7%BC%96%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90/

引言Objective-C是通过消息机制调用方法的,编译器会把所有消息发送转为objc_msgSend方法调用。说到objc_msgSend的汇编实现,大多数人会觉的是因为性能高才用汇编实现,几乎没有文章说其它原因。Objective-C所有方法都会转为objc_msgSend方法调用,然而每个方法参数和返回值都可能不一样,参数和返回值要怎么处理? 本文首先会结合Objective-C Runt

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions