master
Commits on Oct 14, 2021
-
Merge pull request #1075 from nevkontakte/master
sync/atomic: remove an unused type of code.
-
sync/atomic: remove an unused type of code.
This is a leftover from an earlier attempt at low-level type comparison, and is not used now. Additionally, it cases an error when used together with a content security policy that disallows unsafe-eval.
Commits on Oct 4, 2021
-
Merge pull request #1071 from nevkontakte/issue-575
Fix two classes of "unreachable code" warnings in Firefox.
Commits on Oct 3, 2021
-
Improve detection of the last return statement in a statement list.
The improved check is able to detect cases when the return statement is wrapped in another statement, but is effectively the last executed statement in a list, for example: ```go func withGoto() (resultType, error) { // Do something. return result, nil Error: return nil, err // This is inside an *ast.LabeledStmt! } func withBlock() resultType { // Do something. { // Do more. return result // This is inside a *ast.BlockStmt! } } ``` Better detection prevents generation of unnecessary return statements at the end of a function (marginally smaller output size), as well as prevents "unreachable code" warnings in Firefox (#575, #1069).
-
Eliminate an unreachable statement at the end of a flattened loop.
When GopherJS flattens a loop into a while-switch-case construct, it needs to generate an instruction to go back to the beginning of the loop after the last statement of the loop body. However, when the last statement is a control statement itself (return, continue, break, goto), this instruction becomes unnecessary and unreachable. Example Go code: ```go func foo() { for { // Do something break } } ``` This change prevents such an instruction from being generated. This has a marginal artifact size reduction (1632 bytes on todomvc), but also eliminates a warning Firefox prints in the console, which may be confusing to users (#1069, #575).
Commits on Oct 2, 2021
-
Merge pull request #1070 from nevkontakte/master
Preserve position information for top-level variable declarations.
-
Preserve position information for top-level variable declarations.
This allows sourcemap to be generated for top-level variable declarations with initializer, for example: ```go var x = initX() ``` This is particularly helpful when debugging panics in such initializers.
Commits on Sep 29, 2021
-
Merge pull request #1068 from tsavola/react-native
Support environments without process.argv
-
-
Work around undefined process.argv
React Native has process object but it doesn't contain argv.
Commits on Sep 23, 2021
-
Merge pull request #1067 from gopherjs/readme-survey
Add "Help us make GopherJS better" section into the README.
-
Add "Help us make GopherJS better" section into the README.
Mainly I'd like to advertise the user survey more broadly to folks who are not following us in Twitter or Slack, but also list a few other ways to contribute to the project while I'm at it.
Commits on Sep 18, 2021
-
-
Merge pull request #1066 from nevkontakte/wip-go1.17
Un-skip a few tests from crypto libraries.
-
-
Reduce the number of quickcheck iterations for edwards25519.
This isn't really sufficient to test the implementation correctness perfectly, but it is a sufficient smoke test for GopherJS, and it cuts the test runtime substantially.
-
Merge pull request #1065 from nevkontakte/wip-go1.17
runtime: Version() returns Go version provided by the compiler.
-
-
-
runtime: Version() returns Go version provided by the compiler.
This change improves Go version detection for the provided GOROOT by falling back to `go version` command output if VERSION file doesn't exist (fixes #1018). If GOROOT-based version detection failed, it falls back further to the Go version from GopherJS release or a minor version in "go1.x" format. The detected value is then injected by the compiler into the generated JS file and picked up by the `runtime` package.
-
Merge pull request #1064 from nevkontakte/wip-go1.17
Resolve the two remaining gorepo test failures.
Commits on Sep 17, 2021
-
Mark
fixedbugs/issue23017.go
as a known failure.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. #1063 tracks this bug.
-
Fix compiler panic when assigning to a named pointer type.
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`.
-
-
Fix PkgPath of the unsafe.Pointer type.
This fixes golang/go#44830 for GopherJS.
-
Merge pull request #1061 from nevkontakte/wip-go1.17
Fix standard library test failures in `internal` packages.
-
-
Fix internal/poll package for Go 1.17.
The fix is two-fold: 1. `disableSplice` is initialized with `(*bool)(nil)` to work around #1060. 2. Skipped `TestSplicePipePool`, which relies in runtime features GopherJS doesn't support.
-
Ignore tests for internal/abi package.
This package seems to be related to the new register-based ABI in Go 1.17, which is completely irrelevant for GopherJS.
-
Merge pull request #1059 from gopherjs/hashmap
Get `hash/maphash` to work again
-
Get
hash/maphash
to work againThis pulls in a few select functions from Go 1.16, which were optimized and thus made unsafe in Go 1.17. golang/go#47342 should render this change obsolete if/when implemented.
Commits on Sep 15, 2021
-
Merge pull request #1058 from nevkontakte/wip-go1.17
sync/atomic: Implement new Swap and CompareAndSwap methods of Value.