Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented Aug 18, 2025

Updating the go1.20 branch with the new master.

I pulled master. Then made my changes only in the last commit, Fixing merge conflicts. The changes include:

  • a merge conflict mistake
  • removing native overrides for generics (some which where conflicted)
  • and I added to valueMethodName to fix the TestGrow test just to find out it still wouldn't work when minimized so skipped TestGrow anyway.

Related to #1270

nevkontakte and others added 30 commits July 19, 2024 11:13
(based on commit d15130f)

This special case doesn't seem to serve any purpose that I can discern.
My best guess is that it was necessary at some point, but the compiler
has changed to not need it anymore.

The compiler seems to wrap the returned value in a pointer-type at a
call site as appropriate anyway and defining this method on the value
type doesn't seem correct.
 - Move it into a separate function, similar to
   translateStandaloneFunction().
 - Add some comments explaining quirks of GopherJS's method
   implementation.

(based on commit ccda918)
We haven't been using it since we switched to esbuild for prelude
minification.
Since Node 12 it supports the --enable-source-maps flag, which has been
considered stable since Node 14. Given we are now on 18, we can drop the
unneeded dependency and use the built-in flag.
Remove npm dependencies we don't need anymore
The main change is that we assign explicit names to all function objects
that correspond to Go functions (named and literals). Function name is
declared as `var f = function nameHere() { ... }` and is visible inside
the function scope only. Doing so serves two purposes:

 - It is an identifier which we can use when saving state of a blocked
   function to know which function to call upon resumption.
 - It shows up in the stack trace, which helps distinguish
   similarly-named functions. For methods, we include the receiver type
   in the identifier to make A.String and B.String easily
   distinguishable.

The main trick is that we synthesize names for the function literals,
which are anonymous as far as go/types is concerned. The upstream Go
compiler does something very similar.

(based on commit 4d24395)
JS function names are subtly different from what vanilla Go may expect,
unless gopherjs#1085 is implemented.
It turns out that a combination of
d5771cc and 22c65b8
subtly changes how node outputs stack trace in a way that breaks my
workarounds in the reflect package.

Instead of further fumbling, I am going to disable the offending tests
temporarily, and I have a proper fix for gopherjs#1085 in the works, which will
allow us to re-enable them along with a few other tests.
Final round of refactoring ported from the original generics branch.
Adding more functions to InstanceMap
Adding DCE integration tests in compiler
grantnelson-wf and others added 17 commits June 16, 2025 09:37
DCE update to support nested types
Adding selectors to index handling for generics
[generics] Grouping by declaration kinds and adding $finishSetup
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
[generics] Fixed collecting instances from inverted dependencies
[generics][go1.19] Enable generics and remove overrides for generics
@grantnelson-wf grantnelson-wf changed the base branch from go1.20 to master August 19, 2025 15:04
@grantnelson-wf grantnelson-wf changed the base branch from master to go1.20 August 19, 2025 15:33
@grantnelson-wf grantnelson-wf changed the title [WIP][go1.20] go1.20 branch update to master [go1.20] go1.20 branch update to master Sep 2, 2025
@grantnelson-wf grantnelson-wf marked this pull request as ready for review September 2, 2025 21:24
Copy link
Member

@flimzy flimzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been trying to get through this PR, in bits and pieces, as time permits. But honestly, it's quite a chore, for obvious reasons. I'm going to register my approval, even though I've only gotten through about 10% of the individual files. I think it's probably more important to merge this, then continue reviewing as we make incremental progress, than to try to back-review this mix of other changes.

If there is anything particular you think needs a special look, please feel free to call that out, and I'm happy to review those parts.

@grantnelson-wf grantnelson-wf merged commit 81cc1d7 into gopherjs:go1.20 Sep 10, 2025
10 checks passed
@grantnelson-wf grantnelson-wf deleted the go120Update2 branch September 10, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants