mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
5g, 6g, 8g: registerize variables again
My previous CL: changeset: 9645:ce2e5f44b310 user: Russ Cox <rsc@golang.org> date: Tue Sep 06 10:24:21 2011 -0400 summary: gc: unify stack frame layout introduced a bug wherein no variables were being registerized, making Go programs 2-3x slower than they had been before. This CL fixes that bug (along with some others it was hiding) and adds a test that optimization makes at least one test case faster. R=ken2 CC=golang-dev https://golang.org/cl/5174045
This commit is contained in:
parent
f75ff01f44
commit
e419535f2a
14 changed files with 120 additions and 23 deletions
15
test/fixedbugs/bug369.dir/pkg.go
Normal file
15
test/fixedbugs/bug369.dir/pkg.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2011 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package pkg
|
||||
|
||||
func NonASCII(b []byte, i int) int {
|
||||
for i = 0; i < len(b); i++ {
|
||||
if b[i] >= 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return i
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue