Skip to content
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

syscall/js: expose a scope argument in JS interop #56085

Closed
wants to merge 287 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
161eb4a
cmd/compile: combine masking and zero extension on riscv64
4a6f656c Sep 3, 2022
b4e0876
cmd/compile: convert SLT/SLTU with constant into immediate form on ri…
4a6f656c Sep 4, 2022
034b1dd
cmd/compile: fold negation into subtraction on riscv64
4a6f656c Sep 9, 2022
257e194
internal/coverage: minor code cleanups
thanm Oct 10, 2022
d68827f
os/exec: remove protection against a duplicate Close on StdinPipe
Oct 5, 2022
22b181b
go/parser: simplify code (cleanup)
ideapark May 16, 2022
582c169
cmd/go: do not exit with non-zero code from go list -e -export
matloob Sep 30, 2022
a890328
math/big: error on buffer length overflow in Rat.GobDecode
ianlancetaylor Oct 11, 2022
593f083
cmd/go: set dependency go versions for go install --mod=readonly mod@…
matloob Oct 6, 2022
6ea556d
go/types: replace invalid(AST|Arg|Op) with errorf and message prefix
griesemer Oct 10, 2022
69d7626
cmd/compile/internal/types2: adjust errorcalls_test and apply it
griesemer Oct 10, 2022
78ffc51
go/types: add errorcalls_test, apply it, and fix errorf call sites
griesemer Oct 10, 2022
305558b
all: prevent fakePC overflow on 386 in libfuzzer mode
cuonglm Oct 11, 2022
8514375
cmd/{cover,covdata}: minor code cleanups
thanm Oct 10, 2022
d2a561b
cmd/go: add Context parameter to download function
Abirdcfly Jul 26, 2022
62260a0
net/http: fix some test flakes caused by test refactoring
neild Oct 12, 2022
997b18e
runtime: fix invalid pointer in windows/arm64 badsignal2
billziss-gh Oct 12, 2022
507d5f9
os: use the correct constant for P_PID on NetBSD
Oct 12, 2022
2b1a661
runtime: factor out mheap span initialization
mknyszek Aug 13, 2022
998cf57
runtime: factor out GC assist credit accounting
mknyszek Aug 13, 2022
14529b4
runtime: make (*mheap).sysAlloc more general
mknyszek Sep 20, 2022
22641d0
runtime: add safe arena support to the runtime
mknyszek Aug 12, 2022
a8c628f
arena: add experimental arena package
mknyszek Aug 12, 2022
36ef574
misc/cgo/test: add asan and msan arena tests
mknyszek Sep 19, 2022
5583cb5
os/signal: document behavior of SIGPIPE on non-Go thread
ianlancetaylor Oct 11, 2022
3f18c04
go/types, types2: remove need for invalidAST prefix in error calls
griesemer Oct 10, 2022
86100a7
go/types, types2: better error if there's a field with the name of a …
griesemer Oct 5, 2022
1776909
debug/elf: validate phentsize and shentsize
ianlancetaylor Oct 10, 2022
3a091df
test: update test/run.go and some tests to use importcfg
matloob Sep 21, 2022
9d80f7b
go/types, types2: optimize instance lookup in LookupFieldOrMethod
findleyr Aug 13, 2022
4723f79
go/types: remove mode argument from the pkgFiles helper
findleyr Oct 13, 2022
980b454
crypto/x509: add blank line before package declaration
ideapark Oct 8, 2022
4885020
debug: add top level security docs for dwarf, elf, macho, pe, and pla…
rolandshoemaker Sep 28, 2022
b3c3448
encoding/gob: note pacakge not covered by security policy
rolandshoemaker Oct 13, 2022
4c6b210
cmd/link: don't reset variable size when handling -X flag
cherrymui Oct 12, 2022
535eb7f
os/exec: set traceback to "system" in TestContextCancel
Oct 12, 2022
ac2264d
os/exec: reduce arbitrary sleeps in TestWaitid
Oct 12, 2022
3430014
cmd/go: avoid setting mod=vendor in workspace mode
matloob Oct 5, 2022
e200ebf
cmd/link: define ELF .note section on FreeBSD
dmgk Jun 15, 2022
fac2eb8
os: split wait6 syscall wrapper into per-platform files
Oct 12, 2022
cb0c677
image/png: optimise RGBA encoding
alx-ef Oct 10, 2022
fd06770
runtime: add msan support on freebsd/amd64
dmgk Jun 8, 2022
8ceca03
cmd/go: enable -msan on freebsd/amd64
dmgk Jun 8, 2022
a3fa036
cmd/dist, misc/cgo/testsanitizers: enable msan tests on freebsd/amd64
dmgk Jun 8, 2022
a39054f
cmd/compile,cmd/link,runtime: add start line numbers to func metadata
prattmic Sep 7, 2022
4ef48e7
runtime/pprof: set Function.start_line field
prattmic Sep 30, 2022
7940a5f
go/build: use tabs consistently in deps test rules
rsc Oct 4, 2022
d980d15
go/build: simplify coverage rules in deps_test
rsc Oct 4, 2022
a6f5b3c
os/signal: rewrite TestTerminalSignal without bash
prattmic Oct 4, 2022
05e09ca
cmd/go/internal/modload: return error when tidyRoots fail
ianwoolf Aug 31, 2022
ff8b089
net/http: skip TestTransportPersistConnLeak/h2
neild Oct 14, 2022
be89974
debug/elf: fix inccorrect value in COMPRESS_ZLIB string name
znkr Oct 14, 2022
605267f
cmd/link: return correct default linker for the platform
dmgk Sep 22, 2022
3ff54ce
cmd/dist: drop support for pre-compiled test binaries
aclements Feb 9, 2022
bd54586
runtime/internal/startlinetest: add NO_LOCAL_POINTERS macro to asm fu…
cherrymui Oct 14, 2022
8bb5b3e
misc/cgo/testasan: drop test
aclements Oct 14, 2022
1cfcced
os/signal: add missing newlines to TestTerminalSignal
prattmic Oct 14, 2022
2b2a965
reflect: add Value.Grow
dsnet Mar 2, 2022
1207ddc
runtime: remove redundant conversion
kortschak Oct 16, 2022
da3ee53
cmd/link/internal/s390: return comparison directly
cuiweixie Sep 29, 2022
a6b1217
flag: remove "// BUG" comment
zamicol Oct 14, 2022
01dccea
reflect: panic when Value.Equal using two non-comparable values
hopehook Oct 7, 2022
f41900a
cmd/compile: split 3 operand LEA in late lower pass
wdvxdr1123 Oct 7, 2022
48a8793
cmd/compile: move {SHL,SHR,SAR}X rules to late lower pass
wdvxdr1123 Oct 7, 2022
aa41691
misc/cgo/testsigfwd: delete unused code
aclements Sep 15, 2022
93b850a
misc/cgo/testsigfwd: move to runtime/testprog/testprogcgo
aclements Oct 14, 2022
93ab6fd
runtime: improve coverage of TestCgoSigfwd
aclements Oct 14, 2022
408a6bd
runtime: run TestCgoSigfwd on all Unix platforms
aclements Oct 14, 2022
a5b48a1
misc/cgo/fortran: convert to Go test
aclements Oct 14, 2022
a4b78ca
os/signal: pass *int32 to ioctl that expects pid_t
ianlancetaylor Oct 14, 2022
e292db5
cmd/compile: fix position of fake receivers; be more careful in logopt
dr2chase Oct 14, 2022
ba5b7f2
runtime/coverage: skip more tests in short mode
thanm Oct 17, 2022
a3b436d
cmd/compile: fix a typo in comment
ezz-no Oct 17, 2022
5b4d393
internal/fuzz: write shorter testdata corpus file names
rsc Oct 17, 2022
4dfb578
all: use Go 1.17.13 for bootstrap
rsc Oct 6, 2022
38052b7
cmd/go: fix TestScript/test_fuzz_mutate_crash for shorter fuzz names
rsc Oct 17, 2022
2dbcff5
errors: add test for Join
lcr2000 Oct 17, 2022
ead0275
runtime/internal/atomic: add write barrier-enabled pointer atomics
rsc Oct 17, 2022
2465eba
internal/godebug: remove dependency on os
rsc Oct 17, 2022
2abbd49
math/rand: refactor to delay allocation of global source
rsc Oct 4, 2022
623eea7
runtime: avoid unsafe.{Slice,String} in debuglog
prattmic Oct 17, 2022
05aa0a9
runtime: replace all uses of CtzXX with TrailingZerosXX
fengyoulin Oct 5, 2022
93debe7
cmd/compile: special case coverage vars in pkg init order
thanm Oct 18, 2022
67fdf18
cmd/go: fix longtest builder after runtime/internal/atomic
rsc Oct 18, 2022
e398616
go,cmd,internal: update to anticipate missing targets and .a files
matloob Sep 21, 2022
8fcb28e
go/types: migrate importer usage in tests
matloob Oct 12, 2022
8543420
go/types, types2: add test verifying types/values of type parameter "…
griesemer Oct 18, 2022
4eea1c8
go/types: remove pkgForMode in favor of pkgFor (cleanup)
griesemer Oct 18, 2022
6be681b
runtime: always keep global reference to mp until mexit completes
prattmic Oct 18, 2022
6061b3b
runtime: throw in unreachable exitThread
prattmic Oct 18, 2022
f9b74e4
go/internal/gcimporter,cmd/compile/internal/importer: skip tests that…
Oct 19, 2022
864cc11
go/internal/gcimporter,cmd/compile/internal/importer: use testenv.Mus…
Oct 19, 2022
3c892b4
runtime: ignore exceptions from non-Go threads on windows arm/arm64
qmuntal Oct 14, 2022
e482314
go/types, types2: remove global goVersion flag (cleanup)
griesemer Oct 19, 2022
7a2def3
go/types: remove special handling for .go1 files in tests
griesemer Oct 19, 2022
391d0d6
go/types, types2: simplify test setup in a couple of places (cleanup)
griesemer Oct 18, 2022
f06a90d
go/types, types2: consolidate helper functions for tests (cleanup)
griesemer Oct 18, 2022
55626f8
go/types, types2: replace typecheck with mustTypecheck almost everywh…
griesemer Oct 19, 2022
fbc88b9
go/build: remove stale reference to ioutil.ReadDir
mvdan Oct 4, 2022
5b06ac3
runtime: Add vdso on freebsd/riscv64
MikaelUrankar Sep 19, 2022
732252c
cmd/go/internal/modload: update TestQueryImport to pass with tagged v…
Oct 20, 2022
4730a9d
cmd/compile/internal/ssa: wire up late lower block function
4a6f656c Oct 19, 2022
d0a1128
time: implement strict RFC 3339 during marshal and unmarshal
dsnet Sep 28, 2022
6e1c91d
runtime: fix TestVectoredHandlerExceptionInNonGoThread
qmuntal Oct 20, 2022
84daf4a
cmd/compile: in compiler errors, print more digits for floats close t…
randall77 Oct 13, 2022
859b9f8
cmd/compile: copy blank parameter node when substituting function type
cherrymui Oct 14, 2022
a74a381
encoding/gob: support large slices in slice decode helpers
ianlancetaylor Oct 18, 2022
014a1d0
runtime/race: add GOAMD64=v3 version of linux race .syso
randall77 Oct 20, 2022
63d8118
crypto/sha256, cmd/internal/notsha256: improve PPC64 sha256
pmur May 12, 2022
0fec037
runtime: skip TestVectoredHandlerExceptionInNonGoThread
qmuntal Oct 21, 2022
803819a
go/scanner: use constant name rather than its value (cleanup)
ideapark May 13, 2022
9b71b45
runtime: gofmt
cherrymui Oct 20, 2022
2d27e82
math/bits: note that functions here may be compiler intrinsics
ncw Oct 19, 2022
731f12f
cmd/go: don't print cached output for non-build list commands
matloob Oct 21, 2022
02a1f14
cmd/cover: fix problem with race mode and inlining
thanm Oct 21, 2022
5194e10
cmd/cover: fix buglets in counter insertion
thanm Oct 21, 2022
a55817e
net/netip: add IPv6LinkLocalAllRouters and IPv6Loopback
mdlayher Jun 15, 2022
b5a26db
cmd/go: correct staleness for packages in modules
matloob Oct 21, 2022
3e28ecb
cmd/internal/ssa: correct references to _gen folder
johanbrandhorst Oct 20, 2022
39f6e48
cmd/compile: use correct type in riscv64 late lower pass
wdvxdr1123 Oct 19, 2022
36a3bdd
internal/abi, internal/buildcfg: always enable register ABI on riscv64
wdvxdr1123 Oct 17, 2022
881a5b7
crypto/ed25519: implement Ed25519ph in Sign and VerifyWithOptions
FiloSottile May 5, 2022
6695343
doc/go1.20: go version supports non-executable Go binaries
qmuntal Oct 11, 2022
27cde35
runtime: fix usleep on linux/PPC64
pmur Oct 20, 2022
8c2f7cd
go/types, types2: implement alternative comparable semantics
griesemer Oct 19, 2022
e76cd98
crypto/tls,crypto/x509: clarify certificate ownership
rolandshoemaker Aug 31, 2022
8e45992
cmd/compile: enable lateLower pass on PPC64
pmur Oct 12, 2022
c822a49
time: optimize appendInt and appendNanos
dsnet Sep 25, 2022
6bbb239
cmd/compile: fix PPC64 latelower enablement
pmur Oct 24, 2022
61e7dab
cmd/go: extract the TestScript engine into a standalone package
Jul 20, 2022
ca2b6d2
cmd/go/internal/script: remove special-case escaping logic for $WORK
Aug 18, 2022
4754d5f
cmd/go: replace the '[exec:git]' condition with a '[git]' condition
Jul 28, 2022
b8731e5
cmd/go/internal/script: define GOOS, GOARCH, and compiler conditions …
Jul 28, 2022
782714e
cmd/go: replace the 'addcrlf' script command with a more general 'rep…
Aug 31, 2022
872c4af
cmd/go: fix script conditions that require cgo
Oct 24, 2022
cfe4d02
os/exec: add the Cancel and WaitDelay fields
Apr 21, 2022
12dfc94
cmd/go: redirect vcs-test.golang.org repo URLs to a test-local server
Jul 30, 2022
bbbbd58
cmd/go: reroute vcs-test.golang.org HTTPS requests to the test-local …
Aug 17, 2022
427d7c9
cmd/go: add Subversion support to the local vcstest server
Sep 1, 2022
4cd610e
runtime/internal/syscall: convert PPC64 Syscall6 to ABIInternal
pmur Oct 18, 2022
ebb0b87
cmd/go: make vcstest repo scripts compatible with old Git versions
Oct 25, 2022
c47e72d
cmd/go: split quotes in GOFLAGS same as in other env vars
rsc Oct 19, 2022
93465c5
cmd/go: make vcstest repo scripts compatible with old Mercurial versions
Oct 25, 2022
61949dd
math/rand: auto-seed global source
rsc Oct 4, 2022
c05bf1e
debug/elf: use saferio.SliceCap when decoding ELF sections
ZekeLu Oct 24, 2022
21b8e81
cmd/go: show an error when a package in a module conflicts with one i…
cuiweixie Sep 25, 2022
2712186
cmd/compile: add support for alternative comparable semantics
griesemer Oct 20, 2022
5540843
all: update golang.org/x/tools to 8166dca1cec9
wdvxdr1123 Oct 24, 2022
af598c9
all: delete riscv64 non-register ABI fallback path
wdvxdr1123 Oct 17, 2022
a422dbb
runtime: fix a few function names on comments
cuishuang Oct 3, 2022
e987b19
crypto/x509: delete trailing spaces
rsc Oct 26, 2022
5fa28cc
cmd: remove redundant _
cuishuang Oct 1, 2022
76a61d2
runtime/internal/syscall: use ABIInternal for Syscall6 on riscv64
wdvxdr1123 Oct 17, 2022
40b550c
cmd/go/internal/script: use the Cancel and WaitDelay fields for subpr…
Oct 25, 2022
b19c892
go/types, types2: use correct shift value when typechecking constant …
griesemer Oct 26, 2022
1a51c19
all: remove uses of rand.Seed
rsc Oct 25, 2022
5fc9a4c
crypto/x509: respect GODEBUG changes for allowing SHA1 certificates
rsc Oct 26, 2022
cb34c4c
flag: clarify that the main func at pkg.go.dev is part of a testing s…
ZekeLu Oct 25, 2022
b2a9a18
cmd/compile: print readable function name in error message
doujiang24 Oct 26, 2022
e5e2628
cmd/internal/obj/ppc64: generate big uint32 values in register
pmur Oct 21, 2022
2955168
testing: fix many test2json inaccuracies
rsc Oct 13, 2022
e25ad05
runtime: add missing closing curly brace in runtime corruption error …
bradfitz Oct 26, 2022
5178378
debug/elf: guard access to File.gnuVersym
ZekeLu Oct 26, 2022
efedc5e
cmd/internal/obj/arm64: remove AMOVBU from optab
Oct 25, 2022
c30bce7
math/rand: deprecate Read
hopehook Sep 30, 2022
f0d2f50
runtime: add wasm bulk memory operations
garet90 Oct 22, 2022
a03fa9b
hash/crc64: use slicing by 8 when the size is greater or equal than 2k
RuinanSun Oct 18, 2022
f33b0ec
cmd/compile: recognize when the result of append has a constant length
randall77 Oct 27, 2022
a8d2830
cmd/dist: produce intermedate .a files in a temporary location
matloob Sep 28, 2022
cef0c72
cmd/internal/obj/arm64: optimize ADRP+ADD+LD/ST to ADRP+LD/ST(offset)
Jul 11, 2022
4d8365f
cmd/compile: Enables PGO in Go and performs profile-guided inlining
Sep 9, 2022
9c07eac
cmd/go: don't substitute '$WORK' for work directory in -x heredocs
matloob Oct 28, 2022
4c36cdf
cmd/compile: emit DIEs for zero sized variables
aarzilli Sep 23, 2022
3890ee6
os: don't include DirFS argument in DirFS errors
ianlancetaylor Oct 28, 2022
24a8fb1
testing: change Error to Errorf in comment
ianlancetaylor Oct 28, 2022
77dff4f
cmd/go: don't install most GOROOT .a files in pkg
matloob Sep 21, 2022
69b4e9e
math/big: improve performance of Binomial
Oct 24, 2022
d9997f9
cmd/go, cmd/cgo: support older versions of gccgo that lack cgo.Incomp…
ianlancetaylor Oct 28, 2022
2bc69c8
runtime/internal/atomic: enable atomic 64bit types for all functions …
abner-chenc Jun 27, 2022
7738bd8
cmd/compile: add missing tail calls flag for linux/loong64
abner-chenc Jun 28, 2022
929ad65
cmd/compile: enable address folding for global symbols of shared library
Oct 25, 2022
f28e44a
internal/bytealg: fix bug in index function for ppc64le/power9
Oct 28, 2022
c237664
cmd/compile/internal/types2: fix tests on js/wasm
Oct 31, 2022
877b1ba
cmd/api: skip tests when 'os/exec' is supported but 'go build' is not
Oct 31, 2022
61569b0
sync: use atomic.Pointer for entry
changkun Sep 20, 2022
06000e7
go/types: avoid formatting unneeded causes
adonovan Oct 28, 2022
d9131c9
encoding/xml: reduce depth limit on wasm
rsc Oct 31, 2022
f4ec08c
net/http: deflake TestCancelRequestWhenSharingConnection
ZekeLu Oct 31, 2022
727bac1
cmd/compile/internal/test: clean up TestPGOIntendedInlining
prattmic Oct 28, 2022
a21503b
cmd/internal/obj: cleanup linkgetlineFromPos
prattmic Oct 28, 2022
cc1f5e4
internal/testenv: add CommandContext and Command
Oct 26, 2022
f91592a
internal/testenv: remove RunWithTimout
Oct 26, 2022
cbfe68a
cmd/compile/internal/pgo: remove ConvertLine2Int
prattmic Oct 28, 2022
04511f3
os: in TestDirFS only check returned path for unexpected string
ianlancetaylor Oct 31, 2022
a28a409
cmd/compile/internal/pgo: remove most global state
prattmic Oct 28, 2022
cdfba09
cmd/compile: add rule for post-decomposed growslice optimization
randall77 Oct 28, 2022
fc15a87
cmd/compile: separate out sparsemaps that need position
randall77 Oct 21, 2022
55ae669
cmd/compile: add cache of sizeable objects so they can be reused
randall77 Oct 18, 2022
9ec4ab4
cmd/go: add move test for goroot
matloob Oct 25, 2022
155155e
cmd/compile: add ability to indicate 'concurrentOk' for debug flags
dr2chase Oct 26, 2022
7364124
internal/testenv: move helpers related to os/exec to a separate file
Oct 31, 2022
8b2b4b8
net: use libc (not cgo) for DNS on macOS
rsc Oct 28, 2022
a4164df
cmd/{go,cover}: fix for -coverprofile path capture with local pkg
thanm Oct 26, 2022
c59815a
cmd/compile: revise inliner coverage tweaks (again)
thanm Oct 28, 2022
0960cb5
cmd/go: revamp and simplify logic in PrepareForCoverageBuild
thanm Oct 26, 2022
a20c58b
cmd/cover: fix buglet causing differences in -m output
thanm Oct 28, 2022
f6b1684
testing: print names of running tests on test timeout
rsc Oct 28, 2022
2052453
syscall, os/exec: reject environment variables containing NULs
neild Oct 18, 2022
a824943
runtime: skip TestArenaCollision on failed reservation
aclements Nov 1, 2022
c5c9dbe
runtime: fix missing error print in TestCgoSigfwd
aclements Oct 17, 2022
8335462
test/bench/go1: eliminate start-up time
aclements Sep 16, 2022
de69284
go/build: ignore files by extension before matching on name
ianlancetaylor Oct 29, 2022
108df66
cmd/dist: fix a variable scope bug:
matloob Nov 1, 2022
2f36a3f
internal/testenv: adjust timeout calculations in CommandContext
Nov 1, 2022
8af4aea
runtime: check for ErrWaitDelay in runBuiltTestProg
Nov 1, 2022
e2c215c
cmd/go/internal/vcweb: increase script WaitDelay by 30x
Nov 1, 2022
e62c38d
cmd/compile/internal/pgo: remove ListOfHotCallSites
prattmic Oct 31, 2022
78b7488
net: drop unused _C_ai_addrlen function
ianlancetaylor Nov 1, 2022
d704986
net: support no-reload option for unix go resolver
mateusz834 Nov 1, 2022
9806f3f
testing: implement -cpu and -count for fuzz tests
rsc Oct 17, 2022
6d34f50
cmd/link: remove unnecessary use of sync.Once alongside sync.Mutex
rsc Oct 27, 2022
a203e03
math/big: add benchmark of Exp with large modulus
rsc Jul 27, 2022
88f7be9
math/big: use Montgomery for z.Exp(x, y, m) even for even m
rsc Jul 27, 2022
ecb8a8d
cmd/compile: renovate GOSSAHASH
dr2chase Oct 14, 2022
3e3e2a6
regexp: add ErrLarge error
cuiweixie Oct 22, 2022
27b6852
go/parser: add missing parenthesis in a comment
ishwar00 Nov 2, 2022
06a458a
net: store IPv4 returned from cgo resolver as 4-byte slice net.IP
ZekeLu Oct 27, 2022
b12ff68
text/template: correct assignment, not declaration, in range
ianlancetaylor Oct 31, 2022
6662269
cmd/api: make check pickier about api/*.txt
rsc Sep 13, 2022
6e3ca93
README: update from CC-BY-3.0 to CC-BY-4.0
rsc Aug 16, 2022
df205e8
cmd/compile: use edge weights to decide inlineability in PGO
cherrymui Nov 1, 2022
a56b114
cmd/go: add -C flag
rsc Aug 5, 2022
9523469
os/exec: allow open descriptors to be closed during TestPipeLookPathLeak
Nov 2, 2022
efa413c
crypto/ecdh: update ECDH docs and add tests for edge cases
FiloSottile Aug 25, 2022
26660fc
all: fix a few function names on comments
cuishuang Nov 3, 2022
fa87336
crypto/x509: create CRLs with Issuer.RawSubject
cipherboy Nov 2, 2022
0cd54fa
cmd/compile: remove issueSpill
liu-xuewen Nov 2, 2022
52032d9
cmd/go/internal/script: Cmp() should not perform environment substitu…
qmuntal Nov 3, 2022
cd4f24d
cmd/go/internal/vcs: also check file mode when identifying VCS root
ZekeLu Nov 2, 2022
b1bc181
cmd/go: update TestScripts/svn to not depend on TZ database
qmuntal Nov 2, 2022
2aa03b4
math/big: add PCALIGN to addMulVVW asm on ppc64x
laboger Nov 1, 2022
ee59ad1
cmd/compile: use CDF to determine PGO inline threshold
cherrymui Nov 1, 2022
9c09025
cmd/objdump: skip PIE test when cgo is disabled and PIE needs externa…
cherrymui Nov 3, 2022
6abb659
cmd/compile: add debug-hash flag for fused-multiply-add
dr2chase Oct 21, 2022
d294e56
crypto/x509: switch test to ParseRevocationList
cipherboy Nov 3, 2022
9a7acab
runtime: support control flow guard on windows/amd64
qmuntal Oct 2, 2022
a9074ab
net: do not modify shared test variable in TestDNSReadConfig
mateusz834 Nov 3, 2022
0cb2f82
cmd/compile: if GOGC is not set, temporarily boost it for rapid start…
dr2chase Sep 28, 2022
f172f51
Integrate changes from CR
romaindoumenc Nov 3, 2022
5571f31
Merge branch 'golang:master' into master
romaindoumenc Nov 3, 2022
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
3 changes: 2 additions & 1 deletion misc/wasm/wasm_exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
globalThis.Go = class {
constructor() {
this.argv = ["js"];
this.env = {};
this.scope = globalThis;
this.exit = (code) => {
if (code !== 0) {
console.warn("exit code:", code);
Expand Down Expand Up @@ -129,6 +129,7 @@
}

const id = this.mem.getUint32(addr, true);
console.log("load value at addr", addr, id, this._values[id] == globalThis);
return this._values[id];
}

Expand Down
6 changes: 6 additions & 0 deletions src/syscall/js/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ func Global() Value {
return valueGlobal
}

// Scope returns the JavaScript object attached to the Go class.
// If nothing has been explicitely set, this is usually "window", or "global".
func Scope() Value {
return jsGo.Get("scope")
}

// ValueOf returns x as a JavaScript value:
//
// | Go | JavaScript |
Expand Down