]> Cypherpunks repositories - gostls13.git/log
gostls13.git
15 years ago- don't call String method of AST nodes when converting them to text
Robert Griesemer [Fri, 31 Jul 2009 02:39:47 +0000 (19:39 -0700)]
- don't call String method of AST nodes when converting them to text
- make token.Position.String more robust

TBR=rsc
DELTA=20  (10 added, 6 deleted, 4 changed)
OCL=32564
CL=32564

15 years agobug fix
Robert Griesemer [Fri, 31 Jul 2009 02:29:31 +0000 (19:29 -0700)]
bug fix

R=rsc
OCL=32563
CL=32563

15 years agodelete some code from walkexpr that is now
Russ Cox [Fri, 31 Jul 2009 01:56:44 +0000 (18:56 -0700)]
delete some code from walkexpr that is now
handled by typecheck.

second switch is gone

move floating point minus into back end

R=ken
OCL=32558
CL=32558

15 years agodotted names
Rob Pike [Fri, 31 Jul 2009 01:17:07 +0000 (18:17 -0700)]
dotted names

R=rsc
DELTA=28  (19 added, 0 deleted, 9 changed)
OCL=32550
CL=32554

15 years agogo/ast/filter.go:
Robert Griesemer [Fri, 31 Jul 2009 01:13:55 +0000 (18:13 -0700)]
go/ast/filter.go:
- more orthogonal functionality of filter functions for better re-use

go/doc/doc.go:
- simplified interface
- collect filenames of packages so that they can be shown

godoc:
- removed TODO, show list of package (linked) files used to create documentation

R=rsc
DELTA=130  (68 added, 24 deleted, 38 changed)
OCL=32549
CL=32552

15 years agoString method for token.Position. Extracted from gri's tree.
Austin Clements [Thu, 30 Jul 2009 23:58:19 +0000 (16:58 -0700)]
String method for token.Position.  Extracted from gri's tree.

R=gri
APPROVED=gri
DELTA=33  (20 added, 6 deleted, 7 changed)
OCL=32544
CL=32546

15 years agofix a long-standing typo
Rob Pike [Thu, 30 Jul 2009 23:57:46 +0000 (16:57 -0700)]
fix a long-standing typo

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=32540
CL=32545

15 years agotypechecking checkpoint.
Russ Cox [Thu, 30 Jul 2009 23:53:08 +0000 (16:53 -0700)]
typechecking checkpoint.
started to move typechecking to another file.
can build entire tree still, but lots of work
is duplicated.  much to clean up.

R=ken
OCL=32536
CL=32543

15 years agouse errchk in more places.
Russ Cox [Thu, 30 Jul 2009 23:46:14 +0000 (16:46 -0700)]
use errchk in more places.
let errchk exit 0 even if it has reported a BUG.
it echoed BUG and that's all that matters.

R=r
DELTA=143  (1 added, 89 deleted, 53 changed)
OCL=32533
CL=32542

15 years agoImplement labels, goto, labeled break, and labeled continue.
Austin Clements [Thu, 30 Jul 2009 21:39:27 +0000 (14:39 -0700)]
Implement labels, goto, labeled break, and labeled continue.
Return checking is now done as a general flow check at the end
of function compilation, since break and goto complicated the
way I was doing return checking before.  Goto-over-declaration
checking is also done as a final flow check.

Temporary variables used for effect extraction are now
actually temporary.  Otherwise "op=", "++", and "--" appear as
declarations that cannot be jumped over.

R=rsc
APPROVED=rsc
DELTA=421  (344 added, 38 deleted, 39 changed)
OCL=32527
CL=32535

15 years agouse full path on command line when compiling,
Russ Cox [Thu, 30 Jul 2009 19:54:38 +0000 (12:54 -0700)]
use full path on command line when compiling,
so that gdb shows full path in stack traces.

R=r
DELTA=4  (4 added, 0 deleted, 0 changed)
OCL=32522
CL=32528

15 years agofix build on amd64
Russ Cox [Thu, 30 Jul 2009 18:03:58 +0000 (11:03 -0700)]
fix build on amd64

R=ken
OCL=32521
CL=32521

15 years agofixed golden.out, which is what 32496 should have done.
Russ Cox [Thu, 30 Jul 2009 01:33:31 +0000 (18:33 -0700)]
fixed golden.out, which is what 32496 should have done.
roll back 32496

TBR=austin
OCL=32499
CL=32501

15 years agofix build
Russ Cox [Thu, 30 Jul 2009 01:18:12 +0000 (18:18 -0700)]
fix build

TBR=austin
OCL=32496
CL=32496

15 years agohandle unsupported types safely.
Rob Pike [Thu, 30 Jul 2009 00:24:25 +0000 (17:24 -0700)]
handle unsupported types safely.

R=rsc
DELTA=154  (71 added, 6 deleted, 77 changed)
OCL=32483
CL=32492

15 years agoparser:
Robert Griesemer [Thu, 30 Jul 2009 00:01:09 +0000 (17:01 -0700)]
parser:
- Changed filter function for parser.ParsePackage to
  take an *os.Dir instead of a filename for more
  powerful filters

- Removed TODO in ast.PackageInterface: Now collect
  package comments from all package files

- Cleanups in godoc: Use the new ParsePackage and
  PackageInterface functions; as a result computing
  package information is much simpler now.

R=rsc
DELTA=285  (80 added, 110 deleted, 95 changed)
OCL=32473
CL=32486

15 years agobreak tabwriter columns when starting a new block of indented statements
Robert Griesemer [Wed, 29 Jul 2009 23:23:17 +0000 (16:23 -0700)]
break tabwriter columns when starting a new block of indented statements

R=r
DELTA=16  (15 added, 0 deleted, 1 changed)
OCL=32475
CL=32481

15 years agobug136 unfixed
Russ Cox [Wed, 29 Jul 2009 22:39:05 +0000 (15:39 -0700)]
bug136 unfixed

R=austin
DELTA=35  (21 added, 14 deleted, 0 changed)
OCL=32469
CL=32474

15 years agofix typo
Rob Pike [Wed, 29 Jul 2009 22:33:12 +0000 (15:33 -0700)]
fix typo

R=rsc
OCL=32472
CL=32472

15 years agoanother test error tweak
Russ Cox [Wed, 29 Jul 2009 22:30:54 +0000 (15:30 -0700)]
another test error tweak

5 known bugs; 0 unexpected bugs; test output differs

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

15 years agoclean up EOF
Rob Pike [Wed, 29 Jul 2009 22:24:42 +0000 (15:24 -0700)]
clean up EOF

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

15 years agotweak final line of test output:
Russ Cox [Wed, 29 Jul 2009 22:11:19 +0000 (15:11 -0700)]
tweak final line of test output:

4 known bugs; 0 unexpected bugs

which should be less scary to people
unfamiliar with the tests.

R=r
DELTA=44  (29 added, 12 deleted, 3 changed)
OCL=32460
CL=32464

15 years agohandle some error conditions involving bad data.
Rob Pike [Wed, 29 Jul 2009 22:10:29 +0000 (15:10 -0700)]
handle some error conditions involving bad data.

R=rsc
DELTA=32  (24 added, 1 deleted, 7 changed)
OCL=32461
CL=32463

15 years agobreak and continue fixes
Russ Cox [Wed, 29 Jul 2009 21:49:01 +0000 (14:49 -0700)]
break and continue fixes

labeled break/continue was using
first loop with any label,
not first loop with the right label.

R=ken
OCL=32453
CL=32458

15 years agostatistics HTML page for rpc
Rob Pike [Wed, 29 Jul 2009 20:26:49 +0000 (13:26 -0700)]
statistics HTML page for rpc

