本文介绍了什么是非脆弱 ABI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎暗示每个人都知道什么是非脆弱 ABI"——考虑到它被引用的频率和事实性质——在 Xcode 中.例如...

It may seem implied that everyone knows what a "Non Fragile ABI" is - considering the frequency and matter-of-fact-nature to which it is referred to - within Xcode. For example...

下标要求接口节点的大小在非脆弱 ABI 中不是恒定的

选择要使用的 Objective-C ABI 版本.可用版本为 1(传统脆弱"ABI)、2(非脆弱 ABI 1)和 3(非脆弱 ABI 2).

也就是说... 什么是非脆弱 ABI?(为什么不把它称为不那么抽象/解释得更清楚的东西?)

That said... What is a non-fragile ABI? (and why isn't it called something less-abstract / explained more clearly?)

推荐答案

非脆弱 ABI 是指无需重新编译所有子类即可向类添加实例变量的能力.

The non-fragile ABI refers to the ability to add instance variables to a class without requiring recompilation of all subclasses.

即在 v1 中(确实没有真正的 ObjC 版本),如果 Apple 将实例变量添加到 NSView(在 Cocoa 上,32 位)中,那么 NSView 的每个子类(或子类的子类)都必须是重新编译,否则他们会炸毁.v2 和 v3 解决了这个问题.

I.e. in v1 (there really aren't true versions of ObjC), if Apple were to add an instance variable to, say, NSView (on Cocoa, 32 bit), then every subclass of NSView (or subclass of subclass) would have to be recompiled or they would blow up. v2 and v3 fix this.

这篇博客文章中对此进行了详细解释.

您所指的文档在 llvm/clang 手册页中.对于大多数开发人员来说,大多数时间都非常罕见;除非您正在编写直接驱动编译器的 Makefile,否则没有太多理由阅读该页面(除非进行探究——这当然很有教育意义).

The documentation you are referring to is in the llvm/clang man page. Pretty rare place to be for most developers most of the time; unless you are writing a Makefile that is driving the compiler directly, there isn't much reason to read that page (unless spelunking -- which is quite educational, of course).

它是按照 Unix 手册页的风格编写的,毫不奇怪,它有点……迟钝.对于几乎所有任务,最好坚持使用更高级别的文档.IE.Xcode 构建设置文档一般不那么晦涩.

It is written in the style of a Unix man page and, no surprise, is a bit... obtuse. For almost all tasks, it is best to stick to the higher level documentation. I.e. the Xcode build settings documentation is general quite a bit less obtuse.

这篇关于什么是非脆弱 ABI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 19:01