mirror of
https://github.com/fluencelabs/wasm-utils
synced 2025-07-31 05:52:03 +00:00
Don't externalize setTempRet0
It is not longer needed, as we stopped to do legalization for JS FFI.
This commit is contained in:
@@ -12,7 +12,7 @@ use std::path::PathBuf;
|
||||
use clap::{App, Arg};
|
||||
use parity_wasm::elements;
|
||||
|
||||
use wasm_utils::{CREATE_SYMBOL, CALL_SYMBOL, SET_TEMP_RET_SYMBOL};
|
||||
use wasm_utils::{CREATE_SYMBOL, CALL_SYMBOL};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
@@ -113,7 +113,7 @@ fn main() {
|
||||
let mut ctor_module = module.clone();
|
||||
|
||||
if !matches.is_present("skip_optimization") {
|
||||
wasm_utils::optimize(&mut module, vec![CALL_SYMBOL, SET_TEMP_RET_SYMBOL]).expect("Optimizer to finish without errors");
|
||||
wasm_utils::optimize(&mut module, vec![CALL_SYMBOL]).expect("Optimizer to finish without errors");
|
||||
}
|
||||
|
||||
let raw_module = parity_wasm::serialize(module).expect("Failed to serialize module");
|
||||
@@ -123,7 +123,7 @@ fn main() {
|
||||
// Otherwise it will just save an optimised raw_module
|
||||
if has_ctor(&ctor_module) {
|
||||
if !matches.is_present("skip_optimization") {
|
||||
wasm_utils::optimize(&mut ctor_module, vec![CREATE_SYMBOL, SET_TEMP_RET_SYMBOL]).expect("Optimizer to finish without errors");
|
||||
wasm_utils::optimize(&mut ctor_module, vec![CREATE_SYMBOL]).expect("Optimizer to finish without errors");
|
||||
}
|
||||
wasm_utils::pack_instance(raw_module, &mut ctor_module);
|
||||
parity_wasm::serialize_to_file(&path, ctor_module).expect("Failed to serialize to file");
|
||||
@@ -165,4 +165,4 @@ mod tests {
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user