mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] all: merge dev.regabi (7e0a81d) into dev.typeparams
As with CL 285875, this required resolving some conflicts around handling of //go:embed directives. Still further work is needed to reject uses of //go:embed in files that don't import "embed", so this is left as a TODO. (When this code was written for dev.typeparams, we were still leaning towards not requiring the "embed" import.) Also, the recent support for inlining closures (CL 283112) interacts poorly with -G=3 mode. There are some known issues with this code already (#43818), so for now this CL disables inlining of closures when in -G=3 mode with a TODO to revisit this once closure inlining is working fully. Conflicts: - src/cmd/compile/internal/noder/noder.go - src/cmd/compile/internal/typecheck/dcl.go - src/cmd/compile/internal/typecheck/func.go - test/run.go Merge List: + 2021-01-227e0a81d280[dev.regabi] all: merge master (dab3e5a) into dev.regabi + 2021-01-22dab3e5afferuntime: switch runtime to libc for openbsd/amd64 + 2021-01-22a1b53d85dacmd/go: add documentation for test and xtest fields output by go list + 2021-01-22b268b60774runtime: remove pthread_kill/pthread_self for openbsd + 2021-01-22ec4051763druntime: fix typo in mgcscavenge.go + 2021-01-227ece3a7b17net/http: fix flaky TestDisableKeepAliveUpgrade + 2021-01-2250cba0506ftime: clarify Timer.Reset behavior on AfterFunc Timers + 2021-01-22cf10e69f17doc/go1.16: mention net/http.Transport.GetProxyConnectHeader + 2021-01-22ec1b945265doc/go1.16: mention path/filepath.WalkDir + 2021-01-2211def3d40bdoc/go1.16: mention syscall.AllThreadsSyscall + 2021-01-2107b0235609doc/go1.16: add notes about package-specific fs.FS changes + 2021-01-21e2b4f1fea5doc/go1.16: minor formatting fix + 2021-01-219f43a9e07bdoc/go1.16: mention new debug/elf constants + 2021-01-213c2f11ba5bcmd/go: overwrite program name with full path + 2021-01-21953d1feca9all: introduce and use internal/execabs + 2021-01-21b186e4d70dcmd/go: add test case for cgo CC setting + 2021-01-215a8a2265fbcmd/cgo: report exec errors a bit more clearly + 2021-01-2146e2e2e9d9cmd/go: pass resolved CC, GCCGO to cgo + 2021-01-213d40895e36runtime: switch openbsd/arm64 to pthreads + 2021-01-21d95ca91380crypto/elliptic: fix P-224 field reduction + 2021-01-21d7e71c01ad[dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for dwarf + 2021-01-215248f59a22[dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA + 2021-01-21970d8b6cb2[dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet in inlining + 2021-01-2168a4664475[dev.regabi] cmd/compile: remove tempAssigns in walkCall1 + 2021-01-21fd9a391cdd[dev.regabi] cmd/compile: remove CallExpr.Rargs + 2021-01-2119a6db6b63[dev.regabi] cmd/compile: make sure mkcall* passed non-nil init + 2021-01-219f036844db[dev.regabi] cmd/compile: use ir.DoChildren directly in inlining + 2021-01-21213c3905e9[dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSelect + 2021-01-201760d736f6[dev.regabi] cmd/compile: exporting, importing, and inlining functions with OCLOSURE + 2021-01-20ecf4ebf100cmd/internal/moddeps: check content of all modules in GOROOT + 2021-01-2092cb157cf3[dev.regabi] cmd/compile: late expansion of return values + 2021-01-20d2d155d1aeruntime: don't adjust timer pp field in timerWaiting status + 2021-01-20803d18fc6ccmd/go: set Incomplete field on go list output if no files match embed + 2021-01-206e243ce71dcmd/go: have go mod vendor copy embedded files in subdirs + 2021-01-20be28e5abc5cmd/go: fix mod_get_fallback test + 2021-01-20928bda4f4aruntime: convert openbsd/amd64 locking to libc + 2021-01-19824f2d635ccmd/go: allow go fmt to complete when embedded file is missing + 2021-01-190575e35e50cmd/compile: require 'go 1.16' go.mod line for //go:embed + 2021-01-199423d50d53[dev.regabi] cmd/compile: use '%q' for printing rune values less than 128 + 2021-01-19ccb2e90688cmd/link: exit before Asmb2 if error + 2021-01-19ca5774a5a5embed: treat uninitialized FS as empty + 2021-01-19d047c91a6ccmd/link,runtime: switch openbsd/amd64 to pthreads + 2021-01-1961debffd97runtime: factor out usesLibcall + 2021-01-199fed39d281runtime: factor out mStackIsSystemAllocated + 2021-01-19a2f825c542[dev.regabi] cmd/compile: directly create go.map and go.track symbols + 2021-01-194a4212c0e5[dev.regabi] cmd/compile: refactor Linksym creation + 2021-01-194f5c603c0f[dev.regabi] cmd/compile: cleanup callTargetLSym + 2021-01-18dbab079835runtime: free Windows event handles after last lock is dropped + 2021-01-185a8fbb0d2dos: do not close syscall.Stdin in TestReadStdin + 2021-01-18422f38fb6c[dev.regabi] cmd/compile: move stack objects to liveness + 2021-01-186113db0bb4[dev.regabi] cmd/compile: convert OPANIC argument to interface{} during typecheck + 2021-01-184c835f9169[dev.regabi] cmd/compile: use LinksymOffsetExpr in TypePtr/ItabAddr + 2021-01-180ffa1ead6e[dev.regabi] cmd/compile: use *obj.LSym instead of *ir.Name for staticdata functions + 2021-01-177e0fa38aad[dev.regabi] cmd/compile: remove unneeded packages from ir.Pkgs + 2021-01-1799a5db11ac[dev.regabi] cmd/compile: use LinksymOffsetExpr in walkConvInterface + 2021-01-1787845d14f9[dev.regabi] cmd/compile: add ir.TailCallStmt + 2021-01-17e3027c6828[dev.regabi] cmd/compile: fix linux-amd64-noopt builder + 2021-01-1759ff93fe64[dev.regabi] cmd/compile: rename NameOffsetExpr to LinksymOffsetExpr + 2021-01-1782b9cae700[dev.regabi] cmd/compile: change ir.NameOffsetExpr to use *obj.LSym instead of *Name + 2021-01-1788956fc4b1[dev.regabi] cmd/compile: stop analyze NameOffsetExpr.Name_ in escape analysis + 2021-01-177ce2a8383d[dev.regabi] cmd/compile: simplify stack temp initialization + 2021-01-17ba0e8a92fa[dev.regabi] cmd/compile: refactor temp construction in walk + 2021-01-1778e5aabcdb[dev.regabi] cmd/compile: replace Node.HasCall with walk.mayCall + 2021-01-166de9423445[dev.regabi] cmd/compile: cleanup OAS2FUNC ordering + 2021-01-16a956a0e909[dev.regabi] cmd/compile, runtime: fix up comments/error messages from recent renames + 2021-01-16ab3b67abfd[dev.regabi] cmd/compile: remove ONEWOBJ + 2021-01-16c9b1445ac8[dev.regabi] cmd/compile: remove TypeAssertExpr {Src,Dst}Type fields + 2021-01-15682a1d2176runtime: detect errors in DuplicateHandle + 2021-01-159f83418b83cmd/link: remove GOROOT write in TestBuildForTvOS + 2021-01-15ec9470162fcmd/compile: allow embed into any string or byte slice type + 2021-01-1554198b04dbcmd/compile: disallow embed of var inside func + 2021-01-15b386c735e7cmd/go: fix go generate docs + 2021-01-15bb5075a525syscall: remove RtlGenRandom and move it into internal/syscall + 2021-01-151deae0b597os: invoke processKiller synchronously in testKillProcess + 2021-01-1503a875137f[dev.regabi] cmd/compile: unexport reflectdata.WriteType + 2021-01-1514537e6e54[dev.regabi] cmd/compile: move stkobj symbol generation to SSA + 2021-01-15ab523fc510[dev.regabi] cmd/compile: don't promote Byval CaptureVars if Addrtaken + 2021-01-15ff196c3e84crypto/x509: update iOS bundled roots to version 55188.40.9 + 2021-01-15b7a698c73f[dev.regabi] test: disable test on windows because expected contains path separators. + 2021-01-154be7af23f9[dev.regabi] cmd/compile: fix ICE during ir.Dump + 2021-01-14e125ccd10ecmd/go: in 'go mod edit', validate versions given to -retract and -exclude + 2021-01-14eb330020dccmd/dist, cmd/go: pass -arch for C compilation on Darwin + 2021-01-1484e8a06f62cmd/cgo: remove unnecessary space in cgo export header + 2021-01-140c86b999c3cmd/test2json: document passing -test.paniconexit0 + 2021-01-149135795891cmd/go/internal/load: report positions for embed errors + 2021-01-1435b9c66601[dev.regabi] cmd/compile,cmd/link: additional code review suggestions for CL 270863 + 2021-01-14d9b79e53bbcmd/compile: fix wrong complement for arm64 floating-point comparisons + 2021-01-14c73232d08fcmd/go/internal/load: refactor setErrorPos to PackageError.setPos + 2021-01-146aa28d3e06go/build: report positions for go:embed directives + 2021-01-149734fd482d[dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSwitch + 2021-01-14f97983249a[dev.regabi] cmd/compile: move more PAUTOHEAP to SSA construction + 2021-01-144476300425[dev.regabi] cmd/compile: use byte for CallExpr.Use + 2021-01-145a5ab24689[dev.regabi] cmd/compile: do not rely on CallExpr.Rargs for detect already walked calls + 2021-01-14983ac4b086[dev.regabi] cmd/compile: fix ICE when initializing blank vars + 2021-01-137eb31d999ccmd/go: add hints to more missing sum error messages + 2021-01-13d6d4673728[dev.regabi] cmd/compile: fix GOEXPERIMENT=regabi builder + 2021-01-13c41b999ad4[dev.regabi] cmd/compile: refactor abiutils from "gc" into new "abi" + 2021-01-13861707a8c8[dev.regabi] cmd/compile: added limited //go:registerparams pragma for new ABI dev + 2021-01-13c1370e918f[dev.regabi] cmd/compile: add code to support register ABI spills around morestack calls + 2021-01-132abd24f3b7[dev.regabi] test: make run.go error messages slightly more informative + 2021-01-139a19481acb[dev.regabi] cmd/compile: make ordering for InvertFlags more stable + 2021-01-12ba76567bc2cmd/go/internal/modload: delete unused *mvsReqs.next method + 2021-01-12665def2c11encoding/asn1: document unmarshaling behavior for IMPLICIT string fields + 2021-01-1181ea89adf3cmd/go: fix non-script staleness checks interacting badly with GOFLAGS + 2021-01-11759309029fdoc: update editors.html for Go 1.16 + 2021-01-11c3b4c7093acmd/internal/objfile: don't require runtime.symtab symbol for XCOFF + 2021-01-0859bfc18e34cmd/go: add hint to read 'go help vcs' to GOVCS errors + 2021-01-08cd6f3a54e4cmd/go: revise 'go help' documentation for modules + 2021-01-086192b98751cmd/go: make hints in error messages more consistent + 2021-01-0825886cf4bdcmd/go: preserve sums for indirect deps fetched by 'go mod download' + 2021-01-086250833911runtime/metrics: mark histogram metrics as cumulative + 2021-01-088f6a9acbb3runtime/metrics: remove unused StopTheWorld Description field + 2021-01-086598c65646cmd/compile: fix exponential-time init-cycle reporting + 2021-01-08fefad1dc85test: fix timeout code for invoking compiler + 2021-01-086728118e0acmd/go: pass signals forward during "go tool" + 2021-01-08e65c543f3cgo/build/constraint: add parser for build tag constraint expressions + 2021-01-080c5afc4fb7testing/fstest,os: clarify racy behavior of TestFS + 2021-01-0832afcc9436runtime/metrics: change unit on *-by-size metrics to match bucket unit + 2021-01-08c6513bca5aio/fs: minor corrections to Glob doc + 2021-01-08304f769ffccmd/compile: don't short-circuit copies whose source is volatile + 2021-01-08ae97717133runtime,runtime/metrics: use explicit histogram boundaries + 2021-01-08a9ccd2d795go/build: skip string literal while findEmbed + 2021-01-08d92f8add32archive/tar: fix typo in comment + 2021-01-08cab1202183cmd/link: accept extra blocks in TestFallocate + 2021-01-08ee4d32249bio/fs: minor corrections to Glob release date + 2021-01-0854bd1ccce2cmd: update to latest golang.org/x/tools + 2021-01-079ec21a8f34Revert "reflect: support multiple keys in struct tags" + 2021-01-07091414b5b7io/fs: correct WalkDirFunc documentation + 2021-01-079b55088d6bdoc/go1.16: add release note for disallowing non-ASCII import paths + 2021-01-07fa90aaca7dcmd/compile: fix late expand_calls leaf type for OpStructSelect/OpArraySelect + 2021-01-077cee66d4cbcmd/go: add documentation for Embed fields in go list output + 2021-01-07e60cffa4cahtml/template: attach functions to namespace + 2021-01-076da2d3b7d7cmd/link: fix typo in asm.go + 2021-01-07df81a15819runtime: check mips64 VDSO clock_gettime return code + 2021-01-064787e906cfcrypto/x509: rollback new CertificateRequest fields + 2021-01-06c9658bee93cmd/go: make module suggestion more friendly + 2021-01-064c668b25c6runtime/metrics: fix panic message for Float64Histogram + 2021-01-06d2131704a6net/http/httputil: fix deadlock in DumpRequestOut + 2021-01-053e1e13ce6dcmd/go: set cfg.BuildMod to "readonly" by default with no module root + 2021-01-050b0d004983cmd/go: pass embedcfg to gccgo if supported + 2021-01-051b85e7c057cmd/go: don't scan gccgo standard library packages for imports + 2021-01-056b37b15d95runtime: don't take allglock in tracebackothers + 2021-01-049eef49cfa6math/rand: fix typo in comment + 2021-01-04b01fb2af9etesting/fstest: fix typo in error message + 2021-01-013dd5867605doc: 2021 is the Year of the Gopher + 2020-12-3195ce805d14io/fs: remove darwin/arm64 special condition + 2020-12-3020d0991b86lib/time, time/tzdata: update tzdata to 2020f + 2020-12-30ed301733bbmisc/cgo/testcarchive: remove special flags for Darwin/ARM + 2020-12-300ae2e032f2misc/cgo/test: enable TestCrossPackageTests on darwin/arm64 + 2020-12-29780b4de16bmisc/ios: fix wording for command line instructions + 2020-12-29b4a71c95d2doc/go1.16: reference misc/ios/README for how to build iOS programs + 2020-12-29f83e0f6616misc/ios: add to README how to build ios executables + 2020-12-284fd9455882io/fs: fix typo in comment Change-Id: If24bb93f1e1e7deb1d92ba223c85940ab93b2732
This commit is contained in:
commit
6e46c8fbb5
352 changed files with 9476 additions and 7174 deletions
|
|
@ -48,6 +48,9 @@ func (g *irgen) importDecl(p *noder, decl *syntax.ImportDecl) {
|
|||
if ipkg == ir.Pkgs.Unsafe {
|
||||
p.importedUnsafe = true
|
||||
}
|
||||
if ipkg.Path == "embed" {
|
||||
p.importedEmbed = true
|
||||
}
|
||||
}
|
||||
|
||||
func (g *irgen) constDecl(out *ir.Nodes, decl *syntax.ConstDecl) {
|
||||
|
|
@ -164,9 +167,8 @@ func (g *irgen) varDecl(out *ir.Nodes, decl *syntax.VarDecl) {
|
|||
|
||||
if decl.Pragma != nil {
|
||||
pragma := decl.Pragma.(*pragmas)
|
||||
if err := varEmbed(g.makeXPos, names[0], decl, pragma); err != nil {
|
||||
base.ErrorfAt(g.pos(decl), "%s", err.Error())
|
||||
}
|
||||
// TODO(mdempsky): Plumb noder.importedEmbed through to here.
|
||||
varEmbed(g.makeXPos, names[0], decl, pragma, true)
|
||||
g.reportUnused(pragma)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue