阅读视图
Flutter 复用艺术:Mixin 与 Abstract 的架构哲学与线性化解密
零一开源|前沿技术周刊 #12
「内力探查术」:用 Instruments 勘破 SwiftUI 卡顿迷局
Swift Concurrency:彻底告别“线程思维”,拥抱 Task 的世界
深入理解 Swift 中的 async/await:告别回调地狱,拥抱结构化并发
深入理解 SwiftUI 的 ViewBuilder:从隐式语法到自定义容器
在 async/throwing 场景下优雅地使用 Swift 的 defer 关键字
我差点失去了巴顿(我的狗狗) | 肘子的 Swift 周报 #098
当Swift Codable遇到缺失字段:优雅解决数据解码难题
RunLoop 实现原理
用 SwiftUI 打造一个 iOS「设置」界面
我差点失去了巴顿(我的狗狗) - 肘子的 Swift 周报 #98
巴顿已经 13 岁了。尽管大多数时候他都表现出远超同龄狗狗的活力和状态,但随着年龄增长,各种健康问题也随之而来。不久前,巴顿被检查出肺动脉高压,医生给出了针对性的治疗方案。就在我为治疗似乎初见成效而欣慰时,上周一下午,巴顿突然无法站立,大量流口水,表现出明显的心脏不适。
三年期已满,你的产品不再更新将于90天后下架。
架构整洁之道 —— Clean Architecture
iOS26适配指南之UIButton
LLVM integrated assembler: Improving sections and symbols
In my previous post,
Sections
Sections are named, contiguous blocks of code or data within anobject file. They allow you to logically group related parts of yourprogram. The assembler places code and data into these sections as itprocesses the source file.
1 |
class MCSection { |
In LLVM 20, the MCSection
class used an enum called SectionVariant
todifferentiate between various object file formats, such as ELF, Mach-O,and COFF. These subclasses are used in contexts where the section typeis known at compile-time, such as in MCStreamer
and MCObjectTargetWriter
.This change eliminates the need for runtime type information (RTTI)checks, simplifying the codebase and improving efficiency.
Additionally, the storage for fragments' fixups (adjustments toaddresses and offsets) has been moved into the MCSection
class.
Symbols
Symbols are names that represent memory addresses or values.
1 |
class MCSymbol { |
Similar to sections, the MCSymbol
class also used a discriminator enum, SymbolKind, to distinguishbetween object file formats. This enum has also been removed.
Furthermore, the MCSymbol
class had anenum Contents
to specify the kind of symbol. This name wasa bit confusing, so it has been enum Kind
for clarity.
- regular symbol
equatedsymbol - commonsymbol
A special enumerator, SymContentsTargetCommon
, which wasused by AMDGPU for a specific type of common symbol, has also been ELFObjectWriter
to respect the symbol's section index(SHN_AMDGPU_LDS
for this special AMDGPU symbol).
sizeof(MCSymbol)
has been reduced to 24 bytes on 64-bitsystems.
The previous blog post
- The
MCSymbol::IsUsed
flag was a workaround fordetecting a subset of invalid reassignments and isremoved. - The
MCSymbol::IsResolving
flag is added to detectcyclic dependencies of equated symbols.