summaryrefslogtreecommitdiff
path: root/src/pkg/exp
AgeCommit message (Collapse)AuthorFilesLines
2010-02-24go/ast: streamline representation of field listsRobert Griesemer1-33/+23
- always include position information about opening/closing parens/braces - replace uses of []*ast.Field with *ast.FieldList Fixes issue 473. R=rsc CC=golang-dev http://codereview.appspot.com/223043
2010-02-24gofmt: don't print ()'s around function-typed results (not needed anymore)Robert Griesemer4-26/+22
- add extra test cases to go/printer tests - apply gofmt to src and misc R=rsc CC=golang-dev http://codereview.appspot.com/223041
2010-02-19- removed exp/parser (support for old semicolon syntax)Robert Griesemer9-2311/+12
- go/ast: removed StringList (not needed anymore) - go/ast: changed import path and field list tag to a single string - updated all dependencies R=rsc CC=golang-dev http://codereview.appspot.com/217056
2010-02-17Add Src and Over draw operators.Nigel Tao3-63/+95
R=r, rsc CC=golang-dev http://codereview.appspot.com/207096
2010-02-16remove assumption that all files belonging to a package are in the same ↵Robert Griesemer1-3/+4
directory: - adjust ast.Package node and doc.PackageDoc correspondingly - introduce parser.ParseFiles R=rsc CC=golang-dev http://codereview.appspot.com/207087
2010-02-11exp/draw test.Nigel Tao1-0/+89
R=rsc CC=golang-dev http://codereview.appspot.com/203062
2010-02-06draw.Draw fast paths for a nil mask (and RGBA dst).Nigel Tao1-0/+50
Averaged times (in microseconds) for drawing an 800x600 rectangle are listed below. The summary is: around a 100x improvement. draw.Draw call times were typically linear in the number of pixels touched (i.e. drawing an 800x600 rectangle took 100x as much time as drawing an 80x60 rectangle). Before this change, there was only the general-but-slow code path. When drawing any src with a 50%-opaque mask: 237300 us When drawing any src with a nil mask: 50100 us After this change, the 50%-opaque mask case is unchanged. For an *image.RGBA dst and nil mask and... ...a uniform color (i.e. an image.ColorImage) src: 282 us ...another *image.RGBA src: 615 us. For the curious, an intermediate implementation detected the special cases but used simple nested for loops instead of the built-in copy function. The respective times (compared to 282 and 615 for the final implementation, or 50100 for the original) were 3110 and 3573. Times were measured with 8g/8l on my laptop. I haven't tried gccgo or other architectures. R=r, rsc CC=golang-dev http://codereview.appspot.com/201048
2010-02-04In draw.Draw, separate the source-point and mask-point.Nigel Tao2-56/+66
This lets you draw text (i.e. with mask = a font image) with sources that aren't uniform colors. R=r, rsc CC=golang-dev http://codereview.appspot.com/193067
2010-02-02fix build - misc ... vs ...T fixesRuss Cox1-1/+2
TBR=r CC=golang-dev http://codereview.appspot.com/198081
2010-02-02Change type of Printf's args to ... interface{}Rob Pike4-4/+4
R=rsc CC=golang-dev http://codereview.appspot.com/197043
2010-02-01gc: add ... T, rework plain ...Russ Cox2-9/+4
No longer a distinct type; now a property of func types. R=ken2 CC=golang-dev http://codereview.appspot.com/197042
2010-01-28support for ...T parameters (go/* packages)Robert Griesemer1-4/+4
R=rsc CC=golang-dev http://codereview.appspot.com/194126
2010-01-27More steps towards tracking of identifier scopes.Robert Griesemer1-1/+1
- provide scope to parse functions; if non-nil, parser uses the scope to declare and lookup identifiers - resolve forward references where possible R=rsc CC=golang-dev http://codereview.appspot.com/194098
2010-01-15 Steps towards tracking scopes for identifiers.Robert Griesemer6-87/+38
- Identifiers refer now to the language entity (Object) that they denote. At the moment this is at best an approximation. - Initial data structures for language entities (Objects) and expression types (Type) independent of the actual type notations. - Initial support for declaring and looking up identifiers. - Updated various dependent files and added support functions. - Extensively tested to avoid breakage. This is an AST change. R=rsc CC=golang-dev, rog http://codereview.appspot.com/189080
2010-01-15Fix s/Width/Height/ typo in draw.go.Nigel Tao1-2/+2
Fixes issue 531. R=r CC=golang-dev http://codereview.appspot.com/189078
2009-12-22Replace container/vector with exp/vector (faster).Robert Griesemer11-2166/+0
Manual changes to the following files: src/pkg/Makefile src/pkg/exp/vector/Makefile (now: src/pkg/container/vector/Makefile) R=rsc, r CC=golang-dev http://codereview.appspot.com/181041
2009-12-22add comment (warning about generated files)Robert Griesemer6-3/+18
R=r CC=golang-dev http://codereview.appspot.com/180108
2009-12-21Experimental alternative implementation of the vector packageJan Mercl11-0/+2151
R=gri CC=rsc http://codereview.appspot.com/178048 Committer: Robert Griesemer <gri@golang.org>
2009-12-18fix build, enable an exp/eval's assignment checkRobert Griesemer1-5/+1
now that the parser doesn't do this test anymore R=rsc CC=golang-dev http://codereview.appspot.com/179105
2009-12-18removed semantic check from parsersRobert Griesemer1-3/+0
R=rsc CC=golang-dev http://codereview.appspot.com/179099
2009-12-16Don't ignore flags controlling the amount of source code parsedRobert Griesemer1-5/+5
in parser's ParsePkgFile and ParsePackage functions. R=rsc CC=golang-dev, rog http://codereview.appspot.com/180070
2009-12-15 1) Change default gofmt default settings forRobert Griesemer58-6519/+6521
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 2nd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/179067
2009-12-11Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/srcDevon H. O'Dell2-4/+7
This change removes the necessity to have GOBIN in $PATH, and also doesn't assume that the build is being run from $GOROOT/src. This is a minimal set of necessary changes to get Go to build happily from the FreeBSD ports collection. R=rsc CC=golang-dev http://codereview.appspot.com/171044 Committer: Russ Cox <rsc@golang.org>
2009-12-10New flags for gofmt:Robert Griesemer1-1/+1
- oldparser parse old syntax (required semicolons) - oldprinter print old syntax (required semicolons) By default, these flags are enabled for now. Setting -oldparser=false has no effect until go/parser is changed to accept the new syntax. Enabled exp/parser in Makefile; update dependent exp/eval. R=rsc http://codereview.appspot.com/174051
2009-12-10rename exp/parser package to oldParserRobert Griesemer3-8/+13
to allow simultaneous import with the current go/parser R=rsc http://codereview.appspot.com/174053
2009-12-10- unmodified copy of existing go/parser, not yet hooked upRobert Griesemer4-0/+2326
R=rsc CC=r http://codereview.appspot.com/175045
2009-12-09minor manual format correctionsRobert Griesemer1-1/+0
R=rsc http://codereview.appspot.com/172042
2009-12-09remove uses of string concatenation from src and misc directoryRobert Griesemer1-34/+34
R=rsc http://codereview.appspot.com/172041
2009-12-04make Native Client support build again,Russ Cox10-17/+126
add README explaining how to try the web demos. Fixes issue 339. R=r CC=barry.d.silverman, bss, vadim http://codereview.appspot.com/165057
2009-12-03Add Count, Cycle, ZipWith, GroupBy, Repeat, RepeatTimes, Unique to exp/iterable.Michael Elkins2-25/+363
Modify iterFunc to take chan<- instead of just chan. R=rsc, dsymonds1 CC=golang-dev, r http://codereview.appspot.com/160064 Committer: Russ Cox <rsc@golang.org>
2009-12-02move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.Rob Pike1-1/+1
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev http://codereview.appspot.com/163085
2009-11-30Minimise bitrot: bytes.Copy -> copyChristopher Wedgwood3-9/+6
(compile tested only) R=r, rsc http://codereview.appspot.com/161069 Committer: Russ Cox <rsc@golang.org>
2009-11-29crypto/md4, exp/draw/x11: fix makefile to build when GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
this is the exact same thing issue #115 is about. fix makefiles to use relative path to work in the case we have whitespaces as part of GOROOT. R=rsc http://codereview.appspot.com/162055 Committer: Russ Cox <rsc@golang.org>
2009-11-25Initial exp/draw/x11 implementation.Nigel Tao3-0/+629
This provides an experimental X11 backend for the exp/draw interface. It does not aim to provide a complete implementation of the X11 client protocol. This works for me (Ubuntu Hardy 8.04, GOARCH=386). Your mileage my vary. R=r, rsc, r1 CC=golang-dev http://codereview.appspot.com/156109
2009-11-24Change to container/vector interface:Robert Griesemer4-8/+4
- removed New(len int) in favor of new(Vector).Resize(len, cap) - removed Init(len int) in favor of Resize(len, cap) - runs all.bash Fixes issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-24add Take, TakeWhile, Drop, DropWhile to exp/iterableMichael Elkins2-0/+134
R=dsymonds1, rsc http://codereview.appspot.com/156079 Committer: Russ Cox <rsc@golang.org>
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia9-18/+18
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20Support for basic try-catch style exception handling.Robert Griesemer3-0/+155
Meant as illustration of the Go pattern that is using goroutines and channels to handle exceptional situations. Note: There is no need for "Finally" since the "try block" (the function f supplied to Try) cannot do a Smalltalk-style non-local return and terminate the function surrounding Try. Replaces CL 157083. R=r, rsc http://codereview.appspot.com/157087
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox11-23/+23
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-19Permit omission of hi bound in slices.Robert Griesemer1-9/+14
R=r, rsc http://codereview.appspot.com/157082
2009-11-16Add some primitive type aliases to exp/iterable and define Iter on them.David Symonds3-11/+78
R=rsc http://codereview.appspot.com/155065 Committer: Russ Cox <rsc@golang.org>
2009-11-14Build changes to support work on the BSDs.Devon H. O'Dell1-1/+1
This does still contain some FreeBSD-specific bits, but it's a pain to do partial diffs. R=rsc http://codereview.appspot.com/152138 Committer: Russ Cox <rsc@golang.org>
2009-11-12exp/draw: correct Makefile.Adam Langley1-1/+1
Thanks to Allister Macleod Fixes issue 112. R=rsc CC=golang-dev http://codereview.appspot.com/152102
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer33-327/+325
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer43-1324/+1324
R=rsc, r http://go/go-review/1025029
2009-11-06Typo fixes.David Symonds2-2/+2
R=rsc CC=go-dev http://go/go-review/1026014 Committer: Russ Cox <rsc@golang.org>
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer36-851/+285
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt the last outstanding files in src/pkgRobert Griesemer2-90/+79
- added a list of issues to printer/nodes.go R=rsc http://go/go-review/1024002
2009-11-05gofmt-ify 4s, iterableRobert Griesemer5-364/+375
R=rsc http://go/go-review/1016055
2009-11-05gofmt-ify drawRobert Griesemer4-81/+79
R=rsc http://go/go-review/1017055