From b2c02838dbfb59fa0932d670de878758965f82fb Mon Sep 17 00:00:00 2001 From: Pluriscient Date: Thu, 15 Apr 2021 14:54:36 +0200 Subject: [PATCH] Remove todos from vm --- bytecode/src/lib.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/bytecode/src/lib.rs b/bytecode/src/lib.rs index 29dc7c512..b59ded2b9 100644 --- a/bytecode/src/lib.rs +++ b/bytecode/src/lib.rs @@ -14,7 +14,6 @@ use std::collections::BTreeSet; use std::{fmt, hash}; /// Sourcecode location. -/// TODO start, end, middle? #[derive(Clone, Copy, Debug, Default, PartialEq, Serialize, Deserialize)] pub struct Location { row: usize, @@ -44,8 +43,6 @@ impl Location { } } -/// A Constant object is -/// TODO unclear pub trait Constant: Sized { type Name: AsRef; @@ -56,8 +53,6 @@ pub trait Constant: Sized { self.borrow_constant().into_data() } /// Map this Constant to a Bag's constant - /// - /// TODO Unclear. fn map_constant(self, bag: &Bag) -> Bag::Constant { bag.make_constant(self.into_data()) } @@ -588,7 +583,6 @@ pub enum ComparisonOperator { Is, IsNot, /// two exceptions that match? - /// TODO clarify ExceptionMatch, } @@ -635,7 +629,6 @@ pub enum BlockType { */ /// Argument structure -/// TODO is this for parameters or arguments? pub struct Arguments<'a, N: AsRef> { pub posonlyargs: &'a [N], pub args: &'a [N], @@ -664,10 +657,6 @@ impl> fmt::Debug for Arguments<'_, N> { impl CodeObject { /// Get all arguments of the code object /// like inspect.getargs - /// # Examples - /// - /// TODO I'm not sure what is the best way to construct a CodeObject - /// pub fn arg_names(&self) -> Arguments { let nargs = self.arg_count; let nkwargs = self.kwonlyarg_count; @@ -753,7 +742,6 @@ impl CodeObject { } /// Map this CodeObject to one that holds a Bag::Constant - /// TODO add example pub fn map_bag(self, bag: &Bag) -> CodeObject { let map_names = |names: Box<[C::Name]>| { names @@ -789,7 +777,6 @@ impl CodeObject { } /// Same as `map_bag` but clones `self` - /// TODO add example pub fn map_clone_bag(&self, bag: &Bag) -> CodeObject { let map_names = |names: &[C::Name]| { names @@ -943,8 +930,6 @@ impl Instruction { /// What effect this instruction has on the stack /// - /// TODO what exactly do the numbers represent? - /// /// # Examples /// /// ``` @@ -1229,7 +1214,6 @@ impl fmt::Debug for CodeObject { } /// A frozen module. Holds a code object and whether it is part of a package -/// TODO example #[derive(Serialize, Deserialize, Debug)] pub struct FrozenModule { #[serde(bound(