Skip to content

Scala.js: Support for some more JS-specific features #9602

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

Merged
merged 5 commits into from
Aug 24, 2020

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Aug 19, 2020

No description provided.

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

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

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Commit Messages

We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).

Please stick to these guidelines for commit messages:

  1. Separate subject from body with a blank line
  2. When fixing an issue, start your commit message with Fix #<ISSUE-NBR>:
  3. Limit the subject line to 72 characters
  4. Capitalize the subject line
  5. Do not end the subject line with a period
  6. Use the imperative mood in the subject line ("Add" instead of "Added")
  7. Wrap the body at 80 characters
  8. Use the body to explain what and why vs. how

adapted from https://chris.beams.io/posts/git-commit

Have an awesome day! ☀️

@sjrd sjrd force-pushed the sjs-js-specific-features branch 3 times, most recently from 998c423 to 65eda26 Compare August 21, 2020 15:40
sjrd added 5 commits August 22, 2020 07:35
They do not cause a StackOverflow error anymore, but they still do
not pass due to other reasons.
To do this, we add a new mini-phase that rewrites calls of the form

  scala.scalajs.js.constructor[T]

to

  scala.scalajs.runtime.constructorOf(classOf[T])

The back-end already knew how to compile calls to
`runtime.constructorOf`, so there were no changes needed there.

The new mini-phase will also serve in the future for handling
inner and local JS classes.
@sjrd sjrd force-pushed the sjs-js-specific-features branch from 65eda26 to d6fe8b9 Compare August 22, 2020 05:37
@nicolasstucki nicolasstucki merged commit 1df0b15 into scala:master Aug 24, 2020
@nicolasstucki nicolasstucki deleted the sjs-js-specific-features branch August 24, 2020 09:03
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

Successfully merging this pull request may close these issues.

3 participants