R=rsc
DELTA=121  (115 added, 0 deleted, 6 changed)
OCL=32427
CL=32429

15 years agointroduce typecheck pass before walkexpr.
Russ Cox [Wed, 29 Jul 2009 19:47:51 +0000 (12:47 -0700)]
introduce typecheck pass before walkexpr.
not complete but compiler still works.

R=ken
OCL=32424
CL=32426

15 years agoconvert walkexpr to take Node**; drop indir
Russ Cox [Wed, 29 Jul 2009 19:00:34 +0000 (12:00 -0700)]
convert walkexpr to take Node**; drop indir

R=ken
OCL=32421
CL=32421

15 years agoFlatten the Frame tree. Now each function call produces a
Austin Clements [Wed, 29 Jul 2009 18:57:46 +0000 (11:57 -0700)]
Flatten the Frame tree.  Now each function call produces a
single frame and non-overlapping variables reuse frame slots.
As a result, entering and exiting blocks no longer requires
code execution, which means jumps across block boundaries
should be doable now.  Frame slot initialization happens at
definition time now, instead of at frame creation time.  As an
added bonus, Scope's are now exclusively compile-time objects
and we no longer need to specially track the function
activation frame for access to out vars.

R=rsc
APPROVED=rsc
DELTA=313  (102 added, 90 deleted, 121 changed)
OCL=32416
CL=32420

15 years agoexpression printer; %#N
Russ Cox [Wed, 29 Jul 2009 18:51:34 +0000 (11:51 -0700)]
expression printer; %#N

R=ken
OCL=32419
CL=32419

15 years agoquietgcc: do not use -m64 on 32-bit machines
Russ Cox [Wed, 29 Jul 2009 18:47:11 +0000 (11:47 -0700)]
quietgcc: do not use -m64 on 32-bit machines

R=r
DELTA=9  (8 added, 0 deleted, 1 changed)
OCL=32413
CL=32418

15 years agomake every func literal expression allocate,
Russ Cox [Wed, 29 Jul 2009 03:01:00 +0000 (20:01 -0700)]
make every func literal expression allocate,
so that == on func means that the
functions originated in the same
execution of a func literal or definition.

before, there was an inconsistency:

func() {x++} != func() {x++}

but

func() {} == func() {}

this CL makes the second case != too,
just like

make(map[int]int) != make(map[int]int)

R=r
DELTA=202  (71 added, 62 deleted, 69 changed)
OCL=32393
CL=32398

15 years agoAdd a unique list ID to list elements, and verify it as necessary.
David Symonds [Wed, 29 Jul 2009 01:19:16 +0000 (18:19 -0700)]
Add a unique list ID to list elements, and verify it as necessary.
This makes the list closed under its provided operations.

R=rsc,gri
APPROVED=rsc
DELTA=18  (14 added, 0 deleted, 4 changed)
OCL=32388
CL=32395

15 years agomissed changes to Makefiles for container/ring
Robert Griesemer [Wed, 29 Jul 2009 00:52:30 +0000 (17:52 -0700)]
missed changes to Makefiles for container/ring

R=rsc
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=32389
CL=32392

15 years agochange the encoding of uints to simplify overflow checking and to make them
Rob Pike [Wed, 29 Jul 2009 00:20:19 +0000 (17:20 -0700)]
change the encoding of uints to simplify overflow checking and to make them
easier and faster to read.  they are now either a one-byte value or a n-byte value
preceded by a byte holding -n.

R=rsc
DELTA=150  (45 added, 7 deleted, 98 changed)
OCL=32381
CL=32387

15 years agofix error that gcc thinks is a warning
Russ Cox [Wed, 29 Jul 2009 00:02:05 +0000 (17:02 -0700)]
fix error that gcc thinks is a warning

R=ken
OCL=32264
CL=32386

15 years agobug177: anonymous struct fields in reflect
Russ Cox [Wed, 29 Jul 2009 00:01:46 +0000 (17:01 -0700)]
bug177: anonymous struct fields in reflect
(reported by iant)

R=r
DELTA=50  (32 added, 12 deleted, 6 changed)
OCL=32263
CL=32385

15 years agoImplement comparison operators.
Austin Clements [Tue, 28 Jul 2009 23:40:23 +0000 (16:40 -0700)]
Implement comparison operators.

R=rsc
APPROVED=rsc
DELTA=304  (281 added, 0 deleted, 23 changed)
OCL=32361
CL=32382

15 years agoIntersperse comments nicely when printing an AST.
Robert Griesemer [Tue, 28 Jul 2009 23:38:59 +0000 (16:38 -0700)]
Intersperse comments nicely when printing an AST.
gofmt formatted source code looks pretty good already;
with a bit more fine-tuning it should be great.

printer.go:
- Implemented comment intersperse algorithm.
  The approach is a result of many trial-and-error
  experiments but at this point reasonably simple
  and open to arbitrary fine-tuning.

parser.go:
- Simplified handling of lead and line comments
  (formerly called leading and trailing comments).
- Use a comments list instead of an array (I may
  change this back - this is not obviously better
  and uses more space).

doc.go:
- Remove comments from AST nodes that have been
  'consumed' in the documentation to avoid duplicate
  printing of them. Allows for better control of
  what is printed w/o use of printing control flags
  (which are hard to use and not fine-grained enough).

Corresponding adjustments to various clients of these
files.

R=rsc
DELTA=478  (275 added, 108 deleted, 95 changed)
OCL=32185
CL=32380

15 years agoFix segfault on unnamed function arguments. Make continue
Austin Clements [Tue, 28 Jul 2009 23:38:41 +0000 (16:38 -0700)]
Fix segfault on unnamed function arguments.  Make continue
jump to the post statement instead of the condition check.

R=rsc
APPROVED=rsc
DELTA=10  (6 added, 1 deleted, 3 changed)
OCL=32359
CL=32379

15 years agoFixed typos in comments.
Robert Griesemer [Tue, 28 Jul 2009 22:03:05 +0000 (15:03 -0700)]
Fixed typos in comments.

TBR=rsc
OCL=32330
CL=32330

15 years agoRing ADT.
Robert Griesemer [Tue, 28 Jul 2009 21:54:49 +0000 (14:54 -0700)]
Ring ADT.
- Provides analogous functionality to a doubly-linked list
  implementation.
- Completely symmetric set of operations.
- Operations on the ADT do not lead to results that are
  outside the domain of the ADT (closed interface).
- Alternative to container/list.

R=rsc
DELTA=489  (489 added, 0 deleted, 0 changed)
OCL=32284
CL=32323

15 years agofloating-point limits and equations
Russ Cox [Tue, 28 Jul 2009 21:50:50 +0000 (14:50 -0700)]
floating-point limits and equations

R=r
DELTA=13  (8 added, 2 deleted, 3 changed)
OCL=32291
CL=32322

15 years agofmt boundary bugs.
Russ Cox [Tue, 28 Jul 2009 21:50:17 +0000 (14:50 -0700)]
fmt boundary bugs.
pow10 was giving up too easily.

R=r
DELTA=4  (0 added, 3 deleted, 1 changed)
OCL=32310
CL=32321

15 years agoImplement if, for (modulo ranges), break, continue, increment,
Austin Clements [Tue, 28 Jul 2009 21:37:06 +0000 (14:37 -0700)]
Implement if, for (modulo ranges), break, continue, increment,
and decrement.  blockCompilers now form a tree the mimics the
nesting of scopes and provide convenient ways to enter and
exit scopes.  blockCompilers also track the break and continue
PC for the current block.  The statement testing interface now
works in lists of statements, which simplifies a bunch of
things.

R=rsc
APPROVED=rsc
DELTA=401  (335 added, 44 deleted, 22 changed)
OCL=32308
CL=32317

15 years ago- clean up code creating keys for type maps
Rob Pike [Tue, 28 Jul 2009 19:59:39 +0000 (12:59 -0700)]
- clean up code creating keys for type maps
- derive int, uint, float, uintptr decoders based on their size
- add overflow checks in decode

R=rsc
DELTA=407  (281 added, 44 deleted, 82 changed)
OCL=32286
CL=32290

15 years agoconstants for integer limits
Rob Pike [Tue, 28 Jul 2009 19:57:33 +0000 (12:57 -0700)]
constants for integer limits

R=rsc
DELTA=16  (16 added, 0 deleted, 0 changed)
OCL=32288
CL=32288

15 years agoconstants for floating point limits
Rob Pike [Tue, 28 Jul 2009 18:53:16 +0000 (11:53 -0700)]
constants for floating point limits

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

15 years agoSupport use of $GOBINDIR to override $HOME/bin
Phil Pennock [Tue, 28 Jul 2009 18:23:24 +0000 (11:23 -0700)]
Support use of $GOBINDIR to override $HOME/bin

R=r,gri,rsc
APPROVED=rsc
DELTA=53  (12 added, 6 deleted, 35 changed)
OCL=31822
CL=32282

15 years agoFix bug where typeArrayMap was using the address of the
Austin Clements [Tue, 28 Jul 2009 16:58:31 +0000 (09:58 -0700)]
Fix bug where typeArrayMap was using the address of the
pointer to the Type instead of the address of the Type.

R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=32265
CL=32279

15 years agoconstant keys for array initializers
Russ Cox [Tue, 28 Jul 2009 00:58:25 +0000 (17:58 -0700)]
constant keys for array initializers

R=ken
OCL=32261
CL=32261

15 years agoImplement multi-valued functions, multi-valued return, and
Austin Clements [Tue, 28 Jul 2009 00:32:35 +0000 (17:32 -0700)]
Implement multi-valued functions, multi-valued return, and
unpacking for assignments, call arguments, and returns.  This
change revamps the whole assignment compilation system to be
multi-valued, using the new MultiType type and multiV value.
Function calls, returns, and assignments now share a lot of
code and produce very consistent error messages.

R=rsc
APPROVED=rsc
DELTA=510  (335 added, 74 deleted, 101 changed)
OCL=32248
CL=32258

15 years agomove bug148, already fixed, to fixedbugs
Russ Cox [Tue, 28 Jul 2009 00:32:02 +0000 (17:32 -0700)]
move bug148, already fixed, to fixedbugs

R=ken
OCL=32257
CL=32257

15 years agodocument rpc.
Rob Pike [Tue, 28 Jul 2009 00:25:41 +0000 (17:25 -0700)]
document rpc.

R=rsc
DELTA=160  (124 added, 0 deleted, 36 changed)
OCL=32233
CL=32256

15 years agobug170; fix test for bug175
Russ Cox [Tue, 28 Jul 2009 00:24:07 +0000 (17:24 -0700)]
bug170; fix test for bug175

R=ken
OCL=32255
CL=32255

15 years agomultiple return in := bug
Russ Cox [Mon, 27 Jul 2009 23:59:10 +0000 (16:59 -0700)]
multiple return in := bug

R=ken
OCL=32253
CL=32253

15 years agoprint(1<<x)
Russ Cox [Mon, 27 Jul 2009 23:17:09 +0000 (16:17 -0700)]
print(1<<x)

R=ken
OCL=32252
CL=32252

15 years agoavoid register computing len(x), cap(x)
Russ Cox [Mon, 27 Jul 2009 22:55:27 +0000 (15:55 -0700)]
avoid register computing len(x), cap(x)
for slice or string x.

R=ken
OCL=32249
CL=32249

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