Skip to content

Commit

Permalink
fix(es/parser): Revert #9141 (#9171)
Browse files Browse the repository at this point in the history
**Description:**

Reverts #9141 because it caused an issue for https://github.com/toeverything/AFFiNE.
  • Loading branch information
kdy1 authored Jul 6, 2024
1 parent a416cae commit 8b66d5e
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 110 deletions.
6 changes: 3 additions & 3 deletions crates/swc_ecma_parser/src/parser/class_and_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ impl<I: Tokens> Parser<I> {
}

trace_cur!(self, parse_class_member_with_is_static__normal_class_member);
let mut key = if readonly.is_some() && is!(self, '!' | ':') {
let mut key = if readonly.is_some() && is_one_of!(self, '!', ':') {
Key::Public(PropName::Ident(Ident::new(
"readonly".into(),
readonly.unwrap(),
Expand Down Expand Up @@ -1155,8 +1155,8 @@ impl<I: Tokens> Parser<I> {
}

fn is_class_property(&mut self, asi: bool) -> bool {
(self.input.syntax().typescript() && is!(self, '!' | ':'))
|| is!(self, '=' | '}')
(self.input.syntax().typescript() && is_one_of!(self, '!', ':'))
|| is_one_of!(self, '=', '}')
|| if asi {
is!(self, ';')
} else {
Expand Down
48 changes: 11 additions & 37 deletions crates/swc_ecma_parser/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl<I: Tokens> Parser<I> {
let start = self.input.cur_span();

if self.input.syntax().typescript()
&& (is!(self, '<' | JSXTagStart))
&& (is_one_of!(self, '<', JSXTagStart))
&& (peeked_is!(self, IdentName) || peeked_is!(self, JSXName))
{
let ctx = Context {
Expand Down Expand Up @@ -395,7 +395,7 @@ impl<I: Tokens> Parser<I> {
}

if is!(self, "let")
|| (self.input.syntax().typescript() && is!(self, IdentRef | "await"))
|| (self.input.syntax().typescript() && is_one_of!(self, IdentRef, "await"))
|| is!(self, IdentRef)
{
let ctx = self.ctx();
Expand Down Expand Up @@ -1226,7 +1226,7 @@ impl<I: Tokens> Parser<I> {
)
.map(|expr| (Box::new(Expr::TaggedTpl(expr)), true))
.map(Some)
} else if is!(p, '=' | "as") {
} else if is_one_of!(p, '=', "as") {
Ok(Some((
Box::new(Expr::TsInstantiation(TsInstantiation {
span: span!(p, start),
Expand Down Expand Up @@ -1258,7 +1258,7 @@ impl<I: Tokens> Parser<I> {
None
};

if obj.is_import() && !is!(self, '.' | '(') {
if obj.is_import() && !is_one_of!(self, '.', '(') {
unexpected!(self, "`.` or `(`")
}

Expand Down Expand Up @@ -1597,7 +1597,7 @@ impl<I: Tokens> Parser<I> {
let callee = self.parse_new_expr()?;
return_if_arrow!(self, callee);

let type_args = if self.input.syntax().typescript() && is!(self, '<' | "<<") {
let type_args = if self.input.syntax().typescript() && is_one_of!(self, '<', "<<") {
self.try_parse_ts(|p| {
let type_args = p.parse_ts_type_args()?;
if is!(p, '(') {
Expand Down Expand Up @@ -2145,44 +2145,18 @@ impl<I: Tokens> Parser<I> {
}

fn is_start_of_left_hand_side_expr(&mut self) -> PResult<bool> {
Ok(is!(
self,
"this"
| "super"
| "null"
| "true"
| "false"
| Num
| BigInt
| Str
| '`'
| '('
| '['
| '{'
| "function"
| "class"
| "new"
| Regex
| IdentRef
Ok(is_one_of!(
self, "this", "super", "null", "true", "false", Num, BigInt, Str, '`', '(', '[', '{',
"function", "class", "new", Regex, IdentRef
) || (is!(self, "import")
&& (peeked_is!(self, '(') || peeked_is!(self, '<') || peeked_is!(self, '.'))))
}

pub(super) fn is_start_of_expr(&mut self) -> PResult<bool> {
Ok(self.is_start_of_left_hand_side_expr()?
|| is!(
self,
'+' | '-'
| '~'
| '!'
| "delete"
| "typeof"
| "void"
| "++"
| "--"
| '<'
| "await"
| "yield"
|| is_one_of!(
self, '+', '-', '~', '!', "delete", "typeof", "void", "++", "--", '<', "await",
"yield"
)
|| (is!(self, '#') && peeked_is!(self, IdentName)))
}
Expand Down
6 changes: 3 additions & 3 deletions crates/swc_ecma_parser/src/parser/expr/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl<I: Tokens> Parser<I> {
}

// Parse unary expression
if is!(self, "delete" | "void" | "typeof" | '+' | '-' | '~' | '!') {
if is_one_of!(self, "delete", "void", "typeof", '+', '-', '~', '!') {
let op = match bump!(self) {
tok!("delete") => op!("delete"),
tok!("void") => op!("void"),
Expand Down Expand Up @@ -341,7 +341,7 @@ impl<I: Tokens> Parser<I> {
return Ok(expr);
}

if is!(self, "++" | "--") {
if is_one_of!(self, "++", "--") {
self.check_assign_target(&expr, false);

let op = if bump!(self) == tok!("++") {
Expand Down Expand Up @@ -378,7 +378,7 @@ impl<I: Tokens> Parser<I> {

let span = span!(self, start);

if is!(self, ')' | ']' | ';' | ',') && !ctx.in_async {
if is_one_of!(self, ')', ']', ';', ',') && !ctx.in_async {
if ctx.module {
self.emit_err(span, SyntaxError::InvalidIdentInAsync);
}
Expand Down
64 changes: 30 additions & 34 deletions crates/swc_ecma_parser/src/parser/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ macro_rules! is {
($p:expr, BindingIdent) => {{
let ctx = $p.ctx();
match $p.input.cur() {
Some(&crate::token::Word(ref w)) => !ctx.is_reserved(w),
Some(&Word(ref w)) => !ctx.is_reserved(w),
_ => false,
}
}};

($p:expr, IdentRef) => {{
let ctx = $p.ctx();
match $p.input.cur() {
Some(&crate::token::Word(ref w)) => !ctx.is_reserved(w),
Some(&Word(ref w)) => !ctx.is_reserved(w),
_ => false,
}
}};

($p:expr,IdentName) => {{
match $p.input.cur() {
Some(&crate::token::Word(..)) => true,
Some(&Word(..)) => true,
_ => false,
}
}};
Expand Down Expand Up @@ -77,33 +77,29 @@ macro_rules! is {
($p:expr, $t:tt) => {
is_exact!($p, $t)
};

($p:expr, $t:tt | $($rest:tt)*) => {{
is!($p, $t) || is!($p, $($rest)*)
}};
}

#[allow(unused)]
macro_rules! peeked_is {
($p:expr, BindingIdent) => {{
let ctx = $p.ctx();
match peek!($p) {
Some(&crate::token::Word(ref w)) => !ctx.is_reserved(w),
Some(&Word(ref w)) => !ctx.is_reserved(w),
_ => false,
}
}};

($p:expr, IdentRef) => {{
let ctx = $p.ctx();
match peek!($p) {
Some(&crate::token::Word(ref w)) => !ctx.is_reserved(w),
Some(&Word(ref w)) => !ctx.is_reserved(w),
_ => false,
}
}};

($p:expr,IdentName) => {{
match peek!($p) {
Some(&crate::token::Word(..)) => true,
Some(&Word(..)) => true,
_ => false,
}
}};
Expand All @@ -125,10 +121,6 @@ macro_rules! peeked_is {
_ => false,
}
};

($p:expr, $t:tt | $($rest:tt)*) => {
peeked_is!($p, $t) || peeked_is!($p, $($rest)*)
};
}

/// Returns true on eof.
Expand All @@ -138,6 +130,15 @@ macro_rules! eof {
};
}

macro_rules! is_one_of {
($p:expr, $($t:tt),+) => {{
false
$(
|| is!($p, $t)
)*
}};
}

// This will panic if current != token
macro_rules! assert_and_bump {
($p:expr, $t:tt) => {{
Expand All @@ -160,6 +161,9 @@ macro_rules! assert_and_bump {
/// if token has data like string.
macro_rules! eat {
($p:expr, ';') => {{
if cfg!(feature = "debug") {
tracing::trace!("eat(';'): cur={:?}", cur!($p, false));
}
match $p.input.cur() {
Some(&Token::Semi) => {
$p.input.bump();
Expand Down Expand Up @@ -206,11 +210,7 @@ macro_rules! expect {
const TOKEN: &Token = &token_including_semi!($t);
if !eat!($p, $t) {
let cur = $p.input.dump_cur();
syntax_error!(
$p,
$p.input.cur_span(),
crate::error::SyntaxError::Expected(TOKEN, cur)
)
syntax_error!($p, $p.input.cur_span(), SyntaxError::Expected(TOKEN, cur))
}
}};
}
Expand All @@ -220,11 +220,7 @@ macro_rules! expect_exact {
const TOKEN: &Token = &token_including_semi!($t);
if !eat_exact!($p, $t) {
let cur = $p.input.dump_cur();
syntax_error!(
$p,
$p.input.cur_span(),
crate::error::SyntaxError::Expected(TOKEN, cur)
)
syntax_error!($p, $p.input.cur_span(), SyntaxError::Expected(TOKEN, cur))
}
}};
}
Expand Down Expand Up @@ -295,9 +291,6 @@ macro_rules! bump {
$p.input.knows_cur(),
"parser should not call bump() without knowing current token"
);
if cfg!(feature = "debug") {
tracing::info!("Bump: {:?}", $p.input.cur());
}
$p.input.bump()
}};
}
Expand Down Expand Up @@ -384,13 +377,16 @@ macro_rules! syntax_error {
}
}
}
tracing::error!(
"Syntax error called from {}:{}:{}\nCurrent token = {:?}",
file!(),
line!(),
column!(),
$p.input.cur()
);

if cfg!(feature = "debug") {
tracing::error!(
"Syntax error called from {}:{}:{}\nCurrent token = {:?}",
file!(),
line!(),
column!(),
$p.input.cur()
);
}
return Err(err.into());
}};
}
Expand Down
7 changes: 2 additions & 5 deletions crates/swc_ecma_parser/src/parser/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,7 @@ impl<I: Tokens> ParseObject<Box<Expr>> for Parser<I> {
let key = self.parse_prop_name()?;

if self.input.syntax().typescript()
&& !is!(
self,
'(' | '[' | ':' | ',' | '?' | '=' | '*' | IdentName | Str | Num
)
&& !is_one_of!(self, '(', '[', ':', ',', '?', '=', '*', IdentName, Str, Num)
&& !(self.input.syntax().typescript() && is!(self, '<'))
&& !(is!(self, '}') && matches!(key, PropName::Ident(..)))
{
Expand Down Expand Up @@ -245,7 +242,7 @@ impl<I: Tokens> ParseObject<Box<Expr>> for Parser<I> {

// `ident` from parse_prop_name is parsed as 'IdentifierName'
// It means we should check for invalid expressions like { for, }
if is!(self, '=' | ',' | '}') {
if is_one_of!(self, '=', ',', '}') {
let is_reserved_word = { self.ctx().is_reserved_word(&ident.sym) };
if is_reserved_word {
self.emit_err(ident.span, SyntaxError::ReservedWordInObjShorthandOrPat);
Expand Down
16 changes: 8 additions & 8 deletions crates/swc_ecma_parser/src/parser/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl<'a, I: Tokens> Parser<I> {
let start = cur_pos!(self);
let decorators = self.parse_decorators(true)?;

if is!(self, "import" | "export") {
if is_one_of!(self, "import", "export") {
return self.handle_import_export(top_level, decorators);
}

Expand Down Expand Up @@ -640,7 +640,7 @@ impl<'a, I: Tokens> Parser<I> {
};

self.with_ctx(ctx).parse_with(|p| {
while is!(p, "case" | "default") {
while is_one_of!(p, "case", "default") {
let mut cons = vec![];
let is_case = is!(p, "case");
let case_start = cur_pos!(p);
Expand All @@ -657,7 +657,7 @@ impl<'a, I: Tokens> Parser<I> {
};
expect!(p, ':');

while !eof!(p) && !is!(p, "case" | "default" | '}') {
while !eof!(p) && !is_one_of!(p, "case", "default", '}') {
cons.push(p.parse_stmt_list_item(false)?);
}

Expand Down Expand Up @@ -868,7 +868,7 @@ impl<'a, I: Tokens> Parser<I> {
let should_include_in = kind != VarDeclKind::Var || !for_loop;

if self.syntax().typescript() && for_loop {
let res = if is!(self, "in" | "of") {
let res = if is_one_of!(self, "in", "of") {
self.ts_look_ahead(|p| {
//
if !eat!(p, "of") && !eat!(p, "in") {
Expand Down Expand Up @@ -999,7 +999,7 @@ impl<'a, I: Tokens> Parser<I> {
}

//FIXME: This is wrong. Should check in/of only on first loop.
let init = if !for_loop || !is!(self, "in" | "of") {
let init = if !for_loop || !is_one_of!(self, "in", "of") {
if eat!(self, '=') {
let expr = self.parse_assignment_expr()?;
let expr = self.verify_expr(expr)?;
Expand Down Expand Up @@ -1243,13 +1243,13 @@ impl<'a, I: Tokens> Parser<I> {
fn parse_for_head(&mut self) -> PResult<TempForHead> {
let strict = self.ctx().strict;

if is!(self, "const" | "var")
if is_one_of!(self, "const", "var")
|| (is!(self, "let")
&& peek!(self).map_or(false, |v| v.kind().follows_keyword_let(strict)))
{
let decl = self.parse_var_stmt(true)?;

if is!(self, "of" | "in") {
if is_one_of!(self, "of", "in") {
if decl.decls.len() != 1 {
for d in decl.decls.iter().skip(1) {
self.emit_err(d.name.span(), SyntaxError::TooManyVarInForInHead);
Expand Down Expand Up @@ -1342,7 +1342,7 @@ impl<'a, I: Tokens> Parser<I> {
}

// for (a of b)
if is!(self, "of" | "in") {
if is_one_of!(self, "of", "in") {
let is_in = is!(self, "in");

let pat = self.reparse_expr_as_pat(PatType::AssignPat, init)?;
Expand Down
Loading

1 comment on commit 8b66d5e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 8b66d5e Previous: f90574d Ratio
es/full/bugs-1 297322 ns/iter (± 12152) 298595 ns/iter (± 8811) 1.00
es/full/minify/libraries/antd 1639516440 ns/iter (± 56217783) 1618479834 ns/iter (± 37087424) 1.01
es/full/minify/libraries/d3 328481753 ns/iter (± 2717520) 332552331 ns/iter (± 1892441) 0.99
es/full/minify/libraries/echarts 1367178321 ns/iter (± 9801223) 1347476516 ns/iter (± 3738775) 1.01
es/full/minify/libraries/jquery 99039326 ns/iter (± 655717) 100361667 ns/iter (± 160435) 0.99
es/full/minify/libraries/lodash 110688102 ns/iter (± 1269053) 111263761 ns/iter (± 164627) 0.99
es/full/minify/libraries/moment 57134419 ns/iter (± 676966) 58568411 ns/iter (± 65387) 0.98
es/full/minify/libraries/react 17985707 ns/iter (± 163834) 18158094 ns/iter (± 42037) 0.99
es/full/minify/libraries/terser 268076504 ns/iter (± 4162312) 266662071 ns/iter (± 1002195) 1.01
es/full/minify/libraries/three 452956808 ns/iter (± 5265829) 449462158 ns/iter (± 1378415) 1.01
es/full/minify/libraries/typescript 3134313455 ns/iter (± 56536977) 3091999353 ns/iter (± 16728906) 1.01
es/full/minify/libraries/victory 687416192 ns/iter (± 18429659) 685501580 ns/iter (± 3366072) 1.00
es/full/minify/libraries/vue 139847709 ns/iter (± 1916167) 142655535 ns/iter (± 160421) 0.98
es/full/codegen/es3 56453 ns/iter (± 483) 59722 ns/iter (± 168) 0.95
es/full/codegen/es5 56836 ns/iter (± 594) 60367 ns/iter (± 152) 0.94
es/full/codegen/es2015 56700 ns/iter (± 595) 59696 ns/iter (± 244) 0.95
es/full/codegen/es2016 55650 ns/iter (± 606) 59883 ns/iter (± 615) 0.93
es/full/codegen/es2017 56450 ns/iter (± 1191) 59820 ns/iter (± 147) 0.94
es/full/codegen/es2018 57062 ns/iter (± 517) 59737 ns/iter (± 178) 0.96
es/full/codegen/es2019 56846 ns/iter (± 540) 59705 ns/iter (± 111) 0.95
es/full/codegen/es2020 57609 ns/iter (± 757) 59759 ns/iter (± 157) 0.96
es/full/all/es3 158265662 ns/iter (± 2196612) 162207278 ns/iter (± 974205) 0.98
es/full/all/es5 150946433 ns/iter (± 1803391) 155500585 ns/iter (± 1061522) 0.97
es/full/all/es2015 111080753 ns/iter (± 1027116) 114903666 ns/iter (± 548690) 0.97
es/full/all/es2016 110636429 ns/iter (± 804132) 114086887 ns/iter (± 836903) 0.97
es/full/all/es2017 110046596 ns/iter (± 1106751) 113493840 ns/iter (± 579384) 0.97
es/full/all/es2018 107879020 ns/iter (± 1640414) 111126806 ns/iter (± 658617) 0.97
es/full/all/es2019 107710630 ns/iter (± 1631310) 110447439 ns/iter (± 582295) 0.98
es/full/all/es2020 104396842 ns/iter (± 795626) 106325023 ns/iter (± 739385) 0.98
es/full/parser 440543 ns/iter (± 4406) 450507 ns/iter (± 2548) 0.98
es/full/base/fixer 15142 ns/iter (± 170) 15156 ns/iter (± 46) 1.00
es/full/base/resolver_and_hygiene 77364 ns/iter (± 799) 79784 ns/iter (± 377) 0.97
serialization of serde 275 ns/iter (± 4) 271 ns/iter (± 2) 1.01
css/minify/libraries/bootstrap 21846977 ns/iter (± 177134) 21805240 ns/iter (± 748642) 1.00
css/visitor/compare/clone 1395016 ns/iter (± 5220) 1391139 ns/iter (± 5195) 1.00
css/visitor/compare/visit_mut_span 1526837 ns/iter (± 12486) 1513968 ns/iter (± 3959) 1.01
css/visitor/compare/visit_mut_span_panic 1527259 ns/iter (± 35412) 1539821 ns/iter (± 37987) 0.99
css/visitor/compare/fold_span 1995520 ns/iter (± 15757) 2034013 ns/iter (± 8922) 0.98
css/visitor/compare/fold_span_panic 2121009 ns/iter (± 16670) 2167580 ns/iter (± 3092) 0.98
css/lexer/bootstrap_5_1_3 3431135 ns/iter (± 15611) 3478744 ns/iter (± 2642) 0.99
css/lexer/foundation_6_7_4 2837338 ns/iter (± 4398) 2830189 ns/iter (± 7053) 1.00
css/lexer/tailwind_3_1_1 530588 ns/iter (± 3189) 539506 ns/iter (± 622) 0.98
css/parser/bootstrap_5_1_3 15856694 ns/iter (± 89182) 16039698 ns/iter (± 163362) 0.99
css/parser/foundation_6_7_4 12526621 ns/iter (± 81062) 12868358 ns/iter (± 28870) 0.97
css/parser/tailwind_3_1_1 2539267 ns/iter (± 18934) 2532744 ns/iter (± 3220) 1.00
es/codegen/colors 720765 ns/iter (± 394912) 725444 ns/iter (± 405767) 0.99
es/codegen/large 2999314 ns/iter (± 1590342) 2994880 ns/iter (± 1641564) 1.00
es/codegen/with-parser/colors 40905 ns/iter (± 222) 40100 ns/iter (± 270) 1.02
es/codegen/with-parser/large 451466 ns/iter (± 1626) 453689 ns/iter (± 1632) 1.00
es/minify/libraries/antd 1332964960 ns/iter (± 27919459) 1411419713 ns/iter (± 18810671) 0.94
es/minify/libraries/d3 274968977 ns/iter (± 2265789) 281463013 ns/iter (± 3588810) 0.98
es/minify/libraries/echarts 1097947599 ns/iter (± 37183142) 1152574692 ns/iter (± 11469369) 0.95
es/minify/libraries/jquery 81574175 ns/iter (± 227705) 83011448 ns/iter (± 83338) 0.98
es/minify/libraries/lodash 103243472 ns/iter (± 280108) 105299084 ns/iter (± 560808) 0.98
es/minify/libraries/moment 47660639 ns/iter (± 65173) 48467684 ns/iter (± 80112) 0.98
es/minify/libraries/react 16132708 ns/iter (± 21003) 16364801 ns/iter (± 14532) 0.99
es/minify/libraries/terser 214866211 ns/iter (± 934553) 218824418 ns/iter (± 780834) 0.98
es/minify/libraries/three 356024735 ns/iter (± 2609441) 363376615 ns/iter (± 3165635) 0.98
es/minify/libraries/typescript 2625246433 ns/iter (± 15651723) 2775941594 ns/iter (± 15750650) 0.95
es/minify/libraries/victory 537638063 ns/iter (± 4160462) 563209097 ns/iter (± 3494362) 0.95
es/minify/libraries/vue 119690113 ns/iter (± 223975) 121866144 ns/iter (± 226725) 0.98
es/visitor/compare/clone 1715627 ns/iter (± 4652) 1709985 ns/iter (± 7687) 1.00
es/visitor/compare/visit_mut_span 2055909 ns/iter (± 17298) 2059266 ns/iter (± 15301) 1.00
es/visitor/compare/visit_mut_span_panic 2072332 ns/iter (± 19245) 2050785 ns/iter (± 64371) 1.01
es/visitor/compare/fold_span 2769995 ns/iter (± 13710) 2778888 ns/iter (± 4779) 1.00
es/visitor/compare/fold_span_panic 2808859 ns/iter (± 25394) 2809881 ns/iter (± 6475) 1.00
es/lexer/colors 9630 ns/iter (± 53) 9557 ns/iter (± 42) 1.01
es/lexer/angular 5109784 ns/iter (± 39339) 4976403 ns/iter (± 13231) 1.03
es/lexer/backbone 660934 ns/iter (± 1897) 651829 ns/iter (± 2235) 1.01
es/lexer/jquery 3610786 ns/iter (± 3790) 3654357 ns/iter (± 9687) 0.99
es/lexer/jquery mobile 5371184 ns/iter (± 23709) 5422167 ns/iter (± 52123) 0.99
es/lexer/mootools 2838429 ns/iter (± 46525) 2923216 ns/iter (± 4559) 0.97
es/lexer/underscore 560359 ns/iter (± 4277) 540751 ns/iter (± 1020) 1.04
es/lexer/three 16475217 ns/iter (± 163225) 16576943 ns/iter (± 133324) 0.99
es/lexer/yui 3014828 ns/iter (± 6844) 2970310 ns/iter (± 2397) 1.01
es/lexer/cal-com 13609947 ns/iter (± 120596) 13524685 ns/iter (± 76946) 1.01
es/lexer/typescript 93878251 ns/iter (± 915978) 93733081 ns/iter (± 619165) 1.00
es/parser/colors 23651 ns/iter (± 189) 24683 ns/iter (± 171) 0.96
es/parser/angular 12719535 ns/iter (± 245223) 12925141 ns/iter (± 92426) 0.98
es/parser/backbone 1819974 ns/iter (± 6907) 1842188 ns/iter (± 37453) 0.99
es/parser/jquery 10003269 ns/iter (± 105483) 10206370 ns/iter (± 103044) 0.98
es/parser/jquery mobile 15157877 ns/iter (± 91623) 15394432 ns/iter (± 232553) 0.98
es/parser/mootools 7763735 ns/iter (± 16736) 7962656 ns/iter (± 16333) 0.98
es/parser/underscore 1580470 ns/iter (± 5447) 1618100 ns/iter (± 4524) 0.98
es/parser/three 44528741 ns/iter (± 316836) 45016186 ns/iter (± 662576) 0.99
es/parser/yui 7430077 ns/iter (± 81041) 7540374 ns/iter (± 24450) 0.99
es/parser/cal-com 40824546 ns/iter (± 461324) 41631565 ns/iter (± 691116) 0.98
es/parser/typescript 268478551 ns/iter (± 1718811) 275104770 ns/iter (± 1597389) 0.98
es/preset-env/usage/builtin_type 136539 ns/iter (± 34130) 137286 ns/iter (± 33764) 0.99
es/preset-env/usage/property 16091 ns/iter (± 64) 16539 ns/iter (± 86) 0.97
es/resolver/typescript 95252415 ns/iter (± 4055077) 98793435 ns/iter (± 2697920) 0.96
es/fixer/typescript 81597457 ns/iter (± 2335261) 82596805 ns/iter (± 1660267) 0.99
es/hygiene/typescript 183435182 ns/iter (± 1753644) 184252995 ns/iter (± 2796051) 1.00
es/resolver_with_hygiene/typescript 304557110 ns/iter (± 4037891) 304333934 ns/iter (± 3009943) 1.00
es/visitor/base-perf/module_clone 56043 ns/iter (± 367) 56535 ns/iter (± 774) 0.99
es/visitor/base-perf/fold_empty 59776 ns/iter (± 754) 59541 ns/iter (± 706) 1.00
es/visitor/base-perf/fold_noop_impl_all 59706 ns/iter (± 2737) 59560 ns/iter (± 845) 1.00
es/visitor/base-perf/fold_noop_impl_vec 59149 ns/iter (± 799) 59416 ns/iter (± 929) 1.00
es/visitor/base-perf/boxing_boxed_clone 59 ns/iter (± 0) 60 ns/iter (± 0) 0.98
es/visitor/base-perf/boxing_unboxed_clone 46 ns/iter (± 0) 47 ns/iter (± 0) 0.98
es/visitor/base-perf/boxing_boxed 105 ns/iter (± 0) 106 ns/iter (± 0) 0.99
es/visitor/base-perf/boxing_unboxed 84 ns/iter (± 0) 82 ns/iter (± 0) 1.02
es/visitor/base-perf/visit_contains_this 2611 ns/iter (± 12) 2466 ns/iter (± 14) 1.06
es/base/parallel/resolver/typescript 2321903063 ns/iter (± 123855184) 2383433628 ns/iter (± 85302709) 0.97
es/base/parallel/hygiene/typescript 3230364174 ns/iter (± 54516273) 3234067446 ns/iter (± 41014661) 1.00
babelify-only 495505 ns/iter (± 9420) 498658 ns/iter (± 3983) 0.99
parse_and_babelify_angular 40223981 ns/iter (± 2340692) 46189344 ns/iter (± 640623) 0.87
parse_and_babelify_backbone 4319411 ns/iter (± 107545) 4336473 ns/iter (± 166467) 1.00
parse_and_babelify_jquery 28420935 ns/iter (± 522374) 29039604 ns/iter (± 368097) 0.98
parse_and_babelify_jquery_mobile 48319524 ns/iter (± 712028) 50600106 ns/iter (± 1464825) 0.95
parse_and_babelify_mootools 25343442 ns/iter (± 657336) 26715320 ns/iter (± 358754) 0.95
parse_and_babelify_underscore 3617685 ns/iter (± 11337) 3663024 ns/iter (± 12913) 0.99
parse_and_babelify_yui 23814465 ns/iter (± 328723) 25107151 ns/iter (± 222182) 0.95
html/minify/document/css_spec 46834972 ns/iter (± 814620) 46218871 ns/iter (± 289482) 1.01
html/minify/document/github 18545951 ns/iter (± 225035) 18467528 ns/iter (± 218340) 1.00
html/minify/document/stackoverflow 16882211 ns/iter (± 484313) 16754151 ns/iter (± 262711) 1.01
html/minify/document_fragment/css_spec 47001508 ns/iter (± 989634) 44852338 ns/iter (± 99320) 1.05
html/minify/document_fragment/github 18384014 ns/iter (± 235710) 18177841 ns/iter (± 13899) 1.01
html/minify/document_fragment/stackoverflow 16690806 ns/iter (± 251497) 16475730 ns/iter (± 25469) 1.01
html/document/visitor/compare/clone 169047 ns/iter (± 3087) 166851 ns/iter (± 2623) 1.01
html/document/visitor/compare/visit_mut_span 185719 ns/iter (± 1335) 181841 ns/iter (± 2364) 1.02
html/document/visitor/compare/visit_mut_span_panic 194002 ns/iter (± 2393) 189615 ns/iter (± 1848) 1.02
html/document/visitor/compare/fold_span 235240 ns/iter (± 2023) 229442 ns/iter (± 2346) 1.03
html/document/visitor/compare/fold_span_panic 284513 ns/iter (± 1641) 280843 ns/iter (± 1168) 1.01
html/document_fragment/visitor/compare/clone 172094 ns/iter (± 1561) 166031 ns/iter (± 1123) 1.04
html/document_fragment/visitor/compare/visit_mut_span 185864 ns/iter (± 1082) 182132 ns/iter (± 1729) 1.02
html/document_fragment/visitor/compare/visit_mut_span_panic 191858 ns/iter (± 1154) 188410 ns/iter (± 1774) 1.02
html/document_fragment/visitor/compare/fold_span 232674 ns/iter (± 1169) 229166 ns/iter (± 1773) 1.02
html/document_fragment/visitor/compare/fold_span_panic 284206 ns/iter (± 1375) 278658 ns/iter (± 733) 1.02
html/lexer/css_2021_spec 12888828 ns/iter (± 29926) 13004181 ns/iter (± 198817) 0.99
html/lexer/github_com_17_05_2022 4919148 ns/iter (± 9873) 4957108 ns/iter (± 52221) 0.99
html/lexer/stackoverflow_com_17_05_2022 4659555 ns/iter (± 3163) 4728767 ns/iter (± 14554) 0.99
html/parser/parser_document/css_2021_spec 25949986 ns/iter (± 165532) 26079969 ns/iter (± 147958) 1.00
html/parser/parser_document/github_com_17_05_2022 8836780 ns/iter (± 61239) 8774308 ns/iter (± 12870) 1.01
html/parser/parser_document/stackoverflow_com_17_05_2022 7580148 ns/iter (± 32108) 7569720 ns/iter (± 6382) 1.00
html/parser/parser_document_fragment/css_2021_spec 25596158 ns/iter (± 131300) 25765160 ns/iter (± 48901) 0.99
html/parser/parser_document_fragment/github_com_17_05_2022 8593447 ns/iter (± 25278) 8655055 ns/iter (± 21580) 0.99
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022 7453126 ns/iter (± 7854) 7480066 ns/iter (± 9315) 1.00

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

Please sign in to comment.