Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
fd150e77
Commit
fd150e77
authored
Jan 24, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: cut some dead code, fix 6g -S output
R=ken2 CC=golang-dev
https://golang.org/cl/193079
parent
5c7b0caa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
54 deletions
+11
-54
src/cmd/gc/export.c
src/cmd/gc/export.c
+0
-51
src/cmd/gc/go.h
src/cmd/gc/go.h
+0
-1
src/cmd/gc/go.y
src/cmd/gc/go.y
+0
-1
src/cmd/gc/lex.c
src/cmd/gc/lex.c
+11
-1
No files found.
src/cmd/gc/export.c
View file @
fd150e77
...
...
@@ -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
;
}
}
}
src/cmd/gc/go.h
View file @
fd150e77
...
...
@@ -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
);
...
...
src/cmd/gc/go.y
View file @
fd150e77
...
...
@@ -253,7 +253,6 @@ import_there:
hidden_import_list
'$'
'$'
{
resumecheckwidth
();
checkimports
();
unimportfile
();
}
...
...
src/cmd/gc/lex.c
View file @
fd150e77
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment