Skip to content

Commit

Permalink
Add initial logic to study algorithms
Browse files Browse the repository at this point in the history
Note the logic requires that Webref data contains algorithm extracts.

The initial logic reports algorithms that run steps in parallel, and that
resolve/reject promises (or fire an event) within these steps without first
queuing a task.

The analysis logic remains very basic but manages to extract the vast majority
of problems that had been manually identified in:
  tidoust/parallel-promise#1

It also reports a few additional problems that had been missed in HTML, WebXR,
Element Capture, Managed Configuration API, Viewport Capture and WebHID.
HTML.

Cases that are not yet detected include:
- indirect problems: when an algorithm step that runs in parallel calls another
algorithm that contain steps that cannot run in parallel
- use of "parallel queue" instead of "in parallel".

Two false positives are currently reported for the Clipboard API and Push API,
the former because "resolve" is used to mean something else, the latter because
"resolve" is used as a condition ("if all promises resolve").
  • Loading branch information
tidoust committed Jul 7, 2024
1 parent 5a09987 commit 5adf1c8
Show file tree
Hide file tree
Showing 4 changed files with 842 additions and 0 deletions.
Loading

0 comments on commit 5adf1c8

Please sign in to comment.