diff --git a/bytecode/src/bytecode.rs b/bytecode/src/bytecode.rs index 922ed78c0..217eacb49 100644 --- a/bytecode/src/bytecode.rs +++ b/bytecode/src/bytecode.rs @@ -258,7 +258,6 @@ pub enum Instruction { before: usize, after: usize, }, - Unpack, FormatValue { conversion: Option, spec: String, @@ -522,7 +521,6 @@ impl Instruction { LoadBuildClass => w!(LoadBuildClass), UnpackSequence { size } => w!(UnpackSequence, size), UnpackEx { before, after } => w!(UnpackEx, before, after), - Unpack => w!(Unpack), FormatValue { spec, .. } => w!(FormatValue, spec), // TODO: write conversion PopException => w!(PopException), Reverse { amount } => w!(Reverse, amount), diff --git a/compiler/src/compile.rs b/compiler/src/compile.rs index cf6405d81..890ff8e3a 100644 --- a/compiler/src/compile.rs +++ b/compiler/src/compile.rs @@ -1617,9 +1617,8 @@ impl Compiler { self.compile_comprehension(kind, generators)?; } Starred { .. } => { - use std::string::String; return Err(CompileError { - error: CompileErrorType::SyntaxError(String::from( + error: CompileErrorType::SyntaxError(std::string::String::from( "Invalid starred expression", )), location: self.current_source_location.clone(), diff --git a/vm/src/frame.rs b/vm/src/frame.rs index b9a912e3a..ec5bcf658 100644 --- a/vm/src/frame.rs +++ b/vm/src/frame.rs @@ -478,7 +478,6 @@ impl Frame { bytecode::Instruction::UnpackEx { before, after } => { self.execute_unpack_ex(vm, *before, *after) } - bytecode::Instruction::Unpack => self.execute_unpack(vm), bytecode::Instruction::FormatValue { conversion, spec } => { use bytecode::ConversionFlag::*; let value = match conversion { @@ -979,15 +978,6 @@ impl Frame { } } - fn execute_unpack(&self, vm: &VirtualMachine) -> FrameResult { - let value = self.pop_value(); - let elements = vm.extract_elements(&value)?; - for element in elements.into_iter().rev() { - self.push_value(element); - } - Ok(None) - } - fn jump(&self, label: bytecode::Label) { let target_pc = self.code.label_map[&label]; #[cfg(feature = "vm-tracing-logging")]