Skip to content

Resolve the two remaining gorepo test failures. #1064

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

Merged
merged 4 commits into from
Sep 18, 2021

Conversation

nevkontakte
Copy link
Member

  • Fixed issue 44830: specify the correct package path for the basic unsafe.Pointer type.
  • Skipped issue 23017: this is a legitimate bug in GopherJS compiler, but I can't think of an easy fix for it at the moment.

In the following example type T is *types.Named, not *types.Pointer, but
the underlying type is:

```go
type T *struct{ y int }
var q T = &struct{ y int }{}
q.y = 7
```

The panic was detected by gorepo test `fixedbugs/issue23017.go`.
GopherJS breaks lhs expression evaluation order defined by the spec.
Unfortunately, it's not easy to fix and would likely generate a lot more
code for multi-assignments.

An efficient fix would require writing some sort of analysis to
determine if assignments are likely to influence each other, and at the
moment I can't think of how such analysis would work. Without it we
would have to create a whole bunch of extra temporary variables for any
multi-assignment, which will likely lead to a significant increase in
the artifact size. Considering nobody reported this issue so far, I'm
inclined to punt on this issue for now.

gopherjs#1063 tracks this bug.
@nevkontakte nevkontakte requested a review from flimzy September 17, 2021 23:10
@nevkontakte nevkontakte merged commit f7183f9 into gopherjs:wip-go1.17 Sep 18, 2021
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.

2 participants