Continuation Frames and Marks
Every continuation C can be partitioned into continuation frames C1, C2, ..., Cn such that C = C1[C2[...[Cn]]], and no frame Ci can be itself partitioned into smaller continuations. Evaluation steps add and remove frames to the current continuation, typically one at a time.
Each frame is conceptually annotated with a set of continuation marks. A mark consists of a key and its value; the key is an arbitrary value, and each frame includes at most one mark for any key. Various operations set and extract marks from continuations, so that marks can be used to attach information to a dynamic extent. For example, marks can be used to record information for a “stack trace” to be used when an exception
is raised, or to implement dynamic scope.
July 9th Thursday (七月 九日 木曜日)
最新推荐文章于 2024-01-09 14:58:33 发布
本文介绍了程序执行过程中续帧的概念及其如何通过添加和移除续帧来改变当前的执行流程。每个续帧可以被概念上标注一系列的续标记,这些标记可用于记录异常堆栈跟踪信息或实现动态作用域等功能。
189

被折叠的 条评论
为什么被折叠?



