Skip to content

Go1.16 support for several more stdlib packages #992

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 6 commits into from
Mar 9, 2021

Conversation

nevkontakte
Copy link
Member

I'm slowly working towards making gopherjs test run. With this PR it is able to compile tests, but it fails at runtime because I haven't updated support reflectlite yet.

Packages covered in this PR:

  • math
  • sync
  • time
  • os
  • internal/syscall/unix

Issue #989.

nevkontakte and others added 5 commits March 7, 2021 22:55
Go 1.13 introduced two more low-level fields that would've been
referenced by essentially dead code, so I decided to replace original
pool.go entirely. As a byproduct, this might yield a tiny decrease in
output size (assuming DCE hasn't been pruning the unexported methods
away already).
math.FMA() implementation introduced a non-exported function zero(),
which conflicted with out own variable. Resolved the conflict by
renaming our variable.

Original commit by @visualfc: goplusjs/gopherjs@ad4d281
Looks like a few new functions were added to the package, with a few new
constants. Neither of them are really relevant in the JS context and
arguably we shouldn't be compiling this code in the first place (see
issue gopherjs#991), but this lets the package compile for now.
I'm not sure of the role of the seq field plays outside of the time
package, but I'll add it there. In the upstream code the runtimeTimer
struct seems to replicate (and require to be compatible with)
runtime.timer struct, however in GopherJS it is clearly not and it
doesn't seem to be a problem.

Similarly, in the upstream startTimer, stopTimer, resetTimer and
modTimer are actually implemented in the `runtime` package, but since we
already re-implemented two of them here, I'll just keep this package
self-contained.
@nevkontakte nevkontakte requested a review from flimzy March 8, 2021 19:03
Co-authored-by: Jonathan Hall <flimzy@flimzy.com>
@nevkontakte nevkontakte merged commit e406c3a into gopherjs:go1.16-stdlib Mar 9, 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.

3 participants