]> Cypherpunks repositories - gostls13.git/commitdiff
gc: cut some dead code, fix 6g -S output
authorRuss Cox <rsc@golang.org>
Mon, 25 Jan 2010 06:36:26 +0000 (22:36 -0800)
committerRuss Cox <rsc@golang.org>
Mon, 25 Jan 2010 06:36:26 +0000 (22:36 -0800)
R=ken2
CC=golang-dev
https://golang.org/cl/193079

src/cmd/gc/export.c
src/cmd/gc/go.h
src/cmd/gc/go.y
src/cmd/gc/lex.c

index 16e6097953efa5c19f6d9dbcd985e3dc6679d899..ec1c135d82ef90ecf3ce0c7ee1d86189927e82df 100644 (file)
@@ -384,54 +384,3 @@ importmethod(Sym *s, Type *t)
        addmethod(s, t, 0);
 }
 
-/*
- * ******* import *******
- */
-
-void
-checkimports(void)
-{
-       Sym *s;
-       Type *t, *t1;
-       uint32 h;
-       int et;
-
-return;
-
-       for(h=0; h<NHASH; h++)
-       for(s = hash[h]; s != S; s = s->link) {
-               if(s->def == N || s->def->op != OTYPE)
-                       continue;
-               t = s->def->type;
-               if(t == T)
-                       continue;
-
-               et = t->etype;
-               switch(t->etype) {
-               case TFORW:
-                       print("ci-1: %S %lT\n", s, t);
-                       break;
-
-               case TPTR32:
-               case TPTR64:
-                       if(t->type == T) {
-                               print("ci-2: %S %lT\n", s, t);
-                               break;
-                       }
-
-                       t1 = t->type;
-                       if(t1 == T) {
-                               print("ci-3: %S %lT\n", s, t1);
-                               break;
-                       }
-
-                       et = t1->etype;
-                       if(et == TFORW) {
-                               print("%L: ci-4: %S %lT\n", lineno, s, t);
-                               break;
-                       }
-                       break;
-               }
-       }
-}
-
index cb0b1a119ec9a471e2542d8c4054d66dcb126e62..ac9e5c6f3fa990ec1c94e76589ea6be01eaac30b 100644 (file)
@@ -1025,7 +1025,6 @@ void      importconst(Sym *s, Type *t, Node *v);
 void   importmethod(Sym *s, Type *t);
 void   importtype(Type *s, Type *t);
 void   importvar(Sym *s, Type *t, int ctxt);
-void   checkimports(void);
 Type*  pkgtype(Sym*);
 Sym*   importsym(Sym*, int);
 
index bc543d5e346f5a9403060bc053fcc17f281c294f..8882f7f2e5d1f6803bd18abb9f19bfdd806455ad 100644 (file)
@@ -253,7 +253,6 @@ import_there:
        hidden_import_list '$' '$'
        {
                resumecheckwidth();
-               checkimports();
                unimportfile();
        }
 
index efbb11631dc80233fe161f9e64c835c4e2611fe8..03f5b473c4c3a0ae25467842e7e385e7982f20c1 100644 (file)
@@ -27,12 +27,22 @@ main(int argc, char *argv[])
        localpkg->prefix = "\"\"";
 
        builtinpkg = mkpkg(strlit("go.builtin"));
+
        gostringpkg = mkpkg(strlit("go.string"));
-       gostringpkg->prefix = "go.string";
+       gostringpkg->name = "go.string";
+       gostringpkg->prefix = "go.string";      // not go%2estring
+
        runtimepkg = mkpkg(strlit("runtime"));
+       runtimepkg->name = "runtime";
+
        stringpkg = mkpkg(strlit("string"));
+       stringpkg->name = "string";
+
        typepkg = mkpkg(strlit("type"));
+       typepkg->name = "type";
+
        unsafepkg = mkpkg(strlit("unsafe"));
+       unsafepkg->name = "unsafe";
 
        goroot = getgoroot();
        goos = getgoos();