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

[compiler][ez] Add types for Math.min, recursive global #30641

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

Copy link

vercel bot commented Aug 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2024 10:46pm

DEFAULT_GLOBALS.set(
'globalThis',
addObject(DEFAULT_SHAPES, 'globalThis', TYPED_GLOBALS),
);
DEFAULT_GLOBALS.set(
'global',
Copy link
Member

Choose a reason for hiding this comment

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

window too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I debated on adding window but figured we should leave it out for now. I wonder if we want to handle window and document separately as people often use these for DOM-manipulation (global mutable state)

@@ -136,6 +136,17 @@ const TYPED_GLOBALS: Array<[string, BuiltInType]> = [
returnValueKind: ValueKind.Primitive,
}),
],
[
'min',
Copy link
Member

Choose a reason for hiding this comment

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

whole bunch more Math.* stuff missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, added min as Math.min and Math.max differences surprised me a few times. Will go ahead and add a few others

@mofeiZ mofeiZ marked this pull request as ready for review August 8, 2024 22:33
@mofeiZ mofeiZ merged commit bfee82b into gh/mofeiZ/14/base Aug 9, 2024
19 checks passed
mofeiZ added a commit that referenced this pull request Aug 9, 2024
ghstack-source-id: 9940b8f96eec3fb2b411af8a7c92d93aae6da85e
Pull Request resolved: #30641
@mofeiZ mofeiZ deleted the gh/mofeiZ/14/head branch August 9, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants