Commit Graph

323 Commits

Author SHA1 Message Date
Kyuuhachi
f2300dadbf
refactor(common): Debug-print spans more compactly (#8746)
**Description:**

`dbg!()` output on ASTs is kinda verbose,

```rs
ExprStmt {
    span: Span {
        lo: BytePos(
            37,
        ),
        hi: BytePos(
            50,
        ),
        ctxt: #0,
    },
    expr: Lit(
        Str(
            Str {
                span: Span {
                    lo: BytePos(
                        37,
                    ),
                    hi: BytePos(
                        49,
                    ),
                    ctxt: #0,
                },
                value: "use strict",
                raw: Some(
                    "\"use strict\"",
                ),
            },
        ),
    ),
}
```

A lot of the space is wasted on spans — 9 lines per span, even though
it's pretty much unimportant cruft. This PR changes that to just one
line per span:

```rs
ExprStmt {
    span: 37..50#0,
    expr: Lit(
        Str(
            Str {
                span: 37..49#0,
                value: "use strict",
                raw: Some(
                    "\"use strict\"",
                ),
            },
        ),
    ),
}
```

While not a statistically meaningful measurement, in my tests (sample
size = 1) this change reduces the `dbg!()` of a 1103-byte script from
5597 to 2885 lines, which is a 48% reduction. In `{:?}` mode it goes
from 40034 to 25457 chars, or 37% reduction.
2024-03-17 13:03:14 +00:00
SWC Bot
31ecd2a6c1 chore: Bump crates 2024-03-14 01:32:37 +00:00
SWC Bot
90aaabaf15 chore: Bump crates 2024-03-06 04:41:56 +00:00
SWC Bot
98aa9824d5 chore: Bump crates 2024-03-04 10:08:47 +00:00
SWC Bot
7a5c7df195 chore: Bump crates 2024-03-04 07:48:09 +00:00
SWC Bot
5dc40d347b chore: Bump crates 2024-03-02 10:24:52 +00:00
SWC Bot
7c5113b6a9 chore: Bump crates 2024-02-22 02:56:23 +00:00
SWC Bot
359ae7a16a chore: Bump crates 2024-02-21 10:22:20 +00:00
SWC Bot
5cab610db1 chore: Bump crates 2024-02-20 01:27:25 +00:00
SWC Bot
906cca43c1 chore: Bump crates 2024-02-08 01:51:17 +00:00
SWC Bot
f7baf240ba chore: Bump crates 2024-02-07 07:25:27 +00:00
SWC Bot
7a3b5545cd chore: Bump crates 2024-02-06 02:47:51 +00:00
SWC Bot
48524e2ae8 chore: Bump crates 2024-02-05 06:34:30 +00:00
SWC Bot
47e7b89a1b chore: Bump crates 2024-02-04 06:19:41 +00:00
SWC Bot
ef21736584 chore: Bump crates 2024-02-02 01:19:28 +00:00
SWC Bot
2d15177ca9 chore: Bump crates 2024-01-23 08:38:01 +00:00
SWC Bot
6210bf19de chore: Bump crates 2024-01-21 03:08:11 +00:00
SWC Bot
1ca0d65c29 chore: Bump crates 2024-01-21 02:34:11 +00:00
SWC Bot
d9a79a0a39 chore: Publish crates 2024-01-04 12:28:02 +00:00
SWC Bot
4e860c988d chore: Publish crates 2024-01-04 04:49:50 +00:00
SWC Bot
8997ed1547 chore: Publish crates 2024-01-04 04:25:54 +00:00
SWC Bot
4229e7b99b chore: Publish crates 2023-12-29 08:49:51 +00:00
SWC Bot
f202a2839f chore: Publish crates 2023-12-12 04:39:47 +00:00
SWC Bot
595f13c019 chore: Publish crates 2023-12-08 07:18:16 +00:00
SWC Bot
0bde652b5c chore: Publish crates 2023-12-08 01:58:57 +00:00
SWC Bot
c6e64148b0 chore: Publish crates 2023-12-03 01:14:41 +00:00
SWC Bot
98c47df37a chore: Publish crates 2023-12-01 20:08:13 +00:00
SWC Bot
e158c0e5a0 chore: Publish crates 2023-11-26 11:37:59 +00:00
SWC Bot
14cd8dda29 chore: Publish crates 2023-11-22 23:25:21 +00:00
SWC Bot
7cec0ac1a0 chore: Publish crates 2023-11-20 22:51:17 +00:00
SWC Bot
38c489c26c chore: Publish crates 2023-11-20 21:59:52 +00:00
SWC Bot
5fa2ed4bfd chore: Publish crates 2023-11-20 06:22:03 +00:00
SWC Bot
c03f84e54e chore: Publish crates 2023-11-15 22:45:18 +00:00
SWC Bot
9c438692c6 chore: Publish crates 2023-11-13 10:03:57 +00:00
SWC Bot
07cc635489 chore: Publish crates 2023-11-11 19:12:50 +00:00
SWC Bot
2ef3de0021 chore: Publish crates 2023-11-10 13:10:36 +00:00
SWC Bot
6383ac443d chore: Publish crates 2023-11-10 12:34:31 +00:00
SWC Bot
2d2ad1e9a1 chore: Publish crates 2023-11-09 03:48:08 +00:00
SWC Bot
2effaf6f43 chore: Publish crates 2023-11-09 01:01:47 +00:00
SWC Bot
4c2547adf2 chore: Publish crates 2023-11-07 09:55:14 +00:00
SWC Bot
a072819859 chore: Publish crates 2023-11-07 08:55:03 +00:00
SWC Bot
09b3003e58 chore: Publish crates 2023-11-07 00:54:18 +00:00
SWC Bot
86e83335eb chore: Publish crates 2023-11-06 10:47:53 +00:00
SWC Bot
f00238d543 chore: Publish crates 2023-11-06 10:00:55 +00:00
SWC Bot
b070ffe425 chore: Publish crates 2023-11-06 05:31:11 +00:00
SWC Bot
48e5c9ad54 chore: Publish crates 2023-11-06 04:18:48 +00:00
SWC Bot
edb46c3c71 chore: Publish crates 2023-11-04 21:49:01 +00:00
SWC Bot
4594a7bea4 chore: Publish crates 2023-11-04 01:37:57 +00:00
SWC Bot
2b35e6c159 chore: Publish crates 2023-11-02 22:20:35 +00:00
SWC Bot
b77d99d4b8 chore: Publish crates 2023-10-30 01:41:47 +00:00