Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_parser): improve yield parsing in non generator function #3622

Merged
merged 2 commits into from
Nov 14, 2022
Merged

fix(rome_js_parser): improve yield parsing in non generator function #3622

merged 2 commits into from
Nov 14, 2022

Conversation

95th
Copy link
Contributor

@95th 95th commented Nov 9, 2022

Summary

improve yield parsing in non generator function

Test Plan

Added tests cases.

@netlify
Copy link

netlify bot commented Nov 9, 2022

Deploy Preview for docs-rometools failed.

Name Link
🔨 Latest commit 5b5b1ed
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/636bde25a02685000a018f71

@MichaReiser
Copy link
Contributor

!bench_parser

Copy link
Contributor

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Very nice!

I think there's a possibility to remove the need for a checkpoint to remove the overhead of cloning the parser state.

crates/rome_js_parser/src/syntax/expr.rs Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Nov 9, 2022

Parser Benchmark Results

group                                 main                                   pr
-----                                 ----                                   --
parser/checker.ts                     1.00    143.2±6.38ms    18.1 MB/sec    1.00    142.7±6.64ms    18.2 MB/sec
parser/compiler.js                    1.05     83.9±5.74ms    12.5 MB/sec    1.00     79.7±5.11ms    13.1 MB/sec
parser/d3.min.js                      1.00     48.6±3.16ms     5.4 MB/sec    1.03     50.0±2.54ms     5.2 MB/sec
parser/dojo.js                        1.10      4.1±0.29ms    16.8 MB/sec    1.00      3.7±0.16ms    18.4 MB/sec
parser/ios.d.ts                       1.00    121.7±6.95ms    15.3 MB/sec    1.00    121.4±6.17ms    15.4 MB/sec
parser/jquery.min.js                  1.00     11.7±0.57ms     7.1 MB/sec    1.07     12.5±0.76ms     6.6 MB/sec
parser/math.js                        1.00     98.6±7.70ms     6.6 MB/sec    1.08    106.6±6.70ms     6.1 MB/sec
parser/parser.ts                      1.01      2.7±0.13ms    18.1 MB/sec    1.00      2.7±0.12ms    18.3 MB/sec
parser/pixi.min.js                    1.00     63.0±5.77ms     7.0 MB/sec    1.02     64.2±4.56ms     6.8 MB/sec
parser/react-dom.production.min.js    1.00     15.9±0.85ms     7.2 MB/sec    1.03     16.4±0.97ms     7.0 MB/sec
parser/react.production.min.js        1.00   811.2±48.17µs     7.6 MB/sec    1.01   820.7±43.68µs     7.5 MB/sec
parser/router.ts                      1.00      2.2±0.12ms    27.7 MB/sec    1.00      2.2±0.11ms    27.7 MB/sec
parser/tex-chtml-full.js              1.00    135.0±7.08ms     6.8 MB/sec    1.02    138.1±6.77ms     6.6 MB/sec
parser/three.min.js                   1.00     69.3±3.66ms     8.5 MB/sec    1.03     71.3±3.67ms     8.2 MB/sec
parser/typescript.js                  1.00   570.8±19.26ms    16.6 MB/sec    1.01   579.3±20.77ms    16.4 MB/sec
parser/vue.global.prod.js             1.00     19.9±1.15ms     6.1 MB/sec    1.02     20.3±1.52ms     5.9 MB/sec

@MichaReiser
Copy link
Contributor

!bench_parser

@MichaReiser MichaReiser added this to the 11.0.0 milestone Nov 9, 2022
@MichaReiser MichaReiser added L-JavaScript Langauge: JavaScript A-Parser Area: parser labels Nov 9, 2022
@github-actions
Copy link

github-actions bot commented Nov 9, 2022

Parser Benchmark Results

group                                 main                                   pr
-----                                 ----                                   --
parser/checker.ts                     1.00    126.5±1.92ms    20.6 MB/sec    1.00    126.4±1.34ms    20.6 MB/sec
parser/compiler.js                    1.02     75.7±0.88ms    13.8 MB/sec    1.00     74.1±0.86ms    14.2 MB/sec
parser/d3.min.js                      1.02     45.5±0.39ms     5.8 MB/sec    1.00     44.8±0.27ms     5.9 MB/sec
parser/dojo.js                        1.01      3.7±0.01ms    18.7 MB/sec    1.00      3.6±0.03ms    18.9 MB/sec
parser/ios.d.ts                       1.00    108.4±1.47ms    17.2 MB/sec    1.01    109.3±1.26ms    17.1 MB/sec
parser/jquery.min.js                  1.02     11.4±0.07ms     7.2 MB/sec    1.00     11.2±0.05ms     7.4 MB/sec
parser/math.js                        1.01     89.0±0.62ms     7.3 MB/sec    1.00     88.1±0.61ms     7.4 MB/sec
parser/parser.ts                      1.00      2.6±0.00ms    18.7 MB/sec    1.00      2.6±0.01ms    18.6 MB/sec
parser/pixi.min.js                    1.02     56.9±0.65ms     7.7 MB/sec    1.00     55.9±0.67ms     7.9 MB/sec
parser/react-dom.production.min.js    1.03     15.7±0.15ms     7.4 MB/sec    1.00     15.3±0.12ms     7.5 MB/sec
parser/react.production.min.js        1.00    788.3±1.74µs     7.8 MB/sec    1.00    787.6±1.99µs     7.8 MB/sec
parser/router.ts                      1.00      2.1±0.00ms    28.4 MB/sec    1.00      2.1±0.00ms    28.5 MB/sec
parser/tex-chtml-full.js              1.00    120.3±0.97ms     7.6 MB/sec    1.00    120.0±1.14ms     7.6 MB/sec
parser/three.min.js                   1.02     62.5±0.46ms     9.4 MB/sec    1.00     61.4±0.39ms     9.6 MB/sec
parser/typescript.js                  1.01    501.7±5.10ms    18.9 MB/sec    1.00    497.1±3.35ms    19.1 MB/sec
parser/vue.global.prod.js             1.04     19.6±0.24ms     6.2 MB/sec    1.00     18.8±0.22ms     6.4 MB/sec

@MichaReiser MichaReiser merged commit 1bcaec4 into rome:main Nov 14, 2022
jeysal added a commit to jeysal/rometools that referenced this pull request Nov 14, 2022
* upstream/main: (45 commits)
  website(docs): set `color-scheme` on the root element (rome#3721)
  feat(rome_analyze): add a warning for unused suppression comments (rome#3718)
  feat(rome_js_analyze): Implement prefer-numeric-literals lint (rome#3558)
  feat(rome_js_formatter): jestEach template literals rome#3308 (rome#3582)
  doc(website): Add context about Romes philosophy (rome#3714)
  fix(rome_js_formatter): Single-line comment below a JSX prop triggers… (rome#3641)
  test(rome_js_formatter): update prettier tests (rome#3684)
  fix(rome_js_parser): improve await handling in non-async context (rome#3573)
  fix(rome_js_parser): improve yield parsing in non generator function (rome#3622)
  More playground polish
  Fix backgrounds
  Fix height
  Align docs.rome.tools with rome.tools
  Reenable compression
  Add missing width
  website(docs): More playground IDE features (rome#3711)
  fix(rome_js_formatter): new expression attribute (rome#3686)
  docs(website): added checkbox to toggle linter in playground (rome#3699)
  website(docs): More website tweaks (rome#3707)
  website(docs): Add default layout property (rome#3705)
  ...
@95th 95th deleted the yield_without_generator branch November 19, 2022 08:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Parser Area: parser L-JavaScript Langauge: JavaScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants