)]}'
{
  "commit": "9e619739fdc4cbaeb00a10ef95ce3e5d6996e8a7",
  "tree": "17ad031e86bdd914d8980ae985ffc2e0aca80e3b",
  "parents": [
    "44dcb5cb61aee5435e0b3c78544a1d3352a4cc98"
  ],
  "author": {
    "name": "Josh Bleecher Snyder",
    "email": "josharian@gmail.com",
    "time": "Sat Nov 03 09:09:28 2018 -0700"
  },
  "committer": {
    "name": "Josh Bleecher Snyder",
    "email": "josharian@gmail.com",
    "time": "Mon Nov 05 23:12:50 2018 +0000"
  },
  "message": "cmd/compile: copy all fields during SubstAny\n\nConsider these functions:\n\nfunc f(a any) int\nfunc g(a any) int\n\nPrior to this change, since f and g have identical signatures,\nthey would share a single generated func type.\n\ntypes.SubstAny makes a shallow type copy, even after instantiation,\nf and g share a single generated Result type.\nSo if you instantiate f with any\u003dT, call dowidth,\ninstantiate g with any\u003dU, and call dowidth,\nand if sizeof(T) !\u003d sizeof(U),\nthen the Offset of the result for f is now wrong.\n\nI don\u0027t believe this happens at all right now, but it bit me hard when\nexperimenting with some other compiler changes.\nAnd it\u0027s hard to debug. It results in rare stack corruption, causing\nproblems far from the actual source of the problem.\n\nTo fix this, change SubstAny to make deep copies of TSTRUCTs.\n\nname        old alloc/op      new alloc/op      delta\nTemplate         35.3MB ± 0%       35.4MB ± 0%  +0.23%  (p\u003d0.008 n\u003d5+5)\nUnicode          29.1MB ± 0%       29.1MB ± 0%  +0.16%  (p\u003d0.008 n\u003d5+5)\nGoTypes           122MB ± 0%        122MB ± 0%  +0.16%  (p\u003d0.008 n\u003d5+5)\nCompiler          513MB ± 0%        514MB ± 0%  +0.19%  (p\u003d0.008 n\u003d5+5)\nSSA              1.94GB ± 0%       1.94GB ± 0%  +0.01%  (p\u003d0.008 n\u003d5+5)\nFlate            24.2MB ± 0%       24.2MB ± 0%  +0.08%  (p\u003d0.008 n\u003d5+5)\nGoParser         28.5MB ± 0%       28.5MB ± 0%  +0.24%  (p\u003d0.008 n\u003d5+5)\nReflect          86.2MB ± 0%       86.3MB ± 0%  +0.09%  (p\u003d0.008 n\u003d5+5)\nTar              34.9MB ± 0%       34.9MB ± 0%  +0.13%  (p\u003d0.008 n\u003d5+5)\nXML              47.0MB ± 0%       47.1MB ± 0%  +0.18%  (p\u003d0.008 n\u003d5+5)\n[Geo mean]       80.9MB            81.0MB       +0.15%\n\nname        old allocs/op     new allocs/op     delta\nTemplate           348k ± 0%         349k ± 0%  +0.38%  (p\u003d0.008 n\u003d5+5)\nUnicode            340k ± 0%         340k ± 0%  +0.21%  (p\u003d0.008 n\u003d5+5)\nGoTypes           1.27M ± 0%        1.28M ± 0%  +0.27%  (p\u003d0.008 n\u003d5+5)\nCompiler          4.90M ± 0%        4.92M ± 0%  +0.36%  (p\u003d0.008 n\u003d5+5)\nSSA               15.3M ± 0%        15.3M ± 0%  +0.03%  (p\u003d0.008 n\u003d5+5)\nFlate              232k ± 0%         233k ± 0%  +0.14%  (p\u003d0.008 n\u003d5+5)\nGoParser           291k ± 0%         292k ± 0%  +0.42%  (p\u003d0.008 n\u003d5+5)\nReflect           1.05M ± 0%        1.05M ± 0%  +0.14%  (p\u003d0.008 n\u003d5+5)\nTar                343k ± 0%         344k ± 0%  +0.22%  (p\u003d0.008 n\u003d5+5)\nXML                428k ± 0%         430k ± 0%  +0.36%  (p\u003d0.008 n\u003d5+5)\n[Geo mean]         807k              809k       +0.25%\n\nChange-Id: I62134db642206cded01920dc1d8a7da61f7ca0ac\nReviewed-on: https://go-review.googlesource.com/c/147038\nRun-TryBot: Josh Bleecher Snyder \u003cjosharian@gmail.com\u003e\nTryBot-Result: Gobot Gobot \u003cgobot@golang.org\u003e\nReviewed-by: Matthew Dempsky \u003cmdempsky@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b20039239b9cfb816f5a7564ea453869568c79b3",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/types/type.go",
      "new_id": "45355e5798ce35a2eb57f19b8a134b03b0f5aae2",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/types/type.go"
    }
  ]
}
