diff --git a/crates/biome_css_syntax/src/generated/nodes.rs b/crates/biome_css_syntax/src/generated/nodes.rs index c91f00b68569..d1155172e9ad 100644 --- a/crates/biome_css_syntax/src/generated/nodes.rs +++ b/crates/biome_css_syntax/src/generated/nodes.rs @@ -8928,10 +8928,10 @@ impl AstNode for CssAtRule { } impl std::fmt::Debug for CssAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssAtRule") .field("at_token", &support::DebugSyntaxResult(self.at_token())) .field("rule", &support::DebugSyntaxResult(self.rule())) @@ -8939,7 +8939,7 @@ impl std::fmt::Debug for CssAtRule { } else { f.debug_struct("CssAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8976,10 +8976,10 @@ impl AstNode for CssAttributeMatcher { } impl std::fmt::Debug for CssAttributeMatcher { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssAttributeMatcher") .field("operator", &support::DebugSyntaxResult(self.operator())) .field("value", &support::DebugSyntaxResult(self.value())) @@ -8988,7 +8988,7 @@ impl std::fmt::Debug for CssAttributeMatcher { } else { f.debug_struct("CssAttributeMatcher").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9025,17 +9025,17 @@ impl AstNode for CssAttributeMatcherValue { } impl std::fmt::Debug for CssAttributeMatcherValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssAttributeMatcherValue") .field("name", &support::DebugSyntaxResult(self.name())) .finish() } else { f.debug_struct("CssAttributeMatcherValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9072,10 +9072,10 @@ impl AstNode for CssAttributeName { } impl std::fmt::Debug for CssAttributeName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssAttributeName") .field( "namespace", @@ -9086,7 +9086,7 @@ impl std::fmt::Debug for CssAttributeName { } else { f.debug_struct("CssAttributeName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9123,10 +9123,10 @@ impl AstNode for CssAttributeSelector { } impl std::fmt::Debug for CssAttributeSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssAttributeSelector") .field( "l_brack_token", @@ -9142,7 +9142,7 @@ impl std::fmt::Debug for CssAttributeSelector { } else { f.debug_struct("CssAttributeSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9179,10 +9179,10 @@ impl AstNode for CssBinaryExpression { } impl std::fmt::Debug for CssBinaryExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssBinaryExpression") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -9194,7 +9194,7 @@ impl std::fmt::Debug for CssBinaryExpression { } else { f.debug_struct("CssBinaryExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9231,10 +9231,10 @@ impl AstNode for CssBracketedValue { } impl std::fmt::Debug for CssBracketedValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssBracketedValue") .field( "l_brack_token", @@ -9249,7 +9249,7 @@ impl std::fmt::Debug for CssBracketedValue { } else { f.debug_struct("CssBracketedValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9286,10 +9286,10 @@ impl AstNode for CssCharsetAtRule { } impl std::fmt::Debug for CssCharsetAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssCharsetAtRule") .field( "charset_token", @@ -9304,7 +9304,7 @@ impl std::fmt::Debug for CssCharsetAtRule { } else { f.debug_struct("CssCharsetAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9341,10 +9341,10 @@ impl AstNode for CssClassSelector { } impl std::fmt::Debug for CssClassSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssClassSelector") .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -9352,7 +9352,7 @@ impl std::fmt::Debug for CssClassSelector { } else { f.debug_struct("CssClassSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9389,10 +9389,10 @@ impl AstNode for CssColor { } impl std::fmt::Debug for CssColor { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssColor") .field("hash_token", &support::DebugSyntaxResult(self.hash_token())) .field( @@ -9403,7 +9403,7 @@ impl std::fmt::Debug for CssColor { } else { f.debug_struct("CssColor").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9440,10 +9440,10 @@ impl AstNode for CssColorProfileAtRule { } impl std::fmt::Debug for CssColorProfileAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssColorProfileAtRule") .field( "color_profile_token", @@ -9455,7 +9455,7 @@ impl std::fmt::Debug for CssColorProfileAtRule { } else { f.debug_struct("CssColorProfileAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9492,10 +9492,10 @@ impl AstNode for CssComplexSelector { } impl std::fmt::Debug for CssComplexSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssComplexSelector") .field("left", &support::DebugSyntaxResult(self.left())) .field("combinator", &support::DebugSyntaxResult(self.combinator())) @@ -9504,7 +9504,7 @@ impl std::fmt::Debug for CssComplexSelector { } else { f.debug_struct("CssComplexSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9541,10 +9541,10 @@ impl AstNode for CssComposesImportSpecifier { } impl std::fmt::Debug for CssComposesImportSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssComposesImportSpecifier") .field("from_token", &support::DebugSyntaxResult(self.from_token())) .field("source", &support::DebugSyntaxResult(self.source())) @@ -9552,7 +9552,7 @@ impl std::fmt::Debug for CssComposesImportSpecifier { } else { f.debug_struct("CssComposesImportSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9589,10 +9589,10 @@ impl AstNode for CssComposesProperty { } impl std::fmt::Debug for CssComposesProperty { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssComposesProperty") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -9604,7 +9604,7 @@ impl std::fmt::Debug for CssComposesProperty { } else { f.debug_struct("CssComposesProperty").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9641,10 +9641,10 @@ impl AstNode for CssComposesPropertyValue { } impl std::fmt::Debug for CssComposesPropertyValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssComposesPropertyValue") .field("classes", &self.classes()) .field( @@ -9655,7 +9655,7 @@ impl std::fmt::Debug for CssComposesPropertyValue { } else { f.debug_struct("CssComposesPropertyValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9692,10 +9692,10 @@ impl AstNode for CssCompoundSelector { } impl std::fmt::Debug for CssCompoundSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssCompoundSelector") .field("nesting_selectors", &self.nesting_selectors()) .field( @@ -9707,7 +9707,7 @@ impl std::fmt::Debug for CssCompoundSelector { } else { f.debug_struct("CssCompoundSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9744,10 +9744,10 @@ impl AstNode for CssContainerAndQuery { } impl std::fmt::Debug for CssContainerAndQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerAndQuery") .field("left", &support::DebugSyntaxResult(self.left())) .field("and_token", &support::DebugSyntaxResult(self.and_token())) @@ -9756,7 +9756,7 @@ impl std::fmt::Debug for CssContainerAndQuery { } else { f.debug_struct("CssContainerAndQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9793,10 +9793,10 @@ impl AstNode for CssContainerAtRule { } impl std::fmt::Debug for CssContainerAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerAtRule") .field( "container_token", @@ -9809,7 +9809,7 @@ impl std::fmt::Debug for CssContainerAtRule { } else { f.debug_struct("CssContainerAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9846,10 +9846,10 @@ impl AstNode for CssContainerNotQuery { } impl std::fmt::Debug for CssContainerNotQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerNotQuery") .field("not_token", &support::DebugSyntaxResult(self.not_token())) .field("query", &support::DebugSyntaxResult(self.query())) @@ -9857,7 +9857,7 @@ impl std::fmt::Debug for CssContainerNotQuery { } else { f.debug_struct("CssContainerNotQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9894,10 +9894,10 @@ impl AstNode for CssContainerOrQuery { } impl std::fmt::Debug for CssContainerOrQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerOrQuery") .field("left", &support::DebugSyntaxResult(self.left())) .field("or_token", &support::DebugSyntaxResult(self.or_token())) @@ -9906,7 +9906,7 @@ impl std::fmt::Debug for CssContainerOrQuery { } else { f.debug_struct("CssContainerOrQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9943,10 +9943,10 @@ impl AstNode for CssContainerQueryInParens { } impl std::fmt::Debug for CssContainerQueryInParens { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerQueryInParens") .field( "l_paren_token", @@ -9961,7 +9961,7 @@ impl std::fmt::Debug for CssContainerQueryInParens { } else { f.debug_struct("CssContainerQueryInParens").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9998,10 +9998,10 @@ impl AstNode for CssContainerSizeFeatureInParens { } impl std::fmt::Debug for CssContainerSizeFeatureInParens { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerSizeFeatureInParens") .field( "l_paren_token", @@ -10016,7 +10016,7 @@ impl std::fmt::Debug for CssContainerSizeFeatureInParens { } else { f.debug_struct("CssContainerSizeFeatureInParens").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10053,10 +10053,10 @@ impl AstNode for CssContainerStyleAndQuery { } impl std::fmt::Debug for CssContainerStyleAndQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerStyleAndQuery") .field("left", &support::DebugSyntaxResult(self.left())) .field("and_token", &support::DebugSyntaxResult(self.and_token())) @@ -10065,7 +10065,7 @@ impl std::fmt::Debug for CssContainerStyleAndQuery { } else { f.debug_struct("CssContainerStyleAndQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10102,10 +10102,10 @@ impl AstNode for CssContainerStyleInParens { } impl std::fmt::Debug for CssContainerStyleInParens { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerStyleInParens") .field( "l_paren_token", @@ -10120,7 +10120,7 @@ impl std::fmt::Debug for CssContainerStyleInParens { } else { f.debug_struct("CssContainerStyleInParens").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10157,10 +10157,10 @@ impl AstNode for CssContainerStyleNotQuery { } impl std::fmt::Debug for CssContainerStyleNotQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerStyleNotQuery") .field("not_token", &support::DebugSyntaxResult(self.not_token())) .field("query", &support::DebugSyntaxResult(self.query())) @@ -10168,7 +10168,7 @@ impl std::fmt::Debug for CssContainerStyleNotQuery { } else { f.debug_struct("CssContainerStyleNotQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10205,10 +10205,10 @@ impl AstNode for CssContainerStyleOrQuery { } impl std::fmt::Debug for CssContainerStyleOrQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerStyleOrQuery") .field("left", &support::DebugSyntaxResult(self.left())) .field("or_token", &support::DebugSyntaxResult(self.or_token())) @@ -10217,7 +10217,7 @@ impl std::fmt::Debug for CssContainerStyleOrQuery { } else { f.debug_struct("CssContainerStyleOrQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10254,10 +10254,10 @@ impl AstNode for CssContainerStyleQueryInParens { } impl std::fmt::Debug for CssContainerStyleQueryInParens { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssContainerStyleQueryInParens") .field( "style_token", @@ -10276,7 +10276,7 @@ impl std::fmt::Debug for CssContainerStyleQueryInParens { } else { f.debug_struct("CssContainerStyleQueryInParens").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10313,10 +10313,10 @@ impl AstNode for CssCounterStyleAtRule { } impl std::fmt::Debug for CssCounterStyleAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssCounterStyleAtRule") .field( "counter_style_token", @@ -10328,7 +10328,7 @@ impl std::fmt::Debug for CssCounterStyleAtRule { } else { f.debug_struct("CssCounterStyleAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10365,10 +10365,10 @@ impl AstNode for CssCustomIdentifier { } impl std::fmt::Debug for CssCustomIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssCustomIdentifier") .field( "value_token", @@ -10378,7 +10378,7 @@ impl std::fmt::Debug for CssCustomIdentifier { } else { f.debug_struct("CssCustomIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10415,10 +10415,10 @@ impl AstNode for CssDashedIdentifier { } impl std::fmt::Debug for CssDashedIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDashedIdentifier") .field( "value_token", @@ -10428,7 +10428,7 @@ impl std::fmt::Debug for CssDashedIdentifier { } else { f.debug_struct("CssDashedIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10465,10 +10465,10 @@ impl AstNode for CssDeclaration { } impl std::fmt::Debug for CssDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDeclaration") .field("property", &support::DebugSyntaxResult(self.property())) .field( @@ -10479,7 +10479,7 @@ impl std::fmt::Debug for CssDeclaration { } else { f.debug_struct("CssDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10516,10 +10516,10 @@ impl AstNode for CssDeclarationBlock { } impl std::fmt::Debug for CssDeclarationBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDeclarationBlock") .field( "l_curly_token", @@ -10534,7 +10534,7 @@ impl std::fmt::Debug for CssDeclarationBlock { } else { f.debug_struct("CssDeclarationBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10571,10 +10571,10 @@ impl AstNode for CssDeclarationImportant { } impl std::fmt::Debug for CssDeclarationImportant { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDeclarationImportant") .field("excl_token", &support::DebugSyntaxResult(self.excl_token())) .field( @@ -10585,7 +10585,7 @@ impl std::fmt::Debug for CssDeclarationImportant { } else { f.debug_struct("CssDeclarationImportant").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10622,10 +10622,10 @@ impl AstNode for CssDeclarationOrAtRuleBlock { } impl std::fmt::Debug for CssDeclarationOrAtRuleBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDeclarationOrAtRuleBlock") .field( "l_curly_token", @@ -10640,7 +10640,7 @@ impl std::fmt::Debug for CssDeclarationOrAtRuleBlock { } else { f.debug_struct("CssDeclarationOrAtRuleBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10677,10 +10677,10 @@ impl AstNode for CssDeclarationOrRuleBlock { } impl std::fmt::Debug for CssDeclarationOrRuleBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDeclarationOrRuleBlock") .field( "l_curly_token", @@ -10695,7 +10695,7 @@ impl std::fmt::Debug for CssDeclarationOrRuleBlock { } else { f.debug_struct("CssDeclarationOrRuleBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10732,10 +10732,10 @@ impl AstNode for CssDeclarationWithSemicolon { } impl std::fmt::Debug for CssDeclarationWithSemicolon { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDeclarationWithSemicolon") .field( "declaration", @@ -10749,7 +10749,7 @@ impl std::fmt::Debug for CssDeclarationWithSemicolon { } else { f.debug_struct("CssDeclarationWithSemicolon").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10786,10 +10786,10 @@ impl AstNode for CssDocumentAtRule { } impl std::fmt::Debug for CssDocumentAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDocumentAtRule") .field( "document_token", @@ -10801,7 +10801,7 @@ impl std::fmt::Debug for CssDocumentAtRule { } else { f.debug_struct("CssDocumentAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10838,10 +10838,10 @@ impl AstNode for CssDocumentCustomMatcher { } impl std::fmt::Debug for CssDocumentCustomMatcher { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssDocumentCustomMatcher") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -10857,7 +10857,7 @@ impl std::fmt::Debug for CssDocumentCustomMatcher { } else { f.debug_struct("CssDocumentCustomMatcher").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10894,10 +10894,10 @@ impl AstNode for CssEmptyDeclaration { } impl std::fmt::Debug for CssEmptyDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssEmptyDeclaration") .field( "semicolon_token", @@ -10907,7 +10907,7 @@ impl std::fmt::Debug for CssEmptyDeclaration { } else { f.debug_struct("CssEmptyDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10944,10 +10944,10 @@ impl AstNode for CssFontFaceAtRule { } impl std::fmt::Debug for CssFontFaceAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssFontFaceAtRule") .field( "font_face_token", @@ -10958,7 +10958,7 @@ impl std::fmt::Debug for CssFontFaceAtRule { } else { f.debug_struct("CssFontFaceAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10995,17 +10995,17 @@ impl AstNode for CssFontFamilyName { } impl std::fmt::Debug for CssFontFamilyName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssFontFamilyName") .field("names", &self.names()) .finish() } else { f.debug_struct("CssFontFamilyName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11042,10 +11042,10 @@ impl AstNode for CssFontFeatureValuesAtRule { } impl std::fmt::Debug for CssFontFeatureValuesAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssFontFeatureValuesAtRule") .field( "font_feature_values_token", @@ -11057,7 +11057,7 @@ impl std::fmt::Debug for CssFontFeatureValuesAtRule { } else { f.debug_struct("CssFontFeatureValuesAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11094,10 +11094,10 @@ impl AstNode for CssFontFeatureValuesBlock { } impl std::fmt::Debug for CssFontFeatureValuesBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssFontFeatureValuesBlock") .field( "l_curly_token", @@ -11112,7 +11112,7 @@ impl std::fmt::Debug for CssFontFeatureValuesBlock { } else { f.debug_struct("CssFontFeatureValuesBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11149,10 +11149,10 @@ impl AstNode for CssFontFeatureValuesItem { } impl std::fmt::Debug for CssFontFeatureValuesItem { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssFontFeatureValuesItem") .field("at_token", &support::DebugSyntaxResult(self.at_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -11161,7 +11161,7 @@ impl std::fmt::Debug for CssFontFeatureValuesItem { } else { f.debug_struct("CssFontFeatureValuesItem").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11198,10 +11198,10 @@ impl AstNode for CssFontPaletteValuesAtRule { } impl std::fmt::Debug for CssFontPaletteValuesAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssFontPaletteValuesAtRule") .field( "font_palette_values_token", @@ -11213,7 +11213,7 @@ impl std::fmt::Debug for CssFontPaletteValuesAtRule { } else { f.debug_struct("CssFontPaletteValuesAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11250,10 +11250,10 @@ impl AstNode for CssFunction { } impl std::fmt::Debug for CssFunction { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssFunction") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -11269,7 +11269,7 @@ impl std::fmt::Debug for CssFunction { } else { f.debug_struct("CssFunction").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11306,17 +11306,17 @@ impl AstNode for CssGenericDelimiter { } impl std::fmt::Debug for CssGenericDelimiter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssGenericDelimiter") .field("value", &support::DebugSyntaxResult(self.value())) .finish() } else { f.debug_struct("CssGenericDelimiter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11353,10 +11353,10 @@ impl AstNode for CssGenericProperty { } impl std::fmt::Debug for CssGenericProperty { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssGenericProperty") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -11368,7 +11368,7 @@ impl std::fmt::Debug for CssGenericProperty { } else { f.debug_struct("CssGenericProperty").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11405,10 +11405,10 @@ impl AstNode for CssIdSelector { } impl std::fmt::Debug for CssIdSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssIdSelector") .field("hash_token", &support::DebugSyntaxResult(self.hash_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -11416,7 +11416,7 @@ impl std::fmt::Debug for CssIdSelector { } else { f.debug_struct("CssIdSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11453,10 +11453,10 @@ impl AstNode for CssIdentifier { } impl std::fmt::Debug for CssIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssIdentifier") .field( "value_token", @@ -11466,7 +11466,7 @@ impl std::fmt::Debug for CssIdentifier { } else { f.debug_struct("CssIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11503,10 +11503,10 @@ impl AstNode for CssImportAnonymousLayer { } impl std::fmt::Debug for CssImportAnonymousLayer { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssImportAnonymousLayer") .field( "layer_token", @@ -11516,7 +11516,7 @@ impl std::fmt::Debug for CssImportAnonymousLayer { } else { f.debug_struct("CssImportAnonymousLayer").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11553,10 +11553,10 @@ impl AstNode for CssImportAtRule { } impl std::fmt::Debug for CssImportAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssImportAtRule") .field( "import_token", @@ -11574,7 +11574,7 @@ impl std::fmt::Debug for CssImportAtRule { } else { f.debug_struct("CssImportAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11611,10 +11611,10 @@ impl AstNode for CssImportNamedLayer { } impl std::fmt::Debug for CssImportNamedLayer { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssImportNamedLayer") .field( "layer_token", @@ -11633,7 +11633,7 @@ impl std::fmt::Debug for CssImportNamedLayer { } else { f.debug_struct("CssImportNamedLayer").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11670,10 +11670,10 @@ impl AstNode for CssImportSupports { } impl std::fmt::Debug for CssImportSupports { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssImportSupports") .field( "supports_token", @@ -11692,7 +11692,7 @@ impl std::fmt::Debug for CssImportSupports { } else { f.debug_struct("CssImportSupports").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11729,10 +11729,10 @@ impl AstNode for CssKeyframesAtRule { } impl std::fmt::Debug for CssKeyframesAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssKeyframesAtRule") .field( "keyframes_token", @@ -11744,7 +11744,7 @@ impl std::fmt::Debug for CssKeyframesAtRule { } else { f.debug_struct("CssKeyframesAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11781,10 +11781,10 @@ impl AstNode for CssKeyframesBlock { } impl std::fmt::Debug for CssKeyframesBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssKeyframesBlock") .field( "l_curly_token", @@ -11799,7 +11799,7 @@ impl std::fmt::Debug for CssKeyframesBlock { } else { f.debug_struct("CssKeyframesBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11836,17 +11836,17 @@ impl AstNode for CssKeyframesIdentSelector { } impl std::fmt::Debug for CssKeyframesIdentSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssKeyframesIdentSelector") .field("selector", &support::DebugSyntaxResult(self.selector())) .finish() } else { f.debug_struct("CssKeyframesIdentSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11883,10 +11883,10 @@ impl AstNode for CssKeyframesItem { } impl std::fmt::Debug for CssKeyframesItem { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssKeyframesItem") .field("selectors", &self.selectors()) .field("block", &support::DebugSyntaxResult(self.block())) @@ -11894,7 +11894,7 @@ impl std::fmt::Debug for CssKeyframesItem { } else { f.debug_struct("CssKeyframesItem").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11931,17 +11931,17 @@ impl AstNode for CssKeyframesPercentageSelector { } impl std::fmt::Debug for CssKeyframesPercentageSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssKeyframesPercentageSelector") .field("selector", &support::DebugSyntaxResult(self.selector())) .finish() } else { f.debug_struct("CssKeyframesPercentageSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -11978,10 +11978,10 @@ impl AstNode for CssKeyframesScopeFunction { } impl std::fmt::Debug for CssKeyframesScopeFunction { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssKeyframesScopeFunction") .field("scope", &support::DebugSyntaxResult(self.scope())) .field( @@ -11997,7 +11997,7 @@ impl std::fmt::Debug for CssKeyframesScopeFunction { } else { f.debug_struct("CssKeyframesScopeFunction").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12034,10 +12034,10 @@ impl AstNode for CssKeyframesScopePrefix { } impl std::fmt::Debug for CssKeyframesScopePrefix { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssKeyframesScopePrefix") .field("scope", &support::DebugSyntaxResult(self.scope())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -12045,7 +12045,7 @@ impl std::fmt::Debug for CssKeyframesScopePrefix { } else { f.debug_struct("CssKeyframesScopePrefix").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12082,10 +12082,10 @@ impl AstNode for CssKeyframesScopedName { } impl std::fmt::Debug for CssKeyframesScopedName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssKeyframesScopedName") .field( "colon_token", @@ -12096,7 +12096,7 @@ impl std::fmt::Debug for CssKeyframesScopedName { } else { f.debug_struct("CssKeyframesScopedName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12133,10 +12133,10 @@ impl AstNode for CssLayerAtRule { } impl std::fmt::Debug for CssLayerAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssLayerAtRule") .field( "layer_token", @@ -12147,7 +12147,7 @@ impl std::fmt::Debug for CssLayerAtRule { } else { f.debug_struct("CssLayerAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12184,10 +12184,10 @@ impl AstNode for CssLayerDeclaration { } impl std::fmt::Debug for CssLayerDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssLayerDeclaration") .field("references", &self.references()) .field("block", &support::DebugSyntaxResult(self.block())) @@ -12195,7 +12195,7 @@ impl std::fmt::Debug for CssLayerDeclaration { } else { f.debug_struct("CssLayerDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12232,10 +12232,10 @@ impl AstNode for CssLayerReference { } impl std::fmt::Debug for CssLayerReference { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssLayerReference") .field("references", &self.references()) .field( @@ -12246,7 +12246,7 @@ impl std::fmt::Debug for CssLayerReference { } else { f.debug_struct("CssLayerReference").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12284,10 +12284,10 @@ impl AstNode for CssListOfComponentValuesExpression { } impl std::fmt::Debug for CssListOfComponentValuesExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssListOfComponentValuesExpression") .field("css_component_value_list", &self.css_component_value_list()) .finish() @@ -12295,7 +12295,7 @@ impl std::fmt::Debug for CssListOfComponentValuesExpression { f.debug_struct("CssListOfComponentValuesExpression") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12332,10 +12332,10 @@ impl AstNode for CssMarginAtRule { } impl std::fmt::Debug for CssMarginAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMarginAtRule") .field("at_token", &support::DebugSyntaxResult(self.at_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -12344,7 +12344,7 @@ impl std::fmt::Debug for CssMarginAtRule { } else { f.debug_struct("CssMarginAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12381,10 +12381,10 @@ impl AstNode for CssMediaAndCondition { } impl std::fmt::Debug for CssMediaAndCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaAndCondition") .field("left", &support::DebugSyntaxResult(self.left())) .field("and_token", &support::DebugSyntaxResult(self.and_token())) @@ -12393,7 +12393,7 @@ impl std::fmt::Debug for CssMediaAndCondition { } else { f.debug_struct("CssMediaAndCondition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12430,10 +12430,10 @@ impl AstNode for CssMediaAndTypeQuery { } impl std::fmt::Debug for CssMediaAndTypeQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaAndTypeQuery") .field("left", &support::DebugSyntaxResult(self.left())) .field("and_token", &support::DebugSyntaxResult(self.and_token())) @@ -12442,7 +12442,7 @@ impl std::fmt::Debug for CssMediaAndTypeQuery { } else { f.debug_struct("CssMediaAndTypeQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12479,10 +12479,10 @@ impl AstNode for CssMediaAtRule { } impl std::fmt::Debug for CssMediaAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaAtRule") .field( "media_token", @@ -12494,7 +12494,7 @@ impl std::fmt::Debug for CssMediaAtRule { } else { f.debug_struct("CssMediaAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12531,10 +12531,10 @@ impl AstNode for CssMediaConditionInParens { } impl std::fmt::Debug for CssMediaConditionInParens { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaConditionInParens") .field( "l_paren_token", @@ -12549,7 +12549,7 @@ impl std::fmt::Debug for CssMediaConditionInParens { } else { f.debug_struct("CssMediaConditionInParens").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12586,17 +12586,17 @@ impl AstNode for CssMediaConditionQuery { } impl std::fmt::Debug for CssMediaConditionQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaConditionQuery") .field("condition", &support::DebugSyntaxResult(self.condition())) .finish() } else { f.debug_struct("CssMediaConditionQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12633,10 +12633,10 @@ impl AstNode for CssMediaFeatureInParens { } impl std::fmt::Debug for CssMediaFeatureInParens { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaFeatureInParens") .field( "l_paren_token", @@ -12651,7 +12651,7 @@ impl std::fmt::Debug for CssMediaFeatureInParens { } else { f.debug_struct("CssMediaFeatureInParens").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12688,10 +12688,10 @@ impl AstNode for CssMediaNotCondition { } impl std::fmt::Debug for CssMediaNotCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaNotCondition") .field("not_token", &support::DebugSyntaxResult(self.not_token())) .field("condition", &support::DebugSyntaxResult(self.condition())) @@ -12699,7 +12699,7 @@ impl std::fmt::Debug for CssMediaNotCondition { } else { f.debug_struct("CssMediaNotCondition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12736,10 +12736,10 @@ impl AstNode for CssMediaOrCondition { } impl std::fmt::Debug for CssMediaOrCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaOrCondition") .field("left", &support::DebugSyntaxResult(self.left())) .field("or_token", &support::DebugSyntaxResult(self.or_token())) @@ -12748,7 +12748,7 @@ impl std::fmt::Debug for CssMediaOrCondition { } else { f.debug_struct("CssMediaOrCondition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12785,17 +12785,17 @@ impl AstNode for CssMediaType { } impl std::fmt::Debug for CssMediaType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaType") .field("value", &support::DebugSyntaxResult(self.value())) .finish() } else { f.debug_struct("CssMediaType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12832,10 +12832,10 @@ impl AstNode for CssMediaTypeQuery { } impl std::fmt::Debug for CssMediaTypeQuery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMediaTypeQuery") .field("modifier", &support::DebugOptionalElement(self.modifier())) .field("ty", &support::DebugSyntaxResult(self.ty())) @@ -12843,7 +12843,7 @@ impl std::fmt::Debug for CssMediaTypeQuery { } else { f.debug_struct("CssMediaTypeQuery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12880,10 +12880,10 @@ impl AstNode for CssMetavariable { } impl std::fmt::Debug for CssMetavariable { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssMetavariable") .field( "value_token", @@ -12893,7 +12893,7 @@ impl std::fmt::Debug for CssMetavariable { } else { f.debug_struct("CssMetavariable").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12930,17 +12930,17 @@ impl AstNode for CssNamedNamespacePrefix { } impl std::fmt::Debug for CssNamedNamespacePrefix { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssNamedNamespacePrefix") .field("name", &support::DebugSyntaxResult(self.name())) .finish() } else { f.debug_struct("CssNamedNamespacePrefix").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -12977,10 +12977,10 @@ impl AstNode for CssNamespace { } impl std::fmt::Debug for CssNamespace { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssNamespace") .field("prefix", &support::DebugOptionalElement(self.prefix())) .field( @@ -12991,7 +12991,7 @@ impl std::fmt::Debug for CssNamespace { } else { f.debug_struct("CssNamespace").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13028,10 +13028,10 @@ impl AstNode for CssNamespaceAtRule { } impl std::fmt::Debug for CssNamespaceAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssNamespaceAtRule") .field( "namespace_token", @@ -13047,7 +13047,7 @@ impl std::fmt::Debug for CssNamespaceAtRule { } else { f.debug_struct("CssNamespaceAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13084,10 +13084,10 @@ impl AstNode for CssNestedQualifiedRule { } impl std::fmt::Debug for CssNestedQualifiedRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssNestedQualifiedRule") .field("prelude", &self.prelude()) .field("block", &support::DebugSyntaxResult(self.block())) @@ -13095,7 +13095,7 @@ impl std::fmt::Debug for CssNestedQualifiedRule { } else { f.debug_struct("CssNestedQualifiedRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13132,17 +13132,17 @@ impl AstNode for CssNestedSelector { } impl std::fmt::Debug for CssNestedSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssNestedSelector") .field("amp_token", &support::DebugSyntaxResult(self.amp_token())) .finish() } else { f.debug_struct("CssNestedSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13179,10 +13179,10 @@ impl AstNode for CssNthOffset { } impl std::fmt::Debug for CssNthOffset { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssNthOffset") .field("sign", &support::DebugSyntaxResult(self.sign())) .field("value", &support::DebugSyntaxResult(self.value())) @@ -13190,7 +13190,7 @@ impl std::fmt::Debug for CssNthOffset { } else { f.debug_struct("CssNthOffset").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13227,10 +13227,10 @@ impl AstNode for CssNumber { } impl std::fmt::Debug for CssNumber { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssNumber") .field( "value_token", @@ -13240,7 +13240,7 @@ impl std::fmt::Debug for CssNumber { } else { f.debug_struct("CssNumber").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13277,10 +13277,10 @@ impl AstNode for CssPageAtRule { } impl std::fmt::Debug for CssPageAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPageAtRule") .field("page_token", &support::DebugSyntaxResult(self.page_token())) .field("selectors", &self.selectors()) @@ -13289,7 +13289,7 @@ impl std::fmt::Debug for CssPageAtRule { } else { f.debug_struct("CssPageAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13326,10 +13326,10 @@ impl AstNode for CssPageAtRuleBlock { } impl std::fmt::Debug for CssPageAtRuleBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPageAtRuleBlock") .field( "l_curly_token", @@ -13344,7 +13344,7 @@ impl std::fmt::Debug for CssPageAtRuleBlock { } else { f.debug_struct("CssPageAtRuleBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13381,10 +13381,10 @@ impl AstNode for CssPageSelector { } impl std::fmt::Debug for CssPageSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPageSelector") .field("ty", &support::DebugOptionalElement(self.ty())) .field("pseudos", &self.pseudos()) @@ -13392,7 +13392,7 @@ impl std::fmt::Debug for CssPageSelector { } else { f.debug_struct("CssPageSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13429,10 +13429,10 @@ impl AstNode for CssPageSelectorPseudo { } impl std::fmt::Debug for CssPageSelectorPseudo { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPageSelectorPseudo") .field( "colon_token", @@ -13443,7 +13443,7 @@ impl std::fmt::Debug for CssPageSelectorPseudo { } else { f.debug_struct("CssPageSelectorPseudo").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13480,10 +13480,10 @@ impl AstNode for CssParameter { } impl std::fmt::Debug for CssParameter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssParameter") .field( "any_css_expression", @@ -13493,7 +13493,7 @@ impl std::fmt::Debug for CssParameter { } else { f.debug_struct("CssParameter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13530,10 +13530,10 @@ impl AstNode for CssParenthesizedExpression { } impl std::fmt::Debug for CssParenthesizedExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssParenthesizedExpression") .field( "l_paren_token", @@ -13551,7 +13551,7 @@ impl std::fmt::Debug for CssParenthesizedExpression { } else { f.debug_struct("CssParenthesizedExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13588,10 +13588,10 @@ impl AstNode for CssPercentage { } impl std::fmt::Debug for CssPercentage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPercentage") .field( "value_token", @@ -13605,7 +13605,7 @@ impl std::fmt::Debug for CssPercentage { } else { f.debug_struct("CssPercentage").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13642,10 +13642,10 @@ impl AstNode for CssPositionTryAtRule { } impl std::fmt::Debug for CssPositionTryAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPositionTryAtRule") .field( "position_try_token", @@ -13657,7 +13657,7 @@ impl std::fmt::Debug for CssPositionTryAtRule { } else { f.debug_struct("CssPositionTryAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13694,10 +13694,10 @@ impl AstNode for CssPropertyAtRule { } impl std::fmt::Debug for CssPropertyAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPropertyAtRule") .field( "property_token", @@ -13709,7 +13709,7 @@ impl std::fmt::Debug for CssPropertyAtRule { } else { f.debug_struct("CssPropertyAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13747,10 +13747,10 @@ impl AstNode for CssPseudoClassFunctionCompoundSelector { } impl std::fmt::Debug for CssPseudoClassFunctionCompoundSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassFunctionCompoundSelector") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -13767,7 +13767,7 @@ impl std::fmt::Debug for CssPseudoClassFunctionCompoundSelector { f.debug_struct("CssPseudoClassFunctionCompoundSelector") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13805,10 +13805,10 @@ impl AstNode for CssPseudoClassFunctionCompoundSelectorList { } impl std::fmt::Debug for CssPseudoClassFunctionCompoundSelectorList { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassFunctionCompoundSelectorList") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -13825,7 +13825,7 @@ impl std::fmt::Debug for CssPseudoClassFunctionCompoundSelectorList { f.debug_struct("CssPseudoClassFunctionCompoundSelectorList") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13862,10 +13862,10 @@ impl AstNode for CssPseudoClassFunctionIdentifier { } impl std::fmt::Debug for CssPseudoClassFunctionIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassFunctionIdentifier") .field("name_token", &support::DebugSyntaxResult(self.name_token())) .field( @@ -13881,7 +13881,7 @@ impl std::fmt::Debug for CssPseudoClassFunctionIdentifier { } else { f.debug_struct("CssPseudoClassFunctionIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13918,10 +13918,10 @@ impl AstNode for CssPseudoClassFunctionNth { } impl std::fmt::Debug for CssPseudoClassFunctionNth { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassFunctionNth") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -13937,7 +13937,7 @@ impl std::fmt::Debug for CssPseudoClassFunctionNth { } else { f.debug_struct("CssPseudoClassFunctionNth").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -13975,10 +13975,10 @@ impl AstNode for CssPseudoClassFunctionRelativeSelectorList { } impl std::fmt::Debug for CssPseudoClassFunctionRelativeSelectorList { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassFunctionRelativeSelectorList") .field("name_token", &support::DebugSyntaxResult(self.name_token())) .field( @@ -13995,7 +13995,7 @@ impl std::fmt::Debug for CssPseudoClassFunctionRelativeSelectorList { f.debug_struct("CssPseudoClassFunctionRelativeSelectorList") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14032,10 +14032,10 @@ impl AstNode for CssPseudoClassFunctionSelector { } impl std::fmt::Debug for CssPseudoClassFunctionSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassFunctionSelector") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -14051,7 +14051,7 @@ impl std::fmt::Debug for CssPseudoClassFunctionSelector { } else { f.debug_struct("CssPseudoClassFunctionSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14089,10 +14089,10 @@ impl AstNode for CssPseudoClassFunctionSelectorList { } impl std::fmt::Debug for CssPseudoClassFunctionSelectorList { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassFunctionSelectorList") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -14109,7 +14109,7 @@ impl std::fmt::Debug for CssPseudoClassFunctionSelectorList { f.debug_struct("CssPseudoClassFunctionSelectorList") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14146,10 +14146,10 @@ impl AstNode for CssPseudoClassFunctionValueList { } impl std::fmt::Debug for CssPseudoClassFunctionValueList { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassFunctionValueList") .field("name_token", &support::DebugSyntaxResult(self.name_token())) .field( @@ -14165,7 +14165,7 @@ impl std::fmt::Debug for CssPseudoClassFunctionValueList { } else { f.debug_struct("CssPseudoClassFunctionValueList").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14202,17 +14202,17 @@ impl AstNode for CssPseudoClassIdentifier { } impl std::fmt::Debug for CssPseudoClassIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassIdentifier") .field("name", &support::DebugSyntaxResult(self.name())) .finish() } else { f.debug_struct("CssPseudoClassIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14249,10 +14249,10 @@ impl AstNode for CssPseudoClassNth { } impl std::fmt::Debug for CssPseudoClassNth { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassNth") .field("sign", &support::DebugOptionalElement(self.sign())) .field("value", &support::DebugOptionalElement(self.value())) @@ -14265,7 +14265,7 @@ impl std::fmt::Debug for CssPseudoClassNth { } else { f.debug_struct("CssPseudoClassNth").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14302,17 +14302,17 @@ impl AstNode for CssPseudoClassNthIdentifier { } impl std::fmt::Debug for CssPseudoClassNthIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassNthIdentifier") .field("value", &support::DebugSyntaxResult(self.value())) .finish() } else { f.debug_struct("CssPseudoClassNthIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14349,10 +14349,10 @@ impl AstNode for CssPseudoClassNthNumber { } impl std::fmt::Debug for CssPseudoClassNthNumber { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassNthNumber") .field("sign", &support::DebugOptionalElement(self.sign())) .field("value", &support::DebugSyntaxResult(self.value())) @@ -14360,7 +14360,7 @@ impl std::fmt::Debug for CssPseudoClassNthNumber { } else { f.debug_struct("CssPseudoClassNthNumber").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14397,10 +14397,10 @@ impl AstNode for CssPseudoClassNthSelector { } impl std::fmt::Debug for CssPseudoClassNthSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassNthSelector") .field("nth", &support::DebugSyntaxResult(self.nth())) .field( @@ -14411,7 +14411,7 @@ impl std::fmt::Debug for CssPseudoClassNthSelector { } else { f.debug_struct("CssPseudoClassNthSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14448,10 +14448,10 @@ impl AstNode for CssPseudoClassOfNthSelector { } impl std::fmt::Debug for CssPseudoClassOfNthSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassOfNthSelector") .field("of_token", &support::DebugSyntaxResult(self.of_token())) .field("selectors", &self.selectors()) @@ -14459,7 +14459,7 @@ impl std::fmt::Debug for CssPseudoClassOfNthSelector { } else { f.debug_struct("CssPseudoClassOfNthSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14496,10 +14496,10 @@ impl AstNode for CssPseudoClassSelector { } impl std::fmt::Debug for CssPseudoClassSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoClassSelector") .field( "colon_token", @@ -14510,7 +14510,7 @@ impl std::fmt::Debug for CssPseudoClassSelector { } else { f.debug_struct("CssPseudoClassSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14547,10 +14547,10 @@ impl AstNode for CssPseudoElementFunctionIdentifier { } impl std::fmt::Debug for CssPseudoElementFunctionIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoElementFunctionIdentifier") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -14567,7 +14567,7 @@ impl std::fmt::Debug for CssPseudoElementFunctionIdentifier { f.debug_struct("CssPseudoElementFunctionIdentifier") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14604,10 +14604,10 @@ impl AstNode for CssPseudoElementFunctionSelector { } impl std::fmt::Debug for CssPseudoElementFunctionSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoElementFunctionSelector") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -14623,7 +14623,7 @@ impl std::fmt::Debug for CssPseudoElementFunctionSelector { } else { f.debug_struct("CssPseudoElementFunctionSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14660,17 +14660,17 @@ impl AstNode for CssPseudoElementIdentifier { } impl std::fmt::Debug for CssPseudoElementIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoElementIdentifier") .field("name", &support::DebugSyntaxResult(self.name())) .finish() } else { f.debug_struct("CssPseudoElementIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14707,10 +14707,10 @@ impl AstNode for CssPseudoElementSelector { } impl std::fmt::Debug for CssPseudoElementSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssPseudoElementSelector") .field( "double_colon_token", @@ -14721,7 +14721,7 @@ impl std::fmt::Debug for CssPseudoElementSelector { } else { f.debug_struct("CssPseudoElementSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14758,10 +14758,10 @@ impl AstNode for CssQualifiedRule { } impl std::fmt::Debug for CssQualifiedRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssQualifiedRule") .field("prelude", &self.prelude()) .field("block", &support::DebugSyntaxResult(self.block())) @@ -14769,7 +14769,7 @@ impl std::fmt::Debug for CssQualifiedRule { } else { f.debug_struct("CssQualifiedRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14806,17 +14806,17 @@ impl AstNode for CssQueryFeatureBoolean { } impl std::fmt::Debug for CssQueryFeatureBoolean { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssQueryFeatureBoolean") .field("name", &support::DebugSyntaxResult(self.name())) .finish() } else { f.debug_struct("CssQueryFeatureBoolean").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14853,10 +14853,10 @@ impl AstNode for CssQueryFeaturePlain { } impl std::fmt::Debug for CssQueryFeaturePlain { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssQueryFeaturePlain") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -14868,7 +14868,7 @@ impl std::fmt::Debug for CssQueryFeaturePlain { } else { f.debug_struct("CssQueryFeaturePlain").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14905,10 +14905,10 @@ impl AstNode for CssQueryFeatureRange { } impl std::fmt::Debug for CssQueryFeatureRange { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssQueryFeatureRange") .field("left", &support::DebugSyntaxResult(self.left())) .field("comparison", &support::DebugSyntaxResult(self.comparison())) @@ -14917,7 +14917,7 @@ impl std::fmt::Debug for CssQueryFeatureRange { } else { f.debug_struct("CssQueryFeatureRange").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -14954,17 +14954,17 @@ impl AstNode for CssQueryFeatureRangeComparison { } impl std::fmt::Debug for CssQueryFeatureRangeComparison { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssQueryFeatureRangeComparison") .field("operator", &support::DebugSyntaxResult(self.operator())) .finish() } else { f.debug_struct("CssQueryFeatureRangeComparison").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15001,10 +15001,10 @@ impl AstNode for CssQueryFeatureRangeInterval { } impl std::fmt::Debug for CssQueryFeatureRangeInterval { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssQueryFeatureRangeInterval") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -15021,7 +15021,7 @@ impl std::fmt::Debug for CssQueryFeatureRangeInterval { } else { f.debug_struct("CssQueryFeatureRangeInterval").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15058,10 +15058,10 @@ impl AstNode for CssQueryFeatureReverseRange { } impl std::fmt::Debug for CssQueryFeatureReverseRange { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssQueryFeatureReverseRange") .field("left", &support::DebugSyntaxResult(self.left())) .field("comparison", &support::DebugSyntaxResult(self.comparison())) @@ -15070,7 +15070,7 @@ impl std::fmt::Debug for CssQueryFeatureReverseRange { } else { f.debug_struct("CssQueryFeatureReverseRange").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15107,10 +15107,10 @@ impl AstNode for CssRatio { } impl std::fmt::Debug for CssRatio { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssRatio") .field("numerator", &support::DebugSyntaxResult(self.numerator())) .field( @@ -15125,7 +15125,7 @@ impl std::fmt::Debug for CssRatio { } else { f.debug_struct("CssRatio").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15162,10 +15162,10 @@ impl AstNode for CssRegularDimension { } impl std::fmt::Debug for CssRegularDimension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssRegularDimension") .field( "value_token", @@ -15176,7 +15176,7 @@ impl std::fmt::Debug for CssRegularDimension { } else { f.debug_struct("CssRegularDimension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15213,10 +15213,10 @@ impl AstNode for CssRelativeSelector { } impl std::fmt::Debug for CssRelativeSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssRelativeSelector") .field( "combinator", @@ -15227,7 +15227,7 @@ impl std::fmt::Debug for CssRelativeSelector { } else { f.debug_struct("CssRelativeSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15264,10 +15264,10 @@ impl AstNode for CssRoot { } impl std::fmt::Debug for CssRoot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssRoot") .field( "bom_token", @@ -15279,7 +15279,7 @@ impl std::fmt::Debug for CssRoot { } else { f.debug_struct("CssRoot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15316,10 +15316,10 @@ impl AstNode for CssRuleBlock { } impl std::fmt::Debug for CssRuleBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssRuleBlock") .field( "l_curly_token", @@ -15334,7 +15334,7 @@ impl std::fmt::Debug for CssRuleBlock { } else { f.debug_struct("CssRuleBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15371,10 +15371,10 @@ impl AstNode for CssScopeAtRule { } impl std::fmt::Debug for CssScopeAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssScopeAtRule") .field( "scope_token", @@ -15386,7 +15386,7 @@ impl std::fmt::Debug for CssScopeAtRule { } else { f.debug_struct("CssScopeAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15423,10 +15423,10 @@ impl AstNode for CssScopeEdge { } impl std::fmt::Debug for CssScopeEdge { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssScopeEdge") .field( "l_paren_token", @@ -15441,7 +15441,7 @@ impl std::fmt::Debug for CssScopeEdge { } else { f.debug_struct("CssScopeEdge").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15478,10 +15478,10 @@ impl AstNode for CssScopeRangeEnd { } impl std::fmt::Debug for CssScopeRangeEnd { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssScopeRangeEnd") .field("to_token", &support::DebugSyntaxResult(self.to_token())) .field("end", &support::DebugSyntaxResult(self.end())) @@ -15489,7 +15489,7 @@ impl std::fmt::Debug for CssScopeRangeEnd { } else { f.debug_struct("CssScopeRangeEnd").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15526,10 +15526,10 @@ impl AstNode for CssScopeRangeInterval { } impl std::fmt::Debug for CssScopeRangeInterval { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssScopeRangeInterval") .field("start", &support::DebugSyntaxResult(self.start())) .field("to_token", &support::DebugSyntaxResult(self.to_token())) @@ -15538,7 +15538,7 @@ impl std::fmt::Debug for CssScopeRangeInterval { } else { f.debug_struct("CssScopeRangeInterval").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15575,17 +15575,17 @@ impl AstNode for CssScopeRangeStart { } impl std::fmt::Debug for CssScopeRangeStart { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssScopeRangeStart") .field("start", &support::DebugSyntaxResult(self.start())) .finish() } else { f.debug_struct("CssScopeRangeStart").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15622,10 +15622,10 @@ impl AstNode for CssStartingStyleAtRule { } impl std::fmt::Debug for CssStartingStyleAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssStartingStyleAtRule") .field( "starting_style_token", @@ -15636,7 +15636,7 @@ impl std::fmt::Debug for CssStartingStyleAtRule { } else { f.debug_struct("CssStartingStyleAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15673,10 +15673,10 @@ impl AstNode for CssString { } impl std::fmt::Debug for CssString { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssString") .field( "value_token", @@ -15686,7 +15686,7 @@ impl std::fmt::Debug for CssString { } else { f.debug_struct("CssString").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15723,10 +15723,10 @@ impl AstNode for CssSupportsAndCondition { } impl std::fmt::Debug for CssSupportsAndCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssSupportsAndCondition") .field("left", &support::DebugSyntaxResult(self.left())) .field("and_token", &support::DebugSyntaxResult(self.and_token())) @@ -15735,7 +15735,7 @@ impl std::fmt::Debug for CssSupportsAndCondition { } else { f.debug_struct("CssSupportsAndCondition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15772,10 +15772,10 @@ impl AstNode for CssSupportsAtRule { } impl std::fmt::Debug for CssSupportsAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssSupportsAtRule") .field( "supports_token", @@ -15787,7 +15787,7 @@ impl std::fmt::Debug for CssSupportsAtRule { } else { f.debug_struct("CssSupportsAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15824,10 +15824,10 @@ impl AstNode for CssSupportsConditionInParens { } impl std::fmt::Debug for CssSupportsConditionInParens { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssSupportsConditionInParens") .field( "l_paren_token", @@ -15842,7 +15842,7 @@ impl std::fmt::Debug for CssSupportsConditionInParens { } else { f.debug_struct("CssSupportsConditionInParens").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15879,10 +15879,10 @@ impl AstNode for CssSupportsFeatureDeclaration { } impl std::fmt::Debug for CssSupportsFeatureDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssSupportsFeatureDeclaration") .field( "l_paren_token", @@ -15900,7 +15900,7 @@ impl std::fmt::Debug for CssSupportsFeatureDeclaration { } else { f.debug_struct("CssSupportsFeatureDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15937,10 +15937,10 @@ impl AstNode for CssSupportsFeatureSelector { } impl std::fmt::Debug for CssSupportsFeatureSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssSupportsFeatureSelector") .field( "selector_token", @@ -15959,7 +15959,7 @@ impl std::fmt::Debug for CssSupportsFeatureSelector { } else { f.debug_struct("CssSupportsFeatureSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -15996,10 +15996,10 @@ impl AstNode for CssSupportsNotCondition { } impl std::fmt::Debug for CssSupportsNotCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssSupportsNotCondition") .field("not_token", &support::DebugSyntaxResult(self.not_token())) .field("query", &support::DebugSyntaxResult(self.query())) @@ -16007,7 +16007,7 @@ impl std::fmt::Debug for CssSupportsNotCondition { } else { f.debug_struct("CssSupportsNotCondition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16044,10 +16044,10 @@ impl AstNode for CssSupportsOrCondition { } impl std::fmt::Debug for CssSupportsOrCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssSupportsOrCondition") .field("left", &support::DebugSyntaxResult(self.left())) .field("or_token", &support::DebugSyntaxResult(self.or_token())) @@ -16056,7 +16056,7 @@ impl std::fmt::Debug for CssSupportsOrCondition { } else { f.debug_struct("CssSupportsOrCondition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16093,10 +16093,10 @@ impl AstNode for CssTypeSelector { } impl std::fmt::Debug for CssTypeSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssTypeSelector") .field( "namespace", @@ -16107,7 +16107,7 @@ impl std::fmt::Debug for CssTypeSelector { } else { f.debug_struct("CssTypeSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16144,10 +16144,10 @@ impl AstNode for CssUnicodeCodepoint { } impl std::fmt::Debug for CssUnicodeCodepoint { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUnicodeCodepoint") .field( "value_token", @@ -16157,7 +16157,7 @@ impl std::fmt::Debug for CssUnicodeCodepoint { } else { f.debug_struct("CssUnicodeCodepoint").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16194,10 +16194,10 @@ impl AstNode for CssUnicodeRange { } impl std::fmt::Debug for CssUnicodeRange { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUnicodeRange") .field( "prefix_token", @@ -16208,7 +16208,7 @@ impl std::fmt::Debug for CssUnicodeRange { } else { f.debug_struct("CssUnicodeRange").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16245,10 +16245,10 @@ impl AstNode for CssUnicodeRangeInterval { } impl std::fmt::Debug for CssUnicodeRangeInterval { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUnicodeRangeInterval") .field("start", &support::DebugSyntaxResult(self.start())) .field( @@ -16260,7 +16260,7 @@ impl std::fmt::Debug for CssUnicodeRangeInterval { } else { f.debug_struct("CssUnicodeRangeInterval").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16297,10 +16297,10 @@ impl AstNode for CssUnicodeRangeWildcard { } impl std::fmt::Debug for CssUnicodeRangeWildcard { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUnicodeRangeWildcard") .field( "value_token", @@ -16310,7 +16310,7 @@ impl std::fmt::Debug for CssUnicodeRangeWildcard { } else { f.debug_struct("CssUnicodeRangeWildcard").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16347,17 +16347,17 @@ impl AstNode for CssUniversalNamespacePrefix { } impl std::fmt::Debug for CssUniversalNamespacePrefix { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUniversalNamespacePrefix") .field("star_token", &support::DebugSyntaxResult(self.star_token())) .finish() } else { f.debug_struct("CssUniversalNamespacePrefix").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16394,10 +16394,10 @@ impl AstNode for CssUniversalSelector { } impl std::fmt::Debug for CssUniversalSelector { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUniversalSelector") .field( "namespace", @@ -16408,7 +16408,7 @@ impl std::fmt::Debug for CssUniversalSelector { } else { f.debug_struct("CssUniversalSelector").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16445,10 +16445,10 @@ impl AstNode for CssUnknownBlockAtRule { } impl std::fmt::Debug for CssUnknownBlockAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUnknownBlockAtRule") .field("name", &support::DebugSyntaxResult(self.name())) .field("components", &support::DebugSyntaxResult(self.components())) @@ -16457,7 +16457,7 @@ impl std::fmt::Debug for CssUnknownBlockAtRule { } else { f.debug_struct("CssUnknownBlockAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16494,10 +16494,10 @@ impl AstNode for CssUnknownDimension { } impl std::fmt::Debug for CssUnknownDimension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUnknownDimension") .field( "value_token", @@ -16508,7 +16508,7 @@ impl std::fmt::Debug for CssUnknownDimension { } else { f.debug_struct("CssUnknownDimension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16545,10 +16545,10 @@ impl AstNode for CssUnknownValueAtRule { } impl std::fmt::Debug for CssUnknownValueAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUnknownValueAtRule") .field("name", &support::DebugSyntaxResult(self.name())) .field("components", &support::DebugSyntaxResult(self.components())) @@ -16560,7 +16560,7 @@ impl std::fmt::Debug for CssUnknownValueAtRule { } else { f.debug_struct("CssUnknownValueAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16597,10 +16597,10 @@ impl AstNode for CssUrlFunction { } impl std::fmt::Debug for CssUrlFunction { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUrlFunction") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -16617,7 +16617,7 @@ impl std::fmt::Debug for CssUrlFunction { } else { f.debug_struct("CssUrlFunction").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16654,10 +16654,10 @@ impl AstNode for CssUrlValueRaw { } impl std::fmt::Debug for CssUrlValueRaw { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssUrlValueRaw") .field( "value_token", @@ -16667,7 +16667,7 @@ impl std::fmt::Debug for CssUrlValueRaw { } else { f.debug_struct("CssUrlValueRaw").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16704,10 +16704,10 @@ impl AstNode for CssValueAtRule { } impl std::fmt::Debug for CssValueAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssValueAtRule") .field( "value_token", @@ -16722,7 +16722,7 @@ impl std::fmt::Debug for CssValueAtRule { } else { f.debug_struct("CssValueAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16759,17 +16759,17 @@ impl AstNode for CssValueAtRuleDeclarationClause { } impl std::fmt::Debug for CssValueAtRuleDeclarationClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssValueAtRuleDeclarationClause") .field("properties", &self.properties()) .finish() } else { f.debug_struct("CssValueAtRuleDeclarationClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16806,10 +16806,10 @@ impl AstNode for CssValueAtRuleGenericProperty { } impl std::fmt::Debug for CssValueAtRuleGenericProperty { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssValueAtRuleGenericProperty") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -16821,7 +16821,7 @@ impl std::fmt::Debug for CssValueAtRuleGenericProperty { } else { f.debug_struct("CssValueAtRuleGenericProperty").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16858,10 +16858,10 @@ impl AstNode for CssValueAtRuleImportClause { } impl std::fmt::Debug for CssValueAtRuleImportClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssValueAtRuleImportClause") .field("specifiers", &self.specifiers()) .field("from_token", &support::DebugSyntaxResult(self.from_token())) @@ -16870,7 +16870,7 @@ impl std::fmt::Debug for CssValueAtRuleImportClause { } else { f.debug_struct("CssValueAtRuleImportClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16907,17 +16907,17 @@ impl AstNode for CssValueAtRuleImportSpecifier { } impl std::fmt::Debug for CssValueAtRuleImportSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssValueAtRuleImportSpecifier") .field("name", &support::DebugSyntaxResult(self.name())) .finish() } else { f.debug_struct("CssValueAtRuleImportSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16955,10 +16955,10 @@ impl AstNode for CssValueAtRuleNamedImportSpecifier { } impl std::fmt::Debug for CssValueAtRuleNamedImportSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssValueAtRuleNamedImportSpecifier") .field("name", &support::DebugSyntaxResult(self.name())) .field("as_token", &support::DebugSyntaxResult(self.as_token())) @@ -16968,7 +16968,7 @@ impl std::fmt::Debug for CssValueAtRuleNamedImportSpecifier { f.debug_struct("CssValueAtRuleNamedImportSpecifier") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17005,10 +17005,10 @@ impl AstNode for CssViewTransitionAtRule { } impl std::fmt::Debug for CssViewTransitionAtRule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("CssViewTransitionAtRule") .field( "view_transition_token", @@ -17019,7 +17019,7 @@ impl std::fmt::Debug for CssViewTransitionAtRule { } else { f.debug_struct("CssViewTransitionAtRule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } diff --git a/crates/biome_graphql_syntax/src/generated/nodes.rs b/crates/biome_graphql_syntax/src/generated/nodes.rs index 125a70b67878..d389699395f1 100644 --- a/crates/biome_graphql_syntax/src/generated/nodes.rs +++ b/crates/biome_graphql_syntax/src/generated/nodes.rs @@ -3176,10 +3176,10 @@ impl AstNode for GraphqlAlias { } impl std::fmt::Debug for GraphqlAlias { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlAlias") .field("value", &support::DebugSyntaxResult(self.value())) .field( @@ -3190,7 +3190,7 @@ impl std::fmt::Debug for GraphqlAlias { } else { f.debug_struct("GraphqlAlias").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3227,10 +3227,10 @@ impl AstNode for GraphqlArgument { } impl std::fmt::Debug for GraphqlArgument { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlArgument") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -3242,7 +3242,7 @@ impl std::fmt::Debug for GraphqlArgument { } else { f.debug_struct("GraphqlArgument").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3279,10 +3279,10 @@ impl AstNode for GraphqlArguments { } impl std::fmt::Debug for GraphqlArguments { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlArguments") .field( "l_paren_token", @@ -3297,7 +3297,7 @@ impl std::fmt::Debug for GraphqlArguments { } else { f.debug_struct("GraphqlArguments").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3334,10 +3334,10 @@ impl AstNode for GraphqlArgumentsDefinition { } impl std::fmt::Debug for GraphqlArgumentsDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlArgumentsDefinition") .field( "l_paren_token", @@ -3352,7 +3352,7 @@ impl std::fmt::Debug for GraphqlArgumentsDefinition { } else { f.debug_struct("GraphqlArgumentsDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3389,10 +3389,10 @@ impl AstNode for GraphqlBooleanValue { } impl std::fmt::Debug for GraphqlBooleanValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlBooleanValue") .field( "value_token", @@ -3402,7 +3402,7 @@ impl std::fmt::Debug for GraphqlBooleanValue { } else { f.debug_struct("GraphqlBooleanValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3439,10 +3439,10 @@ impl AstNode for GraphqlDefaultValue { } impl std::fmt::Debug for GraphqlDefaultValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlDefaultValue") .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) .field("value", &support::DebugSyntaxResult(self.value())) @@ -3450,7 +3450,7 @@ impl std::fmt::Debug for GraphqlDefaultValue { } else { f.debug_struct("GraphqlDefaultValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3487,10 +3487,10 @@ impl AstNode for GraphqlDescription { } impl std::fmt::Debug for GraphqlDescription { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlDescription") .field( "graphql_string_value", @@ -3500,7 +3500,7 @@ impl std::fmt::Debug for GraphqlDescription { } else { f.debug_struct("GraphqlDescription").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3537,10 +3537,10 @@ impl AstNode for GraphqlDirective { } impl std::fmt::Debug for GraphqlDirective { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlDirective") .field("at_token", &support::DebugSyntaxResult(self.at_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -3552,7 +3552,7 @@ impl std::fmt::Debug for GraphqlDirective { } else { f.debug_struct("GraphqlDirective").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3589,10 +3589,10 @@ impl AstNode for GraphqlDirectiveDefinition { } impl std::fmt::Debug for GraphqlDirectiveDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlDirectiveDefinition") .field( "description", @@ -3622,7 +3622,7 @@ impl std::fmt::Debug for GraphqlDirectiveDefinition { } else { f.debug_struct("GraphqlDirectiveDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3659,10 +3659,10 @@ impl AstNode for GraphqlDirectiveLocation { } impl std::fmt::Debug for GraphqlDirectiveLocation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlDirectiveLocation") .field( "value_token", @@ -3672,7 +3672,7 @@ impl std::fmt::Debug for GraphqlDirectiveLocation { } else { f.debug_struct("GraphqlDirectiveLocation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3709,10 +3709,10 @@ impl AstNode for GraphqlEnumTypeDefinition { } impl std::fmt::Debug for GraphqlEnumTypeDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlEnumTypeDefinition") .field( "description", @@ -3729,7 +3729,7 @@ impl std::fmt::Debug for GraphqlEnumTypeDefinition { } else { f.debug_struct("GraphqlEnumTypeDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3766,10 +3766,10 @@ impl AstNode for GraphqlEnumTypeExtension { } impl std::fmt::Debug for GraphqlEnumTypeExtension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlEnumTypeExtension") .field( "extend_token", @@ -3786,7 +3786,7 @@ impl std::fmt::Debug for GraphqlEnumTypeExtension { } else { f.debug_struct("GraphqlEnumTypeExtension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3823,17 +3823,17 @@ impl AstNode for GraphqlEnumValue { } impl std::fmt::Debug for GraphqlEnumValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlEnumValue") .field("value", &support::DebugSyntaxResult(self.value())) .finish() } else { f.debug_struct("GraphqlEnumValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3870,10 +3870,10 @@ impl AstNode for GraphqlEnumValueDefinition { } impl std::fmt::Debug for GraphqlEnumValueDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlEnumValueDefinition") .field( "description", @@ -3885,7 +3885,7 @@ impl std::fmt::Debug for GraphqlEnumValueDefinition { } else { f.debug_struct("GraphqlEnumValueDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3922,10 +3922,10 @@ impl AstNode for GraphqlEnumValuesDefinition { } impl std::fmt::Debug for GraphqlEnumValuesDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlEnumValuesDefinition") .field( "l_curly_token", @@ -3940,7 +3940,7 @@ impl std::fmt::Debug for GraphqlEnumValuesDefinition { } else { f.debug_struct("GraphqlEnumValuesDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -3977,10 +3977,10 @@ impl AstNode for GraphqlField { } impl std::fmt::Debug for GraphqlField { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlField") .field("alias", &support::DebugOptionalElement(self.alias())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -3997,7 +3997,7 @@ impl std::fmt::Debug for GraphqlField { } else { f.debug_struct("GraphqlField").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4034,10 +4034,10 @@ impl AstNode for GraphqlFieldDefinition { } impl std::fmt::Debug for GraphqlFieldDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlFieldDefinition") .field( "description", @@ -4058,7 +4058,7 @@ impl std::fmt::Debug for GraphqlFieldDefinition { } else { f.debug_struct("GraphqlFieldDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4095,10 +4095,10 @@ impl AstNode for GraphqlFieldsDefinition { } impl std::fmt::Debug for GraphqlFieldsDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlFieldsDefinition") .field( "l_curly_token", @@ -4113,7 +4113,7 @@ impl std::fmt::Debug for GraphqlFieldsDefinition { } else { f.debug_struct("GraphqlFieldsDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4150,10 +4150,10 @@ impl AstNode for GraphqlFloatValue { } impl std::fmt::Debug for GraphqlFloatValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlFloatValue") .field( "graphql_float_literal_token", @@ -4163,7 +4163,7 @@ impl std::fmt::Debug for GraphqlFloatValue { } else { f.debug_struct("GraphqlFloatValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4200,10 +4200,10 @@ impl AstNode for GraphqlFragmentDefinition { } impl std::fmt::Debug for GraphqlFragmentDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlFragmentDefinition") .field( "fragment_token", @@ -4223,7 +4223,7 @@ impl std::fmt::Debug for GraphqlFragmentDefinition { } else { f.debug_struct("GraphqlFragmentDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4260,10 +4260,10 @@ impl AstNode for GraphqlFragmentSpread { } impl std::fmt::Debug for GraphqlFragmentSpread { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlFragmentSpread") .field( "dotdotdot_token", @@ -4275,7 +4275,7 @@ impl std::fmt::Debug for GraphqlFragmentSpread { } else { f.debug_struct("GraphqlFragmentSpread").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4312,10 +4312,10 @@ impl AstNode for GraphqlImplementsInterfaces { } impl std::fmt::Debug for GraphqlImplementsInterfaces { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlImplementsInterfaces") .field( "implements_token", @@ -4330,7 +4330,7 @@ impl std::fmt::Debug for GraphqlImplementsInterfaces { } else { f.debug_struct("GraphqlImplementsInterfaces").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4367,10 +4367,10 @@ impl AstNode for GraphqlInlineFragment { } impl std::fmt::Debug for GraphqlInlineFragment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlInlineFragment") .field( "dotdotdot_token", @@ -4389,7 +4389,7 @@ impl std::fmt::Debug for GraphqlInlineFragment { } else { f.debug_struct("GraphqlInlineFragment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4426,10 +4426,10 @@ impl AstNode for GraphqlInputFieldsDefinition { } impl std::fmt::Debug for GraphqlInputFieldsDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlInputFieldsDefinition") .field( "l_curly_token", @@ -4444,7 +4444,7 @@ impl std::fmt::Debug for GraphqlInputFieldsDefinition { } else { f.debug_struct("GraphqlInputFieldsDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4481,10 +4481,10 @@ impl AstNode for GraphqlInputObjectTypeDefinition { } impl std::fmt::Debug for GraphqlInputObjectTypeDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlInputObjectTypeDefinition") .field( "description", @@ -4504,7 +4504,7 @@ impl std::fmt::Debug for GraphqlInputObjectTypeDefinition { } else { f.debug_struct("GraphqlInputObjectTypeDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4541,10 +4541,10 @@ impl AstNode for GraphqlInputObjectTypeExtension { } impl std::fmt::Debug for GraphqlInputObjectTypeExtension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlInputObjectTypeExtension") .field( "extend_token", @@ -4564,7 +4564,7 @@ impl std::fmt::Debug for GraphqlInputObjectTypeExtension { } else { f.debug_struct("GraphqlInputObjectTypeExtension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4601,10 +4601,10 @@ impl AstNode for GraphqlInputValueDefinition { } impl std::fmt::Debug for GraphqlInputValueDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlInputValueDefinition") .field( "description", @@ -4622,7 +4622,7 @@ impl std::fmt::Debug for GraphqlInputValueDefinition { } else { f.debug_struct("GraphqlInputValueDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4659,10 +4659,10 @@ impl AstNode for GraphqlIntValue { } impl std::fmt::Debug for GraphqlIntValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlIntValue") .field( "graphql_int_literal_token", @@ -4672,7 +4672,7 @@ impl std::fmt::Debug for GraphqlIntValue { } else { f.debug_struct("GraphqlIntValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4709,10 +4709,10 @@ impl AstNode for GraphqlInterfaceTypeDefinition { } impl std::fmt::Debug for GraphqlInterfaceTypeDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlInterfaceTypeDefinition") .field( "description", @@ -4733,7 +4733,7 @@ impl std::fmt::Debug for GraphqlInterfaceTypeDefinition { } else { f.debug_struct("GraphqlInterfaceTypeDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4770,10 +4770,10 @@ impl AstNode for GraphqlInterfaceTypeExtension { } impl std::fmt::Debug for GraphqlInterfaceTypeExtension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlInterfaceTypeExtension") .field( "extend_token", @@ -4794,7 +4794,7 @@ impl std::fmt::Debug for GraphqlInterfaceTypeExtension { } else { f.debug_struct("GraphqlInterfaceTypeExtension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4831,10 +4831,10 @@ impl AstNode for GraphqlListType { } impl std::fmt::Debug for GraphqlListType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlListType") .field( "l_brack_token", @@ -4849,7 +4849,7 @@ impl std::fmt::Debug for GraphqlListType { } else { f.debug_struct("GraphqlListType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4886,10 +4886,10 @@ impl AstNode for GraphqlListValue { } impl std::fmt::Debug for GraphqlListValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlListValue") .field( "l_brack_token", @@ -4904,7 +4904,7 @@ impl std::fmt::Debug for GraphqlListValue { } else { f.debug_struct("GraphqlListValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4941,10 +4941,10 @@ impl AstNode for GraphqlLiteralName { } impl std::fmt::Debug for GraphqlLiteralName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlLiteralName") .field( "value_token", @@ -4954,7 +4954,7 @@ impl std::fmt::Debug for GraphqlLiteralName { } else { f.debug_struct("GraphqlLiteralName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -4991,10 +4991,10 @@ impl AstNode for GraphqlNameBinding { } impl std::fmt::Debug for GraphqlNameBinding { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlNameBinding") .field( "value_token", @@ -5004,7 +5004,7 @@ impl std::fmt::Debug for GraphqlNameBinding { } else { f.debug_struct("GraphqlNameBinding").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5041,10 +5041,10 @@ impl AstNode for GraphqlNameReference { } impl std::fmt::Debug for GraphqlNameReference { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlNameReference") .field( "value_token", @@ -5054,7 +5054,7 @@ impl std::fmt::Debug for GraphqlNameReference { } else { f.debug_struct("GraphqlNameReference").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5091,10 +5091,10 @@ impl AstNode for GraphqlNonNullType { } impl std::fmt::Debug for GraphqlNonNullType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlNonNullType") .field("base", &support::DebugSyntaxResult(self.base())) .field("excl_token", &support::DebugSyntaxResult(self.excl_token())) @@ -5102,7 +5102,7 @@ impl std::fmt::Debug for GraphqlNonNullType { } else { f.debug_struct("GraphqlNonNullType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5139,17 +5139,17 @@ impl AstNode for GraphqlNullValue { } impl std::fmt::Debug for GraphqlNullValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlNullValue") .field("null_token", &support::DebugSyntaxResult(self.null_token())) .finish() } else { f.debug_struct("GraphqlNullValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5186,10 +5186,10 @@ impl AstNode for GraphqlObjectField { } impl std::fmt::Debug for GraphqlObjectField { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlObjectField") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -5201,7 +5201,7 @@ impl std::fmt::Debug for GraphqlObjectField { } else { f.debug_struct("GraphqlObjectField").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5238,10 +5238,10 @@ impl AstNode for GraphqlObjectTypeDefinition { } impl std::fmt::Debug for GraphqlObjectTypeDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlObjectTypeDefinition") .field( "description", @@ -5259,7 +5259,7 @@ impl std::fmt::Debug for GraphqlObjectTypeDefinition { } else { f.debug_struct("GraphqlObjectTypeDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5296,10 +5296,10 @@ impl AstNode for GraphqlObjectTypeExtension { } impl std::fmt::Debug for GraphqlObjectTypeExtension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlObjectTypeExtension") .field( "extend_token", @@ -5317,7 +5317,7 @@ impl std::fmt::Debug for GraphqlObjectTypeExtension { } else { f.debug_struct("GraphqlObjectTypeExtension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5354,10 +5354,10 @@ impl AstNode for GraphqlObjectValue { } impl std::fmt::Debug for GraphqlObjectValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlObjectValue") .field( "l_curly_token", @@ -5372,7 +5372,7 @@ impl std::fmt::Debug for GraphqlObjectValue { } else { f.debug_struct("GraphqlObjectValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5409,10 +5409,10 @@ impl AstNode for GraphqlOperationDefinition { } impl std::fmt::Debug for GraphqlOperationDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlOperationDefinition") .field("ty", &support::DebugSyntaxResult(self.ty())) .field("name", &support::DebugOptionalElement(self.name())) @@ -5429,7 +5429,7 @@ impl std::fmt::Debug for GraphqlOperationDefinition { } else { f.debug_struct("GraphqlOperationDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5466,10 +5466,10 @@ impl AstNode for GraphqlOperationType { } impl std::fmt::Debug for GraphqlOperationType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlOperationType") .field( "value_token", @@ -5479,7 +5479,7 @@ impl std::fmt::Debug for GraphqlOperationType { } else { f.debug_struct("GraphqlOperationType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5516,10 +5516,10 @@ impl AstNode for GraphqlRoot { } impl std::fmt::Debug for GraphqlRoot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlRoot") .field( "bom_token", @@ -5531,7 +5531,7 @@ impl std::fmt::Debug for GraphqlRoot { } else { f.debug_struct("GraphqlRoot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5568,10 +5568,10 @@ impl AstNode for GraphqlRootOperationTypeDefinition { } impl std::fmt::Debug for GraphqlRootOperationTypeDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlRootOperationTypeDefinition") .field( "operation_type", @@ -5587,7 +5587,7 @@ impl std::fmt::Debug for GraphqlRootOperationTypeDefinition { f.debug_struct("GraphqlRootOperationTypeDefinition") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5624,10 +5624,10 @@ impl AstNode for GraphqlRootOperationTypes { } impl std::fmt::Debug for GraphqlRootOperationTypes { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlRootOperationTypes") .field( "l_curly_token", @@ -5642,7 +5642,7 @@ impl std::fmt::Debug for GraphqlRootOperationTypes { } else { f.debug_struct("GraphqlRootOperationTypes").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5679,10 +5679,10 @@ impl AstNode for GraphqlScalarTypeDefinition { } impl std::fmt::Debug for GraphqlScalarTypeDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlScalarTypeDefinition") .field( "description", @@ -5698,7 +5698,7 @@ impl std::fmt::Debug for GraphqlScalarTypeDefinition { } else { f.debug_struct("GraphqlScalarTypeDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5735,10 +5735,10 @@ impl AstNode for GraphqlScalarTypeExtension { } impl std::fmt::Debug for GraphqlScalarTypeExtension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlScalarTypeExtension") .field( "extend_token", @@ -5754,7 +5754,7 @@ impl std::fmt::Debug for GraphqlScalarTypeExtension { } else { f.debug_struct("GraphqlScalarTypeExtension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5791,10 +5791,10 @@ impl AstNode for GraphqlSchemaDefinition { } impl std::fmt::Debug for GraphqlSchemaDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlSchemaDefinition") .field( "description", @@ -5813,7 +5813,7 @@ impl std::fmt::Debug for GraphqlSchemaDefinition { } else { f.debug_struct("GraphqlSchemaDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5850,10 +5850,10 @@ impl AstNode for GraphqlSchemaExtension { } impl std::fmt::Debug for GraphqlSchemaExtension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlSchemaExtension") .field( "extend_token", @@ -5872,7 +5872,7 @@ impl std::fmt::Debug for GraphqlSchemaExtension { } else { f.debug_struct("GraphqlSchemaExtension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5909,10 +5909,10 @@ impl AstNode for GraphqlSelectionSet { } impl std::fmt::Debug for GraphqlSelectionSet { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlSelectionSet") .field( "l_curly_token", @@ -5927,7 +5927,7 @@ impl std::fmt::Debug for GraphqlSelectionSet { } else { f.debug_struct("GraphqlSelectionSet").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5964,10 +5964,10 @@ impl AstNode for GraphqlStringValue { } impl std::fmt::Debug for GraphqlStringValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlStringValue") .field( "graphql_string_literal_token", @@ -5977,7 +5977,7 @@ impl std::fmt::Debug for GraphqlStringValue { } else { f.debug_struct("GraphqlStringValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6014,10 +6014,10 @@ impl AstNode for GraphqlTypeCondition { } impl std::fmt::Debug for GraphqlTypeCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlTypeCondition") .field("on_token", &support::DebugSyntaxResult(self.on_token())) .field("ty", &support::DebugSyntaxResult(self.ty())) @@ -6025,7 +6025,7 @@ impl std::fmt::Debug for GraphqlTypeCondition { } else { f.debug_struct("GraphqlTypeCondition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6062,10 +6062,10 @@ impl AstNode for GraphqlUnionMemberTypes { } impl std::fmt::Debug for GraphqlUnionMemberTypes { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlUnionMemberTypes") .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) .field( @@ -6077,7 +6077,7 @@ impl std::fmt::Debug for GraphqlUnionMemberTypes { } else { f.debug_struct("GraphqlUnionMemberTypes").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6114,10 +6114,10 @@ impl AstNode for GraphqlUnionTypeDefinition { } impl std::fmt::Debug for GraphqlUnionTypeDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlUnionTypeDefinition") .field( "description", @@ -6137,7 +6137,7 @@ impl std::fmt::Debug for GraphqlUnionTypeDefinition { } else { f.debug_struct("GraphqlUnionTypeDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6174,10 +6174,10 @@ impl AstNode for GraphqlUnionTypeExtension { } impl std::fmt::Debug for GraphqlUnionTypeExtension { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlUnionTypeExtension") .field( "extend_token", @@ -6197,7 +6197,7 @@ impl std::fmt::Debug for GraphqlUnionTypeExtension { } else { f.debug_struct("GraphqlUnionTypeExtension").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6234,10 +6234,10 @@ impl AstNode for GraphqlVariableBinding { } impl std::fmt::Debug for GraphqlVariableBinding { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlVariableBinding") .field( "dollar_token", @@ -6248,7 +6248,7 @@ impl std::fmt::Debug for GraphqlVariableBinding { } else { f.debug_struct("GraphqlVariableBinding").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6285,10 +6285,10 @@ impl AstNode for GraphqlVariableDefinition { } impl std::fmt::Debug for GraphqlVariableDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlVariableDefinition") .field("variable", &support::DebugSyntaxResult(self.variable())) .field( @@ -6302,7 +6302,7 @@ impl std::fmt::Debug for GraphqlVariableDefinition { } else { f.debug_struct("GraphqlVariableDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6339,10 +6339,10 @@ impl AstNode for GraphqlVariableDefinitions { } impl std::fmt::Debug for GraphqlVariableDefinitions { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlVariableDefinitions") .field( "l_paren_token", @@ -6357,7 +6357,7 @@ impl std::fmt::Debug for GraphqlVariableDefinitions { } else { f.debug_struct("GraphqlVariableDefinitions").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6394,10 +6394,10 @@ impl AstNode for GraphqlVariableReference { } impl std::fmt::Debug for GraphqlVariableReference { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GraphqlVariableReference") .field( "dollar_token", @@ -6408,7 +6408,7 @@ impl std::fmt::Debug for GraphqlVariableReference { } else { f.debug_struct("GraphqlVariableReference").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } diff --git a/crates/biome_grit_syntax/src/generated/nodes.rs b/crates/biome_grit_syntax/src/generated/nodes.rs index a03c868ecf91..f14207ed0ccd 100644 --- a/crates/biome_grit_syntax/src/generated/nodes.rs +++ b/crates/biome_grit_syntax/src/generated/nodes.rs @@ -5109,10 +5109,10 @@ impl AstNode for GritAddOperation { } impl std::fmt::Debug for GritAddOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritAddOperation") .field("left", &support::DebugSyntaxResult(self.left())) .field("plus_token", &support::DebugSyntaxResult(self.plus_token())) @@ -5121,7 +5121,7 @@ impl std::fmt::Debug for GritAddOperation { } else { f.debug_struct("GritAddOperation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5158,10 +5158,10 @@ impl AstNode for GritAnnotation { } impl std::fmt::Debug for GritAnnotation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritAnnotation") .field( "value_token", @@ -5171,7 +5171,7 @@ impl std::fmt::Debug for GritAnnotation { } else { f.debug_struct("GritAnnotation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5208,10 +5208,10 @@ impl AstNode for GritAssignmentAsPattern { } impl std::fmt::Debug for GritAssignmentAsPattern { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritAssignmentAsPattern") .field("container", &support::DebugSyntaxResult(self.container())) .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) @@ -5220,7 +5220,7 @@ impl std::fmt::Debug for GritAssignmentAsPattern { } else { f.debug_struct("GritAssignmentAsPattern").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5257,10 +5257,10 @@ impl AstNode for GritBacktickSnippetLiteral { } impl std::fmt::Debug for GritBacktickSnippetLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritBacktickSnippetLiteral") .field( "value_token", @@ -5270,7 +5270,7 @@ impl std::fmt::Debug for GritBacktickSnippetLiteral { } else { f.debug_struct("GritBacktickSnippetLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5307,17 +5307,17 @@ impl AstNode for GritBooleanLiteral { } impl std::fmt::Debug for GritBooleanLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritBooleanLiteral") .field("value", &support::DebugSyntaxResult(self.value())) .finish() } else { f.debug_struct("GritBooleanLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5354,10 +5354,10 @@ impl AstNode for GritBracketedPattern { } impl std::fmt::Debug for GritBracketedPattern { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritBracketedPattern") .field( "l_paren_token", @@ -5372,7 +5372,7 @@ impl std::fmt::Debug for GritBracketedPattern { } else { f.debug_struct("GritBracketedPattern").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5409,10 +5409,10 @@ impl AstNode for GritBracketedPredicate { } impl std::fmt::Debug for GritBracketedPredicate { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritBracketedPredicate") .field( "l_paren_token", @@ -5427,7 +5427,7 @@ impl std::fmt::Debug for GritBracketedPredicate { } else { f.debug_struct("GritBracketedPredicate").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5464,10 +5464,10 @@ impl AstNode for GritBubble { } impl std::fmt::Debug for GritBubble { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritBubble") .field( "bubble_token", @@ -5479,7 +5479,7 @@ impl std::fmt::Debug for GritBubble { } else { f.debug_struct("GritBubble").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5516,10 +5516,10 @@ impl AstNode for GritBubbleScope { } impl std::fmt::Debug for GritBubbleScope { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritBubbleScope") .field( "l_paren_token", @@ -5534,7 +5534,7 @@ impl std::fmt::Debug for GritBubbleScope { } else { f.debug_struct("GritBubbleScope").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5571,17 +5571,17 @@ impl AstNode for GritCodeSnippet { } impl std::fmt::Debug for GritCodeSnippet { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritCodeSnippet") .field("source", &support::DebugSyntaxResult(self.source())) .finish() } else { f.debug_struct("GritCodeSnippet").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5618,10 +5618,10 @@ impl AstNode for GritCurlyPattern { } impl std::fmt::Debug for GritCurlyPattern { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritCurlyPattern") .field( "l_curly_token", @@ -5636,7 +5636,7 @@ impl std::fmt::Debug for GritCurlyPattern { } else { f.debug_struct("GritCurlyPattern").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5673,10 +5673,10 @@ impl AstNode for GritDivOperation { } impl std::fmt::Debug for GritDivOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritDivOperation") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -5688,7 +5688,7 @@ impl std::fmt::Debug for GritDivOperation { } else { f.debug_struct("GritDivOperation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5725,17 +5725,17 @@ impl AstNode for GritDot { } impl std::fmt::Debug for GritDot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritDot") .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) .finish() } else { f.debug_struct("GritDot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5772,10 +5772,10 @@ impl AstNode for GritDotdotdot { } impl std::fmt::Debug for GritDotdotdot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritDotdotdot") .field( "dotdotdot_token", @@ -5786,7 +5786,7 @@ impl std::fmt::Debug for GritDotdotdot { } else { f.debug_struct("GritDotdotdot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5823,10 +5823,10 @@ impl AstNode for GritDoubleLiteral { } impl std::fmt::Debug for GritDoubleLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritDoubleLiteral") .field( "value_token", @@ -5836,7 +5836,7 @@ impl std::fmt::Debug for GritDoubleLiteral { } else { f.debug_struct("GritDoubleLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5873,10 +5873,10 @@ impl AstNode for GritEngineName { } impl std::fmt::Debug for GritEngineName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritEngineName") .field( "engine_kind", @@ -5886,7 +5886,7 @@ impl std::fmt::Debug for GritEngineName { } else { f.debug_struct("GritEngineName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5923,10 +5923,10 @@ impl AstNode for GritEvery { } impl std::fmt::Debug for GritEvery { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritEvery") .field( "every_token", @@ -5937,7 +5937,7 @@ impl std::fmt::Debug for GritEvery { } else { f.debug_struct("GritEvery").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -5974,10 +5974,10 @@ impl AstNode for GritFiles { } impl std::fmt::Debug for GritFiles { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritFiles") .field( "multifile_token", @@ -5996,7 +5996,7 @@ impl std::fmt::Debug for GritFiles { } else { f.debug_struct("GritFiles").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6033,10 +6033,10 @@ impl AstNode for GritFunctionDefinition { } impl std::fmt::Debug for GritFunctionDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritFunctionDefinition") .field( "function_token", @@ -6057,7 +6057,7 @@ impl std::fmt::Debug for GritFunctionDefinition { } else { f.debug_struct("GritFunctionDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6094,10 +6094,10 @@ impl AstNode for GritIntLiteral { } impl std::fmt::Debug for GritIntLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritIntLiteral") .field( "value_token", @@ -6107,7 +6107,7 @@ impl std::fmt::Debug for GritIntLiteral { } else { f.debug_struct("GritIntLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6144,10 +6144,10 @@ impl AstNode for GritLanguageDeclaration { } impl std::fmt::Debug for GritLanguageDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritLanguageDeclaration") .field( "language_token", @@ -6163,7 +6163,7 @@ impl std::fmt::Debug for GritLanguageDeclaration { } else { f.debug_struct("GritLanguageDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6200,10 +6200,10 @@ impl AstNode for GritLanguageFlavor { } impl std::fmt::Debug for GritLanguageFlavor { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritLanguageFlavor") .field( "l_paren_token", @@ -6218,7 +6218,7 @@ impl std::fmt::Debug for GritLanguageFlavor { } else { f.debug_struct("GritLanguageFlavor").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6255,10 +6255,10 @@ impl AstNode for GritLanguageFlavorKind { } impl std::fmt::Debug for GritLanguageFlavorKind { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritLanguageFlavorKind") .field( "flavor_kind", @@ -6268,7 +6268,7 @@ impl std::fmt::Debug for GritLanguageFlavorKind { } else { f.debug_struct("GritLanguageFlavorKind").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6305,10 +6305,10 @@ impl AstNode for GritLanguageName { } impl std::fmt::Debug for GritLanguageName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritLanguageName") .field( "language_kind", @@ -6318,7 +6318,7 @@ impl std::fmt::Debug for GritLanguageName { } else { f.debug_struct("GritLanguageName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6355,10 +6355,10 @@ impl AstNode for GritLanguageSpecificSnippet { } impl std::fmt::Debug for GritLanguageSpecificSnippet { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritLanguageSpecificSnippet") .field("language", &support::DebugSyntaxResult(self.language())) .field( @@ -6369,7 +6369,7 @@ impl std::fmt::Debug for GritLanguageSpecificSnippet { } else { f.debug_struct("GritLanguageSpecificSnippet").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6406,10 +6406,10 @@ impl AstNode for GritLike { } impl std::fmt::Debug for GritLike { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritLike") .field("like_token", &support::DebugSyntaxResult(self.like_token())) .field( @@ -6429,7 +6429,7 @@ impl std::fmt::Debug for GritLike { } else { f.debug_struct("GritLike").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6466,10 +6466,10 @@ impl AstNode for GritLikeThreshold { } impl std::fmt::Debug for GritLikeThreshold { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritLikeThreshold") .field( "l_paren_token", @@ -6484,7 +6484,7 @@ impl std::fmt::Debug for GritLikeThreshold { } else { f.debug_struct("GritLikeThreshold").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6521,10 +6521,10 @@ impl AstNode for GritList { } impl std::fmt::Debug for GritList { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritList") .field("name", &support::DebugOptionalElement(self.name())) .field( @@ -6540,7 +6540,7 @@ impl std::fmt::Debug for GritList { } else { f.debug_struct("GritList").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6577,10 +6577,10 @@ impl AstNode for GritListAccessor { } impl std::fmt::Debug for GritListAccessor { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritListAccessor") .field("list", &support::DebugSyntaxResult(self.list())) .field( @@ -6596,7 +6596,7 @@ impl std::fmt::Debug for GritListAccessor { } else { f.debug_struct("GritListAccessor").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6633,10 +6633,10 @@ impl AstNode for GritMap { } impl std::fmt::Debug for GritMap { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritMap") .field( "l_curly_token", @@ -6651,7 +6651,7 @@ impl std::fmt::Debug for GritMap { } else { f.debug_struct("GritMap").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6688,10 +6688,10 @@ impl AstNode for GritMapAccessor { } impl std::fmt::Debug for GritMapAccessor { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritMapAccessor") .field("map", &support::DebugSyntaxResult(self.map())) .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) @@ -6700,7 +6700,7 @@ impl std::fmt::Debug for GritMapAccessor { } else { f.debug_struct("GritMapAccessor").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6737,10 +6737,10 @@ impl AstNode for GritMapElement { } impl std::fmt::Debug for GritMapElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritMapElement") .field("key", &support::DebugSyntaxResult(self.key())) .field( @@ -6752,7 +6752,7 @@ impl std::fmt::Debug for GritMapElement { } else { f.debug_struct("GritMapElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6789,10 +6789,10 @@ impl AstNode for GritModOperation { } impl std::fmt::Debug for GritModOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritModOperation") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -6804,7 +6804,7 @@ impl std::fmt::Debug for GritModOperation { } else { f.debug_struct("GritModOperation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6841,10 +6841,10 @@ impl AstNode for GritMulOperation { } impl std::fmt::Debug for GritMulOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritMulOperation") .field("left", &support::DebugSyntaxResult(self.left())) .field("star_token", &support::DebugSyntaxResult(self.star_token())) @@ -6853,7 +6853,7 @@ impl std::fmt::Debug for GritMulOperation { } else { f.debug_struct("GritMulOperation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6890,10 +6890,10 @@ impl AstNode for GritName { } impl std::fmt::Debug for GritName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritName") .field( "value_token", @@ -6903,7 +6903,7 @@ impl std::fmt::Debug for GritName { } else { f.debug_struct("GritName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6940,10 +6940,10 @@ impl AstNode for GritNamedArg { } impl std::fmt::Debug for GritNamedArg { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritNamedArg") .field("name", &support::DebugSyntaxResult(self.name())) .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) @@ -6952,7 +6952,7 @@ impl std::fmt::Debug for GritNamedArg { } else { f.debug_struct("GritNamedArg").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -6989,10 +6989,10 @@ impl AstNode for GritNegativeIntLiteral { } impl std::fmt::Debug for GritNegativeIntLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritNegativeIntLiteral") .field( "value_token", @@ -7002,7 +7002,7 @@ impl std::fmt::Debug for GritNegativeIntLiteral { } else { f.debug_struct("GritNegativeIntLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7039,10 +7039,10 @@ impl AstNode for GritNodeLike { } impl std::fmt::Debug for GritNodeLike { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritNodeLike") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -7058,7 +7058,7 @@ impl std::fmt::Debug for GritNodeLike { } else { f.debug_struct("GritNodeLike").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7095,17 +7095,17 @@ impl AstNode for GritNot { } impl std::fmt::Debug for GritNot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritNot") .field("token", &support::DebugSyntaxResult(self.token())) .finish() } else { f.debug_struct("GritNot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7142,10 +7142,10 @@ impl AstNode for GritPatternAccumulate { } impl std::fmt::Debug for GritPatternAccumulate { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternAccumulate") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -7157,7 +7157,7 @@ impl std::fmt::Debug for GritPatternAccumulate { } else { f.debug_struct("GritPatternAccumulate").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7194,10 +7194,10 @@ impl AstNode for GritPatternAfter { } impl std::fmt::Debug for GritPatternAfter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternAfter") .field( "after_token", @@ -7208,7 +7208,7 @@ impl std::fmt::Debug for GritPatternAfter { } else { f.debug_struct("GritPatternAfter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7245,10 +7245,10 @@ impl AstNode for GritPatternAnd { } impl std::fmt::Debug for GritPatternAnd { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternAnd") .field("and_token", &support::DebugSyntaxResult(self.and_token())) .field( @@ -7264,7 +7264,7 @@ impl std::fmt::Debug for GritPatternAnd { } else { f.debug_struct("GritPatternAnd").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7301,10 +7301,10 @@ impl AstNode for GritPatternAny { } impl std::fmt::Debug for GritPatternAny { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternAny") .field("any_token", &support::DebugSyntaxResult(self.any_token())) .field( @@ -7320,7 +7320,7 @@ impl std::fmt::Debug for GritPatternAny { } else { f.debug_struct("GritPatternAny").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7357,10 +7357,10 @@ impl AstNode for GritPatternAs { } impl std::fmt::Debug for GritPatternAs { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternAs") .field("pattern", &support::DebugSyntaxResult(self.pattern())) .field("as_token", &support::DebugSyntaxResult(self.as_token())) @@ -7369,7 +7369,7 @@ impl std::fmt::Debug for GritPatternAs { } else { f.debug_struct("GritPatternAs").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7406,10 +7406,10 @@ impl AstNode for GritPatternBefore { } impl std::fmt::Debug for GritPatternBefore { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternBefore") .field( "before_token", @@ -7420,7 +7420,7 @@ impl std::fmt::Debug for GritPatternBefore { } else { f.debug_struct("GritPatternBefore").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7457,10 +7457,10 @@ impl AstNode for GritPatternContains { } impl std::fmt::Debug for GritPatternContains { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternContains") .field( "contains_token", @@ -7475,7 +7475,7 @@ impl std::fmt::Debug for GritPatternContains { } else { f.debug_struct("GritPatternContains").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7512,10 +7512,10 @@ impl AstNode for GritPatternDefinition { } impl std::fmt::Debug for GritPatternDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternDefinition") .field( "visibility_token", @@ -7541,7 +7541,7 @@ impl std::fmt::Debug for GritPatternDefinition { } else { f.debug_struct("GritPatternDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7578,10 +7578,10 @@ impl AstNode for GritPatternDefinitionBody { } impl std::fmt::Debug for GritPatternDefinitionBody { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternDefinitionBody") .field( "l_curly_token", @@ -7596,7 +7596,7 @@ impl std::fmt::Debug for GritPatternDefinitionBody { } else { f.debug_struct("GritPatternDefinitionBody").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7633,10 +7633,10 @@ impl AstNode for GritPatternElseClause { } impl std::fmt::Debug for GritPatternElseClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternElseClause") .field("else_token", &support::DebugSyntaxResult(self.else_token())) .field( @@ -7647,7 +7647,7 @@ impl std::fmt::Debug for GritPatternElseClause { } else { f.debug_struct("GritPatternElseClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7684,10 +7684,10 @@ impl AstNode for GritPatternIfElse { } impl std::fmt::Debug for GritPatternIfElse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternIfElse") .field("if_token", &support::DebugSyntaxResult(self.if_token())) .field( @@ -7714,7 +7714,7 @@ impl std::fmt::Debug for GritPatternIfElse { } else { f.debug_struct("GritPatternIfElse").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7751,10 +7751,10 @@ impl AstNode for GritPatternIncludes { } impl std::fmt::Debug for GritPatternIncludes { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternIncludes") .field( "includes_token", @@ -7765,7 +7765,7 @@ impl std::fmt::Debug for GritPatternIncludes { } else { f.debug_struct("GritPatternIncludes").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7802,10 +7802,10 @@ impl AstNode for GritPatternLimit { } impl std::fmt::Debug for GritPatternLimit { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternLimit") .field("pattern", &support::DebugSyntaxResult(self.pattern())) .field( @@ -7817,7 +7817,7 @@ impl std::fmt::Debug for GritPatternLimit { } else { f.debug_struct("GritPatternLimit").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7854,10 +7854,10 @@ impl AstNode for GritPatternMaybe { } impl std::fmt::Debug for GritPatternMaybe { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternMaybe") .field( "maybe_token", @@ -7868,7 +7868,7 @@ impl std::fmt::Debug for GritPatternMaybe { } else { f.debug_struct("GritPatternMaybe").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7905,10 +7905,10 @@ impl AstNode for GritPatternNot { } impl std::fmt::Debug for GritPatternNot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternNot") .field("not", &support::DebugSyntaxResult(self.not())) .field("pattern", &support::DebugSyntaxResult(self.pattern())) @@ -7916,7 +7916,7 @@ impl std::fmt::Debug for GritPatternNot { } else { f.debug_struct("GritPatternNot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -7953,10 +7953,10 @@ impl AstNode for GritPatternOr { } impl std::fmt::Debug for GritPatternOr { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternOr") .field("or_token", &support::DebugSyntaxResult(self.or_token())) .field( @@ -7972,7 +7972,7 @@ impl std::fmt::Debug for GritPatternOr { } else { f.debug_struct("GritPatternOr").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8009,10 +8009,10 @@ impl AstNode for GritPatternOrElse { } impl std::fmt::Debug for GritPatternOrElse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternOrElse") .field( "orelse_token", @@ -8031,7 +8031,7 @@ impl std::fmt::Debug for GritPatternOrElse { } else { f.debug_struct("GritPatternOrElse").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8068,10 +8068,10 @@ impl AstNode for GritPatternUntilClause { } impl std::fmt::Debug for GritPatternUntilClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternUntilClause") .field( "until_token", @@ -8082,7 +8082,7 @@ impl std::fmt::Debug for GritPatternUntilClause { } else { f.debug_struct("GritPatternUntilClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8119,10 +8119,10 @@ impl AstNode for GritPatternWhere { } impl std::fmt::Debug for GritPatternWhere { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPatternWhere") .field("pattern", &support::DebugSyntaxResult(self.pattern())) .field( @@ -8137,7 +8137,7 @@ impl std::fmt::Debug for GritPatternWhere { } else { f.debug_struct("GritPatternWhere").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8174,10 +8174,10 @@ impl AstNode for GritPredicateAccumulate { } impl std::fmt::Debug for GritPredicateAccumulate { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateAccumulate") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -8189,7 +8189,7 @@ impl std::fmt::Debug for GritPredicateAccumulate { } else { f.debug_struct("GritPredicateAccumulate").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8226,10 +8226,10 @@ impl AstNode for GritPredicateAnd { } impl std::fmt::Debug for GritPredicateAnd { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateAnd") .field( "and_token", @@ -8248,7 +8248,7 @@ impl std::fmt::Debug for GritPredicateAnd { } else { f.debug_struct("GritPredicateAnd").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8285,10 +8285,10 @@ impl AstNode for GritPredicateAny { } impl std::fmt::Debug for GritPredicateAny { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateAny") .field("any_token", &support::DebugSyntaxResult(self.any_token())) .field( @@ -8304,7 +8304,7 @@ impl std::fmt::Debug for GritPredicateAny { } else { f.debug_struct("GritPredicateAny").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8341,10 +8341,10 @@ impl AstNode for GritPredicateAssignment { } impl std::fmt::Debug for GritPredicateAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateAssignment") .field("container", &support::DebugSyntaxResult(self.container())) .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) @@ -8353,7 +8353,7 @@ impl std::fmt::Debug for GritPredicateAssignment { } else { f.debug_struct("GritPredicateAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8390,10 +8390,10 @@ impl AstNode for GritPredicateCall { } impl std::fmt::Debug for GritPredicateCall { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateCall") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -8409,7 +8409,7 @@ impl std::fmt::Debug for GritPredicateCall { } else { f.debug_struct("GritPredicateCall").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8446,10 +8446,10 @@ impl AstNode for GritPredicateCurly { } impl std::fmt::Debug for GritPredicateCurly { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateCurly") .field( "l_curly_token", @@ -8464,7 +8464,7 @@ impl std::fmt::Debug for GritPredicateCurly { } else { f.debug_struct("GritPredicateCurly").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8501,10 +8501,10 @@ impl AstNode for GritPredicateDefinition { } impl std::fmt::Debug for GritPredicateDefinition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateDefinition") .field( "predicate_token", @@ -8525,7 +8525,7 @@ impl std::fmt::Debug for GritPredicateDefinition { } else { f.debug_struct("GritPredicateDefinition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8562,10 +8562,10 @@ impl AstNode for GritPredicateElseClause { } impl std::fmt::Debug for GritPredicateElseClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateElseClause") .field("else_token", &support::DebugSyntaxResult(self.else_token())) .field( @@ -8576,7 +8576,7 @@ impl std::fmt::Debug for GritPredicateElseClause { } else { f.debug_struct("GritPredicateElseClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8613,10 +8613,10 @@ impl AstNode for GritPredicateEqual { } impl std::fmt::Debug for GritPredicateEqual { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateEqual") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -8628,7 +8628,7 @@ impl std::fmt::Debug for GritPredicateEqual { } else { f.debug_struct("GritPredicateEqual").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8665,10 +8665,10 @@ impl AstNode for GritPredicateGreater { } impl std::fmt::Debug for GritPredicateGreater { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateGreater") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -8680,7 +8680,7 @@ impl std::fmt::Debug for GritPredicateGreater { } else { f.debug_struct("GritPredicateGreater").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8717,10 +8717,10 @@ impl AstNode for GritPredicateGreaterEqual { } impl std::fmt::Debug for GritPredicateGreaterEqual { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateGreaterEqual") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -8732,7 +8732,7 @@ impl std::fmt::Debug for GritPredicateGreaterEqual { } else { f.debug_struct("GritPredicateGreaterEqual").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8769,10 +8769,10 @@ impl AstNode for GritPredicateIfElse { } impl std::fmt::Debug for GritPredicateIfElse { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateIfElse") .field("if_token", &support::DebugSyntaxResult(self.if_token())) .field( @@ -8799,7 +8799,7 @@ impl std::fmt::Debug for GritPredicateIfElse { } else { f.debug_struct("GritPredicateIfElse").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8836,10 +8836,10 @@ impl AstNode for GritPredicateLess { } impl std::fmt::Debug for GritPredicateLess { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateLess") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -8851,7 +8851,7 @@ impl std::fmt::Debug for GritPredicateLess { } else { f.debug_struct("GritPredicateLess").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8888,10 +8888,10 @@ impl AstNode for GritPredicateLessEqual { } impl std::fmt::Debug for GritPredicateLessEqual { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateLessEqual") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -8903,7 +8903,7 @@ impl std::fmt::Debug for GritPredicateLessEqual { } else { f.debug_struct("GritPredicateLessEqual").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8940,10 +8940,10 @@ impl AstNode for GritPredicateMatch { } impl std::fmt::Debug for GritPredicateMatch { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateMatch") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -8955,7 +8955,7 @@ impl std::fmt::Debug for GritPredicateMatch { } else { f.debug_struct("GritPredicateMatch").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -8992,10 +8992,10 @@ impl AstNode for GritPredicateMaybe { } impl std::fmt::Debug for GritPredicateMaybe { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateMaybe") .field( "maybe_token", @@ -9006,7 +9006,7 @@ impl std::fmt::Debug for GritPredicateMaybe { } else { f.debug_struct("GritPredicateMaybe").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9043,10 +9043,10 @@ impl AstNode for GritPredicateNot { } impl std::fmt::Debug for GritPredicateNot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateNot") .field("not", &support::DebugSyntaxResult(self.not())) .field("predicate", &support::DebugSyntaxResult(self.predicate())) @@ -9054,7 +9054,7 @@ impl std::fmt::Debug for GritPredicateNot { } else { f.debug_struct("GritPredicateNot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9091,10 +9091,10 @@ impl AstNode for GritPredicateNotEqual { } impl std::fmt::Debug for GritPredicateNotEqual { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateNotEqual") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -9106,7 +9106,7 @@ impl std::fmt::Debug for GritPredicateNotEqual { } else { f.debug_struct("GritPredicateNotEqual").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9143,10 +9143,10 @@ impl AstNode for GritPredicateOr { } impl std::fmt::Debug for GritPredicateOr { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateOr") .field("or_token", &support::DebugSyntaxResult(self.or_token())) .field( @@ -9162,7 +9162,7 @@ impl std::fmt::Debug for GritPredicateOr { } else { f.debug_struct("GritPredicateOr").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9199,10 +9199,10 @@ impl AstNode for GritPredicateReturn { } impl std::fmt::Debug for GritPredicateReturn { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateReturn") .field( "return_token", @@ -9213,7 +9213,7 @@ impl std::fmt::Debug for GritPredicateReturn { } else { f.debug_struct("GritPredicateReturn").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9250,10 +9250,10 @@ impl AstNode for GritPredicateRewrite { } impl std::fmt::Debug for GritPredicateRewrite { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritPredicateRewrite") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -9269,7 +9269,7 @@ impl std::fmt::Debug for GritPredicateRewrite { } else { f.debug_struct("GritPredicateRewrite").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9306,10 +9306,10 @@ impl AstNode for GritRawBacktickSnippetLiteral { } impl std::fmt::Debug for GritRawBacktickSnippetLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritRawBacktickSnippetLiteral") .field( "value_token", @@ -9319,7 +9319,7 @@ impl std::fmt::Debug for GritRawBacktickSnippetLiteral { } else { f.debug_struct("GritRawBacktickSnippetLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9356,10 +9356,10 @@ impl AstNode for GritRegexLiteral { } impl std::fmt::Debug for GritRegexLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritRegexLiteral") .field( "value_token", @@ -9369,7 +9369,7 @@ impl std::fmt::Debug for GritRegexLiteral { } else { f.debug_struct("GritRegexLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9406,10 +9406,10 @@ impl AstNode for GritRegexPattern { } impl std::fmt::Debug for GritRegexPattern { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritRegexPattern") .field("regex", &support::DebugSyntaxResult(self.regex())) .field( @@ -9420,7 +9420,7 @@ impl std::fmt::Debug for GritRegexPattern { } else { f.debug_struct("GritRegexPattern").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9457,10 +9457,10 @@ impl AstNode for GritRegexPatternVariables { } impl std::fmt::Debug for GritRegexPatternVariables { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritRegexPatternVariables") .field( "l_paren_token", @@ -9475,7 +9475,7 @@ impl std::fmt::Debug for GritRegexPatternVariables { } else { f.debug_struct("GritRegexPatternVariables").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9512,10 +9512,10 @@ impl AstNode for GritRewrite { } impl std::fmt::Debug for GritRewrite { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritRewrite") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -9531,7 +9531,7 @@ impl std::fmt::Debug for GritRewrite { } else { f.debug_struct("GritRewrite").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9568,10 +9568,10 @@ impl AstNode for GritRoot { } impl std::fmt::Debug for GritRoot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritRoot") .field( "bom_token", @@ -9585,7 +9585,7 @@ impl std::fmt::Debug for GritRoot { } else { f.debug_struct("GritRoot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9622,10 +9622,10 @@ impl AstNode for GritSequential { } impl std::fmt::Debug for GritSequential { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritSequential") .field( "sequential_token", @@ -9644,7 +9644,7 @@ impl std::fmt::Debug for GritSequential { } else { f.debug_struct("GritSequential").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9681,10 +9681,10 @@ impl AstNode for GritSnippetRegexLiteral { } impl std::fmt::Debug for GritSnippetRegexLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritSnippetRegexLiteral") .field( "value_token", @@ -9694,7 +9694,7 @@ impl std::fmt::Debug for GritSnippetRegexLiteral { } else { f.debug_struct("GritSnippetRegexLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9731,10 +9731,10 @@ impl AstNode for GritSome { } impl std::fmt::Debug for GritSome { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritSome") .field("some_token", &support::DebugSyntaxResult(self.some_token())) .field("pattern", &support::DebugSyntaxResult(self.pattern())) @@ -9742,7 +9742,7 @@ impl std::fmt::Debug for GritSome { } else { f.debug_struct("GritSome").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9779,10 +9779,10 @@ impl AstNode for GritStringLiteral { } impl std::fmt::Debug for GritStringLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritStringLiteral") .field( "value_token", @@ -9792,7 +9792,7 @@ impl std::fmt::Debug for GritStringLiteral { } else { f.debug_struct("GritStringLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9829,10 +9829,10 @@ impl AstNode for GritSubOperation { } impl std::fmt::Debug for GritSubOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritSubOperation") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -9844,7 +9844,7 @@ impl std::fmt::Debug for GritSubOperation { } else { f.debug_struct("GritSubOperation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9881,10 +9881,10 @@ impl AstNode for GritUndefinedLiteral { } impl std::fmt::Debug for GritUndefinedLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritUndefinedLiteral") .field( "token_token", @@ -9894,7 +9894,7 @@ impl std::fmt::Debug for GritUndefinedLiteral { } else { f.debug_struct("GritUndefinedLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9931,10 +9931,10 @@ impl AstNode for GritUnderscore { } impl std::fmt::Debug for GritUnderscore { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritUnderscore") .field( "token_token", @@ -9944,7 +9944,7 @@ impl std::fmt::Debug for GritUnderscore { } else { f.debug_struct("GritUnderscore").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -9981,10 +9981,10 @@ impl AstNode for GritVariable { } impl std::fmt::Debug for GritVariable { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritVariable") .field( "value_token", @@ -9994,7 +9994,7 @@ impl std::fmt::Debug for GritVariable { } else { f.debug_struct("GritVariable").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10031,10 +10031,10 @@ impl AstNode for GritVersion { } impl std::fmt::Debug for GritVersion { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritVersion") .field( "engine_token", @@ -10057,7 +10057,7 @@ impl std::fmt::Debug for GritVersion { } else { f.debug_struct("GritVersion").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -10094,10 +10094,10 @@ impl AstNode for GritWithin { } impl std::fmt::Debug for GritWithin { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("GritWithin") .field( "within_token", @@ -10112,7 +10112,7 @@ impl std::fmt::Debug for GritWithin { } else { f.debug_struct("GritWithin").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } diff --git a/crates/biome_html_syntax/src/generated/nodes.rs b/crates/biome_html_syntax/src/generated/nodes.rs index 72f34a2d13e2..ee02b5b5d500 100644 --- a/crates/biome_html_syntax/src/generated/nodes.rs +++ b/crates/biome_html_syntax/src/generated/nodes.rs @@ -703,10 +703,10 @@ impl AstNode for HtmlAttribute { } impl std::fmt::Debug for HtmlAttribute { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlAttribute") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -717,7 +717,7 @@ impl std::fmt::Debug for HtmlAttribute { } else { f.debug_struct("HtmlAttribute").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -754,10 +754,10 @@ impl AstNode for HtmlAttributeInitializerClause { } impl std::fmt::Debug for HtmlAttributeInitializerClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlAttributeInitializerClause") .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) .field("value", &support::DebugSyntaxResult(self.value())) @@ -765,7 +765,7 @@ impl std::fmt::Debug for HtmlAttributeInitializerClause { } else { f.debug_struct("HtmlAttributeInitializerClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -802,10 +802,10 @@ impl AstNode for HtmlCdataSection { } impl std::fmt::Debug for HtmlCdataSection { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlCdataSection") .field( "cdata_start_token", @@ -823,7 +823,7 @@ impl std::fmt::Debug for HtmlCdataSection { } else { f.debug_struct("HtmlCdataSection").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -860,10 +860,10 @@ impl AstNode for HtmlClosingElement { } impl std::fmt::Debug for HtmlClosingElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlClosingElement") .field( "l_angle_token", @@ -882,7 +882,7 @@ impl std::fmt::Debug for HtmlClosingElement { } else { f.debug_struct("HtmlClosingElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -919,10 +919,10 @@ impl AstNode for HtmlComment { } impl std::fmt::Debug for HtmlComment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlComment") .field( "comment_start_token", @@ -940,7 +940,7 @@ impl std::fmt::Debug for HtmlComment { } else { f.debug_struct("HtmlComment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -977,10 +977,10 @@ impl AstNode for HtmlContent { } impl std::fmt::Debug for HtmlContent { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlContent") .field( "value_token", @@ -990,7 +990,7 @@ impl std::fmt::Debug for HtmlContent { } else { f.debug_struct("HtmlContent").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1027,10 +1027,10 @@ impl AstNode for HtmlDirective { } impl std::fmt::Debug for HtmlDirective { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlDirective") .field( "l_angle_token", @@ -1065,7 +1065,7 @@ impl std::fmt::Debug for HtmlDirective { } else { f.debug_struct("HtmlDirective").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1102,10 +1102,10 @@ impl AstNode for HtmlElement { } impl std::fmt::Debug for HtmlElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlElement") .field( "opening_element", @@ -1120,7 +1120,7 @@ impl std::fmt::Debug for HtmlElement { } else { f.debug_struct("HtmlElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1157,10 +1157,10 @@ impl AstNode for HtmlName { } impl std::fmt::Debug for HtmlName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlName") .field( "value_token", @@ -1170,7 +1170,7 @@ impl std::fmt::Debug for HtmlName { } else { f.debug_struct("HtmlName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1207,10 +1207,10 @@ impl AstNode for HtmlOpeningElement { } impl std::fmt::Debug for HtmlOpeningElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlOpeningElement") .field( "l_angle_token", @@ -1226,7 +1226,7 @@ impl std::fmt::Debug for HtmlOpeningElement { } else { f.debug_struct("HtmlOpeningElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1263,10 +1263,10 @@ impl AstNode for HtmlRoot { } impl std::fmt::Debug for HtmlRoot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlRoot") .field( "bom_token", @@ -1282,7 +1282,7 @@ impl std::fmt::Debug for HtmlRoot { } else { f.debug_struct("HtmlRoot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1319,10 +1319,10 @@ impl AstNode for HtmlSelfClosingElement { } impl std::fmt::Debug for HtmlSelfClosingElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlSelfClosingElement") .field( "l_angle_token", @@ -1342,7 +1342,7 @@ impl std::fmt::Debug for HtmlSelfClosingElement { } else { f.debug_struct("HtmlSelfClosingElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1379,10 +1379,10 @@ impl AstNode for HtmlString { } impl std::fmt::Debug for HtmlString { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("HtmlString") .field( "value_token", @@ -1392,7 +1392,7 @@ impl std::fmt::Debug for HtmlString { } else { f.debug_struct("HtmlString").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } diff --git a/crates/biome_js_syntax/src/generated/nodes.rs b/crates/biome_js_syntax/src/generated/nodes.rs index 947f79cb7d42..5b9eca8e59dc 100644 --- a/crates/biome_js_syntax/src/generated/nodes.rs +++ b/crates/biome_js_syntax/src/generated/nodes.rs @@ -16438,10 +16438,10 @@ impl AstNode for JsAccessorModifier { } impl std::fmt::Debug for JsAccessorModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsAccessorModifier") .field( "modifier_token", @@ -16451,7 +16451,7 @@ impl std::fmt::Debug for JsAccessorModifier { } else { f.debug_struct("JsAccessorModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16488,10 +16488,10 @@ impl AstNode for JsArrayAssignmentPattern { } impl std::fmt::Debug for JsArrayAssignmentPattern { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsArrayAssignmentPattern") .field( "l_brack_token", @@ -16506,7 +16506,7 @@ impl std::fmt::Debug for JsArrayAssignmentPattern { } else { f.debug_struct("JsArrayAssignmentPattern").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16543,10 +16543,10 @@ impl AstNode for JsArrayAssignmentPatternElement { } impl std::fmt::Debug for JsArrayAssignmentPatternElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsArrayAssignmentPatternElement") .field("pattern", &support::DebugSyntaxResult(self.pattern())) .field("init", &support::DebugOptionalElement(self.init())) @@ -16554,7 +16554,7 @@ impl std::fmt::Debug for JsArrayAssignmentPatternElement { } else { f.debug_struct("JsArrayAssignmentPatternElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16592,10 +16592,10 @@ impl AstNode for JsArrayAssignmentPatternRestElement { } impl std::fmt::Debug for JsArrayAssignmentPatternRestElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsArrayAssignmentPatternRestElement") .field( "dotdotdot_token", @@ -16607,7 +16607,7 @@ impl std::fmt::Debug for JsArrayAssignmentPatternRestElement { f.debug_struct("JsArrayAssignmentPatternRestElement") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16644,10 +16644,10 @@ impl AstNode for JsArrayBindingPattern { } impl std::fmt::Debug for JsArrayBindingPattern { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsArrayBindingPattern") .field( "l_brack_token", @@ -16662,7 +16662,7 @@ impl std::fmt::Debug for JsArrayBindingPattern { } else { f.debug_struct("JsArrayBindingPattern").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16699,10 +16699,10 @@ impl AstNode for JsArrayBindingPatternElement { } impl std::fmt::Debug for JsArrayBindingPatternElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsArrayBindingPatternElement") .field("pattern", &support::DebugSyntaxResult(self.pattern())) .field("init", &support::DebugOptionalElement(self.init())) @@ -16710,7 +16710,7 @@ impl std::fmt::Debug for JsArrayBindingPatternElement { } else { f.debug_struct("JsArrayBindingPatternElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16747,10 +16747,10 @@ impl AstNode for JsArrayBindingPatternRestElement { } impl std::fmt::Debug for JsArrayBindingPatternRestElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsArrayBindingPatternRestElement") .field( "dotdotdot_token", @@ -16761,7 +16761,7 @@ impl std::fmt::Debug for JsArrayBindingPatternRestElement { } else { f.debug_struct("JsArrayBindingPatternRestElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16798,10 +16798,10 @@ impl AstNode for JsArrayExpression { } impl std::fmt::Debug for JsArrayExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsArrayExpression") .field( "l_brack_token", @@ -16816,7 +16816,7 @@ impl std::fmt::Debug for JsArrayExpression { } else { f.debug_struct("JsArrayExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16889,10 +16889,10 @@ impl AstNode for JsArrowFunctionExpression { } impl std::fmt::Debug for JsArrowFunctionExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsArrowFunctionExpression") .field( "async_token", @@ -16916,7 +16916,7 @@ impl std::fmt::Debug for JsArrowFunctionExpression { } else { f.debug_struct("JsArrowFunctionExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -16953,10 +16953,10 @@ impl AstNode for JsAssignmentExpression { } impl std::fmt::Debug for JsAssignmentExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsAssignmentExpression") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -16968,7 +16968,7 @@ impl std::fmt::Debug for JsAssignmentExpression { } else { f.debug_struct("JsAssignmentExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17005,10 +17005,10 @@ impl AstNode for JsAwaitExpression { } impl std::fmt::Debug for JsAwaitExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsAwaitExpression") .field( "await_token", @@ -17019,7 +17019,7 @@ impl std::fmt::Debug for JsAwaitExpression { } else { f.debug_struct("JsAwaitExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17056,10 +17056,10 @@ impl AstNode for JsBigintLiteralExpression { } impl std::fmt::Debug for JsBigintLiteralExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsBigintLiteralExpression") .field( "value_token", @@ -17069,7 +17069,7 @@ impl std::fmt::Debug for JsBigintLiteralExpression { } else { f.debug_struct("JsBigintLiteralExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17106,10 +17106,10 @@ impl AstNode for JsBinaryExpression { } impl std::fmt::Debug for JsBinaryExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsBinaryExpression") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -17121,7 +17121,7 @@ impl std::fmt::Debug for JsBinaryExpression { } else { f.debug_struct("JsBinaryExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17158,10 +17158,10 @@ impl AstNode for JsBlockStatement { } impl std::fmt::Debug for JsBlockStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsBlockStatement") .field( "l_curly_token", @@ -17176,7 +17176,7 @@ impl std::fmt::Debug for JsBlockStatement { } else { f.debug_struct("JsBlockStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17213,10 +17213,10 @@ impl AstNode for JsBooleanLiteralExpression { } impl std::fmt::Debug for JsBooleanLiteralExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsBooleanLiteralExpression") .field( "value_token", @@ -17226,7 +17226,7 @@ impl std::fmt::Debug for JsBooleanLiteralExpression { } else { f.debug_struct("JsBooleanLiteralExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17263,10 +17263,10 @@ impl AstNode for JsBreakStatement { } impl std::fmt::Debug for JsBreakStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsBreakStatement") .field( "break_token", @@ -17281,7 +17281,7 @@ impl std::fmt::Debug for JsBreakStatement { } else { f.debug_struct("JsBreakStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17318,10 +17318,10 @@ impl AstNode for JsCallArguments { } impl std::fmt::Debug for JsCallArguments { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsCallArguments") .field( "l_paren_token", @@ -17336,7 +17336,7 @@ impl std::fmt::Debug for JsCallArguments { } else { f.debug_struct("JsCallArguments").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17373,10 +17373,10 @@ impl AstNode for JsCallExpression { } impl std::fmt::Debug for JsCallExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsCallExpression") .field("callee", &support::DebugSyntaxResult(self.callee())) .field( @@ -17392,7 +17392,7 @@ impl std::fmt::Debug for JsCallExpression { } else { f.debug_struct("JsCallExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17429,10 +17429,10 @@ impl AstNode for JsCaseClause { } impl std::fmt::Debug for JsCaseClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsCaseClause") .field("case_token", &support::DebugSyntaxResult(self.case_token())) .field("test", &support::DebugSyntaxResult(self.test())) @@ -17445,7 +17445,7 @@ impl std::fmt::Debug for JsCaseClause { } else { f.debug_struct("JsCaseClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17482,10 +17482,10 @@ impl AstNode for JsCatchClause { } impl std::fmt::Debug for JsCatchClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsCatchClause") .field( "catch_token", @@ -17500,7 +17500,7 @@ impl std::fmt::Debug for JsCatchClause { } else { f.debug_struct("JsCatchClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17537,10 +17537,10 @@ impl AstNode for JsCatchDeclaration { } impl std::fmt::Debug for JsCatchDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsCatchDeclaration") .field( "l_paren_token", @@ -17559,7 +17559,7 @@ impl std::fmt::Debug for JsCatchDeclaration { } else { f.debug_struct("JsCatchDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17596,10 +17596,10 @@ impl AstNode for JsClassDeclaration { } impl std::fmt::Debug for JsClassDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsClassDeclaration") .field("decorators", &self.decorators()) .field( @@ -17636,7 +17636,7 @@ impl std::fmt::Debug for JsClassDeclaration { } else { f.debug_struct("JsClassDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17673,10 +17673,10 @@ impl AstNode for JsClassExportDefaultDeclaration { } impl std::fmt::Debug for JsClassExportDefaultDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsClassExportDefaultDeclaration") .field("decorators", &self.decorators()) .field( @@ -17713,7 +17713,7 @@ impl std::fmt::Debug for JsClassExportDefaultDeclaration { } else { f.debug_struct("JsClassExportDefaultDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17750,10 +17750,10 @@ impl AstNode for JsClassExpression { } impl std::fmt::Debug for JsClassExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsClassExpression") .field("decorators", &self.decorators()) .field( @@ -17786,7 +17786,7 @@ impl std::fmt::Debug for JsClassExpression { } else { f.debug_struct("JsClassExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17823,10 +17823,10 @@ impl AstNode for JsComputedMemberAssignment { } impl std::fmt::Debug for JsComputedMemberAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsComputedMemberAssignment") .field("object", &support::DebugSyntaxResult(self.object())) .field( @@ -17842,7 +17842,7 @@ impl std::fmt::Debug for JsComputedMemberAssignment { } else { f.debug_struct("JsComputedMemberAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17879,10 +17879,10 @@ impl AstNode for JsComputedMemberExpression { } impl std::fmt::Debug for JsComputedMemberExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsComputedMemberExpression") .field("object", &support::DebugSyntaxResult(self.object())) .field( @@ -17902,7 +17902,7 @@ impl std::fmt::Debug for JsComputedMemberExpression { } else { f.debug_struct("JsComputedMemberExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17939,10 +17939,10 @@ impl AstNode for JsComputedMemberName { } impl std::fmt::Debug for JsComputedMemberName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsComputedMemberName") .field( "l_brack_token", @@ -17957,7 +17957,7 @@ impl std::fmt::Debug for JsComputedMemberName { } else { f.debug_struct("JsComputedMemberName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -17994,10 +17994,10 @@ impl AstNode for JsConditionalExpression { } impl std::fmt::Debug for JsConditionalExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsConditionalExpression") .field("test", &support::DebugSyntaxResult(self.test())) .field( @@ -18014,7 +18014,7 @@ impl std::fmt::Debug for JsConditionalExpression { } else { f.debug_struct("JsConditionalExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18051,10 +18051,10 @@ impl AstNode for JsConstructorClassMember { } impl std::fmt::Debug for JsConstructorClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsConstructorClassMember") .field("modifiers", &self.modifiers()) .field("name", &support::DebugSyntaxResult(self.name())) @@ -18064,7 +18064,7 @@ impl std::fmt::Debug for JsConstructorClassMember { } else { f.debug_struct("JsConstructorClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18101,10 +18101,10 @@ impl AstNode for JsConstructorParameters { } impl std::fmt::Debug for JsConstructorParameters { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsConstructorParameters") .field( "l_paren_token", @@ -18119,7 +18119,7 @@ impl std::fmt::Debug for JsConstructorParameters { } else { f.debug_struct("JsConstructorParameters").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18156,10 +18156,10 @@ impl AstNode for JsContinueStatement { } impl std::fmt::Debug for JsContinueStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsContinueStatement") .field( "continue_token", @@ -18174,7 +18174,7 @@ impl std::fmt::Debug for JsContinueStatement { } else { f.debug_struct("JsContinueStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18211,10 +18211,10 @@ impl AstNode for JsDebuggerStatement { } impl std::fmt::Debug for JsDebuggerStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsDebuggerStatement") .field( "debugger_token", @@ -18228,7 +18228,7 @@ impl std::fmt::Debug for JsDebuggerStatement { } else { f.debug_struct("JsDebuggerStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18265,10 +18265,10 @@ impl AstNode for JsDecorator { } impl std::fmt::Debug for JsDecorator { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsDecorator") .field("at_token", &support::DebugSyntaxResult(self.at_token())) .field("expression", &support::DebugSyntaxResult(self.expression())) @@ -18276,7 +18276,7 @@ impl std::fmt::Debug for JsDecorator { } else { f.debug_struct("JsDecorator").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18313,10 +18313,10 @@ impl AstNode for JsDefaultClause { } impl std::fmt::Debug for JsDefaultClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsDefaultClause") .field( "default_token", @@ -18331,7 +18331,7 @@ impl std::fmt::Debug for JsDefaultClause { } else { f.debug_struct("JsDefaultClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18368,17 +18368,17 @@ impl AstNode for JsDefaultImportSpecifier { } impl std::fmt::Debug for JsDefaultImportSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsDefaultImportSpecifier") .field("local_name", &support::DebugSyntaxResult(self.local_name())) .finish() } else { f.debug_struct("JsDefaultImportSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18415,10 +18415,10 @@ impl AstNode for JsDirective { } impl std::fmt::Debug for JsDirective { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsDirective") .field( "value_token", @@ -18432,7 +18432,7 @@ impl std::fmt::Debug for JsDirective { } else { f.debug_struct("JsDirective").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18469,10 +18469,10 @@ impl AstNode for JsDoWhileStatement { } impl std::fmt::Debug for JsDoWhileStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsDoWhileStatement") .field("do_token", &support::DebugSyntaxResult(self.do_token())) .field("body", &support::DebugSyntaxResult(self.body())) @@ -18497,7 +18497,7 @@ impl std::fmt::Debug for JsDoWhileStatement { } else { f.debug_struct("JsDoWhileStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18534,10 +18534,10 @@ impl AstNode for JsElseClause { } impl std::fmt::Debug for JsElseClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsElseClause") .field("else_token", &support::DebugSyntaxResult(self.else_token())) .field("alternate", &support::DebugSyntaxResult(self.alternate())) @@ -18545,7 +18545,7 @@ impl std::fmt::Debug for JsElseClause { } else { f.debug_struct("JsElseClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18582,10 +18582,10 @@ impl AstNode for JsEmptyClassMember { } impl std::fmt::Debug for JsEmptyClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsEmptyClassMember") .field( "semicolon_token", @@ -18595,7 +18595,7 @@ impl std::fmt::Debug for JsEmptyClassMember { } else { f.debug_struct("JsEmptyClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18632,10 +18632,10 @@ impl AstNode for JsEmptyStatement { } impl std::fmt::Debug for JsEmptyStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsEmptyStatement") .field( "semicolon_token", @@ -18645,7 +18645,7 @@ impl std::fmt::Debug for JsEmptyStatement { } else { f.debug_struct("JsEmptyStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18682,10 +18682,10 @@ impl AstNode for JsExport { } impl std::fmt::Debug for JsExport { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExport") .field("decorators", &self.decorators()) .field( @@ -18700,7 +18700,7 @@ impl std::fmt::Debug for JsExport { } else { f.debug_struct("JsExport").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18737,10 +18737,10 @@ impl AstNode for JsExportAsClause { } impl std::fmt::Debug for JsExportAsClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportAsClause") .field("as_token", &support::DebugSyntaxResult(self.as_token())) .field( @@ -18751,7 +18751,7 @@ impl std::fmt::Debug for JsExportAsClause { } else { f.debug_struct("JsExportAsClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18788,10 +18788,10 @@ impl AstNode for JsExportDefaultDeclarationClause { } impl std::fmt::Debug for JsExportDefaultDeclarationClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportDefaultDeclarationClause") .field( "default_token", @@ -18809,7 +18809,7 @@ impl std::fmt::Debug for JsExportDefaultDeclarationClause { } else { f.debug_struct("JsExportDefaultDeclarationClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18846,10 +18846,10 @@ impl AstNode for JsExportDefaultExpressionClause { } impl std::fmt::Debug for JsExportDefaultExpressionClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportDefaultExpressionClause") .field( "default_token", @@ -18864,7 +18864,7 @@ impl std::fmt::Debug for JsExportDefaultExpressionClause { } else { f.debug_struct("JsExportDefaultExpressionClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18901,10 +18901,10 @@ impl AstNode for JsExportFromClause { } impl std::fmt::Debug for JsExportFromClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportFromClause") .field( "type_token", @@ -18929,7 +18929,7 @@ impl std::fmt::Debug for JsExportFromClause { } else { f.debug_struct("JsExportFromClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -18966,10 +18966,10 @@ impl AstNode for JsExportNamedClause { } impl std::fmt::Debug for JsExportNamedClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportNamedClause") .field( "type_token", @@ -18992,7 +18992,7 @@ impl std::fmt::Debug for JsExportNamedClause { } else { f.debug_struct("JsExportNamedClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19029,10 +19029,10 @@ impl AstNode for JsExportNamedFromClause { } impl std::fmt::Debug for JsExportNamedFromClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportNamedFromClause") .field( "type_token", @@ -19061,7 +19061,7 @@ impl std::fmt::Debug for JsExportNamedFromClause { } else { f.debug_struct("JsExportNamedFromClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19098,10 +19098,10 @@ impl AstNode for JsExportNamedFromSpecifier { } impl std::fmt::Debug for JsExportNamedFromSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportNamedFromSpecifier") .field( "type_token", @@ -19119,7 +19119,7 @@ impl std::fmt::Debug for JsExportNamedFromSpecifier { } else { f.debug_struct("JsExportNamedFromSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19156,10 +19156,10 @@ impl AstNode for JsExportNamedShorthandSpecifier { } impl std::fmt::Debug for JsExportNamedShorthandSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportNamedShorthandSpecifier") .field( "type_token", @@ -19170,7 +19170,7 @@ impl std::fmt::Debug for JsExportNamedShorthandSpecifier { } else { f.debug_struct("JsExportNamedShorthandSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19207,10 +19207,10 @@ impl AstNode for JsExportNamedSpecifier { } impl std::fmt::Debug for JsExportNamedSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExportNamedSpecifier") .field( "type_token", @@ -19226,7 +19226,7 @@ impl std::fmt::Debug for JsExportNamedSpecifier { } else { f.debug_struct("JsExportNamedSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19263,10 +19263,10 @@ impl AstNode for JsExpressionSnipped { } impl std::fmt::Debug for JsExpressionSnipped { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExpressionSnipped") .field("expression", &support::DebugSyntaxResult(self.expression())) .field("eof_token", &support::DebugSyntaxResult(self.eof_token())) @@ -19274,7 +19274,7 @@ impl std::fmt::Debug for JsExpressionSnipped { } else { f.debug_struct("JsExpressionSnipped").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19311,10 +19311,10 @@ impl AstNode for JsExpressionStatement { } impl std::fmt::Debug for JsExpressionStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExpressionStatement") .field("expression", &support::DebugSyntaxResult(self.expression())) .field( @@ -19325,7 +19325,7 @@ impl std::fmt::Debug for JsExpressionStatement { } else { f.debug_struct("JsExpressionStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19362,10 +19362,10 @@ impl AstNode for JsExtendsClause { } impl std::fmt::Debug for JsExtendsClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsExtendsClause") .field( "extends_token", @@ -19383,7 +19383,7 @@ impl std::fmt::Debug for JsExtendsClause { } else { f.debug_struct("JsExtendsClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19420,10 +19420,10 @@ impl AstNode for JsFinallyClause { } impl std::fmt::Debug for JsFinallyClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsFinallyClause") .field( "finally_token", @@ -19434,7 +19434,7 @@ impl std::fmt::Debug for JsFinallyClause { } else { f.debug_struct("JsFinallyClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19471,10 +19471,10 @@ impl AstNode for JsForInStatement { } impl std::fmt::Debug for JsForInStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsForInStatement") .field("for_token", &support::DebugSyntaxResult(self.for_token())) .field( @@ -19496,7 +19496,7 @@ impl std::fmt::Debug for JsForInStatement { } else { f.debug_struct("JsForInStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19533,10 +19533,10 @@ impl AstNode for JsForOfStatement { } impl std::fmt::Debug for JsForOfStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsForOfStatement") .field("for_token", &support::DebugSyntaxResult(self.for_token())) .field( @@ -19562,7 +19562,7 @@ impl std::fmt::Debug for JsForOfStatement { } else { f.debug_struct("JsForOfStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19599,10 +19599,10 @@ impl AstNode for JsForStatement { } impl std::fmt::Debug for JsForStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsForStatement") .field("for_token", &support::DebugSyntaxResult(self.for_token())) .field( @@ -19632,7 +19632,7 @@ impl std::fmt::Debug for JsForStatement { } else { f.debug_struct("JsForStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19669,10 +19669,10 @@ impl AstNode for JsForVariableDeclaration { } impl std::fmt::Debug for JsForVariableDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsForVariableDeclaration") .field( "await_token", @@ -19684,7 +19684,7 @@ impl std::fmt::Debug for JsForVariableDeclaration { } else { f.debug_struct("JsForVariableDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19721,10 +19721,10 @@ impl AstNode for JsFormalParameter { } impl std::fmt::Debug for JsFormalParameter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsFormalParameter") .field("decorators", &self.decorators()) .field("binding", &support::DebugSyntaxResult(self.binding())) @@ -19744,7 +19744,7 @@ impl std::fmt::Debug for JsFormalParameter { } else { f.debug_struct("JsFormalParameter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19781,10 +19781,10 @@ impl AstNode for JsFunctionBody { } impl std::fmt::Debug for JsFunctionBody { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsFunctionBody") .field( "l_curly_token", @@ -19800,7 +19800,7 @@ impl std::fmt::Debug for JsFunctionBody { } else { f.debug_struct("JsFunctionBody").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19837,10 +19837,10 @@ impl AstNode for JsFunctionDeclaration { } impl std::fmt::Debug for JsFunctionDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsFunctionDeclaration") .field( "async_token", @@ -19869,7 +19869,7 @@ impl std::fmt::Debug for JsFunctionDeclaration { } else { f.debug_struct("JsFunctionDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19906,10 +19906,10 @@ impl AstNode for JsFunctionExportDefaultDeclaration { } impl std::fmt::Debug for JsFunctionExportDefaultDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsFunctionExportDefaultDeclaration") .field( "async_token", @@ -19939,7 +19939,7 @@ impl std::fmt::Debug for JsFunctionExportDefaultDeclaration { f.debug_struct("JsFunctionExportDefaultDeclaration") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -19976,10 +19976,10 @@ impl AstNode for JsFunctionExpression { } impl std::fmt::Debug for JsFunctionExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsFunctionExpression") .field( "async_token", @@ -20008,7 +20008,7 @@ impl std::fmt::Debug for JsFunctionExpression { } else { f.debug_struct("JsFunctionExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20045,10 +20045,10 @@ impl AstNode for JsGetterClassMember { } impl std::fmt::Debug for JsGetterClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsGetterClassMember") .field("modifiers", &self.modifiers()) .field("get_token", &support::DebugSyntaxResult(self.get_token())) @@ -20070,7 +20070,7 @@ impl std::fmt::Debug for JsGetterClassMember { } else { f.debug_struct("JsGetterClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20107,10 +20107,10 @@ impl AstNode for JsGetterObjectMember { } impl std::fmt::Debug for JsGetterObjectMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsGetterObjectMember") .field("get_token", &support::DebugSyntaxResult(self.get_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -20131,7 +20131,7 @@ impl std::fmt::Debug for JsGetterObjectMember { } else { f.debug_struct("JsGetterObjectMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20168,17 +20168,17 @@ impl AstNode for JsIdentifierAssignment { } impl std::fmt::Debug for JsIdentifierAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsIdentifierAssignment") .field("name_token", &support::DebugSyntaxResult(self.name_token())) .finish() } else { f.debug_struct("JsIdentifierAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20215,17 +20215,17 @@ impl AstNode for JsIdentifierBinding { } impl std::fmt::Debug for JsIdentifierBinding { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsIdentifierBinding") .field("name_token", &support::DebugSyntaxResult(self.name_token())) .finish() } else { f.debug_struct("JsIdentifierBinding").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20262,17 +20262,17 @@ impl AstNode for JsIdentifierExpression { } impl std::fmt::Debug for JsIdentifierExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsIdentifierExpression") .field("name", &support::DebugSyntaxResult(self.name())) .finish() } else { f.debug_struct("JsIdentifierExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20309,10 +20309,10 @@ impl AstNode for JsIfStatement { } impl std::fmt::Debug for JsIfStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsIfStatement") .field("if_token", &support::DebugSyntaxResult(self.if_token())) .field( @@ -20333,7 +20333,7 @@ impl std::fmt::Debug for JsIfStatement { } else { f.debug_struct("JsIfStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20370,10 +20370,10 @@ impl AstNode for JsImport { } impl std::fmt::Debug for JsImport { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImport") .field( "import_token", @@ -20391,7 +20391,7 @@ impl std::fmt::Debug for JsImport { } else { f.debug_struct("JsImport").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20428,10 +20428,10 @@ impl AstNode for JsImportAssertion { } impl std::fmt::Debug for JsImportAssertion { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportAssertion") .field("with_token", &support::DebugSyntaxResult(self.with_token())) .field( @@ -20447,7 +20447,7 @@ impl std::fmt::Debug for JsImportAssertion { } else { f.debug_struct("JsImportAssertion").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20484,10 +20484,10 @@ impl AstNode for JsImportAssertionEntry { } impl std::fmt::Debug for JsImportAssertionEntry { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportAssertionEntry") .field("key", &support::DebugSyntaxResult(self.key())) .field( @@ -20502,7 +20502,7 @@ impl std::fmt::Debug for JsImportAssertionEntry { } else { f.debug_struct("JsImportAssertionEntry").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20539,10 +20539,10 @@ impl AstNode for JsImportBareClause { } impl std::fmt::Debug for JsImportBareClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportBareClause") .field("source", &support::DebugSyntaxResult(self.source())) .field( @@ -20553,7 +20553,7 @@ impl std::fmt::Debug for JsImportBareClause { } else { f.debug_struct("JsImportBareClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20590,10 +20590,10 @@ impl AstNode for JsImportCallExpression { } impl std::fmt::Debug for JsImportCallExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportCallExpression") .field( "import_token", @@ -20604,7 +20604,7 @@ impl std::fmt::Debug for JsImportCallExpression { } else { f.debug_struct("JsImportCallExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20641,10 +20641,10 @@ impl AstNode for JsImportCombinedClause { } impl std::fmt::Debug for JsImportCombinedClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportCombinedClause") .field( "default_specifier", @@ -20665,7 +20665,7 @@ impl std::fmt::Debug for JsImportCombinedClause { } else { f.debug_struct("JsImportCombinedClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20702,10 +20702,10 @@ impl AstNode for JsImportDefaultClause { } impl std::fmt::Debug for JsImportDefaultClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportDefaultClause") .field( "type_token", @@ -20725,7 +20725,7 @@ impl std::fmt::Debug for JsImportDefaultClause { } else { f.debug_struct("JsImportDefaultClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20762,10 +20762,10 @@ impl AstNode for JsImportMetaExpression { } impl std::fmt::Debug for JsImportMetaExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportMetaExpression") .field( "import_token", @@ -20777,7 +20777,7 @@ impl std::fmt::Debug for JsImportMetaExpression { } else { f.debug_struct("JsImportMetaExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20814,10 +20814,10 @@ impl AstNode for JsImportNamedClause { } impl std::fmt::Debug for JsImportNamedClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportNamedClause") .field( "type_token", @@ -20837,7 +20837,7 @@ impl std::fmt::Debug for JsImportNamedClause { } else { f.debug_struct("JsImportNamedClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20874,10 +20874,10 @@ impl AstNode for JsImportNamespaceClause { } impl std::fmt::Debug for JsImportNamespaceClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsImportNamespaceClause") .field( "type_token", @@ -20897,7 +20897,7 @@ impl std::fmt::Debug for JsImportNamespaceClause { } else { f.debug_struct("JsImportNamespaceClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20934,10 +20934,10 @@ impl AstNode for JsInExpression { } impl std::fmt::Debug for JsInExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsInExpression") .field("property", &support::DebugSyntaxResult(self.property())) .field("in_token", &support::DebugSyntaxResult(self.in_token())) @@ -20946,7 +20946,7 @@ impl std::fmt::Debug for JsInExpression { } else { f.debug_struct("JsInExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -20983,10 +20983,10 @@ impl AstNode for JsInitializerClause { } impl std::fmt::Debug for JsInitializerClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsInitializerClause") .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) .field("expression", &support::DebugSyntaxResult(self.expression())) @@ -20994,7 +20994,7 @@ impl std::fmt::Debug for JsInitializerClause { } else { f.debug_struct("JsInitializerClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21031,10 +21031,10 @@ impl AstNode for JsInstanceofExpression { } impl std::fmt::Debug for JsInstanceofExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsInstanceofExpression") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -21046,7 +21046,7 @@ impl std::fmt::Debug for JsInstanceofExpression { } else { f.debug_struct("JsInstanceofExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21083,10 +21083,10 @@ impl AstNode for JsLabel { } impl std::fmt::Debug for JsLabel { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsLabel") .field( "value_token", @@ -21096,7 +21096,7 @@ impl std::fmt::Debug for JsLabel { } else { f.debug_struct("JsLabel").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21133,10 +21133,10 @@ impl AstNode for JsLabeledStatement { } impl std::fmt::Debug for JsLabeledStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsLabeledStatement") .field("label", &support::DebugSyntaxResult(self.label())) .field( @@ -21148,7 +21148,7 @@ impl std::fmt::Debug for JsLabeledStatement { } else { f.debug_struct("JsLabeledStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21185,17 +21185,17 @@ impl AstNode for JsLiteralExportName { } impl std::fmt::Debug for JsLiteralExportName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsLiteralExportName") .field("value", &support::DebugSyntaxResult(self.value())) .finish() } else { f.debug_struct("JsLiteralExportName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21232,17 +21232,17 @@ impl AstNode for JsLiteralMemberName { } impl std::fmt::Debug for JsLiteralMemberName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsLiteralMemberName") .field("value", &support::DebugSyntaxResult(self.value())) .finish() } else { f.debug_struct("JsLiteralMemberName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21279,10 +21279,10 @@ impl AstNode for JsLogicalExpression { } impl std::fmt::Debug for JsLogicalExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsLogicalExpression") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -21294,7 +21294,7 @@ impl std::fmt::Debug for JsLogicalExpression { } else { f.debug_struct("JsLogicalExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21331,10 +21331,10 @@ impl AstNode for JsMetavariable { } impl std::fmt::Debug for JsMetavariable { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsMetavariable") .field( "value_token", @@ -21344,7 +21344,7 @@ impl std::fmt::Debug for JsMetavariable { } else { f.debug_struct("JsMetavariable").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21381,10 +21381,10 @@ impl AstNode for JsMethodClassMember { } impl std::fmt::Debug for JsMethodClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsMethodClassMember") .field("modifiers", &self.modifiers()) .field( @@ -21414,7 +21414,7 @@ impl std::fmt::Debug for JsMethodClassMember { } else { f.debug_struct("JsMethodClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21451,10 +21451,10 @@ impl AstNode for JsMethodObjectMember { } impl std::fmt::Debug for JsMethodObjectMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsMethodObjectMember") .field( "async_token", @@ -21479,7 +21479,7 @@ impl std::fmt::Debug for JsMethodObjectMember { } else { f.debug_struct("JsMethodObjectMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21516,10 +21516,10 @@ impl AstNode for JsModule { } impl std::fmt::Debug for JsModule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsModule") .field( "bom_token", @@ -21536,7 +21536,7 @@ impl std::fmt::Debug for JsModule { } else { f.debug_struct("JsModule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21573,10 +21573,10 @@ impl AstNode for JsModuleSource { } impl std::fmt::Debug for JsModuleSource { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsModuleSource") .field( "value_token", @@ -21586,7 +21586,7 @@ impl std::fmt::Debug for JsModuleSource { } else { f.debug_struct("JsModuleSource").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21623,10 +21623,10 @@ impl AstNode for JsName { } impl std::fmt::Debug for JsName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsName") .field( "value_token", @@ -21636,7 +21636,7 @@ impl std::fmt::Debug for JsName { } else { f.debug_struct("JsName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21673,10 +21673,10 @@ impl AstNode for JsNamedImportSpecifier { } impl std::fmt::Debug for JsNamedImportSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsNamedImportSpecifier") .field( "type_token", @@ -21689,7 +21689,7 @@ impl std::fmt::Debug for JsNamedImportSpecifier { } else { f.debug_struct("JsNamedImportSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21726,10 +21726,10 @@ impl AstNode for JsNamedImportSpecifiers { } impl std::fmt::Debug for JsNamedImportSpecifiers { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsNamedImportSpecifiers") .field( "l_curly_token", @@ -21744,7 +21744,7 @@ impl std::fmt::Debug for JsNamedImportSpecifiers { } else { f.debug_struct("JsNamedImportSpecifiers").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21781,10 +21781,10 @@ impl AstNode for JsNamespaceImportSpecifier { } impl std::fmt::Debug for JsNamespaceImportSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsNamespaceImportSpecifier") .field("star_token", &support::DebugSyntaxResult(self.star_token())) .field("as_token", &support::DebugSyntaxResult(self.as_token())) @@ -21793,7 +21793,7 @@ impl std::fmt::Debug for JsNamespaceImportSpecifier { } else { f.debug_struct("JsNamespaceImportSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21830,10 +21830,10 @@ impl AstNode for JsNewExpression { } impl std::fmt::Debug for JsNewExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsNewExpression") .field("new_token", &support::DebugSyntaxResult(self.new_token())) .field("callee", &support::DebugSyntaxResult(self.callee())) @@ -21849,7 +21849,7 @@ impl std::fmt::Debug for JsNewExpression { } else { f.debug_struct("JsNewExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21886,10 +21886,10 @@ impl AstNode for JsNewTargetExpression { } impl std::fmt::Debug for JsNewTargetExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsNewTargetExpression") .field("new_token", &support::DebugSyntaxResult(self.new_token())) .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) @@ -21901,7 +21901,7 @@ impl std::fmt::Debug for JsNewTargetExpression { } else { f.debug_struct("JsNewTargetExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21938,10 +21938,10 @@ impl AstNode for JsNullLiteralExpression { } impl std::fmt::Debug for JsNullLiteralExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsNullLiteralExpression") .field( "value_token", @@ -21951,7 +21951,7 @@ impl std::fmt::Debug for JsNullLiteralExpression { } else { f.debug_struct("JsNullLiteralExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -21988,10 +21988,10 @@ impl AstNode for JsNumberLiteralExpression { } impl std::fmt::Debug for JsNumberLiteralExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsNumberLiteralExpression") .field( "value_token", @@ -22001,7 +22001,7 @@ impl std::fmt::Debug for JsNumberLiteralExpression { } else { f.debug_struct("JsNumberLiteralExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22038,10 +22038,10 @@ impl AstNode for JsObjectAssignmentPattern { } impl std::fmt::Debug for JsObjectAssignmentPattern { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectAssignmentPattern") .field( "l_curly_token", @@ -22056,7 +22056,7 @@ impl std::fmt::Debug for JsObjectAssignmentPattern { } else { f.debug_struct("JsObjectAssignmentPattern").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22093,10 +22093,10 @@ impl AstNode for JsObjectAssignmentPatternProperty { } impl std::fmt::Debug for JsObjectAssignmentPatternProperty { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectAssignmentPatternProperty") .field("member", &support::DebugSyntaxResult(self.member())) .field( @@ -22109,7 +22109,7 @@ impl std::fmt::Debug for JsObjectAssignmentPatternProperty { } else { f.debug_struct("JsObjectAssignmentPatternProperty").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22146,10 +22146,10 @@ impl AstNode for JsObjectAssignmentPatternRest { } impl std::fmt::Debug for JsObjectAssignmentPatternRest { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectAssignmentPatternRest") .field( "dotdotdot_token", @@ -22160,7 +22160,7 @@ impl std::fmt::Debug for JsObjectAssignmentPatternRest { } else { f.debug_struct("JsObjectAssignmentPatternRest").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22198,10 +22198,10 @@ impl AstNode for JsObjectAssignmentPatternShorthandProperty { } impl std::fmt::Debug for JsObjectAssignmentPatternShorthandProperty { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectAssignmentPatternShorthandProperty") .field("identifier", &support::DebugSyntaxResult(self.identifier())) .field("init", &support::DebugOptionalElement(self.init())) @@ -22210,7 +22210,7 @@ impl std::fmt::Debug for JsObjectAssignmentPatternShorthandProperty { f.debug_struct("JsObjectAssignmentPatternShorthandProperty") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22247,10 +22247,10 @@ impl AstNode for JsObjectBindingPattern { } impl std::fmt::Debug for JsObjectBindingPattern { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectBindingPattern") .field( "l_curly_token", @@ -22265,7 +22265,7 @@ impl std::fmt::Debug for JsObjectBindingPattern { } else { f.debug_struct("JsObjectBindingPattern").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22302,10 +22302,10 @@ impl AstNode for JsObjectBindingPatternProperty { } impl std::fmt::Debug for JsObjectBindingPatternProperty { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectBindingPatternProperty") .field("member", &support::DebugSyntaxResult(self.member())) .field( @@ -22318,7 +22318,7 @@ impl std::fmt::Debug for JsObjectBindingPatternProperty { } else { f.debug_struct("JsObjectBindingPatternProperty").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22355,10 +22355,10 @@ impl AstNode for JsObjectBindingPatternRest { } impl std::fmt::Debug for JsObjectBindingPatternRest { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectBindingPatternRest") .field( "dotdotdot_token", @@ -22369,7 +22369,7 @@ impl std::fmt::Debug for JsObjectBindingPatternRest { } else { f.debug_struct("JsObjectBindingPatternRest").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22407,10 +22407,10 @@ impl AstNode for JsObjectBindingPatternShorthandProperty { } impl std::fmt::Debug for JsObjectBindingPatternShorthandProperty { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectBindingPatternShorthandProperty") .field("identifier", &support::DebugSyntaxResult(self.identifier())) .field("init", &support::DebugOptionalElement(self.init())) @@ -22419,7 +22419,7 @@ impl std::fmt::Debug for JsObjectBindingPatternShorthandProperty { f.debug_struct("JsObjectBindingPatternShorthandProperty") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22456,10 +22456,10 @@ impl AstNode for JsObjectExpression { } impl std::fmt::Debug for JsObjectExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsObjectExpression") .field( "l_curly_token", @@ -22474,7 +22474,7 @@ impl std::fmt::Debug for JsObjectExpression { } else { f.debug_struct("JsObjectExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22511,10 +22511,10 @@ impl AstNode for JsParameters { } impl std::fmt::Debug for JsParameters { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsParameters") .field( "l_paren_token", @@ -22529,7 +22529,7 @@ impl std::fmt::Debug for JsParameters { } else { f.debug_struct("JsParameters").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22566,10 +22566,10 @@ impl AstNode for JsParenthesizedAssignment { } impl std::fmt::Debug for JsParenthesizedAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsParenthesizedAssignment") .field( "l_paren_token", @@ -22584,7 +22584,7 @@ impl std::fmt::Debug for JsParenthesizedAssignment { } else { f.debug_struct("JsParenthesizedAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22621,10 +22621,10 @@ impl AstNode for JsParenthesizedExpression { } impl std::fmt::Debug for JsParenthesizedExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsParenthesizedExpression") .field( "l_paren_token", @@ -22639,7 +22639,7 @@ impl std::fmt::Debug for JsParenthesizedExpression { } else { f.debug_struct("JsParenthesizedExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22676,10 +22676,10 @@ impl AstNode for JsPostUpdateExpression { } impl std::fmt::Debug for JsPostUpdateExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsPostUpdateExpression") .field("operand", &support::DebugSyntaxResult(self.operand())) .field( @@ -22690,7 +22690,7 @@ impl std::fmt::Debug for JsPostUpdateExpression { } else { f.debug_struct("JsPostUpdateExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22727,10 +22727,10 @@ impl AstNode for JsPreUpdateExpression { } impl std::fmt::Debug for JsPreUpdateExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsPreUpdateExpression") .field( "operator_token", @@ -22741,7 +22741,7 @@ impl std::fmt::Debug for JsPreUpdateExpression { } else { f.debug_struct("JsPreUpdateExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22778,10 +22778,10 @@ impl AstNode for JsPrivateClassMemberName { } impl std::fmt::Debug for JsPrivateClassMemberName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsPrivateClassMemberName") .field("hash_token", &support::DebugSyntaxResult(self.hash_token())) .field("id_token", &support::DebugSyntaxResult(self.id_token())) @@ -22789,7 +22789,7 @@ impl std::fmt::Debug for JsPrivateClassMemberName { } else { f.debug_struct("JsPrivateClassMemberName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22826,10 +22826,10 @@ impl AstNode for JsPrivateName { } impl std::fmt::Debug for JsPrivateName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsPrivateName") .field("hash_token", &support::DebugSyntaxResult(self.hash_token())) .field( @@ -22840,7 +22840,7 @@ impl std::fmt::Debug for JsPrivateName { } else { f.debug_struct("JsPrivateName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22877,10 +22877,10 @@ impl AstNode for JsPropertyClassMember { } impl std::fmt::Debug for JsPropertyClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsPropertyClassMember") .field("modifiers", &self.modifiers()) .field("name", &support::DebugSyntaxResult(self.name())) @@ -22897,7 +22897,7 @@ impl std::fmt::Debug for JsPropertyClassMember { } else { f.debug_struct("JsPropertyClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22934,10 +22934,10 @@ impl AstNode for JsPropertyObjectMember { } impl std::fmt::Debug for JsPropertyObjectMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsPropertyObjectMember") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -22949,7 +22949,7 @@ impl std::fmt::Debug for JsPropertyObjectMember { } else { f.debug_struct("JsPropertyObjectMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -22986,10 +22986,10 @@ impl AstNode for JsReferenceIdentifier { } impl std::fmt::Debug for JsReferenceIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsReferenceIdentifier") .field( "value_token", @@ -22999,7 +22999,7 @@ impl std::fmt::Debug for JsReferenceIdentifier { } else { f.debug_struct("JsReferenceIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23036,10 +23036,10 @@ impl AstNode for JsRegexLiteralExpression { } impl std::fmt::Debug for JsRegexLiteralExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsRegexLiteralExpression") .field( "value_token", @@ -23049,7 +23049,7 @@ impl std::fmt::Debug for JsRegexLiteralExpression { } else { f.debug_struct("JsRegexLiteralExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23086,10 +23086,10 @@ impl AstNode for JsRestParameter { } impl std::fmt::Debug for JsRestParameter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsRestParameter") .field("decorators", &self.decorators()) .field( @@ -23105,7 +23105,7 @@ impl std::fmt::Debug for JsRestParameter { } else { f.debug_struct("JsRestParameter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23142,10 +23142,10 @@ impl AstNode for JsReturnStatement { } impl std::fmt::Debug for JsReturnStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsReturnStatement") .field( "return_token", @@ -23160,7 +23160,7 @@ impl std::fmt::Debug for JsReturnStatement { } else { f.debug_struct("JsReturnStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23197,10 +23197,10 @@ impl AstNode for JsScript { } impl std::fmt::Debug for JsScript { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsScript") .field( "bom_token", @@ -23217,7 +23217,7 @@ impl std::fmt::Debug for JsScript { } else { f.debug_struct("JsScript").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23254,10 +23254,10 @@ impl AstNode for JsSequenceExpression { } impl std::fmt::Debug for JsSequenceExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsSequenceExpression") .field("left", &support::DebugSyntaxResult(self.left())) .field( @@ -23269,7 +23269,7 @@ impl std::fmt::Debug for JsSequenceExpression { } else { f.debug_struct("JsSequenceExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23306,10 +23306,10 @@ impl AstNode for JsSetterClassMember { } impl std::fmt::Debug for JsSetterClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsSetterClassMember") .field("modifiers", &self.modifiers()) .field("set_token", &support::DebugSyntaxResult(self.set_token())) @@ -23332,7 +23332,7 @@ impl std::fmt::Debug for JsSetterClassMember { } else { f.debug_struct("JsSetterClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23369,10 +23369,10 @@ impl AstNode for JsSetterObjectMember { } impl std::fmt::Debug for JsSetterObjectMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsSetterObjectMember") .field("set_token", &support::DebugSyntaxResult(self.set_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -23394,7 +23394,7 @@ impl std::fmt::Debug for JsSetterObjectMember { } else { f.debug_struct("JsSetterObjectMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23431,10 +23431,10 @@ impl AstNode for JsShorthandNamedImportSpecifier { } impl std::fmt::Debug for JsShorthandNamedImportSpecifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsShorthandNamedImportSpecifier") .field( "type_token", @@ -23445,7 +23445,7 @@ impl std::fmt::Debug for JsShorthandNamedImportSpecifier { } else { f.debug_struct("JsShorthandNamedImportSpecifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23482,17 +23482,17 @@ impl AstNode for JsShorthandPropertyObjectMember { } impl std::fmt::Debug for JsShorthandPropertyObjectMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsShorthandPropertyObjectMember") .field("name", &support::DebugSyntaxResult(self.name())) .finish() } else { f.debug_struct("JsShorthandPropertyObjectMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23529,10 +23529,10 @@ impl AstNode for JsSpread { } impl std::fmt::Debug for JsSpread { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsSpread") .field( "dotdotdot_token", @@ -23543,7 +23543,7 @@ impl std::fmt::Debug for JsSpread { } else { f.debug_struct("JsSpread").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23581,10 +23581,10 @@ impl AstNode for JsStaticInitializationBlockClassMember { } impl std::fmt::Debug for JsStaticInitializationBlockClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsStaticInitializationBlockClassMember") .field( "static_token", @@ -23604,7 +23604,7 @@ impl std::fmt::Debug for JsStaticInitializationBlockClassMember { f.debug_struct("JsStaticInitializationBlockClassMember") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23641,10 +23641,10 @@ impl AstNode for JsStaticMemberAssignment { } impl std::fmt::Debug for JsStaticMemberAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsStaticMemberAssignment") .field("object", &support::DebugSyntaxResult(self.object())) .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) @@ -23653,7 +23653,7 @@ impl std::fmt::Debug for JsStaticMemberAssignment { } else { f.debug_struct("JsStaticMemberAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23690,10 +23690,10 @@ impl AstNode for JsStaticMemberExpression { } impl std::fmt::Debug for JsStaticMemberExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsStaticMemberExpression") .field("object", &support::DebugSyntaxResult(self.object())) .field( @@ -23705,7 +23705,7 @@ impl std::fmt::Debug for JsStaticMemberExpression { } else { f.debug_struct("JsStaticMemberExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23742,10 +23742,10 @@ impl AstNode for JsStaticModifier { } impl std::fmt::Debug for JsStaticModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsStaticModifier") .field( "modifier_token", @@ -23755,7 +23755,7 @@ impl std::fmt::Debug for JsStaticModifier { } else { f.debug_struct("JsStaticModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23792,10 +23792,10 @@ impl AstNode for JsStringLiteralExpression { } impl std::fmt::Debug for JsStringLiteralExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsStringLiteralExpression") .field( "value_token", @@ -23805,7 +23805,7 @@ impl std::fmt::Debug for JsStringLiteralExpression { } else { f.debug_struct("JsStringLiteralExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23842,10 +23842,10 @@ impl AstNode for JsSuperExpression { } impl std::fmt::Debug for JsSuperExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsSuperExpression") .field( "super_token", @@ -23855,7 +23855,7 @@ impl std::fmt::Debug for JsSuperExpression { } else { f.debug_struct("JsSuperExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23892,10 +23892,10 @@ impl AstNode for JsSwitchStatement { } impl std::fmt::Debug for JsSwitchStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsSwitchStatement") .field( "switch_token", @@ -23926,7 +23926,7 @@ impl std::fmt::Debug for JsSwitchStatement { } else { f.debug_struct("JsSwitchStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -23963,10 +23963,10 @@ impl AstNode for JsTemplateChunkElement { } impl std::fmt::Debug for JsTemplateChunkElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsTemplateChunkElement") .field( "template_chunk_token", @@ -23976,7 +23976,7 @@ impl std::fmt::Debug for JsTemplateChunkElement { } else { f.debug_struct("JsTemplateChunkElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24013,10 +24013,10 @@ impl AstNode for JsTemplateElement { } impl std::fmt::Debug for JsTemplateElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsTemplateElement") .field( "dollar_curly_token", @@ -24031,7 +24031,7 @@ impl std::fmt::Debug for JsTemplateElement { } else { f.debug_struct("JsTemplateElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24068,10 +24068,10 @@ impl AstNode for JsTemplateExpression { } impl std::fmt::Debug for JsTemplateExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsTemplateExpression") .field("tag", &support::DebugOptionalElement(self.tag())) .field( @@ -24091,7 +24091,7 @@ impl std::fmt::Debug for JsTemplateExpression { } else { f.debug_struct("JsTemplateExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24128,17 +24128,17 @@ impl AstNode for JsThisExpression { } impl std::fmt::Debug for JsThisExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsThisExpression") .field("this_token", &support::DebugSyntaxResult(self.this_token())) .finish() } else { f.debug_struct("JsThisExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24175,10 +24175,10 @@ impl AstNode for JsThrowStatement { } impl std::fmt::Debug for JsThrowStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsThrowStatement") .field( "throw_token", @@ -24193,7 +24193,7 @@ impl std::fmt::Debug for JsThrowStatement { } else { f.debug_struct("JsThrowStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24230,10 +24230,10 @@ impl AstNode for JsTryFinallyStatement { } impl std::fmt::Debug for JsTryFinallyStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsTryFinallyStatement") .field("try_token", &support::DebugSyntaxResult(self.try_token())) .field("body", &support::DebugSyntaxResult(self.body())) @@ -24249,7 +24249,7 @@ impl std::fmt::Debug for JsTryFinallyStatement { } else { f.debug_struct("JsTryFinallyStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24286,10 +24286,10 @@ impl AstNode for JsTryStatement { } impl std::fmt::Debug for JsTryStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsTryStatement") .field("try_token", &support::DebugSyntaxResult(self.try_token())) .field("body", &support::DebugSyntaxResult(self.body())) @@ -24301,7 +24301,7 @@ impl std::fmt::Debug for JsTryStatement { } else { f.debug_struct("JsTryStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24338,10 +24338,10 @@ impl AstNode for JsUnaryExpression { } impl std::fmt::Debug for JsUnaryExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsUnaryExpression") .field( "operator_token", @@ -24352,7 +24352,7 @@ impl std::fmt::Debug for JsUnaryExpression { } else { f.debug_struct("JsUnaryExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24389,10 +24389,10 @@ impl AstNode for JsVariableDeclaration { } impl std::fmt::Debug for JsVariableDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsVariableDeclaration") .field( "await_token", @@ -24404,7 +24404,7 @@ impl std::fmt::Debug for JsVariableDeclaration { } else { f.debug_struct("JsVariableDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24441,10 +24441,10 @@ impl AstNode for JsVariableDeclarationClause { } impl std::fmt::Debug for JsVariableDeclarationClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsVariableDeclarationClause") .field( "declaration", @@ -24458,7 +24458,7 @@ impl std::fmt::Debug for JsVariableDeclarationClause { } else { f.debug_struct("JsVariableDeclarationClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24495,10 +24495,10 @@ impl AstNode for JsVariableDeclarator { } impl std::fmt::Debug for JsVariableDeclarator { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsVariableDeclarator") .field("id", &support::DebugSyntaxResult(self.id())) .field( @@ -24513,7 +24513,7 @@ impl std::fmt::Debug for JsVariableDeclarator { } else { f.debug_struct("JsVariableDeclarator").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24550,10 +24550,10 @@ impl AstNode for JsVariableStatement { } impl std::fmt::Debug for JsVariableStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsVariableStatement") .field( "declaration", @@ -24567,7 +24567,7 @@ impl std::fmt::Debug for JsVariableStatement { } else { f.debug_struct("JsVariableStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24604,10 +24604,10 @@ impl AstNode for JsWhileStatement { } impl std::fmt::Debug for JsWhileStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsWhileStatement") .field( "while_token", @@ -24627,7 +24627,7 @@ impl std::fmt::Debug for JsWhileStatement { } else { f.debug_struct("JsWhileStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24664,10 +24664,10 @@ impl AstNode for JsWithStatement { } impl std::fmt::Debug for JsWithStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsWithStatement") .field("with_token", &support::DebugSyntaxResult(self.with_token())) .field( @@ -24684,7 +24684,7 @@ impl std::fmt::Debug for JsWithStatement { } else { f.debug_struct("JsWithStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24721,10 +24721,10 @@ impl AstNode for JsYieldArgument { } impl std::fmt::Debug for JsYieldArgument { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsYieldArgument") .field( "star_token", @@ -24735,7 +24735,7 @@ impl std::fmt::Debug for JsYieldArgument { } else { f.debug_struct("JsYieldArgument").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24772,10 +24772,10 @@ impl AstNode for JsYieldExpression { } impl std::fmt::Debug for JsYieldExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsYieldExpression") .field( "yield_token", @@ -24786,7 +24786,7 @@ impl std::fmt::Debug for JsYieldExpression { } else { f.debug_struct("JsYieldExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24823,10 +24823,10 @@ impl AstNode for JsxAttribute { } impl std::fmt::Debug for JsxAttribute { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxAttribute") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -24837,7 +24837,7 @@ impl std::fmt::Debug for JsxAttribute { } else { f.debug_struct("JsxAttribute").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24874,10 +24874,10 @@ impl AstNode for JsxAttributeInitializerClause { } impl std::fmt::Debug for JsxAttributeInitializerClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxAttributeInitializerClause") .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) .field("value", &support::DebugSyntaxResult(self.value())) @@ -24885,7 +24885,7 @@ impl std::fmt::Debug for JsxAttributeInitializerClause { } else { f.debug_struct("JsxAttributeInitializerClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24922,10 +24922,10 @@ impl AstNode for JsxClosingElement { } impl std::fmt::Debug for JsxClosingElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxClosingElement") .field( "l_angle_token", @@ -24944,7 +24944,7 @@ impl std::fmt::Debug for JsxClosingElement { } else { f.debug_struct("JsxClosingElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -24981,10 +24981,10 @@ impl AstNode for JsxClosingFragment { } impl std::fmt::Debug for JsxClosingFragment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxClosingFragment") .field( "l_angle_token", @@ -25002,7 +25002,7 @@ impl std::fmt::Debug for JsxClosingFragment { } else { f.debug_struct("JsxClosingFragment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25039,10 +25039,10 @@ impl AstNode for JsxElement { } impl std::fmt::Debug for JsxElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxElement") .field( "opening_element", @@ -25057,7 +25057,7 @@ impl std::fmt::Debug for JsxElement { } else { f.debug_struct("JsxElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25094,10 +25094,10 @@ impl AstNode for JsxExpressionAttributeValue { } impl std::fmt::Debug for JsxExpressionAttributeValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxExpressionAttributeValue") .field( "l_curly_token", @@ -25112,7 +25112,7 @@ impl std::fmt::Debug for JsxExpressionAttributeValue { } else { f.debug_struct("JsxExpressionAttributeValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25149,10 +25149,10 @@ impl AstNode for JsxExpressionChild { } impl std::fmt::Debug for JsxExpressionChild { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxExpressionChild") .field( "l_curly_token", @@ -25170,7 +25170,7 @@ impl std::fmt::Debug for JsxExpressionChild { } else { f.debug_struct("JsxExpressionChild").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25207,10 +25207,10 @@ impl AstNode for JsxFragment { } impl std::fmt::Debug for JsxFragment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxFragment") .field( "opening_fragment", @@ -25225,7 +25225,7 @@ impl std::fmt::Debug for JsxFragment { } else { f.debug_struct("JsxFragment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25262,10 +25262,10 @@ impl AstNode for JsxMemberName { } impl std::fmt::Debug for JsxMemberName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxMemberName") .field("object", &support::DebugSyntaxResult(self.object())) .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) @@ -25274,7 +25274,7 @@ impl std::fmt::Debug for JsxMemberName { } else { f.debug_struct("JsxMemberName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25311,10 +25311,10 @@ impl AstNode for JsxName { } impl std::fmt::Debug for JsxName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxName") .field( "value_token", @@ -25324,7 +25324,7 @@ impl std::fmt::Debug for JsxName { } else { f.debug_struct("JsxName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25361,10 +25361,10 @@ impl AstNode for JsxNamespaceName { } impl std::fmt::Debug for JsxNamespaceName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxNamespaceName") .field("namespace", &support::DebugSyntaxResult(self.namespace())) .field( @@ -25376,7 +25376,7 @@ impl std::fmt::Debug for JsxNamespaceName { } else { f.debug_struct("JsxNamespaceName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25413,10 +25413,10 @@ impl AstNode for JsxOpeningElement { } impl std::fmt::Debug for JsxOpeningElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxOpeningElement") .field( "l_angle_token", @@ -25436,7 +25436,7 @@ impl std::fmt::Debug for JsxOpeningElement { } else { f.debug_struct("JsxOpeningElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25473,10 +25473,10 @@ impl AstNode for JsxOpeningFragment { } impl std::fmt::Debug for JsxOpeningFragment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxOpeningFragment") .field( "l_angle_token", @@ -25490,7 +25490,7 @@ impl std::fmt::Debug for JsxOpeningFragment { } else { f.debug_struct("JsxOpeningFragment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25527,10 +25527,10 @@ impl AstNode for JsxReferenceIdentifier { } impl std::fmt::Debug for JsxReferenceIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxReferenceIdentifier") .field( "value_token", @@ -25540,7 +25540,7 @@ impl std::fmt::Debug for JsxReferenceIdentifier { } else { f.debug_struct("JsxReferenceIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25577,10 +25577,10 @@ impl AstNode for JsxSelfClosingElement { } impl std::fmt::Debug for JsxSelfClosingElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxSelfClosingElement") .field( "l_angle_token", @@ -25604,7 +25604,7 @@ impl std::fmt::Debug for JsxSelfClosingElement { } else { f.debug_struct("JsxSelfClosingElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25641,10 +25641,10 @@ impl AstNode for JsxSpreadAttribute { } impl std::fmt::Debug for JsxSpreadAttribute { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxSpreadAttribute") .field( "l_curly_token", @@ -25663,7 +25663,7 @@ impl std::fmt::Debug for JsxSpreadAttribute { } else { f.debug_struct("JsxSpreadAttribute").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25700,10 +25700,10 @@ impl AstNode for JsxSpreadChild { } impl std::fmt::Debug for JsxSpreadChild { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxSpreadChild") .field( "l_curly_token", @@ -25722,7 +25722,7 @@ impl std::fmt::Debug for JsxSpreadChild { } else { f.debug_struct("JsxSpreadChild").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25759,10 +25759,10 @@ impl AstNode for JsxString { } impl std::fmt::Debug for JsxString { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxString") .field( "value_token", @@ -25772,7 +25772,7 @@ impl std::fmt::Debug for JsxString { } else { f.debug_struct("JsxString").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25809,17 +25809,17 @@ impl AstNode for JsxTagExpression { } impl std::fmt::Debug for JsxTagExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxTagExpression") .field("tag", &support::DebugSyntaxResult(self.tag())) .finish() } else { f.debug_struct("JsxTagExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25856,10 +25856,10 @@ impl AstNode for JsxText { } impl std::fmt::Debug for JsxText { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsxText") .field( "value_token", @@ -25869,7 +25869,7 @@ impl std::fmt::Debug for JsxText { } else { f.debug_struct("JsxText").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25906,10 +25906,10 @@ impl AstNode for TsAbstractModifier { } impl std::fmt::Debug for TsAbstractModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsAbstractModifier") .field( "modifier_token", @@ -25919,7 +25919,7 @@ impl std::fmt::Debug for TsAbstractModifier { } else { f.debug_struct("TsAbstractModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -25956,10 +25956,10 @@ impl AstNode for TsAccessibilityModifier { } impl std::fmt::Debug for TsAccessibilityModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsAccessibilityModifier") .field( "modifier_token", @@ -25969,7 +25969,7 @@ impl std::fmt::Debug for TsAccessibilityModifier { } else { f.debug_struct("TsAccessibilityModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26006,17 +26006,17 @@ impl AstNode for TsAnyType { } impl std::fmt::Debug for TsAnyType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsAnyType") .field("any_token", &support::DebugSyntaxResult(self.any_token())) .finish() } else { f.debug_struct("TsAnyType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26053,10 +26053,10 @@ impl AstNode for TsArrayType { } impl std::fmt::Debug for TsArrayType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsArrayType") .field( "element_type", @@ -26074,7 +26074,7 @@ impl std::fmt::Debug for TsArrayType { } else { f.debug_struct("TsArrayType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26111,10 +26111,10 @@ impl AstNode for TsAsAssignment { } impl std::fmt::Debug for TsAsAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsAsAssignment") .field("assignment", &support::DebugSyntaxResult(self.assignment())) .field("as_token", &support::DebugSyntaxResult(self.as_token())) @@ -26123,7 +26123,7 @@ impl std::fmt::Debug for TsAsAssignment { } else { f.debug_struct("TsAsAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26160,10 +26160,10 @@ impl AstNode for TsAsExpression { } impl std::fmt::Debug for TsAsExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsAsExpression") .field("expression", &support::DebugSyntaxResult(self.expression())) .field("as_token", &support::DebugSyntaxResult(self.as_token())) @@ -26172,7 +26172,7 @@ impl std::fmt::Debug for TsAsExpression { } else { f.debug_struct("TsAsExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26209,10 +26209,10 @@ impl AstNode for TsAssertsCondition { } impl std::fmt::Debug for TsAssertsCondition { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsAssertsCondition") .field("is_token", &support::DebugSyntaxResult(self.is_token())) .field("ty", &support::DebugSyntaxResult(self.ty())) @@ -26220,7 +26220,7 @@ impl std::fmt::Debug for TsAssertsCondition { } else { f.debug_struct("TsAssertsCondition").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26257,10 +26257,10 @@ impl AstNode for TsAssertsReturnType { } impl std::fmt::Debug for TsAssertsReturnType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsAssertsReturnType") .field( "asserts_token", @@ -26278,7 +26278,7 @@ impl std::fmt::Debug for TsAssertsReturnType { } else { f.debug_struct("TsAssertsReturnType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26315,10 +26315,10 @@ impl AstNode for TsBigintLiteralType { } impl std::fmt::Debug for TsBigintLiteralType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsBigintLiteralType") .field( "minus_token", @@ -26332,7 +26332,7 @@ impl std::fmt::Debug for TsBigintLiteralType { } else { f.debug_struct("TsBigintLiteralType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26369,10 +26369,10 @@ impl AstNode for TsBigintType { } impl std::fmt::Debug for TsBigintType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsBigintType") .field( "bigint_token", @@ -26382,7 +26382,7 @@ impl std::fmt::Debug for TsBigintType { } else { f.debug_struct("TsBigintType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26419,17 +26419,17 @@ impl AstNode for TsBooleanLiteralType { } impl std::fmt::Debug for TsBooleanLiteralType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsBooleanLiteralType") .field("literal", &support::DebugSyntaxResult(self.literal())) .finish() } else { f.debug_struct("TsBooleanLiteralType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26466,10 +26466,10 @@ impl AstNode for TsBooleanType { } impl std::fmt::Debug for TsBooleanType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsBooleanType") .field( "boolean_token", @@ -26479,7 +26479,7 @@ impl std::fmt::Debug for TsBooleanType { } else { f.debug_struct("TsBooleanType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26516,10 +26516,10 @@ impl AstNode for TsCallSignatureTypeMember { } impl std::fmt::Debug for TsCallSignatureTypeMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsCallSignatureTypeMember") .field( "type_parameters", @@ -26538,7 +26538,7 @@ impl std::fmt::Debug for TsCallSignatureTypeMember { } else { f.debug_struct("TsCallSignatureTypeMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26575,10 +26575,10 @@ impl AstNode for TsConditionalType { } impl std::fmt::Debug for TsConditionalType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsConditionalType") .field("check_type", &support::DebugSyntaxResult(self.check_type())) .field( @@ -26603,7 +26603,7 @@ impl std::fmt::Debug for TsConditionalType { } else { f.debug_struct("TsConditionalType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26640,10 +26640,10 @@ impl AstNode for TsConstModifier { } impl std::fmt::Debug for TsConstModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsConstModifier") .field( "modifier_token", @@ -26653,7 +26653,7 @@ impl std::fmt::Debug for TsConstModifier { } else { f.debug_struct("TsConstModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26690,10 +26690,10 @@ impl AstNode for TsConstructSignatureTypeMember { } impl std::fmt::Debug for TsConstructSignatureTypeMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsConstructSignatureTypeMember") .field("new_token", &support::DebugSyntaxResult(self.new_token())) .field( @@ -26713,7 +26713,7 @@ impl std::fmt::Debug for TsConstructSignatureTypeMember { } else { f.debug_struct("TsConstructSignatureTypeMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26750,10 +26750,10 @@ impl AstNode for TsConstructorSignatureClassMember { } impl std::fmt::Debug for TsConstructorSignatureClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsConstructorSignatureClassMember") .field("modifiers", &self.modifiers()) .field("name", &support::DebugSyntaxResult(self.name())) @@ -26766,7 +26766,7 @@ impl std::fmt::Debug for TsConstructorSignatureClassMember { } else { f.debug_struct("TsConstructorSignatureClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26803,10 +26803,10 @@ impl AstNode for TsConstructorType { } impl std::fmt::Debug for TsConstructorType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsConstructorType") .field( "abstract_token", @@ -26830,7 +26830,7 @@ impl std::fmt::Debug for TsConstructorType { } else { f.debug_struct("TsConstructorType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26867,10 +26867,10 @@ impl AstNode for TsDeclarationModule { } impl std::fmt::Debug for TsDeclarationModule { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsDeclarationModule") .field( "bom_token", @@ -26887,7 +26887,7 @@ impl std::fmt::Debug for TsDeclarationModule { } else { f.debug_struct("TsDeclarationModule").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26924,10 +26924,10 @@ impl AstNode for TsDeclareFunctionDeclaration { } impl std::fmt::Debug for TsDeclareFunctionDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsDeclareFunctionDeclaration") .field( "async_token", @@ -26955,7 +26955,7 @@ impl std::fmt::Debug for TsDeclareFunctionDeclaration { } else { f.debug_struct("TsDeclareFunctionDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -26993,10 +26993,10 @@ impl AstNode for TsDeclareFunctionExportDefaultDeclaration { } impl std::fmt::Debug for TsDeclareFunctionExportDefaultDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsDeclareFunctionExportDefaultDeclaration") .field( "async_token", @@ -27025,7 +27025,7 @@ impl std::fmt::Debug for TsDeclareFunctionExportDefaultDeclaration { f.debug_struct("TsDeclareFunctionExportDefaultDeclaration") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27062,10 +27062,10 @@ impl AstNode for TsDeclareModifier { } impl std::fmt::Debug for TsDeclareModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsDeclareModifier") .field( "modifier_token", @@ -27075,7 +27075,7 @@ impl std::fmt::Debug for TsDeclareModifier { } else { f.debug_struct("TsDeclareModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27112,10 +27112,10 @@ impl AstNode for TsDeclareStatement { } impl std::fmt::Debug for TsDeclareStatement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsDeclareStatement") .field( "declare_token", @@ -27129,7 +27129,7 @@ impl std::fmt::Debug for TsDeclareStatement { } else { f.debug_struct("TsDeclareStatement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27166,10 +27166,10 @@ impl AstNode for TsDefaultTypeClause { } impl std::fmt::Debug for TsDefaultTypeClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsDefaultTypeClause") .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) .field("ty", &support::DebugSyntaxResult(self.ty())) @@ -27177,7 +27177,7 @@ impl std::fmt::Debug for TsDefaultTypeClause { } else { f.debug_struct("TsDefaultTypeClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27214,10 +27214,10 @@ impl AstNode for TsDefinitePropertyAnnotation { } impl std::fmt::Debug for TsDefinitePropertyAnnotation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsDefinitePropertyAnnotation") .field("excl_token", &support::DebugSyntaxResult(self.excl_token())) .field( @@ -27228,7 +27228,7 @@ impl std::fmt::Debug for TsDefinitePropertyAnnotation { } else { f.debug_struct("TsDefinitePropertyAnnotation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27265,10 +27265,10 @@ impl AstNode for TsDefiniteVariableAnnotation { } impl std::fmt::Debug for TsDefiniteVariableAnnotation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsDefiniteVariableAnnotation") .field("excl_token", &support::DebugSyntaxResult(self.excl_token())) .field( @@ -27279,7 +27279,7 @@ impl std::fmt::Debug for TsDefiniteVariableAnnotation { } else { f.debug_struct("TsDefiniteVariableAnnotation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27317,10 +27317,10 @@ impl AstNode for TsEmptyExternalModuleDeclarationBody { } impl std::fmt::Debug for TsEmptyExternalModuleDeclarationBody { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsEmptyExternalModuleDeclarationBody") .field( "semicolon_token", @@ -27331,7 +27331,7 @@ impl std::fmt::Debug for TsEmptyExternalModuleDeclarationBody { f.debug_struct("TsEmptyExternalModuleDeclarationBody") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27368,10 +27368,10 @@ impl AstNode for TsEnumDeclaration { } impl std::fmt::Debug for TsEnumDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsEnumDeclaration") .field( "const_token", @@ -27392,7 +27392,7 @@ impl std::fmt::Debug for TsEnumDeclaration { } else { f.debug_struct("TsEnumDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27429,10 +27429,10 @@ impl AstNode for TsEnumMember { } impl std::fmt::Debug for TsEnumMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsEnumMember") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -27443,7 +27443,7 @@ impl std::fmt::Debug for TsEnumMember { } else { f.debug_struct("TsEnumMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27480,10 +27480,10 @@ impl AstNode for TsExportAsNamespaceClause { } impl std::fmt::Debug for TsExportAsNamespaceClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsExportAsNamespaceClause") .field("as_token", &support::DebugSyntaxResult(self.as_token())) .field( @@ -27499,7 +27499,7 @@ impl std::fmt::Debug for TsExportAsNamespaceClause { } else { f.debug_struct("TsExportAsNamespaceClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27536,10 +27536,10 @@ impl AstNode for TsExportAssignmentClause { } impl std::fmt::Debug for TsExportAssignmentClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsExportAssignmentClause") .field("eq_token", &support::DebugSyntaxResult(self.eq_token())) .field("expression", &support::DebugSyntaxResult(self.expression())) @@ -27551,7 +27551,7 @@ impl std::fmt::Debug for TsExportAssignmentClause { } else { f.debug_struct("TsExportAssignmentClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27588,10 +27588,10 @@ impl AstNode for TsExportDeclareClause { } impl std::fmt::Debug for TsExportDeclareClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsExportDeclareClause") .field( "declare_token", @@ -27605,7 +27605,7 @@ impl std::fmt::Debug for TsExportDeclareClause { } else { f.debug_struct("TsExportDeclareClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27642,10 +27642,10 @@ impl AstNode for TsExtendsClause { } impl std::fmt::Debug for TsExtendsClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsExtendsClause") .field( "extends_token", @@ -27656,7 +27656,7 @@ impl std::fmt::Debug for TsExtendsClause { } else { f.debug_struct("TsExtendsClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27693,10 +27693,10 @@ impl AstNode for TsExternalModuleDeclaration { } impl std::fmt::Debug for TsExternalModuleDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsExternalModuleDeclaration") .field( "module_token", @@ -27708,7 +27708,7 @@ impl std::fmt::Debug for TsExternalModuleDeclaration { } else { f.debug_struct("TsExternalModuleDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27745,10 +27745,10 @@ impl AstNode for TsExternalModuleReference { } impl std::fmt::Debug for TsExternalModuleReference { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsExternalModuleReference") .field( "require_token", @@ -27767,7 +27767,7 @@ impl std::fmt::Debug for TsExternalModuleReference { } else { f.debug_struct("TsExternalModuleReference").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27804,10 +27804,10 @@ impl AstNode for TsFunctionType { } impl std::fmt::Debug for TsFunctionType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsFunctionType") .field( "type_parameters", @@ -27826,7 +27826,7 @@ impl std::fmt::Debug for TsFunctionType { } else { f.debug_struct("TsFunctionType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27863,10 +27863,10 @@ impl AstNode for TsGetterSignatureClassMember { } impl std::fmt::Debug for TsGetterSignatureClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsGetterSignatureClassMember") .field("modifiers", &self.modifiers()) .field("get_token", &support::DebugSyntaxResult(self.get_token())) @@ -27891,7 +27891,7 @@ impl std::fmt::Debug for TsGetterSignatureClassMember { } else { f.debug_struct("TsGetterSignatureClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27928,10 +27928,10 @@ impl AstNode for TsGetterSignatureTypeMember { } impl std::fmt::Debug for TsGetterSignatureTypeMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsGetterSignatureTypeMember") .field("get_token", &support::DebugSyntaxResult(self.get_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -27955,7 +27955,7 @@ impl std::fmt::Debug for TsGetterSignatureTypeMember { } else { f.debug_struct("TsGetterSignatureTypeMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -27992,10 +27992,10 @@ impl AstNode for TsGlobalDeclaration { } impl std::fmt::Debug for TsGlobalDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsGlobalDeclaration") .field( "global_token", @@ -28006,7 +28006,7 @@ impl std::fmt::Debug for TsGlobalDeclaration { } else { f.debug_struct("TsGlobalDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28043,17 +28043,17 @@ impl AstNode for TsIdentifierBinding { } impl std::fmt::Debug for TsIdentifierBinding { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsIdentifierBinding") .field("name_token", &support::DebugSyntaxResult(self.name_token())) .finish() } else { f.debug_struct("TsIdentifierBinding").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28090,10 +28090,10 @@ impl AstNode for TsImplementsClause { } impl std::fmt::Debug for TsImplementsClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsImplementsClause") .field( "implements_token", @@ -28104,7 +28104,7 @@ impl std::fmt::Debug for TsImplementsClause { } else { f.debug_struct("TsImplementsClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28141,10 +28141,10 @@ impl AstNode for TsImportEqualsDeclaration { } impl std::fmt::Debug for TsImportEqualsDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsImportEqualsDeclaration") .field( "import_token", @@ -28168,7 +28168,7 @@ impl std::fmt::Debug for TsImportEqualsDeclaration { } else { f.debug_struct("TsImportEqualsDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28205,10 +28205,10 @@ impl AstNode for TsImportType { } impl std::fmt::Debug for TsImportType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsImportType") .field( "typeof_token", @@ -28231,7 +28231,7 @@ impl std::fmt::Debug for TsImportType { } else { f.debug_struct("TsImportType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28268,10 +28268,10 @@ impl AstNode for TsImportTypeArguments { } impl std::fmt::Debug for TsImportTypeArguments { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsImportTypeArguments") .field( "l_paren_token", @@ -28294,7 +28294,7 @@ impl std::fmt::Debug for TsImportTypeArguments { } else { f.debug_struct("TsImportTypeArguments").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28331,10 +28331,10 @@ impl AstNode for TsImportTypeAssertion { } impl std::fmt::Debug for TsImportTypeAssertion { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsImportTypeAssertion") .field("with_token", &support::DebugSyntaxResult(self.with_token())) .field( @@ -28354,7 +28354,7 @@ impl std::fmt::Debug for TsImportTypeAssertion { } else { f.debug_struct("TsImportTypeAssertion").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28391,10 +28391,10 @@ impl AstNode for TsImportTypeAssertionBlock { } impl std::fmt::Debug for TsImportTypeAssertionBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsImportTypeAssertionBlock") .field( "l_curly_token", @@ -28412,7 +28412,7 @@ impl std::fmt::Debug for TsImportTypeAssertionBlock { } else { f.debug_struct("TsImportTypeAssertionBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28449,10 +28449,10 @@ impl AstNode for TsImportTypeQualifier { } impl std::fmt::Debug for TsImportTypeQualifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsImportTypeQualifier") .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) .field("right", &support::DebugSyntaxResult(self.right())) @@ -28460,7 +28460,7 @@ impl std::fmt::Debug for TsImportTypeQualifier { } else { f.debug_struct("TsImportTypeQualifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28497,10 +28497,10 @@ impl AstNode for TsInModifier { } impl std::fmt::Debug for TsInModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsInModifier") .field( "modifier_token", @@ -28510,7 +28510,7 @@ impl std::fmt::Debug for TsInModifier { } else { f.debug_struct("TsInModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28547,10 +28547,10 @@ impl AstNode for TsIndexSignatureClassMember { } impl std::fmt::Debug for TsIndexSignatureClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsIndexSignatureClassMember") .field("modifiers", &self.modifiers()) .field( @@ -28574,7 +28574,7 @@ impl std::fmt::Debug for TsIndexSignatureClassMember { } else { f.debug_struct("TsIndexSignatureClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28611,10 +28611,10 @@ impl AstNode for TsIndexSignatureParameter { } impl std::fmt::Debug for TsIndexSignatureParameter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsIndexSignatureParameter") .field("binding", &support::DebugSyntaxResult(self.binding())) .field( @@ -28625,7 +28625,7 @@ impl std::fmt::Debug for TsIndexSignatureParameter { } else { f.debug_struct("TsIndexSignatureParameter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28662,10 +28662,10 @@ impl AstNode for TsIndexSignatureTypeMember { } impl std::fmt::Debug for TsIndexSignatureTypeMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsIndexSignatureTypeMember") .field( "readonly_token", @@ -28692,7 +28692,7 @@ impl std::fmt::Debug for TsIndexSignatureTypeMember { } else { f.debug_struct("TsIndexSignatureTypeMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28729,10 +28729,10 @@ impl AstNode for TsIndexedAccessType { } impl std::fmt::Debug for TsIndexedAccessType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsIndexedAccessType") .field( "object_type", @@ -28751,7 +28751,7 @@ impl std::fmt::Debug for TsIndexedAccessType { } else { f.debug_struct("TsIndexedAccessType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28788,10 +28788,10 @@ impl AstNode for TsInferType { } impl std::fmt::Debug for TsInferType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsInferType") .field( "infer_token", @@ -28806,7 +28806,7 @@ impl std::fmt::Debug for TsInferType { } else { f.debug_struct("TsInferType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28844,10 +28844,10 @@ impl AstNode for TsInitializedPropertySignatureClassMember { } impl std::fmt::Debug for TsInitializedPropertySignatureClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsInitializedPropertySignatureClassMember") .field("modifiers", &self.modifiers()) .field("name", &support::DebugSyntaxResult(self.name())) @@ -28865,7 +28865,7 @@ impl std::fmt::Debug for TsInitializedPropertySignatureClassMember { f.debug_struct("TsInitializedPropertySignatureClassMember") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28902,10 +28902,10 @@ impl AstNode for TsInstantiationExpression { } impl std::fmt::Debug for TsInstantiationExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsInstantiationExpression") .field("expression", &support::DebugSyntaxResult(self.expression())) .field("arguments", &support::DebugSyntaxResult(self.arguments())) @@ -28913,7 +28913,7 @@ impl std::fmt::Debug for TsInstantiationExpression { } else { f.debug_struct("TsInstantiationExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -28950,10 +28950,10 @@ impl AstNode for TsInterfaceDeclaration { } impl std::fmt::Debug for TsInterfaceDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsInterfaceDeclaration") .field( "interface_token", @@ -28981,7 +28981,7 @@ impl std::fmt::Debug for TsInterfaceDeclaration { } else { f.debug_struct("TsInterfaceDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29018,10 +29018,10 @@ impl AstNode for TsIntersectionType { } impl std::fmt::Debug for TsIntersectionType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsIntersectionType") .field( "leading_separator_token", @@ -29032,7 +29032,7 @@ impl std::fmt::Debug for TsIntersectionType { } else { f.debug_struct("TsIntersectionType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29069,17 +29069,17 @@ impl AstNode for TsLiteralEnumMemberName { } impl std::fmt::Debug for TsLiteralEnumMemberName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsLiteralEnumMemberName") .field("value", &support::DebugSyntaxResult(self.value())) .finish() } else { f.debug_struct("TsLiteralEnumMemberName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29116,10 +29116,10 @@ impl AstNode for TsMappedType { } impl std::fmt::Debug for TsMappedType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsMappedType") .field( "l_curly_token", @@ -29167,7 +29167,7 @@ impl std::fmt::Debug for TsMappedType { } else { f.debug_struct("TsMappedType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29204,10 +29204,10 @@ impl AstNode for TsMappedTypeAsClause { } impl std::fmt::Debug for TsMappedTypeAsClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsMappedTypeAsClause") .field("as_token", &support::DebugSyntaxResult(self.as_token())) .field("ty", &support::DebugSyntaxResult(self.ty())) @@ -29215,7 +29215,7 @@ impl std::fmt::Debug for TsMappedTypeAsClause { } else { f.debug_struct("TsMappedTypeAsClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29253,10 +29253,10 @@ impl AstNode for TsMappedTypeOptionalModifierClause { } impl std::fmt::Debug for TsMappedTypeOptionalModifierClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsMappedTypeOptionalModifierClause") .field( "operator_token", @@ -29271,7 +29271,7 @@ impl std::fmt::Debug for TsMappedTypeOptionalModifierClause { f.debug_struct("TsMappedTypeOptionalModifierClause") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29309,10 +29309,10 @@ impl AstNode for TsMappedTypeReadonlyModifierClause { } impl std::fmt::Debug for TsMappedTypeReadonlyModifierClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsMappedTypeReadonlyModifierClause") .field( "operator_token", @@ -29327,7 +29327,7 @@ impl std::fmt::Debug for TsMappedTypeReadonlyModifierClause { f.debug_struct("TsMappedTypeReadonlyModifierClause") .finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29364,10 +29364,10 @@ impl AstNode for TsMethodSignatureClassMember { } impl std::fmt::Debug for TsMethodSignatureClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsMethodSignatureClassMember") .field("modifiers", &self.modifiers()) .field( @@ -29396,7 +29396,7 @@ impl std::fmt::Debug for TsMethodSignatureClassMember { } else { f.debug_struct("TsMethodSignatureClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29433,10 +29433,10 @@ impl AstNode for TsMethodSignatureTypeMember { } impl std::fmt::Debug for TsMethodSignatureTypeMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsMethodSignatureTypeMember") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -29460,7 +29460,7 @@ impl std::fmt::Debug for TsMethodSignatureTypeMember { } else { f.debug_struct("TsMethodSignatureTypeMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29497,10 +29497,10 @@ impl AstNode for TsModuleBlock { } impl std::fmt::Debug for TsModuleBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsModuleBlock") .field( "l_curly_token", @@ -29515,7 +29515,7 @@ impl std::fmt::Debug for TsModuleBlock { } else { f.debug_struct("TsModuleBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29552,10 +29552,10 @@ impl AstNode for TsModuleDeclaration { } impl std::fmt::Debug for TsModuleDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsModuleDeclaration") .field( "module_or_namespace", @@ -29567,7 +29567,7 @@ impl std::fmt::Debug for TsModuleDeclaration { } else { f.debug_struct("TsModuleDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29604,10 +29604,10 @@ impl AstNode for TsNamedTupleTypeElement { } impl std::fmt::Debug for TsNamedTupleTypeElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsNamedTupleTypeElement") .field( "dotdotdot_token", @@ -29627,7 +29627,7 @@ impl std::fmt::Debug for TsNamedTupleTypeElement { } else { f.debug_struct("TsNamedTupleTypeElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29664,10 +29664,10 @@ impl AstNode for TsNeverType { } impl std::fmt::Debug for TsNeverType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsNeverType") .field( "never_token", @@ -29677,7 +29677,7 @@ impl std::fmt::Debug for TsNeverType { } else { f.debug_struct("TsNeverType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29714,10 +29714,10 @@ impl AstNode for TsNonNullAssertionAssignment { } impl std::fmt::Debug for TsNonNullAssertionAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsNonNullAssertionAssignment") .field("assignment", &support::DebugSyntaxResult(self.assignment())) .field("excl_token", &support::DebugSyntaxResult(self.excl_token())) @@ -29725,7 +29725,7 @@ impl std::fmt::Debug for TsNonNullAssertionAssignment { } else { f.debug_struct("TsNonNullAssertionAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29762,10 +29762,10 @@ impl AstNode for TsNonNullAssertionExpression { } impl std::fmt::Debug for TsNonNullAssertionExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsNonNullAssertionExpression") .field("expression", &support::DebugSyntaxResult(self.expression())) .field("excl_token", &support::DebugSyntaxResult(self.excl_token())) @@ -29773,7 +29773,7 @@ impl std::fmt::Debug for TsNonNullAssertionExpression { } else { f.debug_struct("TsNonNullAssertionExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29810,10 +29810,10 @@ impl AstNode for TsNonPrimitiveType { } impl std::fmt::Debug for TsNonPrimitiveType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsNonPrimitiveType") .field( "object_token", @@ -29823,7 +29823,7 @@ impl std::fmt::Debug for TsNonPrimitiveType { } else { f.debug_struct("TsNonPrimitiveType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29860,10 +29860,10 @@ impl AstNode for TsNullLiteralType { } impl std::fmt::Debug for TsNullLiteralType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsNullLiteralType") .field( "literal_token", @@ -29873,7 +29873,7 @@ impl std::fmt::Debug for TsNullLiteralType { } else { f.debug_struct("TsNullLiteralType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29910,10 +29910,10 @@ impl AstNode for TsNumberLiteralType { } impl std::fmt::Debug for TsNumberLiteralType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsNumberLiteralType") .field( "minus_token", @@ -29927,7 +29927,7 @@ impl std::fmt::Debug for TsNumberLiteralType { } else { f.debug_struct("TsNumberLiteralType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -29964,10 +29964,10 @@ impl AstNode for TsNumberType { } impl std::fmt::Debug for TsNumberType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsNumberType") .field( "number_token", @@ -29977,7 +29977,7 @@ impl std::fmt::Debug for TsNumberType { } else { f.debug_struct("TsNumberType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30014,10 +30014,10 @@ impl AstNode for TsObjectType { } impl std::fmt::Debug for TsObjectType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsObjectType") .field( "l_curly_token", @@ -30032,7 +30032,7 @@ impl std::fmt::Debug for TsObjectType { } else { f.debug_struct("TsObjectType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30069,10 +30069,10 @@ impl AstNode for TsOptionalPropertyAnnotation { } impl std::fmt::Debug for TsOptionalPropertyAnnotation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsOptionalPropertyAnnotation") .field( "question_mark_token", @@ -30086,7 +30086,7 @@ impl std::fmt::Debug for TsOptionalPropertyAnnotation { } else { f.debug_struct("TsOptionalPropertyAnnotation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30123,10 +30123,10 @@ impl AstNode for TsOptionalTupleTypeElement { } impl std::fmt::Debug for TsOptionalTupleTypeElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsOptionalTupleTypeElement") .field("ty", &support::DebugSyntaxResult(self.ty())) .field( @@ -30137,7 +30137,7 @@ impl std::fmt::Debug for TsOptionalTupleTypeElement { } else { f.debug_struct("TsOptionalTupleTypeElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30174,10 +30174,10 @@ impl AstNode for TsOutModifier { } impl std::fmt::Debug for TsOutModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsOutModifier") .field( "modifier_token", @@ -30187,7 +30187,7 @@ impl std::fmt::Debug for TsOutModifier { } else { f.debug_struct("TsOutModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30224,10 +30224,10 @@ impl AstNode for TsOverrideModifier { } impl std::fmt::Debug for TsOverrideModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsOverrideModifier") .field( "modifier_token", @@ -30237,7 +30237,7 @@ impl std::fmt::Debug for TsOverrideModifier { } else { f.debug_struct("TsOverrideModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30274,10 +30274,10 @@ impl AstNode for TsParenthesizedType { } impl std::fmt::Debug for TsParenthesizedType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsParenthesizedType") .field( "l_paren_token", @@ -30292,7 +30292,7 @@ impl std::fmt::Debug for TsParenthesizedType { } else { f.debug_struct("TsParenthesizedType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30329,10 +30329,10 @@ impl AstNode for TsPredicateReturnType { } impl std::fmt::Debug for TsPredicateReturnType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsPredicateReturnType") .field( "parameter_name", @@ -30344,7 +30344,7 @@ impl std::fmt::Debug for TsPredicateReturnType { } else { f.debug_struct("TsPredicateReturnType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30381,10 +30381,10 @@ impl AstNode for TsPropertyParameter { } impl std::fmt::Debug for TsPropertyParameter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsPropertyParameter") .field("decorators", &self.decorators()) .field("modifiers", &self.modifiers()) @@ -30396,7 +30396,7 @@ impl std::fmt::Debug for TsPropertyParameter { } else { f.debug_struct("TsPropertyParameter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30433,10 +30433,10 @@ impl AstNode for TsPropertySignatureClassMember { } impl std::fmt::Debug for TsPropertySignatureClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsPropertySignatureClassMember") .field("modifiers", &self.modifiers()) .field("name", &support::DebugSyntaxResult(self.name())) @@ -30452,7 +30452,7 @@ impl std::fmt::Debug for TsPropertySignatureClassMember { } else { f.debug_struct("TsPropertySignatureClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30489,10 +30489,10 @@ impl AstNode for TsPropertySignatureTypeMember { } impl std::fmt::Debug for TsPropertySignatureTypeMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsPropertySignatureTypeMember") .field( "readonly_token", @@ -30515,7 +30515,7 @@ impl std::fmt::Debug for TsPropertySignatureTypeMember { } else { f.debug_struct("TsPropertySignatureTypeMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30552,10 +30552,10 @@ impl AstNode for TsQualifiedModuleName { } impl std::fmt::Debug for TsQualifiedModuleName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsQualifiedModuleName") .field("left", &support::DebugSyntaxResult(self.left())) .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) @@ -30564,7 +30564,7 @@ impl std::fmt::Debug for TsQualifiedModuleName { } else { f.debug_struct("TsQualifiedModuleName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30601,10 +30601,10 @@ impl AstNode for TsQualifiedName { } impl std::fmt::Debug for TsQualifiedName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsQualifiedName") .field("left", &support::DebugSyntaxResult(self.left())) .field("dot_token", &support::DebugSyntaxResult(self.dot_token())) @@ -30613,7 +30613,7 @@ impl std::fmt::Debug for TsQualifiedName { } else { f.debug_struct("TsQualifiedName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30650,10 +30650,10 @@ impl AstNode for TsReadonlyModifier { } impl std::fmt::Debug for TsReadonlyModifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsReadonlyModifier") .field( "modifier_token", @@ -30663,7 +30663,7 @@ impl std::fmt::Debug for TsReadonlyModifier { } else { f.debug_struct("TsReadonlyModifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30700,10 +30700,10 @@ impl AstNode for TsReferenceType { } impl std::fmt::Debug for TsReferenceType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsReferenceType") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -30714,7 +30714,7 @@ impl std::fmt::Debug for TsReferenceType { } else { f.debug_struct("TsReferenceType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30751,10 +30751,10 @@ impl AstNode for TsRestTupleTypeElement { } impl std::fmt::Debug for TsRestTupleTypeElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsRestTupleTypeElement") .field( "dotdotdot_token", @@ -30765,7 +30765,7 @@ impl std::fmt::Debug for TsRestTupleTypeElement { } else { f.debug_struct("TsRestTupleTypeElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30802,10 +30802,10 @@ impl AstNode for TsReturnTypeAnnotation { } impl std::fmt::Debug for TsReturnTypeAnnotation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsReturnTypeAnnotation") .field( "colon_token", @@ -30816,7 +30816,7 @@ impl std::fmt::Debug for TsReturnTypeAnnotation { } else { f.debug_struct("TsReturnTypeAnnotation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30853,10 +30853,10 @@ impl AstNode for TsSatisfiesAssignment { } impl std::fmt::Debug for TsSatisfiesAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsSatisfiesAssignment") .field("assignment", &support::DebugSyntaxResult(self.assignment())) .field( @@ -30868,7 +30868,7 @@ impl std::fmt::Debug for TsSatisfiesAssignment { } else { f.debug_struct("TsSatisfiesAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30905,10 +30905,10 @@ impl AstNode for TsSatisfiesExpression { } impl std::fmt::Debug for TsSatisfiesExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsSatisfiesExpression") .field("expression", &support::DebugSyntaxResult(self.expression())) .field( @@ -30920,7 +30920,7 @@ impl std::fmt::Debug for TsSatisfiesExpression { } else { f.debug_struct("TsSatisfiesExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -30957,10 +30957,10 @@ impl AstNode for TsSetterSignatureClassMember { } impl std::fmt::Debug for TsSetterSignatureClassMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsSetterSignatureClassMember") .field("modifiers", &self.modifiers()) .field("set_token", &support::DebugSyntaxResult(self.set_token())) @@ -30986,7 +30986,7 @@ impl std::fmt::Debug for TsSetterSignatureClassMember { } else { f.debug_struct("TsSetterSignatureClassMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31023,10 +31023,10 @@ impl AstNode for TsSetterSignatureTypeMember { } impl std::fmt::Debug for TsSetterSignatureTypeMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsSetterSignatureTypeMember") .field("set_token", &support::DebugSyntaxResult(self.set_token())) .field("name", &support::DebugSyntaxResult(self.name())) @@ -31051,7 +31051,7 @@ impl std::fmt::Debug for TsSetterSignatureTypeMember { } else { f.debug_struct("TsSetterSignatureTypeMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31088,10 +31088,10 @@ impl AstNode for TsStringLiteralType { } impl std::fmt::Debug for TsStringLiteralType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsStringLiteralType") .field( "literal_token", @@ -31101,7 +31101,7 @@ impl std::fmt::Debug for TsStringLiteralType { } else { f.debug_struct("TsStringLiteralType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31138,10 +31138,10 @@ impl AstNode for TsStringType { } impl std::fmt::Debug for TsStringType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsStringType") .field( "string_token", @@ -31151,7 +31151,7 @@ impl std::fmt::Debug for TsStringType { } else { f.debug_struct("TsStringType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31188,10 +31188,10 @@ impl AstNode for TsSymbolType { } impl std::fmt::Debug for TsSymbolType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsSymbolType") .field( "symbol_token", @@ -31201,7 +31201,7 @@ impl std::fmt::Debug for TsSymbolType { } else { f.debug_struct("TsSymbolType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31238,10 +31238,10 @@ impl AstNode for TsTemplateChunkElement { } impl std::fmt::Debug for TsTemplateChunkElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTemplateChunkElement") .field( "template_chunk_token", @@ -31251,7 +31251,7 @@ impl std::fmt::Debug for TsTemplateChunkElement { } else { f.debug_struct("TsTemplateChunkElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31288,10 +31288,10 @@ impl AstNode for TsTemplateElement { } impl std::fmt::Debug for TsTemplateElement { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTemplateElement") .field( "dollar_curly_token", @@ -31306,7 +31306,7 @@ impl std::fmt::Debug for TsTemplateElement { } else { f.debug_struct("TsTemplateElement").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31343,10 +31343,10 @@ impl AstNode for TsTemplateLiteralType { } impl std::fmt::Debug for TsTemplateLiteralType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTemplateLiteralType") .field( "l_tick_token", @@ -31361,7 +31361,7 @@ impl std::fmt::Debug for TsTemplateLiteralType { } else { f.debug_struct("TsTemplateLiteralType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31398,10 +31398,10 @@ impl AstNode for TsThisParameter { } impl std::fmt::Debug for TsThisParameter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsThisParameter") .field("this_token", &support::DebugSyntaxResult(self.this_token())) .field( @@ -31412,7 +31412,7 @@ impl std::fmt::Debug for TsThisParameter { } else { f.debug_struct("TsThisParameter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31449,17 +31449,17 @@ impl AstNode for TsThisType { } impl std::fmt::Debug for TsThisType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsThisType") .field("this_token", &support::DebugSyntaxResult(self.this_token())) .finish() } else { f.debug_struct("TsThisType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31496,10 +31496,10 @@ impl AstNode for TsTupleType { } impl std::fmt::Debug for TsTupleType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTupleType") .field( "l_brack_token", @@ -31514,7 +31514,7 @@ impl std::fmt::Debug for TsTupleType { } else { f.debug_struct("TsTupleType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31551,10 +31551,10 @@ impl AstNode for TsTypeAliasDeclaration { } impl std::fmt::Debug for TsTypeAliasDeclaration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeAliasDeclaration") .field("type_token", &support::DebugSyntaxResult(self.type_token())) .field( @@ -31575,7 +31575,7 @@ impl std::fmt::Debug for TsTypeAliasDeclaration { } else { f.debug_struct("TsTypeAliasDeclaration").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31612,10 +31612,10 @@ impl AstNode for TsTypeAnnotation { } impl std::fmt::Debug for TsTypeAnnotation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeAnnotation") .field( "colon_token", @@ -31626,7 +31626,7 @@ impl std::fmt::Debug for TsTypeAnnotation { } else { f.debug_struct("TsTypeAnnotation").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31663,10 +31663,10 @@ impl AstNode for TsTypeArguments { } impl std::fmt::Debug for TsTypeArguments { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeArguments") .field( "l_angle_token", @@ -31681,7 +31681,7 @@ impl std::fmt::Debug for TsTypeArguments { } else { f.debug_struct("TsTypeArguments").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31718,10 +31718,10 @@ impl AstNode for TsTypeAssertionAssignment { } impl std::fmt::Debug for TsTypeAssertionAssignment { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeAssertionAssignment") .field( "l_angle_token", @@ -31737,7 +31737,7 @@ impl std::fmt::Debug for TsTypeAssertionAssignment { } else { f.debug_struct("TsTypeAssertionAssignment").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31774,10 +31774,10 @@ impl AstNode for TsTypeAssertionExpression { } impl std::fmt::Debug for TsTypeAssertionExpression { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeAssertionExpression") .field( "l_angle_token", @@ -31793,7 +31793,7 @@ impl std::fmt::Debug for TsTypeAssertionExpression { } else { f.debug_struct("TsTypeAssertionExpression").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31830,10 +31830,10 @@ impl AstNode for TsTypeConstraintClause { } impl std::fmt::Debug for TsTypeConstraintClause { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeConstraintClause") .field( "extends_token", @@ -31844,7 +31844,7 @@ impl std::fmt::Debug for TsTypeConstraintClause { } else { f.debug_struct("TsTypeConstraintClause").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31881,10 +31881,10 @@ impl AstNode for TsTypeOperatorType { } impl std::fmt::Debug for TsTypeOperatorType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeOperatorType") .field( "operator_token", @@ -31895,7 +31895,7 @@ impl std::fmt::Debug for TsTypeOperatorType { } else { f.debug_struct("TsTypeOperatorType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31932,10 +31932,10 @@ impl AstNode for TsTypeParameter { } impl std::fmt::Debug for TsTypeParameter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeParameter") .field("modifiers", &self.modifiers()) .field("name", &support::DebugSyntaxResult(self.name())) @@ -31948,7 +31948,7 @@ impl std::fmt::Debug for TsTypeParameter { } else { f.debug_struct("TsTypeParameter").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -31985,10 +31985,10 @@ impl AstNode for TsTypeParameterName { } impl std::fmt::Debug for TsTypeParameterName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeParameterName") .field( "ident_token", @@ -31998,7 +31998,7 @@ impl std::fmt::Debug for TsTypeParameterName { } else { f.debug_struct("TsTypeParameterName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -32035,10 +32035,10 @@ impl AstNode for TsTypeParameters { } impl std::fmt::Debug for TsTypeParameters { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeParameters") .field( "l_angle_token", @@ -32053,7 +32053,7 @@ impl std::fmt::Debug for TsTypeParameters { } else { f.debug_struct("TsTypeParameters").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -32090,10 +32090,10 @@ impl AstNode for TsTypeofType { } impl std::fmt::Debug for TsTypeofType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsTypeofType") .field( "typeof_token", @@ -32111,7 +32111,7 @@ impl std::fmt::Debug for TsTypeofType { } else { f.debug_struct("TsTypeofType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -32148,10 +32148,10 @@ impl AstNode for TsUndefinedType { } impl std::fmt::Debug for TsUndefinedType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsUndefinedType") .field( "undefined_token", @@ -32161,7 +32161,7 @@ impl std::fmt::Debug for TsUndefinedType { } else { f.debug_struct("TsUndefinedType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -32198,10 +32198,10 @@ impl AstNode for TsUnionType { } impl std::fmt::Debug for TsUnionType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsUnionType") .field( "leading_separator_token", @@ -32212,7 +32212,7 @@ impl std::fmt::Debug for TsUnionType { } else { f.debug_struct("TsUnionType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -32249,10 +32249,10 @@ impl AstNode for TsUnknownType { } impl std::fmt::Debug for TsUnknownType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsUnknownType") .field( "unknown_token", @@ -32262,7 +32262,7 @@ impl std::fmt::Debug for TsUnknownType { } else { f.debug_struct("TsUnknownType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -32299,17 +32299,17 @@ impl AstNode for TsVoidType { } impl std::fmt::Debug for TsVoidType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("TsVoidType") .field("void_token", &support::DebugSyntaxResult(self.void_token())) .finish() } else { f.debug_struct("TsVoidType").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } diff --git a/crates/biome_json_syntax/src/generated/nodes.rs b/crates/biome_json_syntax/src/generated/nodes.rs index dde1f16a8c4a..43fbe537ae55 100644 --- a/crates/biome_json_syntax/src/generated/nodes.rs +++ b/crates/biome_json_syntax/src/generated/nodes.rs @@ -451,10 +451,10 @@ impl AstNode for JsonArrayValue { } impl std::fmt::Debug for JsonArrayValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonArrayValue") .field( "l_brack_token", @@ -469,7 +469,7 @@ impl std::fmt::Debug for JsonArrayValue { } else { f.debug_struct("JsonArrayValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -506,10 +506,10 @@ impl AstNode for JsonBooleanValue { } impl std::fmt::Debug for JsonBooleanValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonBooleanValue") .field( "value_token", @@ -519,7 +519,7 @@ impl std::fmt::Debug for JsonBooleanValue { } else { f.debug_struct("JsonBooleanValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -556,10 +556,10 @@ impl AstNode for JsonMember { } impl std::fmt::Debug for JsonMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonMember") .field("name", &support::DebugSyntaxResult(self.name())) .field( @@ -571,7 +571,7 @@ impl std::fmt::Debug for JsonMember { } else { f.debug_struct("JsonMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -608,10 +608,10 @@ impl AstNode for JsonMemberName { } impl std::fmt::Debug for JsonMemberName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonMemberName") .field( "value_token", @@ -621,7 +621,7 @@ impl std::fmt::Debug for JsonMemberName { } else { f.debug_struct("JsonMemberName").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -658,10 +658,10 @@ impl AstNode for JsonNullValue { } impl std::fmt::Debug for JsonNullValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonNullValue") .field( "value_token", @@ -671,7 +671,7 @@ impl std::fmt::Debug for JsonNullValue { } else { f.debug_struct("JsonNullValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -708,10 +708,10 @@ impl AstNode for JsonNumberValue { } impl std::fmt::Debug for JsonNumberValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonNumberValue") .field( "value_token", @@ -721,7 +721,7 @@ impl std::fmt::Debug for JsonNumberValue { } else { f.debug_struct("JsonNumberValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -758,10 +758,10 @@ impl AstNode for JsonObjectValue { } impl std::fmt::Debug for JsonObjectValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonObjectValue") .field( "l_curly_token", @@ -776,7 +776,7 @@ impl std::fmt::Debug for JsonObjectValue { } else { f.debug_struct("JsonObjectValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -813,10 +813,10 @@ impl AstNode for JsonRoot { } impl std::fmt::Debug for JsonRoot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonRoot") .field( "bom_token", @@ -828,7 +828,7 @@ impl std::fmt::Debug for JsonRoot { } else { f.debug_struct("JsonRoot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -865,10 +865,10 @@ impl AstNode for JsonStringValue { } impl std::fmt::Debug for JsonStringValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("JsonStringValue") .field( "value_token", @@ -878,7 +878,7 @@ impl std::fmt::Debug for JsonStringValue { } else { f.debug_struct("JsonStringValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } diff --git a/crates/biome_markdown_syntax/src/generated/nodes.rs b/crates/biome_markdown_syntax/src/generated/nodes.rs index 5653d0da38b0..aec75eb8b068 100644 --- a/crates/biome_markdown_syntax/src/generated/nodes.rs +++ b/crates/biome_markdown_syntax/src/generated/nodes.rs @@ -1007,17 +1007,17 @@ impl AstNode for MdBulletListItem { } impl std::fmt::Debug for MdBulletListItem { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdBulletListItem") .field("md_bullet_list", &self.md_bullet_list()) .finish() } else { f.debug_struct("MdBulletListItem").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1054,10 +1054,10 @@ impl AstNode for MdDocument { } impl std::fmt::Debug for MdDocument { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdDocument") .field( "bom_token", @@ -1069,7 +1069,7 @@ impl std::fmt::Debug for MdDocument { } else { f.debug_struct("MdDocument").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1106,17 +1106,17 @@ impl AstNode for MdFencedCodeBlock { } impl std::fmt::Debug for MdFencedCodeBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdFencedCodeBlock") .field("md_textual", &support::DebugSyntaxResult(self.md_textual())) .finish() } else { f.debug_struct("MdFencedCodeBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1153,10 +1153,10 @@ impl AstNode for MdHardLine { } impl std::fmt::Debug for MdHardLine { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdHardLine") .field( "value_token", @@ -1166,7 +1166,7 @@ impl std::fmt::Debug for MdHardLine { } else { f.debug_struct("MdHardLine").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1203,17 +1203,17 @@ impl AstNode for MdHash { } impl std::fmt::Debug for MdHash { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdHash") .field("hash_token", &support::DebugSyntaxResult(self.hash_token())) .finish() } else { f.debug_struct("MdHash").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1250,10 +1250,10 @@ impl AstNode for MdHeader { } impl std::fmt::Debug for MdHeader { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdHeader") .field("before", &self.before()) .field( @@ -1265,7 +1265,7 @@ impl std::fmt::Debug for MdHeader { } else { f.debug_struct("MdHeader").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1302,17 +1302,17 @@ impl AstNode for MdHtmlBlock { } impl std::fmt::Debug for MdHtmlBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdHtmlBlock") .field("md_textual", &support::DebugSyntaxResult(self.md_textual())) .finish() } else { f.debug_struct("MdHtmlBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1349,10 +1349,10 @@ impl AstNode for MdIndent { } impl std::fmt::Debug for MdIndent { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdIndent") .field( "value_token", @@ -1362,7 +1362,7 @@ impl std::fmt::Debug for MdIndent { } else { f.debug_struct("MdIndent").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1399,17 +1399,17 @@ impl AstNode for MdIndentCodeBlock { } impl std::fmt::Debug for MdIndentCodeBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdIndentCodeBlock") .field("md_textual", &support::DebugSyntaxResult(self.md_textual())) .finish() } else { f.debug_struct("MdIndentCodeBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1446,17 +1446,17 @@ impl AstNode for MdInlineCode { } impl std::fmt::Debug for MdInlineCode { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdInlineCode") .field("md_textual", &support::DebugSyntaxResult(self.md_textual())) .finish() } else { f.debug_struct("MdInlineCode").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1493,17 +1493,17 @@ impl AstNode for MdInlineEmphasis { } impl std::fmt::Debug for MdInlineEmphasis { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdInlineEmphasis") .field("md_textual", &support::DebugSyntaxResult(self.md_textual())) .finish() } else { f.debug_struct("MdInlineEmphasis").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1540,10 +1540,10 @@ impl AstNode for MdInlineImage { } impl std::fmt::Debug for MdInlineImage { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdInlineImage") .field("alt", &support::DebugSyntaxResult(self.alt())) .field("src", &support::DebugSyntaxResult(self.src())) @@ -1552,7 +1552,7 @@ impl std::fmt::Debug for MdInlineImage { } else { f.debug_struct("MdInlineImage").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1589,10 +1589,10 @@ impl AstNode for MdInlineLink { } impl std::fmt::Debug for MdInlineLink { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdInlineLink") .field("label", &support::DebugSyntaxResult(self.label())) .field("url", &support::DebugSyntaxResult(self.url())) @@ -1601,7 +1601,7 @@ impl std::fmt::Debug for MdInlineLink { } else { f.debug_struct("MdInlineLink").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1638,10 +1638,10 @@ impl AstNode for MdLinkBlock { } impl std::fmt::Debug for MdLinkBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdLinkBlock") .field("label", &support::DebugSyntaxResult(self.label())) .field("url", &support::DebugSyntaxResult(self.url())) @@ -1650,7 +1650,7 @@ impl std::fmt::Debug for MdLinkBlock { } else { f.debug_struct("MdLinkBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1687,17 +1687,17 @@ impl AstNode for MdOrderListItem { } impl std::fmt::Debug for MdOrderListItem { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdOrderListItem") .field("md_bullet_list", &self.md_bullet_list()) .finish() } else { f.debug_struct("MdOrderListItem").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1734,17 +1734,17 @@ impl AstNode for MdParagraph { } impl std::fmt::Debug for MdParagraph { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdParagraph") .field("md_paragraph_item_list", &self.md_paragraph_item_list()) .finish() } else { f.debug_struct("MdParagraph").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1781,10 +1781,10 @@ impl AstNode for MdQuote { } impl std::fmt::Debug for MdQuote { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdQuote") .field( "any_md_block", @@ -1794,7 +1794,7 @@ impl std::fmt::Debug for MdQuote { } else { f.debug_struct("MdQuote").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1831,10 +1831,10 @@ impl AstNode for MdSetextHeader { } impl std::fmt::Debug for MdSetextHeader { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdSetextHeader") .field( "md_paragraph", @@ -1844,7 +1844,7 @@ impl std::fmt::Debug for MdSetextHeader { } else { f.debug_struct("MdSetextHeader").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1881,10 +1881,10 @@ impl AstNode for MdSoftBreak { } impl std::fmt::Debug for MdSoftBreak { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdSoftBreak") .field( "value_token", @@ -1894,7 +1894,7 @@ impl std::fmt::Debug for MdSoftBreak { } else { f.debug_struct("MdSoftBreak").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1931,10 +1931,10 @@ impl AstNode for MdTextual { } impl std::fmt::Debug for MdTextual { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdTextual") .field( "value_token", @@ -1944,7 +1944,7 @@ impl std::fmt::Debug for MdTextual { } else { f.debug_struct("MdTextual").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1981,10 +1981,10 @@ impl AstNode for MdThematicBreakBlock { } impl std::fmt::Debug for MdThematicBreakBlock { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("MdThematicBreakBlock") .field( "value_token", @@ -1994,7 +1994,7 @@ impl std::fmt::Debug for MdThematicBreakBlock { } else { f.debug_struct("MdThematicBreakBlock").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } diff --git a/crates/biome_yaml_syntax/src/generated/nodes.rs b/crates/biome_yaml_syntax/src/generated/nodes.rs index d3cb53c6a3c5..70a2daa84d93 100644 --- a/crates/biome_yaml_syntax/src/generated/nodes.rs +++ b/crates/biome_yaml_syntax/src/generated/nodes.rs @@ -695,17 +695,17 @@ impl AstNode for YamlArray { } impl std::fmt::Debug for YamlArray { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlArray") .field("items", &self.items()) .finish() } else { f.debug_struct("YamlArray").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -742,10 +742,10 @@ impl AstNode for YamlArrayInline { } impl std::fmt::Debug for YamlArrayInline { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlArrayInline") .field( "l_brack_token", @@ -760,7 +760,7 @@ impl std::fmt::Debug for YamlArrayInline { } else { f.debug_struct("YamlArrayInline").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -797,10 +797,10 @@ impl AstNode for YamlArrayItem { } impl std::fmt::Debug for YamlArrayItem { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlArrayItem") .field( "minus_token", @@ -811,7 +811,7 @@ impl std::fmt::Debug for YamlArrayItem { } else { f.debug_struct("YamlArrayItem").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -848,10 +848,10 @@ impl AstNode for YamlBlockFolded { } impl std::fmt::Debug for YamlBlockFolded { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlBlockFolded") .field( "r_angle_token", @@ -862,7 +862,7 @@ impl std::fmt::Debug for YamlBlockFolded { } else { f.debug_struct("YamlBlockFolded").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -899,10 +899,10 @@ impl AstNode for YamlBlockLiteral { } impl std::fmt::Debug for YamlBlockLiteral { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlBlockLiteral") .field( "bitwise_or_token", @@ -913,7 +913,7 @@ impl std::fmt::Debug for YamlBlockLiteral { } else { f.debug_struct("YamlBlockLiteral").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -950,10 +950,10 @@ impl AstNode for YamlBlockValue { } impl std::fmt::Debug for YamlBlockValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlBlockValue") .field( "yaml_block_value_token", @@ -963,7 +963,7 @@ impl std::fmt::Debug for YamlBlockValue { } else { f.debug_struct("YamlBlockValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1000,10 +1000,10 @@ impl AstNode for YamlBooleanValue { } impl std::fmt::Debug for YamlBooleanValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlBooleanValue") .field( "value_token", @@ -1013,7 +1013,7 @@ impl std::fmt::Debug for YamlBooleanValue { } else { f.debug_struct("YamlBooleanValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1050,10 +1050,10 @@ impl AstNode for YamlDocument { } impl std::fmt::Debug for YamlDocument { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlDocument") .field( "dashdashdash_token", @@ -1068,7 +1068,7 @@ impl std::fmt::Debug for YamlDocument { } else { f.debug_struct("YamlDocument").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1105,10 +1105,10 @@ impl AstNode for YamlIdentifier { } impl std::fmt::Debug for YamlIdentifier { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlIdentifier") .field( "value_token", @@ -1118,7 +1118,7 @@ impl std::fmt::Debug for YamlIdentifier { } else { f.debug_struct("YamlIdentifier").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1155,10 +1155,10 @@ impl AstNode for YamlNullValue { } impl std::fmt::Debug for YamlNullValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlNullValue") .field( "value_token", @@ -1168,7 +1168,7 @@ impl std::fmt::Debug for YamlNullValue { } else { f.debug_struct("YamlNullValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1205,10 +1205,10 @@ impl AstNode for YamlNumberValue { } impl std::fmt::Debug for YamlNumberValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlNumberValue") .field( "value_token", @@ -1218,7 +1218,7 @@ impl std::fmt::Debug for YamlNumberValue { } else { f.debug_struct("YamlNumberValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1255,17 +1255,17 @@ impl AstNode for YamlObject { } impl std::fmt::Debug for YamlObject { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlObject") .field("members", &self.members()) .finish() } else { f.debug_struct("YamlObject").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1302,10 +1302,10 @@ impl AstNode for YamlObjectMember { } impl std::fmt::Debug for YamlObjectMember { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlObjectMember") .field("key", &support::DebugSyntaxResult(self.key())) .field( @@ -1317,7 +1317,7 @@ impl std::fmt::Debug for YamlObjectMember { } else { f.debug_struct("YamlObjectMember").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1354,10 +1354,10 @@ impl AstNode for YamlRoot { } impl std::fmt::Debug for YamlRoot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlRoot") .field( "bom_token", @@ -1369,7 +1369,7 @@ impl std::fmt::Debug for YamlRoot { } else { f.debug_struct("YamlRoot").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } @@ -1406,10 +1406,10 @@ impl AstNode for YamlStringValue { } impl std::fmt::Debug for YamlStringValue { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH : std :: cell :: Cell < u8 > = const { std :: cell :: Cell :: new (0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct("YamlStringValue") .field( "value_token", @@ -1419,7 +1419,7 @@ impl std::fmt::Debug for YamlStringValue { } else { f.debug_struct("YamlStringValue").finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } diff --git a/xtask/codegen/src/generate_nodes.rs b/xtask/codegen/src/generate_nodes.rs index 8b18cd943881..7b60d867b2c9 100644 --- a/xtask/codegen/src/generate_nodes.rs +++ b/xtask/codegen/src/generate_nodes.rs @@ -240,17 +240,17 @@ pub fn generate_nodes(ast: &AstSrc, language_kind: LanguageKind) -> Result 0 { quote! { - use std::sync::atomic::{AtomicUsize, Ordering}; - static DEPTH: AtomicUsize = AtomicUsize::new(0); - let current_depth = DEPTH.fetch_add(1, Ordering::Relaxed); + thread_local! { static DEPTH: std::cell::Cell = const { std::cell::Cell::new(0) } }; + let current_depth = DEPTH.get(); let result = if current_depth < 16 { + DEPTH.set(current_depth + 1); f.debug_struct(#string_name) #(#fields)* .finish() } else { f.debug_struct(#string_name).finish() }; - DEPTH.fetch_sub(1, Ordering::Relaxed); + DEPTH.set(current_depth); result } } else {