Skip to content
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

InstantiateFunctionObject (etc) annotated with [UC] (user code)? #2668

Closed
bathos opened this issue Feb 19, 2022 · 2 comments
Closed

InstantiateFunctionObject (etc) annotated with [UC] (user code)? #2668

bathos opened this issue Feb 19, 2022 · 2 comments

Comments

@bathos
Copy link
Contributor

bathos commented Feb 19, 2022

InstantiateFunctionObject is annotated with the [UC]/user code marker seemingly due to:

Which in turn stem from DefinePropertyOrThrow(F, "prototype", ...) steps in both. As far as I can tell, these are mistaken annotations and these ops are guaranteed to succeed. The [UC]s “born” here propagate into a number of other places, too, like InitializeEnvironment which (definitionally?) could never run user code, right?

For InstantiateAsyncGeneratorFunctionObject, however, I notice the annotation only appears in the case that the declaration is a no-identifier default export production, not an ordinary declaration, which seemed kinda random until I noticed the ordinary declaration had an explicit ! while the default-export case didn’t. I think that’s probably the common theme (missing !s), though I’m not sure exactly how the [UC] annotations work yet and may be misunderstanding something.

I didn’t see any mention of these productions in #2548 and am unsure if they were already present when that was merged.

@bakkot
Copy link
Contributor

bakkot commented Feb 19, 2022

This is a consequence of missing a ! in the Perform DefinePropertyOrThrow(...) steps within those algorithms (which I mentioned in #2548 (comment)), and will be fixed by #2547.

@bathos
Copy link
Contributor Author

bathos commented Feb 19, 2022

Ah, cool, I’ll close it given it’s covered elsewhere.

@bathos bathos closed this as completed Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants