aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-14 22:09:21 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-14 22:09:21 +0000
commit7def10f11a2cf6bab98286e072619b3e8170deb0 (patch)
tree46c59c0e050ae0498ebb84f3a6c39d96bb8f9dc4 /libgo/go
parent3277441ca8172e7da279cdc4966d67f5972725d7 (diff)
libgo: Use -fgo-pkgpath.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@187486 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/bytes/indexbyte.c4
-rw-r--r--libgo/go/encoding/xml/marshal_test.go2
-rw-r--r--libgo/go/html/template/escape_test.go2
-rw-r--r--libgo/go/reflect/all_test.go2
-rw-r--r--libgo/go/regexp/all_test.go3
-rw-r--r--libgo/go/regexp/exec_test.go22
-rw-r--r--libgo/go/regexp/export_test.go15
-rw-r--r--libgo/go/regexp/find_test.go4
-rw-r--r--libgo/go/sync/atomic/atomic.c46
-rw-r--r--libgo/go/syscall/errno.c4
-rw-r--r--libgo/go/syscall/signame.c2
-rw-r--r--libgo/go/syscall/wait.c18
12 files changed, 72 insertions, 52 deletions
diff --git a/libgo/go/bytes/indexbyte.c b/libgo/go/bytes/indexbyte.c
index 8213b3e3442..8986d1056e0 100644
--- a/libgo/go/bytes/indexbyte.c
+++ b/libgo/go/bytes/indexbyte.c
@@ -13,7 +13,7 @@
library function, which shouldn't need much stack space. */
int IndexByte (struct __go_open_array, char)
- asm ("libgo_bytes.bytes.IndexByte")
+ asm ("bytes.IndexByte")
__attribute__ ((no_split_stack));
int
@@ -30,7 +30,7 @@ IndexByte (struct __go_open_array s, char b)
/* Comparison. */
_Bool Equal (struct __go_open_array a, struct __go_open_array b)
- asm ("libgo_bytes.bytes.Equal")
+ asm ("bytes.Equal")
__attribute__ ((no_split_stack));
_Bool
diff --git a/libgo/go/encoding/xml/marshal_test.go b/libgo/go/encoding/xml/marshal_test.go
index b6978a1e65b..6f0ecfc233b 100644
--- a/libgo/go/encoding/xml/marshal_test.go
+++ b/libgo/go/encoding/xml/marshal_test.go
@@ -726,7 +726,7 @@ var marshalErrorTests = []struct {
},
{
Value: map[*Ship]bool{nil: false},
- Err: "xml: unsupported type: map[*xml.Ship]bool",
+ Err: "xml: unsupported type: map[*encoding/xml.Ship]bool",
Kind: reflect.Map,
},
{
diff --git a/libgo/go/html/template/escape_test.go b/libgo/go/html/template/escape_test.go
index ce12c1795c2..6670be9a195 100644
--- a/libgo/go/html/template/escape_test.go
+++ b/libgo/go/html/template/escape_test.go
@@ -226,7 +226,7 @@ func TestEscape(t *testing.T) {
{
"badMarshaler",
`<button onclick='alert(1/{{.B}}in numbers)'>`,
- `<button onclick='alert(1/ /* json: error calling MarshalJSON for type *template.badMarshaler: invalid character &#39;f&#39; looking for beginning of object key string */null in numbers)'>`,
+ `<button onclick='alert(1/ /* json: error calling MarshalJSON for type *html/template.badMarshaler: invalid character &#39;f&#39; looking for beginning of object key string */null in numbers)'>`,
},
{
"jsMarshaler",
diff --git a/libgo/go/reflect/all_test.go b/libgo/go/reflect/all_test.go
index c35dc26e90d..e946c0adfca 100644
--- a/libgo/go/reflect/all_test.go
+++ b/libgo/go/reflect/all_test.go
@@ -1383,7 +1383,7 @@ func TestImportPath(t *testing.T) {
t Type
path string
}{
- {TypeOf(&base64.Encoding{}).Elem(), "libgo_encoding.base64"},
+ {TypeOf(&base64.Encoding{}).Elem(), "encoding/base64"},
{TypeOf(uint(0)), ""},
{TypeOf(map[string]int{}), ""},
{TypeOf((*error)(nil)).Elem(), ""},
diff --git a/libgo/go/regexp/all_test.go b/libgo/go/regexp/all_test.go
index f7b41a67416..39a28dfc322 100644
--- a/libgo/go/regexp/all_test.go
+++ b/libgo/go/regexp/all_test.go
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package regexp
+package regexp_test
import (
+ . "regexp"
"strings"
"testing"
)
diff --git a/libgo/go/regexp/exec_test.go b/libgo/go/regexp/exec_test.go
index e668574a514..a84bedc69d7 100644
--- a/libgo/go/regexp/exec_test.go
+++ b/libgo/go/regexp/exec_test.go
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package regexp
+package regexp_test
import (
+ . "regexp"
+
"bufio"
"compress/bzip2"
"fmt"
@@ -219,22 +221,22 @@ var run = []func(*Regexp, *Regexp, string) ([]int, string){
}
func runFull(re, refull *Regexp, text string) ([]int, string) {
- refull.longest = false
+ refull.SetLongest(false)
return refull.FindStringSubmatchIndex(text), "[full]"
}
func runPartial(re, refull *Regexp, text string) ([]int, string) {
- re.longest = false
+ re.SetLongest(false)
return re.FindStringSubmatchIndex(text), ""
}
func runFullLongest(re, refull *Regexp, text string) ([]int, string) {
- refull.longest = true
+ refull.SetLongest(true)
return refull.FindStringSubmatchIndex(text), "[full,longest]"
}
func runPartialLongest(re, refull *Regexp, text string) ([]int, string) {
- re.longest = true
+ re.SetLongest(true)
return re.FindStringSubmatchIndex(text), "[longest]"
}
@@ -246,22 +248,22 @@ var match = []func(*Regexp, *Regexp, string) (bool, string){
}
func matchFull(re, refull *Regexp, text string) (bool, string) {
- refull.longest = false
+ refull.SetLongest(false)
return refull.MatchString(text), "[full]"
}
func matchPartial(re, refull *Regexp, text string) (bool, string) {
- re.longest = false
+ re.SetLongest(false)
return re.MatchString(text), ""
}
func matchFullLongest(re, refull *Regexp, text string) (bool, string) {
- refull.longest = true
+ refull.SetLongest(true)
return refull.MatchString(text), "[full,longest]"
}
func matchPartialLongest(re, refull *Regexp, text string) (bool, string) {
- re.longest = true
+ re.SetLongest(true)
return re.MatchString(text), "[longest]"
}
@@ -541,7 +543,7 @@ Reading:
}
}
- re, err := compile(pattern, syn, true)
+ re, err := CompileInternal(pattern, syn, true)
if err != nil {
if shouldCompile {
t.Errorf("%s:%d: %#q did not compile", file, lineno, pattern)
diff --git a/libgo/go/regexp/export_test.go b/libgo/go/regexp/export_test.go
new file mode 100644
index 00000000000..25080ad19ce
--- /dev/null
+++ b/libgo/go/regexp/export_test.go
@@ -0,0 +1,15 @@
+// Copyright 2012 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 regexp
+
+import "regexp/syntax"
+
+func (re *Regexp) SetLongest(b bool) {
+ re.longest = b
+}
+
+func CompileInternal(expr string, mode syntax.Flags, longest bool) (*Regexp, error) {
+ return compile(expr, mode, longest)
+}
diff --git a/libgo/go/regexp/find_test.go b/libgo/go/regexp/find_test.go
index e07eb7d5c05..25930160f84 100644
--- a/libgo/go/regexp/find_test.go
+++ b/libgo/go/regexp/find_test.go
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package regexp
+package regexp_test
import (
+ . "regexp"
+
"fmt"
"strings"
"testing"
diff --git a/libgo/go/sync/atomic/atomic.c b/libgo/go/sync/atomic/atomic.c
index e5de5ee3c79..14bc7895621 100644
--- a/libgo/go/sync/atomic/atomic.c
+++ b/libgo/go/sync/atomic/atomic.c
@@ -7,7 +7,7 @@
#include <stdint.h>
_Bool CompareAndSwapInt32 (int32_t *, int32_t, int32_t)
- asm ("libgo_sync.atomic.CompareAndSwapInt32");
+ asm ("sync_atomic.CompareAndSwapInt32");
_Bool
CompareAndSwapInt32 (int32_t *val, int32_t old, int32_t new)
@@ -16,7 +16,7 @@ CompareAndSwapInt32 (int32_t *val, int32_t old, int32_t new)
}
_Bool CompareAndSwapInt64 (int64_t *, int64_t, int64_t)
- asm ("libgo_sync.atomic.CompareAndSwapInt64");
+ asm ("sync_atomic.CompareAndSwapInt64");
_Bool
CompareAndSwapInt64 (int64_t *val, int64_t old, int64_t new)
@@ -25,7 +25,7 @@ CompareAndSwapInt64 (int64_t *val, int64_t old, int64_t new)
}
_Bool CompareAndSwapUint32 (uint32_t *, uint32_t, uint32_t)
- asm ("libgo_sync.atomic.CompareAndSwapUint32");
+ asm ("sync_atomic.CompareAndSwapUint32");
_Bool
CompareAndSwapUint32 (uint32_t *val, uint32_t old, uint32_t new)
@@ -34,7 +34,7 @@ CompareAndSwapUint32 (uint32_t *val, uint32_t old, uint32_t new)
}
_Bool CompareAndSwapUint64 (uint64_t *, uint64_t, uint64_t)
- asm ("libgo_sync.atomic.CompareAndSwapUint64");
+ asm ("sync_atomic.CompareAndSwapUint64");
_Bool
CompareAndSwapUint64 (uint64_t *val, uint64_t old, uint64_t new)
@@ -43,7 +43,7 @@ CompareAndSwapUint64 (uint64_t *val, uint64_t old, uint64_t new)
}
_Bool CompareAndSwapUintptr (uintptr_t *, uintptr_t, uintptr_t)
- asm ("libgo_sync.atomic.CompareAndSwapUintptr");
+ asm ("sync_atomic.CompareAndSwapUintptr");
_Bool
CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
@@ -52,7 +52,7 @@ CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
}
_Bool CompareAndSwapPointer (void **, void *, void *)
- asm ("libgo_sync.atomic.CompareAndSwapPointer");
+ asm ("sync_atomic.CompareAndSwapPointer");
_Bool
CompareAndSwapPointer (void **val, void *old, void *new)
@@ -61,7 +61,7 @@ CompareAndSwapPointer (void **val, void *old, void *new)
}
int32_t AddInt32 (int32_t *, int32_t)
- asm ("libgo_sync.atomic.AddInt32");
+ asm ("sync_atomic.AddInt32");
int32_t
AddInt32 (int32_t *val, int32_t delta)
@@ -70,7 +70,7 @@ AddInt32 (int32_t *val, int32_t delta)
}
uint32_t AddUint32 (uint32_t *, uint32_t)
- asm ("libgo_sync.atomic.AddUint32");
+ asm ("sync_atomic.AddUint32");
uint32_t
AddUint32 (uint32_t *val, uint32_t delta)
@@ -79,7 +79,7 @@ AddUint32 (uint32_t *val, uint32_t delta)
}
int64_t AddInt64 (int64_t *, int64_t)
- asm ("libgo_sync.atomic.AddInt64");
+ asm ("sync_atomic.AddInt64");
int64_t
AddInt64 (int64_t *val, int64_t delta)
@@ -88,7 +88,7 @@ AddInt64 (int64_t *val, int64_t delta)
}
uint64_t AddUint64 (uint64_t *, uint64_t)
- asm ("libgo_sync.atomic.AddUint64");
+ asm ("sync_atomic.AddUint64");
uint64_t
AddUint64 (uint64_t *val, uint64_t delta)
@@ -97,7 +97,7 @@ AddUint64 (uint64_t *val, uint64_t delta)
}
uintptr_t AddUintptr (uintptr_t *, uintptr_t)
- asm ("libgo_sync.atomic.AddUintptr");
+ asm ("sync_atomic.AddUintptr");
uintptr_t
AddUintptr (uintptr_t *val, uintptr_t delta)
@@ -106,7 +106,7 @@ AddUintptr (uintptr_t *val, uintptr_t delta)
}
int32_t LoadInt32 (int32_t *addr)
- asm ("libgo_sync.atomic.LoadInt32");
+ asm ("sync_atomic.LoadInt32");
int32_t
LoadInt32 (int32_t *addr)
@@ -120,7 +120,7 @@ LoadInt32 (int32_t *addr)
}
int64_t LoadInt64 (int64_t *addr)
- asm ("libgo_sync.atomic.LoadInt64");
+ asm ("sync_atomic.LoadInt64");
int64_t
LoadInt64 (int64_t *addr)
@@ -134,7 +134,7 @@ LoadInt64 (int64_t *addr)
}
uint32_t LoadUint32 (uint32_t *addr)
- asm ("libgo_sync.atomic.LoadUint32");
+ asm ("sync_atomic.LoadUint32");
uint32_t
LoadUint32 (uint32_t *addr)
@@ -148,7 +148,7 @@ LoadUint32 (uint32_t *addr)
}
uint64_t LoadUint64 (uint64_t *addr)
- asm ("libgo_sync.atomic.LoadUint64");
+ asm ("sync_atomic.LoadUint64");
uint64_t
LoadUint64 (uint64_t *addr)
@@ -162,7 +162,7 @@ LoadUint64 (uint64_t *addr)
}
uintptr_t LoadUintptr (uintptr_t *addr)
- asm ("libgo_sync.atomic.LoadUintptr");
+ asm ("sync_atomic.LoadUintptr");
uintptr_t
LoadUintptr (uintptr_t *addr)
@@ -176,7 +176,7 @@ LoadUintptr (uintptr_t *addr)
}
void *LoadPointer (void **addr)
- asm ("libgo_sync.atomic.LoadPointer");
+ asm ("sync_atomic.LoadPointer");
void *
LoadPointer (void **addr)
@@ -190,7 +190,7 @@ LoadPointer (void **addr)
}
void StoreInt32 (int32_t *addr, int32_t val)
- asm ("libgo_sync.atomic.StoreInt32");
+ asm ("sync_atomic.StoreInt32");
void
StoreInt32 (int32_t *addr, int32_t val)
@@ -203,7 +203,7 @@ StoreInt32 (int32_t *addr, int32_t val)
}
void StoreInt64 (int64_t *addr, int64_t val)
- asm ("libgo_sync.atomic.StoreInt64");
+ asm ("sync_atomic.StoreInt64");
void
StoreInt64 (int64_t *addr, int64_t val)
@@ -216,7 +216,7 @@ StoreInt64 (int64_t *addr, int64_t val)
}
void StoreUint32 (uint32_t *addr, uint32_t val)
- asm ("libgo_sync.atomic.StoreUint32");
+ asm ("sync_atomic.StoreUint32");
void
StoreUint32 (uint32_t *addr, uint32_t val)
@@ -229,7 +229,7 @@ StoreUint32 (uint32_t *addr, uint32_t val)
}
void StoreUint64 (uint64_t *addr, uint64_t val)
- asm ("libgo_sync.atomic.StoreUint64");
+ asm ("sync_atomic.StoreUint64");
void
StoreUint64 (uint64_t *addr, uint64_t val)
@@ -242,7 +242,7 @@ StoreUint64 (uint64_t *addr, uint64_t val)
}
void StoreUintptr (uintptr_t *addr, uintptr_t val)
- asm ("libgo_sync.atomic.StoreUintptr");
+ asm ("sync_atomic.StoreUintptr");
void
StoreUintptr (uintptr_t *addr, uintptr_t val)
@@ -255,7 +255,7 @@ StoreUintptr (uintptr_t *addr, uintptr_t val)
}
void StorePointer (void **addr, void *val)
- asm ("libgo_sync.atomic.StorePointer");
+ asm ("sync_atomic.StorePointer");
void
StorePointer (void **addr, void *val)
diff --git a/libgo/go/syscall/errno.c b/libgo/go/syscall/errno.c
index 8e57811151a..d01f4c973d7 100644
--- a/libgo/go/syscall/errno.c
+++ b/libgo/go/syscall/errno.c
@@ -10,8 +10,8 @@
/* errno is typically a macro. These functions set
and get errno specific to the libc being used. */
-uintptr_t GetErrno() asm ("libgo_syscall.syscall.GetErrno");
-void SetErrno(uintptr_t) asm ("libgo_syscall.syscall.SetErrno");
+uintptr_t GetErrno() asm ("syscall.GetErrno");
+void SetErrno(uintptr_t) asm ("syscall.SetErrno");
uintptr_t
GetErrno()
diff --git a/libgo/go/syscall/signame.c b/libgo/go/syscall/signame.c
index f2ff85a9a02..63422889c33 100644
--- a/libgo/go/syscall/signame.c
+++ b/libgo/go/syscall/signame.c
@@ -11,7 +11,7 @@
#include "arch.h"
#include "malloc.h"
-String Signame (int sig) asm ("libgo_syscall.syscall.Signame");
+String Signame (int sig) asm ("syscall.Signame");
String
Signame (int sig)
diff --git a/libgo/go/syscall/wait.c b/libgo/go/syscall/wait.c
index fd7b65e2414..98ad245c2c4 100644
--- a/libgo/go/syscall/wait.c
+++ b/libgo/go/syscall/wait.c
@@ -11,7 +11,7 @@
#include <sys/wait.h>
extern _Bool Exited (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Exited.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Exited.N18_syscall.WaitStatus");
_Bool
Exited (uint32_t *w)
@@ -20,7 +20,7 @@ Exited (uint32_t *w)
}
extern _Bool Signaled (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Signaled.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Signaled.N18_syscall.WaitStatus");
_Bool
Signaled (uint32_t *w)
@@ -29,7 +29,7 @@ Signaled (uint32_t *w)
}
extern _Bool Stopped (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Stopped.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Stopped.N18_syscall.WaitStatus");
_Bool
Stopped (uint32_t *w)
@@ -38,7 +38,7 @@ Stopped (uint32_t *w)
}
extern _Bool Continued (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Continued.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Continued.N18_syscall.WaitStatus");
_Bool
Continued (uint32_t *w)
@@ -47,7 +47,7 @@ Continued (uint32_t *w)
}
extern _Bool CoreDump (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.CoreDump.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.CoreDump.N18_syscall.WaitStatus");
_Bool
CoreDump (uint32_t *w)
@@ -56,7 +56,7 @@ CoreDump (uint32_t *w)
}
extern int ExitStatus (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.ExitStatus.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.ExitStatus.N18_syscall.WaitStatus");
int
ExitStatus (uint32_t *w)
@@ -67,7 +67,7 @@ ExitStatus (uint32_t *w)
}
extern int Signal (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Signal.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Signal.N18_syscall.WaitStatus");
int
Signal (uint32_t *w)
@@ -78,7 +78,7 @@ Signal (uint32_t *w)
}
extern int StopSignal (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.StopSignal.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.StopSignal.N18_syscall.WaitStatus");
int
StopSignal (uint32_t *w)
@@ -89,7 +89,7 @@ StopSignal (uint32_t *w)
}
extern int TrapCause (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.TrapCause.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.TrapCause.N18_syscall.WaitStatus");
int
TrapCause (uint32_t *w __attribute__ ((unused)))