1
0
mirror of https://github.com/golang/go synced 2024-10-03 16:41:28 -06:00
Commit Graph

2702 Commits

Author SHA1 Message Date
Kai Backman
a9e03ae52a fix broken code produced for ominus
go/test: passes 89% (308/345)

R=rsc
APPROVED=rsc
DELTA=10  (5 added, 0 deleted, 5 changed)
OCL=36005
CL=36021
2009-10-23 10:58:29 -07:00
Kai Backman
03bbfe6724 fix off by 4 in newproc arg copying.
R=rsc
APPROVED=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=36001
CL=36004
2009-10-22 13:31:52 -07:00
Robert Griesemer
34e8075259 fix computation of sync delay
R=rsc
http://go/go-review/1013011
2009-10-23 11:35:40 -07:00
Ian Lance Taylor
fd5fa4b301 Fix the sigaction declaration to match the system for Linux.
I don't know whether Darwin needs a change here.

R=rsc
http://go/go-review/1013010
2009-10-22 23:51:54 -07:00
Ian Lance Taylor
057f7d5b07 s/pc/PC/ in traceback output to match amd64.
test/run expects to see "PC".

R=rsc
http://go/go-review/1015002
2009-10-22 23:38:34 -07:00
Ian Lance Taylor
95499a27ea Fix printer_test.go to invoke Fprint as a method of cfg.
This matches the change to printer.go in revision 3632.

R=gri
http://go/go-review/1015001
2009-10-22 22:19:22 -07:00
Robert Griesemer
8f52a82169 - make printer interface easily extensible w/o breaking clients (in the future)
- replacement for p4 CL 35999 (abandoned)

R=rsc
http://go/go-review/1012010
2009-10-22 18:19:49 -07:00
Robert Griesemer
abc6ad427d minor changes to walk
R=rsc
http://go/go-review/1012008
2009-10-22 18:04:21 -07:00
Robert Griesemer
ba15bbe654 simple AST walking support
R=rsc
http://go/go-review/1014006
2009-10-22 16:35:53 -07:00
Rob Pike
8a20cfc009 fix build: no acid
R=rsc
http://go/go-review/1014005
2009-10-22 11:52:35 -07:00
Russ Cox
219fb02042 fix build after Mercurial move.
various missing or incorrect files.

R=r
CC=go-dev
http://go/go-review/1014004
2009-10-22 10:59:27 -07:00
Robert Griesemer
90cc4a5949 go/printer:
- handle HTML tagging via (client-installable) Stylers

go/doc:
- basic styler support
- some factoring
- ready to contain the search code (but for now excluded)

doc/style.css:
- updated

doc/go_spec.css:
- cleanup: replace deprecated uses of <font> tag with <span> tag

R=rsc
DELTA=302  (160 added, 62 deleted, 80 changed)
OCL=35973
CL=35996
2009-10-22 09:41:38 -07:00
Austin Clements
3040f067c3 Interface types, values, and type compiler. This does not yet
implement any type checking or semantics for interfaces.

R=rsc
APPROVED=rsc
DELTA=305  (289 added, 10 deleted, 6 changed)
OCL=35889
CL=35995
2009-10-22 08:59:18 -07:00
Rob Pike
c6e904d580 have http server in-line PDF files.
add go course pdf files to doc/ for godoc to serve.
fix links to point to those files.

R=rsc
DELTA=7  (4 added, 0 deleted, 3 changed)
OCL=35972
CL=35981
2009-10-21 19:52:11 -07:00
Adam Langley
a8a678fc2a Add SetValue(Value) to the Value interface.
R=rsc
APPROVED=rsc
DELTA=172  (170 added, 0 deleted, 2 changed)
OCL=35969
CL=35980
2009-10-21 19:51:27 -07:00
Rob Pike
f1b91263d8 fix typo/oversight: s/Title/ToTitle/. the comment was already correct
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=35964
CL=35979
2009-10-21 19:51:05 -07:00
Adam Langley
1d390cec1e Replace SliceReader with bytes.Buffer.
R=r
APPROVED=r
DELTA=16  (0 added, 15 deleted, 1 changed)
OCL=35976
CL=35978
2009-10-21 19:49:01 -07:00
Adam Langley
7d68093f93 Fix typo in documentation.
R=r
APPROVED=r
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=35977
CL=35977
2009-10-21 19:47:52 -07:00
Adam Langley
fd74a835bc Add initial x509 code.
R=rsc
APPROVED=rsc
DELTA=659  (659 added, 0 deleted, 0 changed)
OCL=35932
CL=35975
2009-10-21 17:53:50 -07:00
Kai Backman
c2eb89af92 change stack splitting comparisons from signed to unsigned (oversight)
R=rsc
APPROVED=rsc
DELTA=9  (0 added, 0 deleted, 9 changed)
OCL=35911
CL=35952
2009-10-21 09:44:23 -07:00
David Symonds
69fc06dfa1 Move usr/dsymonds/iterable to src/pkg/exp/iterable.
Remove remainder of usr/dsymonds.

R=rsc,r
APPROVED=r
DELTA=685  (275 added, 409 deleted, 1 changed)
OCL=35810
CL=35933
2009-10-20 14:10:22 -07:00
Robert Griesemer
f591591a28 remove superfluous tracing support
R=rsc
DELTA=5  (0 added, 4 deleted, 1 changed)
OCL=35930
CL=35930
2009-10-20 13:30:32 -07:00
Russ Cox
357b770def base64 -> encoding/base64
base85 -> encoding/ascii85, encoding/git85
debug/binary -> encoding/binary

R=r
DELTA=3190  (1884 added, 1297 deleted, 9 changed)
OCL=35923
CL=35929
2009-10-20 13:00:16 -07:00
Robert Griesemer
4213c22301 Updated and simplified gofmt.
- operates on stdin, a single file, or all files in a file tree
- setting -w flag writes to (source) file instead of stdout
- setting -l flag lists files whose formatting has changed

R=rsc
DELTA=201  (102 added, 71 deleted, 28 changed)
OCL=35890
CL=35926
2009-10-20 12:07:31 -07:00
Russ Cox
fcc4be8c65 Add base85, based on base64.
Also add git version of base85,
which is what I really wanted but
didn't recognize as different until it
was too late.

R=austin
DELTA=980  (972 added, 4 deleted, 4 changed)
OCL=35580
CL=35921
2009-10-20 09:04:09 -07:00
Russ Cox
60ff8cc86f address bug193 and add note to spec about it.
R=ken
OCL=35920
CL=35920
2009-10-20 08:27:14 -07:00
Russ Cox
02fd255a14 bug162, over and over
R=ken
OCL=35919
CL=35919
2009-10-20 08:03:43 -07:00
Kai Backman
dde4090372 removed tempalloc/tempfree and replaced with tempname
go/test: passes 88% (304/345)

R=rsc
APPROVED=rsc
DELTA=67  (3 added, 54 deleted, 10 changed)
OCL=35910
CL=35910
2009-10-19 22:47:25 -07:00
Russ Cox
fcb9387089 support for 5.out files
R=kaib
DELTA=1262  (1247 added, 7 deleted, 8 changed)
OCL=35907
CL=35909
2009-10-19 22:33:56 -07:00
Kai Backman
33a7bcf315 getcallerpc and setcallerpc
go/test: passes 87% (303/345)

R=rsc
APPROVED=rsc
DELTA=19  (5 added, 6 deleted, 8 changed)
OCL=35903
CL=35906
2009-10-19 21:58:16 -07:00
Russ Cox
a15648658f bug196
R=ken
OCL=35905
CL=35905
2009-10-19 21:10:29 -07:00
Russ Cox
62c4818ee0 bug136
R=ken
OCL=35902
CL=35904
2009-10-19 20:39:18 -07:00
Kai Backman
a15aa05ae2 first version of closures. test/closure doesn't yet pass.
go/test: passes 87% (300/343)

R=rsc
APPROVED=rsc
DELTA=125  (125 added, 0 deleted, 0 changed)
OCL=35893
CL=35900
2009-10-19 19:59:39 -07:00
Russ Cox
1be74762c1 bug169
R=ken
OCL=35899
CL=35899
2009-10-19 19:55:17 -07:00
Russ Cox
4c3a85d73a 6g bug fixes:
* bug211
 * embedded interfaces with lowercase methods
 * var _ = f() at top level

R=ken
OCL=35898
CL=35898
2009-10-19 19:27:40 -07:00
Russ Cox
8fffa1d698 bug190.
also eliminate float80 dregs

R=ken
OCL=35894
CL=35896
2009-10-19 18:47:37 -07:00
Robert Griesemer
e76cce1a6d support one-line functions
R=rsc
DELTA=207  (160 added, 42 deleted, 5 changed)
OCL=35854
CL=35887
2009-10-19 13:57:51 -07:00
Kai Backman
b4896b496e function literals
go/test: passes 86% (297/343)

R=rsc
APPROVED=rsc
DELTA=14  (10 added, 1 deleted, 3 changed)
OCL=35881
CL=35884
2009-10-19 12:44:08 -07:00
Russ Cox
21b41bec83 test and fix http redirect handling
BUG=2197242
R=r
DELTA=16  (16 added, 0 deleted, 0 changed)
OCL=35878
CL=35882
2009-10-19 12:10:14 -07:00
Adam Langley
4d4e885bd1 Add an RSA-OAEP implementation.
R=rsc
APPROVED=rsc
DELTA=734  (734 added, 0 deleted, 0 changed)
OCL=35738
CL=35879
2009-10-19 11:52:44 -07:00
Robert Griesemer
4adad657de directory tree walk w/ visitor per rsc's suggestion
R=rsc,r
DELTA=193  (191 added, 0 deleted, 2 changed)
OCL=35849
CL=35877
2009-10-19 11:48:04 -07:00
Kai Backman
8037e3ba5e fix arm build, add 64 bit cgen_asop
R=rsc
APPROVED=rsc
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=35845
CL=35845
2009-10-16 12:02:14 -07:00
Russ Cox
d5337e9829 fix linux build:
i renamed sys to runtime but didn't remember this file.
(and the darwin build doesn't use it.)

TBR=r
OCL=35826
CL=35826
2009-10-15 23:57:04 -07:00
Russ Cox
22a5c78f44 rename sys functions to runtime,
because they are in package runtime.

another step to enforcing package boundaries.

R=r
DELTA=732  (114 added, 93 deleted, 525 changed)
OCL=35811
CL=35824
2009-10-15 23:10:49 -07:00
Russ Cox
488ca3c7a6 move math out of runtime.
a step toward enforcing package boundaries,
necessary to eliminate global package name space.

R=r
DELTA=581  (310 added, 271 deleted, 0 changed)
OCL=35805
CL=35823
2009-10-15 23:09:22 -07:00
Robert Griesemer
738c58ca75 improved handling of expression lists
R=rsc
DELTA=189  (118 added, 9 deleted, 62 changed)
OCL=35816
CL=35821
2009-10-15 22:52:11 -07:00
Kai Backman
4f7aa31862 fix minor typo in float conversions
R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35820
CL=35820
2009-10-15 22:30:57 -07:00
Stephen Ma
f9e08759de Trivial documentation fix for func ListenAndServe().
R=go-dev
APPROVED=gri
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=35817
CL=35819
2009-10-15 22:18:14 -07:00
Kai Backman
545dbd810c fix OINDEX address generation, leftover misunderstanding about
how scale works on amd64/386

go/test: passes 85% (294/342)

R=rsc
APPROVED=rsc
DELTA=27  (26 added, 1 deleted, 0 changed)
OCL=35815
CL=35818
2009-10-15 22:16:31 -07:00
Kai Backman
3f085e643d fix arm build
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=35812
CL=35814
2009-10-15 21:27:09 -07:00
Kai Backman
222a15c840 test/64bit.go passes but doesn't generate properly yet.
R=rsc
APPROVED=rsc
DELTA=235  (98 added, 38 deleted, 99 changed)
OCL=35789
CL=35813
2009-10-15 19:41:51 -07:00
Robert Griesemer
3f427bc9c8 update Make.deps
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35808
CL=35808
2009-10-15 17:54:57 -07:00
Russ Cox
5bbd4c2f1b publish semacquire and semrelease for use by sync.
more enforcing package boundaries

R=r
DELTA=46  (13 added, 15 deleted, 18 changed)
OCL=35806
CL=35806
2009-10-15 17:46:53 -07:00
Robert Griesemer
b80d36d846 - implemented utility functions for directory reading/traversal
- added tests

R=rsc
DELTA=62  (61 added, 1 deleted, 0 changed)
OCL=35788
CL=35802
2009-10-15 16:34:05 -07:00
Russ Cox
4e4097d9d9 386 shift bug; wasn't zero-extending 16- and 8-bit counts
+test

R=ken
OCL=35801
CL=35801
2009-10-15 16:32:45 -07:00
Russ Cox
a75e347a21 do not migrate x to the heap because of *&x.
R=ken
OCL=35799
CL=35799
2009-10-15 16:03:01 -07:00
Austin Clements
049501ce4c Implement error handling on process monitor exit. Now, before
sending any message to the monitor, the sender must check a
"ready" channel.  Before exiting, the monitor records its exit
error and closes this channel, ensuring that all later reads
from the ready channel will immediately return false.

Inspired by
http://chplib.wordpress.com/2009/09/30/poison-concurrent-termination/

R=rsc
APPROVED=rsc
DELTA=47  (27 added, 11 deleted, 9 changed)
OCL=35782
CL=35784
2009-10-15 12:59:59 -07:00
Robert Griesemer
974b23f569 close file after use
R=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=35778
CL=35780
2009-10-15 12:04:13 -07:00
Dave Bort
3342574206 Define the new Rand and Source types to allow creating
isolated sources of random values.

Add normal and exponential distributions.

Add some tests for the normal and exponential distributions.

R=rsc
APPROVED=rsc
DELTA=1005  (904 added, 80 deleted, 21 changed)
OCL=35501
CL=35779
2009-10-15 11:46:37 -07:00
Russ Cox
18325313fb add exp/eval to pkg list
update Make.deps.

fixes build

TBR=r
OCL=35777
CL=35777
2009-10-15 11:05:23 -07:00
Russ Cox
98089b68a3 nacl demos
R=r
DELTA=9147  (9147 added, 0 deleted, 0 changed)
OCL=35734
CL=35776
2009-10-15 11:04:33 -07:00
Russ Cox
4113ca5fb1 explain exp
R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=35732
CL=35775
2009-10-15 11:02:18 -07:00
Robert Griesemer
8c101739d9 - bug fix: must not insert indentation tabs into multi-line strings in RawFormat
(always write tabwriter.Escape chars so formatting is driven correctly; but strip
  them again in the end if no tabwriter is used)
- added testcase for RawFormat printing

R=rsc
DELTA=227  (198 added, 6 deleted, 23 changed)
OCL=35772
CL=35774
2009-10-15 10:41:07 -07:00
Robert Griesemer
8f8a393b40 bug fix: do not modify (string) literals in any way even if they
contain tabs or line breaks

R=rsc
DELTA=57  (19 added, 12 deleted, 26 changed)
OCL=35749
CL=35770
2009-10-15 09:29:31 -07:00
Robert Griesemer
b55e6d1ba5 permit escaped text segments which pass through tabwriter
undisturbed and uninterpreted

R=rsc
DELTA=141  (82 added, 23 deleted, 36 changed)
OCL=35747
CL=35769
2009-10-15 09:28:52 -07:00
Robert Griesemer
da829d6608 Work-around for factory function heuristic failure:
only associate a couple of functions as factories
for os.Error.

Replaces CL 35628 (abandoned).

R=rsc
DELTA=35  (26 added, 0 deleted, 9 changed)
OCL=35754
CL=35768
2009-10-15 09:24:19 -07:00
Rob Pike
a34dd7156b typo
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=35743
CL=35762
2009-10-15 00:27:40 -07:00
Kai Backman
b83549a7e6 cas
R=rsc
APPROVED=rsc
DELTA=31  (1 added, 8 deleted, 22 changed)
OCL=35752
CL=35757
2009-10-14 21:47:28 -07:00
Kai Backman
f72ea8eb76 LDREX and STREX
R=rsc
APPROVED=rsc
DELTA=30  (30 added, 0 deleted, 0 changed)
OCL=35751
CL=35756
2009-10-14 21:47:08 -07:00
Russ Cox
3ddb7daa97 fix build:
avoid infinite loop when cd fails.

TBR=r
OCL=35750
CL=35750
2009-10-14 18:29:33 -07:00
Russ Cox
2b7fde3406 move austin/eval and austin/ogle to exp/eval and exp/ogle
R=r
OCL=35736
CL=35746
2009-10-14 18:10:43 -07:00
Russ Cox
218a412e73 forgot to update Makefile in last CL
R=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=35737
CL=35745
2009-10-14 18:10:00 -07:00
Russ Cox
7d795d8c01 move native client to exp/nacl.
R=r
DELTA=3706  (1857 added, 1849 deleted, 0 changed)
OCL=35731
CL=35741
2009-10-14 17:16:21 -07:00
Russ Cox
c058e20a18 move draw to exp
R=r
DELTA=942  (471 added, 471 deleted, 0 changed)
OCL=35733
CL=35740
2009-10-14 17:15:56 -07:00
Russ Cox
17dfa682ae move datafmt into exp
R=gri
DELTA=3006  (1503 added, 1503 deleted, 0 changed)
OCL=35730
CL=35735
2009-10-14 16:55:05 -07:00
Russ Cox
a68592a4dd excise some internal references.
R=r
DELTA=209  (65 added, 114 deleted, 30 changed)
OCL=35718
CL=35721
2009-10-14 13:02:05 -07:00
Russ Cox
b7ef541f35 toss crypto/block Digest in favor of hash.Hash
R=r
DELTA=30  (8 added, 15 deleted, 7 changed)
OCL=35677
CL=35713
2009-10-14 09:33:15 -07:00
Rob Pike
f6d67c9e95 write stack traces and panics to stderr
R=rsc
DELTA=31  (5 added, 3 deleted, 23 changed)
OCL=35700
CL=35700
2009-10-13 22:48:03 -07:00
Nigel Tao
cb1ad7e765 Documentation for png.Decode and png.Encode.
R=r,rsc
APPROVED=r
DELTA=7  (5 added, 0 deleted, 2 changed)
OCL=35651
CL=35692
2009-10-13 17:14:49 -07:00
Rob Pike
76d585e5af delete silly TODO
R=rsc
DELTA=1  (0 added, 1 deleted, 0 changed)
OCL=35685
CL=35687
2009-10-13 15:55:44 -07:00
Adam Langley
c071da4a26 Add ASN.1 parser.
R=rsc
APPROVED=rsc
DELTA=1459  (1459 added, 0 deleted, 0 changed)
OCL=35389
CL=35681
2009-10-13 14:37:48 -07:00
Rob Pike
8acb8fb780 reduce stutter: sort.SortInterface -> sort.Interface.
ditto for heap.HeapInterface

R=gri,rsc
DELTA=31  (0 added, 1 deleted, 30 changed)
OCL=35665
CL=35673
2009-10-13 13:05:16 -07:00
Rob Pike
fd4767f2c5 rename the source directory for gopack from ar to gopack.
remove the references to 6ar

R=rsc
DELTA=3547  (1770 added, 1775 deleted, 2 changed)
OCL=35669
CL=35671
2009-10-13 12:37:28 -07:00
Robert Griesemer
4700ded282 bug fix: convert \v's into \t's if there's no tabwriter
R=rsc
DELTA=15  (12 added, 2 deleted, 1 changed)
OCL=35641
CL=35645
2009-10-12 19:08:17 -07:00
Robert Griesemer
df7efaf9e8 - improved comment intersperse heuristic:
comments should now be indented properly in corner cases
  (at the end of statement lists, for instance)

- changed import decl. formatting as suggested by Russ (no "global"
  indentation of imports if there are renames present)

- better field list handling

- better documentation

R=rsc
DELTA=534  (324 added, 35 deleted, 175 changed)
OCL=35557
CL=35630
2009-10-12 17:10:50 -07:00
Kai Backman
101f7cbd61 changed 5c 64 bit word ordering to little endian so it matches
5g. fixes to 64 bit code gen. added (finally) function to do
shifts properly.

go/test: passes 83% (287/342)

R=rsc
APPROVED=rsc
DELTA=156  (50 added, 53 deleted, 53 changed)
OCL=35589
CL=35616
2009-10-12 13:35:28 -07:00
Russ Cox
2372408189 sort errors by line number
turn off testdclstack and "not used" errors
when there are syntax errors.

BUG=2181825
R=ken
OCL=35606
CL=35608
2009-10-12 11:03:48 -07:00
Russ Cox
add89dd1ba stack overflow debugging and fix.
* in 6l, -K already meant check for stack underflow.
    add -KK to mean double-check stack overflows
    even in nosplit functions.

  * comment out print locks; they deadlock too easily
     but are still useful to put back for special occasions.

  * let runcgo assembly switch to scheduler stack
    without involving scheduler directly.  because runcgo
    gets called from matchmg, it is too hard to keep it
    from being called on other stacks.

R=r
DELTA=94  (65 added, 18 deleted, 11 changed)
OCL=35591
CL=35604
2009-10-12 10:26:38 -07:00
Russ Cox
fd76b4f385 new builtin.c.boot from arm.
node printing fixes.
silence incorrect redeclaration error.

R=ken
OCL=35602
CL=35602
2009-10-12 10:12:37 -07:00
Russ Cox
10c7d19e07 fix comment on strings.LastIndex.
add bytes.LastIndex.
add strings.Reader.

R=r
DELTA=59  (56 added, 0 deleted, 3 changed)
OCL=35585
CL=35601
2009-10-12 10:09:35 -07:00
Russ Cox
d0aac0ace1 introduce non-strict mode in xml parser,
good enough to parse some html.

in reader, add "comment" tag to collect
comment text.

do not allocate during Unmarshal unless pointer is nil.

R=r
DELTA=441  (416 added, 1 deleted, 24 changed)
OCL=35586
CL=35594
2009-10-11 23:51:46 -07:00
Russ Cox
fcdba72d2a correct a design flaw: Atoi etc should not guess the base.
leave that for Btoi with base == 0.

R=r
DELTA=146  (101 added, 29 deleted, 16 changed)
OCL=35584
CL=35593
2009-10-11 23:46:11 -07:00
Kai Backman
6d0983ae46 64bit and float code generation. fmt compiles but
reflect is broken so fmt doesn't work.

go/test: passes 83% (285/342)

R=rsc
APPROVED=rsc
DELTA=415  (240 added, 29 deleted, 146 changed)
OCL=35576
CL=35588
2009-10-11 20:01:11 -07:00
Nigel Tao
64145109b3 PNG encoder now filters.
R=r,rsc
APPROVED=r
DELTA=122  (102 added, 0 deleted, 20 changed)
OCL=35573
CL=35587
2009-10-11 19:36:29 -07:00
Rob Pike
c0e0f82e49 better code for allocation through indirection
R=rsc
DELTA=11  (3 added, 5 deleted, 3 changed)
OCL=35583
CL=35583
2009-10-11 18:07:47 -07:00
Rob Pike
330ab5fddb fix bugs in gob.
1) didn't handle attempts to encode non-structs properly.
2) if there were multiple indirections involving allocation, didn't allocate the
intermediate cells.
tests added.

R=rsc
DELTA=82  (65 added, 5 deleted, 12 changed)
OCL=35582
CL=35582
2009-10-11 17:37:22 -07:00
Kai Backman
1620023d03 fix float <-> int64 conversions
R=rsc
APPROVED=rsc
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=35566
CL=35574
2009-10-10 22:06:26 -07:00
Rob Pike
5743fb594f change Title to ToTitle for consistency. (the doc comment was already right)
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=35572
CL=35572
2009-10-10 18:56:13 -07:00
Rob Pike
86cfaf66a7 reallocate library, libraryobj: 50 isn't nearly enough
R=rsc
DELTA=7  (2 added, 0 deleted, 5 changed)
OCL=35569
CL=35569
2009-10-10 12:29:06 -07:00
Nigel Tao
6e4f935369 In the PNG reader inner loop, collapse the two ReadFull calls into one.
R=rsc,r
APPROVED=rsc
DELTA=29  (2 added, 4 deleted, 23 changed)
OCL=35460
CL=35565
2009-10-09 22:44:40 -07:00
Russ Cox
fb1bcd47c6 acid bug fix.
lock printf output to avoid interlacing debug prints.

R=r
DELTA=10  (7 added, 0 deleted, 3 changed)
OCL=35539
CL=35561
2009-10-09 16:45:20 -07:00
Russ Cox
c736b6579f bug209
R=ken
OCL=35546
CL=35546
2009-10-09 16:01:32 -07:00
Rob Pike
a14a8b2739 change date format in logs - was missing slash between month and day
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35526
CL=35540
2009-10-09 15:44:57 -07:00
Russ Cox
93689d863c keep a list of all the M's,
so that the garbage collector doesn't free them.

R=ken
OCL=35538
CL=35538
2009-10-09 15:35:33 -07:00
Dave Bort
9aa68dbdb6 Move rand.go to rng.go to prepare for some surgery.
R=rsc
APPROVED=rsc
DELTA=637  (318 added, 318 deleted, 1 changed)
OCL=35534
CL=35536
2009-10-09 15:16:00 -07:00
Russ Cox
f0bde7c51b fix nacl build
R=r
DELTA=23  (5 added, 0 deleted, 18 changed)
OCL=35510
CL=35518
2009-10-09 11:15:19 -07:00
Kai Backman
6084dcdd07 floating point calc, added a few more packages that pass
go/test: passes 80% (274/340)

R=rsc
APPROVED=rsc
DELTA=61  (59 added, 0 deleted, 2 changed)
OCL=35506
CL=35517
2009-10-09 07:37:49 -07:00
Russ Cox
680ee6af63 add & fix bug208, from ken.
fix bug198.

R=ken
OCL=35504
CL=35507
2009-10-08 23:03:34 -07:00
Kai Backman
98fff8ffb2 dupok, gcc compile fix, sync and syscall asm fix
R=rsc
APPROVED=rsc
DELTA=27  (18 added, 0 deleted, 9 changed)
OCL=35503
CL=35505
2009-10-08 22:16:08 -07:00
Robert Griesemer
517839aa40 - debugging support
R=rsc
DELTA=110  (98 added, 0 deleted, 12 changed)
OCL=35487
CL=35490
2009-10-08 15:23:49 -07:00
Russ Cox
094f1d5990 more lgtm files from gofmt
R=gri
OCL=35485
CL=35488
2009-10-08 15:14:54 -07:00
Ian Lance Taylor
8231548365 Only clean the relevant installed files, not everything. This
should let a 6g build and an 8g build be done in sequence
without stepping on each other.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35478
CL=35481
2009-10-08 13:35:46 -07:00
Robert Griesemer
7ecfb021f3 - rewrite declaration printing to take full use of discardable tabwriter columns
- honor line breaks in multi-line expressions
- do not add extra indentation to multi-line string lists
- don't put blanks around simple function calls and conversions
- do not modify `` strings
- added extra test cases

R=rsc
DELTA=398  (246 added, 51 deleted, 101 changed)
OCL=35453
CL=35465
2009-10-08 08:48:33 -07:00
Nigel Tao
093af4e512 PNG encoder unit test.
R=rsc,r
APPROVED=r
DELTA=84  (77 added, 6 deleted, 1 changed)
OCL=35456
CL=35458
2009-10-07 23:14:23 -07:00
Russ Cox
55edf49a01 add & fix bug207: rewritten if condition
was discarding initialization work.

R=ken
OCL=35454
CL=35457
2009-10-07 22:19:42 -07:00
Russ Cox
d515063588 better handling of mistaken top-level variable
references during the parsing of :=.  the base
problem is that when reading

	a,b,c,d

the parser makes those refer to existing variables,
which might create a few stub top-level ones
for undefined names, but then if a := is the next
token, we need to undo those stubs.

this was causing problems in multifile packages
in which one file used a := variable named rpc
and the other imported a package named rpc.

R=ken
OCL=35446
CL=35446
2009-10-07 14:55:12 -07:00
Russ Cox
4fd7a908bb do not import testing twice when testing testing.
R=r
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=35443
CL=35445
2009-10-07 14:52:44 -07:00
Russ Cox
91549438d8 apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync syscall testing time unicode unsafe utf8
R=gri
DELTA=1409  (79 added, 24 deleted, 1306 changed)
OCL=35415
CL=35437
2009-10-07 11:55:06 -07:00
Robert Griesemer
f77b255c38 support for "hard" and "soft" tabs:
- soft-tab separated columns can be discarded if empty and DiscardEmptyColumns is set
- hard-tab separated columns are never discarded

R=rsc
DELTA=63  (42 added, 7 deleted, 14 changed)
OCL=35421
CL=35435
2009-10-07 10:55:45 -07:00
Russ Cox
c2874976e4 factor portable object+library bits out of 5l/6l/8l into ld
R=r
DELTA=3214  (904 added, 2260 deleted, 50 changed)
OCL=35425
CL=35427
2009-10-07 00:11:59 -07:00
Russ Cox
cfdb3a5639 make reader more useful
for lower-level clients:
	* expose p.Skip
	* expose p.Unmarshal
	* wildcard struct field "Any"
	* unmarshal into bool
	* unmarshal into xml.Name
	* unmarshal into pointer

R=r
DELTA=61  (50 added, 5 deleted, 6 changed)
OCL=35372
CL=35422
2009-10-06 22:03:47 -07:00
Russ Cox
c2ec9583a0 apply gofmt to go, gob, hash, http, image, io, json, log
R=gri
DELTA=1359  (138 added, 32 deleted, 1189 changed)
OCL=35408
CL=35420
2009-10-06 19:41:51 -07:00
Russ Cox
2c5ec1ebc0 apply gofmt to malloc math once os
R=gri
DELTA=566  (4 added, 14 deleted, 548 changed)
OCL=35410
CL=35419
2009-10-06 19:40:35 -07:00
Russ Cox
6faacd2244 apply gofmt to auto-generated syscall files
R=gri
DELTA=4023  (104 added, 27 deleted, 3892 changed)
OCL=35416
CL=35418
2009-10-06 19:38:30 -07:00
Kai Backman
a2cf914379 5l library loading, 64 bit entry points
R=rsc
APPROVED=rsc
DELTA=58  (52 added, 3 deleted, 3 changed)
OCL=35417
CL=35417
2009-10-06 19:00:30 -07:00
Kai Backman
116beb2653 - moved 3 functions from syscall_linux to _386 and _amd64 (arm lacks them)
- 64 bit OMINUS
- added bunch of missing arm syscalls

R=rsc
APPROVED=rsc
DELTA=203  (189 added, 3 deleted, 11 changed)
OCL=35412
CL=35414
2009-10-06 16:39:38 -07:00
Russ Cox
13b1d5b1bb fix build - missing from 35404
TBR=gri
OCL=35411
CL=35411
2009-10-06 16:06:34 -07:00
Robert Griesemer
b1fc650666 - set uint type for flags
- simplified some code

R=rsc
DELTA=19  (0 added, 0 deleted, 19 changed)
OCL=35405
CL=35407
2009-10-06 15:44:13 -07:00
Russ Cox
ecb863a9a9 apply gofmt to datafmt, ebnf, exec, expvar, flag, fmt
R=gri
DELTA=456  (6 added, 3 deleted, 447 changed)
OCL=35398
CL=35406
2009-10-06 15:38:57 -07:00
Russ Cox
2c2e2c5d55 more comment work.
got rid of regexps.
primary bug fix is that // inside /* */ do not get stripped anymore,
so that the text inside

/*
int a;
// int b;
int c;
*/

is

int a;
// int b;
int c;

before, the "int b;" line was being uncommented too.

R=gri
DELTA=65  (13 added, 42 deleted, 10 changed)
OCL=35334
CL=35404
2009-10-06 15:28:47 -07:00
Robert Griesemer
dc093494f3 - simplify "needsBlanks" logic for identifiers and strings
TBR=rsc
DELTA=16  (10 added, 4 deleted, 2 changed)
OCL=35379
CL=35403
2009-10-06 15:22:03 -07:00
Robert Griesemer
90193fb67e add IgnoreEmptyColumns feature to tabwriter
R=rsc
DELTA=96  (74 added, 2 deleted, 20 changed)
OCL=35391
CL=35402
2009-10-06 15:10:36 -07:00
Rob Pike
0bf5553538 fix build
R=rsc
DELTA=5  (5 added, 0 deleted, 0 changed)
OCL=35387
CL=35401
2009-10-06 15:08:32 -07:00
Russ Cox
650bff6aa9 another round of gofmt applications
R=gri
DELTA=900  (106 added, 31 deleted, 763 changed)
OCL=35384
CL=35396
2009-10-06 14:55:39 -07:00
Russ Cox
22c98a3314 gofmt on crypto, debug
R=gri
DELTA=2560  (127 added, 177 deleted, 2256 changed)
OCL=35388
CL=35395
2009-10-06 14:55:06 -07:00
Kai Backman
620ec45c5f cleaned up cgen() to be a bit more straightforward.
R=rsc
APPROVED=rsc
DELTA=104  (46 added, 56 deleted, 2 changed)
OCL=35392
CL=35394
2009-10-06 14:48:39 -07:00
Russ Cox
c62b3265a7 apply gofmt to the LGTM-marked files from 34501
that have not changed since I applied gofmt.

R=gri
DELTA=456  (77 added, 3 deleted, 376 changed)
OCL=35378
CL=35383
2009-10-06 11:42:55 -07:00
Adam Langley
9d9a421e24 Change description of time.Time.ZoneOffset to specify east is +ve.
Currently, the description says that +ve numbers are westwards of UTC.
Typically, timezones are specified with +ve numbers running east of Greenwich.
For example, San Francisco is specified as UTC-8. Also, when calling
time.Localtime(), the following is returned on my box in PDT:

{Year:2009 Month:10 Day:5 Hour:18 Minute:55 Second:6 Weekday:1 ZoneOffset:-25200
Zone:PDT}

Note that the ZoneOffset is negative. This leads me to suspect that the
description is mistaken.

R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=35356
CL=35377
2009-10-06 10:01:39 -07:00
Robert Griesemer
63ef5a4173 change tabwidth to 8 for tests
R=rsc
DELTA=39  (0 added, 0 deleted, 39 changed)
OCL=35360
CL=35376
2009-10-06 09:52:37 -07:00
Kai Backman
5afce0ca85 64 bit cmp and some sgen tweaks
go/test: passes 75% (256/339)

R=rsc
APPROVED=rsc
DELTA=142  (53 added, 4 deleted, 85 changed)
OCL=35367
CL=35375
2009-10-06 09:47:46 -07:00
Kai Backman
d58b5fca45 move cas out, add dummy runcgo.
R=rsc
APPROVED=rsc
DELTA=73  (45 added, 28 deleted, 0 changed)
OCL=35363
CL=35366
2009-10-05 21:52:10 -07:00
Rob Pike
e6bc5bf5af allow multiple -L options
R=rsc
DELTA=31  (15 added, 3 deleted, 13 changed)
OCL=35364
CL=35364
2009-10-05 21:31:50 -07:00
Robert Griesemer
e8210824f6 various go printer fixes:
- better handling of line breaks in expression lists
- fixed line breaks around label decls
- remove ()'s around if, for, switch expressions
- simple index expressions don't require blanks
- better line breaks around declarations of different kind

R=rsc
DELTA=404  (369 added, 8 deleted, 27 changed)
OCL=35354
CL=35359
2009-10-05 19:37:34 -07:00
Robert Griesemer
c915bc54ba remove a file from idempotency test so that the entire suite passes
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35355
CL=35358
2009-10-05 19:32:10 -07:00
Nigel Tao
f2d2e113be First cut at a PNG encoder.
TODOs include filtering, and a unit test.

R=rsc
APPROVED=r
DELTA=280  (249 added, 1 deleted, 30 changed)
OCL=35262
CL=35348
2009-10-05 17:34:15 -07:00
Russ Cox
9006f49130 comment tweaks; implement precise name
character sets.

R=r
DELTA=339  (257 added, 1 deleted, 81 changed)
OCL=35344
CL=35346
2009-10-05 16:45:24 -07:00
Russ Cox
0ddfe70c27 XML parser
R=r
DELTA=546  (545 added, 0 deleted, 1 changed)
OCL=35318
CL=35341
2009-10-05 15:10:00 -07:00
Russ Cox
a91b6b74e3 XML lexing
The lexer is the bottom level.
Most clients will use the Unmarshal method,
not yet implemented, which will behave like
json.Unmarshal.

R=r
DELTA=1115  (766 added, 219 deleted, 130 changed)
OCL=35316
CL=35339
2009-10-05 15:00:50 -07:00
Russ Cox
7d85cebb1c preserve blank lines in // comments
R=gri
DELTA=32  (13 added, 12 deleted, 7 changed)
OCL=35317
CL=35332
2009-10-05 11:24:01 -07:00
Russ Cox
c5b056f24f update json comments
R=r
DELTA=16  (4 added, 2 deleted, 10 changed)
OCL=35320
CL=35331
2009-10-05 11:23:44 -07:00
David Symonds
c17dde2730 Add write support for the GNU tar binary numeric field extension.
R=rsc
APPROVED=rsc
DELTA=102  (89 added, 1 deleted, 12 changed)
OCL=35321
CL=35327
2009-10-05 04:08:24 -07:00
Russ Cox
168777d4af fix build
TBR=r
OCL=35308
CL=35308
2009-10-03 15:02:11 -07:00
Russ Cox
2d72b39fd3 add cgo test that doesn't depend on
non-standard libraries and add to build.

R=r
DELTA=211  (210 added, 0 deleted, 1 changed)
OCL=35293
CL=35307
2009-10-03 11:33:51 -07:00
Bill Neubauer
41a2b21f26 Fixing HTTP POST handling to work with Chrome and Safari.
request.go does not handle Content-Type correctly for the definition of
Media Types.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7

R=rsc
APPROVED=rsc
DELTA=44  (42 added, 0 deleted, 2 changed)
OCL=35274
CL=35306
2009-10-03 11:09:01 -07:00
Russ Cox
11d3805579 clean more
R=r
DELTA=40  (9 added, 3 deleted, 28 changed)
OCL=35277
CL=35305
2009-10-03 10:38:03 -07:00
Russ Cox
133a158bd8 8c, 8l dynamic loading support.
better mach binaries.
cgo working on darwin+linux amd64+386.
eliminated context switches - pi is 30x faster.
add libcgo to build.

on snow leopard:
  - non-cgo binaries work; all tests pass.
  - cgo binaries work on amd64 but not 386.

R=r
DELTA=2031  (1316 added, 626 deleted, 89 changed)
OCL=35264
CL=35304
2009-10-03 10:37:12 -07:00
Russ Cox
f15300beb7 expand error regexp in dns test
R=r
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=35292
CL=35303
2009-10-03 10:35:49 -07:00
Robert Griesemer
4b3a13d379 - improved handling of white space around declarations and statements
- extra tests

R=rsc
DELTA=366  (264 added, 37 deleted, 65 changed)
OCL=35299
CL=35301
2009-10-02 22:24:05 -07:00
Robert Griesemer
433e05974a - allow parenthesized [...]T types as in: ([...]int){}
- added extra tests

R=rsc
DELTA=55  (37 added, 0 deleted, 18 changed)
OCL=35250
CL=35276
2009-10-02 10:03:25 -07:00
Kai Backman
3e5a817d07 a few more code generation bugs and an interface alignment issue.
go/test: passes 74% (251/339)

R=rsc
APPROVED=rsc
DELTA=40  (34 added, 0 deleted, 6 changed)
OCL=35254
CL=35275
2009-10-02 09:06:51 -07:00
Nigel Tao
032f2d399f Change deflate.go's default compression level from 4 to 6.
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=35208
CL=35261
2009-10-01 17:50:16 -07:00
Robert Griesemer
53440da835 Factored out boilerplate from all html docs in doc directory:
- the first HTML comment in those files is extracted as page
  title when serving them
- lib/godoc.html is top-level template for all pages served
- experimented a bit with package documentation layout
  (feedback welcome)
- various related cleanups

TODO:
- The / page (doc/root.html) content repeats links that are
  in the navigation bar. It needs to be cleaned up.

R=rsc
DELTA=826  (86 added, 692 deleted, 48 changed)
OCL=35230
CL=35245
2009-10-01 14:08:00 -07:00
Kai Backman
57f834aeff generate float registers correctly.
go/test: passes 71% (242/339)

R=rsc
APPROVED=rsc
DELTA=9  (5 added, 0 deleted, 4 changed)
OCL=35233
CL=35243
2009-10-01 13:52:55 -07:00
Kai Backman
e5c884f7db some progress on arm linux syscall interface. ztypes_linux_arm
still has problems with godefs.

R=rsc
APPROVED=rsc
DELTA=801  (134 added, 235 deleted, 432 changed)
OCL=35189
CL=35211
2009-10-01 06:55:01 -07:00
Kai Backman
8fd53f4754 cgen_asop sudoaddable
R=rsc
APPROVED=rsc
DELTA=14  (4 added, 0 deleted, 10 changed)
OCL=35190
CL=35210
2009-10-01 06:50:59 -07:00
Kai Backman
a1b4796394 fixed a few calls to gcmp and some really bothched OINDEX code
(how did that happen?)

go/test: passes 70% (238/339)

R=rsc
APPROVED=rsc
DELTA=18  (10 added, 0 deleted, 8 changed)
OCL=35185
CL=35188
2009-09-30 18:56:37 -07:00
Russ Cox
2157025ef0 step toward darwin ffi: factor out macho code
R=r
DELTA=771  (374 added, 287 deleted, 110 changed)
OCL=35187
CL=35187
2009-09-30 17:33:39 -07:00
Kai Backman
399d23d4f4 load binary op arguments into registers
go/test: passes 69% (237/339)

R=rsc
APPROVED=rsc
DELTA=12  (3 added, 9 deleted, 0 changed)
OCL=35178
CL=35180
2009-09-30 14:28:18 -07:00
Russ Cox
e67a5084b8 cgo working on linux/386
R=r
DELTA=70  (47 added, 4 deleted, 19 changed)
OCL=35167
CL=35171
2009-09-30 13:47:15 -07:00
Rob Pike
0632bb4ae5 rename the public exvar package to be expvar.
R=rsc
DELTA=684  (324 added, 324 deleted, 36 changed)
OCL=35161
CL=35163
2009-09-30 13:11:33 -07:00
Russ Cox
cce01111a9 cgo: works on amd64.
integrated into Makefiles (see misc/cgo/gmp/Makefile).

R=r
DELTA=1110  (540 added, 525 deleted, 45 changed)
OCL=35153
CL=35158
2009-09-30 11:51:08 -07:00
Russ Cox
5124e66fca c compiler bug tickled by
void f(struct { int x[1]; } p) { }
the "int" was getting attached to f.

R=ken
OCL=35145
CL=35151
2009-09-30 10:25:22 -07:00
Russ Cox
f2a520f48d clean up error output;
do not print entire buffer on error,
since it can be very large.
instead print identifying string.

R=krasin
DELTA=14  (1 added, 3 deleted, 10 changed)
OCL=35141
CL=35143
2009-09-30 08:59:56 -07:00
Russ Cox
b71c484c91 fix 386 build - register allocation and shift bug
R=ken
OCL=35140
CL=35142
2009-09-30 08:56:01 -07:00
Russ Cox
e7f9452da5 missing error checking related to ([...]int){...}
R=ken
OCL=35132
CL=35132
2009-09-29 21:23:34 -07:00
Russ Cox
08eefec9d6 nacl system call updates
R=r
DELTA=236  (211 added, 18 deleted, 7 changed)
OCL=35084
CL=35131
2009-09-29 21:22:25 -07:00
Russ Cox
6f1698774d undo 35108 (disallow parens around type in struct literal).
allow parens around [...]int in struct literal.

R=ken
OCL=35112
CL=35130
2009-09-29 21:21:14 -07:00
Nigel Tao
c51e184538 ZLIB deflater.
R=rsc
APPROVED=rsc
DELTA=222  (219 added, 0 deleted, 3 changed)
OCL=35031
CL=35129
2009-09-29 19:47:05 -07:00
Kai Backman
187cc1eb49 fix munging of pointer.
go/test: passes 69% (235/339)

R=rsc
APPROVED=rsc
DELTA=5  (4 added, 1 deleted, 0 changed)
OCL=35107
CL=35109
2009-09-29 16:07:59 -07:00
Russ Cox
9c3c140984 disallow parens around type in struct literal syntax,
per discussion with gri.

R=ken
OCL=35108
CL=35108
2009-09-29 16:05:44 -07:00
Ivan Krasin
c59a965133 Deflate encoder
APPROVED=rsc
OCL=34514
CL=35093
2009-09-29 13:16:21 -07:00
Adam Langley
5a69935a3c Add crypto/rc4.
RC4 is a common stream cipher. This adds a pure-go C implementation.

R=r
APPROVED=r
DELTA=139  (138 added, 0 deleted, 1 changed)
OCL=35056
CL=35092
2009-09-29 12:15:24 -07:00
Kai Backman
8ccf8240f4 fixed alignment issue resulting from confusion around the
meaning of out args.

go/test: passes 68% (231/339)

R=rsc
APPROVED=rsc
DELTA=13  (7 added, 0 deleted, 6 changed)
OCL=35072
CL=35080
2009-09-29 07:27:49 -07:00
Kai Backman
24bfaaf07a - added gcmp for proper ACMP generation, changed all call
sites plus optimized constant code a bit (one less register
  used).
- changed conditional branches, might need a re-tweak later
- gave up on agen OINDEX and copied/fixed the version in 8g

go/test: passes 66% (225/339)

R=rsc
APPROVED=rsc
DELTA=148  (67 added, 32 deleted, 49 changed)
OCL=35040
CL=35055
2009-09-28 15:40:13 -07:00
Robert Griesemer
ec10bf8f43 permit only one method name per method signature in interface types
(in sync with spec CL 35047)

R=rsc
DELTA=44  (4 added, 8 deleted, 32 changed)
OCL=35048
CL=35054
2009-09-28 14:54:53 -07:00
Rob Pike
7fed6527e1 might as well make 6g run faster.... go from gcc -O1 to -O2
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=35023
CL=35049
2009-09-28 14:36:20 -07:00
Russ Cox
7743ffead4 disallow interface { x, y() }
R=ken
OCL=35042
CL=35044
2009-09-28 14:05:34 -07:00
Austin Clements
3c8a1de720 Add eval and ogle to the build process so they can be kept up
to date.

R=rsc
APPROVED=rsc
DELTA=8  (6 added, 0 deleted, 2 changed)
OCL=35009
CL=35011
2009-09-25 11:36:27 -07:00
Austin Clements
4211384976 Switch ogle to in-tree gosym package. Delete my private sym
package.  If a Sym is a function symbol, include a reference
to the Func so it's easily accessible when you're traversing
the list of all symbols.  This diff is more interesting than
the proc switch because the gosym interface differs from the
old sym interface.

R=rsc
APPROVED=rsc
DELTA=1957  (34 added, 1868 deleted, 55 changed)
OCL=34969
CL=35008
2009-09-25 09:39:08 -07:00
Russ Cox
ed6de5af4c comparisons have type bool
R=ken
OCL=34995
CL=34997
2009-09-24 17:55:22 -07:00
Russ Cox
86b119f765 install assembly math.Sqrt on amd64
R=r
DELTA=33  (32 added, 0 deleted, 1 changed)
OCL=34983
CL=34986
2009-09-24 14:27:52 -07:00
Russ Cox
285b6021e9 missing files; cleaned up g4 nothave output.
fixes 386 build.

R=r
DELTA=56  (56 added, 0 deleted, 0 changed)
OCL=34979
CL=34981
2009-09-24 13:38:18 -07:00
Russ Cox
0c71ead9e6 convert 8l to new ELF code.
mostly cut and paste from 6l.

R=r
DELTA=930  (525 added, 182 deleted, 223 changed)
OCL=34976
CL=34976
2009-09-24 12:53:35 -07:00
Russ Cox
5de6096415 allow runes >= 0x80 in symbols in #pragmas
R=ken
OCL=34975
CL=34975
2009-09-24 11:45:08 -07:00
Russ Cox
a4d09c2aa3 add Size method to dwarf.Type
R=r
DELTA=30  (24 added, 3 deleted, 3 changed)
OCL=34950
CL=34974
2009-09-24 11:43:38 -07:00
Russ Cox
12fc217336 cgo checkpoint.
can write all 3 output files and then compile them by hand.

R=r
DELTA=919  (841 added, 16 deleted, 62 changed)
OCL=34954
CL=34973
2009-09-24 11:43:19 -07:00
Austin Clements
ffe83e582e Switch ogle over to the in-tree debug/proc package. Fix
debug/proc to install to the right place.  Delete the old
ptrace package.  The diff looks huge, but it's mostly
s/ptrace/proc/.

R=rsc
APPROVED=rsc
DELTA=1940  (10 added, 1835 deleted, 95 changed)
OCL=34966
CL=34968
2009-09-24 09:07:47 -07:00
Russ Cox
f0964a54fb go/printer: fix sync bug - avoid sending on errors twice -
and report node type in error

R=gri
DELTA=4  (3 added, 0 deleted, 1 changed)
OCL=34949
CL=34955
2009-09-24 01:37:27 -07:00
Rob Pike
fbb7029747 expand ticker interface to allow a client to shut down a ticker.
existing interface still works.

R=rsc
DELTA=50  (32 added, 2 deleted, 16 changed)
OCL=34930
CL=34932
2009-09-23 13:02:14 -07:00
Russ Cox
567673fc42 nacl - run tests under emulator.
special all-nacl.bash and test/run-nacl that
run just the tests known to work under nacl.
the rest requires closures.

fix another bug or two in syscall.

R=r
DELTA=420  (410 added, 8 deleted, 2 changed)
OCL=34882
CL=34907
2009-09-22 16:56:28 -07:00
Russ Cox
1b14bdbf1c changes to accommodate nacl:
* change ldt0setup to set GS itself; nacl won't let us do it.
  * change breakpoint to INT $3 so 8l can translate to HLT for nacl.
  * panic if closure is needed on nacl.
  * do not try to access symbol table on nacl.
  * mmap in 64kB chunks.

nacl support:
  * system calls, threading, locks.

R=r
DELTA=365  (357 added, 5 deleted, 3 changed)
OCL=34880
CL=34906
2009-09-22 16:28:32 -07:00
Rob Pike
9e7f3a46d3 restore the old algorithm. the new one is more memory efficient in large cases
but too slow across the board.

R=rsc
DELTA=315  (50 added, 219 deleted, 46 changed)
OCL=34868
CL=34902
2009-09-22 14:53:48 -07:00
Kai Backman
8ce5f6e14a fix bad code generation.
go/test: passes 64% (215/337) tests

metric updated, had total number of tests wrong. number of
failing tests is down from 129 to 122.

R=rsc
APPROVED=rsc
DELTA=228  (12 added, 5 deleted, 211 changed)
OCL=34897
CL=34899
2009-09-22 13:13:23 -07:00
Russ Cox
f7e43ffa9d nacl syscall: write return values to correct stack location
R=r
DELTA=18  (0 added, 0 deleted, 18 changed)
OCL=34894
CL=34894
2009-09-22 10:34:44 -07:00
Russ Cox
7b850fb7e3 nacl syscall package - machine generated files
R=r
DELTA=515  (515 added, 0 deleted, 0 changed)
OCL=34881
CL=34891
2009-09-22 07:49:49 -07:00
Russ Cox
b428456df6 nacl syscall package.
similar tweaks to make debug/proc, net, os build.

R=r
DELTA=861  (855 added, 4 deleted, 2 changed)
OCL=34877
CL=34890
2009-09-22 07:49:31 -07:00
Russ Cox
586d9d5a19 use $(shell uname) instead of $GOOS when
deciding what the host process support is.
this makes a cross-compiling (e.g., GOOS=nacl) build
still generate valid host debugger binaries.

R=r
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=34878
CL=34889
2009-09-22 07:48:43 -07:00
Russ Cox
7390aa0102 nacl:
add jmp to constant pc.
	generate HLT for INT $3
	do not insert NOPs between REP/REPN and subsequent instruction.
	allow very long time for convergence.

R=ken
OCL=34879
CL=34879
2009-09-22 01:10:40 -07:00
Ken Thompson
2975308125 more inlining of sliceslice
R=rsc
OCL=34871
CL=34871
2009-09-21 18:23:16 -07:00
Robert Griesemer
681f86a87f improved spacing around if, switch, and for control clauses
R=r
DELTA=89  (82 added, 5 deleted, 2 changed)
OCL=34870
CL=34870
2009-09-21 18:07:20 -07:00
Russ Cox
eae0906bed rewrite RET, indirect CALL, indirect JMP for nacl.
can JMP or CALL indirect through a register R
provided the preceding instruction is AND $~31, R.

R=ken
OCL=34863
CL=34867
2009-09-21 15:48:22 -07:00
Russ Cox
bbcb91a3a7 convert 386 to use %gs instead of %fs for extern register.
required for nacl and may be nicer for ffi,
because %gs is the standard register for thread-local storage.

R=ken
OCL=34861
CL=34866
2009-09-21 15:46:50 -07:00
Russ Cox
a95ee61aea ideal bools and related fixes
R=ken
OCL=34859
CL=34865
2009-09-21 15:45:55 -07:00
Russ Cox
27969e87cf add required conversions; bug in compiler let it slip through
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=34860
CL=34864
2009-09-21 15:44:10 -07:00
Rob Pike
6efd7e6b8f move strings.Buffer into bytes
delete strings.Buffer
add a test for a bug not caught before (mustn't install zero-length blocks)

R=rsc
DELTA=987  (289 added, 587 deleted, 111 changed)
OCL=34850
CL=34850
2009-09-21 12:59:14 -07:00
Rob Pike
fed4770685 step 2 of the great buffer shift.
make strings.Buffer handle strings and bytes with comparable efficiency.
if ok, next step will be to move this code to bytes.Buffer and terminate
strings.Buffer's short happy life.

R=rsc
DELTA=292  (212 added, 0 deleted, 80 changed)
OCL=34837
CL=34849
2009-09-21 12:20:15 -07:00
Russ Cox
de0d762a0f accept CALL $(constant) to call absolute PC
R=ken
OCL=34845
CL=34845
2009-09-21 09:41:21 -07:00
Nigel Tao
11e313ae72 Unit tests for image/png, based off the semi-official pngsuite from
libpng.org.

R=rsc
APPROVED=r
DELTA=1176  (1175 added, 1 deleted, 0 changed)
OCL=34727
CL=34838
2009-09-20 19:08:03 -07:00
Robert Griesemer
144580d690 - filter trailing whitespace
- removed some unused code

R=rsc
DELTA=103  (84 added, 15 deleted, 4 changed)
OCL=34816
CL=34829
2009-09-19 11:52:40 -07:00
Kai Backman
e4eaf4c24e expanded arm regression testing. will go away once 5g is compliant
R=rsc
APPROVED=rsc
DELTA=300  (297 added, 0 deleted, 3 changed)
OCL=34813
CL=34821
2009-09-18 19:09:29 -07:00
Russ Cox
4a4ec23870 8l: step toward native client.
- ELF header bits and addresses
  - do not let instructions span 32-byte boundary
  - align CALLs so return is to 32-byte boundary
  - align indirect jump targets to 32-byte boundary
    (only possible indirect jumps are function entries)

still to do:
  - replace indirect jump, indirect call, and ret with
    nacl-approved instruction sequences
  - switch to GS segment for m-local storage

R=ken
OCL=34818
CL=34818
2009-09-18 18:57:15 -07:00
Russ Cox
c64986f706 merge first pass into main loop in span calculation.
having one copy will cut nacl changes in half.

R=ken
OCL=34815
CL=34815
2009-09-18 17:08:18 -07:00
Kai Backman
46e392e01c changed 5c calling convention to use stack exclusively for in
params. a number of fixes to assembly routines that assumed R0
had the first arg. one stack offset fix, arm pushes the link
register on stack top.

go/test: passes 65% (235/364) tests

R=rsc
APPROVED=rsc
DELTA=20  (11 added, 0 deleted, 9 changed)
OCL=34809
CL=34812
2009-09-18 16:45:41 -07:00
Russ Cox
2e5a588718 fix build again; this time for sure. sigh
TBR=r
OCL=34803
CL=34803
2009-09-18 12:56:18 -07:00
Kai Backman
2c7ec3d861 fix 5g -S and -g output
R=rsc
APPROVED=rsc
DELTA=115  (93 added, 14 deleted, 8 changed)
OCL=34798
CL=34802
2009-09-18 12:47:44 -07:00
Kai Backman
020dbcd4df revert setting of name from type. already set correctly.
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 1 deleted, 0 changed)
OCL=34799
CL=34801
2009-09-18 12:47:25 -07:00
Russ Cox
99f54911cd fix build - missing file
TBR=r
OCL=34800
CL=34800
2009-09-18 12:45:34 -07:00
Russ Cox
6a2602de91 cgo: can look up C identifier kind (type or value) and type
gmp.go:197:4:  type mpz_t          C type  mpz_t
gmp.go:205:2:  call mpz_init       C value func(mpz_ptr) void
gmp.go:206:2:  call mpz_set        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:221:2:  call mpz_init       C value func(mpz_ptr) void
gmp.go:227:7:  call size_t         C type  size_t
gmp.go:228:2:  call mpz_export     C value func(*void, *size_t, int, size_t, int, size_t, mpz_srcptr) *void
gmp.go:235:13: call mpz_sizeinbase C value func(mpz_srcptr, int) size_t
gmp.go:241:2:  call mpz_set        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:252:3:  call mpz_import     C value func(mpz_ptr, size_t, int, size_t, int, size_t, *const void) void
gmp.go:261:2:  call mpz_set_si     C value func(mpz_ptr, long int) void
gmp.go:273:5:  call mpz_set_str    C value func(mpz_ptr, *const char, int) int
gmp.go:282:9:  call mpz_get_str    C value func(*char, int, mpz_srcptr) *char
gmp.go:287:3:  call mpz_clear      C value func(mpz_ptr) void
gmp.go:302:2:  call mpz_add        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:311:2:  call mpz_sub        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:320:2:  call mpz_mul        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:329:2:  call mpz_tdiv_q     C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:339:2:  call mpz_tdiv_r     C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:348:2:  call mpz_mul_2exp   C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:356:2:  call mpz_div_2exp   C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:367:3:  call mpz_pow_ui     C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:369:3:  call mpz_powm       C value func(mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr) void
gmp.go:378:2:  call mpz_neg        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:386:2:  call mpz_abs        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:404:9:  call mpz_cmp        C value func(mpz_srcptr, mpz_srcptr) int
gmp.go:413:2:  call mpz_tdiv_qr    C value func(mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:426:2:  call mpz_gcdext     C value func(mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr) void

R=r
DELTA=938  (628 added, 308 deleted, 2 changed)
OCL=34733
CL=34791
2009-09-18 11:52:00 -07:00
Russ Cox
92f773dc77 add DWARF method to elf.File.
test both ELF and Mach-O in dwarf package.

R=r
DELTA=83  (44 added, 10 deleted, 29 changed)
OCL=34717
CL=34790
2009-09-18 11:50:24 -07:00
Russ Cox
bf69025825 Mach-O file reading
R=r
DELTA=784  (784 added, 0 deleted, 0 changed)
OCL=34715
CL=34788
2009-09-18 11:49:22 -07:00
Austin Clements
ad9c6f7700 Rudimentary command shell for Ogle. Hack to prevent linker
from inlining newprocreadylocked.  Fix type bridge's handling
of basic types.  Include interpreter's Thread in bridged
native function calls.

; load . "6.out"
Started 6.out
; BpSet("main·merge")
; ContWait()
breakpoint at 0x400800
=>   400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19
; bt
=>   400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19
     400b6a main·mergeSort+0x1be /home/austin/src-go1/usr/austin/ptrace/test/sort.go:34
     448313 goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133
; main.merge.a
{1}

; load . "pid:25753"
Attached to 25753
; bt
=>   479ddf syscall·Syscall+0x24 /home/austin/src-go1/src/pkg/syscall/asm_linux_amd64.s:24
     47c011 syscall·Read+0x5d /home/austin/src-go1/src/pkg/syscall/zsyscall_linux_amd64.go:368
     4119e5 os·*File·Read+0x5f /home/austin/src-go1/src/pkg/os/file.go:122
     427bf3 bufio·*Reader·fill+0x116 /home/austin/src-go1/src/pkg/bufio/bufio.go:105
     428361 bufio·*Reader·ReadSlice+0x195 /home/austin/src-go1/src/pkg/bufio/bufio.go:244
     40204a ogle·Main+0x94 /home/austin/src-go1/usr/austin/ogle/cmd.go:226
     40080f main·main+0xf /home/austin/src-go1/usr/austin/ogle/main.go:6
     41c4b8 mainstart+0xf /home/austin/src-go1/src/pkg/runtime/amd64/asm.s:55
     41531f goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133

R=rsc
APPROVED=rsc
DELTA=433  (420 added, 2 deleted, 11 changed)
OCL=34410
CL=34782
2009-09-18 09:11:19 -07:00
Rob Pike
7be770071f use buf.String() instead of string(buf.Bytes())
use strings.Buffer instead of bytes.Buffer in some places

R=rsc
DELTA=40  (0 added, 3 deleted, 37 changed)
OCL=34770
CL=34775
2009-09-17 23:51:06 -07:00
Kai Backman
a0a965fbcf fixing width bug in DATA output. some logging to make fixing
similar issues easier in the future.

R=rsc
APPROVED=rsc
DELTA=6  (1 added, 0 deleted, 5 changed)
OCL=34771
CL=34773
2009-09-17 23:08:15 -07:00
Kai Backman
6b0bd43fe4 fix code generation of CMP to use registers properly. also fix
one case of uninitialized memory and some output.

R=rsc
APPROVED=rsc
DELTA=73  (43 added, 1 deleted, 29 changed)
OCL=34743
CL=34772
2009-09-17 23:07:52 -07:00
Kai Backman
803a73c431 floating point constants and symbol export fix.
R=rsc
APPROVED=rsc
DELTA=16  (0 added, 1 deleted, 15 changed)
OCL=34753
CL=34769
2009-09-17 19:24:07 -07:00
Russ Cox
cb49a999d1 move static init code from 6g into gc.
hook up to 8g and 5g too.

R=ken
OCL=34768
CL=34768
2009-09-17 19:15:54 -07:00
Russ Cox
73e52ae971 check for unused imports
R=ken
OCL=34732
CL=34756
2009-09-17 16:42:10 -07:00
Robert Griesemer
2a01b9d46e - improved formatting of declarations
- improved formatting of struct and interface types

R=rsc
DELTA=471  (364 added, 47 deleted, 60 changed)
OCL=34747
CL=34751
2009-09-17 15:20:15 -07:00
Russ Cox
20011bc878 unused imports
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Robert Griesemer
1401151ab2 - don't add "..." anonymous field to structs/interfaces if entries are stripped
- don't print any optional semicolons after declarations inside functions
- indicate non-exported fields/methods in exported types with a comment
  so that the "exported source" is legal Go code
- more tests

R=rsc
DELTA=300  (227 added, 25 deleted, 48 changed)
OCL=34697
CL=34730
2009-09-17 09:12:14 -07:00
Robert Griesemer
75f72e7b2e fix build: updated Make.deps
TBR=r
OCL=34729
CL=34729
2009-09-17 09:08:24 -07:00
Rob Pike
229e976163 first cut at a string buffer.
can be made more efficient but this is reasonable.

R=rsc
DELTA=363  (363 added, 0 deleted, 0 changed)
OCL=34720
CL=34720
2009-09-16 23:32:17 -07:00
Russ Cox
0b7878a96e first step toward cgo tool.
can extract import "C" doc comment
and all references to C package.

; cgo gmp.go | sort
#include <gmp.h>
gmp.go:197:4: mpz_t as type
gmp.go:205:2: mpz_init as call
gmp.go:206:2: mpz_set as call
gmp.go:221:2: mpz_init as call
gmp.go:227:7: size_t as call
gmp.go:228:2: mpz_export as call
gmp.go:235:13: mpz_sizeinbase as call
gmp.go:241:2: mpz_set as call
gmp.go:252:3: mpz_import as call
gmp.go:261:2: mpz_set_si as call
gmp.go:273:5: mpz_set_str as call
gmp.go:282:9: mpz_get_str as call
gmp.go:287:3: mpz_clear as call
gmp.go:302:2: mpz_add as call
gmp.go:311:2: mpz_sub as call
gmp.go:320:2: mpz_mul as call
gmp.go:329:2: mpz_tdiv_q as call
gmp.go:339:2: mpz_tdiv_r as call
gmp.go:348:2: mpz_mul_2exp as call
gmp.go:356:2: mpz_div_2exp as call
gmp.go:367:3: mpz_pow as call
gmp.go:369:3: mpz_powm as call
gmp.go:378:2: mpz_neg as call
gmp.go:386:2: mpz_abs as call
gmp.go:404:9: mpz_cmp as call
gmp.go:413:2: mpz_tdiv_qr as call
gmp.go:426:2: mpz_gcdext as call
;

R=r
DELTA=746  (746 added, 0 deleted, 0 changed)
OCL=34710
CL=34714
2009-09-16 18:14:18 -07:00
Russ Cox
11df49c43f publish doc.CommentText
R=gri
DELTA=29  (10 added, 12 deleted, 7 changed)
OCL=34709
CL=34712
2009-09-16 16:56:20 -07:00
Russ Cox
127368d220 make String work on Position values, to enable
fmt.Printf("%s: %s\n", expr.Pos(), message);

R=gri
DELTA=15  (1 added, 3 deleted, 11 changed)
OCL=34706
CL=34708
2009-09-16 16:38:49 -07:00
Rob Pike
d5be41fc4e rename bytes.Buffer.Data() to bytes.Buffer.Bytes()
R=rsc
DELTA=152  (6 added, 0 deleted, 146 changed)
OCL=34695
CL=34701
2009-09-16 15:15:00 -07:00
Rob Pike
2a1c9377d9 use /bin/ed to avoid portability issues
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=34696
CL=34700
2009-09-16 15:14:12 -07:00
Russ Cox
0ee18ca816 add heap.Remove
R=gri
DELTA=14  (14 added, 0 deleted, 0 changed)
OCL=34636
CL=34687
2009-09-16 10:43:49 -07:00
Russ Cox
1bbc044df9 parse and present DWARF type information
R=r
DELTA=940  (929 added, 1 deleted, 10 changed)
OCL=34679
CL=34686
2009-09-16 10:43:27 -07:00
Russ Cox
f249c4114c basic DWARF reading.
R=r
DELTA=949  (949 added, 0 deleted, 0 changed)
OCL=34676
CL=34678
2009-09-15 21:58:45 -07:00
Russ Cox
aaaa1fc69b make 6g match spec:
no semicolon allowd after package clause.
	semicolon allowed after import statement.
	no doubled semicolons allowed

R=ken
OCL=34674
CL=34674
2009-09-15 17:29:08 -07:00
Robert Griesemer
4459624f04 bug fix: allow function types as operands
R=rsc
DELTA=10  (5 added, 0 deleted, 5 changed)
OCL=34662
CL=34666
2009-09-15 16:16:34 -07:00
Kai Backman
bcfc6e631f fixed register usage and removed some dead code.
R=rsc
APPROVED=rsc
DELTA=17  (0 added, 12 deleted, 5 changed)
OCL=34659
CL=34665
2009-09-15 16:15:17 -07:00
Kai Backman
ff196fbde7 patch in proper branch address in zaddr output
R=rsc
APPROVED=rsc
DELTA=12  (11 added, 1 deleted, 0 changed)
OCL=34658
CL=34664
2009-09-15 16:14:49 -07:00
Kai Backman
4c952153aa use register intermediate
R=rsc
APPROVED=rsc
DELTA=21  (7 added, 5 deleted, 9 changed)
OCL=34607
CL=34663
2009-09-15 16:12:47 -07:00
Russ Cox
1c9e4b358f declared and not used; this time for sure
R=ken
OCL=34657
CL=34657
2009-09-15 14:11:43 -07:00
Robert Griesemer
67ab1b9fae consider each case in a switch independent from the previous one for alignment purposes
R=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=34654
CL=34656
2009-09-15 13:53:10 -07:00
Russ Cox
98c98192ec final batch for "declared and not used"
* update mksyscall.sh and rebuild syscall/z*.go
 * fix a few linux-only files

R=r
DELTA=455  (12 added, 1 deleted, 442 changed)
OCL=34637
CL=34655
2009-09-15 13:51:33 -07:00
Robert Griesemer
9b5eb305e1 fix build: added missing files
TBR=rsc
DELTA=56  (56 added, 0 deleted, 0 changed)
OCL=34652
CL=34652
2009-09-15 13:33:16 -07:00
Robert Griesemer
7f25485fc6 go/printer:
- printing of expressions: put spaces only where "needed"
- printing of import statements: no double indentation if there are no renames
- print labels on separate lines
- added extra test files

go/ast:
- unified basic literal nodes and as a result deleted duplicated code
- added initial code to track scopes (not fully used yet)

replaces CL 34553

R=rsc
DELTA=881  (579 added, 223 deleted, 79 changed)
OCL=34623
CL=34651
2009-09-15 13:06:24 -07:00
Russ Cox
ca6a0fee1b more "declared and not used".
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=

R=r
OCL=34624
CL=34638
2009-09-15 09:41:59 -07:00
Russ Cox
1a3198907b fix "declared and not used" in tests;
also template/template.go, missed last time.

R=r
DELTA=116  (61 added, 10 deleted, 45 changed)
OCL=34620
CL=34622
2009-09-14 21:03:53 -07:00
Russ Cox
59914723df declared and not used error, but disabled.
fix some bugs involving _.

R=ken
OCL=34621
CL=34621
2009-09-14 18:38:30 -07:00
Russ Cox
28eba4877b fix "declared and not used" errors in non-test code.
R=r
DELTA=112  (6 added, 57 deleted, 49 changed)
OCL=34610
CL=34610
2009-09-14 17:20:29 -07:00
Russ Cox
b198b994a1 do not crash on nil data value
R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=34606
CL=34609
2009-09-14 16:46:48 -07:00
Russ Cox
c5a441ac70 do not crash printing the zero value for time.Time.
R=r
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=34605
CL=34608
2009-09-14 16:45:35 -07:00
Russ Cox
1a0860b93f make 5g, 8g build again by disabling init code.
R=ken
OCL=34604
CL=34604
2009-09-14 14:27:19 -07:00
Nigel Tao
8a0cb9302f When decoding a paletted PNG, require that a PLTE chunk is seen before
the first IDAT chunk.

R=rsc
APPROVED=rsc
DELTA=7  (2 added, 0 deleted, 5 changed)
OCL=34583
CL=34585
2009-09-13 21:47:54 -07:00
Rob Pike
d3013d8aa1 Add and AddByte
R=rsc
DELTA=83  (83 added, 0 deleted, 0 changed)
OCL=34584
CL=34584
2009-09-13 21:35:18 -07:00
Nigel Tao
70eef675d5 PNG decoder for go.
R=rsc
APPROVED=r
DELTA=694  (675 added, 3 deleted, 16 changed)
OCL=34427
CL=34554
2009-09-10 21:33:44 -07:00
Robert Griesemer
1f11578614 fix build
TBR=rsc
OCL=34550
CL=34552
2009-09-10 18:26:14 -07:00
Russ Cox
2204cfddea fix bug206.
delay calls to savex as long as possible.

R=ken
OCL=34535
CL=34546
2009-09-10 17:33:01 -07:00
Ken Thompson
93b1dcbfcb minor changes
R=rsc
OCL=34545
CL=34545
2009-09-10 17:32:48 -07:00
Robert Griesemer
58c5e62f8b better gofmt formatting:
- first cut a better line breaks in expr lists
- trailing commas and semis printed where we tend to write them
- fixed a couple of minor spacing issues (interface{}, chan<-, map[x]y, x: y)
- removed some formatting flags from gofmt: no need to change default
- removed option to reverse declaration order when printing
- excluded files from test that cause trouble with idempotency test for now

R=rsc
DELTA=497  (364 added, 83 deleted, 50 changed)
OCL=34539
CL=34544
2009-09-10 17:27:06 -07:00
Russ Cox
fc90fb8c81 rename units -> units.txt.
add makefile rules to build a binary named units as a demo.

R=r
DELTA=1257  (659 added, 597 deleted, 1 changed)
OCL=34528
CL=34530
2009-09-10 14:47:10 -07:00
Russ Cox
8f2bf201d3 fix indentation
R=r
DELTA=166  (0 added, 0 deleted, 166 changed)
OCL=34521
CL=34527
2009-09-10 14:18:53 -07:00
Ken Thompson
61f27d3c22 sample goyacc program
R=rsc
OCL=34526
CL=34526
2009-09-10 13:53:35 -07:00
Ken Thompson
a138b50ee1 goyacc command
written in (c-style) go
produces go source parser

R=rsc
OCL=34522
CL=34522
2009-09-10 13:19:46 -07:00
Ken Thompson
0631d65dc5 composit literal under
init function context.
also moved composit literal
code from walk.c to sinit.c

R=rsc
OCL=34503
CL=34503
2009-09-09 17:48:55 -07:00
Russ Cox
aa6e81dd71 a few more blank tests
R=ken
OCL=34500
CL=34500
2009-09-09 16:59:41 -07:00
Russ Cox
079e038aca exit with non-zero status for incompatible pointer type warnings
R=r
DELTA=9  (7 added, 0 deleted, 2 changed)
OCL=34499
CL=34499
2009-09-09 16:45:23 -07:00
Rob Pike
f966ba1df9 use the new type switch multicase to clean up a little.
R=rsc
DELTA=28  (7 added, 16 deleted, 5 changed)
OCL=34487
CL=34487
2009-09-09 10:32:26 -07:00
Russ Cox
f4ee9f133c check type of string/map/array index expressions
R=ken
OCL=34478
CL=34480
2009-09-09 01:31:10 -07:00
Russ Cox
83bdb805a2 error message fixes
x == nil
x.go:5: cannot use nil as bool

c := x.(type);
x.go:88: use of .(type) outside type switch

R=ken
OCL=34476
CL=34476
2009-09-09 01:21:20 -07:00
Russ Cox
e780fa8669 defining package block names must override
universe block names.

BUG=2097244
R=ken
OCL=34295
CL=34473
2009-09-09 01:01:39 -07:00
Russ Cox
5d16d23362 update type switch to match spec.
R=ken
OCL=34471
CL=34471
2009-09-09 00:18:16 -07:00
Russ Cox
5438be4541 write-only variable _
R=ken
OCL=34465
CL=34470
2009-09-08 23:16:19 -07:00
Ken Thompson
32aa5be6ef init context for composit literals
R=rsc
OCL=34462
CL=34462
2009-09-08 15:52:27 -07:00
Russ Cox
54414ad866 add -S flag to print size of symbol
R=r
DELTA=24  (15 added, 0 deleted, 9 changed)
OCL=34447
CL=34458
2009-09-08 14:40:27 -07:00
Robert Griesemer
019e14e32e - clarify vector comment
- adjusted a test to check claim

R=rsc
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=34454
CL=34456
2009-09-08 14:29:41 -07:00
Russ Cox
7a0f4cac03 pass Type* to makechan and makemap so that
they can get the official alignment out of there
instead of guessing.

R=ken
OCL=34450
CL=34450
2009-09-08 13:46:54 -07:00
Russ Cox
bd0c13e9f8 documentation edits:
add comments showing Go syntax for each token.
move doc comments below hidden begin constants

R=gri
DELTA=66  (3 added, 3 deleted, 60 changed)
OCL=34334
CL=34445
2009-09-08 12:27:09 -07:00
Ken Thompson
0421cf072e maps in static initialization
R=rsc
OCL=34434
CL=34434
2009-09-07 17:36:47 -07:00
Ken Thompson
a24a26c107 more static init
almost done

R=rsc
OCL=34422
CL=34422
2009-09-06 15:03:51 -07:00
Ken Thompson
18f2e360a0 composit literals
plateau - more to come

R=rsc
OCL=34413
CL=34413
2009-09-05 20:32:24 -07:00
Austin Clements
eabcb10a32 Don't crash in Sym.ReceiverName for symbols like "x.x"
R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=34404
CL=34406
2009-09-04 16:12:50 -07:00
Russ Cox
45eadcf4b8 add ParseDeclList
R=austin
DELTA=34  (34 added, 0 deleted, 0 changed)
OCL=34280
CL=34352
2009-09-03 17:01:10 -07:00
Russ Cox
55ba20ec2d parse expression statements beginning with
arithmetic unary operators + - ^

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=34338
CL=34350
2009-09-03 16:37:02 -07:00
Russ Cox
74bb34c107 fix linux 386 build
R=austin
DELTA=140  (128 added, 0 deleted, 12 changed)
OCL=34344
CL=34347
2009-09-03 16:17:21 -07:00
Russ Cox
33be0c6465 nil in DeepEqual
R=r
DELTA=13  (5 added, 6 deleted, 2 changed)
OCL=34337
CL=34343
2009-09-03 15:45:43 -07:00