Skip to content

Go 1.10 support (version bump to GopherJS 1.10-1). #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Feb 26, 2018
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
fa8fb1b
Target Go 1.10 Beta 1, update version to GopherJS 1.10-wip.
dmitshur Dec 12, 2017
622f536
compiler/natives/src/runtime: Add stubs for getcallerpc, findfunc, fu…
dmitshur Dec 12, 2017
a57c082
compiler/natives/src/math: Remove Dim implementation.
dmitshur Dec 12, 2017
232d132
compiler/natives/src/time: Update for internal code reorganization.
dmitshur Dec 12, 2017
2556b29
compiler/natives/src/reflect: Remove pkgPath parameter from newName.
dmitshur Dec 12, 2017
d796bf5
compiler/natives/src/reflect: Change makechan size parameter type fro…
dmitshur Dec 12, 2017
605cc21
compiler/natives/src/syscall: Provide implementation of Exit.
dmitshur Dec 13, 2017
9d71b8d
compiler/natives/src/internal/poll: Implement semaphores.
dmitshur Dec 13, 2017
9c9c7cd
compiler/natives/src/reflect: Allow Copy from string to []byte.
dmitshur Dec 13, 2017
66c17b1
compiler/natives/src/reflect: Update mutability of non-exported embed…
dmitshur Dec 13, 2017
87f956b
compiler/natives/src/reflect: Update method indexing for non-ASCII ex…
dmitshur Dec 13, 2017
c4db7b2
WIP: Hacky fix for wrong method set order with unicode.
dmitshur Dec 15, 2017
5fab10d
compiler/natives/src/reflect: Don't skip string internalization for t…
dmitshur Dec 14, 2017
a855174
compiler/natives/src/reflect: Skip TestCallReturnsEmpty.
dmitshur Dec 14, 2017
1fb1aaa
compiler/natives/src/reflect: Return true in IsNil for implicitly con…
dmitshur Dec 14, 2017
3e6aba5
compiler/natives/src/testing: Override frameSkip to avoid runtime.Cal…
dmitshur Dec 15, 2017
8b2ca4b
compiler/natives/src/strings: Simple Builder implementation for js ar…
dmitshur Dec 15, 2017
9d5176b
compiler/natives/src/reflect: Implement throw.
dmitshur Jan 9, 2018
072e78d
Revert "compiler/natives/src/reflect: Don't skip string internalizati…
dmitshur Jan 11, 2018
c565975
WIP: Better solution for method name encoding mismatch.
dmitshur Jan 12, 2018
611259a
Target Go 1.10 Beta 2.
dmitshur Jan 12, 2018
7e7b29d
compiler/natives/src/runtime: Stop using sys.DefaultGoroot.
dmitshur Jan 12, 2018
aed37b5
WIP: Try a fix for Linux os.Exit stalls.
dmitshur Jan 12, 2018
1df2504
compiler/natives/src/bytes: Skip all tests that rely on syscall.Getpa…
dmitshur Jan 12, 2018
7aa01e3
Target Go 1.10 RC 1.
dmitshur Jan 25, 2018
397649b
Target Go 1.10 RC 2.
dmitshur Feb 9, 2018
7c7c569
tests: Triage test failures new to Go 1.10.
dmitshur Feb 9, 2018
8fc1f3c
build: Exclude linux-specific crypto/rand tests.
dmitshur Feb 9, 2018
4bff1ed
doc: Document partially supported packages in more detail.
dmitshur Feb 16, 2018
446447a
compiler/natives/src/strings: Skip optional pointer manipulation.
dmitshur Feb 16, 2018
12f65e2
compiler/natives/src/io: Skip TestMultiWriterSingleChainFlatten.
dmitshur Feb 16, 2018
0bd5ec1
compiler/natives/src/encoding/gob: Skip TestTypeRace.
dmitshur Feb 16, 2018
7729020
Target Go 1.10 final.
dmitshur Feb 9, 2018
5e5d2d2
Revert "compiler/natives/src/reflect: Return true in IsNil for implic…
dmitshur Feb 16, 2018
28e102c
compiler/natives/src/reflect: Override Value.assignTo method, drop v.…
dmitshur Feb 16, 2018
88dc1af
Revert "WIP: Hacky fix for wrong method set order with unicode."
dmitshur Feb 25, 2018
c7eb1e9
compiler/natives: Regenerate.
dmitshur Dec 12, 2017
4ebbd33
compiler: Bump version to GopherJS 1.10-1.
dmitshur Feb 25, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
compiler/natives/src/reflect: Update mutability of non-exported embed…
…ded fields.

Update for upstream changes.

Related to golang/go@6471ace.
Related to golang/go@d349fa2.

Fixes:

	=== RUN   TestCallPanic
	--- FAIL: TestCallPanic (0.01s)

	/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/
	test.043844921:1412
	          throw new Error(msg);
	                ^
	Error: did not panic
  • Loading branch information
dmitshur committed Feb 16, 2018
commit 66c17b11e4b071348e97a636fa3d9d115651b41c
20 changes: 9 additions & 11 deletions compiler/natives/src/reflect/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ func cvtDirect(v Value, typ Type) Value {
default:
panic(&ValueError{"reflect.Convert", k})
}
return Value{typ.common(), unsafe.Pointer(val.Unsafe()), v.flag&(flagRO|flagIndir) | flag(typ.Kind())}
return Value{typ.common(), unsafe.Pointer(val.Unsafe()), v.flag.ro() | v.flag&flagIndir | flag(typ.Kind())}
}

func Copy(dst, src Value) int {
Expand Down Expand Up @@ -698,7 +698,7 @@ func makeMethodValue(op string, v Value) Value {
fv := js.MakeFunc(func(this *js.Object, arguments []*js.Object) interface{} {
return js.InternalObject(fn).Call("apply", rcvr, arguments)
})
return Value{v.Type().common(), unsafe.Pointer(fv.Unsafe()), v.flag&flagRO | flag(Func)}
return Value{v.Type().common(), unsafe.Pointer(fv.Unsafe()), v.flag.ro() | flag(Func)}
}

func (t *rtype) pointers() bool {
Expand Down Expand Up @@ -928,7 +928,7 @@ func (v Value) Elem() Value {
return Value{}
}
typ := reflectType(val.Get("constructor"))
return makeValue(typ, val.Get("$val"), v.flag&flagRO)
return makeValue(typ, val.Get("$val"), v.flag.ro())

case Ptr:
if v.IsNil() {
Expand Down Expand Up @@ -1049,8 +1049,7 @@ func (v Value) Index(i int) Value {
panic("reflect: array index out of range")
}
typ := tt.elem
fl := v.flag & (flagRO | flagIndir | flagAddr)
fl |= flag(typ.Kind())
fl := v.flag&(flagIndir|flagAddr) | v.flag.ro() | flag(typ.Kind())

a := js.InternalObject(v.ptr)
if fl&flagIndir != 0 && typ.Kind() != Array && typ.Kind() != Struct {
Expand All @@ -1068,8 +1067,7 @@ func (v Value) Index(i int) Value {
}
tt := (*sliceType)(unsafe.Pointer(v.typ))
typ := tt.elem
fl := flagAddr | flagIndir | v.flag&flagRO
fl |= flag(typ.Kind())
fl := flagAddr | flagIndir | v.flag.ro() | flag(typ.Kind())

i += s.Get("$offset").Int()
a := s.Get("$array")
Expand All @@ -1086,9 +1084,9 @@ func (v Value) Index(i int) Value {
if i < 0 || i >= len(str) {
panic("reflect: string index out of range")
}
fl := v.flag&flagRO | flag(Uint8)
fl := v.flag.ro() | flag(Uint8) | flagIndir
c := str[i]
return Value{uint8Type, unsafe.Pointer(&c), fl | flagIndir}
return Value{uint8Type, unsafe.Pointer(&c), fl}

default:
panic(&ValueError{"reflect.Value.Index", k})
Expand Down Expand Up @@ -1254,7 +1252,7 @@ func (v Value) Slice(i, j int) Value {
panic("reflect.Value.Slice: slice index out of bounds")
}

return makeValue(typ, js.Global.Call("$subslice", s, i, j), v.flag&flagRO)
return makeValue(typ, js.Global.Call("$subslice", s, i, j), v.flag.ro())
}

func (v Value) Slice3(i, j, k int) Value {
Expand Down Expand Up @@ -1286,7 +1284,7 @@ func (v Value) Slice3(i, j, k int) Value {
panic("reflect.Value.Slice3: slice index out of bounds")
}

return makeValue(typ, js.Global.Call("$subslice", s, i, j, k), v.flag&flagRO)
return makeValue(typ, js.Global.Call("$subslice", s, i, j, k), v.flag.ro())
}

func (v Value) Close() {
Expand Down