summaryrefslogtreecommitdiff
path: root/src/cmd/api/goapi.go
Commit message (Collapse)AuthorAgeFilesLines
...
* runtime: convert NewCallback and NewCallbackCDecl to GoAlex Brainman2014-08-251-2/+3
| | | | | | | LGTM=khr R=khr, remyoudompheng CC=golang-codereviews https://golang.org/cl/132820043
* runtime: convert channel operations to Go, part 1 (chansend1).Keith Randall2014-08-241-0/+1
| | | | | | | LGTM=dvyukov R=dvyukov, khr CC=golang-codereviews https://golang.org/cl/127460044
* runtime: convert note to GoDmitriy Vyukov2014-08-221-0/+1
| | | | | | | | | Note is required for timers and heap scavenger. LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews, khr, rlh https://golang.org/cl/128620043
* cmd/api: reduce stutter in runtime type stubsJosh Bleecher Snyder2014-08-211-4/+6
| | | | | | | LGTM=khr R=khr CC=dvyukov, golang-codereviews https://golang.org/cl/132770044
* runtime: convert common scheduler functions to GoDmitriy Vyukov2014-08-211-1/+1
| | | | | | | | | These are required for chans, semaphores, timers, etc. LGTM=khr R=golang-codereviews, khr CC=golang-codereviews, rlh, rsc https://golang.org/cl/123640043
* cmd/api: add missing runtime structDmitriy Vyukov2014-08-211-1/+1
| | | | | | | | | Fixes build. TBR=khr R=golang-codereviews CC=golang-codereviews, khr https://golang.org/cl/130390044
* runtime: don't acquirem on malloc fast pathDmitriy Vyukov2014-08-181-1/+4
| | | | | | | | | | | | | | | | | | | Mallocgc must be atomic wrt GC, but for performance reasons don't acquirem/releasem on fast path. The code does not have split stack checks, so it can't be preempted by GC. Functions like roundup/add are inlined. And onM/racemalloc are nosplit. Also add debug code that checks these assumptions. benchmark old ns/op new ns/op delta BenchmarkMalloc8 20.5 17.2 -16.10% BenchmarkMalloc16 29.5 27.0 -8.47% BenchmarkMallocTypeInfo8 31.5 27.6 -12.38% BenchmarkMallocTypeInfo16 34.7 30.9 -10.95% LGTM=khr R=golang-codereviews, khr CC=golang-codereviews, rlh, rsc https://golang.org/cl/123100043
* runtime: convert interface routines from C to Go.Keith Randall2014-08-071-1/+1
| | | | | | | LGTM=dvyukov R=golang-codereviews, dave, bradfitz, dvyukov, khr CC=golang-codereviews https://golang.org/cl/98510044
* runtime: shorten hash declarationsKeith Randall2014-08-061-1/+1
| | | | | | | LGTM=iant R=dvyukov, iant CC=golang-codereviews https://golang.org/cl/117680044
* runtime: convert slice operations to Go.Keith Randall2014-07-311-1/+1
| | | | | | | LGTM=bradfitz, dvyukov R=golang-codereviews, bradfitz, dvyukov CC=golang-codereviews https://golang.org/cl/120190044
* runtime: rewrite malloc in Go.Keith Randall2014-07-301-1/+1
| | | | | | | | | | | | | This change introduces gomallocgc, a Go clone of mallocgc. Only a few uses have been moved over, so there are still lots of uses from C. Many of these C uses will be moved over to Go (e.g. in slice.goc), but probably not all. What should remain of C's mallocgc is an open question. LGTM=rsc, dvyukov R=rsc, khr, dave, bradfitz, dvyukov CC=golang-codereviews https://golang.org/cl/108840046
* cmd/api: ignore internal packagesBrad Fitzpatrick2014-07-211-1/+7
| | | | | | | | | | We might want to add a go/build.IsInternal(pkg string) bool later, but this works for now. LGTM=dave, rsc R=rsc, dave CC=golang-codereviews https://golang.org/cl/113300044
* runtime: convert map implementation to Go.Keith Randall2014-07-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a bit slower, but not painfully so. There is still room for improvement (saving space so we can use nosplit, and removing the requirement for hash/eq stubs). benchmark old ns/op new ns/op delta BenchmarkMegMap 23.5 24.2 +2.98% BenchmarkMegOneMap 14.9 15.7 +5.37% BenchmarkMegEqMap 71668 72234 +0.79% BenchmarkMegEmptyMap 4.05 4.93 +21.73% BenchmarkSmallStrMap 21.9 22.5 +2.74% BenchmarkMapStringKeysEight_16 23.1 26.3 +13.85% BenchmarkMapStringKeysEight_32 21.9 25.0 +14.16% BenchmarkMapStringKeysEight_64 21.9 25.1 +14.61% BenchmarkMapStringKeysEight_1M 21.9 25.0 +14.16% BenchmarkIntMap 21.8 12.5 -42.66% BenchmarkRepeatedLookupStrMapKey32 39.3 30.2 -23.16% BenchmarkRepeatedLookupStrMapKey1M 322353 322675 +0.10% BenchmarkNewEmptyMap 129 136 +5.43% BenchmarkMapIter 137 107 -21.90% BenchmarkMapIterEmpty 7.14 8.71 +21.99% BenchmarkSameLengthMap 5.24 6.82 +30.15% BenchmarkBigKeyMap 34.5 35.3 +2.32% BenchmarkBigValMap 36.1 36.1 +0.00% BenchmarkSmallKeyMap 26.9 26.7 -0.74% LGTM=rsc R=golang-codereviews, dave, dvyukov, rsc, gobot, khr CC=golang-codereviews https://golang.org/cl/99380043
* std lib: fix various typos in commentsRobert Griesemer2014-05-021-1/+1
| | | | | | | | | | | Where the spelling changed from British to US norm (e.g., optimise -> optimize) it follows the style in that file. LGTM=adonovan R=golang-codereviews, adonovan CC=golang-codereviews https://golang.org/cl/96980043
* cmd/api: fix tool for recent go/build changeRuss Cox2013-09-111-0/+4
| | | | | | | | | | | | | | | | | | Asking about runtime/cgo when CgoEnabled=false now correctly returns an error from build.Import (specifically, NoGoError), because there are no buildable Go files in that directory. The API tool was depending on it returning a package with no Go files instead. Correct that assumption. Fixes all.bash on local machines. (Dashboard appears not to be running the api tool at all.) Update #6124 TBR=golang-dev CC=golang-dev https://golang.org/cl/13385046
* undo CL 13632053 / dc7bfe0f022dRuss Cox2013-09-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | It was never going to last. ««« original CL description cmd/api: break the builds There is some question about whether the api tool is running on Windows (see issue 6124), and now I'm starting to question whether it runs on any of the builders, since both darwin/amd64 and linux/amd64 are crashing for me in the api tool due to a recent cgo-related change, and yet the dashboard is happy. If the dashboard is still happy after this CL, we have a problem. Update #6124 TBR=golang-dev CC=golang-dev https://golang.org/cl/13632053 »»» TBR=golang-dev CC=golang-dev https://golang.org/cl/13474045
* cmd/api: break the buildsRuss Cox2013-09-111-0/+2
| | | | | | | | | | | | | | | | | There is some question about whether the api tool is running on Windows (see issue 6124), and now I'm starting to question whether it runs on any of the builders, since both darwin/amd64 and linux/amd64 are crashing for me in the api tool due to a recent cgo-related change, and yet the dashboard is happy. If the dashboard is still happy after this CL, we have a problem. Update #6124 TBR=golang-dev CC=golang-dev https://golang.org/cl/13632053
* cmd/api: include constant valuesBrad Fitzpatrick2013-09-061-4/+1
| | | | | | | | Update #5935 R=golang-dev, rsc, iant, dave CC=golang-dev https://golang.org/cl/13261050
* cmd/api: eliminate duplicate package import workRuss Cox2013-08-091-2/+56
| | | | | | | | | On my Mac, cuts the API checks from 15 seconds to 6 seconds. Also clean up some tag confusion: go run list-of-files ignores tags. R=bradfitz, gri CC=golang-dev https://golang.org/cl/12699048
* cmd/api: rewrite using go/typesRobert Griesemer2013-08-081-779/+367
| | | | | | | | | | | | - adjusted test files so that they actually type-check - adjusted go1.txt, go1.1.txt, next.txt - to run, provide build tag: api_tool Fixes #4538. R=bradfitz CC=golang-dev https://golang.org/cl/12300043
* cmd/api: add more platformsShenghou Ma2013-05-211-1/+16
| | | | | | | | | as OpenBSD lacks 4 errno constants, api/go1.txt is updated so that api check won't fail. R=golang-dev, iant, bradfitz, r CC=golang-dev https://golang.org/cl/9149045
* cmd/api: don't print out except.txt removed features to stdoutBrad Fitzpatrick2013-05-141-1/+6
| | | | | | | | It's just noise. They've already been acknowledged in except.txt. R=golang-dev, r CC=golang-dev https://golang.org/cl/9392047
* api: add go1.1.txt; update cmd/api to use itBrad Fitzpatrick2013-05-061-4/+5
| | | | | | R=golang-dev, adg, r CC=golang-dev https://golang.org/cl/9250043
* all: remove now-unnecessary unreachable panicsBrad Fitzpatrick2013-03-111-1/+0
| | | | | | | | Take advantage of the new terminating statement rule. R=golang-dev, r, gri CC=golang-dev https://golang.org/cl/7712044
* all: delete a couple of mentions of the exp and old treesRob Pike2013-03-061-3/+1
| | | | | | R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/7551043
* bytes, strings: add TrimPrefix and TrimSuffixBrad Fitzpatrick2013-02-011-2/+1
| | | | | | | | | | Everybody either gets confused and thinks this is TrimLeft/TrimRight or does this by hand which gets repetitive looking. R=rsc, kevlar CC=golang-dev https://golang.org/cl/7239044
* cmd/api: normalize byte to uint8 and rune to int32Brad Fitzpatrick2013-01-281-0/+12
| | | | | | R=golang-dev, adg, mikioh.mikioh CC=golang-dev https://golang.org/cl/7195049
* cmd/api: fix type scrubbingBrad Fitzpatrick2013-01-221-2/+8
| | | | | | | | | | | It wasn't removing names from func parameters for func types, and it was handling "a, b string" as "string", not "string, string". Fixes #4688 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7181051
* cmd/api: sort featuresAnthony Martin2013-01-191-0/+1
| | | | | | R=golang-dev, minux.ma, bradfitz CC=golang-dev https://golang.org/cl/7141062
* cmd/api: speed up API check by 2x, caching parser.ParseFile callsBrad Fitzpatrick2012-11-191-1/+16
| | | | | | | | | | | Saves 5 seconds on my machine. If Issue 4380 is fixed this clone can be removed. Update #4380 R=golang-dev, remyoudompheng, minux.ma, gri CC=golang-dev https://golang.org/cl/6845058
* cmd/api: use one token.FileSet for all contextsBrad Fitzpatrick2012-11-131-6/+6
| | | | | | | | Prep for future CL. R=gri CC=golang-dev https://golang.org/cl/6843048
* cmd/api: bug fix for goapi's lame type checkerBrad Fitzpatrick2012-11-081-20/+5
| | | | | | | | | | | | | | This is blocking me submitting the net fd timeout CL, since goapi chokes on my constant. The much more extensive fix to goapi's type checker in pending review in https://golang.org/cl/6742050 But I'd rather get this quick fix in first. R=golang-dev, mikioh.mikioh CC=golang-dev https://golang.org/cl/6818104
* cmd/api: handle contexts re-convergingBrad Fitzpatrick2012-10-301-10/+25
| | | | | | | | Fixes #4303 R=golang-dev, adg CC=golang-dev https://golang.org/cl/6816058
* cmd/api: add more testsBrad Fitzpatrick2012-10-301-27/+32
| | | | | | | | | | | | | Feature extraction was tested before, but not the final diffs. This CL breaks function main into a smaller main + testable compareAPI. No functional changes. R=golang-dev, adg CC=golang-dev https://golang.org/cl/6820057
* cmd/api: add exception fileRob Pike2012-10-041-7/+20
| | | | | | | | Fixes build. R=golang-dev, adg, bradfitz, dsymonds, dave CC=golang-dev https://golang.org/cl/6586074
* cmd/api: delete redundant text from deletion messageRob Pike2012-09-271-1/+2
| | | | | | R=bradfitz, minux.ma, rsc CC=golang-dev https://golang.org/cl/6543064
* cmd/dist: new version for string for development branchRuss Cox2012-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | Remove VERSION, which was forcing version to 'devel'. Old: $ go version go version devel New: $ go version go version devel +0a3866d6cc6b Mon Sep 24 20:08:05 2012 -0400 The date and time (and time zone) is that of the most recent commit, not the time of the build itself. With some effort we could normalize the zone, but I don't think it's worth the effort (more C coding, since Mercurial is unhelpful). R=r, dsymonds CC=golang-dev https://golang.org/cl/6569049
* cmd/api: fix signatures like func(x, y, z int)Mikio Hara2012-09-191-3/+23
| | | | | | | | | | | Fixes writing of function parameter, result lists which consist of multiple named or unnamed items with same type. Fixes #4011. R=golang-dev, bsiegert, bradfitz, rsc CC=golang-dev https://golang.org/cl/6475062
* cmd/api: allow extension of interfaces with unexported methodsRuss Cox2012-09-181-6/+29
| | | | | | | | Fixes #4061. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6525047
* cmd/api: recognize version "devel" as dev. branch and apply -nextShenghou Ma2012-08-281-1/+1
| | | | | | R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6476066
* cmd/api: handle empty API file, ignore -next in releaseRuss Cox2012-06-081-1/+13
| | | | | | R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6298063
* api: add Linux/ARM to go1 APIShenghou Ma2012-06-041-0/+1
| | | | | | | | | | | It's very unfortunate that the type of Data field of struct RawSockaddr is [14]uint8 on Linux/ARM instead of [14]int8 on all the others. btw, it should be [14]int8 according to my header files. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6275050
* api: add FreeBSD to go1 APIBrad Fitzpatrick2012-06-011-0/+2
| | | | | | | | | | | | | | Now that gri has made go/parser 15% faster, I offer this change to slow back down cmd/api ~proportionately, adding FreeBSD to the go1-checked set of platforms. Really we should have done this earlier. This will prevent us from breaking FreeBSD compatibility accidentally in the future. R=golang-dev, r CC=golang-dev https://golang.org/cl/6279044
* cmd/api: add flag to specify contextsBrad Fitzpatrick2012-05-231-6/+36
| | | | | | | | | I needed this to explore per-GOOS/GOARCH differences in pkg syscall for a recent CL. Others may find it useful too. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6236046
* cmd/api: add api/next.txtBrad Fitzpatrick2012-05-221-33/+74
| | | | | | | | | | | | | | | | This quiets all.bash noise for upcoming features we know about. The all.bash warnings will now only print for things not in next.txt (or in next.txt but not in the API). Once an API is frozen, we rename next.txt to a new frozen file (like go1.txt) Fixes #3651 R=golang-dev, r CC=golang-dev https://golang.org/cl/6218069
* cmd/api: allow addition of APIShenghou Ma2012-04-101-1/+1
| | | | | | R=bradfitz, rsc CC=golang-dev https://golang.org/cl/5991081
* build: catch API changes during buildBrad Fitzpatrick2012-03-171-2/+11
| | | | | | | | | | | | Adds new file api/go1.txt, locking down the current API. Any changes to the API will need to update that file. run.bash (but not make.bash, or Windows) will check for accidental API changes. R=golang-dev, dsymonds, rsc CC=golang-dev https://golang.org/cl/5820070
* cmd/api: work on Windows again, and make gccgo files work a bit moreBrad Fitzpatrick2012-03-111-1/+8
| | | | | | | | handle string and []byte conversions. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5754082
* cmd/api: set compiler for all build contexts.David Symonds2012-03-121-0/+6
| | | | | | | | | | | The generated syscall files for Windows are still breaking "go tool api" (unknown function []byte); I'll look at fixing that separately. Fixes #3285. R=bradfitz CC=golang-dev https://golang.org/cl/5777062
* go/build: replace FindTree, ScanDir, Tree, DirInfo with Import, PackageRuss Cox2012-03-011-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an API change, but one I have been promising would happen when it was clear what the go command needed. This is basically a complete replacement of what used to be here. build.Tree is gone. build.DirInfo is expanded and now called build.Package. build.FindTree is now build.Import(package, srcDir, build.FindOnly). The returned *Package contains information that FindTree returned, but applicable only to a single package. build.ScanDir is now build.ImportDir. build.FindTree+build.ScanDir is now build.Import. The new Import API allows specifying the source directory, in order to resolve local imports (import "./foo") and also allows scanning of packages outside of $GOPATH. They will come back with less information in the Package, but they will still work. The old go/build API exposed both too much and too little. This API is much closer to what the go command needs, and it works well enough in the other places where it is used. Path is gone, so it can no longer be misused. (Fixes issue 2749.) This CL updates clients of go/build other than the go command. The go command changes are in a separate CL, to be submitted at the same time. R=golang-dev, r, alex.brainman, adg CC=golang-dev https://golang.org/cl/5713043