)]}'
{
  "commit": "ffc4cc05f596a38c19f0d7e1ee91f17527ac3b37",
  "tree": "24bfbb9373aeca964bd188fc758fbad17334da23",
  "parents": [
    "81a31f5dd542f9a4d656067c9ed3298fcfb6cfea"
  ],
  "author": {
    "name": "Russ Cox",
    "email": "rsc@golang.org",
    "time": "Mon May 08 20:23:40 2023 -0400"
  },
  "committer": {
    "name": "Russ Cox",
    "email": "rsc@golang.org",
    "time": "Tue May 09 16:07:01 2023 +0000"
  },
  "message": "cmd/compile: standardize on outer-to-inner for pos lists\n\nThe call sites that cared all reversed inner-to-outer to outer-to-inner already.\nThe ones that didn\u0027t care left it alone. No one explicitly wanted inner-to-outer.\nAlso change to a callback-based interface, so that call sites aren\u0027t required\nto accumulate the results in a slice (the main reason for that before was to\nreverse the slice!).\n\nThere were three places where these lists were printed:\n\n1. -d\u003dssa/genssa/dump, explicitly reversing to outer-to-inner\n2. node dumps like -W, leaving the default inner-to-outer\n3. file positions for HashDebugs, explicitly reversing to outer-to-inner\n\nIt makes no sense that (1) and (2) would differ. The reason they do is that\nthe code for (2) was too lazy to bother to fix it to be the right way.\n\nConsider this program:\n\n\tpackage p\n\n\tfunc f() {\n\t\tg()\n\t}\n\n\tfunc g() {\n\t\tprintln()\n\t}\n\nBoth before and after this change, the ssa dump for f looks like:\n\n\t# x.go:3\n\t       \t00000 (3) \tTEXT\t\u003cunlinkable\u003e.f(SB), ABIInternal\n\t       \t00001 (3) \tFUNCDATA\t$0, gclocals·g2BeySu+wFnoycgXfElmcg\u003d\u003d(SB)\n\t       \t00002 (3) \tFUNCDATA\t$1, gclocals·g2BeySu+wFnoycgXfElmcg\u003d\u003d(SB)\n\t v4    \t00003 (-4) \tXCHGL\tAX, AX\n\t# x.go:4\n\t# x.go:8\n\t v5    \t00004 (+8) \tPCDATA\t$1, $0\n\t v5    \t00005 (+8) \tCALL\truntime.printlock(SB)\n\t v7    \t00006 (-8) \tCALL\truntime.printnl(SB)\n\t v9    \t00007 (-8) \tCALL\truntime.printunlock(SB)\n\t# x.go:5\n\t b2    \t00008 (5) \tRET\n\t       \t00009 (?) \tEND\n\nNote # x.go:4 (f) then # x.go:8 (g, called from f) between v4 and v5.\n\nThe -W node dumps used the opposite order:\n\n\tbefore walk f\n\t.   AS2 Def tc(1) # x.go:4:3\n\t.   INLMARK # +x.go:4:3\n\t.   PRINTN tc(1) # x.go:8:9,x.go:4:3\n\t.   LABEL p..i0 # x.go:4:3\n\nNow they match the ssa dump order, and they use spaces as separators,\nto avoid potential problems with commas in some editors.\n\n\tbefore walk f\n\t.   AS2 Def tc(1) # x.go:4:3\n\t.   INLMARK # +x.go:4:3\n\t.   PRINTN tc(1) # x.go:4:3 x.go:8:9\n\t.   LABEL p..i0 # x.go:4:3\n\nI\u0027m unaware of any argument for the old order other than it was easier\nto compute without allocation. The new code uses recursion to reverse\nthe order without allocation.\n\nNow that the callers get the results outer-to-inner, most don\u0027t need\nany slices at all.\n\nThis change is particularly important for HashDebug, which had been\nusing a locked temporary slice to walk the inline stack without allocation.\nNow the temporary slice is gone.\n\nChange-Id: I5cb6d76b2f950db67b248acc928e47a0460569f9\nReviewed-on: https://go-review.googlesource.com/c/go/+/493735\nTryBot-Result: Gopher Robot \u003cgobot@golang.org\u003e\nReviewed-by: David Chase \u003cdrchase@google.com\u003e\nRun-TryBot: Russ Cox \u003crsc@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0d0b3f31232c495601ee7547be9cace7a50b82a2",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/base/hashdebug.go",
      "new_id": "5492d9cda2eb265b45a05fb81be9f72a4201c6aa",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/base/hashdebug.go"
    },
    {
      "type": "modify",
      "old_id": "dcb8988b66e2d6137c544ffcf332a4159bd57ce2",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/ir/fmt.go",
      "new_id": "a9cf716dffa1581980ac1fc8334cb1fecca4ea8e",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/ir/fmt.go"
    },
    {
      "type": "modify",
      "old_id": "f74be6a63cbdaed014ce1776cba9b928dd2e23b3",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/logopt/log_opts.go",
      "new_id": "b731e5593833267d0a05144d997a73214badf0ee",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/logopt/log_opts.go"
    },
    {
      "type": "modify",
      "old_id": "37b5a26d5cbe0a10cd09767cdc80fd88a5acbf8d",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/ssagen/ssa.go",
      "new_id": "a037b7494d517d7e8c200c92ca0dcef386ce54f2",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/ssagen/ssa.go"
    },
    {
      "type": "modify",
      "old_id": "934f1c26571136a8bb739b60d98b4161712abb33",
      "old_mode": 33188,
      "old_path": "src/cmd/internal/obj/inl.go",
      "new_id": "7a22eb1efdc2adae0f9f35d5450453d1130c8914",
      "new_mode": 33188,
      "new_path": "src/cmd/internal/obj/inl.go"
    },
    {
      "type": "modify",
      "old_id": "14b09f43d4a8c0794fce64d7c7f034545e9c0706",
      "old_mode": 33188,
      "old_path": "src/cmd/internal/obj/util.go",
      "new_id": "3a071c21d48725d863cf920d783a98cf01faa844",
      "new_mode": 33188,
      "new_path": "src/cmd/internal/obj/util.go"
    }
  ]
}
