Skip to content

ASify #1129

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 29 commits into from
Mar 3, 2020
Merged

ASify #1129

merged 29 commits into from
Mar 3, 2020

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Feb 27, 2020

This PR investigates what's necessary to make the compiler sources compatible with asc.

  • Add temporary fillers for Map#keys, Map#values and Set#values
  • Investigate property names conflicting with keywords, like module.if(...)
  • Convert abstract methods to trapping stubs
  • Investigate problems with field initializers referring to a super field, like kind = NodeKind.IF
  • Find a way to make binaryen.d.ts portable
  • Investigate duplicate module exports
  • Refactor src/builtins.ts (can't switch over strings)
  • Finish the remaining 200 or so builtin comments 🚀

For those interested: npm run asbuild && npm run astest

Issues found:

Goal is that we can integrate a new step into CI as a test whether PRs conform to portable AS, even though it is unlikely that we'll get a working Wasm variant out of this already.

Update: As it turned out the Wasm binary is deemed valid by Binaryen and instantiates just fine, which is already more than what I expected. One can also call its exports, like provide and let it parse a file, but it ultimately fails when trying to compile a program due to virtual calls not yet being implemented, calling the wrong methods. More problems expected once we implement that, but so far I call that a success :)

@dcodeIO dcodeIO marked this pull request as ready for review March 3, 2020 02:55
@dcodeIO dcodeIO merged commit a3b18e7 into master Mar 3, 2020
@dcodeIO dcodeIO deleted the ASify branch March 15, 2020 13:35
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.

2 participants