aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/script/testdata
diff options
context:
space:
mode:
authorDerek Parker <parkerderek86@gmail.com>2026-03-02 16:25:23 -0800
committerGopher Robot <gobot@golang.org>2026-04-06 08:44:45 -0700
commit70dc75b79b7454caf0ed256b51ff716f880b317d (patch)
tree36e1e6a185320157dd5cc05427a0a0a22ae8e2cf /src/cmd/internal/script/testdata
parentd74de3ce79d4ab3495650bfcc4682cab09514b89 (diff)
downloadgo-70dc75b79b7454caf0ed256b51ff716f880b317d.tar.xz
cmd/compile: unify DWARF variable generation and remove encoding
Refactor the DWARF variable generation in the compiler: 1. Replace the intermediate []byte location list encoding with a structured LocListEntry type. The old code packed SSA block/value IDs into pointer-sized integers, wrote them alongside DWARF4-format length-prefixed expressions, then re-read and decoded everything during final encoding. The new approach stores entries as {StartBlock, StartValue, EndBlock, EndValue, Expr} structs that PutLocationListDwarf4/5 directly encode into the appropriate format. This eliminates encodeValue, decodeValue, appendPtr, writePtr, readPtr, and SetupLocList, and removes the DWARF4 re-encoding in PutLocationListDwarf5. 2. Unify createDwarfVars into a single processing loop. The old code had three mutually exclusive paths (createSimpleVars, createABIVars, createComplexVars) selected by build mode, followed by a separate conservative-var loop. The new code uses one loop that tries createComplexVar first (when SSA debug info is available), then falls back to createSimpleVar. This removes createSimpleVars, createABIVars, and createComplexVars. 3. Extract createConservativeVar and shouldEmitDwarfVar as named functions, consolidating inline code and scattered filtering logic. 4. Fix createHeapDerefLocationList to return []LocListEntry instead of raw bytes, consistent with the new representation. Change-Id: If6fb755c22e398d7615dccaf33b1367828e6c47e Reviewed-on: https://go-review.googlesource.com/c/go/+/750920 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/cmd/internal/script/testdata')
0 files changed, 0 insertions, 0 deletions