From cd2e2f60e77c05d68755ce5df4c401be1ea5b0d3 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 1 Jul 2015 15:49:40 +1000 Subject: [PATCH] doc: add most major changes and most net changes to go1.5.html Change-Id: Ied305480f22b60767c4628e5a31236ac01eafc86 Reviewed-on: https://go-review.googlesource.com/11825 Reviewed-by: Brad Fitzpatrick --- doc/go1.5.html | 162 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 121 insertions(+), 41 deletions(-) diff --git a/doc/go1.5.html b/doc/go1.5.html index e8a1392340..879203bbfe 100644 --- a/doc/go1.5.html +++ b/doc/go1.5.html @@ -215,9 +215,9 @@ On NaCl, Go 1.5 requires SDK version pepper-39 or above because it now uses the get_random_bytes system call.

-
-Tools:
+

Tools

+
 build: external linking support for windows (https://golang.org/cl/7163, 7282, 7283, 7284, 7534, 7535)
 cmd/cover: tool now lives in the standard repository (https://golang.org/cl/9560)
 cmd/gc: constant arithmetic is based on math/big (https://golang.org/cl/7830, 7851, 7857, 8426, 7858, 7912, 8171)
@@ -241,29 +241,6 @@ cmd/gc: add -dynlink option (for amd64 only)
 cmd/ld: add -buildmode option
 cmd/trace: new command to view traces (https://golang.org/cl/3601)
 
-Performance:
-
-cmd/gc: evaluate concrete == interface without allocating (https://golang.org/cl/2096)
-cmd/gc: optimize memclr of slices and arrays (https://golang.org/cl/2520)
-cmd/gc: transform closure calls to function calls (https://golang.org/cl/4050)
-cmd/gc: transitive inlining (https://golang.org/cl/5952)
-cmd/gc, runtime: speed up some cases of _, ok := i.(T) (https://golang.org/cl/7697)
-cmd/gc: speed up large string switches (https://golang.org/cl/7698)
-cmd/gc: inline x := y.(*T) and x, ok := y.(*T) (https://golang.org/cl/7862)
-cmd/gc: allocate backing storage for non-escaping interfaces on stack (https://golang.org/cl/8201)
-encoding/xml: avoid an allocation for tags without attributes (https://golang.org/cl/4160)
-image: many optimizations
-runtime: add ARM runtime.cmpstring and bytes.Compare (https://golang.org/cl/8010)
-runtime: do not scan maps when k/v do not contain pointers (https://golang.org/cl/3288)
-runtime: reduce thrashing of gs between ps (https://golang.org/cl/9872)
-sort: number of Sort performance optimizations (https://golang.org/cl/2100, https://golang.org/cl/2614, ...)
-strconv: optimize decimal to string conversion (https://golang.org/cl/2105)
-strconv: optimize float to string conversion (https://golang.org/cl/5600)
-sync: add active spinning to Mutex (https://golang.org/cl/5430)
-math/big: faster assembly kernels for amd64 and 386 (https://golang.org/cl/2503, https://golang.org/cl/2560)
-math/big: faster "pure Go" kernels for platforms w/o assembly kernels (https://golang.org/cl/2480)
-regexp: port RE2's bitstate backtracker to the regexp package (https://golang.org/cl/2153)
-
 Assembler:
 
 New cmd/asm tool (now use go tool asm, not go tool 6a)
@@ -288,6 +265,32 @@ Also expression evaluation now uses uint64s instead of signed integers and the
 precedence of operators is now Go-like rather than C-like.
 
+

Performance

+ +
+
+cmd/gc: evaluate concrete == interface without allocating (https://golang.org/cl/2096)
+cmd/gc: optimize memclr of slices and arrays (https://golang.org/cl/2520)
+cmd/gc: transform closure calls to function calls (https://golang.org/cl/4050)
+cmd/gc: transitive inlining (https://golang.org/cl/5952)
+cmd/gc, runtime: speed up some cases of _, ok := i.(T) (https://golang.org/cl/7697)
+cmd/gc: speed up large string switches (https://golang.org/cl/7698)
+cmd/gc: inline x := y.(*T) and x, ok := y.(*T) (https://golang.org/cl/7862)
+cmd/gc: allocate backing storage for non-escaping interfaces on stack (https://golang.org/cl/8201)
+encoding/xml: avoid an allocation for tags without attributes (https://golang.org/cl/4160)
+image: many optimizations
+runtime: add ARM runtime.cmpstring and bytes.Compare (https://golang.org/cl/8010)
+runtime: do not scan maps when k/v do not contain pointers (https://golang.org/cl/3288)
+runtime: reduce thrashing of gs between ps (https://golang.org/cl/9872)
+sort: number of Sort performance optimizations (https://golang.org/cl/2100, https://golang.org/cl/2614, ...)
+strconv: optimize decimal to string conversion (https://golang.org/cl/2105)
+strconv: optimize float to string conversion (https://golang.org/cl/5600)
+sync: add active spinning to Mutex (https://golang.org/cl/5430)
+math/big: faster assembly kernels for amd64 and 386 (https://golang.org/cl/2503, https://golang.org/cl/2560)
+math/big: faster "pure Go" kernels for platforms w/o assembly kernels (https://golang.org/cl/2480)
+regexp: port RE2's bitstate backtracker to the regexp package (https://golang.org/cl/2153)
+
+

Core library

Flag

@@ -345,6 +348,53 @@ values produce the same results as the corresponding IEEE-754 arithmetic on those values.

+

Go types

+ +

+The go/types package +up to now has been maintained in the golang.org/x +repository; as of Go 1.5 it has been relocated to the main repository. +The code at the old location is now deprecated. +There is also a modest API change in the package, discussed below. +

+ +

+Associated with this move, the +go/constant +package also moved to the main repository; +it was golang.org/x/tools/exact before. +The go/importer package +also moved to the main repository, +as well as some tools described above. +

+ +

Net

+ +

+The DNS resolver in the net package has almost always used cgo to access +the system interface. +A change in Go 1.5 means that on most Unix systems DNS resolution +will no longer require cgo, which simplifies execution +on those platforms. +Now, if the system's networking configuration permits, the native Go resolver +will suffice. +The important effect of this change is that each DNS resolution occupies a goroutine +rather than a thread, +so a program with multiple outstanding DNS requests will consume fewer operating +system resources. +

+ +

+The decision of how to run the resolver applies at run time, not build time. +The netgo build tag that has been used to enforce the use +of the Go resolver is no longer necessary, although it still works. +

+ +

+This change applies to Unix systems only. +Windows, Mac OS X, and Plan 9 systems behave as before. +

+

Reflect

@@ -352,7 +402,7 @@ The reflect package has two new functions: ArrayOf and FuncOf. These functions, analogous to the extant -SliceOffunction, +SliceOf function, create new types at runtime to describe arrays and functions.

@@ -488,6 +538,16 @@ reserves GOARCH values for a number of architectures that Go might This is not a promise that it will. +
  • +The (newly migrated) go/types +package allows one to control the prefix attached to package-level names using +the new Qualifier +function type as an argument to several functions. This is an API change for +the package, but since it is new to the core, it is not breaking the Go 1 compatibility +rules since code that uses the package must explicitly ask for it at its new location. +TODO: There should be a gofix for this. +
  • +
  • The io package adds a CopyBuffer function @@ -530,15 +590,23 @@ package that implements the quoted-printable encoding defined by RFC 2045.
  • -TODO net: add sequential and RFC 6555-compliant TCP dialing (https://golang.org/cl/8768) +Go 1.5's net package +adds RFC-6555-compliant dialing for sites with multiple TCP +addresses listed in DNS. +A new DualStack field +in Dialer enables the feature.
  • -TODO net: add Source field to OpError (https://go-review.googlesource.com/9231) -
  • - -
  • -TODO net: fix inconsistent errors (https://golang.org/cl/9236) +A number of inconsistencies in the types returned by errors in the +net package have been +tidied up. +Most now return an +OpError value +with more information than before. +Also, the OpError +type now includes a Source field that holds the local +network address.
  • @@ -546,27 +614,39 @@ TODO net: add SocketConn, SocketPacketConn (https://golang.org/cl/9275)
  • -TODO net: use Go's DNS resolver when system configuration permits (https://golang.org/cl/8945) -
  • - -
  • -TODO net/http: support for setting trailers from a server Handler (https://golang.org/cl/2157) +The net/http package now +has support for setting trailers from a server Handler. +For details, see the documentation for +ResponseWriter.
  • -TODO net/http: ignore the Unix epoch time in ServeContent (https://golang.org/cl/7915) +Also in the net/http package, +there is code to ignore the zero Time value +in the ServeContent function. +As of Go 1.5, it now also ignores a time value equal to the Unix epoch.
  • -TODO net/http/cgi: fix REMOTE_ADDR, REMOTE_HOST, add REMOTE_PORT (https://golang.org/cl/4933) +The net/http/cgi package +had a bug that mishandled the values of the environment variables +REMOTE_ADDR ad REMOTE_HOST. +This has been fixed. +Also, starting with Go 1.5 the package sets the REMOTE_PORT +variable.
  • -TODO net/mail: adds AddressParser type (https://golang.org/cl/10392) +The net/mail package +adds a AddressParser +type that can parse mail addresses.
  • -TODO net/smtp: add TLSConnectionState accessor (https://golang.org/cl/2151) +The net/smtp package +now has a TLSConnectionState +accessor to the Client +type that returns the client's TLS state.
  • -- 2.50.0