What's Dead & Exploded in Swift's exception stack?
The Swift compiler marks function arguments for a number of reasons, mostly related to internal optimizations. For your question, we'll focus on the mangler, as that's what's contributing to your pretty stack trace, and the Node Printer. As of the time of this post, the function specialization mangler has 6 marks it can apply to an argument:
-
Dead
The argument is unused in the function body and can be removed in a dead argument elimination pass.
-
Closure
The argument is a closure and may require further mangling/demangling.
-
Constant
The argument is a constant.
-
Owned to Guaranteed
A caller-owned argument transfers ownership to the callee. The argument thus has a strong reference associated with it [the caller] and is guaranteed to live through the call, so the compiler allows the caller to elide the transfer and instead aggregate retains itself.
-
SROA
A Scalar Replacement of Aggregates pass should optimize this argument.
-
In Out To Value
The parameter was marked inout but the callee doesn't actually mutate it.
The AST Node Printer adds one more mark
-
Exploded
The value comes with an explosion schema that has been realized when the call was made.
For all intents and purposes we only care about Dead
, Owned to Guaranteed
, and Exploded
.
The only one that may still seem mystifying is Exploded
. An Explosion is an optimization construct the Swift compiler uses to determine a strategy to unpack values from small structs and enums into registers. Thus, when the Node Printer says a value is Exploded
, what it means it has already unpacked the value into registers before the call.
https://stackoverflow.com/questions/30764669/whats-dead-exploded-in-swifts-exception-stack
相关文章
- 对C++ STL iostram 中 cin.get(char* cs,int size,char c='/n') 的理解
- return & exit . in GO
- Unknown column '*' in 'field list' 异常解决
- [Flutter] Creating & Updating State in a Flutter Application
- [React] Recompose: Override Styles & Elements Types in React
- [Ramda] Getter and Setter in Ramda & lens
- [ES6] for..in && for..of
- [Python] List & Object spread in Python
- [React] Recompose: Override Styles & Elements Types in React
- 【队列&栈】LeetCode 84. 柱状图中最大的矩形【困难】
- 【36】报错‘_1‘ was not declared in this scope return boost::python::make_function(boost::bind(&BiFunctio
- Column '表名.某列名' is invalid in the select list because it is not contained in either an aggregate f
- Column '表名.某列名' is invalid in the select list because it is not contained in either an aggregate f
- Execution error: 'the function name is not a recognized built-in function name'
- 解决The type or namespace name 'XXXX' does not exist in the namespace 'XXXXXXXXX' 的错误
- 华为OD机试 - 字符串排序(Java & JS & Python)
- ML之PDP/ICE/PFI/GS&LS/LIME/SHAP:《Interpretability Methods in Machine Learning: A Brief Survey机器学习可解释性
- please specify user and group other than root, pool 'default'
- Keras之DNN::基于Keras(sigmoid+binary_crossentropy+predict_classes)利用DNN实现二分类——DIY二分类数据集&预测新数据点
- 数据库面试题【十八、优化关联查询&优化子查询&优化LIMIT分页&优化UNION查询&优化WHERE子句】
- C++AMP介绍(一)
- 同步、更新、下载Android Source & SDK from 国内镜像站
- 学习C++:C++基础(三)泛型编程&C++模板