]> Cypherpunks repositories - gostls13.git/commit
exp/ssa: a number of bug fixes.
authorAlan Donovan <adonovan@google.com>
Wed, 27 Feb 2013 21:43:16 +0000 (16:43 -0500)
committerAlan Donovan <adonovan@google.com>
Wed, 27 Feb 2013 21:43:16 +0000 (16:43 -0500)
commit1c5e079600a820bdb9a61d1813ab2a342cc70ce9
tree0062107c165e32befd1b0d3553055cc5b52b8878
parentd1d38c535d848775c06b19d753773936441d90da
exp/ssa: a number of bug fixes.

ssadump:
- permit naming a package (not just *.go files) on command line.
- set BuildSerially flag when setting Log* flags
  (Q. should instead the logging functions take a lock?)

Builder:
- fixed bug when calling variadic function with zero '...'-params.
  Added regression test.

interp:
- more external functions:
   the 'error' interface
   bytes.{Equal,IndexByte}
   reflect.(Value).{Bool,NumOut,Out}
   syscall.{Close,Fstat,Read,Open,Stat,Lstat,Fstat,
     Getdents,ParseDirents,Getwd}
- permit comparisons between *Function and *closure.

With this CL, ssadump can now interpret ssadump itself (!),
loading, parsing, typing, SSA-building, and running
println("Hello, World!").  While a fmt-based equivalent still
lacks some external routines, e.g. math/big, I think there are
diminishing returns in expanding the interpreter (and
debugging it is starting to feel like "Inception").

I'm pretty confident this package is now good enough for wider use.

R=gri
CC=golang-dev
https://golang.org/cl/7392053
src/pkg/exp/ssa/builder.go
src/pkg/exp/ssa/interp/external.go
src/pkg/exp/ssa/interp/external_plan9.go
src/pkg/exp/ssa/interp/external_unix.go
src/pkg/exp/ssa/interp/external_windows.go
src/pkg/exp/ssa/interp/interp.go
src/pkg/exp/ssa/interp/reflect.go
src/pkg/exp/ssa/interp/testdata/coverage.go
src/pkg/exp/ssa/interp/value.go
src/pkg/exp/ssa/ssadump.go