- 05 Mar, 2015 26 commits
-
-
Russ Cox authored
Starting it lazily causes a memory allocation (for the goroutine) during GC. First use of channels for runtime implementation. Change-Id: I9cd24dcadbbf0ee5070ee6d0ed7ea415504f316c Reviewed-on: https://go-review.googlesource.com/6960 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Matthew Dempsky authored
Previously, gc would compile code like func foo() { ... } var bar = foo by emitting a static closure to wrap "foo", but then emitting runtime initialization code to assign the closure to "bar". This CL changes gc to instead statically initialize "bar". Notably, this change shrinks the "go" tool's text segment by ~7.4kB on linux/amd64 while only increasing the data segment by ~100B: text data bss dec hex filename 7237819 122412 215616 7575847 739927 go.before 7230398 122540 215232 7568170 737b2a go.after Fixes issue #10081. Change-Id: If5e26cf46b323393ba6f2199a82a06e9e4baf411 Reviewed-on: https://go-review.googlesource.com/6880 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Rob Pike authored
Remove the per-achitecture formatter for Prog and replace it with a global String method. Clean up and regularize the output. Update tests affected by the format; some tests are made correct now when they were broken before (and known to be). Also, related: Change the encoding of the (R1+R2) syntax on ppc64 to be equivalent to (R1)(R2*1), which means it needs no special handling. Delete the now unused STRINGSZ constant. Change-Id: I7f6654d11f80065f3914a3f19353f2f12edfe310 Reviewed-on: https://go-review.googlesource.com/6931Reviewed-by: Russ Cox <rsc@golang.org>
-
Martin Möhrmann authored
Use optimized formatBits function to format mantissa and exponent. Add benchmark for binary exponent float format. on darwin/386 benchmark old ns/op new ns/op delta BenchmarkAppendFloatBinaryExp 520 122 -76.54% on darwin/amd64 benchmark old ns/op new ns/op delta BenchmarkAppendFloatBinaryExp 76.9 84.3 +9.62% Change-Id: If543552f1960e1655bed3a4130914e5eaa3aac69 Reviewed-on: https://go-review.googlesource.com/5600Reviewed-by: Robert Griesemer <gri@golang.org>
-
Russ Cox authored
I asked for this in CL 3742 and it was ignored. Change-Id: I30ad05f87c7d9eccb11df7e19288e3ed2c7e2e3f Reviewed-on: https://go-review.googlesource.com/6930Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Russ Cox authored
Change-Id: I815b685e261065bad3416b55feb4fec68974c9a0 Reviewed-on: https://go-review.googlesource.com/6896Reviewed-by: Rob Pike <r@golang.org>
-
Dmitry Vyukov authored
Cleanup after https://go-review.googlesource.com/3742 Change-Id: Iff3ceffc31b778b1ed0b730696fce6d1b5124447 Reviewed-on: https://go-review.googlesource.com/6761Reviewed-by: Minux Ma <minux@golang.org>
-
Rob Pike authored
With the new unificiation, the flag must be TYPE_CONST to print properly. Change-Id: I7cd1c56355724f08cbe9afc6ab7a66904031adc9 Reviewed-on: https://go-review.googlesource.com/6903Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Change-Id: I3a2b17e218aa05cfb67d7561e0b52a6df766924d Reviewed-on: https://go-review.googlesource.com/6897 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
This was in i386 but not in x86 and was missed during the merge. Needed for linux/386. Change-Id: Ia6e495c044f53bcb98f3bb03e20d8f6d35a8f8ff Reviewed-on: https://go-review.googlesource.com/6902Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Change-Id: If2872e73da4daa4ff1912883d30c8fc9754ef552 Reviewed-on: https://go-review.googlesource.com/6894Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Now unused. Change-Id: I0ba27e58721ad66cc3068346d6d31ba0ac37ad64 Reviewed-on: https://go-review.googlesource.com/6893Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
Russ Cox authored
Change-Id: I7d289c7f250e4db551192d52535a90974685f0b3 Reviewed-on: https://go-review.googlesource.com/6891Reviewed-by: Minux Ma <minux@golang.org>
-
Rob Pike authored
Support the old syntax for AX:DX by rewriting into the new form, AX, DX. Delete now-unnecessary hacks for some special cases. Change-Id: Icd42697c7617f8a50864ca8b0c69469321a2296e Reviewed-on: https://go-review.googlesource.com/6901Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
(Because that's what the assembly files actually say - no $ on the constant.) Change-Id: Idb774cdca0e089c4ac24ab665e23290bf7b565bf Reviewed-on: https://go-review.googlesource.com/6895Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Nothing uses it, nothing should start using it. Stop leaving plausible-looking values there. It would be nice to remove entirely, but that would require a new version number for the object file format, in order not to break external readers like debug/gosym. It's easier to leave and poison. I came across an old mail thread suggesting we start using it to speed up tracebacks. I want to make sure that doesn't happen. (The values there were never quite right, and the number is fundamentally PC-specific anyway.) Change-Id: Iaf38e8a6b523cbae30b69c28497c4588ef397519 Reviewed-on: https://go-review.googlesource.com/6890Reviewed-by: Minux Ma <minux@golang.org>
-
Russ Cox authored
Make cmd/internal/obj/x86 support 32-bit mode and use instead of cmd/internal/obj/i386. Delete cmd/internal/obj/i386. Clean up encoding of PINSRQ, CMPSD to use explicit third arg instead of jamming it into an unused slot of a different arg. Also fix bug in old6a, which declared the wrong grammar. The accepted (and encoded) arguments to CMPSD etc are mem,reg not reg,mem. Code that did try to use mem,reg before would be rejected by liblink, so only reg,reg ever worked, so existing code is not affected. After this change, code can use mem,reg successfully. The real bug here is that the encoding tables inverted the argument order, making the comparisons all backward from what they say on the page. It's too late to swap them, though: people have already written code that expects the inverted comparisons (like in package math, and likely externally). The best we can do is make the argument that should and can take a memory operand accept it. Bit-for-bit compatibility checked against tree without this CL. Change-Id: Ife5685bc98c95001f64407f35066b34b4dae11c1 Reviewed-on: https://go-review.googlesource.com/6810Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Add unused (but initialized) from3 field to ytab, f3t to movtab. Remove level of indentation in movtab processing. Change-Id: I8475988f46b541ecaccf8d34608da8bef7d12e24 Reviewed-on: https://go-review.googlesource.com/6892Reviewed-by: Rob Pike <r@golang.org>
-
Dave Cheney authored
Node.Needzero only has two values and acts as a bool, so make it a bool. Change-Id: Ica46e5ebafbe478017ea52ce6bb335f404059677 Reviewed-on: https://go-review.googlesource.com/6800Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shenghou Ma authored
Fixes #10066. Change-Id: I43c423793dd094989e921e163a06b12181a35719 Signed-off-by: Shenghou Ma <minux@golang.org> Reviewed-on: https://go-review.googlesource.com/6750 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Chris Manghane <cmang@golang.org>
-
Shenghou Ma authored
Change-Id: I520a0f2c2d14f744a5d2e8cf93963eec1cf3e9ba Signed-off-by: Shenghou Ma <minux@golang.org> Reviewed-on: https://go-review.googlesource.com/6732Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Russ Cox authored
This avoids repeated allocation and map lookups when constructing the pcln tables. For 6g compiling cmd/internal/gc/*.go this saves about 8% wall time. Change-Id: I6a1a80e278ae2c2a44bd1537015ea7b4e7a4d6ca Reviewed-on: https://go-review.googlesource.com/6793Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Remove blank lines and merge lone imports into blocks. Change-Id: Ib46dad584456909969f1ba3a2c7f5667abf336ae Reviewed-on: https://go-review.googlesource.com/6792Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Change-Id: I764933f4928bb9d0d119fbfe44a193ce1449b61e Reviewed-on: https://go-review.googlesource.com/6791Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Robert Griesemer authored
Change-Id: Ib813eb5960c3310b1c919f25f687560f4f9d63b0 Reviewed-on: https://go-review.googlesource.com/6820Reviewed-by: Russ Cox <rsc@golang.org>
-
Michael Hudson-Doyle authored
For OSes that use elf on intel, 2*Ptrsize bytes are reserved for TLS. But only one pointer (g) has been stored in the TLS for a while now. So we can set it to just Ptrsize, which happily matches what happens when externally linking. Fixes #9913 Change-Id: Ic816369d3a55a8cdcc23be349b1a1791d53f5f81 Reviewed-on: https://go-review.googlesource.com/6584 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 04 Mar, 2015 14 commits
-
-
David Crawshaw authored
Accidental semantics change in 4c6364a8. Change-Id: I0bbfc441662d79af4dbac6f9fc4e3a485adfb924 Reviewed-on: https://go-review.googlesource.com/6831Reviewed-by: Minux Ma <minux@golang.org>
-
Nigel Tao authored
Change-Id: I83de9d83708edc8d196bbcfdc7d2ba7ffaff50d2 Reviewed-on: https://go-review.googlesource.com/6586Reviewed-by: Rob Pike <r@golang.org>
-
Alex Brainman authored
Fixes #10072 Change-Id: I1f73c8829a89144d49433a36a4e64223c74af954 Reviewed-on: https://go-review.googlesource.com/6585Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
Change-Id: Ice4f78e74ec3025a974ffd9ca5e3d28bb3164f40 Reviewed-on: https://go-review.googlesource.com/6794Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: David Crawshaw <crawshaw@golang.org>
-
Shenghou Ma authored
Change-Id: Id1927180ecd18b849727225adea05465d36b3973 Reviewed-on: https://go-review.googlesource.com/6210Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Rick Hudson authored
This is an experiment to see if removing the boundary bit logic will lead to fewer cache misses and improved performance. Instead of using boundary bits we use the span information to get element size and use some bit whacking to get the boundary without having to touch the random heap bits which cause cache misses. Furthermore once the boundary bit is removed we can either use that bit for a simpler checkmark routine or we can reduce the number of bits in the GC bitmap to 2 bits per pointer sized work. For example the 2 bits at the boundary can be used for marking and pointer/scalar differentiation. Since we don't need the mark bit except at the boundary nibble of the object other nibbles can use this bit as a noscan bit to indicate that there are no more pointers in the object. Currently the changed included in this CL slows down the garbage benchmark. With the boundary bits garbage gives 5.78 and without (this CL) it gives 5.88 which is a 2% slowdown. Change-Id: Id68f831ad668176f7dc9f7b57b339e4ebb6dc4c2 Reviewed-on: https://go-review.googlesource.com/6665Reviewed-by: Austin Clements <austin@google.com>
-
Robert Griesemer authored
Change-Id: I932c2f1b1d27c437722cd27d2001b085a655c572 Reviewed-on: https://go-review.googlesource.com/6722Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Change-Id: Ide0615542d67b7d81bf6c56aab550e142a8789f7 Reviewed-on: https://go-review.googlesource.com/6682Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Change-Id: If04840c34b0ac5168ce1699eae880f04ae21c84c Reviewed-on: https://go-review.googlesource.com/6680Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Shifts are trivially implemented by combining Float.MantExp and Float.SetMantExp. Change-Id: Ia2fb49297d8ea7aa7d64c8b1318dc3dc7c8af2f7 Reviewed-on: https://go-review.googlesource.com/6671Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
This change represents Accuracy as a bit pattern rather than an ordered value; with a new value Undef which is both Below and Above. Change-Id: Ibb96294c1417fb3cf2c3cf2374c993b0a4e106b3 Reviewed-on: https://go-review.googlesource.com/6650Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Change-Id: I9a6ebb747d5b9756c214bdeb19f60820602d7a24 Reviewed-on: https://go-review.googlesource.com/6340Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
This change introduces NaNs (for situations like Inf-Inf, etc.). The implementation is incomplete (the four basic operations produce a NaN if any of the operands is an Inf or a NaN); and some operations produce incorrect accuracy for NaN arguments. These are known bugs which are documented. Change-Id: Ia88841209e47930681cef19f113e178f92ceeb33 Reviewed-on: https://go-review.googlesource.com/6540Reviewed-by: Alan Donovan <adonovan@google.com>
-
Russ Cox authored
These benchmarks show the effect of the combination of this change and Rick's pending CL 6665. Code with interior pointers is helped much more than code without, but even code without doesn't suffer too badly. benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 6989407768 6851728175 -1.97% BenchmarkFannkuch11 4416250775 4405762558 -0.24% BenchmarkFmtFprintfEmpty 134 130 -2.99% BenchmarkFmtFprintfString 491 402 -18.13% BenchmarkFmtFprintfInt 430 420 -2.33% BenchmarkFmtFprintfIntInt 748 663 -11.36% BenchmarkFmtFprintfPrefixedInt 602 534 -11.30% BenchmarkFmtFprintfFloat 728 699 -3.98% BenchmarkFmtManyArgs 2528 2507 -0.83% BenchmarkGobDecode 17448191 17749756 +1.73% BenchmarkGobEncode 14579824 14370183 -1.44% BenchmarkGzip 656489990 652669348 -0.58% BenchmarkGunzip 141254147 141099278 -0.11% BenchmarkHTTPClientServer 94111 93738 -0.40% BenchmarkJSONEncode 36305013 36696440 +1.08% BenchmarkJSONDecode 124652000 128176454 +2.83% BenchmarkMandelbrot200 6009333 5997093 -0.20% BenchmarkGoParse 7651583 7623494 -0.37% BenchmarkRegexpMatchEasy0_32 213 213 +0.00% BenchmarkRegexpMatchEasy0_1K 511 494 -3.33% BenchmarkRegexpMatchEasy1_32 186 187 +0.54% BenchmarkRegexpMatchEasy1_1K 1834 1827 -0.38% BenchmarkRegexpMatchMedium_32 427 412 -3.51% BenchmarkRegexpMatchMedium_1K 154841 153086 -1.13% BenchmarkRegexpMatchHard_32 7473 7478 +0.07% BenchmarkRegexpMatchHard_1K 233587 232272 -0.56% BenchmarkRevcomp 918797689 944528032 +2.80% BenchmarkTemplate 167665081 167773121 +0.06% BenchmarkTimeParse 631 636 +0.79% BenchmarkTimeFormat 672 666 -0.89% Change-Id: Ia923de3cdb3993b640fe0a02cbe2c7babc16f32c Reviewed-on: https://go-review.googlesource.com/6782Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-