-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy patheffect-user-code.html
246 lines (223 loc) · 7.54 KB
/
effect-user-code.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<pre class=metadata>
toc: false
copyright: false
assets: none
</pre>
<emu-clause id="sec-user-code" type="abstract operation">
<h1>UserCode ( )</h1>
<dl class="header">
</dl>
<emu-alg>
1. <emu-meta effects="user-code">Call user code</emu-meta>.
</emu-alg>
</emu-clause>
<emu-clause id="sec-user-code-2" type="abstract operation">
<h1>UserCode2 ( )</h1>
<dl class="header">
<dt>effects</dt>
<dd>user-code</dd>
</dl>
<p>This AO calls user code despite not being defined with an algorithm.</p>
</emu-clause>
<emu-clause id="sec-nop" type="abstract operation">
<h1>Nop ( )</h1>
<dl class="header">
</dl>
<emu-alg>
1. Do nothing.
</emu-alg>
</emu-clause>
<emu-clause id="sec-direct-call" type="abstract operation">
<h1>DirectCall()</h1>
<dl class="header">
<dt>description</dt>
<dd>Calling AOs that can call user code should insert <code>e-user-code</code> as a class into the AO link.</dd>
</dl>
<emu-alg>
1. UserCode().
1. UserCode2().
</emu-alg>
</emu-clause>
<emu-clause id="sec-transitive-call" type="abstract operation">
<h1>TransitiveCall()</h1>
<dl class="header">
<dt>description</dt>
<dd>Calling AOs that can transitively call user code should insert <code>e-user-code</code> as a class into the AO link.</dd>
</dl>
<emu-alg>
1. DirectCall().
</emu-alg>
</emu-clause>
<emu-clause id="sec-suppressed-direct-call" type="abstract operation">
<h1>SuppressedDirectCall()</h1>
<dl class="header">
<dt>description</dt>
<dd>Can-call-user-code callsites that are suppressed do not get <code>e-user-code</code> as a class in the AO link.</dd>
</dl>
<emu-alg>
1. <emu-meta suppress-effects="user-code">TransitiveCall()</emu-meta>.
</emu-alg>
</emu-clause>
<emu-clause id="sec-suppressed-transitive-call" type="abstract operation">
<h1>SuppressedTransitiveCall()</h1>
<dl class="header">
<dt>description</dt>
<dd>Can-call-user-code callsites that are suppressed do not propagate the effect</dd>
</dl>
<emu-alg>
1. SuppressedDirectCall().
</emu-alg>
</emu-clause>
<emu-clause id="sec-added-direct-call" type="abstract operation">
<h1>AddedDirectCall()</h1>
<dl class="header">
<dt>description</dt>
<dd>AOs can have manually added user-code effect at a callsite that propagates.</dd>
</dl>
<emu-alg>
1. <emu-meta effects="user-code">Nop()</emu-meta>.
</emu-alg>
</emu-clause>
<emu-clause id="sec-added-transitive-call" type="abstract operation">
<h1>AddedTransitiveCall()</h1>
<dl class="header">
<dt>description</dt>
<dd>AOs can have manually added user-code effect at a callsite that propagates.</dd>
</dl>
<emu-alg>
1. AddedDirectCall().
</emu-alg>
</emu-clause>
<emu-clause id="sec-sdo-invocation" type="abstract operation">
<h1>SDOInvocations()</h1>
<dl class="header">
<dt>description</dt>
<dd>SDO-style invocations of AOs that can call user code also have the <code>e-user-code</code> class in the link.</dd>
</dl>
<emu-alg>
1. UserCode of Bar.
</emu-alg>
</emu-clause>
<emu-clause id="sec-non-invocations" type="abstract operation">
<h1>NonInvocations()</h1>
<dl class="header">
<dt>description</dt>
<dd>Non-invocations (i.e. not followed by () or " of") do not have <code>e-user-code</code> as a class in the AO link.</dd>
</dl>
<emu-alg>
1. UserCode is an abstract operation.
</emu-alg>
</emu-clause>
<emu-clause id="sec-non-abrupt" type="abstract operation">
<h1>NonAbrupt()</h1>
<dl class="header">
<dt>description</dt>
<dd>Invocations that cannot result in abrupt completions suppress the user-code effect by default.</dd>
</dl>
<emu-alg>
1. Let _res_ be ! UserCode().
</emu-alg>
</emu-clause>
<emu-clause id="sec-non-abrupt-override" type="abstract operation">
<h1>NonAbruptOverride()</h1>
<dl class="header">
<dt>description</dt>
<dd>Invocations that cannot result in abrupt completions suppress the user-code effect by default but can still be overridden.</dd>
</dl>
<emu-alg>
1. Let _res_ be ! <emu-meta effects="user-code">UserCode()</emu-meta>.
</emu-alg>
</emu-clause>
<emu-clause id="sec-static-direct-call" type="sdo">
<h1>Static Semantics: StaticDirectCall</h1>
<dl class="header">
<dt>description</dt>
<dd>Static semantics suppress user-code.</dd>
</dl>
<emu-alg>
1. UserCode().
</emu-alg>
</emu-clause>
<emu-clause id="sec-static-transitive-call" type="sdo">
<h1>Static Semantics: StaticTransitiveCall</h1>
<dl class="header">
<dt>description</dt>
<dd>Static semantics suppress user-code.</dd>
</dl>
<emu-alg>
1. StaticDirectCall of Baz.
</emu-alg>
</emu-clause>
<emu-clause id="sec-rendered-meta" type="abstract operation">
<h1>RenderedMeta()</h1>
<dl class="header">
<dt>description</dt>
<dd>emu-meta tags with the effects attribute that aren't surrounding what ecmarkup recognizes as invocations are changed into span tags to be rendered. The effects list is prefixed with e- and changed into class names.</dd>
</dl>
<emu-alg>
1. Perform ? <emu-meta effects="user-code">_O_.[[Call]]()</emu-meta>.
</emu-alg>
</emu-clause>
<emu-clause id="sec-make-abstract-closure" type="abstract operation">
<h1>MakeAbstractClosure()</h1>
<dl class="header">
<dt>description</dt>
<dd>The user-code effect doesn't propagate through Abstract Closure boundaries by recognizing the "be a new Abstract Closure" substring.</dd>
</dl>
<emu-alg>
1. Let _closure_ be a new Abstract Closure that captures nothing and performs the following steps when called:
1. UserCode().
1. Return _closure_.
</emu-alg>
</emu-clause>
<emu-clause id="sec-call-make-abstract-closure" type="abstract operation">
<h1>CallMakeAbstractClosure()</h1>
<dl class="header">
<dt>description</dt>
<dd>The user-code effect doesn't propagate through Abstract Closure boundaries by recognizing the "be a new Abstract Closure" substring.</dd>
</dl>
<emu-alg>
1. MakeAbstractClosure().
</emu-alg>
</emu-clause>
<emu-clause id="sec-xref-not-first-child-of-emu-meta" type="abstract operation">
<h1>XrefNotFirstChildOfEmuMeta()</h1>
<dl class="header">
<dt>description</dt>
<dd>Effect additions and suppressions via emu-meta only affect xrefs that are the first child of the emu-meta. Below, UserCode() gets autolinked and get an xref. Its parent element is an emu-meta, but since the xref is not the first child, it should not be interpreted to override the effects of the UserCode() call.</dd>
</dl>
<emu-alg>
1. Perform <emu-meta effects="user-code">_map_.[[DefineOwnProperty]](! UserCode())</emu-meta>.
</emu-alg>
</emu-clause>
<emu-clause id="sec-result-of-evaluating" type="abstract operation">
<h1>ResultOfEvaluating()</h1>
<dl class="header">
<dt>description</dt>
<dd>The phrase "the result of evaluating Foo" is automatically considered as can call user code.</dd>
</dl>
<emu-alg>
1. Let _res_ be the result of evaluating |Foo|.
</emu-alg>
</emu-clause>
<emu-clause id="sec-fenced-effects" type="abstract operation">
<h1>FencedEffects()</h1>
<dl class="header">
<dt>description</dt>
<dd>Effects don't propagate past fences in parent steps. A fence must be at the beginning of a step.</dd>
</dl>
<emu-alg>
1. [fence-effects="user-code"] Fence.
1. UserCode().
</emu-alg>
</emu-clause>
<emu-clause id="sec-call-fenced-effects" type="abstract operation">
<h1>CallFencedEffects()</h1>
<dl class="header">
<dt>description</dt>
<dd>Effects don't propagate past fences in parent steps.</dd>
</dl>
<emu-alg>
1. FencedEffects().
</emu-alg>
</emu-clause>