diff options
author | Ian Lance Taylor <iant@google.com> | 2015-01-15 00:27:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-01-15 00:27:56 +0000 |
commit | f8d9fa9e80b57f89e7877ce6cad8a3464879009b (patch) | |
tree | 58a1724fee16d2b03c65678c4dd9b50bb97137a9 /libgo/go/reflect/makefunc.go | |
parent | 6bd3f109d8d8fa58eeccd6b3504721b4f20c00c2 (diff) | |
download | gcc-f8d9fa9e80b57f89e7877ce6cad8a3464879009b.zip gcc-f8d9fa9e80b57f89e7877ce6cad8a3464879009b.tar.gz gcc-f8d9fa9e80b57f89e7877ce6cad8a3464879009b.tar.bz2 |
libgo, compiler: Upgrade libgo to Go 1.4, except for runtime.
This upgrades all of libgo other than the runtime package to
the Go 1.4 release. In Go 1.4 much of the runtime was
rewritten into Go. Merging that code will take more time and
will not change the API, so I'm putting it off for now.
There are a few runtime changes anyhow, to accomodate other
packages that rely on minor modifications to the runtime
support.
The compiler changes slightly to add a one-bit flag to each
type descriptor kind that is stored directly in an interface,
which for gccgo is currently only pointer types. Another
one-bit flag (gcprog) is reserved because it is used by the gc
compiler, but gccgo does not currently use it.
There is another error check in the compiler since I ran
across it during testing.
gotools/:
* Makefile.am (go_cmd_go_files): Sort entries. Add generate.go.
* Makefile.in: Rebuild.
From-SVN: r219627
Diffstat (limited to 'libgo/go/reflect/makefunc.go')
-rw-r--r-- | libgo/go/reflect/makefunc.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libgo/go/reflect/makefunc.go b/libgo/go/reflect/makefunc.go index eb4589c..276be26 100644 --- a/libgo/go/reflect/makefunc.go +++ b/libgo/go/reflect/makefunc.go @@ -79,7 +79,7 @@ func MakeFunc(typ Type, fn func(args []Value) (results []Value)) Value { ffi: ffi, } - return Value{t, unsafe.Pointer(&impl), flag(Func<<flagKindShift) | flagIndir} + return Value{t, unsafe.Pointer(&impl), flag(Func) | flagIndir} } // makeFuncStub is an assembly function that is the code half of @@ -103,8 +103,8 @@ func makeMethodValue(op string, v Value) Value { // Ignoring the flagMethod bit, v describes the receiver, not the method type. fl := v.flag & (flagRO | flagAddr | flagIndir) - fl |= flag(v.typ.Kind()) << flagKindShift - rcvr := Value{v.typ, v.ptr /* v.scalar, */, fl} + fl |= flag(v.typ.Kind()) + rcvr := Value{v.typ, v.ptr, fl} // v.Type returns the actual type of the method value. ft := v.Type().(*rtype) @@ -134,7 +134,7 @@ func makeMethodValue(op string, v Value) Value { fv.code, fv.ffi = makeFuncFFI(ftyp, fv.call) } - return Value{ft, unsafe.Pointer(&fv), v.flag&flagRO | flag(Func)<<flagKindShift | flagIndir} + return Value{ft, unsafe.Pointer(&fv), v.flag&flagRO | flag(Func) | flagIndir} } // makeValueMethod takes a method function and returns a function that @@ -169,7 +169,7 @@ func makeValueMethod(v Value) Value { impl.code, impl.ffi = makeFuncFFI(ftyp, impl.call) } - return Value{t, unsafe.Pointer(&impl), flag(Func<<flagKindShift) | flagIndir} + return Value{t, unsafe.Pointer(&impl), v.flag&flagRO | flag(Func) | flagIndir} } // Call the function represented by a makeFuncImpl. |