mirror of
https://github.com/golang/go
synced 2024-11-20 03:04:40 -07:00
undo CL 5375043 / ea8b178f9b73
Never lasts long. ««« original CL description gc: add GOEXPERIMENT=reorg This won't last long but may ease conversions. R=ken2 CC=golang-dev https://golang.org/cl/5375043 »»» R=ken2, ken CC=golang-dev https://golang.org/cl/5370043
This commit is contained in:
parent
ae7a003cf9
commit
1eadb89ee1
@ -852,7 +852,6 @@ EXTERN int typecheckok;
|
|||||||
EXTERN int compiling_runtime;
|
EXTERN int compiling_runtime;
|
||||||
|
|
||||||
EXTERN int rune32;
|
EXTERN int rune32;
|
||||||
EXTERN int reorg;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* y.tab.c
|
* y.tab.c
|
||||||
|
@ -18,8 +18,6 @@ int windows;
|
|||||||
int yyprev;
|
int yyprev;
|
||||||
int yylast;
|
int yylast;
|
||||||
|
|
||||||
Strlit *reorgpath(Strlit*);
|
|
||||||
|
|
||||||
static void lexinit(void);
|
static void lexinit(void);
|
||||||
static void lexinit1(void);
|
static void lexinit1(void);
|
||||||
static void lexfini(void);
|
static void lexfini(void);
|
||||||
@ -40,7 +38,6 @@ static struct {
|
|||||||
int *val;
|
int *val;
|
||||||
} exper[] = {
|
} exper[] = {
|
||||||
{"rune32", &rune32},
|
{"rune32", &rune32},
|
||||||
{"reorg", &reorg},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -540,9 +537,6 @@ importfile(Val *f, int line)
|
|||||||
yyerror("import path contains NUL");
|
yyerror("import path contains NUL");
|
||||||
errorexit();
|
errorexit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(reorg)
|
|
||||||
f->u.sval = reorgpath(f->u.sval);
|
|
||||||
|
|
||||||
// The package name main is no longer reserved,
|
// The package name main is no longer reserved,
|
||||||
// but we reserve the import path "main" to identify
|
// but we reserve the import path "main" to identify
|
||||||
@ -2121,47 +2115,3 @@ mkpackage(char* pkgname)
|
|||||||
outfile = smprint("%s.%c", namebuf, thechar);
|
outfile = smprint("%s.%c", namebuf, thechar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct {
|
|
||||||
char *old;
|
|
||||||
char *xnew;
|
|
||||||
} reorgtab[] = {
|
|
||||||
{"asn1", "encoding/asn1"},
|
|
||||||
{"big", "math/big"},
|
|
||||||
{"cmath", "math/cmplx"},
|
|
||||||
{"csv", "encoding/csv"},
|
|
||||||
{"exec", "os/exec"},
|
|
||||||
{"exp/template/html", "html/template"},
|
|
||||||
{"gob", "encoding/gob"},
|
|
||||||
{"http", "net/http"},
|
|
||||||
{"http/cgi", "net/http/cgi"},
|
|
||||||
{"http/fcgi", "net/http/fcgi"},
|
|
||||||
{"http/httptest", "net/http/httptest"},
|
|
||||||
{"http/pprof", "net/http/pprof"},
|
|
||||||
{"json", "encoding/json"},
|
|
||||||
{"mail", "net/mail"},
|
|
||||||
{"rpc", "net/rpc"},
|
|
||||||
{"rpc/jsonrpc", "net/rpc/jsonrpc"},
|
|
||||||
{"scanner", "text/scanner"},
|
|
||||||
{"smtp", "net/smtp"},
|
|
||||||
{"syslog", "log/syslog"},
|
|
||||||
{"tabwriter", "text/tabwriter"},
|
|
||||||
{"template", "text/template"},
|
|
||||||
{"template/parse", "text/template/parse"},
|
|
||||||
{"rand", "math/rand"},
|
|
||||||
{"url", "net/url"},
|
|
||||||
{"utf16", "unicode/utf16"},
|
|
||||||
{"utf8", "unicode/utf8"},
|
|
||||||
{"xml", "encoding/xml"},
|
|
||||||
};
|
|
||||||
|
|
||||||
Strlit*
|
|
||||||
reorgpath(Strlit *s)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for(i=0; i < nelem(reorgtab); i++)
|
|
||||||
if(strcmp(s->s, reorgtab[i].old) == 0)
|
|
||||||
return strlit(reorgtab[i].xnew);
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user