)]}'
{
  "commit": "de32c8f8b2b65620644ba002beee86dcccb62a34",
  "tree": "3eabc1838aec364bfc4ce23b98241998b8063158",
  "parents": [
    "54bb8e36943d453e9a2358d8f065fa4d6555526b"
  ],
  "author": {
    "name": "arostovtsev",
    "email": "arostovtsev@google.com",
    "time": "Thu Nov 19 13:50:25 2026 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu Nov 19 13:54:22 2026 -0800"
  },
  "message": "Avoid computing and retaining CallableTypes for untyped functions.\n\n`TypeTagger` previously constructed a `GeneralCallableType` (which meant constructing temporaries for parameter type lists and mandatoriness sets) for all `def` statements and `lambda` expressions. However, that was a waste and caused GC pressure.\n\nWe need to read function types only on the following occasions:\n\n* During static type checking (`TypeChecker`), for each use of a binding in typed code. We want this to be efficient.\n* At eval time during dynamic type checking (experimental and disabled by default). We don\u0027t particularly care about making it efficient.\n* After eval, when assigning a type to exported symbols. Here, each function would typically be processed only once (unless exported in multiple struct fields, which would be unusual), so we can tolerate a small CPU overhead per function.\n\nWe therefore introduce `Types.allAnyFunction()` to conveniently construct types of an functions with unannotated signatures from their rfn. We store the rfn of functions with unannotated signatures in the `TypeTable` to indicate that the symbol has been tagged, but that its type can be computed later on demand. And to avoid having the `TypeChecker` compute this type repeatedly (if an unannotated function is used in typed code), we introduce the new `TypeTable.getAndCacheType()` to cache the type.\n\nAlso take the opportunity to make `TypeTable`s arrays a bit more lazy and compact.\n\nWorking towards #27370\n\nPiperOrigin-RevId: 1025872480\nChange-Id: I4af6488c6f46dc64d3ca9dd89be08dbeb22f2f9c\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1b8b7b3f232e22dd81c27202e4649005c90436ec",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/eval/Eval.java",
      "new_id": "0395f8ed326bc33a15eb63cd459f1a6f4f0ba40d",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/eval/Eval.java"
    },
    {
      "type": "modify",
      "old_id": "86618afb7bbd10240c888bd8733de3c8b974c1ec",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/eval/StarlarkFunction.java",
      "new_id": "c1956a2ad9f41b53881efa38510bc9709b256c6f",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/eval/StarlarkFunction.java"
    },
    {
      "type": "modify",
      "old_id": "99bad3c6fc8d2603890d7a59f8bb584dbc6e3a8e",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/syntax/DefStatement.java",
      "new_id": "9217d3595a6831664acadf2fedca4340a85a490e",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/syntax/DefStatement.java"
    },
    {
      "type": "modify",
      "old_id": "5d2348796b5d3a0591ef308db7733dc88b5538f1",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/syntax/TypeChecker.java",
      "new_id": "4f7de586be409f5f62f2bd7f82a7bf25c7bc7c7e",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/syntax/TypeChecker.java"
    },
    {
      "type": "modify",
      "old_id": "27917e3412e9daa84987249ee10612769fabd6bf",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/syntax/TypeTable.java",
      "new_id": "8fc9d0976378d0b47d5ff2396d862bb423e981f4",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/syntax/TypeTable.java"
    },
    {
      "type": "modify",
      "old_id": "926d9a72e93accc7e0ea2052b501cf156748ec3d",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/syntax/TypeTagger.java",
      "new_id": "afc773310ed26331efba9b1f200daf5ebc4a8f5b",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/syntax/TypeTagger.java"
    },
    {
      "type": "modify",
      "old_id": "68f9618f2af03191f0d7b00a8189ff69a7d52131",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/syntax/Types.java",
      "new_id": "9cf4b06268fb33ca82323152220449286e274435",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/syntax/Types.java"
    },
    {
      "type": "modify",
      "old_id": "4ba712df1c0ddaadc31b65e60f28da89a5e99493",
      "old_mode": 33188,
      "old_path": "src/test/java/net/starlark/java/eval/DynamicTypeCheckTest.java",
      "new_id": "7c847bb05768ac267418dc8442f4d4c6a85528de",
      "new_mode": 33188,
      "new_path": "src/test/java/net/starlark/java/eval/DynamicTypeCheckTest.java"
    },
    {
      "type": "modify",
      "old_id": "8daa7e0da8652e487dd37bd2327ea77bcf33a3d1",
      "old_mode": 33188,
      "old_path": "src/test/java/net/starlark/java/syntax/TypeTaggerTest.java",
      "new_id": "b5c3a5b0888166929ac33284cad959edf4eb771b",
      "new_mode": 33188,
      "new_path": "src/test/java/net/starlark/java/syntax/TypeTaggerTest.java"
    }
  ]
}
