aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/error.go
AgeCommit message (Collapse)Author
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.
2014-09-03runtime: convert symtab.c into symtab.goRuss Cox
Because symtab.c was partially converted before, the diffs are not terribly useful. The earlier conversion was trying to refactor or clean up the code in addition to doing the translation. It also made a mistake by redefining Func to be something users could overwrite. I undid those changes, making symtab.go a more literal line-for-line translation of symtab.c instead. LGTM=josharian R=golang-codereviews, dave, bradfitz, josharian CC=golang-codereviews, iant, khr, r https://golang.org/cl/140880043
2014-08-28runtime: convert runtime1.goc, noasm_arm.goc to GoRuss Cox
LGTM=dvyukov R=golang-codereviews, bradfitz, dvyukov CC=golang-codereviews, iant, khr https://golang.org/cl/135070043
2014-08-24runtime: remove some overuse of uintptr/unsafe.PointerRuss Cox
Now 'go vet runtime' only shows: malloc.go:200: possible misuse of unsafe.Pointer malloc.go:214: possible misuse of unsafe.Pointer malloc.go:250: possible misuse of unsafe.Pointer stubs.go:167: possible misuse of unsafe.Pointer Those are all unavoidable. LGTM=josharian R=golang-codereviews, dvyukov, josharian CC=dave, golang-codereviews https://golang.org/cl/135730043
2014-08-23runtime: adjust errorCString definition to avoid allocationRuss Cox
The low-level implementation of divide on ARM assumes that it can panic with an error created by newErrorCString without allocating. If we make interface data words require pointer values, the current definition would require an allocation when stored in an interface. Changing the definition to use unsafe.Pointer instead of uintptr avoids the allocation. This change is okay because the field really is a pointer (to a C string in rodata). Update #8405. This should make CL 133830043 safe to try again. LGTM=bradfitz R=golang-codereviews, bradfitz CC=dave, golang-codereviews, r https://golang.org/cl/133820043
2014-06-16runtime: implement string ops in GoKeith Randall
Also implement go:nosplit annotation. Not really needed for now, but we'll definitely need it for other conversions. benchmark old ns/op new ns/op delta BenchmarkRuneIterate 534 474 -11.24% BenchmarkRuneIterate2 535 470 -12.15% LGTM=bradfitz R=golang-codereviews, dave, bradfitz, minux CC=golang-codereviews https://golang.org/cl/93380044
2014-01-08runtime: change errorCString to a structIan Lance Taylor
This prevents callers from using reflect to create a new instance of errorCString with an arbitrary value and calling the Error method to examine arbitrary memory. Fixes #7084. R=golang-codereviews, minux.ma, bradfitz CC=golang-codereviews https://golang.org/cl/49600043
2013-09-20runtime: avoid allocation of internal panic valuesRuss Cox
If a fault happens in malloc, inevitably the next thing that happens is a deadlock trying to allocate the panic value that says the fault happened. Stop doing that, two ways. First, reject panic in malloc just as we reject panic in garbage collection. Second, runtime.panicstring was using an error implementation backed by a Go string, so the interface held an allocated *string. Since the actual errors are C strings, define a new error implementation backed by a C char*, which needs no indirection and therefore no allocation. This second fix will avoid allocation for errors like nil panic derefs or division by zero, so it is worth doing even though the first fix should take care of faults during malloc. Update #6419 R=golang-dev, dvyukov, dave CC=golang-dev https://golang.org/cl/13774043
2012-02-12runtime: delete Type and implementations (use reflect instead)Russ Cox
unsafe: delete Typeof, Reflect, Unreflect, New, NewArray Part of issue 2955 and issue 2968. R=golang-dev, r CC=golang-dev https://golang.org/cl/5650069
2011-11-01all: rename os.Error to error in various non-code contextsRuss Cox
R=adg CC=golang-dev https://golang.org/cl/5328062
2011-11-01runtime: update for errorRuss Cox
R=golang-dev, iant, r CC=golang-dev https://golang.org/cl/5306075
2011-06-17gc: descriptive panic for nil pointer -> value method callRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/4646042
2010-10-22runtime: print unknown types in panicRuss Cox
R=r CC=golang-dev https://golang.org/cl/2683041
2010-04-01runtime: turn run time errors checks into panicsRuss Cox
R=ken2, r CC=golang-dev https://golang.org/cl/871042
2010-03-31runtime: make type assertion a runtime.Error, the first of manyRuss Cox
R=r CC=golang-dev https://golang.org/cl/805043