Age | Commit message (Collapse) | Author | Files | Lines |
|
R=ken
OCL=32576
CL=32580
|
|
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
|
|
R=ken
OCL=32421
CL=32421
|
|
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
|
|
R=ken
OCL=32239
CL=32239
|
|
excluding import data,
no yacc node has type Type* anymore.
0 reduce/reduce conflicts.
R=ken
OCL=31793
CL=31795
|
|
consts in the same factored block
const (
X = Y;
Y = 2;
)
R=ken
OCL=31782
CL=31782
|
|
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
|
|
delay evaluation of most types (all but func)
from parse time to type check time.
R=ken
OCL=31585
CL=31585
|
|
walkstate -> walkstmt
walktype -> walkexpr; stmts moved to walkstmt
walktype and friends have a final Node **init
argument that can have side effects appended,
making it more explicit when they do and do not happen.
this replaces the old global addtop and addtotop.
delete switch map and interface conversion cases
(dropped from the language months ago).
R=ken
OCL=31465
CL=31468
|
|
R=rsc
OCL=31467
CL=31467
|
|
R=rsc
OCL=31373
CL=31373
|
|
R=ken
OCL=31295
CL=31295
|
|
R=ken
OCL=31233
CL=31233
|
|
(in the same package).
allow forward method declaration to be satisfied
by implementation in another file (in the same package).
all methods must be declared in the same file
as the receiver type.
R=ken
OCL=30864
CL=30869
|
|
R=ken
OCL=30783
CL=30783
|
|
const foo = []int{1,2}
x.go:3: expression must be a constant
instead of
x.go:3: fatal error: gettype: addtop
R=ken
OCL=30767
CL=30767
|
|
func foo(y) { }
was:
x.go:2: NONAME-y G0 u(1) a(1) l(77) x(-1000000000) is not a type
now:
x.go:2: y is not a type
R=ken
OCL=30764
CL=30764
|
|
R=r
OCL=30719
CL=30719
|
|
package main
func f(a *c.b) {}
func main() {}
BUG=1909731
R=ken
OCL=30322
CL=30322
|
|
* no longer distinguishes const, var, type, package names.
* all the predefined names are not tokens anymore.
R=ken
OCL=29326
CL=29985
|
|
R=ken
OCL=29907
CL=29907
|
|
R=r
OCL=29544
CL=29544
|
|
* conversions all in one place.
* no separate load, store phases;
direct memory addressing when possible
(this is the x86 after all!).
avoids extra registers, extra MOVQs.
* fixes int32 -> uint64 bug
(was zero-extending)
R=ken
OCL=29482
CL=29484
|
|
can run 64-bit sieve and powser.
interfaces are limping along.
next hurdle is floating point.
R=ken
OCL=29418
CL=29423
|
|
take 2
R=ken
OCL=29304
CL=29306
|
|
*** Reason for rollback ***
too many files included
*** Original change description ***
simplifying grammar: delete LBASETYPE and LACONST
R=ken
OCL=29303
CL=29303
|
|
R=ken
OCL=29300
CL=29302
|
|
structure and array literals
R=r
OCL=29190
CL=29190
|
|
R=r
OCL=29016
CL=29016
|
|
structs and arrays are done
slices and maps are yet to do
R=r
OCL=28977
CL=28977
|
|
structure set up - no change yet
R=r
OCL=28966
CL=28966
|
|
new type equality restrictions
better handling of renamed packages
"sys" is no longer available to programs
R=ken
OCL=28553
CL=28578
|
|
R=ken
OCL=28559
CL=28562
|
|
with method m, s.m() is ok and m now shows up
in s's method set for interface runtime.
see http://cl/28419-p2 for new test interface10.go.
R=ken
OCL=28420
CL=28423
|
|
part 2; missing files
R=ken
OCL=28408
CL=28410
|
|
R=ken
OCL=28374
CL=28378
|
|
* byteastring is no longer used
* do not generate ODCL, OAS for globals
(wasn't generating any code but might
save one or two init functions)
* do not call self from Init function
R=ken
OCL=28309
CL=28309
|
|
drip init function if it doesnt do anything
R=r
OCL=28180
CL=28180
|
|
R=r
OCL=27293
CL=27293
|
|
was copying a bit too much about t into n,
like whether the signature was queued to be printed.
(bug reported by anton)
was also editing t, meaning you could do
type T int;
func (p int) Meth() { }
both fixed.
R=ken
OCL=27052
CL=27052
|
|
this avoids problems people have run into with
multiple closures in the same package.
when preparing filename, only cut off .go, not .anything.
this fixes a bug tgs ran into with foo.pb.go and foo.go
in the same package.
also turn bad identifier chars from filename into
underscores: a-b.pb.go => a_b_pb
R=ken
OCL=27050
CL=27050
|
|
package main
var f = func(a, b int) int { return a + b }
R=ken
OCL=26935
CL=26935
|
|
R=ken
OCL=26930
CL=26930
|
|
unsafe.Alignof(struct{x float}{0}.x)
R=ken
OCL=26911
CL=26913
|
|
various bug fixes and tests involving constants.
test/const1.go is the major new test case.
R=ken
OCL=26216
CL=26224
|
|
R=rsc
OCL=25105
CL=25105
|
|
R=ken
OCL=25072
CL=25072
|
|
R=ken
DELTA=20 (19 added, 0 deleted, 1 changed)
OCL=24719
CL=24771
|
|
R=r
OCL=24639
CL=24639
|