Skip to content

Commit 3d7545d

Browse files
authoredNov 15, 2022
fix(css/parser): Fix a bug with scope in block (#6402)
1 parent fafc625 commit 3d7545d

File tree

5 files changed

+299
-224
lines changed

5 files changed

+299
-224
lines changed
 

‎crates/swc_css_parser/src/parser/at_rules/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ where
565565
| js_word!("-o-keyframes")
566566
| js_word!("-ms-keyframes") => {
567567
let ctx = Ctx {
568-
block_contents_grammar: BlockContentsGrammar::DeclarationList,
568+
block_contents_grammar: BlockContentsGrammar::RuleList,
569569
is_top_level: false,
570570
in_keyframes_at_rule: true,
571571
..self.ctx

‎crates/swc_css_parser/src/parser/syntax/mod.rs

+45-221
Original file line numberDiff line numberDiff line change
@@ -134,24 +134,18 @@ where
134134
unreachable!()
135135
}
136136
};
137-
let (normalized_at_rule_name, name) = if at_keyword_name.0.starts_with("--") {
138-
(
139-
at_keyword_name.0.to_ascii_lowercase(),
140-
AtRuleName::DashedIdent(DashedIdent {
141-
span: Span::new(span.lo + BytePos(1), span.hi, Default::default()),
142-
value: at_keyword_name.0,
143-
raw: Some(at_keyword_name.1),
144-
}),
145-
)
137+
let name = if at_keyword_name.0.starts_with("--") {
138+
AtRuleName::DashedIdent(DashedIdent {
139+
span: Span::new(span.lo + BytePos(1), span.hi, Default::default()),
140+
value: at_keyword_name.0,
141+
raw: Some(at_keyword_name.1),
142+
})
146143
} else {
147-
(
148-
at_keyword_name.0.to_ascii_lowercase(),
149-
AtRuleName::Ident(Ident {
150-
span: Span::new(span.lo + BytePos(1), span.hi, Default::default()),
151-
value: at_keyword_name.0,
152-
raw: Some(at_keyword_name.1),
153-
}),
154-
)
144+
AtRuleName::Ident(Ident {
145+
span: Span::new(span.lo + BytePos(1), span.hi, Default::default()),
146+
value: at_keyword_name.0,
147+
raw: Some(at_keyword_name.1),
148+
})
155149
};
156150
let mut prelude = vec![];
157151
let mut at_rule = AtRule {
@@ -181,103 +175,31 @@ where
181175
tok!(";") => {
182176
self.input.bump();
183177

184-
let list_of_component_values = self.create_locv(prelude);
185-
186-
at_rule.prelude = match self
187-
.parse_according_to_grammar(&list_of_component_values, |parser| {
188-
parser.parse_at_rule_prelude(&normalized_at_rule_name)
189-
}) {
190-
Ok(at_rule_prelude) => match at_rule_prelude {
191-
None if normalized_at_rule_name == js_word!("layer") => {
192-
self.errors.push(Error::new(
193-
span,
194-
ErrorKind::Expected("at least one name"),
195-
));
196-
197-
Some(Box::new(AtRulePrelude::ListOfComponentValues(
198-
list_of_component_values,
199-
)))
200-
}
201-
_ => at_rule_prelude.map(Box::new),
202-
},
203-
Err(err) => {
204-
if *err.kind() != ErrorKind::Ignore {
205-
self.errors.push(err);
206-
}
207-
208-
if !list_of_component_values.children.is_empty() {
209-
Some(Box::new(AtRulePrelude::ListOfComponentValues(
210-
list_of_component_values,
211-
)))
212-
} else {
213-
None
214-
}
215-
}
216-
};
178+
at_rule.prelude = Some(Box::new(AtRulePrelude::ListOfComponentValues(
179+
self.create_locv(prelude),
180+
)));
217181
at_rule.span = span!(self, span.lo);
218182

183+
// Canonicalization against a grammar
184+
at_rule = self.canonicalize_at_rule_prelude(at_rule)?;
185+
219186
return Ok(at_rule);
220187
}
221188
// <{-token>
222189
// Consume a simple block and assign it to the at-rule’s block. Return the at-rule.
223190
tok!("{") => {
224-
let mut block = self.parse_as::<SimpleBlock>()?;
225-
226-
let list_of_component_values = self.create_locv(prelude);
227-
228-
at_rule.prelude = match self
229-
.parse_according_to_grammar(&list_of_component_values, |parser| {
230-
parser.parse_at_rule_prelude(&normalized_at_rule_name)
231-
}) {
232-
Ok(at_rule_prelude) => match at_rule_prelude {
233-
Some(AtRulePrelude::LayerPrelude(LayerPrelude::NameList(
234-
name_list,
235-
))) if name_list.name_list.len() > 1 => {
236-
self.errors.push(Error::new(
237-
name_list.span,
238-
ErrorKind::Expected("only one name"),
239-
));
240-
241-
Some(Box::new(AtRulePrelude::ListOfComponentValues(
242-
list_of_component_values,
243-
)))
244-
}
245-
_ => at_rule_prelude.map(Box::new),
246-
},
247-
Err(err) => {
248-
if *err.kind() != ErrorKind::Ignore {
249-
self.errors.push(err);
250-
}
251-
252-
if !list_of_component_values.children.is_empty() {
253-
Some(Box::new(AtRulePrelude::ListOfComponentValues(
254-
list_of_component_values,
255-
)))
256-
} else {
257-
None
258-
}
259-
}
260-
};
191+
let block = self.parse_as::<SimpleBlock>()?;
261192

262-
at_rule.block = match self.parse_according_to_grammar(
263-
&self.create_locv(block.value.clone()),
264-
|parser| parser.parse_at_rule_block(&normalized_at_rule_name),
265-
) {
266-
Ok(block_contents) => {
267-
block.value = block_contents;
268-
269-
Some(block)
270-
}
271-
Err(err) => {
272-
if *err.kind() != ErrorKind::Ignore {
273-
self.errors.push(err);
274-
}
275-
276-
Some(block)
277-
}
278-
};
193+
at_rule.prelude = Some(Box::new(AtRulePrelude::ListOfComponentValues(
194+
self.create_locv(prelude),
195+
)));
196+
at_rule.block = Some(block);
279197
at_rule.span = span!(self, span.lo);
280198

199+
// Canonicalization against a grammar
200+
at_rule = self.canonicalize_at_rule_prelude(at_rule)?;
201+
at_rule = self.canonicalize_at_rule_block(at_rule)?;
202+
281203
return Ok(at_rule);
282204
}
283205
// anything else
@@ -299,50 +221,10 @@ where
299221
{
300222
fn parse(&mut self) -> PResult<QualifiedRule> {
301223
// To consume a qualified rule:
302-
let create_prelude =
303-
|p: &mut Parser<I>, list: Vec<ComponentValue>| -> PResult<QualifiedRulePrelude> {
304-
let list_of_component_values = p.create_locv(list);
305-
306-
if p.ctx.in_keyframes_at_rule {
307-
Ok(QualifiedRulePrelude::ListOfComponentValues(
308-
list_of_component_values,
309-
))
310-
} else if p.ctx.mixed_with_declarations {
311-
match p.parse_according_to_grammar::<RelativeSelectorList>(
312-
&list_of_component_values,
313-
|parser| parser.parse(),
314-
) {
315-
Ok(relative_selector_list) => Ok(
316-
QualifiedRulePrelude::RelativeSelectorList(relative_selector_list),
317-
),
318-
Err(err) => {
319-
p.errors.push(err);
320-
321-
Ok(QualifiedRulePrelude::ListOfComponentValues(
322-
list_of_component_values,
323-
))
324-
}
325-
}
326-
} else {
327-
match p.parse_according_to_grammar::<SelectorList>(
328-
&list_of_component_values,
329-
|parser| parser.parse(),
330-
) {
331-
Ok(selector_list) => Ok(QualifiedRulePrelude::SelectorList(selector_list)),
332-
Err(err) => {
333-
p.errors.push(err);
334224

335-
Ok(QualifiedRulePrelude::ListOfComponentValues(
336-
list_of_component_values,
337-
))
338-
}
339-
}
340-
}
341-
};
342-
343-
let span = self.input.cur_span();
344225
// Create a new qualified rule with its prelude initially set to an empty list,
345226
// and its value initially set to nothing.
227+
let span = self.input.cur_span();
346228
let mut prelude = vec![];
347229

348230
// Repeatedly consume the next input token:
@@ -375,30 +257,20 @@ where
375257
// Consume a simple block and assign it to the qualified rule’s block. Return the
376258
// qualified rule.
377259
tok!("{") => {
378-
let mut block = self.parse_as::<SimpleBlock>()?;
379-
380-
block.value = match self.ctx.block_contents_grammar {
381-
BlockContentsGrammar::DeclarationList => self
382-
.parse_according_to_grammar(&self.create_locv(block.value), |parser| {
383-
parser.parse_as::<Vec<DeclarationOrAtRule>>()
384-
})?
385-
.into_iter()
386-
.map(ComponentValue::DeclarationOrAtRule)
387-
.collect(),
388-
_ => self
389-
.parse_according_to_grammar(&self.create_locv(block.value), |parser| {
390-
parser.parse_as::<Vec<StyleBlock>>()
391-
})?
392-
.into_iter()
393-
.map(ComponentValue::StyleBlock)
394-
.collect(),
395-
};
396-
397-
return Ok(QualifiedRule {
260+
let block = self.parse_as::<SimpleBlock>()?;
261+
let mut qualified_rule = QualifiedRule {
398262
span: span!(self, span.lo),
399-
prelude: create_prelude(self, prelude)?,
263+
prelude: QualifiedRulePrelude::ListOfComponentValues(
264+
self.create_locv(prelude),
265+
),
400266
block,
401-
});
267+
};
268+
269+
// Canonicalization against a grammar
270+
qualified_rule = self.canonicalize_qualified_rule_prelude(qualified_rule)?;
271+
qualified_rule = self.canonicalize_qualified_rule_block(qualified_rule)?;
272+
273+
return Ok(qualified_rule);
402274
}
403275
// Reconsume the current input token. Consume a component value. Append the returned
404276
// value to the qualified rule’s prelude.
@@ -458,12 +330,7 @@ where
458330
// Reconsume the current input token. Consume an at-rule, and append the result to
459331
// rules.
460332
tok!("@") => {
461-
let at_rule = self
462-
.with_ctx(Ctx {
463-
block_contents_grammar: BlockContentsGrammar::StyleBlock,
464-
..self.ctx
465-
})
466-
.parse_as::<AtRule>()?;
333+
let at_rule = self.parse()?;
467334

468335
rules.push(StyleBlock::AtRule(Box::new(at_rule)));
469336
}
@@ -880,32 +747,8 @@ where
880747
return Ok(declaration);
881748
}
882749

883-
// Grammar parsing
884-
let list_of_component_values = self.create_locv(declaration.value);
885-
886-
declaration.value =
887-
match self.parse_according_to_grammar(&list_of_component_values, |parser| {
888-
let mut values = vec![];
889-
890-
loop {
891-
if is!(parser, EOF) {
892-
break;
893-
}
894-
895-
values.push(parser.parse_generic_value()?);
896-
}
897-
898-
Ok(values)
899-
}) {
900-
Ok(values) => values,
901-
Err(err) => {
902-
if *err.kind() != ErrorKind::Ignore {
903-
self.errors.push(err);
904-
}
905-
906-
list_of_component_values.children
907-
}
908-
};
750+
// Canonicalization against a grammar
751+
declaration = self.canonicalize_declaration_value(declaration)?;
909752

910753
// 8. Return the declaration.
911754
Ok(declaration)
@@ -1055,9 +898,8 @@ where
1055898
unreachable!()
1056899
}
1057900
};
1058-
let function_name = &*ident.0.to_ascii_lowercase();
1059901
let name = Ident {
1060-
span: swc_common::Span::new(span.lo, span.hi - BytePos(1), Default::default()),
902+
span: Span::new(span.lo, span.hi - BytePos(1), Default::default()),
1061903
value: ident.0,
1062904
raw: Some(ident.1),
1063905
};
@@ -1101,26 +943,8 @@ where
1101943

1102944
function.span = span!(self, span.lo);
1103945

1104-
// Grammar parsing
1105-
match self.ctx.block_contents_grammar {
1106-
BlockContentsGrammar::DeclarationList => {}
1107-
_ => {
1108-
let locv = self.create_locv(function.value);
1109-
1110-
function.value = match self.parse_according_to_grammar(&locv, |parser| {
1111-
parser.parse_function_values(function_name)
1112-
}) {
1113-
Ok(values) => values,
1114-
Err(err) => {
1115-
if *err.kind() != ErrorKind::Ignore {
1116-
self.errors.push(err);
1117-
}
1118-
1119-
locv.children
1120-
}
1121-
};
1122-
}
1123-
}
946+
// Canonicalization against a grammar
947+
function = self.canonicalize_function_value(function)?;
1124948

1125949
return Ok(function);
1126950
}

‎crates/swc_css_parser/src/parser/util.rs

+251-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
use std::ops::{Deref, DerefMut};
22

3+
use swc_atoms::js_word;
34
use swc_common::{Span, Spanned, SyntaxContext, DUMMY_SP};
45
use swc_css_ast::*;
56

67
use super::{
78
input::{Input, InputType, ParserInput},
89
Ctx, Error, PResult, Parse, Parser,
910
};
10-
use crate::parser::BlockContentsGrammar;
11+
use crate::{error::ErrorKind, parser::BlockContentsGrammar};
1112

1213
impl<I> Parser<I>
1314
where
@@ -74,6 +75,255 @@ where
7475
res
7576
}
7677

78+
pub(super) fn canonicalize_at_rule_prelude(&mut self, mut at_rule: AtRule) -> PResult<AtRule> {
79+
let normalized_at_rule_name = match &at_rule.name {
80+
AtRuleName::Ident(Ident { value, .. }) => value.to_ascii_lowercase(),
81+
AtRuleName::DashedIdent(_) => return Ok(at_rule),
82+
};
83+
84+
let list_of_component_values = match at_rule.prelude {
85+
Some(at_rule_prelude) => match *at_rule_prelude {
86+
AtRulePrelude::ListOfComponentValues(list_of_component_values) => {
87+
list_of_component_values
88+
}
89+
_ => {
90+
unreachable!();
91+
}
92+
},
93+
_ => {
94+
unreachable!();
95+
}
96+
};
97+
98+
at_rule.prelude = match self
99+
.parse_according_to_grammar(&list_of_component_values, |parser| {
100+
parser.parse_at_rule_prelude(&normalized_at_rule_name)
101+
}) {
102+
Ok(at_rule_prelude) => match at_rule_prelude {
103+
Some(AtRulePrelude::LayerPrelude(LayerPrelude::NameList(name_list)))
104+
if name_list.name_list.len() > 1 && at_rule.block.is_some() =>
105+
{
106+
self.errors.push(Error::new(
107+
name_list.span,
108+
ErrorKind::Expected("only one name"),
109+
));
110+
111+
Some(Box::new(AtRulePrelude::ListOfComponentValues(
112+
list_of_component_values,
113+
)))
114+
}
115+
None if *normalized_at_rule_name == js_word!("layer")
116+
&& at_rule.block.is_none() =>
117+
{
118+
self.errors.push(Error::new(
119+
at_rule.span,
120+
ErrorKind::Expected("at least one name"),
121+
));
122+
123+
Some(Box::new(AtRulePrelude::ListOfComponentValues(
124+
list_of_component_values,
125+
)))
126+
}
127+
_ => at_rule_prelude.map(Box::new),
128+
},
129+
Err(err) => {
130+
if *err.kind() != ErrorKind::Ignore {
131+
self.errors.push(err);
132+
}
133+
134+
if !list_of_component_values.children.is_empty() {
135+
Some(Box::new(AtRulePrelude::ListOfComponentValues(
136+
list_of_component_values,
137+
)))
138+
} else {
139+
None
140+
}
141+
}
142+
};
143+
144+
Ok(at_rule)
145+
}
146+
147+
pub(super) fn canonicalize_at_rule_block(&mut self, mut at_rule: AtRule) -> PResult<AtRule> {
148+
let normalized_at_rule_name = match &at_rule.name {
149+
AtRuleName::Ident(Ident { value, .. }) => value.to_ascii_lowercase(),
150+
AtRuleName::DashedIdent(_) => return Ok(at_rule),
151+
};
152+
153+
let mut block = match at_rule.block {
154+
Some(simple_block) => simple_block,
155+
_ => {
156+
unreachable!();
157+
}
158+
};
159+
160+
let list_of_component_values = self.create_locv(block.value);
161+
162+
block.value = match self.parse_according_to_grammar(&list_of_component_values, |parser| {
163+
parser.parse_at_rule_block(&normalized_at_rule_name)
164+
}) {
165+
Ok(block_contents) => block_contents,
166+
Err(err) => {
167+
if *err.kind() != ErrorKind::Ignore {
168+
self.errors.push(err);
169+
}
170+
171+
list_of_component_values.children
172+
}
173+
};
174+
175+
at_rule.block = Some(block);
176+
177+
Ok(at_rule)
178+
}
179+
180+
pub(super) fn canonicalize_qualified_rule_prelude(
181+
&mut self,
182+
mut qualified_rule: QualifiedRule,
183+
) -> PResult<QualifiedRule> {
184+
let list_of_component_values = match qualified_rule.prelude {
185+
QualifiedRulePrelude::ListOfComponentValues(list_of_component_values) => {
186+
list_of_component_values
187+
}
188+
_ => {
189+
unreachable!();
190+
}
191+
};
192+
193+
qualified_rule.prelude = if self.ctx.in_keyframes_at_rule {
194+
QualifiedRulePrelude::ListOfComponentValues(list_of_component_values)
195+
} else if self.ctx.mixed_with_declarations {
196+
match self.parse_according_to_grammar::<RelativeSelectorList>(
197+
&list_of_component_values,
198+
|parser| parser.parse(),
199+
) {
200+
Ok(relative_selector_list) => {
201+
QualifiedRulePrelude::RelativeSelectorList(relative_selector_list)
202+
}
203+
Err(err) => {
204+
self.errors.push(err);
205+
206+
QualifiedRulePrelude::ListOfComponentValues(list_of_component_values)
207+
}
208+
}
209+
} else {
210+
match self
211+
.parse_according_to_grammar::<SelectorList>(&list_of_component_values, |parser| {
212+
parser.parse()
213+
}) {
214+
Ok(selector_list) => QualifiedRulePrelude::SelectorList(selector_list),
215+
Err(err) => {
216+
self.errors.push(err);
217+
218+
QualifiedRulePrelude::ListOfComponentValues(list_of_component_values)
219+
}
220+
}
221+
};
222+
223+
Ok(qualified_rule)
224+
}
225+
226+
pub(super) fn canonicalize_qualified_rule_block(
227+
&mut self,
228+
mut qualified_rule: QualifiedRule,
229+
) -> PResult<QualifiedRule> {
230+
qualified_rule.block.value = match self.ctx.block_contents_grammar {
231+
BlockContentsGrammar::RuleList if self.ctx.in_keyframes_at_rule => self
232+
.parse_according_to_grammar(
233+
&self.create_locv(qualified_rule.block.value),
234+
|parser| {
235+
parser
236+
.with_ctx(Ctx {
237+
block_contents_grammar: BlockContentsGrammar::DeclarationList,
238+
..parser.ctx
239+
})
240+
.parse_as::<Vec<DeclarationOrAtRule>>()
241+
},
242+
)?
243+
.into_iter()
244+
.map(ComponentValue::DeclarationOrAtRule)
245+
.collect(),
246+
_ => self
247+
.parse_according_to_grammar(
248+
&self.create_locv(qualified_rule.block.value),
249+
|parser| {
250+
parser
251+
.with_ctx(Ctx {
252+
block_contents_grammar: BlockContentsGrammar::StyleBlock,
253+
..parser.ctx
254+
})
255+
.parse_as::<Vec<StyleBlock>>()
256+
},
257+
)?
258+
.into_iter()
259+
.map(ComponentValue::StyleBlock)
260+
.collect(),
261+
};
262+
263+
Ok(qualified_rule)
264+
}
265+
266+
pub(super) fn canonicalize_function_value(
267+
&mut self,
268+
mut function: Function,
269+
) -> PResult<Function> {
270+
match self.ctx.block_contents_grammar {
271+
BlockContentsGrammar::DeclarationList => {}
272+
_ => {
273+
let function_name = function.name.value.to_ascii_lowercase();
274+
275+
let locv = self.create_locv(function.value);
276+
277+
function.value = match self.parse_according_to_grammar(&locv, |parser| {
278+
parser.parse_function_values(&function_name)
279+
}) {
280+
Ok(values) => values,
281+
Err(err) => {
282+
if *err.kind() != ErrorKind::Ignore {
283+
self.errors.push(err);
284+
}
285+
286+
locv.children
287+
}
288+
};
289+
}
290+
}
291+
292+
Ok(function)
293+
}
294+
295+
pub(super) fn canonicalize_declaration_value(
296+
&mut self,
297+
mut declaration: Declaration,
298+
) -> PResult<Declaration> {
299+
let locv = self.create_locv(declaration.value);
300+
301+
declaration.value = match self.parse_according_to_grammar(&locv, |parser| {
302+
let mut values = vec![];
303+
304+
loop {
305+
if is!(parser, EOF) {
306+
break;
307+
}
308+
309+
values.push(parser.parse_generic_value()?);
310+
}
311+
312+
Ok(values)
313+
}) {
314+
Ok(values) => values,
315+
Err(err) => {
316+
if *err.kind() != ErrorKind::Ignore {
317+
self.errors.push(err);
318+
}
319+
320+
locv.children
321+
}
322+
};
323+
324+
Ok(declaration)
325+
}
326+
77327
pub(super) fn try_to_parse_legacy_nesting(&mut self) -> Option<QualifiedRule> {
78328
let state = self.input.state();
79329
let qualified_rule = self

‎crates/swc_css_parser/src/parser/values_and_units/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ where
266266
Ok(tokens)
267267
}
268268

