1
0
mirror of https://github.com/golang/go synced 2024-11-24 18:30:16 -07:00
go/src
Keith Randall 259b7edf5c cmd/compile: allow naming of subexpressions
Allow names to be used for subexpressions of match rules.
For example:

(OpA x:(OpB y)) -> ..use x here to refer to the OpB value..

This gets rid of the .Args[0].Args[0]... way of naming we
used to use.

While we're here, give all subexpression matches names instead
of recomputing them with .Args[i] sequences each time they
are referenced.  Makes the generated rule code a bit smaller.

Change-Id: Ie42139f6f208933b75bd2ae8bd34e95419bc0e4e
Reviewed-on: https://go-review.googlesource.com/20997
Run-TryBot: Todd Neal <todd@tneal.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Todd Neal <todd@tneal.org>
2016-03-22 00:18:31 +00:00
..
archive all: delete dead test code 2016-03-21 07:10:08 +00:00
bufio all: delete dead test code 2016-03-21 07:10:08 +00:00
builtin
bytes all: delete dead test code 2016-03-21 07:10:08 +00:00
cmd cmd/compile: allow naming of subexpressions 2016-03-22 00:18:31 +00:00
compress
container
crypto all: delete dead test code 2016-03-21 07:10:08 +00:00
database/sql all: delete dead test code 2016-03-21 07:10:08 +00:00
debug all: delete dead test code 2016-03-21 07:10:08 +00:00
encoding encoding/binary: fix bound check 2016-03-21 19:22:22 +00:00
errors
expvar
flag
fmt all: delete dead test code 2016-03-21 07:10:08 +00:00
go all: delete dead test code 2016-03-21 07:10:08 +00:00
hash
html
image
index/suffixarray
internal internal/syscall/unix: document randomTrap 2016-03-21 08:36:38 +00:00
io
log
math math/big: fix rounding to smallest denormal for Float.Float32/64 2016-03-21 20:24:06 +00:00
mime
net all: delete dead test code 2016-03-21 07:10:08 +00:00
os
path
reflect all: delete dead test code 2016-03-21 07:10:08 +00:00
regexp all: delete dead test code 2016-03-21 07:10:08 +00:00
runtime runtime: use MOVSB instead of MOVSQ for unaligned moves 2016-03-21 19:10:24 +00:00
sort
strconv
strings
sync sync: don't assume b.N > 0 2016-03-18 16:37:39 +00:00
syscall syscall: change clone argument order on s390x 2016-03-21 08:59:18 +00:00
testing testing: add test for not exceeding maximum parallism 2016-03-21 16:52:04 +00:00
text
time
unicode
unsafe
vendor
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash cmd/dist: redo flag-passing for bootstrap 2016-03-18 19:00:03 +00:00
make.bat
Make.dist
make.rc
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc