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

Implement most of the Scala.js IR code generator. #1148

Merged
merged 5 commits into from
Mar 18, 2016

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Mar 7, 2016

Notable things that are missing at this point:

  • Pattern matching
  • Try
  • Scala.js-defined JS classes
  • JavaScript exports

Otherwise, the code generator is pretty complete. It is able to correctly compile and link a modified version of the Reversi demo (modified not to use any pattern matching).

Whether a language SAM type is also a valid SAM type for the
back-end is a platform-specific thing. On Scala.js, for example,
the rules are completely different than for the JVM.

This commit therefore moves the logic of the predicate used by
ExpandSAMs to decide whether to expand a SAM as an anonymous class
to the Platform.
@sjrd
Copy link
Member Author

sjrd commented Mar 7, 2016

Review by @DarkDimius

@sjrd sjrd force-pushed the scalajs-gen-exprs branch 3 times, most recently from ac6067c to 94bc01a Compare March 8, 2016 11:24
@sjrd
Copy link
Member Author

sjrd commented Mar 8, 2016

Addressed @smarter's comments from sjrd@d5a637d

@DarkDimius
Copy link
Member

1,297 additions, 66 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

@sjrd I'd be glad to review. But would you please break the 94bc01a commit apart to make GitHub show the diff?

Notable things that are missing at this point:

* Pattern matching
* Try
* Most of the JavaScript interop
@sjrd
Copy link
Member Author

sjrd commented Mar 10, 2016

@DarkDimius Done. I separated the JS interop stuff in a separate commit. Now each commit shows a correct diff. If you want I can even remove the JS interop commit from this PR, and bring it back in a follow up PR. As you prefer.

Notable things that are not yet implemented:
* JS exports
* Scala.js-defined JS classes.
@DarkDimius
Copy link
Member

Otherwise LGTM

@sjrd
Copy link
Member Author

sjrd commented Mar 16, 2016

@DarkDimius Updated. I declared caches for the phases, and I added more documentation explaining what you commented on.

odersky added a commit that referenced this pull request Mar 18, 2016
Implement most of the Scala.js IR code generator.
@odersky odersky merged commit d875fef into scala:master Mar 18, 2016
@sjrd sjrd deleted the scalajs-gen-exprs branch March 18, 2016 10:29
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.

None yet

3 participants