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

Adds unsafe flag to skip typechecker #53

Merged
merged 2 commits into from
Sep 17, 2023

Conversation

filipeom
Copy link
Collaborator

@filipeom filipeom commented Sep 17, 2023

Attemps to introduce unsafe flag for optimized owi_sym.

This flag facilitates benchmarking on WebAssembly programs derived from C code, where prior typechecking has already occurred during compilation.

@zapashcanon
Copy link
Member

Thanks !

Could you also add the flag to the Compile.until_check function ? (you'll have to add it to all intermediate functions)

This check should also be useless in case of generated module. It's not that expensive but it may save a little bit of time.

For some reason the Check.modul function returns a module but it's the same as the original one. I'm not sure why I didn't make it return a (unit, string) Result.t instead...

@filipeom
Copy link
Collaborator Author

Done, if you want I can also change the signature of Check.modul and Compile.until_check to be of (unit, string) Result.t 😃

@zapashcanon
Copy link
Member

Thanks.

Actually I remember now why I did this. It was a reminder to add some kind of phantom type to make sure we always go through Check.modul (it's easy to forget...). Then we would also provide a Check.modul_fake or something to typecheck when we want to be unsafe but we know what we're doing.

I'll handle this later at some point, no need for you to do it. :)

@zapashcanon zapashcanon merged commit 802f1d8 into OCamlPro:main Sep 17, 2023
0 of 3 checks passed
@filipeom filipeom deleted the unsafe-flag branch September 17, 2023 20:56
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