forked from golang/go
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Keep up #3
Merged
Merged
Keep up #3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When syntax.Parse returns error, noder.file will be nil. Currently, we continue accessing it regardlessly and depend on gc.hidePanic to hide the panic from user. Instead, we should gracefully handle the error in LoadPackage, then exit earlier if any error occurred. Updates #43311 Change-Id: I0a108ef360bd4f0cc9f481071b8967355e1513af Reviewed-on: https://go-review.googlesource.com/c/go/+/294030 Trust: Cuong Manh Le <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
That's an invalid operation and depend on gc.hidePanic to report error. Updates #43311 Change-Id: I78d615c40ab1e7887f612491e215c1c2bb758ef6 Reviewed-on: https://go-review.googlesource.com/c/go/+/294031 Trust: Cuong Manh Le <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
While at it, also remove checkassignlist, which is not used. For #43311 Change-Id: Ie7ed81f68080d8881fca6035da64a9755f2cb555 Reviewed-on: https://go-review.googlesource.com/c/go/+/294032 Trust: Cuong Manh Le <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
That's an invalid operation and depend on gc.hidePanic to report error. Updates #43311 Change-Id: Ib0761dcf4d9d2a23c41de7eff0376677a90b942e Reviewed-on: https://go-review.googlesource.com/c/go/+/294033 Trust: Cuong Manh Le <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
After CL 272654, the compiler now use go/constant.Value to represent constant nodes. That makes ir.ConstantValue requires node type to correctly return value for untyped int node. But untyped int node can have nil type after typechecked, e.g: using int value as key for map[string]int, that makes the compiler crashes. To fix it, just don't add the invalid key to constSet, since when it's not important to report duplicated keys when they aren't valid. For #43311 Fixes #44432 Change-Id: I44d8f2b95f5cb339e77e8a705a94bcb16e62beb9 Reviewed-on: https://go-review.googlesource.com/c/go/+/294034 Trust: Cuong Manh Le <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
Otherwise, if -d=panic was set, check2 will treat already reported error as internal compiler error. For #43311 Fixes #44445 Change-Id: I5dbe06334666df21d9107396b9dcfdd905aa1e44 Reviewed-on: https://go-review.googlesource.com/c/go/+/294850 Trust: Cuong Manh Le <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
Morestack works for non-pointer register parameters Within a function body, pointer-typed parameters are correctly tracked. Results still not hooked up. For #40724. Change-Id: Icaee0b51d0da54af983662d945d939b756088746 Reviewed-on: https://go-review.googlesource.com/c/go/+/294410 Trust: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
Verified with test and with single step watching changes to register values across morestack calls, after reload. Also added stack-growth test with pointer parameters of varying lifetime. For #40724. Change-Id: Idb5fe27786ac5c6665a734d41e68d3d39de2f4da Reviewed-on: https://go-review.googlesource.com/c/go/+/294429 Trust: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> Reviewed-by: Jeremy Faller <[email protected]>
Change-Id: Ib44729ffb5d4d7b84114dcf028b7e0418c9d5035 GitHub-Last-Rev: 13f59a6 GitHub-Pull-Request: #42434 Reviewed-on: https://go-review.googlesource.com/c/go/+/268021 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Trust: Martin Möhrmann <[email protected]>
… is required Noticed while debugging failing tests for #36460. Fixes #44788 Change-Id: Ic2cf511d871b29284f7372920f6f7d452825dd63 Reviewed-on: https://go-review.googlesource.com/c/go/+/298651 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]>
Change-Id: Ic4c7b5086303c7faa49f4cbf6738e66d5de35c7e Reviewed-on: https://go-review.googlesource.com/c/go/+/282012 Trust: Michael Pratt <[email protected]> Run-TryBot: Michael Pratt <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Austin Clements <[email protected]>
…t/test_write_profiles_on_timeout This test verifies the behavior of a test that fails due to timing out. However, the test to be timed out was only sleeping for 1s before returning successfully. That is empirically not always long enough for the test process itself to detect the timeout and terminate. We could replace the sleep with a select{}, but that would assume that the deadlock detector does not terminate a test that reaches that state (true today, but not necessarily so). We could replace the arbitrarily sleep with an arbitrarily longer sleep, but that's, well, arbitrary. Instead, have the test sleep in an unbounded loop to ensure that it always continues to run until the timeout is detected, and check the test output to ensure that it actually reached the timeout path. Fixes #32983 Change-Id: Ie7f210b36ef0cc0a4db473f780e15a3d6def8bda Reviewed-on: https://go-review.googlesource.com/c/go/+/289889 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
This is a preparatory patch to support 6 arg opcodes on POWER10, and simplify 5 arg opcode processing (e.g RLWNM and similar). This expands the optab structure, and renames a4 arguments to a6. No actual change in functionality is made. Change-Id: I785e4177778e4bf1326cf8e46e8aeaaa0e4d406b Reviewed-on: https://go-review.googlesource.com/c/go/+/295031 Run-TryBot: Lynn Boger <[email protected]> Run-TryBot: Carlos Eduardo Seo <[email protected]> Reviewed-by: Lynn Boger <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> Trust: Keith Randall <[email protected]>
at least for ints and strings includes simple test For #40724. Change-Id: Ib8484e5b957b08f961574a67cfd93d3d26551558 Reviewed-on: https://go-review.googlesource.com/c/go/+/295309 Trust: David Chase <[email protected]> Run-TryBot: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
It turns out that the proc thread update function doesn't actually allocate new memory for its arguments and instead just copies the pointer values into the preallocated memory. Since we were allocating that memory as []byte, the garbage collector didn't scan it for pointers to Go allocations and freed them. We _could_ fix this by requiring that all users of this use runtime.KeepAlive for everything they pass to the update function, but that seems harder than necessary. Instead, we can just do the allocation as []unsafe.Pointer, which means the GC can operate as intended and not free these from beneath our feet. In order to ensure this remains true, we also add a test for this. Fixes #44662. Change-Id: Ib392ba8ceacacec94b11379919c8179841cba29f Reviewed-on: https://go-review.googlesource.com/c/go/+/297389 Trust: Jason A. Donenfeld <[email protected]> Trust: Alex Brainman <[email protected]> Trust: Bryan C. Mills <[email protected]> Run-TryBot: Jason A. Donenfeld <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
Added a test that exercises named results Change-Id: Ie228b68f4f846266595a95e0f65a6e4b8bf79635 Reviewed-on: https://go-review.googlesource.com/c/go/+/297029 Trust: David Chase <[email protected]> Run-TryBot: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
It is not multithreaded-compilation-safe, and also seems to cause problems on the noopt-builder. Change-Id: I52dbcd507d256990f1ec7c8040ec7b76595aae4f Reviewed-on: https://go-review.googlesource.com/c/go/+/298850 Trust: David Chase <[email protected]> Run-TryBot: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
types2 uses the syntax printer to print expressions (for tracing or error messages), so we need to (at least) print type lists in interfaces. While at it, also implement the printing of type parameter lists. Fixes #44766. Change-Id: I36a4a7152d9bef7251af264b5c7890aca88d8dc3 Reviewed-on: https://go-review.googlesource.com/c/go/+/298549 Trust: Robert Griesemer <[email protected]> Reviewed-by: Robert Findley <[email protected]>
The new error message tells the user what was wrong (no go.mod found) and directs them to 'go help modules', which links to tutorials. Fixes #44745 Change-Id: I98f31fec4a8757eb1792b45491519da4c552cb0f Reviewed-on: https://go-review.googlesource.com/c/go/+/298650 Trust: Jay Conrod <[email protected]> Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
'go mod tidy' and 'go mod vendor' normally report errors when a package can't be imported, even if the import appears in a file that wouldn't be compiled by the current version of Go. These errors are common for packages introduced in higher versions of Go, like "embed" in 1.16. This change causes 'go mod tidy' and 'go mod vendor' to ignore missing package errors if the import path appears to come from the standard library because it lacks a dot in the first path element. Fixes #44557 Updates #27063 Change-Id: I61d6443e77ab95fd8c0d1514f57ef4c8885a77cc Reviewed-on: https://go-review.googlesource.com/c/go/+/298749 Trust: Jay Conrod <[email protected]> Run-TryBot: Jay Conrod <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]>
Change-Id: I4b2b62a8eb1c4bf47f552214127d4ed5710af196 Reviewed-on: https://go-review.googlesource.com/c/go/+/297030 Trust: David Chase <[email protected]> Run-TryBot: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
this caused a problem in write barrier code when a spurious zero-offset prevented a write barrier elision. removed cache after instrumenting it and discovering zero safe hits (one value must dominate the other, else unsafe). Change-Id: I42dfdb4d38ebfe158b13e766a7fabfc514d773f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/297349 Trust: David Chase <[email protected]> Run-TryBot: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
includes three tests Change-Id: I33ac0cfe35085d4b6ad2775abcaa3d7d6527b49f Reviewed-on: https://go-review.googlesource.com/c/go/+/297031 Trust: David Chase <[email protected]> Run-TryBot: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
…g seems fixed Previously, we would sometimes see an internal (*instance) type for a receiver of a types2 method, which was a bug. To deal with that, we put in an extra (*Selection).TArgs() method. However, that (*instance) type is no longer showing up for receivers, so we can remove the types2 method we added and do the work with existing types2 API methods. Change-Id: I03e68f5bbaaf82fe706b6efecbb02e951bbd3cd4 Reviewed-on: https://go-review.googlesource.com/c/go/+/298869 Run-TryBot: Dan Scales <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Trust: Dan Scales <[email protected]>
Map serialization using reflect.Value.MapIndex cannot retrieve map keys that contain a NaN, resulting in a panic. Switch the implementation to use the reflect.Value.MapRange method instead, which iterates over all map entries regardless of whether they are directly retrievable. Note that according to RFC 8259, section 4, a JSON object should have unique names, but does not forbid the occurrence of duplicate names. Fixes #43207 Change-Id: If4bc55229b1f64b8ca4b0fed37549725efdace39 Reviewed-on: https://go-review.googlesource.com/c/go/+/278632 Trust: Meng Zhuo <[email protected]> Trust: Joe Tsai <[email protected]> Trust: Bryan C. Mills <[email protected]> Run-TryBot: Meng Zhuo <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Joe Tsai <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
This test was missed in CL 298650, and not caught by TryBots because it is skipped it short mode (and we forgot to add longtest TryBots on that CL). Updates #44745 Change-Id: I696d01307dabf351b0e4735db0644f4e09c8e369 Reviewed-on: https://go-review.googlesource.com/c/go/+/298794 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Robert Findley <[email protected]> TryBot-Result: Go Bot <[email protected]>
Change `Github` to `GitHub` Change-Id: I514e8dc9a19182fcf9fcf5bc1b5fbff253c1a947 GitHub-Last-Rev: 7124c70 GitHub-Pull-Request: #44260 Reviewed-on: https://go-review.googlesource.com/c/go/+/291950 Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]>
Most subprocess invocations in the go command use base.AppendPWD to append an accurate value of PWD to the command's environment, which can speed up calls like os.Getwd and also help to provide less-confusing output from scripts. Update `go generate` to do so. Fixes #43862 Change-Id: I3b756f1532b2d922f7d74fd86414d5567a0122c0 GitHub-Last-Rev: 3ec8da2 GitHub-Pull-Request: #43940 Reviewed-on: https://go-review.googlesource.com/c/go/+/287152 Reviewed-by: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Baokun Lee <[email protected]>
Make explicit a shrVU_g precondition. Replace i with i+1 throughout the loop. The resulting loop is functionally identical, but the compiler can do better BCE without the i-1 slice offset. Benchmarks results on amd64 with -tags=math_big_pure_go. name old time/op new time/op delta NonZeroShifts/1/shrVU-8 4.55ns ± 2% 4.45ns ± 3% -2.27% (p=0.000 n=28+30) NonZeroShifts/1/shlVU-8 4.07ns ± 1% 4.13ns ± 4% +1.55% (p=0.000 n=26+29) NonZeroShifts/2/shrVU-8 6.12ns ± 1% 5.55ns ± 1% -9.30% (p=0.000 n=28+28) NonZeroShifts/2/shlVU-8 5.65ns ± 3% 5.70ns ± 2% +0.92% (p=0.008 n=30+29) NonZeroShifts/3/shrVU-8 7.58ns ± 2% 6.79ns ± 2% -10.46% (p=0.000 n=28+28) NonZeroShifts/3/shlVU-8 6.62ns ± 2% 6.69ns ± 1% +1.07% (p=0.000 n=29+28) NonZeroShifts/4/shrVU-8 9.02ns ± 1% 7.79ns ± 2% -13.59% (p=0.000 n=27+30) NonZeroShifts/4/shlVU-8 7.74ns ± 1% 7.82ns ± 1% +0.92% (p=0.000 n=26+28) NonZeroShifts/5/shrVU-8 10.6ns ± 1% 8.9ns ± 3% -16.31% (p=0.000 n=25+29) NonZeroShifts/5/shlVU-8 8.59ns ± 1% 8.68ns ± 1% +1.13% (p=0.000 n=27+29) NonZeroShifts/10/shrVU-8 18.2ns ± 2% 14.4ns ± 1% -20.96% (p=0.000 n=27+28) NonZeroShifts/10/shlVU-8 14.1ns ± 1% 14.1ns ± 1% +0.46% (p=0.001 n=26+28) NonZeroShifts/100/shrVU-8 161ns ± 2% 118ns ± 1% -26.83% (p=0.000 n=29+30) NonZeroShifts/100/shlVU-8 119ns ± 2% 120ns ± 2% +0.92% (p=0.000 n=29+29) NonZeroShifts/1000/shrVU-8 1.54µs ± 1% 1.10µs ± 1% -28.63% (p=0.000 n=29+29) NonZeroShifts/1000/shlVU-8 1.10µs ± 1% 1.10µs ± 2% ~ (p=0.701 n=28+29) NonZeroShifts/10000/shrVU-8 15.3µs ± 2% 10.9µs ± 1% -28.68% (p=0.000 n=28+28) NonZeroShifts/10000/shlVU-8 10.9µs ± 2% 10.9µs ± 2% -0.57% (p=0.003 n=26+29) NonZeroShifts/100000/shrVU-8 154µs ± 1% 111µs ± 2% -28.04% (p=0.000 n=27+28) NonZeroShifts/100000/shlVU-8 113µs ± 2% 113µs ± 2% ~ (p=0.790 n=30+30) Change-Id: Ib6a621ee7c88b27f0f18121fb2cba3606c40c9b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/297049 Trust: Josh Bleecher Snyder <[email protected]> Run-TryBot: Josh Bleecher Snyder <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
The race detector of llvm adds four reloc types even with -fPIC elf.R_MIPS_CALL16 elf.R_MIPS_GPREL32 elf.R_MIPS_64 elf.R_MIPS_GOT_DISP Change-Id: If73119dcba14ef74395273eb680f52a0aa853217 Reviewed-on: https://go-review.googlesource.com/c/go/+/270297 Trust: Meng Zhuo <[email protected]> Run-TryBot: Meng Zhuo <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> TryBot-Result: Go Bot <[email protected]>
…s when checking against type parameters Don't eagerly record the target type for an untyped operand if the target type is just one of possibly many types in the type list of a type parameter. Instead, record expression type only after we checked that all types in the type list are ok. Also, update assertion in Checker.recordTypeAndValue since (currently), a type parameter is not considered a const type. We may change that, eventually. This is a temporary (but working) solution. Eventually we should copy the approach taken in go/types. Fixes #45096. Change-Id: Icf61ee893aca6ead32bfc45ee5831572e672357b Reviewed-on: https://go-review.googlesource.com/c/go/+/302755 Trust: Robert Griesemer <[email protected]> Run-TryBot: Robert Griesemer <[email protected]> Reviewed-by: Robert Findley <[email protected]> TryBot-Result: Go Bot <[email protected]>
This CL adds rewrite rules for CSETM, CSINC, CSINV, and CSNEG. By adding these rules, we can save one instruction. For example, func test(cond bool, a int) int { if cond { a++ } return a } Before: MOVD "".a+8(RSP), R0 ADD $1, R0, R1 MOVBU "".cond(RSP), R2 CMPW $0, R2 CSEL NE, R1, R0, R0 After: MOVBU "".cond(RSP), R0 CMPW $0, R0 MOVD "".a+8(RSP), R0 CSINC EQ, R0, R0, R0 This patch is a copy of CL 285694. Co-authored-by: JunchenLi <[email protected]> Change-Id: Ic1a79e8b8ece409b533becfcb7950f11e7b76f24 Reviewed-on: https://go-review.googlesource.com/c/go/+/302231 Trust: fannie zhang <[email protected]> Run-TryBot: fannie zhang <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Keith Randall <[email protected]>
Most platforms only use a single MOV const operand - remove the MOV{B,H,W}const operands from riscv64 and consistently use MOVDconst instead. The implementation of all four is the same and there is no benefit gained from having multiple const operands (in fact it requires a lot more rewrite rules). Change-Id: I0ba7d7554e371a1de762ef5f3745e9c0c30d41ac Reviewed-on: https://go-review.googlesource.com/c/go/+/302610 Trust: Joel Sing <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> Reviewed-by: Michael Munday <[email protected]> Run-TryBot: Cherry Zhang <[email protected]> TryBot-Result: Go Bot <[email protected]>
… on RISCV64 Actually enable intrinsics for runtime/internal/atomic.{And,Or}{8,} on RISCV64. This seems to have been lost when CL 268098 was rebased. Change-Id: If072daa79c8964b186c127d5e065a7cc9e23ba27 Reviewed-on: https://go-review.googlesource.com/c/go/+/302229 Trust: Joel Sing <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
…y for riscv64 Follow what MIPS does and load >32-bit constants from memory using two instructions, rather than generating a four to six instruction sequence. This removes more than 2,500 instructions from the Go binary. This also makes it possible to load >32-bit constants via a single assembly instruction, if required. Change-Id: Ie679a0754071e6d8c52fe0d027f00eb241b3a758 Reviewed-on: https://go-review.googlesource.com/c/go/+/302609 Trust: Joel Sing <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
Change-Id: I5fa4773467e3f515250deead72fdce3e4bd0973b Reviewed-on: https://go-review.googlesource.com/c/go/+/275457 Reviewed-by: Emmanuel Odeke <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Robert Griesemer <[email protected]>
Fixes #44777 Corrected the documentation comment on the EncryptOAEP function from 'if a given public key is used to decrypt two types of messages' to 'if a given public key is used to encrypt two types of messages'. Change-Id: I02aff90d0414960eae72352c0e4d8ba2e8f8eca6 GitHub-Last-Rev: ea28663 GitHub-Pull-Request: #45032 Reviewed-on: https://go-review.googlesource.com/c/go/+/301714 Reviewed-by: Filippo Valsorda <[email protected]> Run-TryBot: Filippo Valsorda <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Robert Findley <[email protected]>
When the stack bound check fails, print the call chain with symbol versions (along with the names). Now that we have ABI wrappers and wrappers do consume stack space, it is clearer to distinguish the wrappers vs. the underlying functions. Change-Id: Id1d922e3e7934b31317f233aff3d9667b6ac90c8 Reviewed-on: https://go-review.googlesource.com/c/go/+/302869 Trust: Cherry Zhang <[email protected]> Run-TryBot: Cherry Zhang <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
Change-Id: I4a450af5f35f0ad4e4652789f1eda4d3171610e7 Reviewed-on: https://go-review.googlesource.com/c/go/+/302852 Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Trust: Jay Conrod <[email protected]>
…nstrained-out packages Fixes #33526 Change-Id: Iedd2d6dbe440499bf074ac632513319a22f2d648 Reviewed-on: https://go-review.googlesource.com/c/go/+/297009 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
The last primary usage of renameio was the WriteFile in modfetch.WriteDiskCache. Because it's not guaranteed that the fsync in WriteDiskCache will eliminate file corruption, and it slows down tests on Macs significantly, inline that last usage, removing the fsync. Also, remove the uses of renameio.Pattern. The ziphash file is no longer written to a temporary location before being copied to its final location, so that usage can just be cut. The remaining use is for the zipfile . Remove the first because the files are no longer written using the pattern anyway, so that the pattern variable has no effect. Replace it with a local pattern variable that is also passed to os.CreateTemp. Change-Id: Icf3adabf2a26c37b82afa1d07f821a46b30d69ce Reviewed-on: https://go-review.googlesource.com/c/go/+/301889 Trust: Michael Matloob <[email protected]> Run-TryBot: Michael Matloob <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]>
objabi parses GOEXPERIMENT, but most of the consumers look at the raw GOEXPERIMENT string that objabi gets from the environment. Centralize this logic by only exposing the parsed GOEXPERIMENT value from objabi. This sets us up for the next few changes. It also has the nice but mostly useless property that the order of experiment names will be canonicalized in build cache hashes. After this, the only remaining place that looks at raw GOEXPERIMENT is cmd/dist, which we'll fix in the next CL. For #40724. Change-Id: Idb150f848e17c184fae91372ca8b361591472f51 Reviewed-on: https://go-review.googlesource.com/c/go/+/302049 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
Currently, dist attempts to build the bootstrap with the GOEXPERIMENT set in the environment. However, the logic is incomplete and notably requires a hack to enable the appropriate build tags for GOEXPERIMENT=regabi. Without this hack, the build becomes skewed between a compiler that uses regabi and a runtime that doesn't when building toolchain2. We could try to improve the GOEXPERIMENT processing in cmd/dist, but it will always chase cmd/internal/objabi and it's quite difficult to share the logic with objabi because of the constraints on building cmd/dist. Instead, we switch to building go_bootstrap without any GOEXPERIMENT and only start using GOEXPERIMENT once we have a working, modern cmd/go (which has all the GOEXPERIMENT logic in it). We also build toolchain1 without any GOEXPERIMENT set, in case the bootstrap toolchain is recent enough to understand build-time GOEXPERIMENT settings. As part of this, we make GOEXPERIMENT=none mean "no experiments". This is necessary since, now that we support setting GOEXPERIMENT at build time, we need an explicit way to say "ignore all baked-in experiments". For #40724. Change-Id: I115399579b766a7a8b2f352f7e5efea5305666cd Reviewed-on: https://go-review.googlesource.com/c/go/+/302050 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
Currently, objabi exports GOEXPERIMENT flags as ints that are either 0 or 1. Since the dawn of time, there's been a comment saying that we *could* support general integers here, but it's never happened and all the "== 0" and "!= 0" and "== 1" are driving me crazy and are making the code harder to read and maintain. Hence, this CL adds support for boolean GOEXPERIMENT flags. We'll introduce some bool-typed flags in the next CL. Change-Id: I7813400db130a9b8f71a644fe7912808dbe645bc Reviewed-on: https://go-review.googlesource.com/c/go/+/302069 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
Currently, the nosplit test disables ABI wrapper generation because it generates a main.main in assembly, and so the ABI wrapper for calling from runtime.main to main.main counts against the nosplit limit, which cases some of the tests to fail. Fix this by first entering ABI0 in a splittable context and then calling from there into the test entry point, since this doesn't introduce an ABI wrapper. While we're here, this CL removes the test's check for the framepointer experiment. That's now statically enabled, so it doesn't appear in the experiment line, and enabling any other experiment causes the test to think that the framepointer experiment *isn't* enabled. For #40724. Change-Id: I6291eb9391f129779e726c5fc8c41b7b4a14eeb9 Reviewed-on: https://go-review.googlesource.com/c/go/+/302772 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
This separates GOEXPERIMENT=regabi into five sub-experiments: regabiwrappers, regabig, regabireflect, regabidefer, and regabiargs. Setting GOEXPERIMENT=regabi now implies the working subset of these (currently, regabiwrappers, regabig, and regabireflect). This simplifies testing, helps derisk the register ABI project, and will also help with performance comparisons. This replaces the -abiwrap flag to the compiler and linker with the regabiwrappers experiment. As part of this, regabiargs now enables registers for all calls in the compiler. Previously, this was statically disabled in regabiEnabledForAllCompilation, but now that we can control it independently, this isn't necessary. For #40724. Change-Id: I5171e60cda6789031f2ef034cc2e7c5d62459122 Reviewed-on: https://go-review.googlesource.com/c/go/+/302070 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> Reviewed-by: David Chase <[email protected]>
Remove unneeded calls to typecheck in noder2 associated with g.use() and g.obj(). These routines are already setting the types2-derived type correctly for ONAME nodes, and there is no typechecker1-related transformations related to ONAME nodes, other than making sure that newly created closure variables have their type set. Tested through normal -G=3 testing in all.bash (all of go/tests). Change-Id: I1b790ab9948959685fca3a768401458201833671 Reviewed-on: https://go-review.googlesource.com/c/go/+/303029 Run-TryBot: Dan Scales <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Trust: Dan Scales <[email protected]>
Also, clarify doc string. Change-Id: If1c5f8e29e2c2080dd899ef76196e97b7b992389 Reviewed-on: https://go-review.googlesource.com/c/go/+/302758 Trust: Robert Griesemer <[email protected]> Reviewed-by: Robert Findley <[email protected]>
PPC64 needs to preserve bits when applying some relocations. DS form relocations must preserve the lower two bits, and thus needs to inspect the section data as it streams out. Similarly, the overflow checking requires inspecting the primary opcode to see if the value is sign or zero extended. The existing PPC64 code no longer works as the slice returned by (loader*).Data is cleared as we layout the symbol and process relocations. This data is always the section undergoing relocation, thus we can directly inspect the contents to preserve bits or check for overflows. Change-Id: I239211f7e5e96208673663b6553b3017adae7e01 Reviewed-on: https://go-review.googlesource.com/c/go/+/300555 Run-TryBot: Paul Murphy <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Emmanuel Odeke <[email protected]>
This patch provides changes according to TODO. Since writeMutex and writeBlock functions have a lot of code in common, it is better to move this code to one function. Change-Id: I81aaad067b0cb1647824909f3b5f6861add3a7ba Reviewed-on: https://go-review.googlesource.com/c/go/+/280152 Reviewed-by: Cherry Zhang <[email protected]> Trust: Hyang-Ah Hana Kim <[email protected]>
This change adds tests for reflect.Value.Call for calling functions using the new register-based ABI. For #40724. Change-Id: Ia9afd43e26dd80c7e36dd135a5b71acce8074801 Reviewed-on: https://go-review.googlesource.com/c/go/+/299269 Trust: Michael Knyszek <[email protected]> Run-TryBot: Michael Knyszek <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
Now that we can set GOEXPERIMENT at build time, we no longer need -d=fieldtrack in the compiler to enabled field tracking at build time. Switch the one test that uses -d=fieldtrack to use GOEXPERIMENT instead so we can eliminate this debug flag and centralize on GOEXPERIMENT. Updates #42681. Change-Id: I14c352c9a97187b9c5ec8027ff672d685f22f543 Reviewed-on: https://go-review.googlesource.com/c/go/+/302969 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
This moves all remaining GOEXPERIMENT flags into the objabi.Experiment struct, drops the "_enabled" from their name, and makes them all bool typed. We also drop DebugFlags.Fieldtrack because the previous CL shifted the one test that used it to use GOEXPERIMENT instead. Change-Id: I3406fe62b1c300bb4caeaffa6ca5ce56a70497fe Reviewed-on: https://go-review.googlesource.com/c/go/+/302389 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
Previously, the runtime had to understand the full syntax of the GOEXPERIMENT environment variable. Now, sys.GOEXPERIMENT is the pre-processed experiment list produced by objabi, so we can simplify the runtime parser. Change-Id: I0d113a4347dde50a35b8b1f2b0110c88fe802921 Reviewed-on: https://go-review.googlesource.com/c/go/+/303049 Trust: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
types2 will give us a constant with a type T, if an untyped constant is used with another operand of type T (in a provably correct way). When we substitute in the type args during stenciling, we now know the real type of the constant. We may then need to change the BasicLit.val to be the correct type (e.g. convert an int64Val constant to a floatVal constant). Otherwise, later parts of the compiler will be confused. Updated tests list.go and double.go with uses of untyped constants. Change-Id: I9966bbb0dea3a7de1c5a6420f8ad8af9ca84a33e Reviewed-on: https://go-review.googlesource.com/c/go/+/303089 Run-TryBot: Dan Scales <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Dan Scales <[email protected]> Trust: Robert Griesemer <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
Change-Id: I282f428137ca3360a58167c94e26f3dfdf59fb63 Reviewed-on: https://go-review.googlesource.com/c/go/+/302756 Trust: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
parent's helperNames has not been set when frameSkip called, moving helperNames initilazing to frameSkip. Fixes #44887 Change-Id: I5107c5951033e5e47d1ac441eac3ba5344a7bdc0 GitHub-Last-Rev: 44b90b2 GitHub-Pull-Request: #45071 Reviewed-on: https://go-review.googlesource.com/c/go/+/302469 Trust: Cherry Zhang <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Go Bot <[email protected]>
"VMOV Vn.<T>[index], Vn" is equivalent to "VDUP Vn.<T>[index], Vn", and the latter has a higher priority in the disassembler than the former. But the assembler doesn't support to encode this combination of VDUP, this leads to an inconsistency between assembler and disassembler. For example, if we assemble "VMOV V20.S[0], V20" to hex then decode it, we'll get "VDUP V20.S[0], V20". VMOV V20.S[0], V20 -> 9406045e -> VDUP V20.S[0], V20 -> error But we cannot assemble this VDUP again. Similar reason for "VDUP Rn, Vd.<T>". This CL completes the support for VDUP. This patch is a copy of CL 276092. Co-authored-by: JunchenLi <[email protected]> Change-Id: I8f8d86cf1911d5b16bb40d189f1dc34b24416aaf Reviewed-on: https://go-review.googlesource.com/c/go/+/302929 Trust: fannie zhang <[email protected]> Run-TryBot: fannie zhang <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
Previously, we used to call doc.ToText to print each comment in a comment group attached to an interface method. This broke any preformatted code block attached to the comment, and displayed everything aligned to a single column. Additionally, the name of the interface also wasn't displayed which didn't show which interface the method belonged to. To fix this, we print the entire interface node using format.Node which takes care of displaying the comments correctly, and we also filter out the methods that don't match, so that the method can be displayed as belonging to an interface. As an example, previously it would show: // Comment before exported method. // // // Code block showing how to use ExportedMethod // func DoSomething() error { // ExportedMethod() // return nil // } func ExportedMethod() // Comment on line with exported method. Now, it shows: type ExportedInterface interface { // Comment before exported method. // // // Code block showing how to use ExportedMethod // func DoSomething() error { // ExportedMethod() // return nil // } ExportedMethod() // Comment on line with exported method. } Fixes #43188 Change-Id: I28099fe4aab35e08049b2616a3506240f57133cc Reviewed-on: https://go-review.googlesource.com/c/go/+/279433 Trust: Agniva De Sarker <[email protected]> Trust: Daniel Martí <[email protected]> Reviewed-by: Rob Pike <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR will be imported into Gerrit with the title and first
comment (this text) used to generate the subject and body of
the Gerrit change.
Please ensure you adhere to every item in this list.
More info can be found at https://github.com/golang/go/wiki/CommitMessage
net/http: frob the quux before blarfing
"This change modifies Go to ___________"
really needed (ASCII art, table, or long link)
Fixes #1234
orUpdates #1234
(the latter if this is not a complete fix) to this comment
golang/go
you can use theowner/repo#issue_number
syntax:Fixes golang/tools#1234
Our Gerrit server & GitHub bots enforce CLA compliance instead.