diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 81b9201..d70de10 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -34,7 +34,7 @@ name = "wasm-pack" path = "pack/main.rs" [dependencies] -parity-wasm = "0.30" +parity-wasm = "0.31" pwasm-utils = { path = "..", version = "0.2" } glob = "0.2" clap = "2.24" diff --git a/src/gas.rs b/src/gas.rs index c189fe1..14f8365 100644 --- a/src/gas.rs +++ b/src/gas.rs @@ -271,7 +271,7 @@ mod tests { #[test] fn simple_grow() { - use parity_wasm::elements::Opcode::*; + use parity_wasm::elements::Instruction::*; let module = builder::module() .global() @@ -280,7 +280,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Opcodes::new( + .with_instructions(elements::Instructions::new( vec![ GetGlobal(0), GrowMemory(0), @@ -326,7 +326,7 @@ mod tests { #[test] fn grow_no_gas_no_track() { - use parity_wasm::elements::Opcode::*; + use parity_wasm::elements::Instruction::*; let module = builder::module() .global() @@ -335,7 +335,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Opcodes::new( + .with_instructions(elements::Instructions::new( vec![ GetGlobal(0), GrowMemory(0), @@ -369,7 +369,7 @@ mod tests { #[test] fn simple() { - use parity_wasm::elements::Opcode::*; + use parity_wasm::elements::Instruction::*; let module = builder::module() .global() @@ -378,7 +378,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Opcodes::new( + .with_instructions(elements::Instructions::new( vec![ GetGlobal(0), End @@ -405,7 +405,7 @@ mod tests { #[test] fn nested() { - use parity_wasm::elements::Opcode::*; + use parity_wasm::elements::Instruction::*; let module = builder::module() .global() @@ -414,7 +414,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Opcodes::new( + .with_instructions(elements::Instructions::new( vec![ GetGlobal(0), Block(elements::BlockType::NoResult), @@ -455,7 +455,7 @@ mod tests { #[test] fn ifelse() { - use parity_wasm::elements::Opcode::*; + use parity_wasm::elements::Instruction::*; let module = builder::module() .global() @@ -464,7 +464,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Opcodes::new( + .with_instructions(elements::Instructions::new( vec![ GetGlobal(0), If(elements::BlockType::NoResult), @@ -513,7 +513,7 @@ mod tests { #[test] fn call_index() { - use parity_wasm::elements::Opcode::*; + use parity_wasm::elements::Instruction::*; let module = builder::module() .global() @@ -526,7 +526,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Opcodes::new( + .with_instructions(elements::Instructions::new( vec![ Call(0), If(elements::BlockType::NoResult), @@ -576,7 +576,7 @@ mod tests { #[test] fn forbidden() { - use parity_wasm::elements::Opcode::*; + use parity_wasm::elements::Instruction::*; let module = builder::module() .global() @@ -585,7 +585,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Opcodes::new( + .with_instructions(elements::Instructions::new( vec![ F32Const(555555), End diff --git a/src/optimizer.rs b/src/optimizer.rs index 62a37e5..3a2f9d6 100644 --- a/src/optimizer.rs +++ b/src/optimizer.rs @@ -435,7 +435,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Instructions::new( + .with_instructions(elements::Instructions::new( vec![ elements::Instruction::GetGlobal(0), elements::Instruction::End @@ -477,7 +477,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Instructions::new( + .with_instructions(elements::Instructions::new( vec![ elements::Instruction::GetGlobal(1), elements::Instruction::End @@ -510,7 +510,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Instructions::new( + .with_instructions(elements::Instructions::new( vec![ elements::Instruction::Call(1), elements::Instruction::End @@ -563,7 +563,7 @@ mod tests { .function() .signature().param().i32().build() .body() - .with_opcodes(elements::Instructions::new( + .with_instructions(elements::Instructions::new( vec![ elements::Instruction::CallIndirect(1, 0), elements::Instruction::End diff --git a/src/pack.rs b/src/pack.rs index ee38d34..fc52890 100644 --- a/src/pack.rs +++ b/src/pack.rs @@ -249,7 +249,7 @@ mod test { .function() .signature().build() .body() - .with_opcodes(elements::Instructions::new( + .with_instructions(elements::Instructions::new( vec![ elements::Instruction::End ] @@ -259,7 +259,7 @@ mod test { .function() .signature().build() .body() - .with_opcodes(elements::Instructions::new( + .with_instructions(elements::Instructions::new( vec![ elements::Instruction::End ] @@ -298,7 +298,7 @@ mod test { .function() .signature().build() .body() - .with_opcodes(elements::Instructions::new( + .with_instructions(elements::Instructions::new( vec![ elements::Instruction::End ] @@ -308,7 +308,7 @@ mod test { .function() .signature().build() .body() - .with_opcodes(elements::Instructions::new( + .with_instructions(elements::Instructions::new( vec![ elements::Instruction::End ]