diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2013-03-23 11:28:53 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-03-23 11:28:53 +0100 |
commit | b39e15dde5ec7b96c15da9faf4ab5892501c1aae (patch) | |
tree | 718cede1f6ca97d082c6c40b7dc3f4f6148253c0 /src/cmd/gc/subr.c | |
parent | 04b08da9af0c450d645ab7389d1467308cfc2db8 (diff) | |
download | golang-upstream/1.1_hg20130323.tar.gz |
Imported Upstream version 1.1~hg20130323upstream/1.1_hg20130323
Diffstat (limited to 'src/cmd/gc/subr.c')
-rw-r--r-- | src/cmd/gc/subr.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index c53eaf285..796851f1a 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -2565,6 +2565,7 @@ genwrapper(Type *rcvr, Type *method, Sym *newnam, int iface) fn->dupok = 1; typecheck(&fn, Etop); typechecklist(fn->nbody, Etop); + inlcalls(fn); curfn = nil; funccompile(fn, 0); } @@ -3722,3 +3723,17 @@ isbadimport(Strlit *path) } return 0; } + +void +checknotnil(Node *x, NodeList **init) +{ + Node *n; + + if(isinter(x->type)) { + x = nod(OITAB, x, N); + typecheck(&x, Erv); + } + n = nod(OCHECKNOTNIL, x, N); + n->typecheck = 1; + *init = list(*init, n); +} |