【问题标题】:What is a fixed up method list in objective-c?什么是objective-c中的固定方法列表?
【发布时间】:2020-08-08 13:14:48
【问题描述】:

我正在阅读 objc/runtime 源代码。我注意到struct method_list_t 中有 fixedUp getter 和 setter。这是什么意思?

编辑 1:

我已阅读问题 What is `objc_msgSend_fixup`, exactly? 的 2 个答案。我认为这些没有回答我的问题,因为它们没有解释 fix_up 的真正含义。

编辑 2:

这是我正在阅读的源代码。 https://github.com/xdxu1126/objc4

提到的结构 (struct method_list_t) 位于 FILE objc-runtime-new.h LINE 586。

【问题讨论】:

  • 这能回答你的问题吗? What is `objc_msgSend_fixup`, exactly?
  • @zrzka 不是。我认为建议问题的 2 个答案没有解释 fix_up 的含义。
  • 你能提供你正在阅读的源代码的链接吗?
  • @Cristik 当然。将在描述中更新它。

标签: objective-c


【解决方案1】:
static uint32_t fixed_up_method_list = 3;

fix_up 均值等于 3

3 = (alloc + init + currentMethod)

这是我自己的想法

【讨论】:

    猜你喜欢
    • 2011-07-10
    • 1970-01-01
    • 2011-08-20
    • 1970-01-01
    • 2010-11-04
    • 2011-07-03
    • 1970-01-01
    • 2011-07-17
    • 1970-01-01
    相关资源
    最近更新 更多