-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: scala/scala3
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main@{1day}
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: scala/scala3
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 11 commits
- 8 files changed
- 1 contributor
Commits on Jun 26, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 6e466de - Browse repository at this point
Copy the full SHA 6e466deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0463b76 - Browse repository at this point
Copy the full SHA 0463b76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6841cd1 - Browse repository at this point
Copy the full SHA 6841cd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74e2b76 - Browse repository at this point
Copy the full SHA 74e2b76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 310e20b - Browse repository at this point
Copy the full SHA 310e20bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f79048 - Browse repository at this point
Copy the full SHA 5f79048View commit details -
Configuration menu - View commit details
-
Copy full SHA for 568b115 - Browse repository at this point
Copy the full SHA 568b115View commit details -
Configuration menu - View commit details
-
Copy full SHA for 545dd69 - Browse repository at this point
Copy the full SHA 545dd69View commit details -
Configuration menu - View commit details
-
Copy full SHA for d614d0b - Browse repository at this point
Copy the full SHA d614d0bView commit details
Commits on Jul 9, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 82c068c - Browse repository at this point
Copy the full SHA 82c068cView commit details
Commits on Jul 11, 2025
-
Fix #23224: Optimize simple tuple extraction (#23373)
Close #23224: This PR optimizes simple tuple extraction by avoiding unnecessary tuple allocations and refines the typing of bind patterns for named tuples. * Optimise `makePatDef` to reduce tuple creation when a pattern uses only simple variables or wildcards. * If the selector of a match has bottom type, use the type from pattern for the bind variable. For example: ```scala def f1: (Int, Int, Int) = (1, 2, 3) def test1 = val (a, b, c) = f1 a + b + c ``` Before this PR: ```scala val $1$: (Int, Int, Int) = this.f1:(Int, Int, Int) @unchecked match { case Tuple3.unapply[Int, Int, Int](a @ _, b @ _, c @ _) => Tuple3.apply[Int, Int, Int](a, b, c) } val a: Int = $1$._1 val b: Int = $1$._2 val c: Int = $1$._3 a + b + c ``` After this PR: ```scala val $2$: (Int, Int, Int) = this.f1:(Int, Int, Int) @unchecked match { case $1$ @ Tuple3.unapply[Int, Int, Int](_, _, _) => $1$:(Int, Int, Int) } val a: Int = $2$._1 val b: Int = $2$._2 val c: Int = $2$._3 a + b + c ``` Also in genBCode now: ```scala val $2$: Tuple3 = matchResult1[Tuple3]: { case val x1: Tuple3 = this.f1():Tuple3 if x1 ne null then { case val $1$: Tuple3 = x1 return[matchResult1] $1$:Tuple3 } else () throw new MatchError(x1) } val a: Int = Int.unbox($2$._1()) val b: Int = Int.unbox($2$._2()) val c: Int = Int.unbox($2$._3()) a + b + c ``` I use the regular expression (`val\s*\(\s*[a-zA-Z_]\w*(\s*,\s*[a-zA-Z_]\w*)*\s*\)\s*=`) to search in the compiler, and found 400+ places which are simple tuple extraction like this.
Configuration menu - View commit details
-
Copy full SHA for 6f35f4a - Browse repository at this point
Copy the full SHA 6f35f4aView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main@{1day}...main