diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-06-19 04:53:51 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-06-19 04:53:51 +0000 |
commit | 20b603dba4bea71cbdf9dde7db44d6b5bbcb7654 (patch) | |
tree | 94c81c934c43d4b35ea3289daae6945a9a07b296 /gcc/function.c | |
parent | 17f62b7e1fef0a04c738419b0108eeb89f6b7463 (diff) | |
download | gcc-20b603dba4bea71cbdf9dde7db44d6b5bbcb7654.zip gcc-20b603dba4bea71cbdf9dde7db44d6b5bbcb7654.tar.gz gcc-20b603dba4bea71cbdf9dde7db44d6b5bbcb7654.tar.bz2 |
compiler: stack allocate a buffer for non-escaping string ops
For string concatenation, string to/from byte or rune slice
conversion, and int to string conversion, if the result does not
escape, we can allocate a small (32-element, or 4-byte for int to
string) buffer on stack, and pass it to the runtime function. If
the result fits in the buffer, it doesn't need to do a heap
allocation.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182538
From-SVN: r272468
Diffstat (limited to 'gcc/function.c')
0 files changed, 0 insertions, 0 deletions