Skip to content

up(semantics): add method to print dot graphs#3542

Closed
DonIsaac wants to merge 2 commits intomainfrom
don/up/semantic/cfg-dot
Closed

up(semantics): add method to print dot graphs#3542
DonIsaac wants to merge 2 commits intomainfrom
don/up/semantic/cfg-dot

Conversation

@DonIsaac
Copy link
Contributor

@DonIsaac DonIsaac commented Jun 5, 2024

What This PR Does

Moves DOT graph creation logic out of SemanticTester and our CFG example and into ControlFlowGraph's API. This logic now lives in ControlFlowGraph::dot().

Why?

  1. This lets us render DOT graphs in the OXC website
  2. Consumers of the oxc crate may want to visualize and debug control flow graphs. This lets them do so easily.

@DonIsaac DonIsaac added C-enhancement Category - New feature or request A-semantic Area - Semantic labels Jun 5, 2024
@DonIsaac DonIsaac self-assigned this Jun 5, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Jun 5, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@DonIsaac DonIsaac requested a review from rzvxa June 5, 2024 16:05
@codspeed-hq
Copy link

codspeed-hq bot commented Jun 5, 2024

CodSpeed Performance Report

Merging #3542 will not alter performance

Comparing don/up/semantic/cfg-dot (6844551) with main (dd42f27)

Summary

✅ 22 untouched benchmarks

@rzvxa
Copy link
Contributor

rzvxa commented Jun 5, 2024

I've added something similar in this series of PRs #3381.
https://github.com/oxc-project/oxc/blob/b92c5f0e353f9a398c4def7fa59f2422fed1969b/crates/oxc_semantic/src/control_flow/dot.rs

I'm really close to finishing this stack so you may want to wait for that(or merge this in before the said stack and I merge them together).

@Boshen
Copy link
Member

Boshen commented Jun 5, 2024

Nice! Let's wait for the cfg stack, it's a tremendous of work 🌹

@Boshen
Copy link
Member

Boshen commented Jun 24, 2024

Closing as stale, feel free to submit another one basing on the current cfg crate.

@Boshen Boshen closed this Jun 24, 2024
@Boshen Boshen deleted the don/up/semantic/cfg-dot branch October 14, 2024 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants