• David Chase's avatar
    cmd/internal/gc: extend escape analysis to pointers in slices · a21cf5b6
    David Chase authored
    Modified esc.go to allow slice literals (before append)
    to be non-escaping.  Modified tests to account for changes
    in escape behavior and to also test the two cases that
    were previously not tested.
    
    Also minor cleanups to debug-printing within esc.go
    
    Allocation stats for running compiler
    ( cd src/html/template;
      for i in {1..5} ; do
         go tool 6g -memprofile=testzz.${i}.prof  -memprofilerate=1 *.go ;
         go tool pprof -alloc_objects -text  testzz.${i}.prof ;
         done ; )
    before about 86k allocations
    after  about 83k allocations
    
    Fixes #8972
    
    Change-Id: Ib61dd70dc74adb40d6f6fdda6eaa4bf7d83481de
    Reviewed-on: https://go-review.googlesource.com/10118Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    a21cf5b6
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...