1
0
mirror of https://github.com/golang/go synced 2024-11-19 07:34:44 -07:00
go/oracle/testdata/src/main
Alan Donovan 9f640c2abb go.tools/ssa: record lvalue/rvalue distinction precisely in DebugRef.
A DebugRef associates a source expression E with an ssa.Value
V, but until now did not record whether V was the value or the
address of E.  So, we would guess from the "pointerness" of
the Value, leading to confusion in some cases, e.g.

   type N *N
   var n N
   n = &n  // lvalue and rvalue are both pointers

Now we explicitly record 'IsAddress bool' in DebugRef, and
plumb this everywhere: through (*Function).ValueForExpr and
(*Program).VarValue, all the way to forming the pointer
analysis query.

Also:
- VarValue now treats each reference to a global distinctly,
  just like it does for other vars.  So:
    var g int
    func f() {
   	g = 1     // VarValue(g) == Const(1:int), !isAddress
        print(g)  // VarValue(g) == Global(g), isAddress
    }
- DebugRefs are not emitted for references to predeclared
  identifiers (nil, built-in).
- DebugRefs no longer prevent lifting of an Alloc var into a
  register; now we update or discard the debug info.
- TestValueForExpr: improve coverage of ssa.EnclosingFunction
  by putting expectations in methods and init funcs, not just
  normal funcs.
- oracle: fix golden file broken by recent
  (*types.Var).IsField change.

R=gri
CC=golang-dev
https://golang.org/cl/16610045
2013-10-24 18:31:50 -04:00
..
callgraph2.go go.tools/oracle: fix minor but confusing bug in test driver. 2013-10-01 10:17:26 -04:00
callgraph2.golden go.tool.pointer: fix regression in pointer.cgraph.Root(). 2013-09-26 09:31:39 -04:00
callgraph-json.go go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
callgraph-json.golden go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
callgraph.go go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
callgraph.golden go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
calls-json.go go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
calls-json.golden go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
calls.go go.tools/ssa: build a separate Function for each init() func. 2013-10-14 14:08:23 -04:00
calls.golden go.tools/ssa: build a separate Function for each init() func. 2013-10-14 14:08:23 -04:00
describe-json.go go.tools/oracle: fix oracle tests (fix build partly) 2013-09-18 11:32:18 -07:00
describe-json.golden go.tools/oracle: fix oracle tests (fix build partly) 2013-09-18 11:32:18 -07:00
describe.go go.tools/oracle: fix oracle tests (fix build partly) 2013-09-18 11:32:18 -07:00
describe.golden go.tools/pointer: reflection, part 1: maps, and some core features. 2013-09-16 09:49:10 -04:00
freevars.go go.oracle: freevars: don't report free identifiers defined in package scope. 2013-09-12 11:00:22 -04:00
freevars.golden go.tools/oracle: refactor Oracle API to allow repeated queries on same scope. 2013-09-23 15:02:18 -04:00
implements.go go.tools/oracle: an oracle that answers questions about Go source code. 2013-08-27 17:58:26 -04:00
implements.golden go.tools/oracle: an oracle that answers questions about Go source code. 2013-08-27 17:58:26 -04:00
imports.go go.tools/oracle: an oracle that answers questions about Go source code. 2013-08-27 17:58:26 -04:00
imports.golden go.tools/oracle: describe package: simplify to use only types.Package, not ssa.Package. 2013-09-10 14:19:11 -04:00
multi.go go.tools/oracle: refactor Oracle API to allow repeated queries on same scope. 2013-09-23 15:02:18 -04:00
peers-json.go go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
peers-json.golden go.tools/oracle: add option to output results in JSON syntax. 2013-09-03 15:29:02 -04:00
peers.go go.tools/oracle: an oracle that answers questions about Go source code. 2013-08-27 17:58:26 -04:00
peers.golden go.tools/importer: generalize command-line syntax. 2013-09-06 18:13:57 -04:00
referrers-json.go go.tools/oracle: new query 'referrers' returns all references to an identifier. 2013-09-10 14:11:42 -04:00
referrers-json.golden go.tools/ssa: record lvalue/rvalue distinction precisely in DebugRef. 2013-10-24 18:31:50 -04:00
reflection.go go.tools/pointer: reflection, part 1: maps, and some core features. 2013-09-16 09:49:10 -04:00
reflection.golden go.tools/pointer: reflection, part 1: maps, and some core features. 2013-09-16 09:49:10 -04:00