1
0
mirror of https://github.com/golang/go synced 2024-10-04 07:21:22 -06:00
Commit Graph

3295 Commits

Author SHA1 Message Date
Russ Cox
718be3215f in C and asm, replace pkg·name with ·name
(eliminate assumption of package global name space,
make code easier to move between packages).

R=r
CC=golang-dev
https://golang.org/cl/194072
2010-01-25 18:52:55 -08:00
Stephen Weinberg
c90b05bf7d xml: add Escape, copied from template.HTMLEscape.
R=rsc
CC=golang-dev
https://golang.org/cl/186282
2010-01-25 18:50:51 -08:00
Petar Maymounkov
8814555534 http: make Request.Body an io.ReadCloser, matching Response.Body.
R=rsc, rsc1
CC=golang-dev
https://golang.org/cl/194046
2010-01-25 18:49:08 -08:00
Russ Cox
60a6ec1c93 ld: typo
R=ken2
CC=golang-dev
https://golang.org/cl/194073
2010-01-25 18:48:18 -08:00
Russ Cox
7263bfc73b cc: correct handling of leading ·
R=ken2
CC=golang-dev
https://golang.org/cl/193081
2010-01-25 18:31:44 -08:00
Russ Cox
531e6b77c8 eliminate package global name space
R=ken2
CC=golang-dev
https://golang.org/cl/194071
2010-01-25 18:31:35 -08:00
Russ Cox
1912632019 runtime, type switch: eliminate package global name space assumption
bonus: type switch now detects multiple uses of identical interface types.
bonus: interface types are now order-independent, following the spec.

R=ken2
CC=golang-dev
https://golang.org/cl/194053
2010-01-25 18:23:20 -08:00
Russ Cox
3b1a0355b6 5l, 6l, 8l: accept only one object file
(package main; others are pulled in automatically)

R=ken2
CC=golang-dev
https://golang.org/cl/194069
2010-01-25 17:53:43 -08:00
Robert Griesemer
dc061ffcbe steps towards a simplified parser interface
minor cleanups (which I did at home before
but missed this morning at work)

R=rsc
CC=golang-dev
https://golang.org/cl/193095
2010-01-25 17:24:50 -08:00
Andrey Mirtchovski
3fc41d5e65 net: parse aliases in /etc/hosts correctly
Previous behaviour only picked the first entry (official hostname) but not the aliases.

R=rsc
CC=golang-dev
https://golang.org/cl/193092
2010-01-25 14:57:04 -08:00
Robert Griesemer
6d8829e931 A <- token in an expression may introduce a channel type.
Fixes #530.

R=rsc
CC=golang-dev
https://golang.org/cl/193091
2010-01-25 12:03:53 -08:00
Robert Griesemer
fcf4517423 Scoping snapshot.
- separate parsing from declaration
- setup of correct scopes

R=rsc
CC=golang-dev
https://golang.org/cl/189098
2010-01-25 10:06:18 -08:00
Russ Cox
69e244a104 ld: do not load the same object file multiple times.
eliminates spurious multiple initialization errors.

give more information in the multiple init errors that remain.

Fixes #87.

R=r
CC=golang-dev
https://golang.org/cl/194052
2010-01-25 08:53:27 -08:00
Christopher Wedgwood
34191d943b Remove top-level (src/) Makefile.
R=rsc, dho, r
CC=golang-dev
https://golang.org/cl/194045
2010-01-25 00:09:46 -08:00
Russ Cox
1cecac8134 gc: record full package paths in runtime type data
detect compilation of special package runtime with
compiler flag instead of package name.

R=ken2
CC=golang-dev
https://golang.org/cl/193080
2010-01-24 23:33:59 -08:00
Russ Cox
d1b14a6fb0 gc: bug247, reported by rob
R=ken2
CC=golang-dev
https://golang.org/cl/194051
2010-01-24 22:42:18 -08:00
Russ Cox
fd150e77e1 gc: cut some dead code, fix 6g -S output
R=ken2
CC=golang-dev
https://golang.org/cl/193079
2010-01-24 22:36:26 -08:00
Russ Cox
758f2bc556 eliminate the package global name space assumption in object files
5g/6g/8g: add import statements to export metadata, mapping package path to package name.
	recognize "" as the path of the package in export metadata.
	use "" as the path of the package in object symbol names.

5c/6c/8c, 5a/6a/8a: rewrite leading . to "". so that ·Sin means Sin in this package.

5l/6l/8l: rewrite "" in symbol names as object files are read.

gotest: handle new symbol names.

gopack: handle new import lines in export metadata.

Collectively, these changes eliminate the assumption of a global
name space in the object file formats.  Higher level pieces such as
reflect and the computation of type hashes still depend on the
assumption; we're not done yet.

