[go1.19] Updating more natives for go1.19 #1264
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updating more natives for go1.19 without generics:
crypto
: It had a copy/paste issue and had to remove the cache. The cache hooks into the GC to clear periodically. I wasn't sure if there was a JS equivalent or if we wanted to use a timer, so I just removed the cache, and now it is treated as if it was always a cache miss.debug/pe
: It had some unsafe pointers for casting one struct into another struct's memory footprint.go/token/position
: Was getting issues with finding most recent file so changed the fix to use*File
directly.hash/maphash
: It had parts from go1.16 which could be updated to match closer to go1.19. It had some new methods,Bytes
andString
, that were using unsafe pointer.reflect
andreflectlite
: It has some minor changes with some notable changes toCap
andLen
to allow for pointers to arrays and tovalueMethodName
to try to get the correct function name.fastrand
and a usage of afastrandu
innet
: Added the otherfastrand
methods (fastrandn
,fastrand64
, andfastrandu
) to the runtime.net/netip
: Just some touchups and skipping a test.sync/atomic
: Skipping some tests.syscall/js
: Tiny cleanupAfter this update go1.19 should be getting very close.