summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* all: merge dev.garbage (d1238958d4ae) into default branchRuss Cox2014-12-052-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | When we start work on Gerrit, ppc64 and garbage collection work will continue in the master branch, not the dev branches. (We may still use dev branches for other things later, but these are ready to be merged, and doing it now, before moving to Git means we don't have to have dev branches working in the Gerrit workflow on day one.) TBR=rlh CC=golang-codereviews https://codereview.appspot.com/183140043
| * all: power64 is now ppc64Russ Cox2014-12-052-5/+5
| | | | | | | | | | | | | | | | | | Fixes issue 8654. LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/180600043
* | [dev.garbage] runtime: raise StackGuard limit for Windows (again)dev.garbageRuss Cox2014-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | 640 bytes ought to be enough for anybody. We'll bring this back down before Go 1.5. That's issue 9214. TBR=rlh CC=golang-codereviews https://codereview.appspot.com/188730043
* | [dev.garbage] all: merge dev.cc (493ad916c3b1) into dev.garbageRuss Cox2014-11-241-0/+90
|\ \ | |/ | | | | | | | | TBR=austin CC=golang-codereviews https://codereview.appspot.com/179290043
| * [dev.cc] all: merge default (e4ab8f908aac) into dev.ccRuss Cox2014-11-204-7/+86
| |\ | | | | | | | | | | | | | | | TBR=austin CC=golang-codereviews https://codereview.appspot.com/179040044
| | * [dev.cc] all: merge dev.power64 (7667e41f3ced) into dev.ccRuss Cox2014-11-145-43/+123
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to reduce the delta between dev.cc and dev.garbage to just garbage collector changes. These are the files that had merge conflicts and have been edited by hand: malloc.go mem_linux.go mgc.go os1_linux.go proc1.go panic1.go runtime1.go LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/174180043
| * | | runtime: fix sudog leakRuss Cox2014-11-161-0/+90
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SudoG used to sit on the stack, so it was cheap to allocated and didn't need to be cleaned up when finished. For the conversion to Go, we had to move sudog off the stack for a few reasons, so we added a cache of recently used sudogs to keep allocation cheap. But we didn't add any of the necessary cleanup before adding a SudoG to the new cache, and so the cached SudoGs had stale pointers inside them that have caused all sorts of awful, hard to debug problems. CL 155760043 made sure SudoG.elem is cleaned up. CL 150520043 made sure SudoG.selectdone is cleaned up. This CL makes sure SudoG.next, SudoG.prev, and SudoG.waitlink are cleaned up. I should have done this when I did the other two fields; instead I wasted a week tracking down a leak they caused. A dangling SudoG.waitlink can point into a sudogcache list that has been "forgotten" in order to let the GC collect it, but that dangling .waitlink keeps the list from being collected. And then the list holding the SudoG with the dangling waitlink can find itself in the same situation, and so on. We end up with lists of lists of unusable SudoGs that are still linked into the object graph and never collected (given the right mix of non-trivial selects and non-channel synchronization). More details in golang.org/issue/9110. Fixes issue 9110. LGTM=r R=r CC=dvyukov, golang-codereviews, iant, khr https://codereview.appspot.com/177870043
* | | [dev.garbage] all: merge dev.power64 (7667e41f3ced) into dev.garbageRuss Cox2014-11-143-1/+71
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the only difference between dev.cc and dev.garbage is the runtime conversion on the one side and the garbage collection on the other. They both have the same set of changes from default and dev.power64. LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/172570043
| * | [dev.power64] test: "fix" live.go test on power64xAustin Clements2014-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On power64x, this one line in live.go reports that t is live because of missing optimization passes. This isn't what this test is trying to test, so shuffle bad40 so that it still accomplishes the intent of the test without also depending on optimization. LGTM=rsc R=rsc, dave CC=golang-codereviews https://codereview.appspot.com/167110043
| * | [dev.power64] test: disable nilptr3 test on power64xAustin Clements2014-11-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remaining failures in this test are because of incomplete optimization support on power64x. Tracked in issue 9058. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/168130043
| * | [dev.power64] all: merge default into dev.power64Austin Clements2014-11-032-6/+83
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial merge except for src/runtime/asm_power64x.s and src/runtime/signal_power64x.c LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/168950044
| | * | [dev.power64] 9g: fix under-zeroing in clearfatAustin Clements2014-10-311-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All three cases of clearfat were wrong on power64x. The cases that handle 1032 bytes and up and 32 bytes and up both use MOVDU (one directly generated in a loop and the other via duffzero), which leaves the pointer register pointing at the *last written* address. The generated code was not accounting for this, so the byte fill loop was re-zeroing the last zeroed dword, rather than the bytes following the last zeroed dword. Fix this by simply adding an additional 8 byte offset to the byte zeroing loop. The case that handled under 32 bytes was also wrong. It didn't update the pointer register at all, so the byte zeroing loop was simply re-zeroing the beginning of region. Again, the fix is to add an offset to the byte zeroing loop to account for this. LGTM=dave, bradfitz R=rsc, dave, bradfitz CC=golang-codereviews https://codereview.appspot.com/168870043
* | | | [dev.garbage] all: merge default (f38460037b72) into dev.garbageRuss Cox2014-11-143-74/+105
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the revision that dev.cc is branched from. LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/169590043
| * | | [dev.garbage] cmd/gc, runtime: add locks around print statementsRuss Cox2014-11-052-68/+90
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now each C printf, Go print, or Go println is guaranteed not to be interleaved with other calls of those functions. This should help when debugging concurrent failures. LGTM=rlh R=rlh CC=golang-codereviews https://codereview.appspot.com/169120043
| * | [dev.power64] all: merge default (dd5014ed9b01) into dev.power64Russ Cox2014-10-291-6/+15
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Still passes on amd64. LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/165110043
| | * \ [dev.power64] all: merge default into dev.power64Austin Clements2014-10-271-6/+15
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/164110043
| | | * \ [dev.power64] all: merge default into dev.power64Austin Clements2014-10-221-6/+15
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings dev.power64 up-to-date with the current tip of default. go_bootstrap is still panicking with a bad defer when initializing the runtime (even on amd64). LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/152570049
| | | | * \ build: merge the great pkg/ rename into dev.power64Austin Clements2014-10-222-2/+2
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also removes pkg/runtime/traceback_lr.c, which was ported to Go in an earlier commit and then moved to runtime/traceback.go. Reviewer: rsc@golang.org rsc: LGTM
| | | | * \ \ [dev.power64] build: merge default into dev.power64Austin Clements2014-10-2217-100/+496
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/160200044
| | | | * | | | [dev.power64] cmd/ld, runtime: detect, fix nosplit overflowsRuss Cox2014-08-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LGTM=minux R=minux CC=golang-codereviews https://codereview.appspot.com/121690043
| | | | * | | | [dev.power64] test/nosplit.go: add power64 supportShenghou Ma2014-08-141-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/125210043 Committer: Russ Cox <rsc@golang.org>
* | | | | | | | test: fix nacl buildRuss Cox2014-11-092-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable linkx_run.go and sinit_run.go, because they exec subprocesses, which NaCl cannot. TBR=r CC=golang-codereviews https://codereview.appspot.com/171350043
* | | | | | | | test: move linkx and sinit to run.goJosh Bleecher Snyder2014-11-065-29/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remaining run-only tests will be migrated to run.go in another CL. This CL will break the build due to issues 8746 and 8806. Update issue 4139 Update issue 8746 Update issue 8806 LGTM=rsc R=rsc, bradfitz, iant CC=golang-codereviews https://codereview.appspot.com/144630044 Committer: Russ Cox <rsc@golang.org>
* | | | | | | | test: comment out failing cases from sinit.goIan Lance Taylor2014-11-041-14/+29
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One failing case this removes is: var bytes = []byte("hello, world") var copy_bytes = bytes We could handle this in the compiler, but it requires special case for a variable that is initialized to the value of a variable that is initialized to a string literal converted to []byte. This seems an unlikely case--it never occurs in the standrd library--and it seems unnecessary to write the code to handle it. If we do want to support this case, one approach is https://codereview.appspot.com/171840043. The other failing cases are of the form var bx bool var copy_bx = bx The compiler used to initialize copy_bx to false. However, that led to issue 7665, since bx may be initialized in non-Go code. The compiler no longer assumes that bx must be false, so copy_bx can not be statically initialized. We can fix these with https://codereview.appspot.com/169040043 if we also pass -complete to the compiler as part of this test. This is OK but it's too late in the release cycle. Fixes issue 8746. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/165400043
* | | | | | | runtime: fix line number in first stack frame in printed stack traceRuss Cox2014-10-291-0/+49
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally traceback was only used for printing the stack when an unexpected signal came in. In that case, the initial PC is taken from the signal and should be used unaltered. For the callers, the PC is the return address, which might be on the line after the call; we subtract 1 to get to the CALL instruction. Traceback is now used for a variety of things, and for almost all of those the initial PC is a return address, whether from getcallerpc, or gp->sched.pc, or gp->syscallpc. In those cases, we need to subtract 1 from this initial PC, but the traceback code had a hard rule "never subtract 1 from the initial PC", left over from the signal handling days. Change gentraceback to take a flag that specifies whether we are tracing a trap. Change traceback to default to "starting with a return PC", which is the overwhelmingly common case. Add tracebacktrap, like traceback but starting with a trap PC. Use tracebacktrap in signal handlers. Fixes issue 7690. LGTM=iant, r R=r, iant CC=golang-codereviews https://codereview.appspot.com/167810044
* | | | | | cmd/gc: fix internal compiler error in struct compareRuss Cox2014-10-281-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 9006. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/167800043
* | | | | | test: make maplinear more robustRuss Cox2014-10-271-5/+12
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test just doubled a certain number of times and then gave up. On a mostly fast but occasionally slow machine this may never make the test run long enough to see the linear growth. Change test to keep doubling until the first round takes at least a full second, to reduce the effect of occasional scheduling or other jitter. The failure we saw had a time for the first round of around 100ms. Note that this test still passes once it sees a linear effect, even with a very small total time. The timeout here only applies to how long the execution must be to support a reported failure. LGTM=khr R=khr CC=golang-codereviews, rlh https://codereview.appspot.com/164070043
* | | | | cmd/gc: synthesize zeroed value for non-assignment contextRuss Cox2014-10-241-0/+53
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CL 157910047 introduced code to turn a node representing a zeroed composite literal into N, the nil Node* pointer (which represents any zero, not the Go literal nil). That's great for assignments like x = T{}, but it doesn't work when T{} is used in a value context like T{}.v or x == T{}. Fix those. Should have no effect on performance; confirmed. The deltas below are noise (compare ns/op): benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 2902919192 2915228424 +0.42% BenchmarkFannkuch11 2597417605 2630363685 +1.27% BenchmarkFmtFprintfEmpty 73.7 74.8 +1.49% BenchmarkFmtFprintfString 196 199 +1.53% BenchmarkFmtFprintfInt 213 217 +1.88% BenchmarkFmtFprintfIntInt 336 356 +5.95% BenchmarkFmtFprintfPrefixedInt 289 294 +1.73% BenchmarkFmtFprintfFloat 415 416 +0.24% BenchmarkFmtManyArgs 1281 1271 -0.78% BenchmarkGobDecode 10271734 10307978 +0.35% BenchmarkGobEncode 8985021 9079442 +1.05% BenchmarkGzip 410233227 412266944 +0.50% BenchmarkGunzip 102114554 103272443 +1.13% BenchmarkHTTPClientServer 45297 44993 -0.67% BenchmarkJSONEncode 19499741 19498489 -0.01% BenchmarkJSONDecode 76436733 74247497 -2.86% BenchmarkMandelbrot200 4273814 4307292 +0.78% BenchmarkGoParse 4024594 4028937 +0.11% BenchmarkRegexpMatchEasy0_32 131 135 +3.05% BenchmarkRegexpMatchEasy0_1K 328 333 +1.52% BenchmarkRegexpMatchEasy1_32 115 117 +1.74% BenchmarkRegexpMatchEasy1_1K 931 948 +1.83% BenchmarkRegexpMatchMedium_32 216 217 +0.46% BenchmarkRegexpMatchMedium_1K 72669 72857 +0.26% BenchmarkRegexpMatchHard_32 3818 3809 -0.24% BenchmarkRegexpMatchHard_1K 121398 121945 +0.45% BenchmarkRevcomp 613996550 615145436 +0.19% BenchmarkTemplate 93678525 93267391 -0.44% BenchmarkTimeParse 414 411 -0.72% BenchmarkTimeFormat 396 399 +0.76% Fixes issue 8947. LGTM=r R=r, dave CC=golang-codereviews https://codereview.appspot.com/162130043
* | | | test: add more cases to recover.goIan Lance Taylor2014-10-221-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test16 used to fail with gccgo. The withoutRecoverRecursive test would have failed in some possible implementations. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/151630043
* | | | cmd/gc: disallow call of *T method using **T variableRuss Cox2014-10-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings cmd/gc in line with the spec on this question. It might break existing code, but that code was not conformant with the spec. Credit to R?my for finding the broken code. Fixes issue 6366. LGTM=r R=golang-codereviews, r CC=adonovan, golang-codereviews, gri https://codereview.appspot.com/129550043
* | | | cmd/gc: emit code for extern = <N>Daniel Morsing2014-10-201-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.appspot.com/152700045/ made it possible for struct literals assigned to globals to use <N> as the RHS. Normally, this is to zero out variables on first use. Because globals are already zero (or their linker initialized value), we just ignored this. Now that <N> can occur from non-initialization code, we need to emit this code. We don't use <N> for initialization of globals any more, so this shouldn't cause any excessive zeroing. Fixes issue 8961. LGTM=rsc R=golang-codereviews, rsc CC=bradfitz, golang-codereviews https://codereview.appspot.com/154540044
* | | | cmd/gc: blank methods are not permitted in interface typesChris Manghane2014-10-152-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 6606. LGTM=rsc R=rsc CC=golang-codereviews, gri https://codereview.appspot.com/156210044
* | | | cmd/gc: check for initialization cycles in method valuesChris Manghane2014-10-1426-0/+538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 7960. LGTM=rsc R=rsc CC=golang-codereviews, gri https://codereview.appspot.com/159800045
* | | | test: add test for gccgo-specific issue 8079Chris Manghane2014-10-131-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LGTM=gri R=gri CC=golang-codereviews, iant https://codereview.appspot.com/159850044
* | | | cmd/gc: prohibit short variable declarations containing duplicate symbolsEvan Kroske2014-10-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 6764. Fixes issue 8435. LGTM=rsc R=golang-codereviews, r, gobot, rsc CC=golang-codereviews https://codereview.appspot.com/116440046 Committer: Russ Cox <rsc@golang.org>
* | | | cmd/gc: fix call order in array literal of slice literal of make chanRuss Cox2014-09-304-16/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 8761. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://codereview.appspot.com/144530045
* | | | cmd/ld: don't automatically mark symbols created by -X as reachableIan Lance Taylor2014-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the bug in which the linker reports "missing Go type information" when a -X option refers to a symbol that is not used. Fixes issue 8821. LGTM=rsc R=rsc, r CC=golang-codereviews https://codereview.appspot.com/151000043
* | | | cmd/gc: emit error for out-of-bounds slice of constant stringRuss Cox2014-09-251-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 7200. LGTM=gri, iant R=golang-codereviews, gri, iant CC=golang-codereviews, r https://codereview.appspot.com/150020044
* | | | cmd/gc: print x++ (not x += 1) in errors about x++Russ Cox2014-09-251-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 8311. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://codereview.appspot.com/146270043
* | | | cmd/gc: avoid infinite recursion on invalid recursive typeRuss Cox2014-09-251-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 8507. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://codereview.appspot.com/144560043
* | | | cmd/gc: fix import of package with var func returning _Russ Cox2014-09-243-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 8280. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://codereview.appspot.com/146240043
* | | | cmd/gc: run escape analysis always (even in -N mode)Russ Cox2014-09-242-0/+1496
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 8585. Removes some little-used code paths. LGTM=josharian R=golang-codereviews, minux, josharian CC=golang-codereviews, iant, r https://codereview.appspot.com/132970043
* | | | liblink: make GO_ARGS the default for functions beginning with ?Russ Cox2014-09-161-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is a leading ?, assume there is a Go prototype and attach the Go prototype information to the function. If the function is not called from Go and does not need a Go prototype, it can be made file-local instead (using name<>(SB)). This fixes the current BSD build failures, by giving functions like sync/atomic.StoreUint32 argument stack map information. Fixes issue 8753. LGTM=khr, iant R=golang-codereviews, iant, khr, bradfitz CC=golang-codereviews, r, rlh https://codereview.appspot.com/142150043
* | | | cmd/gc: say 'non-constant array bound' instead of 'invalid array bound'Russ Cox2014-09-161-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 8196. LGTM=adonovan R=adonovan CC=golang-codereviews https://codereview.appspot.com/141510044
* | | | cmd/ld: document that -X overwrites initialized variablesJosh Bleecher Snyder2014-09-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 7626. LGTM=iant R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/144870045
* | | | test: make maplinear iterdelete test less flakyJosh Bleecher Snyder2014-09-151-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iterdelete's run time varies; occasionally we get unlucky. To reduce spurious failures, average away some of the variation. On my machine, 8 of 5000 runs (0.15%) failed before this CL. After this CL, there were no failures after 35,000 runs. I confirmed that this adjusted test still fails before CL 141270043. LGTM=khr R=khr CC=bradfitz, golang-codereviews https://codereview.appspot.com/140610043
* | | | cmd/gc: don't walk static nodes generated by anylit.R?my Oudompheng2014-09-151-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During anylit run, nodes such as SLICEARR(statictmp, [:]) may be generated and are expected to be found unchanged by gen_as_init. In some walks (in particular walkselect), the statement may be walked again and lowered to its usual form, leading to a crash. Fixes issue 8017. Fixes issue 8024. Fixes issue 8058. LGTM=rsc R=golang-codereviews, dvyukov, gobot, rsc CC=golang-codereviews https://codereview.appspot.com/112080043
* | | | cmd/gc: generate type alg after calling dowidth.R?my Oudompheng2014-09-153-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it might happen before calling dowidth and result in a compiler crash. Fixes issue 8060. LGTM=dvyukov, rsc R=golang-codereviews, dvyukov, gobot, rsc CC=golang-codereviews https://codereview.appspot.com/110980044
* | | | test: return errors earlier in run.goJosh Bleecher Snyder2014-09-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue 8184. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://codereview.appspot.com/137510043
* | | | cmd/gc: emit write barriersRuss Cox2014-09-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A write *p = x that needs a write barrier (not all do) now turns into runtime.writebarrierptr(p, x) or one of the other variants. The write barrier implementations are trivial. The goal here is to emit the calls in the correct places and to incur the cost of those function calls in the Go 1.4 cycle. Performance on the Go 1 benchmark suite below. Remember, the goal is to slow things down (and be correct). We will look into optimizations in separate CLs, as part of the process of comparing Go 1.3 against tip in order to make sure Go 1.4 runs at least as fast as Go 1.3. benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 3118336716 3452876110 +10.73% BenchmarkFannkuch11 3184497677 3211552284 +0.85% BenchmarkFmtFprintfEmpty 89.9 107 +19.02% BenchmarkFmtFprintfString 236 287 +21.61% BenchmarkFmtFprintfInt 246 278 +13.01% BenchmarkFmtFprintfIntInt 395 458 +15.95% BenchmarkFmtFprintfPrefixedInt 343 378 +10.20% BenchmarkFmtFprintfFloat 477 525 +10.06% BenchmarkFmtManyArgs 1446 1707 +18.05% BenchmarkGobDecode 14398047 14685958 +2.00% BenchmarkGobEncode 12557718 12947104 +3.10% BenchmarkGzip 453462345 472413285 +4.18% BenchmarkGunzip 114226016 115127398 +0.79% BenchmarkHTTPClientServer 114689 112122 -2.24% BenchmarkJSONEncode 24914536 26135942 +4.90% BenchmarkJSONDecode 86832877 103620289 +19.33% BenchmarkMandelbrot200 4833452 4898780 +1.35% BenchmarkGoParse 4317976 4835474 +11.98% BenchmarkRegexpMatchEasy0_32 150 166 +10.67% BenchmarkRegexpMatchEasy0_1K 393 402 +2.29% BenchmarkRegexpMatchEasy1_32 125 142 +13.60% BenchmarkRegexpMatchEasy1_1K 1010 1236 +22.38% BenchmarkRegexpMatchMedium_32 232 301 +29.74% BenchmarkRegexpMatchMedium_1K 76963 102721 +33.47% BenchmarkRegexpMatchHard_32 3833 5463 +42.53% BenchmarkRegexpMatchHard_1K 119668 161614 +35.05% BenchmarkRevcomp 763449047 706768534 -7.42% BenchmarkTemplate 124954724 134834549 +7.91% BenchmarkTimeParse 517 511 -1.16% BenchmarkTimeFormat 501 514 +2.59% benchmark old MB/s new MB/s speedup BenchmarkGobDecode 53.31 52.26 0.98x BenchmarkGobEncode 61.12 59.28 0.97x BenchmarkGzip 42.79 41.08 0.96x BenchmarkGunzip 169.88 168.55 0.99x BenchmarkJSONEncode 77.89 74.25 0.95x BenchmarkJSONDecode 22.35 18.73 0.84x BenchmarkGoParse 13.41 11.98 0.89x BenchmarkRegexpMatchEasy0_32 213.30 191.72 0.90x BenchmarkRegexpMatchEasy0_1K 2603.92 2542.74 0.98x BenchmarkRegexpMatchEasy1_32 254.00 224.93 0.89x BenchmarkRegexpMatchEasy1_1K 1013.53 827.98 0.82x BenchmarkRegexpMatchMedium_32 4.30 3.31 0.77x BenchmarkRegexpMatchMedium_1K 13.30 9.97 0.75x BenchmarkRegexpMatchHard_32 8.35 5.86 0.70x BenchmarkRegexpMatchHard_1K 8.56 6.34 0.74x BenchmarkRevcomp 332.92 359.62 1.08x BenchmarkTemplate 15.53 14.39 0.93x LGTM=rlh R=rlh CC=dvyukov, golang-codereviews, iant, khr, r https://codereview.appspot.com/136380043