Skip to content

Commit afc3b83

Browse files
committed
Apply suggestions from TG3 discussion
1 parent 8deb622 commit afc3b83

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

spec.emu

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ markEffects: true
1515
<p></p>
1616
</emu-intro>
1717

18-
<emu-clause id="sec-agents">
19-
<h1>Agents</h1>
20-
21-
<emu-table id="table-agent-record" caption="Agent Record Fields">
18+
<emu-clause id="sec-code-realms">
19+
<h1>Realms</h1>
20+
<emu-table id="table-realm-record-fields" caption="Realm Record Fields" oldids="table-21">
2221
<table>
2322
<thead>
2423
<tr>
25-
<th>Field Name</th>
26-
<th>Value</th>
27-
<th>Meaning</th>
24+
<th>
25+
Field Name
26+
</th>
27+
<th>
28+
Value
29+
</th>
30+
<th>
31+
Meaning
32+
</th>
2833
</tr>
2934
</thead>
3035
<tr>
@@ -34,14 +39,6 @@ markEffects: true
3439
</tr>
3540
</table>
3641
</emu-table>
37-
38-
<p>Once the values of [[Signifier]], [[IsLockFree1]], [[IsLockFree2]], and [[ErrorCaptureStackTraceStrategy]] have been observed by any agent in the agent cluster they cannot change.</p>
39-
</emu-clause>
40-
41-
<emu-clause id="sec-agent-clusters">
42-
<h1>Agent Clusters</h1>
43-
44-
<p>All agents within a cluster must have the same value for the [[ErrorCaptureStackTraceStrategy]] field in their respective Agent Records.</p>
4542
</emu-clause>
4643

4744
<emu-clause id="sec-fundamental-objects" number="20">
@@ -54,29 +51,28 @@ markEffects: true
5451
<h1>Properties of the Error Constructor</h1>
5552

5653
<emu-clause id="sec-error.capturestacktrace">
57-
<h1>Error.captureStackTrace ( _error_ [ , _constructor_ ] )</h1>
54+
<h1>Error.captureStackTrace ( _O_ [ , _limit_ ] )</h1>
5855
<emu-alg>
59-
1. If _error_ is not an Object, throw a *TypeError* exception.
60-
1. If IsCallable(_constructor_) is *true*, then
56+
1. If _O_ is not an Object, throw a *TypeError* exception.
57+
1. If IsCallable(_limit_) is *true*, then
6158
1. Let _string_ be an implementation-defined string that represents the current stack trace, with all stack
62-
frames above the topmost call to _constructor_, including that call, omitted from the stack trace.
59+
frames above the topmost call to _limit_, including that call, omitted from the stack trace.
6360
1. NOTE: This can be used to hide implementation details on the stack trace that aren't useful to user.
6461
1. Else,
6562
1. Let _string_ be an implementation-defined string that represents the current stack trace.
66-
1. Let _strategy_ be the value of the [[ErrorCaptureStackTraceStrategy]] field of the surrounding agent's Agent Record.
63+
1. Let _strategy_ be the value of the [[ErrorCaptureStackTraceStrategy]] field of the current Realm Record.
6764
1. If _strategy_ is ~data-property~, then
68-
1. Perform ? SetterThatIgnoresPrototypeProperties(_error_, OrdinaryObjectCreate(*null*), *"stack"*, _string_)..
65+
1. Perform ? DefinePropertyOrThrow(_O_, *"stack"*, PropertyDescriptor { [[Value]]: _string_, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }).
6966
1. Else,
7067
1. Assert: _strategy_ is ~accessor~.
71-
1. If ? IsExtensible(_error_) is *false*, throw a *TypeError* exception.
7268
1. Let _getterClosure_ be a new Abstract Closure with no parameters that captures _string_ and performs the following steps when called:
7369
1. Return NormalCompletion(_string_).
7470
1. Let _getter_ be CreateBuiltinFunction(_getterClosure_, 0, "", « »).
75-
1. Let _setterClosure_ be a new Abstract Closure with parameters (_value_) that captures _error_ and performs the following steps when called:
76-
1. Perform ? SetterThatIgnoresPrototypeProperties(_error_, *null*, *"stack"*, _value_).
71+
1. Let _setterClosure_ be a new Abstract Closure with parameters (_value_) that captures _O_ and performs the following steps when called:
72+
1. Perform ? DefinePropertyOrThrow(_O_, *"stack"*, PropertyDescriptor { [[Value]]: _value_, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }).
7773
1. Return NormalCompletion(*undefined*).
7874
1. Let _setter_ be CreateBuiltinFunction(_setterClosure_, 1, "", « »).
79-
1. Perform ! OrdinaryDefineOwnProperty(_error_, *"stack"*, PropertyDescriptor { [[Get]]: _getter_, [[Set]]: _setter_, [[Enumerable]]: false, [[Configurable]]: true }).
75+
1. Perform ? DefinePropertyOrThrow(_O_, *"stack"*, PropertyDescriptor { [[Get]]: _getter_, [[Set]]: _setter_, [[Enumerable]]: false, [[Configurable]]: true }).
8076
1. Return *undefined*.
8177
</emu-alg>
8278
</emu-clause>

0 commit comments

Comments
 (0)