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

Support .wast extention for --textFile #1545

Merged
merged 1 commit into from
Nov 23, 2020
Merged

Support .wast extention for --textFile #1545

merged 1 commit into from
Nov 23, 2020

Conversation

MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Nov 11, 2020

this add ability print .wast (superset text format) as well.

@dcodeIO Sometimes this preferable. Especially useful for producing binaryen's test cases.

This shouldn't break any backward compatibility.

  • I've read the contributing guidelines

@dcodeIO
Copy link
Member

dcodeIO commented Nov 11, 2020

Note that Binaryen's .wast format isn't strictly a superset because it represents some instructions in non-standard ways, for example by having tuple.make etc. instructions that only map to Wasm text format after postprocessing, or explicit pops. As such I worry that this might become confusing if folks are using .wast still, expecting the output to be valid, and never switched to .wat, but I agree that providing a way to emit Binaryen's format is nice to have. Perhaps --binaryenFile?

Also I'm not sure if .wast is already reserved for Wasm test cases with assert_return instructions etc.?

@MaxGraey
Copy link
Member Author

MaxGraey commented Nov 11, 2020

Note that Binaryen's .wast format isn't strictly a superset because it represents some instructions in non-standard ways

I know. That's why it still use by default.

Also I'm not sure if .wast is already reserved for Wasm test cases with assert_return instructions etc.?

I don't think so. But one of main goals of this changes is producing text fixtures for binaryen's test files as well

@MaxGraey
Copy link
Member Author

I worry that this might become confusing if folks are using .wast still, expecting the output to be valid, and never switched to .wat, but I agree that providing a way to emit Binaryen's format is nice to have. Perhaps --binaryenFile?

If somebody still use .wast but expect .wat I guess it has pretty old AS and when it update perhaps just ask here what was changed? --binaryenFile isn't clear. Also we already have a lot of keys binaryFile, jsFile, textFile, dtsFile and etc.

@dcodeIO dcodeIO merged commit 0544b87 into AssemblyScript:master Nov 23, 2020
@MaxGraey MaxGraey deleted the emit-text branch November 23, 2020 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants