Revert "toplevel debug"

This reverts commit 5ea8d96f3e.
This commit is contained in:
Folkert 2022-11-23 20:29:55 +01:00
parent 5ea8d96f3e
commit dcb530d3af
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
5 changed files with 10 additions and 70 deletions

View file

@ -2398,25 +2398,6 @@ impl Declarations {
index
}
pub fn push_dbg(
&mut self,
preceding_comment: Region,
name: Symbol,
variable: Variable,
loc_expr: Loc<Expr>,
) -> usize {
let index = self.declarations.len();
self.declarations.push(DeclarationTag::Dbg);
self.variables.push(variable);
self.symbols.push(Loc::at(preceding_comment, name));
self.annotations.push(None);
self.expressions.push(loc_expr);
index
}
pub fn push_value_def(
&mut self,
symbol: Loc<Symbol>,
@ -2591,10 +2572,6 @@ impl Declarations {
MutualRecursion { .. } => {
// the self of this group will be treaded individually by later iterations
}
Dbg => {
let loc_expr = &self.expressions[index];
collector.visit_expr(&loc_expr.value, loc_expr.region, var);
}
Expectation => {
let loc_expr =
toplevel_expect_to_inline_expect_pure(self.expressions[index].clone());
@ -2621,7 +2598,6 @@ pub enum DeclarationTag {
Value,
Expectation,
ExpectationFx,
Dbg,
Function(Index<Loc<FunctionDef>>),
Recursive(Index<Loc<FunctionDef>>),
TailRecursive(Index<Loc<FunctionDef>>),
@ -2639,7 +2615,7 @@ impl DeclarationTag {
match self {
Function(_) | Recursive(_) | TailRecursive(_) => 1,
Value => 1,
Expectation | ExpectationFx | Dbg => 1,
Expectation | ExpectationFx => 1,
Destructure(_) => 1,
MutualRecursion { length, .. } => length as usize + 1,
}