Don't externalize setTempRet0

It is not longer needed, as we stopped to do legalization for JS FFI.
This commit is contained in:
Sergey Pepyakin
2017-11-09 17:36:13 +03:00
parent 9edf1cb467
commit d2c1d92e2b
3 changed files with 6 additions and 8 deletions

View File

@@ -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 {
)
}
}
}