Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute more precise syntactic truthy semantics for comma expressions #60830

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Dec 20, 2024

closes #60822

given the same thing was merged for syntactic nullish semantics (and its corresponding issue was accepted beforehand), I think it only makes sense to handle this for truthy semantics as well for consistency, cc @jakebailey

@Andarist Andarist force-pushed the comma-expressions-syntactic-truthy-semantics branch from 5ea795b to 170e0aa Compare December 20, 2024 23:12
@DanielRosenwasser
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 22, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser Here are the results of running the user tests with tsc comparing main and refs/pull/60830/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

Hey @DanielRosenwasser, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,363 62,363 ~ ~ ~ p=1.000 n=6
Types 50,395 50,395 ~ ~ ~ p=1.000 n=6
Memory used 193,621k (± 0.78%) 194,230k (± 0.96%) ~ 193,005k 196,664k p=0.173 n=6
Parse Time 1.30s (± 0.69%) 1.31s (± 0.89%) ~ 1.29s 1.32s p=0.082 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.80s (± 0.49%) 9.79s (± 0.39%) ~ 9.74s 9.84s p=0.809 n=6
Emit Time 2.73s (± 0.63%) 2.73s (± 0.50%) ~ 2.71s 2.74s p=0.934 n=6
Total Time 14.54s (± 0.34%) 14.55s (± 0.26%) ~ 14.48s 14.58s p=0.744 n=6
angular-1 - node (v18.15.0, x64)
Errors 37 37 ~ ~ ~ p=1.000 n=6
Symbols 947,936 947,936 ~ ~ ~ p=1.000 n=6
Types 410,955 410,955 ~ ~ ~ p=1.000 n=6
Memory used 1,225,818k (± 0.01%) 1,225,830k (± 0.00%) ~ 1,225,798k 1,225,865k p=0.689 n=6
Parse Time 6.63s (± 0.42%) 6.64s (± 0.41%) ~ 6.60s 6.67s p=1.000 n=6
Bind Time 1.89s (± 0.27%) 1.89s (± 0.27%) ~ 1.88s 1.89s p=1.000 n=6
Check Time 32.00s (± 0.28%) 32.02s (± 0.52%) ~ 31.74s 32.18s p=0.688 n=6
Emit Time 15.17s (± 0.42%) 15.20s (± 0.49%) ~ 15.13s 15.30s p=0.630 n=6
Total Time 55.70s (± 0.22%) 55.74s (± 0.43%) ~ 55.37s 56.01s p=0.573 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,449,218 2,449,218 ~ ~ ~ p=1.000 n=6
Types 896,453 896,453 ~ ~ ~ p=1.000 n=6
Memory used 2,321,022k (± 0.00%) 2,321,017k (± 0.00%) ~ 2,320,972k 2,321,099k p=0.521 n=6
Parse Time 9.42s (± 0.33%) 9.42s (± 0.18%) ~ 9.40s 9.44s p=0.871 n=6
Bind Time 2.23s (± 0.57%) 2.24s (± 0.28%) ~ 2.23s 2.25s p=0.153 n=6
Check Time 73.47s (± 0.51%) 73.50s (± 0.75%) ~ 72.82s 74.48s p=0.810 n=6
Emit Time 0.28s (± 3.53%) 0.28s (± 2.26%) ~ 0.27s 0.29s p=0.733 n=6
Total Time 85.40s (± 0.46%) 85.44s (± 0.64%) ~ 84.78s 86.42s p=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,880 1,226,880 ~ ~ ~ p=1.000 n=6
Types 266,745 266,745 ~ ~ ~ p=1.000 n=6
Memory used 2,845,923k (±13.20%) 2,966,772k (±10.00%) ~ 2,360,588k 3,088,829k p=1.000 n=6
Parse Time 6.75s (± 2.23%) 6.80s (± 0.99%) ~ 6.69s 6.86s p=0.689 n=6
Bind Time 2.15s (± 0.64%) 2.13s (± 0.97%) ~ 2.11s 2.17s p=0.198 n=6
Check Time 43.00s (± 0.49%) 42.92s (± 0.54%) ~ 42.69s 43.32s p=0.575 n=6
Emit Time 3.50s (± 4.37%) 3.55s (± 1.70%) ~ 3.49s 3.63s p=0.378 n=6
Total Time 55.39s (± 0.49%) 55.41s (± 0.36%) ~ 55.21s 55.77s p=0.810 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,880 1,226,880 ~ ~ ~ p=1.000 n=6
Types 266,745 266,745 ~ ~ ~ p=1.000 n=6
Memory used 2,912,333k (±12.85%) 3,032,987k (± 9.77%) ~ 2,427,649k 3,154,399k p=0.575 n=6
Parse Time 6.93s (± 2.07%) 6.95s (± 1.56%) ~ 6.76s 7.05s p=0.936 n=6
Bind Time 2.15s (± 2.15%) 2.16s (± 1.43%) ~ 2.11s 2.20s p=0.936 n=6
Check Time 42.69s (± 0.42%) 42.76s (± 0.38%) ~ 42.43s 42.88s p=0.298 n=6
Emit Time 3.44s (± 2.06%) 3.47s (± 3.06%) ~ 3.35s 3.59s p=0.748 n=6
Total Time 55.22s (± 0.57%) 55.36s (± 0.36%) ~ 55.01s 55.59s p=0.173 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,439 262,439 ~ ~ ~ p=1.000 n=6
Types 106,628 106,628 ~ ~ ~ p=1.000 n=6
Memory used 440,058k (± 0.01%) 440,106k (± 0.02%) ~ 439,997k 440,281k p=0.521 n=6
Parse Time 2.88s (± 0.64%) 2.88s (± 0.86%) ~ 2.85s 2.92s p=0.803 n=6
Bind Time 1.10s 1.10s ~ ~ ~ p=1.000 n=6
Check Time 15.73s (± 0.13%) 15.77s (± 0.18%) +0.04s (+ 0.28%) 15.74s 15.81s p=0.019 n=6
Emit Time 1.30s (± 1.05%) 1.29s (± 0.80%) ~ 1.28s 1.30s p=0.931 n=6
Total Time 21.00s (± 0.13%) 21.05s (± 0.18%) ~ 21.00s 21.09s p=0.063 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 70 70 ~ ~ ~ p=1.000 n=6
Symbols 226,062 226,062 ~ ~ ~ p=1.000 n=6
Types 94,488 94,488 ~ ~ ~ p=1.000 n=6
Memory used 371,597k (± 0.02%) 371,587k (± 0.02%) ~ 371,508k 371,671k p=0.810 n=6
Parse Time 2.92s (± 0.56%) 2.88s (± 0.97%) ~ 2.85s 2.93s p=0.076 n=6
Bind Time 1.60s (± 1.00%) 1.60s (± 1.84%) ~ 1.57s 1.65s p=0.460 n=6
Check Time 16.50s (± 0.42%) 16.56s (± 0.56%) ~ 16.47s 16.68s p=0.336 n=6
Emit Time 0.00s 0.00s (±244.70%) ~ 0.00s 0.01s p=0.405 n=6
Total Time 21.01s (± 0.44%) 21.05s (± 0.47%) ~ 20.95s 21.14s p=0.377 n=6
vscode - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 3,230,432 3,230,432 ~ ~ ~ p=1.000 n=6
Types 1,112,113 1,112,113 ~ ~ ~ p=1.000 n=6
Memory used 3,294,680k (± 0.01%) 3,294,902k (± 0.01%) ~ 3,294,436k 3,295,246k p=0.298 n=6
Parse Time 14.19s (± 0.34%) 14.14s (± 0.81%) ~ 14.03s 14.34s p=0.198 n=6
Bind Time 4.53s (± 0.48%) 4.54s (± 0.40%) ~ 4.52s 4.56s p=0.511 n=6
Check Time 88.63s (± 1.97%) 90.47s (± 3.03%) ~ 87.35s 94.58s p=0.520 n=6
Emit Time 27.54s (± 8.22%) 26.16s (± 9.72%) ~ 22.91s 28.99s p=0.173 n=6
Total Time 134.90s (± 0.86%) 135.31s (± 1.45%) ~ 132.73s 137.84s p=0.689 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 291,562 291,562 ~ ~ ~ p=1.000 n=6
Types 118,971 118,971 ~ ~ ~ p=1.000 n=6
Memory used 445,358k (± 0.02%) 445,280k (± 0.03%) ~ 445,129k 445,463k p=0.230 n=6
Parse Time 5.13s (± 0.49%) 5.12s (± 1.06%) ~ 5.05s 5.20s p=0.573 n=6
Bind Time 2.21s (± 0.92%) 2.20s (± 0.73%) ~ 2.18s 2.23s p=0.446 n=6
Check Time 23.31s (± 0.52%) 23.33s (± 0.62%) ~ 23.21s 23.61s p=0.748 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 30.65s (± 0.45%) 30.66s (± 0.38%) ~ 30.56s 30.84s p=1.000 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 555,017 555,017 ~ ~ ~ p=1.000 n=6
Types 186,115 186,115 ~ ~ ~ p=1.000 n=6
Memory used 493,979k (± 0.02%) 493,970k (± 0.03%) ~ 493,736k 494,091k p=0.936 n=6
Parse Time 3.41s (± 0.63%) 3.40s (± 0.78%) ~ 3.38s 3.45s p=0.623 n=6
Bind Time 1.16s (± 0.94%) 1.17s (± 0.94%) ~ 1.16s 1.18s p=0.227 n=6
Check Time 19.67s (± 1.20%) 19.62s (± 1.30%) ~ 19.39s 20.12s p=0.423 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.25s (± 1.01%) 24.19s (± 1.09%) ~ 23.93s 24.69s p=0.630 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser Here are the results of running the top 400 repos with tsc comparing main and refs/pull/60830/merge:

Everything looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

if-statements allow multiple arguments and don't check for constant conditions after the first argument
3 participants