-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address review feedback #306
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4a82620
Remove completion wrapping
leobalter 1f6b0fb
Editorial note about performEval abstraction
leobalter 4947c22
Editorial: Remove [[Realm]] internal from wrapped exotic function obj…
leobalter 3ecb2e6
Editorial: Rename PerformRealmImportValue to RealmImportValue
leobalter 979371a
fixup! Editorial note about performEval abstraction
leobalter d60ac81
Update spec.html
leobalter 53da06d
Add editors markup to 'extensible web' notes
leobalter f11bbef
Fix result
leobalter 93aef74
Simplify completion record usage for consistency
leobalter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,18 +66,18 @@ <h1>Wrapped Function Exotic Objects</h1> | |
Callable Object | ||
</td> | ||
<td> | ||
The wrapped function object. | ||
Stores the callable object from the other Realm. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
[[Realm]] | ||
[[Call]] | ||
</td> | ||
<td> | ||
Realm Record | ||
The [[Call]] internal method | ||
</td> | ||
<td> | ||
The realm in which the wrapped function object was created. | ||
Executes code associated with this object's [[WrappedTargetFunction]]. | ||
</td> | ||
</tr> | ||
</tbody> | ||
|
@@ -98,7 +98,7 @@ <h1>[[Call]] ( _thisArgument_, _argumentsList_ )</h1> | |
1. Let _wrappedThisArgument_ to ? GetWrappedValue(_targetRealm_, _thisArgument_). | ||
1. Let _result_ be the Completion Record of Call(_target_, _wrappedThisArgument_, _argumentsList_). | ||
1. If _result_.[[Type]] is ~normal~ or _result_.[[Type]] is ~return~, then | ||
1. Set _value_ to NormalCompletion(_result_.[[Value]]). | ||
1. Set _value_ to _result_.[[Value]]. | ||
leobalter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
1. Return ? GetWrappedValue(_callerRealm_, _value_). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. value disappears, I need to send There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
1. Else, | ||
1. Throw a newly created TypeError object associate to the _callerRealm_. | ||
|
@@ -118,7 +118,6 @@ <h1>WrappedFunctionCreate ( _callerRealm_, _targetFunction_ )</h1> | |
1. Let _obj_ be ! MakeBasicObject(_internalSlotsList_). | ||
1. Set _obj_.[[Prototype]] to _callerRealm_.[[Intrinsics]].[[%Function.prototype%]]. | ||
1. Set _obj_.[[Call]] as described in <emu-xref href="#sec-wrapped-function-exotic-objects-call-thisargument-argumentslist"></emu-xref>. | ||
1. Set _obj_.[[Realm]] to _callerRealm_. | ||
1. Set _obj_.[[WrappedTargetFunction]] to _targetFunction_. | ||
1. Return _obj_. | ||
</emu-alg> | ||
|
@@ -172,10 +171,13 @@ <h1>PerformRealmEval ( _sourceText_, _callerRealm_, _evalRealm_ )</h1> | |
<emu-note type=editor> | ||
In the case of an abrupt ~throw~ completion, the type of error to be created should match the type of the abrupt throw completion record. This could be revisited when merging into the main specification. Additionally, in the case of a ~break~ or ~continue~ completion, since those are not supported, a TypeError is expected. There should be no ~return~ completion because this is a top level script evaluation, in which case a return |Statement| must result in a parsing error. | ||
</emu-note> | ||
<emu-note type=editor> | ||
Some thes PerformRealmEval steps are shared with |eval| and |Function| and should result into a shared abstraction when merged to ECMA-262. | ||
</emu-note> | ||
</emu-clause> | ||
|
||
<emu-clause id="sec-performrealmimportvalue" aoid="PerformRealmImportValue"> | ||
<h1>PerformRealmImportValue ( _specifierString_, _exportNameString_, _callerRealm_, _evalRealm_, _evalContext_ )</h1> | ||
<emu-clause id="sec-realmimportvalue" aoid="RealmImportValue"> | ||
<h1>RealmImportValue ( _specifierString_, _exportNameString_, _callerRealm_, _evalRealm_, _evalContext_ )</h1> | ||
<emu-alg> | ||
1. Assert: Type(_specifierString_) is String. | ||
1. Assert: Type(_exportNameString_) is String. | ||
|
@@ -295,7 +297,7 @@ <h1>Realm.prototype.importValue ( _specifier_, _exportName_ )</h1> | |
1. Let _callerRealm_ be the current Realm Record. | ||
1. Let _evalRealm_ be _O_.[[Realm]]. | ||
1. Let _evalContext_ be _O_.[[ExecutionContext]]. | ||
1. Return ? PerformRealmImportValue(_specifierString_, _exportNameString_, _callerRealm_, _evalRealm_, _evalContext_). | ||
1. Return ? RealmImportValue(_specifierString_, _exportNameString_, _callerRealm_, _evalRealm_, _evalContext_). | ||
</emu-alg> | ||
|
||
<emu-note> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added
[[Call]]
to the table to acknowledge the different behavior