Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

[Swift+WASM] Add an ABI hook for whether swiftcc is supported. #236

Closed

Conversation

ddunbar
Copy link
Member

@ddunbar ddunbar commented Nov 20, 2018

  • This adds an extension point so the ABI can declare whether or not it supports the swift calling convention. Open to suggestions if you think this doesn't belong here (or is flat out the wrong thing to try and to do bring up wasm).

  • Depends on [Swift+WASM] Adopt SwiftABIInfo for WebAssembly. #235.

@DougGregor
Copy link
Member

I feel like @rjmccall is in a better position to review this.

@rjmccall
Copy link
Member

I've resisted doing this on other targets because:

  • it's basically trivial to support the CC on a target by just using the standard rules for your platform (or, in this case, ignore it when preparing wasm output);
  • it's not at all unreasonable to think that a backend might want to give special treatment to swifterror and swiftself, and doing so is much easier if they only appear in conjunction with swiftcc; and
  • it's much easier to write portable tests for frontend IR output if as much as possible is consistent across targets.

@ddunbar
Copy link
Member Author

ddunbar commented Nov 26, 2018

@rjmccall that makes a lot of sense, thanks. Will investigate that angle instead.

@ddunbar ddunbar closed this Nov 26, 2018
@ddunbar ddunbar deleted the swasm-add-swiftcc-hook branch January 3, 2019 23:31
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants