]> Cypherpunks repositories - gostls13.git/log
gostls13.git
16 years agoprint field names on struct members.
Russ Cox [Fri, 12 Dec 2008 00:53:33 +0000 (16:53 -0800)]
print field names on struct members.
also don't concatenate strings next
to each other in the struct,
like p.doprint does.

expose additional print flags to formatters

R=r
DELTA=128  (111 added, 11 deleted, 6 changed)
OCL=20991
CL=21018

16 years agorestrict declarations of type map/chan/string
Ken Thompson [Fri, 12 Dec 2008 00:09:45 +0000 (16:09 -0800)]
restrict declarations of type map/chan/string
(they must be pointers)

R=r
OCL=21009
CL=21009

16 years agoreject struct to interface conversion for now
Russ Cox [Thu, 11 Dec 2008 23:56:13 +0000 (15:56 -0800)]
reject struct to interface conversion for now

R=ken
OCL=21007
CL=21007

16 years agoadd uintptr to reflect and print
Rob Pike [Thu, 11 Dec 2008 22:41:12 +0000 (14:41 -0800)]
add uintptr to reflect and print

R=rsc
DELTA=70  (35 added, 4 deleted, 31 changed)
OCL=20993
CL=20998

16 years agoif the typestring gives a field name of "?", drop it.
Rob Pike [Thu, 11 Dec 2008 21:24:04 +0000 (13:24 -0800)]
if the typestring gives a field name of "?", drop it.

R=rsc
DELTA=11  (7 added, 0 deleted, 4 changed)
OCL=20988
CL=20988

16 years agohandle the nil interface better in reflect and print
Rob Pike [Thu, 11 Dec 2008 20:59:49 +0000 (12:59 -0800)]
handle the nil interface better in reflect and print

R=rsc
DELTA=25  (19 added, 0 deleted, 6 changed)
OCL=20985
CL=20985

16 years agoadd JSON library
Russ Cox [Thu, 11 Dec 2008 20:25:58 +0000 (12:25 -0800)]
add JSON library

R=r
DELTA=1127  (1127 added, 0 deleted, 0 changed)
OCL=20975
CL=20983

16 years agofix race with fresh perforce checkouts
Russ Cox [Thu, 11 Dec 2008 19:58:45 +0000 (11:58 -0800)]
fix race with fresh perforce checkouts

R=r
DELTA=15  (9 added, 0 deleted, 6 changed)
OCL=20977
CL=20981

16 years agoonly generate non-trivial signatures in the
Russ Cox [Thu, 11 Dec 2008 19:54:33 +0000 (11:54 -0800)]
only generate non-trivial signatures in the
file in which they occur.  avoids duplicate
trampoline generation across multiple files.

R=ken
OCL=20976
CL=20980

16 years agolooks like i broke the build
Russ Cox [Thu, 11 Dec 2008 05:20:48 +0000 (21:20 -0800)]
looks like i broke the build

TBR=r
OCL=20963
CL=20963

16 years agoDNS messages
Russ Cox [Thu, 11 Dec 2008 01:17:59 +0000 (17:17 -0800)]
DNS messages

R=r
DELTA=685  (683 added, 0 deleted, 2 changed)
OCL=20926
CL=20951

16 years agobug
Ken Thompson [Thu, 11 Dec 2008 00:23:29 +0000 (16:23 -0800)]
bug

R=r
OCL=20940
CL=20940

16 years agoassorted cleanup and fixes
Russ Cox [Wed, 10 Dec 2008 23:55:59 +0000 (15:55 -0800)]
assorted cleanup and fixes

R=r
DELTA=209  (109 added, 79 deleted, 21 changed)
OCL=20930
CL=20934

16 years agoStringBytes help routine, common functionality put into package io for sharing.
Rob Pike [Wed, 10 Dec 2008 23:46:45 +0000 (15:46 -0800)]
StringBytes help routine, common functionality put into package io for sharing.

R=rsc
DELTA=10  (10 added, 0 deleted, 0 changed)
OCL=20928
CL=20931

16 years agoanother bug cleanup.
Rob Pike [Wed, 10 Dec 2008 22:59:43 +0000 (14:59 -0800)]
another bug cleanup.

R=rsc
DELTA=117  (54 added, 62 deleted, 1 changed)
OCL=20924
CL=20927

16 years agobug120
Ken Thompson [Wed, 10 Dec 2008 22:17:24 +0000 (14:17 -0800)]
bug120

R=r
OCL=20921
CL=20921

16 years agoupdate tests: nil is no longer integer-compatible
Rob Pike [Wed, 10 Dec 2008 21:55:47 +0000 (13:55 -0800)]
update tests: nil is no longer integer-compatible

R=rsc
DELTA=56  (17 added, 32 deleted, 7 changed)
OCL=20876
CL=20916

16 years agoSnapshot:
Robert Griesemer [Wed, 10 Dec 2008 21:51:19 +0000 (13:51 -0800)]
Snapshot:
- fixed html tag generation
- simplified html escaping machinery
  (not 100% correct for strings yet)
- can now produce the first mostly correct formatted html pages from source
  with (fake) links: e.g. pretty -html srcfile.go > srcfile.html
  R=r

OCL=20915
CL=20915

16 years agostring hash function faults w empty string
Ken Thompson [Wed, 10 Dec 2008 21:28:46 +0000 (13:28 -0800)]
string hash function faults w empty string
fixes maps[""]

R=r
OCL=20909
CL=20911

16 years ago2 minor bugs
Ken Thompson [Wed, 10 Dec 2008 20:38:16 +0000 (12:38 -0800)]
2 minor bugs

R=r
OCL=20906
CL=20906

16 years agobug126
Ken Thompson [Wed, 10 Dec 2008 02:31:31 +0000 (18:31 -0800)]
bug126

R=r
OCL=20879
CL=20879

16 years agobug127
Ken Thompson [Wed, 10 Dec 2008 01:52:41 +0000 (17:52 -0800)]
bug127

R=r
OCL=20874
CL=20874

16 years agofix historical editing glitch
Rob Pike [Wed, 10 Dec 2008 01:43:11 +0000 (17:43 -0800)]
fix historical editing glitch

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=20871
CL=20873

16 years agoimplement two TODOs in reflect:
Rob Pike [Wed, 10 Dec 2008 00:33:02 +0000 (16:33 -0800)]
implement two TODOs in reflect:
- delete vestigial SetString method
- make type map use interface instead of *interface

R=rsc
DELTA=31  (0 added, 7 deleted, 24 changed)
OCL=20861
CL=20863

16 years agochans and maps of interfaces
Russ Cox [Wed, 10 Dec 2008 00:16:07 +0000 (16:16 -0800)]
chans and maps of interfaces

R=r
DELTA=746  (729 added, 1 deleted, 16 changed)
OCL=20858
CL=20858

16 years agouse unsafe.pointer in reflection objects
Rob Pike [Tue, 9 Dec 2008 23:41:21 +0000 (15:41 -0800)]
use unsafe.pointer in reflection objects

R=rsc
DELTA=326  (4 added, 259 deleted, 63 changed)
OCL=20853
CL=20856

16 years ago- snapshot if current state
Robert Griesemer [Tue, 9 Dec 2008 23:29:15 +0000 (15:29 -0800)]
- snapshot if current state
- fix pretty printer to work with new tabwriter interface

R=r
OCL=20854
CL=20854

16 years ago- fixed bug with unicode text formatting: the number of bytes
Robert Griesemer [Tue, 9 Dec 2008 21:03:15 +0000 (13:03 -0800)]
- fixed bug with unicode text formatting: the number of bytes
  per rune cannot be computed correctly if we have only parts
  of a rune - delay computation
- added html filtering mode: html tags and entities are ignored
  for width computations
- expanded tests:
  - extra tests for html text
  - extra tests that write text in various portions

R=r
DELTA=227  (126 added, 20 deleted, 81 changed)
OCL=20833
CL=20835

16 years agorobs bug converting unsafe.pointer
Ken Thompson [Tue, 9 Dec 2008 21:00:50 +0000 (13:00 -0800)]
robs bug converting unsafe.pointer

R=r
OCL=20834
CL=20834

16 years agoreplace assembly casts with unsafe.pointer
Russ Cox [Tue, 9 Dec 2008 18:57:55 +0000 (10:57 -0800)]
replace assembly casts with unsafe.pointer

R=r
DELTA=178  (18 added, 101 deleted, 59 changed)
OCL=20822
CL=20826

16 years agomore impossible time errors
Russ Cox [Tue, 9 Dec 2008 18:27:30 +0000 (10:27 -0800)]
more impossible time errors

R=r
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=20788
CL=20818

16 years agoconversion to/from
Ken Thompson [Tue, 9 Dec 2008 04:50:17 +0000 (20:50 -0800)]
conversion to/from
any pointer or uintptr
and unsafe.pointer

R=r
OCL=20795
CL=20795

16 years agofoundation for import unsafe
Ken Thompson [Tue, 9 Dec 2008 03:46:39 +0000 (19:46 -0800)]
foundation for import unsafe

R=r
OCL=20794
CL=20794

16 years agoavoid skew in time.Tick; remove errors from time.Seconds, time.Nanoseconds
Russ Cox [Tue, 9 Dec 2008 01:45:50 +0000 (17:45 -0800)]
avoid skew in time.Tick; remove errors from time.Seconds, time.Nanoseconds

R=r
DELTA=46  (21 added, 10 deleted, 15 changed)
OCL=20785
CL=20787

16 years agouse Note sched.stopped correctly
Russ Cox [Tue, 9 Dec 2008 01:14:08 +0000 (17:14 -0800)]
use Note sched.stopped correctly

R=r
DELTA=6  (5 added, 0 deleted, 1 changed)
OCL=20777
CL=20779

16 years agopick up symbol for JMP main(SB)
Russ Cox [Mon, 8 Dec 2008 19:33:04 +0000 (11:33 -0800)]
pick up symbol for JMP main(SB)
but not JMP main (label).

R=ken
OCL=20724
CL=20724

16 years agoTweak comments so that this test passes with gccgo.
Ian Lance Taylor [Mon, 8 Dec 2008 19:31:55 +0000 (11:31 -0800)]
Tweak comments so that this test passes with gccgo.

bug126.go:7:7: error: redefinition of 'none'
bug126.go:6:7: note: previous definition of 'none' was here

R=gri
DELTA=3  (1 added, 0 deleted, 2 changed)
OCL=20563
CL=20723

16 years agoallowed syntax for range
Ken Thompson [Sat, 6 Dec 2008 21:40:30 +0000 (13:40 -0800)]
allowed syntax for range

a range m (implies :=)
a,b range m (implies :=)
a:b range m (implies :=)

a := range m
a,b := range m
a:b := range m

a = range m
a,b = range m
a:b = range m

R=r
OCL=20676
CL=20676

16 years agorange statement
Ken Thompson [Sat, 6 Dec 2008 02:24:05 +0000 (18:24 -0800)]
range statement

R=r
OCL=20667
CL=20667

16 years agotest pairwise iota assignment
Rob Pike [Fri, 5 Dec 2008 23:37:09 +0000 (15:37 -0800)]
test pairwise iota assignment

R=rsc
DELTA=13  (13 added, 0 deleted, 0 changed)
OCL=20638
CL=20641

16 years agoadd support for ref counts to memory allocator.
Russ Cox [Fri, 5 Dec 2008 23:24:18 +0000 (15:24 -0800)]
add support for ref counts to memory allocator.

mark and sweep, stop the world garbage collector
(intermediate step in the way to ref counting).
can run pretty with an explicit gc after each file.

R=r
DELTA=502  (346 added, 143 deleted, 13 changed)
OCL=20630
CL=20635

16 years agouse sync.Mutex instead of a channel for locking
Rob Pike [Fri, 5 Dec 2008 23:18:07 +0000 (15:18 -0800)]
use sync.Mutex instead of a channel for locking

R=rsc
DELTA=12  (3 added, 1 deleted, 8 changed)
OCL=20631
CL=20634

16 years agoThe DejaGNU testsuite harness used by the gccgo testsuite is
Ian Lance Taylor [Fri, 5 Dec 2008 18:20:34 +0000 (10:20 -0800)]
The DejaGNU testsuite harness used by the gccgo testsuite is
broken if you give it something which matches everything--the
.* swallows all the error messages.  Recognize some reasonable
error text directly.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=20564
CL=20595

16 years ago- handle UTF-8 text in tabwriter
Robert Griesemer [Fri, 5 Dec 2008 17:22:13 +0000 (09:22 -0800)]
- handle UTF-8 text in tabwriter

R=r
DELTA=84  (27 added, 3 deleted, 54 changed)
OCL=20539
CL=20584

16 years agomalloc fixes.
Russ Cox [Fri, 5 Dec 2008 05:04:26 +0000 (21:04 -0800)]
malloc fixes.
can run peano 10 in 100 MB (instead of 1+ GB) of memory
when linking against this.
can run peano 11 in 1 GB of memory now.

R=r
DELTA=100  (44 added, 44 deleted, 12 changed)
OCL=20504
CL=20553

16 years agostrings.utflen -> utf8.RuneCount, RuneCountInString
Russ Cox [Fri, 5 Dec 2008 05:00:34 +0000 (21:00 -0800)]
strings.utflen -> utf8.RuneCount, RuneCountInString

R=r
DELTA=94  (52 added, 33 deleted, 9 changed)
OCL=20547
CL=20552

16 years agobug128 is fixed
Rob Pike [Fri, 5 Dec 2008 04:51:47 +0000 (20:51 -0800)]
bug128 is fixed

R=rsc
DELTA=43  (19 added, 24 deleted, 0 changed)
OCL=20551
CL=20551

16 years ago- adjusted const decl grammar to reflect spec changes
Robert Griesemer [Fri, 5 Dec 2008 02:18:41 +0000 (18:18 -0800)]
- adjusted const decl grammar to reflect spec changes
- first cut at html writer (will do html escaping, html tag production)
- first cut at generating basic html output via pretty
- some cleanups

R=r
OCL=20550
CL=20550

16 years agoRevised proposal for const/var cleanup, with
Robert Griesemer [Fri, 5 Dec 2008 01:33:37 +0000 (17:33 -0800)]
Revised proposal for const/var cleanup, with
Ken's suggestion for the "iota" extension to tuples.

DELTA=171  (88 added, 57 deleted, 26 changed)
OCL=20460
CL=20544

16 years agoempty switches -- bug128
Ken Thompson [Fri, 5 Dec 2008 00:05:40 +0000 (16:05 -0800)]
empty switches -- bug128

R=r
OCL=20520
CL=20522

16 years agoconst/var/iota declarations as discussed
Ken Thompson [Thu, 4 Dec 2008 23:33:40 +0000 (15:33 -0800)]
const/var/iota declarations as discussed

R=r
OCL=20506
CL=20506

16 years agodon't warn anymore about missing imports
Russ Cox [Thu, 4 Dec 2008 22:59:38 +0000 (14:59 -0800)]
don't warn anymore about missing imports
(happens legitimately in c and assembly objects).

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=20497
CL=20499

16 years agoemit dynamically linked 6.out on darwin instead of static,
Russ Cox [Thu, 4 Dec 2008 21:49:45 +0000 (13:49 -0800)]
emit dynamically linked 6.out on darwin instead of static,
unless given -d flag.

the resulting binary doesn't *use* any dynamic libraries,
it just has a reference to the dynamic linker and an
empty list of needed symbols and libraries.

this is enough to make 6.out binaries that can be run
under dtrace / dtruss.

R=r
DELTA=39  (34 added, 0 deleted, 5 changed)
OCL=20476
CL=20482

16 years agoMake run.bash run all the current tests.
Ian Lance Taylor [Thu, 4 Dec 2008 21:14:09 +0000 (13:14 -0800)]
Make run.bash run all the current tests.

R=r,rsc
DELTA=8  (8 added, 0 deleted, 0 changed)
OCL=20468
CL=20473

16 years agoadd mutex.Mutex
Russ Cox [Thu, 4 Dec 2008 20:51:36 +0000 (12:51 -0800)]
add mutex.Mutex

R=r
DELTA=349  (348 added, 0 deleted, 1 changed)
OCL=20380
CL=20472

16 years agofix build - forgot these files
Russ Cox [Thu, 4 Dec 2008 18:18:53 +0000 (10:18 -0800)]
fix build - forgot these files

TBR=r
OCL=20448
CL=20448

16 years agoadd stub routines stackalloc() and stackfree().
Russ Cox [Thu, 4 Dec 2008 16:30:54 +0000 (08:30 -0800)]
add stub routines stackalloc() and stackfree().
run oldstack on g0's stack, just like newstack does,
so that oldstack can free the old stack.

R=r
DELTA=53  (44 added, 0 deleted, 9 changed)
OCL=20404
CL=20433

16 years agoadd time.Tick()
Russ Cox [Thu, 4 Dec 2008 00:40:00 +0000 (16:40 -0800)]
add time.Tick()

R=r
DELTA=130  (115 added, 1 deleted, 14 changed)
OCL=20376
CL=20385

16 years ago- fixed a bug with import printing (missing separator between alias and string)
Robert Griesemer [Wed, 3 Dec 2008 23:47:30 +0000 (15:47 -0800)]
- fixed a bug with import printing (missing separator between alias and string)
- rewrote declaration printing - was unreadable before
- no semicolons after closing "}" for types

R=r
OCL=20379
CL=20379

16 years agopreparation for exec.
Russ Cox [Wed, 3 Dec 2008 22:21:28 +0000 (14:21 -0800)]
preparation for exec.

* syscall:
add syscall.RawSyscall, which doesn't use sys.entersyscall/sys.exitsyscall
add syscall.dup2
add syscall.BytePtrPtr
add syscall.Rusage, RusagePtr
add syscall.F_GETFD, F_SETFD, FD_CLOEXEC

* runtime:
clean up, correct signal handling.
can now survive (continue running after) a signal.

R=r
DELTA=394  (286 added, 51 deleted, 57 changed)
OCL=20351
CL=20369

16 years agoclean stack trace code.
Russ Cox [Wed, 3 Dec 2008 22:20:23 +0000 (14:20 -0800)]
clean stack trace code.
format is unchanged but shows all frames
(old loop stopped one frame early).

wreck=; 6.out
cannot convert type *main.S·interface2 to interface main.I·interface2: missing method Foo
throw: interface conversion
SIGSEGV: segmentation violation
Faulting address: 0x0
pc: 0x256d

throw+0x46 /home/rsc/go/src/runtime/runtime.c:68
throw(0x863a, 0x0)
hashmap+0x188 /home/rsc/go/src/runtime/iface.c:167
hashmap(0x8760, 0x0, 0x85b0, 0x0, 0x0, ...)
sys·ifaceT2I+0xa8 /home/rsc/go/src/runtime/iface.c:201
sys·ifaceT2I(0x8760, 0x0, 0x85b0, 0x0, 0x0, ...)
main·main+0x4e /home/rsc/go/src/runtime/rt0_amd64_darwin.s:87
main·main()
mainstart+0xf /home/rsc/go/src/runtime/rt0_amd64.s:70
mainstart()
sys·goexit /home/rsc/go/src/runtime/proc.c:110
sys·goexit()

R=r
DELTA=44  (5 added, 15 deleted, 24 changed)
OCL=20358
CL=20368

16 years agoMake strconv.atof("-0") return -0
Russ Cox [Wed, 3 Dec 2008 21:29:13 +0000 (13:29 -0800)]
Make strconv.atof("-0") return -0
and update test.

R=iant
DELTA=11  (3 added, 1 deleted, 7 changed)
OCL=20350
CL=20362

16 years agoimport/export of exact mp floating constants
Ken Thompson [Wed, 3 Dec 2008 21:17:26 +0000 (13:17 -0800)]
import/export of exact mp floating constants
new syntax for exact mp floating constants
     decimal_int ( "p" | "P" ) [ "+" | "-" ] decimal_int
     the value is decimal1 * 2^decimal2

R=r
OCL=20357
CL=20357

16 years agogolden.out drift
Russ Cox [Wed, 3 Dec 2008 21:05:56 +0000 (13:05 -0800)]
golden.out drift

TBR=r
OCL=20352
CL=20355

16 years ago- bug: empty switches don't compile
Robert Griesemer [Wed, 3 Dec 2008 18:41:43 +0000 (10:41 -0800)]
- bug: empty switches don't compile

R=rsc
DELTA=32  (28 added, 3 deleted, 1 changed)
OCL=20301
CL=20340

16 years agosmall code improvement to
Ken Thompson [Wed, 3 Dec 2008 03:54:51 +0000 (19:54 -0800)]
small code improvement to
used scaled indexing

R=r
OCL=20308
CL=20310

16 years agotruncating of float constants when
Ken Thompson [Wed, 3 Dec 2008 01:03:47 +0000 (17:03 -0800)]
truncating of float constants when
used in float64 or float32 contexts

R=r
OCL=20297
CL=20297

16 years ago- oversight: extra allow source-level line breaks inside statement lists
Robert Griesemer [Wed, 3 Dec 2008 01:01:31 +0000 (17:01 -0800)]
- oversight: extra allow source-level line breaks inside statement lists
- fixed printing of empty structs/interfaces
- enable two more tests

R=r
OCL=20296
CL=20296

16 years ago- fine-tuning of white space
Robert Griesemer [Wed, 3 Dec 2008 00:49:44 +0000 (16:49 -0800)]
- fine-tuning of white space
- by default consider extra newlines in src for better formatting
- additional flags for control (-newlines, -maxnewlines, -optsemicolons)
- don't print ()'s around single anonymous result types

Status: Comparing the output of pretty with the input for larger files
shows mostly whitespace/formatting differences, which is what is desired.

TODO:
- Handling of overlong lines
- some esoteric cases which look funny

R=r
OCL=20293
CL=20293

16 years ago6g gives no error on "0 != nil"
Russ Cox [Wed, 3 Dec 2008 00:35:00 +0000 (16:35 -0800)]
6g gives no error on "0 != nil"

R=ken
OCL=20289
CL=20289

16 years agoThe flag and fmt libraries are now available from gccgo by
Ian Lance Taylor [Tue, 2 Dec 2008 20:52:47 +0000 (12:52 -0800)]
The flag and fmt libraries are now available from gccgo by
default.  Fix PRETTY_OBJS to include compilation.o rather than
compilation.go.

R=gri
DELTA=10  (0 added, 8 deleted, 2 changed)
OCL=20248
CL=20257

16 years agoremove reference to non-existent mparith.h
Russ Cox [Tue, 2 Dec 2008 01:35:15 +0000 (17:35 -0800)]
remove reference to non-existent mparith.h

R=ken
OCL=20188
CL=20188

16 years agobug: constants should not be redeclarable
Robert Griesemer [Tue, 2 Dec 2008 01:27:57 +0000 (17:27 -0800)]
bug: constants should not be redeclarable

R=rsc
DELTA=9  (9 added, 0 deleted, 0 changed)
OCL=20187
CL=20187

16 years agomulti precision floating point
Ken Thompson [Tue, 2 Dec 2008 01:22:05 +0000 (17:22 -0800)]
multi precision floating point

R=r
OCL=20185
CL=20185

16 years ago- enabled comment printing by default
Robert Griesemer [Tue, 2 Dec 2008 01:20:59 +0000 (17:20 -0800)]
- enabled comment printing by default
- changed tab width to 8 chars by default to make test run properly
- excluded 4 files that are not idempotently printed
- fixed a couple of incorrect file position recordings in parser
- fine-tuned layout engine
- white-space formatting reasonable, but not perfect
- no handling of overlong lines
R=r

To use with smaller tabs:           pretty -tabwidth=4 file.go
To use with blanks instead of tabs: pretty -usetabs=0 file.go

OCL=20184
CL=20184

16 years agobe more precise in ftoa_test.
Russ Cox [Tue, 2 Dec 2008 00:03:09 +0000 (16:03 -0800)]
be more precise in ftoa_test.

R=ken
OCL=20173
CL=20173

16 years ago- better comment formatting, starting to look good
Robert Griesemer [Mon, 1 Dec 2008 22:03:20 +0000 (14:03 -0800)]
- better comment formatting, starting to look good
- comment printing still disabled by default because idempotency test fails
- whitespace control better but not perfect yet
- snapshot before making some heuristics changes

R=r
OCL=20151
CL=20151

16 years agoadd blank line (response to post-submit review of CL 19422)
Russ Cox [Mon, 1 Dec 2008 18:26:23 +0000 (10:26 -0800)]
add blank line (response to post-submit review of CL 19422)

TBR=r
OCL=20127
CL=20127

16 years ago- collect addition source position information in parser
Robert Griesemer [Thu, 27 Nov 2008 01:07:45 +0000 (17:07 -0800)]
- collect addition source position information in parser
  for end of declarations, blocks, parameter lists, etc.
- use extra src positions to more accurately print comments
- fine-tuned low-level printing routine for comments
- added better debugging support

Status:
- comments now appear at the right place (inbetween the right tokens)
- newline control needs improvement (not very hard)
- comment printing disabled for now because pretty is not idempotent
with it; to enable: -comments

R=r
OCL=20079
CL=20079

16 years ago- snapshot of state before trying yet another, hopefully better working
Robert Griesemer [Wed, 26 Nov 2008 21:23:26 +0000 (13:23 -0800)]
- snapshot of state before trying yet another, hopefully better working
way to integrate comments into the generated output
- various simplificatins and cleanups throughout

R=r
OCL=20062
CL=20062

16 years agonew stacktrace format
Russ Cox [Wed, 26 Nov 2008 01:17:54 +0000 (17:17 -0800)]
new stacktrace format

sys·gosched+0x25 /home/rsc/go/src/runtime/proc.c:477
sys·gosched()
chanrecv+0x29e /home/rsc/go/src/runtime/chan.c:277
chanrecv(0x4be80, 0x0, 0x4cf88, 0x0, 0x0, ...)
sys·chanrecv1+0x5b /home/rsc/go/src/runtime/chan.c:355
sys·chanrecv1(0x4be80, 0x0)
once·Server+0x26 /home/rsc/go/src/lib/strconv/atoi.go:-41
once·Server()

the last line is broken (atoi.go:-41) but that's not new.

R=r
DELTA=46  (19 added, 14 deleted, 13 changed)
OCL=20018
CL=20026

16 years agochange meaning of $GOMAXPROCS to number of cpus to use,
Russ Cox [Wed, 26 Nov 2008 00:48:10 +0000 (16:48 -0800)]
change meaning of $GOMAXPROCS to number of cpus to use,
not number of threads.  can still starve all the other threads,
but only by looping, not by waiting in a system call.

fix darwin syscall.Syscall6 bug.

fix chanclient bug.

delete $GOMAXPROCS from network tests.

add stripped down printf, sys.printhex to runtime.

R=r
DELTA=355  (217 added, 36 deleted, 102 changed)
OCL=20017
CL=20019

16 years ago- fixed a problem with flushing
Robert Griesemer [Tue, 25 Nov 2008 22:06:59 +0000 (14:06 -0800)]
- fixed a problem with flushing
- added extra tests

R=r
DELTA=164  (107 added, 20 deleted, 37 changed)
OCL=20002
CL=20004

16 years agogotest: change pattern to Test([^a-z].*)?
Russ Cox [Tue, 25 Nov 2008 20:49:17 +0000 (12:49 -0800)]
gotest: change pattern to Test([^a-z].*)?
warn about files with no tests
be clear about where testing warnings come from

R=r
DELTA=18  (12 added, 3 deleted, 3 changed)
OCL=19988
CL=19993

16 years ago- delete vector.go - not needed anymore
Robert Griesemer [Tue, 25 Nov 2008 18:08:49 +0000 (10:08 -0800)]
- delete vector.go - not needed anymore
- runs all.bash

R=r
DELTA=121  (0 added, 121 deleted, 0 changed)
OCL=19960
CL=19983

16 years agomake a (rudimentary) ByteBuffer and put it in package "io".
Rob Pike [Tue, 25 Nov 2008 17:41:58 +0000 (09:41 -0800)]
make a (rudimentary) ByteBuffer and put it in package "io".
fix up protocol buffers to use it.

R=rsc
DELTA=1232  (612 added, 572 deleted, 48 changed)
OCL=19964
CL=19981

16 years agouse pc/ln table to print source lines in traceback
Russ Cox [Tue, 25 Nov 2008 17:23:36 +0000 (09:23 -0800)]
use pc/ln table to print source lines in traceback

r45=; 6.out
oops
panic PC=0x400316
0x400316?zi /home/rsc/go/src/runtime/rt0_amd64_linux.s:83
main·g(4195177, 0, 4205661, ...)
main·g(0x400369, 0x402c5d, 0x403e49, ...)
0x40034c?zi /home/rsc/go/src/runtime/x.go:24
main·f(4205661, 0, 4210249, ...)
main·f(0x402c5d, 0x403e49, 0x1, ...)
0x400368?zi /home/rsc/go/src/runtime/x.go:37
main·main(4210249, 0, 1, ...)
main·main(0x403e49, 0x1, 0x7fff9d894bd8, ...)
0x402c5c?zi /home/rsc/go/src/runtime/rt0_amd64.s:70
mainstart(1, 0, 2643020760, ...)
mainstart(0x1, 0x7fff9d894bd8, 0x0, ...)
r45=;

R=r
DELTA=251  (198 added, 25 deleted, 28 changed)
OCL=19965
CL=19979

16 years ago% x inserts spaces between hex bytes in string/*[]byte
Russ Cox [Tue, 25 Nov 2008 17:23:13 +0000 (09:23 -0800)]
% x inserts spaces between hex bytes in string/*[]byte

R=r
DELTA=7  (7 added, 0 deleted, 0 changed)
OCL=19967
CL=19978

16 years agoadd author lines
Russ Cox [Tue, 25 Nov 2008 17:22:58 +0000 (09:22 -0800)]
add author lines

R=r
DELTA=150  (147 added, 0 deleted, 3 changed)
OCL=19968
CL=19977

16 years ago- move error handling out of scanner
Robert Griesemer [Tue, 25 Nov 2008 02:24:21 +0000 (18:24 -0800)]
- move error handling out of scanner
- use more of the existing library code

R=r
OCL=19957
CL=19959

16 years agobetter code for += -= ^= |= and &=
Ken Thompson [Tue, 25 Nov 2008 01:51:26 +0000 (17:51 -0800)]
better code for += -= ^= |= and &=

R=r
OCL=19953
CL=19953

16 years agocompiler catches out of bounds; work around
Rob Pike [Tue, 25 Nov 2008 00:23:49 +0000 (16:23 -0800)]
compiler catches out of bounds; work around

R=ken
OCL=19943
CL=19943

16 years agoadd hash to build; rm pkg/* in clean.bash
Russ Cox [Mon, 24 Nov 2008 23:18:29 +0000 (15:18 -0800)]
add hash to build; rm pkg/* in clean.bash

R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=19935
CL=19937

16 years agoconvert tests.
Russ Cox [Mon, 24 Nov 2008 23:17:47 +0000 (15:17 -0800)]
convert tests.
refine gotest's test selection criteria.

R=r
DELTA=1590  (745 added, 844 deleted, 1 changed)
OCL=19903
CL=19936

16 years agoreplay CL 19916 and CL 19913 now that the build can handle them
Russ Cox [Mon, 24 Nov 2008 22:51:33 +0000 (14:51 -0800)]
replay CL 19916 and CL 19913 now that the build can handle them

TBR=r
OCL=19924
CL=19934

16 years agoremove old .6 after install,
Russ Cox [Mon, 24 Nov 2008 22:51:01 +0000 (14:51 -0800)]
remove old .6 after install,
so that compilation of other .6
will use the copy in goroot/pkg

R=r
DELTA=3  (1 added, 0 deleted, 2 changed)
OCL=19931
CL=19933

16 years agoreally restore helpful error rules
Rob Pike [Mon, 24 Nov 2008 22:23:53 +0000 (14:23 -0800)]
really restore helpful error rules

R=rsc
OCL=19929
CL=19929

16 years agorestore helpful error rules
Rob Pike [Mon, 24 Nov 2008 22:15:53 +0000 (14:15 -0800)]
restore helpful error rules

R=rsc
OCL=19928
CL=19928

16 years ago1. retract general field names
Ken Thompson [Mon, 24 Nov 2008 22:01:12 +0000 (14:01 -0800)]
1. retract general field names
2. array bounds bug
3. ... optimization bug

R=r
OCL=19927
CL=19927

16 years agoadd missing file
Rob Pike [Mon, 24 Nov 2008 21:47:52 +0000 (13:47 -0800)]
add missing file

R=rsc
OCL=19926
CL=19926