Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(67)

Issue 7392053: code review 7392053: exp/ssa: a number of bug fixes. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by adonovan
Modified:
12 years ago
Reviewers:
CC:
gri, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r f3e8dfc67e45 https://code.google.com/p/go/ #

Patch Set 3 : diff -r f3e8dfc67e45 https://code.google.com/p/go/ #

Patch Set 4 : diff -r f3e8dfc67e45 https://code.google.com/p/go/ #

Total comments: 8

Patch Set 5 : diff -r 1a366df36e95 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -57 lines) Patch
M src/pkg/exp/ssa/builder.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/exp/ssa/interp/external.go View 1 2 5 chunks +55 lines, -7 lines 0 comments Download
M src/pkg/exp/ssa/interp/external_plan9.go View 1 2 3 1 chunk +26 lines, -4 lines 0 comments Download
M src/pkg/exp/ssa/interp/external_unix.go View 1 2 3 4 1 chunk +118 lines, -13 lines 0 comments Download
M src/pkg/exp/ssa/interp/external_windows.go View 1 2 3 1 chunk +24 lines, -1 line 0 comments Download
M src/pkg/exp/ssa/interp/interp.go View 1 2 3 3 chunks +7 lines, -2 lines 0 comments Download
M src/pkg/exp/ssa/interp/reflect.go View 1 2 5 chunks +33 lines, -0 lines 0 comments Download
M src/pkg/exp/ssa/interp/testdata/coverage.go View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/pkg/exp/ssa/interp/value.go View 1 1 chunk +2 lines, -4 lines 0 comments Download
M src/pkg/exp/ssa/ssadump.go View 1 6 chunks +39 lines, -24 lines 0 comments Download

Messages

Total messages: 5
adonovan
Hello gri@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years ago (2013-02-27 18:24:17 UTC) #1
gri
LGTM https://codereview.appspot.com/7392053/diff/7001/src/pkg/exp/ssa/interp/external_unix.go File src/pkg/exp/ssa/interp/external_unix.go (right): https://codereview.appspot.com/7392053/diff/7001/src/pkg/exp/ssa/interp/external_unix.go#newcode14 src/pkg/exp/ssa/interp/external_unix.go:14: func bytesToHost(in []value) []byte { not a good ...
12 years ago (2013-02-27 19:47:49 UTC) #2
adonovan
https://codereview.appspot.com/7392053/diff/7001/src/pkg/exp/ssa/interp/external_unix.go File src/pkg/exp/ssa/interp/external_unix.go (right): https://codereview.appspot.com/7392053/diff/7001/src/pkg/exp/ssa/interp/external_unix.go#newcode14 src/pkg/exp/ssa/interp/external_unix.go:14: func bytesToHost(in []value) []byte { On 2013/02/27 19:47:49, gri ...
12 years ago (2013-02-27 21:38:47 UTC) #3
adonovan
*** Submitted as https://code.google.com/p/go/source/detail?r=580da0187392 *** exp/ssa: a number of bug fixes. ssadump: - permit naming ...
12 years ago (2013-02-27 21:43:22 UTC) #4
adonovan
12 years ago (2013-02-27 21:55:14 UTC) #5
This broke darwin, freebsd.  Apologies.

Fix pending...

On 27 February 2013 16:43, <adonovan@google.com> wrote:

> *** Submitted as
>
https://code.google.com/p/go/**source/detail?r=580da0187392<https://code.goog...
>
>
> 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://codereview.appspot.**com/7392053<https://codereview.appspot.com/7392053>
>
>
>
https://codereview.appspot.**com/7392053/<https://codereview.appspot.com/7392...
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b