Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Conversation

michaelficarra
Copy link
Member

@michaelficarra michaelficarra commented Mar 5, 2018

This addresses @anba's comments in #26 (comment).

Fixes #27.

/cc @domenic @phoddie for review

proposal.html Outdated
<emu-alg>
1. If _func_ is a <emu-xref href="#sec-bound-function-exotic-objects">Bound Function exotic object</emu-xref> or a <emu-xref href="#sec-ecmascript-standard-built-in-objects">built-in Function object</emu-xref>, then return an implementation-dependent String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ is a <emu-xref href="#sec-well-known-intrinsic-objects">Well-known Intrinsic Object</emu-xref>, the portion of the returned String that would be matched by |IdentifierName| must be the initial value of the *name* property of _func_.
1. If _func_ has a [[SourceText]] internal slot and Type(_func_.[[SourceText]]) is String and ? HostHasSourceTextAvailable(_func_), then return _func_.[[SourceText]].
1. If _func_ has a [[SourceText]] internal slot and Type(_func_.[[SourceText]]) is String and HostHasSourceTextAvailable(_func_) is *true*, then return _func_.[[SourceText]].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this have a ! since it won't ever be abrupt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, this comes back to the issue @jmdyck raised--it depends whether you believe all abstract operations return a completion record!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this one certainly does.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it depends whether you believe all abstract operations return a completion record!

(It's actually orthogonal to that.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, HostHasSourceTextAvailable returns a completion record, I agree with @ljharb that a ! would be good.

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with !

@michaelficarra michaelficarra force-pushed the stricter-hosthassourcetextavailable branch from 05034fe to 94c03a8 Compare March 6, 2018 15:03
@michaelficarra michaelficarra merged commit cef8e1a into master Mar 6, 2018
@michaelficarra michaelficarra deleted the stricter-hosthassourcetextavailable branch March 6, 2018 15:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants