diff options
author | Ian Lance Taylor <iant@google.com> | 2016-02-03 21:58:02 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-02-03 21:58:02 +0000 |
commit | f98dd1a338867a408f7c72d73fbad7fe7fc93e3a (patch) | |
tree | 2f8da9862a9c1fe0df138917f997b03439c02773 /libgo/go/runtime/export_test.go | |
parent | b081ed4efc144da0c45a6484aebfd10e0eb9fda3 (diff) | |
download | gcc-f98dd1a338867a408f7c72d73fbad7fe7fc93e3a.zip gcc-f98dd1a338867a408f7c72d73fbad7fe7fc93e3a.tar.gz gcc-f98dd1a338867a408f7c72d73fbad7fe7fc93e3a.tar.bz2 |
libgo: Update to go1.6rc1.
Reviewed-on: https://go-review.googlesource.com/19200
From-SVN: r233110
Diffstat (limited to 'libgo/go/runtime/export_test.go')
-rw-r--r-- | libgo/go/runtime/export_test.go | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/libgo/go/runtime/export_test.go b/libgo/go/runtime/export_test.go index 8782914..fd328a1 100644 --- a/libgo/go/runtime/export_test.go +++ b/libgo/go/runtime/export_test.go @@ -6,7 +6,9 @@ package runtime -import "unsafe" +import ( + "unsafe" +) //var Fadd64 = fadd64 //var Fsub64 = fsub64 @@ -135,22 +137,22 @@ func setenvs([]string) var Envs = envs var SetEnvs = setenvs -//var BigEndian = _BigEndian +//var BigEndian = sys.BigEndian // For benchmarking. /* func BenchSetType(n int, x interface{}) { - e := *(*eface)(unsafe.Pointer(&x)) + e := *efaceOf(&x) t := e._type var size uintptr var p unsafe.Pointer switch t.kind & kindMask { - case _KindPtr: + case kindPtr: t = (*ptrtype)(unsafe.Pointer(t)).elem size = t.size p = e.data - case _KindSlice: + case kindSlice: slice := *(*struct { ptr unsafe.Pointer len, cap uintptr @@ -167,8 +169,15 @@ func BenchSetType(n int, x interface{}) { }) } -const PtrSize = ptrSize +const PtrSize = sys.PtrSize var TestingAssertE2I2GC = &testingAssertE2I2GC var TestingAssertE2T2GC = &testingAssertE2T2GC + +var ForceGCPeriod = &forcegcperiod */ + +// SetTracebackEnv is like runtime/debug.SetTraceback, but it raises +// the "environment" traceback level, so later calls to +// debug.SetTraceback (e.g., from testing timeouts) can't lower it. +func SetTracebackEnv(level string) |