diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-05-14 22:08:42 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-05-14 22:08:42 +0000 |
commit | f3ab5720f7ce7835a905e6783b5b6720676331fb (patch) | |
tree | b119ee23a08a92b43632e3c7e227b3862c869fba /libgo/go | |
parent | 517f1b3430f929a25694d29dc787ec33e2cbd47f (diff) | |
download | gcc-f3ab5720f7ce7835a905e6783b5b6720676331fb.zip gcc-f3ab5720f7ce7835a905e6783b5b6720676331fb.tar.gz gcc-f3ab5720f7ce7835a905e6783b5b6720676331fb.tar.bz2 |
libgo: Use -fgo-pkgpath.
From-SVN: r187485
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/bytes/indexbyte.c | 4 | ||||
-rw-r--r-- | libgo/go/encoding/xml/marshal_test.go | 2 | ||||
-rw-r--r-- | libgo/go/html/template/escape_test.go | 2 | ||||
-rw-r--r-- | libgo/go/reflect/all_test.go | 2 | ||||
-rw-r--r-- | libgo/go/regexp/all_test.go | 3 | ||||
-rw-r--r-- | libgo/go/regexp/exec_test.go | 22 | ||||
-rw-r--r-- | libgo/go/regexp/export_test.go | 15 | ||||
-rw-r--r-- | libgo/go/regexp/find_test.go | 4 | ||||
-rw-r--r-- | libgo/go/sync/atomic/atomic.c | 46 | ||||
-rw-r--r-- | libgo/go/syscall/errno.c | 4 | ||||
-rw-r--r-- | libgo/go/syscall/signame.c | 2 | ||||
-rw-r--r-- | libgo/go/syscall/wait.c | 18 |
12 files changed, 72 insertions, 52 deletions
diff --git a/libgo/go/bytes/indexbyte.c b/libgo/go/bytes/indexbyte.c index 8213b3e..8986d10 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 b6978a1..6f0ecfc 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 ce12c17..6670be9 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 'f' 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 'f' 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 c35dc26..e946c0a 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 f7b41a6..39a28df 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 e668574..a84bedc 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 0000000..25080ad --- /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 e07eb7d..2593016 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 e5de5ee..14bc789 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 8e57811..d01f4c9 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 f2ff85a..6342288 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 fd7b65e..98ad245 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))) |