Skip to content

Compute more precise syntactic truthy semantics for comma expressions - #60830

Closed
Mateusz Burzyński (Andarist) wants to merge 2 commits into
microsoft:mainfrom
Andarist:comma-expressions-syntactic-truthy-semantics
Closed

Compute more precise syntactic truthy semantics for comma expressions#60830
Mateusz Burzyński (Andarist) wants to merge 2 commits into
microsoft:mainfrom
Andarist:comma-expressions-syntactic-truthy-semantics

Conversation

@Andarist

@AndaristMateusz Burzyński (Andarist) commented Dec 20, 2024

Copy link
Copy Markdown
Contributor

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 Jake Bailey (@jakebailey)

@Andarist
Mateusz Burzyński (Andarist)force-pushed the comma-expressions-syntactic-truthy-semantics branch from 5ea795b to 170e0aaCompareDecember 20, 2024 23:12
@DanielRosenwasser

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) test it

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 22, 2024

Copy link
Copy Markdown
Contributor

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

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

@typescript-bot

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@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
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@DanielRosenwasser)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3434~~~p=1.000 n=6
Symbols62,36362,363~~~p=1.000 n=6
Types50,39550,395~~~p=1.000 n=6
Memory used193,621k (± 0.78%)194,230k (± 0.96%)~193,005k196,664kp=0.173 n=6
Parse Time1.30s (± 0.69%)1.31s (± 0.89%)~1.29s1.32sp=0.082 n=6
Bind Time0.72s0.72s~~~p=1.000 n=6
Check Time9.80s (± 0.49%)9.79s (± 0.39%)~9.74s9.84sp=0.809 n=6
Emit Time2.73s (± 0.63%)2.73s (± 0.50%)~2.71s2.74sp=0.934 n=6
Total Time14.54s (± 0.34%)14.55s (± 0.26%)~14.48s14.58sp=0.744 n=6
angular-1 - node (v18.15.0, x64)
Errors3737~~~p=1.000 n=6
Symbols947,936947,936~~~p=1.000 n=6
Types410,955410,955~~~p=1.000 n=6
Memory used1,225,818k (± 0.01%)1,225,830k (± 0.00%)~1,225,798k1,225,865kp=0.689 n=6
Parse Time6.63s (± 0.42%)6.64s (± 0.41%)~6.60s6.67sp=1.000 n=6
Bind Time1.89s (± 0.27%)1.89s (± 0.27%)~1.88s1.89sp=1.000 n=6
Check Time32.00s (± 0.28%)32.02s (± 0.52%)~31.74s32.18sp=0.688 n=6
Emit Time15.17s (± 0.42%)15.20s (± 0.49%)~15.13s15.30sp=0.630 n=6
Total Time55.70s (± 0.22%)55.74s (± 0.43%)~55.37s56.01sp=0.573 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,449,2182,449,218~~~p=1.000 n=6
Types896,453896,453~~~p=1.000 n=6
Memory used2,321,022k (± 0.00%)2,321,017k (± 0.00%)~2,320,972k2,321,099kp=0.521 n=6
Parse Time9.42s (± 0.33%)9.42s (± 0.18%)~9.40s9.44sp=0.871 n=6
Bind Time2.23s (± 0.57%)2.24s (± 0.28%)~2.23s2.25sp=0.153 n=6
Check Time73.47s (± 0.51%)73.50s (± 0.75%)~72.82s74.48sp=0.810 n=6
Emit Time0.28s (± 3.53%)0.28s (± 2.26%)~0.27s0.29sp=0.733 n=6
Total Time85.40s (± 0.46%)85.44s (± 0.64%)~84.78s86.42sp=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,226,8801,226,880~~~p=1.000 n=6
Types266,745266,745~~~p=1.000 n=6
Memory used2,845,923k (±13.20%)2,966,772k (±10.00%)~2,360,588k3,088,829kp=1.000 n=6
Parse Time6.75s (± 2.23%)6.80s (± 0.99%)~6.69s6.86sp=0.689 n=6
Bind Time2.15s (± 0.64%)2.13s (± 0.97%)~2.11s2.17sp=0.198 n=6
Check Time43.00s (± 0.49%)42.92s (± 0.54%)~42.69s43.32sp=0.575 n=6
Emit Time3.50s (± 4.37%)3.55s (± 1.70%)~3.49s3.63sp=0.378 n=6
Total Time55.39s (± 0.49%)55.41s (± 0.36%)~55.21s55.77sp=0.810 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,226,8801,226,880~~~p=1.000 n=6
Types266,745266,745~~~p=1.000 n=6
Memory used2,912,333k (±12.85%)3,032,987k (± 9.77%)~2,427,649k3,154,399kp=0.575 n=6
Parse Time6.93s (± 2.07%)6.95s (± 1.56%)~6.76s7.05sp=0.936 n=6
Bind Time2.15s (± 2.15%)2.16s (± 1.43%)~2.11s2.20sp=0.936 n=6
Check Time42.69s (± 0.42%)42.76s (± 0.38%)~42.43s42.88sp=0.298 n=6
Emit Time3.44s (± 2.06%)3.47s (± 3.06%)~3.35s3.59sp=0.748 n=6
Total Time55.22s (± 0.57%)55.36s (± 0.36%)~55.01s55.59sp=0.173 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols262,439262,439~~~p=1.000 n=6
Types106,628106,628~~~p=1.000 n=6
Memory used440,058k (± 0.01%)440,106k (± 0.02%)~439,997k440,281kp=0.521 n=6
Parse Time2.88s (± 0.64%)2.88s (± 0.86%)~2.85s2.92sp=0.803 n=6
Bind Time1.10s1.10s~~~p=1.000 n=6
Check Time15.73s (± 0.13%)15.77s (± 0.18%)+0.04s (+ 0.28%)15.74s15.81sp=0.019 n=6
Emit Time1.30s (± 1.05%)1.29s (± 0.80%)~1.28s1.30sp=0.931 n=6
Total Time21.00s (± 0.13%)21.05s (± 0.18%)~21.00s21.09sp=0.063 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors7070~~~p=1.000 n=6
Symbols226,062226,062~~~p=1.000 n=6
Types94,48894,488~~~p=1.000 n=6
Memory used371,597k (± 0.02%)371,587k (± 0.02%)~371,508k371,671kp=0.810 n=6
Parse Time2.92s (± 0.56%)2.88s (± 0.97%)~2.85s2.93sp=0.076 n=6
Bind Time1.60s (± 1.00%)1.60s (± 1.84%)~1.57s1.65sp=0.460 n=6
Check Time16.50s (± 0.42%)16.56s (± 0.56%)~16.47s16.68sp=0.336 n=6
Emit Time0.00s0.00s (±244.70%)~0.00s0.01sp=0.405 n=6
Total Time21.01s (± 0.44%)21.05s (± 0.47%)~20.95s21.14sp=0.377 n=6
vscode - node (v18.15.0, x64)
Errors33~~~p=1.000 n=6
Symbols3,230,4323,230,432~~~p=1.000 n=6
Types1,112,1131,112,113~~~p=1.000 n=6
Memory used3,294,680k (± 0.01%)3,294,902k (± 0.01%)~3,294,436k3,295,246kp=0.298 n=6
Parse Time14.19s (± 0.34%)14.14s (± 0.81%)~14.03s14.34sp=0.198 n=6
Bind Time4.53s (± 0.48%)4.54s (± 0.40%)~4.52s4.56sp=0.511 n=6
Check Time88.63s (± 1.97%)90.47s (± 3.03%)~87.35s94.58sp=0.520 n=6
Emit Time27.54s (± 8.22%)26.16s (± 9.72%)~22.91s28.99sp=0.173 n=6
Total Time134.90s (± 0.86%)135.31s (± 1.45%)~132.73s137.84sp=0.689 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols291,562291,562~~~p=1.000 n=6
Types118,971118,971~~~p=1.000 n=6
Memory used445,358k (± 0.02%)445,280k (± 0.03%)~445,129k445,463kp=0.230 n=6
Parse Time5.13s (± 0.49%)5.12s (± 1.06%)~5.05s5.20sp=0.573 n=6
Bind Time2.21s (± 0.92%)2.20s (± 0.73%)~2.18s2.23sp=0.446 n=6
Check Time23.31s (± 0.52%)23.33s (± 0.62%)~23.21s23.61sp=0.748 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time30.65s (± 0.45%)30.66s (± 0.38%)~30.56s30.84sp=1.000 n=6
xstate-main - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols555,017555,017~~~p=1.000 n=6
Types186,115186,115~~~p=1.000 n=6
Memory used493,979k (± 0.02%)493,970k (± 0.03%)~493,736k494,091kp=0.936 n=6
Parse Time3.41s (± 0.63%)3.40s (± 0.78%)~3.38s3.45sp=0.623 n=6
Bind Time1.16s (± 0.94%)1.17s (± 0.94%)~1.16s1.18sp=0.227 n=6
Check Time19.67s (± 1.20%)19.62s (± 1.30%)~19.39s20.12sp=0.423 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.25s (± 1.01%)24.19s (± 1.09%)~23.93s24.69sp=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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

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

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Status: Done

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

4 participants

@Andarist@DanielRosenwasser@typescript-bot@RyanCavanaugh