libgo: Implement and use runtime.Caller, runtime.Func.FileLine.
From-SVN: r185025
This commit is contained in:
parent
1f3d0afc26
commit
0effc3f961
29 changed files with 862 additions and 69 deletions
|
@ -2,10 +2,11 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package binary
|
||||
package binary_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
. "encoding/binary"
|
||||
"io"
|
||||
"math"
|
||||
"reflect"
|
||||
|
@ -187,7 +188,7 @@ func BenchmarkReadStruct(b *testing.B) {
|
|||
bsr := &byteSliceReader{}
|
||||
var buf bytes.Buffer
|
||||
Write(&buf, BigEndian, &s)
|
||||
n := dataSize(reflect.ValueOf(s))
|
||||
n := DataSize(reflect.ValueOf(s))
|
||||
b.SetBytes(int64(n))
|
||||
t := s
|
||||
b.ResetTimer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue