]> Cypherpunks repositories - gostls13.git/commit
runtime: merge lfstack{Pack,Unpack} into one file
authorDave Cheney <dave@cheney.net>
Wed, 6 Apr 2016 21:29:22 +0000 (07:29 +1000)
committerDave Cheney <dave@cheney.net>
Thu, 7 Apr 2016 09:17:22 +0000 (09:17 +0000)
commit3b02c5b1b66df9cdb23d5a3243bb37b2c312ea1b
treeed5d978341c4a67a6833426f7d05c719efb5b5f1
parent438ce713a1c8e4d24aea547b6fcf907b5dbf0bec
runtime: merge lfstack{Pack,Unpack} into one file

Merge the remaining lfstack{Pack,Unpack} implemetations into one file.

unsafe.Sizeof(uintptr(0)) == 4 is a constant comparison so this branch
folds away at compile time.

Dmitry confirmed that the upper 17 bits of an address will be zero for a
user mode pointer, so there is no need to sign extend on amd64 during
unpack, so we can reuse the same implementation as all othe 64 bit
archs.

Change-Id: I99f589416d8b181ccde5364c9c2e78e4a5efc7f1
Reviewed-on: https://go-review.googlesource.com/21597
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
src/runtime/lfstack.go
src/runtime/lfstack_32bit.go [deleted file]
src/runtime/lfstack_64bit.go [deleted file]
src/runtime/lfstack_amd64.go [deleted file]