269+
// TODO use `JsWord`
269270
pub fn parse_function_values(&mut self, function_name: &str) -> PResult<Vec<ComponentValue>> {
270271
let mut values = vec![];
271272

‎crates/swc_css_parser/tests/recovery/at-rule/layer/empty/output.swc-stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
x Expected at least one name
33
,-[$DIR/tests/recovery/at-rule/layer/empty/input.css:1:1]
44
1 | @layer ;
5-
: ^^^^^^
5+
: ^^^^^^^^
66
`----

1 commit comments

Comments
 (1)

github-actions[bot] commented on Nov 15, 2022

@github-actions[bot]

Benchmark

Benchmark suite Current: 3d7545d Previous: 8ca3cc7 Ratio
es/full/bugs-1 343131 ns/iter (± 18927) 356010 ns/iter (± 28302) 0.96
es/full/minify/libraries/antd 1879029520 ns/iter (± 86154105) 1868954143 ns/iter (± 41828480) 1.01
es/full/minify/libraries/d3 414102995 ns/iter (± 17005550) 427267789 ns/iter (± 16138148) 0.97
es/full/minify/libraries/echarts 1577618030 ns/iter (± 58450498) 1577385149 ns/iter (± 22702097) 1.00
es/full/minify/libraries/jquery 102708379 ns/iter (± 4908626) 106672079 ns/iter (± 2651444) 0.96
es/full/minify/libraries/lodash 125489448 ns/iter (± 6342439) 131443744 ns/iter (± 5431446) 0.95
es/full/minify/libraries/moment 59496706 ns/iter (± 2012974) 62479974 ns/iter (± 2256311) 0.95
es/full/minify/libraries/react 19967860 ns/iter (± 1038082) 22295733 ns/iter (± 2495811) 0.90
es/full/minify/libraries/terser 337947003 ns/iter (± 54535627) 341305748 ns/iter (± 37992550) 0.99
es/full/minify/libraries/three 573368575 ns/iter (± 33838779) 581803883 ns/iter (± 24392579) 0.99
es/full/minify/libraries/typescript 3503261209 ns/iter (± 124237777) 3324414259 ns/iter (± 141363385) 1.05
es/full/minify/libraries/victory 864893126 ns/iter (± 39416137) 840069254 ns/iter (± 30542715) 1.03
es/full/minify/libraries/vue 171950018 ns/iter (± 10840345) 163713162 ns/iter (± 9059088) 1.05
es/full/codegen/es3 35524 ns/iter (± 2234) 40217 ns/iter (± 6880) 0.88
es/full/codegen/es5 35047 ns/iter (± 3099) 35006 ns/iter (± 5217) 1.00
es/full/codegen/es2015 34463 ns/iter (± 1634) 33851 ns/iter (± 1235) 1.02
es/full/codegen/es2016 34603 ns/iter (± 1133) 33814 ns/iter (± 1497) 1.02
es/full/codegen/es2017 34599 ns/iter (± 1274) 34624 ns/iter (± 2010) 1.00
es/full/codegen/es2018 34350 ns/iter (± 1591) 34166 ns/iter (± 1046) 1.01
es/full/codegen/es2019 34720 ns/iter (± 2050) 33853 ns/iter (± 1048) 1.03
es/full/codegen/es2020 34496 ns/iter (± 1178) 34083 ns/iter (± 2527) 1.01
es/full/all/es3 200853664 ns/iter (± 13412938) 239787286 ns/iter (± 21209274) 0.84
es/full/all/es5 234003167 ns/iter (± 30838241) 223411060 ns/iter (± 23802659) 1.05
es/full/all/es2015 181154661 ns/iter (± 21853824) 170529182 ns/iter (± 20469715) 1.06
es/full/all/es2016 161489277 ns/iter (± 26404058) 159386307 ns/iter (± 14381462) 1.01
es/full/all/es2017 161681927 ns/iter (± 8902858) 164722662 ns/iter (± 52563112) 0.98
es/full/all/es2018 158742089 ns/iter (± 9826764) 159779349 ns/iter (± 21667518) 0.99
es/full/all/es2019 174600328 ns/iter (± 11801874) 166757541 ns/iter (± 17136334) 1.05
es/full/all/es2020 155677061 ns/iter (± 9995349) 159267746 ns/iter (± 21235222) 0.98
es/full/parser 756093 ns/iter (± 52006) 765942 ns/iter (± 87392) 0.99
es/full/base/fixer 28013 ns/iter (± 2796) 27953 ns/iter (± 1146) 1.00
es/full/base/resolver_and_hygiene 97198 ns/iter (± 4485) 94553 ns/iter (± 4436) 1.03
serialization of ast node 220 ns/iter (± 7) 232 ns/iter (± 12) 0.95
serialization of serde 224 ns/iter (± 5) 226 ns/iter (± 6) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.