)]}'
{
  "commit": "d4ae47e5884c815c90579fa548ac600f7b9ba12a",
  "tree": "12ffd4742145f742ffb32a5cc18944c8b8a0825a",
  "parents": [
    "517fd770651451e9de2ad22c813df50cd8821cfc"
  ],
  "author": {
    "name": "David Benjamin",
    "email": "davidben@google.com",
    "time": "Tue Sep 03 14:46:30 2024 -0400"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Sep 03 21:00:46 2024 +0000"
  },
  "message": "Mark the CPU capability helpers as const, not just pure\n\nIf we have code like this, the compiler will not currently dedup the\ncapability check:\n\n  void foo() {\n    if (CRYPTO_is_AVX2_capable()) {\n      foo_avx2();\n    } else {\n      foo_nohw();\n    }\n  }\n\n  foo();\n  foo();\n  foo();\n\nThis is because a pure function may still inspect some globals and the\ncompiler doesn\u0027t know that foo_avx2() does not change the output of\nCRYPTO_is_AVX2_capable(). We\u0027d really like that to turn into:\n\n  if (CRYPTO_is_AVX2_capable()) {\n    foo_avx2();\n    foo_avx2();\n    foo_avx2();\n  } else {\n    foo_nohw();\n    foo_nohw();\n    foo_nohw();\n  }\n\nStrictly speaking, these functions are not const because they inspect a\nglobal variable and a test might modify\nOPENSSL_get_armcap_pointer_for_test(). However, that internal, test-only\nfunction is already documented as needing to be resolved before any\nother BoringSSL function is called. When that rule is heeded, const is\nfine.\n\nBug: 42290548\nChange-Id: I1737fd00d443e8854294dcc8446b7b0aa38ffc76\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/70828\nReviewed-by: Bob Beck \u003cbbe@google.com\u003e\nCommit-Queue: David Benjamin \u003cdavidben@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5ca29ae2a021f3d3e5bc9b1e7c8bee1899e80089",
      "old_mode": 33188,
      "old_path": "crypto/internal.h",
      "new_id": "8944a99d799f77629883e462ec5edd05cc4dea6a",
      "new_mode": 33188,
      "new_path": "crypto/internal.h"
    }
  ]
}
