Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fixes issue 867.
R=rsc
CC=golang-dev
http://codereview.appspot.com/1691045
|
|
various cleanup, deleting unused code
R=ken2
CC=golang-dev
http://codereview.appspot.com/1663041
|
|
bonus: type switch now detects multiple uses of identical interface types.
bonus: interface types are now order-independent, following the spec.
R=ken2
CC=golang-dev
http://codereview.appspot.com/194053
|
|
R=ken
http://go/go-review/1026032
|
|
turn off testdclstack and "not used" errors
when there are syntax errors.
BUG=2181825
R=ken
OCL=35606
CL=35608
|
|
R=ken
OCL=34859
CL=34865
|
|
R=ken
OCL=34471
CL=34471
|
|
R=ken
OCL=34244
CL=34249
|
|
R=ken
OCL=34232
CL=34232
|
|
R=ken
OCL=32716
CL=32720
|
|
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
|
|
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
|
|
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
|
|
needed for heap allocation if variable escapes.
package main
func main(){
var i interface{} = 42;
switch v := i.(type) {
case int:
println(&v, v);
}
}
R=ken
OCL=31245
CL=31245
|
|
package main
func main() {
var x interface {} = 42;
switch x := x.(type) {
case int:
case foo:
}
}
before:
x.go:7: non-type case in type switch
x.go:7: inappropriate case for a type switch
now:
x.go:7: foo: undefined
R=ken
OCL=31221
CL=31221
|
|
package main
func main() {
var x interface{};
switch x {
case 41:
case "b":
}
}
before:
x.go:5: fatal error: exprcmp
now:
x.go:5: illegal types for operand: EQ
interface { }
int
x.go:6: illegal types for operand: EQ
interface { }
string
R=ken
OCL=31217
CL=31219
|
|
R=ken
OCL=29651
CL=29653
|
|
R=r
OCL=29646
CL=29646
|
|
this is not a user-visible change.
before, all interface values were
struct Itype {
Sigt *type;
Sigi *inter;
void *method[n];
}
struct Iface {
void *addr;
Itype *itype;
}
the itype is basically a vtable, but it's unnecessary
if the static type is interface{ }.
for interface values with static type empty, the
new representation is
struct Eface {
void *addr;
Sigt *type;
}
this complicates the code somewhat, but
it reduces the number of Itypes that
have to be computed and cached,
it opens up opportunities to avoid function
calls in a few common cases,
and it will make it possible to lay out
interface{} values at compile time,
which i think i'll need for the new reflection.
R=ken
OCL=28701
CL=29121
|
|
the assignment on a type switch
R=r
OCL=27048
CL=27048
|
|
twice instead of once.
R=r
OCL=27015
CL=27015
|
|
fixed bug 141
R=r
OCL=26627
CL=26627
|
|
R=r
OCL=26480
CL=26480
|
|
R=r
OCL=26434
CL=26434
|
|
new feature 'case nil:' in type switch
will match iff the interface is nil.
R=r
OCL=26404
CL=26404
|
|
various bug fixes and tests involving constants.
test/const1.go is the major new test case.
R=ken
OCL=26216
CL=26224
|
|
declared in cases and heap allocation
R=r
OCL=26064
CL=26064
|
|
R=r
OCL=25890
CL=25890
|
|
2. fixed fault on bug128
3. got rid of typeof
4. fixed bug in t,ok = I2T
R=r
OCL=25873
CL=25873
|
|
in preparation of type switch.
no functional change (yet).
R=r
OCL=25784
CL=25788
|