You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<emu-notetype="editor">It seems we could set up the environment either here or in Instantiate(). I've chosen to do so in Instantiate() for symmetry with Source Text Module Records, but I don't think there's any actual requirement in that regard.</emu-note>
<p>The abstract operation SetSyntheticModuleExport can be used to set or change the exported value for a pre-established export of a Synthetic Module Record. It performs the following steps:</p>
138
-
139
-
<emu-alg>
140
-
1. Let _envRec_ be _module_.[[Environment]]'s EnvironmentRecord.
<p>The following are the concrete methods for Synthetic Module Record that implement the corresponding Module Record abstract methods.</p>
149
138
150
139
<emu-notetype="editor">I find having this wrapping sub-clause cleaner and suggest we do the same for Source Text Module Records in the main spec.</emu-note>
<p>The ResolveExport concrete method of a Synthetic Module Record implements the corresponding Module Record abstract method.</p>
168
-
<p>It performs the following steps:</p>
155
+
<p>The ResolveExport concrete method of a Synthetic Module Record _module_ takes argument _exportName_ (a String) and optional argument _resolveSet_.</p>
156
+
<p>It performs the following steps when called:</p>
169
157
170
158
<emu-alg>
171
-
1. Let _module_ be this Synthetic Module Record.
172
159
1. If _module_.[[ExportNames]] does not contain _exportName_, return null.
173
160
1. Return ResolvedBinding Record { [[Module]]: _module_, [[BindingName]]: _exportName_ }.
174
161
</emu-alg>
175
162
</emu-clause>
176
163
177
-
<emu-clauseid="sec-smr-instantiate">
178
-
<h1>Instantiate ( )</h1>
164
+
<emu-clauseid="sec-synthetic-module-record-link">
165
+
<h1>Link ( )</h1>
179
166
180
-
<p>The Instantiate concrete method of a Synthetic Module Record implements the corresponding Module Record abstract method.</p>
181
-
<p>It performs the following steps:</p>
167
+
<p>The Link concrete method of a Synthetic Module Record _module_ takes no arguments.</p>
168
+
<p>It performs the following steps when called:</p>
182
169
183
170
<emu-alg>
184
-
1. Let _module_ be this Synthetic Module Record.
185
171
1. Let _realm_ be _module_.[[Realm]].
186
172
1.Assert:_realm_ is not *undefined*.
187
173
1. Let _env_ be NewModuleEnvironment(_realm_.[[GlobalEnv]]).
188
174
1. Set _module_.[[Environment]] to _env_.
189
-
1. Let _envRec_ be _env_'s EnvironmentRecord.
190
175
1. For each _exportName_ in _module_.[[ExportNames]],
<p>The CreateDefaultExportSyntheticModule abstract operation creates a Synthetic Module Record whose default export is _defaultExport_. It performs the following steps:</p>
<p>The CreateDefaultExportSyntheticModule abstract operation takes arguments _defaultExport_, _realm_ (a Realm), and _hostDefined_.</p>
220
+
<p>It performs the following steps when called:</p>
226
221
<emu-alg>
227
-
1. Return CreateSyntheticModule(«*"default"*», the following steps, the current Realm, _defaultExport_) with the following steps given _module_ as an argument:</p>
0 commit comments