)]}'
{
  "commit": "61b29a99dadf33c48a0a063f50f61e877fb419b8",
  "tree": "ef9a572b928f0b505459b31377949e4621f4c09f",
  "parents": [
    "f5d708fd905d3f91d848a0ea25c77119f8af0c36"
  ],
  "author": {
    "name": "Ian Lance Taylor",
    "email": "iant@golang.org",
    "time": "Thu Oct 19 19:34:31 2023 -0700"
  },
  "committer": {
    "name": "Ian Lance Taylor",
    "email": "iant@golang.org",
    "time": "Tue Dec 19 01:05:33 2023 +0000"
  },
  "message": "compiler: move lowering pass after check types pass\n\nThis change moves the lowering pass after the type determination and\nthe type checking passes.  This lets us simplify some of the code that\ndetermines the type of an expression, which previously had to work\ncorrectly both before and after type determination.\n\nI\u0027m doing this to help with future generic support.  For example, with\ngenerics, we can see code like\n\n    func ident[T any](v T) T { return v }\n\n    func F() int32 {\n\ts :\u003d int32(1)\n\treturn ident(s)\n    }\n\nBefore this change, we would type check return statements in the\nlowering pass (see Return_statement::do_lower).  With a generic\nexample like the above, that means we have to determine the type of s,\nand use that to infer the type arguments passed to ident, and use that\nto determine the result type of ident.  That is too much to do at\nlowering time.  Of course we can change the way that return statements\nwork, but similar issues arise with index expressions, the types of\nclosures for function literals, and probably other cases as well.\n\nRather than try to deal with all those cases, we move the lowering\npass after type checking.  This requires a bunch of changes, notably\nfor determining constant types.  We have to add type checking for\nvarious constructs that formerly disappeared in the lowering pass.\nSo it\u0027s a lot of shuffling.  Sorry for the size of the patch.\n\nChange-Id: Ic269e816f324c87feb708ca4cde0eff7f2f70c7b\nReviewed-on: https://go-review.googlesource.com/c/gofrontend/+/536643\nReviewed-by: Ian Lance Taylor \u003ciant@google.com\u003e\nReviewed-by: Than McIntosh \u003cthanm@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c9177b71174899e6da1b65260512ce515e954f30",
      "old_mode": 33188,
      "old_path": "go/expressions.cc",
      "new_id": "a09d33b868e0091bbc33ed366d1801b8121b569e",
      "new_mode": 33188,
      "new_path": "go/expressions.cc"
    },
    {
      "type": "modify",
      "old_id": "d5df7244aa118e50a8a1ee7dccd83045f4370658",
      "old_mode": 33188,
      "old_path": "go/expressions.h",
      "new_id": "87637721372ba8a309ad91712e60207c0e8a212b",
      "new_mode": 33188,
      "new_path": "go/expressions.h"
    },
    {
      "type": "modify",
      "old_id": "66d481681f3bddb42fb84dc8817724fae3897ae4",
      "old_mode": 33188,
      "old_path": "go/go.cc",
      "new_id": "86fe77c272d54b40706831ad32da6bc7b369b4dc",
      "new_mode": 33188,
      "new_path": "go/go.cc"
    },
    {
      "type": "modify",
      "old_id": "3c021b985b99eecd48e92029270d40677fab4f35",
      "old_mode": 33188,
      "old_path": "go/gogo.cc",
      "new_id": "7a6b9e31df0bdf9a3fe5a8f6c8461cb1073344be",
      "new_mode": 33188,
      "new_path": "go/gogo.cc"
    },
    {
      "type": "modify",
      "old_id": "f254a615dbbb9581dea0c3a5981f5ad6a2c2fb68",
      "old_mode": 33188,
      "old_path": "go/gogo.h",
      "new_id": "d69f83b6481a91e1ee913cf3b596ef28ef44f8f2",
      "new_mode": 33188,
      "new_path": "go/gogo.h"
    },
    {
      "type": "modify",
      "old_id": "d7410588347b653bfed32bf0924d6ff3ecc448a6",
      "old_mode": 33188,
      "old_path": "go/parse.cc",
      "new_id": "a4e4ae344b671dc059e6ab7964deff59007c670b",
      "new_mode": 33188,
      "new_path": "go/parse.cc"
    },
    {
      "type": "modify",
      "old_id": "274aa4a7c1e39f65f11840748da76f02ac875c28",
      "old_mode": 33188,
      "old_path": "go/runtime.cc",
      "new_id": "e4dbd26ed5208b65f4ad300ed94e9a30af7bf76b",
      "new_mode": 33188,
      "new_path": "go/runtime.cc"
    },
    {
      "type": "modify",
      "old_id": "5d652a1119deb362978c97ce94da2aeddaf80ec8",
      "old_mode": 33188,
      "old_path": "go/statements.cc",
      "new_id": "e9675ebf3c572542e2c712f1e6a6a7974c9a6c44",
      "new_mode": 33188,
      "new_path": "go/statements.cc"
    },
    {
      "type": "modify",
      "old_id": "9a920ba6970c7beae1f56dd92bbaf891cf025688",
      "old_mode": 33188,
      "old_path": "go/statements.h",
      "new_id": "530011cfc9050f41b71ef0d66fffcae5336eac4c",
      "new_mode": 33188,
      "new_path": "go/statements.h"
    },
    {
      "type": "modify",
      "old_id": "e6b1250ba381c6af6f0f0246022c84e7347bde52",
      "old_mode": 33188,
      "old_path": "go/types.cc",
      "new_id": "b349ad10d6f69739d8be12759ce27970614ad53f",
      "new_mode": 33188,
      "new_path": "go/types.cc"
    },
    {
      "type": "modify",
      "old_id": "15f29f76b8c5065b499f5eb5dfef4a689c925a91",
      "old_mode": 33188,
      "old_path": "go/types.h",
      "new_id": "3dd32799d740a8b95e9b2dfb6f43cd5916aee0fc",
      "new_mode": 33188,
      "new_path": "go/types.h"
    },
    {
      "type": "modify",
      "old_id": "062101432b9958398138449a23106cdbf0c60976",
      "old_mode": 33188,
      "old_path": "go/wb.cc",
      "new_id": "d0d6326e0de3372d2595eae5b770b6190c992b66",
      "new_mode": 33188,
      "new_path": "go/wb.cc"
    }
  ]
}
