Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
68f91aea
Commit
68f91aea
authored
Aug 20, 2014
by
Josh Bleecher Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: convert memclrBytes to Go
LGTM=khr R=khr CC=golang-codereviews
https://golang.org/cl/131980043
parent
ddce7c35
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
alg.go
src/pkg/runtime/alg.go
+6
-0
alg.goc
src/pkg/runtime/alg.goc
+0
-5
export_test.go
src/pkg/runtime/export_test.go
+1
-4
No files found.
src/pkg/runtime/alg.go
View file @
68f91aea
...
...
@@ -273,3 +273,9 @@ func ifaceHash(i interface {
},
seed
uintptr
)
uintptr
{
return
goalg
(
&
algarray
[
alg_INTER
])
.
hash
(
noescape
(
unsafe
.
Pointer
(
&
i
)),
unsafe
.
Sizeof
(
i
),
seed
)
}
// Testing adapter for memclr
func
memclrBytes
(
b
[]
byte
)
{
s
:=
(
*
sliceStruct
)(
unsafe
.
Pointer
(
&
b
))
memclr
(
s
.
array
,
uintptr
(
s
.
len
))
}
src/pkg/runtime/alg.goc
View file @
68f91aea
...
...
@@ -287,8 +287,3 @@ runtime·hashinit(void)
}
}
}
//
Testing
adapter
for
memclr
func
memclrBytes
(
s
Slice
)
{
runtime
·
memclr
(
s
.
array
,
s
.
len
);
}
src/pkg/runtime/export_test.go
View file @
68f91aea
...
...
@@ -78,13 +78,10 @@ var Int32Hash = int32Hash
var
Int64Hash
=
int64Hash
var
EfaceHash
=
efaceHash
var
IfaceHash
=
ifaceHash
var
MemclrBytes
=
memclrBytes
var
HashLoad
=
&
hashLoad
func
memclrBytes
(
b
[]
byte
)
var
MemclrBytes
=
memclrBytes
func
gogoBytes
()
int32
var
GogoBytes
=
gogoBytes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment