]> Cypherpunks repositories - gostls13.git/log
gostls13.git
15 years agoFix bug where nothing could ever be added to a code buffer.
Austin Clements [Mon, 27 Jul 2009 22:21:32 +0000 (15:21 -0700)]
Fix bug where nothing could ever be added to a code buffer.

R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=32245
CL=32247

15 years agonamed string type bugs
Russ Cox [Mon, 27 Jul 2009 22:16:28 +0000 (15:16 -0700)]
named string type bugs

R=ken
OCL=32244
CL=32244

15 years agocatch
Russ Cox [Mon, 27 Jul 2009 21:55:14 +0000 (14:55 -0700)]
catch
a := true;
a |= a;
in the front end.

R=ken
OCL=32240
CL=32243

15 years agodo not insert implicit "return;" in empty function body
Russ Cox [Mon, 27 Jul 2009 21:36:32 +0000 (14:36 -0700)]
do not insert implicit "return;" in empty function body

R=ken
OCL=32239
CL=32239

15 years agoFixed a small bug with compress/flate/Inflater. It incorrectly checked
Ivan Krasin [Mon, 27 Jul 2009 21:33:21 +0000 (14:33 -0700)]
Fixed a small bug with compress/flate/Inflater. It incorrectly checked
the size of chunk with uncompressed data (00 is terms of DEFLATE).

APPROVED=rsc
DELTA=15  (14 added, 0 deleted, 1 changed)
OCL=32105
CL=32238

15 years agofix gc bug causing make smoketest to die in cmd/gofmt.
Russ Cox [Mon, 27 Jul 2009 21:16:28 +0000 (14:16 -0700)]
fix gc bug causing make smoketest to die in cmd/gofmt.

saving of sp was too far away from use in scanstack;
the stack had changed since the sp was saved.

R=r
DELTA=9  (4 added, 2 deleted, 3 changed)
OCL=32232
CL=32237

15 years agoImplement single-valued, non-variadic function literals and
Austin Clements [Mon, 27 Jul 2009 20:01:23 +0000 (13:01 -0700)]
Implement single-valued, non-variadic function literals and
function calling.  Implement a type compiler and named types.
Implement a universal scope containing built-in named types,
and some built-in constants.  Implement a simple virtual
machine for executing statements and single-valued return.

Fix many places that incorrectly dealt with named types.  In
particular, the Type.Zero methods now use the type's bit count
to determine the appropriate value representation.  As a
result, a bit count of 0 now means architecture-dependent and
bounded types use unsafe.Sizeof to determine the correct
bounds.  Previously, the bounds on a 32-bit machine would have
been wrong.

Eliminated Type.compatible, since the implementation is
equivalent for all types.  Added Type.rep that shallowly
strips named types.  Replaced almost all uses of Type.literal
with Type.rep.

Fix implementation of assign-op's so it only evaluates the
left side once.  As part of this, there is now a generic way
to separate out the effect and value of an expression.

R=rsc
APPROVED=rsc
DELTA=1530  (1244 added, 68 deleted, 218 changed)
OCL=32184
CL=32230

15 years agofix build - broke with uint32 -> int change in reflect SliceHeader
Russ Cox [Mon, 27 Jul 2009 18:23:49 +0000 (11:23 -0700)]
fix build - broke with uint32 -> int change in reflect SliceHeader

TBR=r
OCL=32225
CL=32225

15 years agoclean up for public use: make some stuff private, add doc comments.
Rob Pike [Mon, 27 Jul 2009 18:02:06 +0000 (11:02 -0700)]
clean up for public use: make some stuff private, add doc comments.

R=rsc
DELTA=298  (202 added, 0 deleted, 96 changed)
OCL=32006
CL=32224

15 years agofix bug in CL 30057: missed if+continue in one place.
Russ Cox [Mon, 27 Jul 2009 17:59:59 +0000 (10:59 -0700)]
fix bug in CL 30057: missed if+continue in one place.

R=gri
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=32214
CL=32223

15 years agofix SliceHeader: len and cap are int, not uint32
Russ Cox [Mon, 27 Jul 2009 17:59:37 +0000 (10:59 -0700)]
fix SliceHeader: len and cap are int, not uint32

R=r,iant
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=32215
CL=32222

15 years agocontainer/list: Add Len() method to List.
David Symonds [Sun, 26 Jul 2009 00:18:05 +0000 (17:18 -0700)]
container/list: Add Len() method to List.

R=r
APPROVED=gri
DELTA=23  (23 added, 0 deleted, 0 changed)
OCL=32106
CL=32189

15 years agoIf we can't parse the package, call Fatalf so that the test
Ian Lance Taylor [Fri, 24 Jul 2009 20:07:12 +0000 (13:07 -0700)]
If we can't parse the package, call Fatalf so that the test
fails without crashing.

R=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=32164
CL=32171

15 years agodo not echo command in errchk,
Russ Cox [Wed, 22 Jul 2009 02:45:06 +0000 (19:45 -0700)]
do not echo command in errchk,
so that golden.out does not include
the name of the compiler (which is
arch-specific and shows up in diffs).

R=r,iant
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=31980
CL=31983

15 years agoruntime: fix init scheduling bug.
Russ Cox [Wed, 22 Jul 2009 02:43:27 +0000 (19:43 -0700)]
runtime: fix init scheduling bug.

if there is a goroutine waiting to run
and the init goroutine enters a system call,
entersyscall was trying to kick off a new
scheduler for the other goroutine, causing
a panic (new goroutines can't run until main.main).

R=r
DELTA=32  (32 added, 0 deleted, 0 changed)
OCL=31982
CL=31982

15 years agoa little more 6l cleanup
Russ Cox [Wed, 22 Jul 2009 00:18:32 +0000 (17:18 -0700)]
a little more 6l cleanup

R=r
DELTA=51  (14 added, 24 deleted, 13 changed)
OCL=31968
CL=31971

15 years agodo not use ONONAMEs for line number information,
Russ Cox [Tue, 21 Jul 2009 23:38:56 +0000 (16:38 -0700)]
do not use ONONAMEs for line number information,
just like ONAME etc.

R=ken
OCL=31964
CL=31964

15 years agoadd a .interp section and fix vaddr in INTERP prog.
Rob Pike [Tue, 21 Jul 2009 23:31:35 +0000 (16:31 -0700)]
add a .interp section and fix vaddr in INTERP prog.

R=rsc
DELTA=16  (9 added, 3 deleted, 4 changed)
OCL=31956
CL=31963

15 years agoImplement assignment. Move convertTo.
Austin Clements [Tue, 21 Jul 2009 22:40:41 +0000 (15:40 -0700)]
Implement assignment.  Move convertTo.

R=rsc
APPROVED=rsc
DELTA=591  (497 added, 76 deleted, 18 changed)
OCL=31933
CL=31955

15 years agomake 6l produce dynamically linked binaries (although they are fully statically linke...
Rob Pike [Tue, 21 Jul 2009 22:10:47 +0000 (15:10 -0700)]
make 6l produce dynamically linked binaries (although they are fully statically linked as far
as go is concerned).  the -d flag is now flipped; as on the mac, -d disables dynamic.

much remains to be improved to move the output closer to the gcc format.

R=rsc
DELTA=366  (310 added, 30 deleted, 26 changed)
OCL=31929
CL=31951

15 years agoadjust comment for better godoc output
Robert Griesemer [Tue, 21 Jul 2009 22:09:59 +0000 (15:09 -0700)]
adjust comment for better godoc output

R=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=31944
CL=31950

15 years ago- split bignum package into 3 files
Robert Griesemer [Tue, 21 Jul 2009 21:28:59 +0000 (14:28 -0700)]
- split bignum package into 3 files
- use array for common small values
- integer.go, rational.go don't contain changes besides the added file header

R=rsc
DELTA=1475  (748 added, 713 deleted, 14 changed)
OCL=31939
CL=31942

15 years agoDon't cast nil to a fixed array type.
Ian Lance Taylor [Tue, 21 Jul 2009 21:06:14 +0000 (14:06 -0700)]
Don't cast nil to a fixed array type.

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31916
CL=31937

15 years agoYou can't set a fixed array to nil.
Ian Lance Taylor [Tue, 21 Jul 2009 21:05:21 +0000 (14:05 -0700)]
You can't set a fixed array to nil.

R=r
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=31915
CL=31936

15 years agoimplemented outstanding bit ops on negative integerts
Robert Griesemer [Tue, 21 Jul 2009 20:35:51 +0000 (13:35 -0700)]
implemented outstanding bit ops on negative integerts

R=rsc
DELTA=195  (146 added, 1 deleted, 48 changed)
OCL=31895
CL=31931

15 years agoCleanup of Type/Value interface. Add Type.ZeroVal, replace
Austin Clements [Tue, 21 Jul 2009 20:31:23 +0000 (13:31 -0700)]
Cleanup of Type/Value interface.  Add Type.ZeroVal, replace
all type-specific value functions, and use ZeroVal to create
new frames.  Remove Value.Type; it was unused and difficult
for values with composite types.  Add Value.Assign methods.

R=rsc
APPROVED=rsc
DELTA=282  (135 added, 90 deleted, 57 changed)
OCL=31894
CL=31930

15 years agoMake struct field names unique.
Ian Lance Taylor [Tue, 21 Jul 2009 06:26:03 +0000 (23:26 -0700)]
Make struct field names unique.

R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=31900
CL=31900

15 years agoImplement array types and index expressions.
Austin Clements [Tue, 21 Jul 2009 00:41:40 +0000 (17:41 -0700)]
Implement array types and index expressions.

Some cleanup.  Elem() on PtrType is now just Elem and matches
with ArrayType.  Generators now switch over the result type
instead of the operand type.  Delete unused diag function.

R=rsc
APPROVED=rsc
DELTA=281  (219 added, 18 deleted, 44 changed)
OCL=31876
CL=31891

15 years agofix cut-and-paste bugs in error messages
Russ Cox [Tue, 21 Jul 2009 00:41:18 +0000 (17:41 -0700)]
fix cut-and-paste bugs in error messages

R=ken
OCL=31890
CL=31890

15 years agoFix typo. MUL_ASSIGN is "*=", not "+=".
Austin Clements [Mon, 20 Jul 2009 23:14:48 +0000 (16:14 -0700)]
Fix typo.  MUL_ASSIGN is "*=", not "+=".

R=gri
APPROVED=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31879
CL=31886

15 years agoavoid strncat in formatters.
Russ Cox [Mon, 20 Jul 2009 21:16:25 +0000 (14:16 -0700)]
avoid strncat in formatters.

the n argument to strncat is the maximum
number of bytes to read from the src,
not the total size of the destination.

R=ken
OCL=31871
CL=31875

15 years agotriple quote
Russ Cox [Mon, 20 Jul 2009 21:15:36 +0000 (14:15 -0700)]
triple quote

R=ken
OCL=31868
CL=31874

15 years agofix memset in fmtnull.
Russ Cox [Mon, 20 Jul 2009 20:37:35 +0000 (13:37 -0700)]
fix memset in fmtnull.

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31863
CL=31870

15 years ago- bignum.AndNot
Robert Griesemer [Mon, 20 Jul 2009 20:37:28 +0000 (13:37 -0700)]
- bignum.AndNot
- corresponding test cases
- some cleanups

R=rsc
DELTA=173  (68 added, 3 deleted, 102 changed)
OCL=31866
CL=31869

15 years agoexplain selectsend problem
Russ Cox [Mon, 20 Jul 2009 20:29:56 +0000 (13:29 -0700)]
explain selectsend problem

R=ken
OCL=31865
CL=31867

15 years ago6l cleanup: last set of magic numbers for elf64 moved to ld/elf64*.
Rob Pike [Mon, 20 Jul 2009 20:19:47 +0000 (13:19 -0700)]
6l cleanup: last set of magic numbers for elf64 moved to ld/elf64*.

R=rsc
DELTA=68  (21 added, 28 deleted, 19 changed)
OCL=31857
CL=31864

15 years agoclean up generation of exec header.
Rob Pike [Mon, 20 Jul 2009 17:08:48 +0000 (10:08 -0700)]
clean up generation of exec header.
make endianness explicit when writing values.

R=rsc
DELTA=129  (37 added, 7 deleted, 85 changed)
OCL=31826
CL=31854

15 years agotake care of a few more magic numbers
Rob Pike [Sat, 18 Jul 2009 00:32:34 +0000 (17:32 -0700)]
take care of a few more magic numbers

R=rsc
DELTA=51  (41 added, 0 deleted, 10 changed)
OCL=31815
CL=31818

15 years agoGather errors in a go.scanner.ErrorList instead of printing
Austin Clements [Fri, 17 Jul 2009 23:58:59 +0000 (16:58 -0700)]
Gather errors in a go.scanner.ErrorList instead of printing
them as we go.

Lots of bug fixes.  Let the parser toss illegal character and
string literals.  Compile unary + correctly.  Allow float OP
ideal.  Compile unary * correctly.  Implement min and max float
values.

R=rsc
APPROVED=rsc
DELTA=64  (29 added, 7 deleted, 28 changed)
OCL=31811
CL=31814

15 years agocount SHdrs and PHdrs and write them out as a unit
Rob Pike [Fri, 17 Jul 2009 23:34:58 +0000 (16:34 -0700)]
count SHdrs and PHdrs and write them out as a unit

R=rsc
DELTA=181  (93 added, 63 deleted, 25 changed)
OCL=31802
CL=31812

15 years ago- better documentation
Robert Griesemer [Fri, 17 Jul 2009 23:22:55 +0000 (16:22 -0700)]
- better documentation
- code cleanup

R=rsc,austin
DELTA=28  (12 added, 2 deleted, 14 changed)
OCL=31808
CL=31810

15 years agoRecognize gccgo error message.
Ian Lance Taylor [Fri, 17 Jul 2009 23:12:29 +0000 (16:12 -0700)]
Recognize gccgo error message.

   explicit.go:21:5: error: incompatible types in assignment (need explicit conversion)
   explicit.go:26:5: error: incompatible types in assignment (type has no methods)
   explicit.go:27:5: error: incompatible types in assignment (need explicit conversion)
   explicit.go:30:6: error: incompatible types in assignment (need explicit conversion; missing method ā€˜N’)
   explicit.go:33:7: error: invalid type conversion (need explicit conversion; missing method ā€˜N’)
   explicit.go:36:5: error: incompatible types in assignment

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31805
CL=31807

15 years agoSupport exponential notation in RatFromString.
Austin Clements [Fri, 17 Jul 2009 22:09:43 +0000 (15:09 -0700)]
Support exponential notation in RatFromString.

R=gri
APPROVED=gri
DELTA=30  (25 added, 0 deleted, 5 changed)
OCL=31796
CL=31799

15 years agomore elf64 support: phdrs, constants
Rob Pike [Fri, 17 Jul 2009 22:09:17 +0000 (15:09 -0700)]
more elf64 support: phdrs, constants

R=rsc
DELTA=130  (68 added, 6 deleted, 56 changed)
OCL=31798
CL=31798

15 years agoProduce friendlier errors messages for malformed character
Austin Clements [Fri, 17 Jul 2009 21:58:02 +0000 (14:58 -0700)]
Produce friendlier errors messages for malformed character
literals and when the parser hits an unexpected EOF.  Also,
disallow newlines in character literals.

R=gri
APPROVED=gri
DELTA=23  (15 added, 1 deleted, 7 changed)
OCL=31790
CL=31797

15 years agoanother baby step.
Russ Cox [Fri, 17 Jul 2009 21:42:14 +0000 (14:42 -0700)]
another baby step.
excluding import data,
no yacc node has type Type* anymore.

0 reduce/reduce conflicts.

R=ken
OCL=31793
CL=31795

15 years agoFirst steps towards cleaner support for ELF64 in 6l.
Rob Pike [Fri, 17 Jul 2009 21:32:37 +0000 (14:32 -0700)]
First steps towards cleaner support for ELF64 in 6l.

R=rsc
DELTA=337  (165 added, 119 deleted, 53 changed)
OCL=31786
CL=31794

15 years agochange reflect.Type.Name() into two functions: Name() and PkgPath() for ease of use.
Rob Pike [Fri, 17 Jul 2009 21:20:33 +0000 (14:20 -0700)]
change reflect.Type.Name() into two functions: Name() and PkgPath() for ease of use.

R=rsc
DELTA=31  (8 added, 2 deleted, 21 changed)
OCL=31778
CL=31792

15 years agobaby step: const decls can refer to future
Russ Cox [Fri, 17 Jul 2009 20:38:16 +0000 (13:38 -0700)]
baby step: const decls can refer to future
consts in the same factored block

const (
X = Y;
Y = 2;
)

R=ken
OCL=31782
CL=31782

15 years agoFinish shift implementation for ideals.
Austin Clements [Fri, 17 Jul 2009 18:50:32 +0000 (11:50 -0700)]
Finish shift implementation for ideals.

R=rsc
APPROVED=rsc
DELTA=65  (29 added, 17 deleted, 19 changed)
OCL=31775
CL=31777

15 years agoignore missing structs
Rob Pike [Fri, 17 Jul 2009 18:38:31 +0000 (11:38 -0700)]
ignore missing structs

R=rsc
DELTA=113  (74 added, 14 deleted, 25 changed)
OCL=31776
CL=31776

15 years agoCleanup func literals. "func (" -> "func("
Austin Clements [Fri, 17 Jul 2009 17:45:53 +0000 (10:45 -0700)]
Cleanup func literals.  "func (" -> "func("

R=rsc
APPROVED=rsc
DELTA=41  (0 added, 0 deleted, 41 changed)
OCL=31773
CL=31773

15 years agoImplement all unary and binary arithmetic operators.
Austin Clements [Fri, 17 Jul 2009 17:38:44 +0000 (10:38 -0700)]
Implement all unary and binary arithmetic operators.

R=rsc
APPROVED=rsc
DELTA=689  (497 added, 169 deleted, 23 changed)
OCL=31755
CL=31772

15 years agoanother step toward eliminating forward declarations.
Russ Cox [Fri, 17 Jul 2009 08:00:44 +0000 (01:00 -0700)]
another step toward eliminating forward declarations.

introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.

the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).

delete dead chanrecv3 code.

delay construction of func types.

R=ken
OCL=31745
CL=31762

15 years agofix up prints in flag.go
Rob Pike [Fri, 17 Jul 2009 06:14:33 +0000 (23:14 -0700)]
fix up prints in flag.go

R=rsc
DELTA=11  (0 added, 0 deleted, 11 changed)
OCL=31760
CL=31760

15 years agoclean up the code, flow errors out to decoder.
Rob Pike [Fri, 17 Jul 2009 06:01:10 +0000 (23:01 -0700)]
clean up the code, flow errors out to decoder.

R=rsc
DELTA=99  (32 added, 22 deleted, 45 changed)
OCL=31759
CL=31759

15 years agouse FieldByName where possible.
Rob Pike [Fri, 17 Jul 2009 04:24:30 +0000 (21:24 -0700)]
use FieldByName where possible.

R=rsc
DELTA=20  (0 added, 12 deleted, 8 changed)
OCL=31758
CL=31758

15 years ago- renamed SimpleVarDecl -> ShortVarDecl, in sync with terminology used in prose
Robert Griesemer [Fri, 17 Jul 2009 03:31:41 +0000 (20:31 -0700)]
- renamed SimpleVarDecl -> ShortVarDecl, in sync with terminology used in prose
- added a few TODOs

R=r
DELTA=4  (2 added, 0 deleted, 2 changed)
OCL=31751
CL=31756

15 years agoadd FieldByName to the interface of reflect.StructType
Rob Pike [Fri, 17 Jul 2009 01:21:14 +0000 (18:21 -0700)]
add FieldByName to the interface of reflect.StructType

R=rsc
DELTA=34  (33 added, 0 deleted, 1 changed)
OCL=31752
CL=31754

15 years ago- allow wire type and receive type to differ.
Rob Pike [Fri, 17 Jul 2009 00:55:16 +0000 (17:55 -0700)]
- allow wire type and receive type to differ.
- still TODO: ignoring struct fields.

R=rsc
DELTA=309  (240 added, 2 deleted, 67 changed)
OCL=31750
CL=31750

15 years agoast:
Robert Griesemer [Fri, 17 Jul 2009 00:11:18 +0000 (17:11 -0700)]
ast:
- renamed Program -> SourceFile
- added Package node representing the AST for an entire package
- added filter function to create a source file mimicking the
  interface of an entire package

parser:
- parser entry to parse entire packages
- unified naming of parser entry points
- factored out entry points into new file (interface.go)

gofmt:
- extended to accept single .go files, and package paths:
  gofmt file.go           // formatting of a single file
  gofmt -x file.go     // interface of a single file
  gofmt -x ./MyPackage     // interface of a local package
  gofmt -x math     // interface of a $GOROOT relative package

Various adjustments in dependent files, documentation.

R=rsc
DELTA=634  (369 added, 153 deleted, 112 changed)
OCL=31743
CL=31748

15 years agofix some bad testing prints
Rob Pike [Thu, 16 Jul 2009 22:01:21 +0000 (15:01 -0700)]
fix some bad testing prints

R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=31740
CL=31742

15 years agoclean up the decode loop and fix a couple of bad prints
Rob Pike [Thu, 16 Jul 2009 20:05:46 +0000 (13:05 -0700)]
clean up the decode loop and fix a couple of bad prints

R=rsc
DELTA=15  (8 added, 2 deleted, 5 changed)
OCL=31738
CL=31738

15 years agoFix handling of non-waitable zombie threads. Now they are not
Austin Clements [Thu, 16 Jul 2009 16:48:37 +0000 (09:48 -0700)]
Fix handling of non-waitable zombie threads.  Now they are not
considered running, so WaitStop doesn't lock up and
breakpoints get installed and uninstalled.  We also don't try
to detach from them, since that will fail.

R=rsc
APPROVED=rsc
DELTA=35  (26 added, 2 deleted, 7 changed)
OCL=31683
CL=31731

15 years agoexvar: new Timer var type.
David Symonds [Thu, 16 Jul 2009 06:24:27 +0000 (23:24 -0700)]
exvar: new Timer var type.

R=rsc
APPROVED=r
DELTA=146  (142 added, 0 deleted, 4 changed)
OCL=31654
CL=31716

15 years agoadd rpc to the build
Rob Pike [Thu, 16 Jul 2009 04:28:45 +0000 (21:28 -0700)]
add rpc to the build

R=rsc
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=31693
CL=31714

15 years ago/usr/local/bin might not exist so use /usr/bin in the chdir test.
Rob Pike [Thu, 16 Jul 2009 04:28:08 +0000 (21:28 -0700)]
/usr/local/bin might not exist so use /usr/bin in the chdir test.

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31708
CL=31713

15 years agoMake Value always represent an l-value and never a generic
Austin Clements [Thu, 16 Jul 2009 00:56:17 +0000 (17:56 -0700)]
Make Value always represent an l-value and never a generic
container for values.

Instead of having one evaluator function that returns a
generic Value, there is now an evaluator function for each
generalized type that simply returns a native type.

The compiler is more type-safe now because there are almost no
type conversions at evaluation time and it's impossible to
invoke a nil evaluator function during evaluation.  This also
makes ideals and pointers really clean.

As an added bonus, expression evaluation should be faster
because it doesn't require heap allocation for every
intermediate value, type switches, or lots of conversions to
and from Value.  It also involves fewer function calls.

R=rsc
APPROVED=rsc
DELTA=431  (280 added, 115 deleted, 36 changed)
OCL=31705
CL=31709

15 years agoimprove server handling of errors now that Decoder grabs full message.
Rob Pike [Wed, 15 Jul 2009 23:11:14 +0000 (16:11 -0700)]
improve server handling of errors now that Decoder grabs full message.

R=rsc
DELTA=23  (4 added, 7 deleted, 12 changed)
OCL=31701
CL=31703

15 years agomake the low-level encoder and decoder private and have them access byte.Buffers...
Rob Pike [Wed, 15 Jul 2009 23:10:17 +0000 (16:10 -0700)]
make the low-level encoder and decoder private and have them access byte.Buffers rather
than io.Readers and io.Writers.
change the Encoder/Decoder protocol so that each message is preceded by its length in bytes.

R=rsc
DELTA=468  (119 added, 23 deleted, 326 changed)
OCL=31700
CL=31702

15 years agopost-submit tweaks to previous cl
Rob Pike [Wed, 15 Jul 2009 19:38:50 +0000 (12:38 -0700)]
post-submit tweaks to previous cl

R=rsc
DELTA=5  (4 added, 1 deleted, 0 changed)
OCL=31690
CL=31692

15 years agoBeginnings of a Go interpreter. This implements basic and
Austin Clements [Wed, 15 Jul 2009 18:59:13 +0000 (11:59 -0700)]
Beginnings of a Go interpreter.  This implements basic and
pointer types, supports literals, identifiers, type-checking
most unary and binary operators, "compiling" a few unary and
binary operators, and assignment and declaration statements.

R=rsc
APPROVED=rsc
DELTA=1751  (1751 added, 0 deleted, 0 changed)
OCL=31309
CL=31691

15 years agohandle errors better:
Rob Pike [Wed, 15 Jul 2009 18:47:29 +0000 (11:47 -0700)]
handle errors better:
1) terminate outstanding calls on the client when we see EOF from server
2) allow data to drain on server before closing the connection

R=rsc
DELTA=41  (23 added, 4 deleted, 14 changed)
OCL=31687
CL=31689

15 years agochange HTTP access for RPC.
Russ Cox [Wed, 15 Jul 2009 17:49:47 +0000 (10:49 -0700)]
change HTTP access for RPC.

1. use CONNECT instead of GET.
   CONNECT has exactly the meaning
   we want; most of the time people
   connect to ip:port; we're connecting
   to /_goRPC_

2. wait for a successful HTTP response
   before assuming we are connected to
   the RPC protocol.  this allows better
   error reporting and also keeps the
   protocol alternating between speakers,
   so that the buffering in the HTTP request
   reader cannot accidentally eat some
   RPC bytes too.

gotest sometimes hangs, but not in HTTP.

gotest -match=Unknown hangs every few runs
even in a clean client.

R=r
DELTA=117  (57 added, 44 deleted, 16 changed)
OCL=31656
CL=31685

15 years agoImplement forking debugged processes.
Austin Clements [Wed, 15 Jul 2009 17:17:56 +0000 (10:17 -0700)]
Implement forking debugged processes.

R=rsc
APPROVED=rsc
DELTA=81  (53 added, 3 deleted, 25 changed)
OCL=31651
CL=31675

15 years ago- do not collect BUG comments w/o bug description
Robert Griesemer [Wed, 15 Jul 2009 17:12:57 +0000 (10:12 -0700)]
- do not collect BUG comments w/o bug description

R=rsc
DELTA=17  (8 added, 0 deleted, 9 changed)
OCL=31670
CL=31674

15 years agoAdd a dummy WaitStatus.TrapCause for Darwin to unbreak the build.
Austin Clements [Wed, 15 Jul 2009 17:12:06 +0000 (10:12 -0700)]
Add a dummy WaitStatus.TrapCause for Darwin to unbreak the build.

R=gri
APPROVED=gri
DELTA=5  (5 added, 0 deleted, 0 changed)
OCL=31673
CL=31673

15 years agoPretty printer for os.Waitmsg
Austin Clements [Wed, 15 Jul 2009 16:58:42 +0000 (09:58 -0700)]
Pretty printer for os.Waitmsg

R=rsc
APPROVED=rsc
DELTA=49  (49 added, 0 deleted, 0 changed)
OCL=31568
CL=31671

15 years agoadd HTTP support
Rob Pike [Wed, 15 Jul 2009 03:47:39 +0000 (20:47 -0700)]
add HTTP support

R=rsc
DELTA=159  (110 added, 29 deleted, 20 changed)
OCL=31646
CL=31652

15 years agoReturn ptrace event message when there's no error instead of
Austin Clements [Wed, 15 Jul 2009 01:05:29 +0000 (18:05 -0700)]
Return ptrace event message when there's no error instead of
only when there's an error.

R=rsc
APPROVED=rsc
DELTA=3  (0 added, 2 deleted, 1 changed)
OCL=31650
CL=31650

15 years agoallow user to override the Usage function
Rob Pike [Wed, 15 Jul 2009 00:44:20 +0000 (17:44 -0700)]
allow user to override the Usage function

R=gri
DELTA=15  (6 added, 5 deleted, 4 changed)
OCL=31649
CL=31649

15 years agofixed typo
Robert Griesemer [Wed, 15 Jul 2009 00:08:09 +0000 (17:08 -0700)]
fixed typo

TBR=r
OCL=31647
CL=31647

15 years ago- interface and comments cleanup
Robert Griesemer [Tue, 14 Jul 2009 23:30:20 +0000 (16:30 -0700)]
- interface and comments cleanup

R=rsc
DELTA=33  (1 added, 3 deleted, 29 changed)
OCL=31620
CL=31642

15 years ago- removed TODO, minor adjustments
Robert Griesemer [Tue, 14 Jul 2009 23:30:06 +0000 (16:30 -0700)]
- removed TODO, minor adjustments

R=rsc
DELTA=16  (6 added, 1 deleted, 9 changed)
OCL=31638
CL=31641

15 years agodarwin ptrace constants
Russ Cox [Tue, 14 Jul 2009 22:29:29 +0000 (15:29 -0700)]
darwin ptrace constants

R=austin
DELTA=42  (37 added, 5 deleted, 0 changed)
OCL=31618
CL=31633

15 years agoImplementation of process tracing using Linux's ptrace.
Austin Clements [Tue, 14 Jul 2009 22:12:10 +0000 (15:12 -0700)]
Implementation of process tracing using Linux's ptrace.

R=rsc
APPROVED=rsc
DELTA=1543  (1528 added, 0 deleted, 15 changed)
OCL=31570
CL=31630

15 years agoSupport ptracing of fork'd children.
Austin Clements [Tue, 14 Jul 2009 22:09:39 +0000 (15:09 -0700)]
Support ptracing of fork'd children.

R=rsc
APPROVED=rsc
DELTA=26  (22 added, 1 deleted, 3 changed)
OCL=31613
CL=31629

15 years agoZero unused syscall arguments.
Austin Clements [Tue, 14 Jul 2009 20:59:54 +0000 (13:59 -0700)]
Zero unused syscall arguments.

R=rsc
APPROVED=rsc
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=31619
CL=31621

15 years agoimprove rpc code. more robust. more tests.
Rob Pike [Tue, 14 Jul 2009 20:23:14 +0000 (13:23 -0700)]
improve rpc code. more robust. more tests.

R=rsc
DELTA=186  (133 added, 20 deleted, 33 changed)
OCL=31611
CL=31616

15 years agoRegenerate Linux 386 syscall bindings to add ptrace.
Austin Clements [Tue, 14 Jul 2009 18:59:19 +0000 (11:59 -0700)]
Regenerate Linux 386 syscall bindings to add ptrace.

R=rsc
APPROVED=rsc
DELTA=82  (80 added, 2 deleted, 0 changed)
OCL=31610
CL=31612

15 years agoSyscall wrappers for ptrace and supporting wait-related flags.
Austin Clements [Tue, 14 Jul 2009 17:53:04 +0000 (10:53 -0700)]
Syscall wrappers for ptrace and supporting wait-related flags.

R=rsc
APPROVED=rsc
DELTA=311  (308 added, 3 deleted, 0 changed)
OCL=31569
CL=31606

15 years agoupdate remaining files to match new scanner/parser interface
Robert Griesemer [Tue, 14 Jul 2009 17:46:18 +0000 (10:46 -0700)]
update remaining files to match new scanner/parser interface
and use shared error handling infrastructure

R=rsc
DELTA=109  (3 added, 86 deleted, 20 changed)
OCL=31600
CL=31605

15 years ago- adjust to new token.Position definition
Robert Griesemer [Tue, 14 Jul 2009 17:45:57 +0000 (10:45 -0700)]
- adjust to new token.Position definition

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31574
CL=31604

15 years ago- use new scanner error handling code
Robert Griesemer [Tue, 14 Jul 2009 17:45:43 +0000 (10:45 -0700)]
- use new scanner error handling code

R=rsc
DELTA=109  (0 added, 87 deleted, 22 changed)
OCL=31573
CL=31603

15 years ago- adjust to new scanner interface (pass filename to Init)
Robert Griesemer [Tue, 14 Jul 2009 17:45:22 +0000 (10:45 -0700)]
- adjust to new scanner interface (pass filename to Init)
- delete error handling code which is not needed anymore

R=rsc
DELTA=83  (0 added, 65 deleted, 18 changed)
OCL=31572
CL=31602

15 years ago- added Filename field to token.Position
Robert Griesemer [Tue, 14 Jul 2009 17:44:57 +0000 (10:44 -0700)]
- added Filename field to token.Position
- handle //line filename:line comments in scanner
- moved error handling code used by various scanner clients
  to errors.go
- added extra tests

R=rsc
DELTA=385  (343 added, 18 deleted, 24 changed)
OCL=31551
CL=31601

15 years agodead code
Russ Cox [Tue, 14 Jul 2009 16:28:42 +0000 (09:28 -0700)]
dead code

R=r
DELTA=20  (0 added, 20 deleted, 0 changed)
OCL=31584
CL=31598

15 years agostep toward no function prototypes.
Russ Cox [Tue, 14 Jul 2009 06:38:39 +0000 (23:38 -0700)]
step toward no function prototypes.

delay evaluation of most types (all but func)
from parse time to type check time.

R=ken
OCL=31585
CL=31585

15 years agoupdate 6g to new REGARG convention.
Russ Cox [Tue, 14 Jul 2009 06:30:30 +0000 (23:30 -0700)]
update 6g to new REGARG convention.
silence gcc warning.

R=ken
OCL=31583
CL=31583

15 years agobug148.
Russ Cox [Tue, 14 Jul 2009 06:29:44 +0000 (23:29 -0700)]
bug148.

R=ken
OCL=31582
CL=31582