-
Notifications
You must be signed in to change notification settings - Fork 1
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
Chore: improved code coverage #44
base: main
Are you sure you want to change the base?
Conversation
// Doesn't exist for Singlepass compiler | ||
// /// The ID of the WASM file, loads from cache | ||
// Id(String), | ||
// Unlikely to be used for tallyvm? | ||
// /// The path on disk of the WASM file | ||
// Path(String), | ||
/// The bytes of the binary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check with @FranklinWaller why we had this and we don't use it anymore? :)
// not used with singlepass compiler | ||
// pub fn wasm_cache_store<ID: ToString, T: AsRef<[u8]>>( | ||
// sedad_home: &Path, | ||
// store: &Store, | ||
// id: ID, | ||
// wasm_binary: T, | ||
// ) -> Result<Module> { | ||
// let wasm_cache_path = create_cache_path(sedad_home, id)?; | ||
// let module = Module::new(&store, &wasm_binary)?; | ||
|
||
// let mut file = File::create(wasm_cache_path)?; | ||
// let buffer = module.serialize()?; | ||
// file.write_all(&buffer)?; | ||
|
||
// Ok(module) | ||
// } | ||
|
||
// not used with singlepass compiler | ||
// pub fn wasm_cache_load<ID: ToString>(sedad_home: &Path, store: &Store, id: ID) -> Result<Module> { | ||
// let wasm_cache_path = create_cache_path(sedad_home, id)?; | ||
|
||
// unsafe { | ||
// let ret = Module::deserialize_from_file(&store, wasm_cache_path.clone()); | ||
|
||
// if ret.is_err() { | ||
// // If an error occurs while deserializing then we can not trust it anymore | ||
// // so delete the cache file | ||
// let _ = std::fs::remove_file(wasm_cache_path); | ||
// } | ||
|
||
// Ok(ret?) | ||
// } | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After checking it, if we don't use it and we don't intent to use it in the future, we could remove it, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, they are used on the overlay side where this was taken. I didn't remove it because I wasn't sure if we'd ever swap off singlepass. But I suppose it's safe to remove since we could always copy it back from the overlay?
Motivation
For the upcoming code audit.
Explanation of Changes
Testing
They all pass.
Related PRs and Issues
N/A