R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/186263
2010-01-22 17:06:20 -08:00
Dean Prichard
07d3e0dce4 5a/6a/8a: avoid fixed-sized file name buffer
R=rsc
CC=golang-dev
https://golang.org/cl/186279
2010-01-22 16:59:17 -08:00
Russ Cox
ce7f345cd1 gc: do not build builtin.c automatically; use golden copy instead.
R=r
CC=golang-dev
https://golang.org/cl/190104
2010-01-22 16:58:33 -08:00
Russ Cox
c634189d56 typo
R=r
CC=golang-dev
https://golang.org/cl/190103
2010-01-22 14:24:17 -08:00
Ian Lance Taylor
82a7de9dfd Fix build: add new file to Makefile.
TBR=frm.adiputra
CC=golang-dev
https://golang.org/cl/193055
2010-01-22 07:12:54 -08:00
Firmansyah Adiputra
9628d4c6eb Add authentication.
Other code fixing:
- Fixed bugs in get32.
- Fix code for parsing display string (as a new function).
- Fix code for connecting to X server. The old code only work
  if the server is listening to TCP port, otherwise it doesn't
  work (at least in my PC).

R=nigeltao_golang, rsc, jhh
CC=golang-dev
https://golang.org/cl/183111
2010-01-22 17:55:44 +11:00
Christopher Wedgwood
2a57a5c9c7 Trim space on input to make searching more robust.
R=rsc, r, gri
CC=golang-dev
https://golang.org/cl/186255
2010-01-22 14:26:15 +11:00
Ken Thompson
cd47c903e2 part 2 of sudoaddable optimization
R=rsc
CC=golang-dev
https://golang.org/cl/190088
2010-01-20 13:07:14 -08:00
Russ Cox
a6736fa4ff cleanup toward eliminating package global name space
* switch to real dot (.) instead of center dot (·) everywhere in object files.
    before it was half and half depending on where in the name it appeared.
  * in 6c/6a/etc identifiers, · can still be used but turns into . immediately.
  * in export metadata, replace package identifiers with quoted strings
    (still package names, not paths).

R=ken2, r
CC=golang-dev
https://golang.org/cl/190076
2010-01-19 21:34:44 -08:00
Russ Cox
0365b989a4 runtime: wait to allocate mach semaphores backing Locks until needed
need better management of mach semaphores eventually
but this avoids allocating them for uncontended Locks.

R=r
CC=agl1, golang-dev
https://golang.org/cl/190079
2010-01-19 21:14:15 -08:00
Ken Thompson
dfc0ed9559 start of better addressing of
arrays/slices in structures

R=rsc
CC=golang-dev
https://golang.org/cl/190077
2010-01-19 19:59:57 -08:00
Rob Pike
4d45dd3268 first part of networked channels.
limitations:
	poor error handling
	teardown not done
	exporter must send, importer must receive
	testing is rudimentary at best

R=rsc
CC=golang-dev
https://golang.org/cl/186234
2010-01-20 14:12:29 +11:00
Russ Cox
75c6dc9f6c http: handle old HTTP/1.0 unchunked "read to EOF" bodies.
Was trying to interpret raw body as chunked body.

Add test for ReadResponse.

Fixes #544.

R=r, petar-m
CC=golang-dev, shadowice
https://golang.org/cl/190068
2010-01-19 17:46:56 -08:00
Russ Cox
1634b4236b time: make tick.Stop a little more robust
R=r
CC=golang-dev, jackpal
https://golang.org/cl/186228
2010-01-19 17:46:21 -08:00
Russ Cox
fe01d4c8a1 gc: const debug bool = false
R=ken2
CC=golang-dev
https://golang.org/cl/186232
2010-01-19 15:25:44 -08:00
Russ Cox
14ccf44fc7 compress/zlib: add example to doc comment
Fixes #548.

R=r
CC=golang-dev, graycardinalster
https://golang.org/cl/190062
2010-01-19 13:09:50 -08:00
Russ Cox
ae3e8eb2ec ld: unused variable
R=r
CC=golang-dev
https://golang.org/cl/186229
2010-01-19 13:09:27 -08:00
Russ Cox
b9f26c32c3 hash: document that Sum does not change hash state
crypto/*: implement and test proper Sum

Fixes #216.

R=agl1
CC=golang-dev
https://golang.org/cl/186210
2010-01-19 10:50:04 -08:00
Petar Maymounkov
914c626cae Significant extension to http.Response, which now adheres to the
usage pattern of http.Request and paves the way to persistent connection
handling.

R=rsc
CC=golang-dev
https://golang.org/cl/185043
2010-01-18 21:46:59 -08:00
Russ Cox
4f8117d9eb build: move GOOS, GOARCH, GOROOT lookup into central library.
bake default values in during build.

R=r
CC=golang-dev
https://golang.org/cl/186173
2010-01-18 21:46:46 -08:00
Russ Cox
ff6e310b00 gc: bug245
Fixes #529.

R=ken2
CC=golang-dev
https://golang.org/cl/186215
2010-01-18 17:30:15 -08:00
Russ Cox
8e996304f3 gc: multiple return value at top-level invoked multiple times
Fixes #402.

R=ken2
CC=golang-dev
https://golang.org/cl/186214
2010-01-18 17:00:38 -08:00
Russ Cox
e0059ae811 gc: bug243
Fixes #481.

R=ken2
CC=golang-dev
https://golang.org/cl/186213
2010-01-18 16:52:18 -08:00
Russ Cox
5a5799f613 gc: more precise handling of import .
Fixes #455.

R=ken2
CC=golang-dev
https://golang.org/cl/186212
2010-01-18 16:26:40 -08:00
Russ Cox
07fc145744 gc: be more specific about copy type errors
Fixes #539.

R=ken2
CC=golang-dev
https://golang.org/cl/190043
2010-01-18 16:00:13 -08:00
Russ Cox
da225c231f reflect: fix garbage collection bug in Call.
Fixes #476.

R=r
CC=golang-dev
https://golang.org/cl/190041
2010-01-18 15:59:50 -08:00
Russ Cox
7c1bb00374 net: enable UDP broadcast before it is needed (instead of after)
Fixes #526.

R=r
CC=golang-dev
https://golang.org/cl/186211
2010-01-18 15:59:32 -08:00
Robert Griesemer
e85f8378b8 Urgent parser/gofmt fix.
Wrong position information for identifier
could lead to destructive reformatting of
source via hg gofmt.

R=rsc
CC=golang-dev
https://golang.org/cl/189100
2010-01-15 23:17:48 -08:00
Rob Pike
11b459cba8 give bufio.Writer.WriteString the same signature as
bytes.Buffer.WriteString

Fixes #535.

R=rsc
CC=golang-dev
https://golang.org/cl/189096
2010-01-16 13:06:50 +11:00
Ian Lance Taylor
c332ff42fe Don't check array bounds if we have been told not to.
Fixes range.go test for 6g.

R=rsc
CC=golang-dev
https://golang.org/cl/189093
2010-01-15 13:51:57 -08:00
Russ Cox
08d3f5e271 template: look inside interface values
R=r
CC=golang-dev
https://golang.org/cl/186169
2010-01-15 13:49:31 -08:00
Yves Junqueira
d6054fcd88 Use /etc/hosts when resolving names.
http://code.google.com/p/go/issues/detail?id=313

This conflics with Chris' patch at:
https://golang.org/cl/181063

But I believe this is more complete since it has a simple caching and proper tests.

R=cw, rsc
CC=golang-dev
https://golang.org/cl/183066
2010-01-15 13:43:14 -08:00
Robert Griesemer
01b4f2dd23 Steps towards tracking scopes for identifiers.
- Identifiers refer now to the language entity (Object)
	  that they denote. At the moment this is at best an
	  approximation.

	- Initial data structures for language entities (Objects)
          and expression types (Type) independent of the actual
	  type notations.

	- Initial support for declaring and looking up identifiers.

	- Updated various dependent files and added support functions.

	- Extensively tested to avoid breakage. This is an AST change.

R=rsc
CC=golang-dev, rog
https://golang.org/cl/189080
2010-01-15 13:27:45 -08:00
Jan H. Hosang
67237c0f11 Implemented ExtendFront/Back functions to insert a list of elements into a list.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/181151
2010-01-15 13:26:13 -08:00
Charles L. Dorian
9a6b8e21e4 math: special cases for Hypot
Added special case tests to all_test.go. Added tests to hypot.go,
otherwise hangs.

R=rsc
CC=golang-dev
https://golang.org/cl/186118
2010-01-15 13:21:47 -08:00
Charles L. Dorian
7f11db5ea9 math: 386 FPU functions
sin, cos, tan, asin, acos, atan, exp, log, log10,
floor, ceil, and fabs

R=rsc
CC=golang-dev
https://golang.org/cl/189083
2010-01-15 13:21:36 -08:00
Nigel Tao
8cf627ad57 Fix s/Width/Height/ typo in draw.go.
Fixes #531.

R=r
CC=golang-dev
https://golang.org/cl/189078
2010-01-15 11:58:24 +11:00
Rob Pike
10a5eb0a29 fix +0000 time zones.
Fixes #527.

R=rsc
CC=golang-dev
https://golang.org/cl/186159
2010-01-15 10:56:16 +11:00
Russ Cox
da9bc7ae7d runtime: add demo running Go on raw (emulated) hw
8l: add GOOS=pchw, stop spelling out all the elf numbers.

R=r
CC=golang-dev
https://golang.org/cl/186144
2010-01-13 19:51:59 -08:00
Devon H. O'Dell
1564b984a5 runtime: GS already set up by setldt in Linux/386; remove duplicate
R=rsc
CC=golang-dev
https://golang.org/cl/186146
2010-01-13 17:50:12 -08:00
Russ Cox
12518e441b runtime cleanup.
* move memory code into $GOOS-specific directory.
  * allow printing of static strings < 256 bytes.
    (dynamic strings will bump maxstring as they are allocated.)
  * use cgo2c for runtime.mal.

R=r, dho
CC=golang-dev
https://golang.org/cl/186143
2010-01-13 17:50:02 -08:00
Rob Pike
d9283b27a2 clean up handling of numeric time zones
allow formatting of ruby-style times.

Fixes #518.

R=rsc
CC=golang-dev
https://golang.org/cl/186119
2010-01-14 11:57:38 +11:00
Devon H. O'Dell
e8afb6d87f cgo: Only allow numeric / string / character type constants for references
to #defined things.

Fixes #520.

R=rsc, rsaarelm
CC=golang-dev
https://golang.org/cl/186138
2010-01-13 16:48:14 -08:00
Robert Griesemer
27be2915f3 Distinguish between html generation and html quoting in godoc formatters.
Replacement for CL 184084; originally by Roger Peppe (rogpeppe@gmail.com).

R=rsc
CC=golang-dev, rog
https://golang.org/cl/189059
2010-01-13 15:18:56 -08:00
Russ Cox
6ae763a727 vector: drop rule for bench, now in Make.pkg
R=gri
CC=golang-dev
https://golang.org/cl/186139
2010-01-13 13:29:49 -08:00
Russ Cox
1c6c0eee20 godoc: skip template wrapping for complete HTML files
demo at http://wreck:8080/doc/
click on go_talk-20100112.html

R=gri
CC=golang-dev
https://golang.org/cl/186137
2010-01-13 13:09:33 -08:00
Devon H. O'Dell
14a74378f4 cgo: handle C99 bool type
Fixes #307.

R=rsc
CC=golang-dev
https://golang.org/cl/186073
2010-01-13 10:25:28 -08:00
Russ Cox
f85abf01bc runtime: reset DF flag after running external code on 386
R=r
CC=golang-dev
https://golang.org/cl/186108
2010-01-13 09:08:39 -08:00
Rob Pike
63d639295c don't worry about the number of spaces when parsing.
allow an underscore to stand for a space or digit if the following number is >=10.

R=rsc
CC=golang-dev
https://golang.org/cl/186115
2010-01-13 14:39:30 +11:00
Rob Pike
ccbcefe2b6 ignore $GOARCH inside the compiler and linker.
by definition, they know what they are building for.
makes it easier to switch architectures when testing.

% 6g x.go
% 6l x.6
% 6.out
"Wed Jan 13 10:57:46 EST 2010"
% 8g x.go
% 8l x.8
% 8.out
"Wed Jan 13 10:57:46 EST 2010"
% echo $GOARCH

%

R=rsc
CC=golang-dev
https://golang.org/cl/186116
2010-01-13 14:39:16 +11:00
Rob Pike
24dafbaa37 to improve the chances for compatibility, open a window of unused ids
and specify a lowest id granted to users.

R=rsc
CC=golang-dev
https://golang.org/cl/186081
2010-01-13 12:06:43 +11:00
Robert Griesemer
abda9e6f89 Light-weight scanner for general use.
Emphasis on minimal interface and fast scanning.
Recognizes all Go literals by default. Easily
configurable to recognize different whitespace
characters and tokens.

Provides detailed position information for each
token.

R=rsc, r
CC=golang-dev
https://golang.org/cl/181160
2010-01-12 17:04:45 -08:00
Adam Langley
cbd3b2e8d5 Add 'bench' target to makefiles.
R=rsc, agl, r
CC=golang-dev
https://golang.org/cl/188043
2010-01-12 15:43:20 -08:00
Russ Cox
711088106e runtime: fix bug in preemption checks; was causing "lock count" panics
R=r
CC=golang-dev
https://golang.org/cl/186078
2010-01-12 10:03:02 -08:00
Roger Peppe
9d4d7d8f99 Fix bug that prevented the gofmt test script being run on more
than one explicitly named file.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/186095
2010-01-12 09:45:11 -08:00
Charles L. Dorian
46206c52e3 math: special cases for Ceil, Exp, Floor, Log, Log10
Added special case tests to all_test.go. Added tests to Floor,
in-lined tests in Exp and Log.

R=rsc
CC=golang-dev
https://golang.org/cl/184081
2010-01-11 21:28:02 -08:00
Adam Langley
e7cceb85e4 asn1: fix marshaling of structures with >1 elements.
Fixes #515.

R=rsc
CC=golang-dev
https://golang.org/cl/184079
2010-01-11 18:54:13 -08:00
Adam Langley
72b97e46a3 asn1: fix parsing of elements after a string in a structure.
Fixes #516.

R=rsc
CC=golang-dev, golang-dev
https://golang.org/cl/184080
2010-01-11 18:53:58 -08:00
Rob Pike
2f63eb243c delete debugging prints
R=rsc
CC=golang-dev
https://golang.org/cl/186079
2010-01-11 17:35:51 -08:00
Rob Pike
ba5d0f2098 delete debugging prints
R=rsc
CC=golang-dev
https://golang.org/cl/186079
2010-01-11 17:35:06 -08:00
Rob Pike
937caef8fa add pprof output format to prof.
amd64 linux only.

R=rsc
CC=golang-dev
https://golang.org/cl/186077
2010-01-11 16:53:45 -08:00
Charles L. Dorian
3c7534104a math: special cases for Fmod
Added special case tests to all_test.go for Fmod. Fixed Fmod [hung
for Fmod(+/-Inf, <finite>)]. Also added test for Ceil in all_test.go.

R=rsc
CC=golang-dev
https://golang.org/cl/186076
2010-01-11 16:20:51 -08:00
Devon H. O'Dell
bc82aaddb6 cgo: Make constants #define'd in C available to Go (as consts)
Fixes #435

R=rsc
CC=golang-dev
https://golang.org/cl/181161
2010-01-11 13:05:26 -08:00
Yongjian Xu
d668d4fbbd gc: clean opnames.h
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/181186
2010-01-11 13:03:01 -08:00
Robert Griesemer
5dee91001b Remove -oldprinter flag from gofmt; all code is
now printed using the semicolon-free style.

Removed NoSemis flag and mechanism dealing with
optional semicolons from go/printer.

Updated all go/printer output files using the
semi-colon free style.

Changes have no formatting impact on checked in
go code under src and misc.

R=rsc, r
CC=golang-dev
https://golang.org/cl/184068
2010-01-11 12:58:13 -08:00
Rob Pike
00e2cda624 Clean up and make consistent the comments in the math package.
R=rsc
CC=golang-dev
https://golang.org/cl/186042
2010-01-12 07:38:31 +11:00
Russ Cox
093146b920 math: fix pow10 comment, test portable Sqrt
R=r
CC= golang-dev, Charlie Dorian, golang-dev
https://golang.org/cl/184058
2010-01-11 11:25:37 -08:00
David Symonds
0ed728c48a Replicate signal names from syscall in os/signal.
R=rsc
CC=golang-dev
https://golang.org/cl/183142
2010-01-11 11:23:46 -08:00
Robert Griesemer
93d81fb747 Partial work-around for gofmt bug.
Addresses some cases and respects position of
closing parenthesis; but doesn't work yet in
all cases. Heuristic; will need to be replaced
by a real solution eventually. Does not cause
existing code to be reformatted.

R=r
CC=golang-dev, rsc
https://golang.org/cl/186043
2010-01-11 10:38:06 -08:00
Charles L. Dorian
5336cd8f91 math: Sqrt using 386 FPU.
Note: sqrt_decl.go already in src/pkg/math/.

R=rsc
CC=golang-dev
https://golang.org/cl/183155
2010-01-10 15:41:07 -08:00
Russ Cox
5328df6534 runtime: check for preemption due to garbage collection
in various already expensive routines.

helps keep cpu utilization up when GOMAXPROCS > 1,
but not a full solution.

http://groups.google.com/group/golang-nuts/t/7a9535c4136d3e2

R=r
CC=golang-dev
https://golang.org/cl/184043
2010-01-09 09:47:45 -08:00
Charles L. Dorian
fd1db67e87 math: special cases for Atan, Asin and Acos
Added tests for NaN and out-of-range values.
Combined asin.go and atan.go into atan.go.

R=rsc
CC=golang-dev
https://golang.org/cl/180065
2010-01-08 14:12:10 -08:00
Russ Cox
307a899d5b gc: bug238
Fixes #471.

R=ken2
CC=golang-dev
https://golang.org/cl/181184
2010-01-08 00:01:03 -08:00
Russ Cox
1b1f39eb86 gc: bug219, bug239, bug240
Fixes #475.

R=ken2
CC=golang-dev
https://golang.org/cl/183157
2010-01-07 23:24:48 -08:00
Russ Cox
c6f4d68667 gc: bug241
Fixes #495.

R=ken2
CC=golang-dev
https://golang.org/cl/183156
2010-01-07 23:20:00 -08:00
Rob Pike
f3e7ddc2fb Rewrite tokenizer to clean up and fix a bug with spaces before delimited block.
Fixes #501.

R=rsc
CC=golang-dev
https://golang.org/cl/181183
2010-01-08 17:49:55 +11:00
Russ Cox
fe56e2cc35 http: most of a URL shouldn't use URL-escaping
Fixes #502.

R=r, hoisie
CC=golang-dev
https://golang.org/cl/181179
2010-01-07 18:10:29 -08:00
Rob Pike
448aa49cfe Add a parser to the time package, the inverse of time.Format
R=rsc
CC=golang-dev
https://golang.org/cl/183141
2010-01-08 12:59:20 +11:00
Robert Griesemer
35403e4cf2 added some missing periods
R=rsc
CC=golang-dev
https://golang.org/cl/181171
2010-01-07 09:27:24 -08:00
Rob Pike
676f9dfa06 make Format about twice as fast by removing allocations, using a bytes.Buffer
add a benchmark

R=rsc
CC=golang-dev
https://golang.org/cl/181164
2010-01-07 14:36:54 +11:00
Evan Shaw
a551ffe809 8g: float->uint64 conversion optimization
Using FUCOMIP instead of the FUCOMP-FSTSW-SAHF sequence gives better performance and saves code space.

R=rsc
CC=golang-dev
https://golang.org/cl/183139
2010-01-06 19:28:19 -08:00
Evan Shaw
c713a1f982 libmach: Add disassembly for newly implemented opcodes
R=rsc
CC=golang-dev
https://golang.org/cl/183140
2010-01-06 19:26:04 -08:00
Russ Cox
74a9fc18f6 runtime: close TODO now that 8c bug is fixed
R=r
CC=golang-dev
https://golang.org/cl/183138
2010-01-06 19:24:11 -08:00
Rob Pike
fce5d60b38 add a standard interface that wraps ReadByte, io.ReadByter
R=rsc
CC=golang-dev
https://golang.org/cl/181163
2010-01-07 13:29:43 +11:00
Russ Cox
4cde1a903b sync make-arm.bash with make.bash
R=r
CC=golang-dev
https://golang.org/cl/183135
2010-01-06 18:19:56 -08:00
Russ Cox
ee7c64efe5 8c: only refer to extern register variables in MOVL instructions
R=ken2
https://golang.org/cl/183136
2010-01-06 18:18:07 -08:00
Russ Cox
616394b177 deps.bash: handle space between .go and \ in GOFILES=
R=r
CC=golang-dev
https://golang.org/cl/181157
2010-01-06 17:59:15 -08:00
Hector Chu
6bfe5f55f4 Ported runtime to Windows.
R=rsc
CC=golang-dev
https://golang.org/cl/176066
2010-01-06 17:58:55 -08:00
Russ Cox
5c07e0c17c time: fix Makefile so deps.bash is happy (fixes build)
TBR=r
https://golang.org/cl/183133
2010-01-06 16:35:28 -08:00
Russ Cox
e0763ba8e7 godoc: serve index.html in place of directory listing, when present
R=gri
CC=golang-dev
https://golang.org/cl/181155
2010-01-06 15:59:03 -08:00
Russ Cox
968d6a6d5a http: avoid header duplication - take struct fields out of Header map
R=r
CC=golang-dev, petar-m
https://golang.org/cl/183132
2010-01-06 15:45:30 -08:00
Devon H. O'Dell
690fcacdd3 cgo: Use -fno-eliminate-unused-debug-types when calling gcc to for dwarf stabs.
This keeps debug symbols in for e.g. unreferenced enums.

Fixes #479

R=rsc
CC=golang-dev, waltermundt
https://golang.org/cl/181102
2010-01-06 15:45:08 -08:00
Rob Pike
e05b381e79 New time formatter, time.Format(formatString)
The model is that formatString is a a representation of a standard time,
and that Format converts the time to that representation.
Standard representaitons are defined for ANSIC, RFC850, RFC1123, and ISO8601.
There's also a humane Kitchen fomat: 3:04PM.

R=rsc, benolive, cw
CC=golang-dev
https://golang.org/cl/181130
2010-01-07 10:32:48 +11:00
Devon H. O'Dell
2eb9171dfb Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of
QUOTED_GOBIN. Re-take of 181077; fixes copy-pasta that broke build.

Fixes #468

R=rsc
CC=golang-dev
https://golang.org/cl/183125
2010-01-06 07:47:56 -08:00
Ivan Krasin
597e57f4d5 Add http.CanonicalPath and tests for it. Remove BUG(rsc) from url.go.
R=rsc, imkrasin
CC=golang-dev
https://golang.org/cl/179126
2010-01-06 07:47:40 -08:00
Ivan Krasin
e324e4099f Propagate error to the caller in json.Marshal. Fixes issue 445.
R=rsc, imkrasin
CC=golang-dev
https://golang.org/cl/179125
2010-01-06 07:25:17 -08:00
Evan Shaw
5107aa82a1 8a, 8l: Add FCOMI, FCOMIP, FUCOMI, FUCOMIP instructions
Fixes #447

R=rsc
CC=golang-dev
https://golang.org/cl/183047
2010-01-05 17:06:41 -08:00
Russ Cox
32594bd43d rollback of https://golang.org/cl/181077
(broke build)

TBR=dho
https://golang.org/cl/181139
2010-01-05 16:54:27 -08:00
Evan Shaw
1c819cb194 xml: Fix comment so that example code compiles
R=rsc
CC=golang-dev
https://golang.org/cl/181138
2010-01-05 16:50:52 -08:00
Russ Cox
cfbee34a27 big: fix ProbablyPrime bug, comments
(changes adopted from alc, agl)

R=agl1, agl
CC=golang-dev
https://golang.org/cl/181137
2010-01-05 16:49:05 -08:00
Devon H. O'Dell
e032ab9dc8 Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of QUOTED_GOBIN
Fixes #468

R=rsc
CC=golang-dev
https://golang.org/cl/181077
2010-01-05 16:22:40 -08:00
Devon H. O'Dell
10cdec9262 syscall: add nanosleep on FreeBSD
Fixes #461

R=rsc
CC=golang-dev
https://golang.org/cl/181059
2010-01-05 09:21:15 -08:00
Roger Peppe
0281b71580 net: make Dial correctly return nil on error.
R=rsc
CC=golang-dev
https://golang.org/cl/181135
2010-01-05 09:20:02 -08:00
Robert Griesemer
50442290bb Simplified parser interface.
R=rsc, r
CC=golang-dev, rog
https://golang.org/cl/183116
2010-01-04 17:26:01 -08:00
Rob Pike
a0ee18bdd5 Check for errors when writing fields of a struct.
R=rsc
CC=golang-dev, jack.palevich
https://golang.org/cl/183109
2010-01-05 11:33:06 +11:00
Roger Peppe
f221067fe8 Allow a nil Ident to print without crashing.
Allow Walk of []Decl

R=gri
CC=golang-dev, rsc
https://golang.org/cl/183112
2010-01-04 10:34:37 -08:00
Yongjian Xu
ca0def6659 Remove redundant size check in resize. Let callers worry about that and resize should just do "resize".
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/181111
2010-01-02 11:09:22 +11:00
Rob Pike
5a44338159 trivial bug: []byte is special but [3]byte is not.
modify a test to verify the fix.

R=rsc
CC=golang-dev
https://golang.org/cl/183090
2009-12-31 12:47:20 +11:00
Rob Pike
a58b69e1d0 improve some type switches now that multiple types per case are supported.
R=rsc
CC=golang-dev
https://golang.org/cl/181089
2009-12-30 08:33:48 +11:00
Robert Griesemer
e01459f567 Apply symmetric changes to sha1 and sha256 as to md4 and md5.
R=agl, agl1
CC=golang-dev
https://golang.org/cl/183083
2009-12-29 11:41:44 -08:00
Nigel Tao
5042a4e9f9 PNG decoder now handles transparent paletted images.
Fixes #439.

R=r
CC=golang-dev
https://golang.org/cl/181087
2009-12-29 15:23:55 +11:00
Nigel Tao
50d3447a36 JPEG decoder now handles RST (restart) markers.
R=r
CC=golang-dev
https://golang.org/cl/181075
2009-12-29 15:20:53 +11:00
Rob Pike
e7601e2980 add a debugging printer to the gob package.
used only for debugging, debug.go is not normally part of the package source.

also add a dump program to call it.

R=rsc
CC=golang-dev
https://golang.org/cl/183075
2009-12-29 14:03:33 +11:00
Rob Pike
1f5511560e remove all references to gobType() from the decoder.
Fixes #470.

R=rsc
CC=golang-dev
https://golang.org/cl/183074
2009-12-29 14:03:12 +11:00
Robert Griesemer
2aefb8d930 Fix bug in godoc tab conversion filter:
tabs after an empty line where not converted.

Also, made it more robust in the presence of
(unexpected) ' ' and '\v' chars in indentation
mode.

R=r
CC=golang-dev
https://golang.org/cl/181085
2009-12-28 17:24:53 -08:00
Robert Griesemer
f0fcb2d59f Symmetric changes to md4.go as for md5.go.
Use uint index variables in some cases instead
of int to enable strength reduction; this makes
it possible for the compiler to reduce % into
masks.

Old code: 6g -S md4.go md4block.go | grep "md4block.go:44"
0471 (md4block.go:44) MOVL    AX,BX
0472 (md4block.go:44) MOVL    AX,BP
0473 (md4block.go:44) MOVL    AX,R8
0474 (md4block.go:44) SARL    $31,R8
0475 (md4block.go:44) SHRL    $30,R8
0476 (md4block.go:44) ADDL    R8,BP
0477 (md4block.go:44) SARL    $2,BP
0478 (md4block.go:44) IMULL   $4,BP
0479 (md4block.go:44) SUBL    BP,BX
0480 (md4block.go:44) MOVLQSX BX,BX
0481 (md4block.go:44) LEAQ    shift1+0(SB),BP
0482 (md4block.go:44) CMPL    BX,8(BP)
0483 (md4block.go:44) JCS     ,485
0484 (md4block.go:44) CALL    ,runtime.throwindex+0(SB)
0485 (md4block.go:44) MOVQ    (BP),BP
0486 (md4block.go:44) MOVL    (BP)(BX*4),DI

New code: 6g -S md4.go md4block.go | grep "md4block.go:44"
0471 (md4block.go:44) MOVL    AX,BX
0472 (md4block.go:44) ANDL    $3,BX
0473 (md4block.go:44) MOVLQZX BX,BX
0474 (md4block.go:44) LEAQ    shift1+0(SB),BP
0475 (md4block.go:44) CMPL    BX,8(BP)
0476 (md4block.go:44) JCS     ,478
0477 (md4block.go:44) CALL    ,runtime.throwindex+0(SB)
0478 (md4block.go:44) MOVQ    (BP),BP
0479 (md4block.go:44) MOVL    (BP)(BX*4),DI

R=agl, agl1
CC=golang-dev
https://golang.org/cl/181086
2009-12-28 17:20:33 -08:00
Robert Griesemer
9d07d37f31 A couple of tighter loops.
(I was looking at this code accidentally because of some gofmt
issues and thought that one could write this more effectively.
You may have deliberately chosen not to use ranges here to make
the index range clearer. Just let me know.)

R=agl, agl1
CC=golang-dev
https://golang.org/cl/181084
2009-12-28 15:48:58 -08:00
Rob Pike
33311a7945 fix dumb bug: must write out default values inside arrays and slices
Fixes #459.

R=rsc, imkrasin, sonia
CC=golang-dev
https://golang.org/cl/181073
2009-12-29 07:41:53 +11:00
Robert Griesemer
b6adb3272f simplify some code that is using vectors
R=agl, agl1
CC=golang-dev
https://golang.org/cl/181080
2009-12-28 12:27:43 -08:00
Adam Langley
3c6bf09539 crypto/tls: make Listener a pointer.
Listener contains private members and 6g now enforces that private
members cannot be assigned outside of their package.

R=rsc
CC=golang-dev
https://golang.org/cl/183073
2009-12-28 11:40:01 -08:00
Russ Cox
5f132b93eb gc: various C nits, found by plan 9 compiler.
reported by erik quanstrom.

R=ken2
https://golang.org/cl/181071
2009-12-27 09:32:30 -08:00
Devon H. O'Dell
1245e93b2c Update documentation around time.Sleep to specify its precision, and suggest
a possible interface for more granular sleep times.

Fixes issue #260.

R=rsc, r
CC=golang-dev
https://golang.org/cl/181058
2009-12-25 08:24:00 +11:00
Ian Lance Taylor
2be4897800 Use t.Errorf for formatted error output.
R=dsymonds1
CC=golang-dev
https://golang.org/cl/183049
2009-12-23 22:08:49 -08:00
Peter Froehlich
e1033d07b4 Add query to find number of subexpressions.
This was convenient for me to have without being forced
to parse the regexp myself. I'd understand if it's not
really wanted, but I also think that some meta information
about compiled regexps would be fine.

R=r, rsc
CC=golang-dev
https://golang.org/cl/183044
2009-12-24 08:43:35 +11:00
Robert Griesemer
b266f39b85 remove nums.sh
R=rsc
CC=golang-dev
https://golang.org/cl/181049
2009-12-23 13:15:00 -08:00
Rob Pike
96da3e96c3 implement .repeats for maps.
Fixes #309.

R=rsc
CC=golang-dev
https://golang.org/cl/181044
2009-12-24 07:41:56 +11:00
Rob Pike
8c557962de make 6prof (sic) architecture-independent.
for now, it's amd64 and 386 only but it's trivial to add more.

Fixes #385.

(why couldn't it have been issue 386?)

tested for amd64 and 386 on darwin.

R=rsc
CC=golang-dev
https://golang.org/cl/182043
2009-12-24 07:17:49 +11:00
Adam Langley
9ebb59634e crypto/tls: extensions and Next Protocol Negotiation
Add support for TLS extensions in general and Next Protocol
Negotiation in particular.

R=rsc
CC=golang-dev
https://golang.org/cl/181045
2009-12-23 11:13:09 -08:00
Devon H. O'Dell
7c9111434a cgo: don't overwrite p.Crefs
It's expected to be shared between all files so that all types are output.
Fixes bug reported on mailing list by Peter Froehlich.

R=rsc, phf
CC=golang-dev
https://golang.org/cl/183043
2009-12-23 09:26:21 -08:00
Peter Froehlich
3f25c8a2ef Fix comment for Chmod.
R=r, rsc
CC=golang-dev
https://golang.org/cl/183042
2009-12-23 08:49:38 -08:00
Robert Griesemer
a0862ea568 Cleanup: remove Exp ending in identifiers
as it is not needed anymore (only one impl.
of vector package).

Makefile, vector_test.go, and nogen_test.go
were modified manually (find/replace), the
other files (intvector_test.go, strinvector_test.go
are generated).

Runs all tests.

R=r
https://golang.org/cl/182041
2009-12-22 18:45:36 -08:00
Robert Griesemer
8c7d001602 Replace container/vector with exp/vector (faster).
Manual changes to the following files:
src/pkg/Makefile
src/pkg/exp/vector/Makefile (now: src/pkg/container/vector/Makefile)

R=rsc, r
CC=golang-dev
https://golang.org/cl/181041
2009-12-22 18:25:27 -08:00
Robert Griesemer
36d645f5fa add comment (warning about generated files)
R=r
CC=golang-dev
https://golang.org/cl/180108
2009-12-22 15:14:10 -08:00