]> git.feebdaed.xyz Git - 0xmirror/go.git/commit
runtime: update mkmalloc to make generated code look nicer
authormatloob <matloob@golang.org>
Wed, 26 Nov 2025 23:04:22 +0000 (18:04 -0500)
committerGopher Robot <gobot@golang.org>
Wed, 26 Nov 2025 23:58:19 +0000 (15:58 -0800)
commit21ebed0ac0a3f733811bea2355ed85d3b1bf6fbd
tree5da187276deff6ef95aee378f31f59e8311d8dd5
parenta3fb92a7100f3f2824d483ee0cbcf1264584b3e4
runtime: update mkmalloc to make generated code look nicer

This cl adds a new operation that can remove an if statement or replace
it with its body if its condition is var or !var for some variable var
that's being replaced with a constant.

Change-Id: I864abf1f023b2a66b2299ca65d4f837d6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/724940
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Auto-Submit: Michael Matloob <matloob@google.com>
src/runtime/_mkmalloc/mkmalloc.go
src/runtime/malloc_generated.go
src/runtime/malloc_stubs.go