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
08499446
Commit
08499446
authored
Jan 19, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: delete float, complex
rename cmplx -> complex R=ken2 CC=golang-dev
https://golang.org/cl/4071041
parent
5cfadeb0
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
19 additions
and
56 deletions
+19
-56
src/cmd/5g/cgen.c
src/cmd/5g/cgen.c
+1
-2
src/cmd/5g/galign.c
src/cmd/5g/galign.c
+0
-2
src/cmd/5g/reg.c
src/cmd/5g/reg.c
+0
-1
src/cmd/6g/galign.c
src/cmd/6g/galign.c
+0
-2
src/cmd/6g/reg.c
src/cmd/6g/reg.c
+0
-2
src/cmd/8g/cgen.c
src/cmd/8g/cgen.c
+1
-1
src/cmd/8g/galign.c
src/cmd/8g/galign.c
+0
-2
src/cmd/8g/reg.c
src/cmd/8g/reg.c
+0
-1
src/cmd/gc/align.c
src/cmd/gc/align.c
+0
-2
src/cmd/gc/const.c
src/cmd/gc/const.c
+6
-6
src/cmd/gc/cplx.c
src/cmd/gc/cplx.c
+3
-3
src/cmd/gc/go.h
src/cmd/gc/go.h
+1
-3
src/cmd/gc/lex.c
src/cmd/gc/lex.c
+1
-1
src/cmd/gc/print.c
src/cmd/gc/print.c
+2
-2
src/cmd/gc/reflect.c
src/cmd/gc/reflect.c
+0
-7
src/cmd/gc/sinit.c
src/cmd/gc/sinit.c
+0
-2
src/cmd/gc/subr.c
src/cmd/gc/subr.c
+1
-7
src/cmd/gc/typecheck.c
src/cmd/gc/typecheck.c
+2
-5
src/cmd/gc/walk.c
src/cmd/gc/walk.c
+1
-1
src/cmd/ld/dwarf.c
src/cmd/ld/dwarf.c
+0
-4
No files found.
src/cmd/5g/cgen.c
View file @
08499446
...
...
@@ -169,7 +169,7 @@ cgen(Node *n, Node *res)
case
OREAL
:
case
OIMAG
:
case
OC
MPL
X
:
case
OC
OMPLE
X
:
fatal
(
"unexpected complex"
);
break
;
...
...
@@ -879,7 +879,6 @@ bgen(Node *n, int true, Prog *to)
switch
(
n
->
op
)
{
default:
def:
a
=
ONE
;
if
(
!
true
)
a
=
OEQ
;
...
...
src/cmd/5g/galign.c
View file @
08499446
...
...
@@ -17,8 +17,6 @@ Typedef typedefs[] =
"int"
,
TINT
,
TINT32
,
"uint"
,
TUINT
,
TUINT32
,
"uintptr"
,
TUINTPTR
,
TUINT32
,
"float"
,
TFLOAT
,
TFLOAT32
,
"complex"
,
TCOMPLEX
,
TCOMPLEX64
,
0
};
...
...
src/cmd/5g/reg.c
View file @
08499446
...
...
@@ -1066,7 +1066,6 @@ allreg(uint32 b, Rgn *r)
case
TFLOAT32
:
case
TFLOAT64
:
case
TFLOAT
:
i
=
BtoF
(
~
b
);
if
(
i
&&
r
->
cost
>=
0
)
{
r
->
regno
=
i
+
NREG
;
...
...
src/cmd/6g/galign.c
View file @
08499446
...
...
@@ -17,8 +17,6 @@ Typedef typedefs[] =
"int"
,
TINT
,
TINT32
,
"uint"
,
TUINT
,
TUINT32
,
"uintptr"
,
TUINTPTR
,
TUINT64
,
"float"
,
TFLOAT
,
TFLOAT32
,
"complex"
,
TCOMPLEX
,
TCOMPLEX64
,
0
};
...
...
src/cmd/6g/reg.c
View file @
08499446
...
...
@@ -748,7 +748,6 @@ addmove(Reg *r, int bn, int rn, int f)
case
TPTR64
:
p1
->
as
=
AMOVQ
;
break
;
case
TFLOAT
:
case
TFLOAT32
:
p1
->
as
=
AMOVSS
;
break
;
...
...
@@ -1180,7 +1179,6 @@ allreg(uint32 b, Rgn *r)
case
TFLOAT32
:
case
TFLOAT64
:
case
TFLOAT
:
i
=
BtoF
(
~
b
);
if
(
i
&&
r
->
cost
>
0
)
{
r
->
regno
=
i
;
...
...
src/cmd/8g/cgen.c
View file @
08499446
...
...
@@ -174,7 +174,7 @@ cgen(Node *n, Node *res)
case
OREAL
:
case
OIMAG
:
case
OC
MPL
X
:
case
OC
OMPLE
X
:
fatal
(
"unexpected complex"
);
return
;
...
...
src/cmd/8g/galign.c
View file @
08499446
...
...
@@ -17,8 +17,6 @@ Typedef typedefs[] =
"int"
,
TINT
,
TINT32
,
"uint"
,
TUINT
,
TUINT32
,
"uintptr"
,
TUINTPTR
,
TUINT32
,
"float"
,
TFLOAT
,
TFLOAT32
,
"complex"
,
TCOMPLEX
,
TCOMPLEX64
,
0
};
...
...
src/cmd/8g/reg.c
View file @
08499446
...
...
@@ -1095,7 +1095,6 @@ allreg(uint32 b, Rgn *r)
case
TFLOAT32
:
case
TFLOAT64
:
case
TFLOAT
:
break
;
}
return
0
;
...
...
src/cmd/gc/align.c
View file @
08499446
...
...
@@ -412,11 +412,9 @@ typeinit(void)
isfloat
[
TFLOAT32
]
=
1
;
isfloat
[
TFLOAT64
]
=
1
;
isfloat
[
TFLOAT
]
=
1
;
iscomplex
[
TCOMPLEX64
]
=
1
;
iscomplex
[
TCOMPLEX128
]
=
1
;
iscomplex
[
TCOMPLEX
]
=
1
;
isptr
[
TPTR32
]
=
1
;
isptr
[
TPTR64
]
=
1
;
...
...
src/cmd/gc/const.c
View file @
08499446
...
...
@@ -980,10 +980,10 @@ defaultlit(Node **np, Type *t)
n
->
type
=
types
[
TINT
];
goto
num
;
case
CTFLT
:
n
->
type
=
types
[
TFLOAT
];
n
->
type
=
types
[
TFLOAT
64
];
goto
num
;
case
CTCPLX
:
n
->
type
=
types
[
TCOMPLEX
];
n
->
type
=
types
[
TCOMPLEX
128
];
goto
num
;
num:
if
(
t
!=
T
)
{
...
...
@@ -1034,13 +1034,13 @@ defaultlit2(Node **lp, Node **rp, int force)
if
(
!
force
)
return
;
if
(
isconst
(
l
,
CTCPLX
)
||
isconst
(
r
,
CTCPLX
))
{
convlit
(
lp
,
types
[
TCOMPLEX
]);
convlit
(
rp
,
types
[
TCOMPLEX
]);
convlit
(
lp
,
types
[
TCOMPLEX
128
]);
convlit
(
rp
,
types
[
TCOMPLEX
128
]);
return
;
}
if
(
isconst
(
l
,
CTFLT
)
||
isconst
(
r
,
CTFLT
))
{
convlit
(
lp
,
types
[
TFLOAT
]);
convlit
(
rp
,
types
[
TFLOAT
]);
convlit
(
lp
,
types
[
TFLOAT
64
]);
convlit
(
rp
,
types
[
TFLOAT
64
]);
return
;
}
convlit
(
lp
,
types
[
TINT
]);
...
...
src/cmd/gc/cplx.c
View file @
08499446
...
...
@@ -84,7 +84,7 @@ maybe:
case
OSUB
:
case
OMUL
:
case
OMINUS
:
case
OC
MPL
X
:
case
OC
OMPLE
X
:
case
OREAL
:
case
OIMAG
:
goto
yes
;
...
...
@@ -120,7 +120,7 @@ complexgen(Node *n, Node *res)
// pick off float/complex opcodes
switch
(
n
->
op
)
{
case
OC
MPL
X
:
case
OC
OMPLE
X
:
if
(
res
->
addable
)
{
subnode
(
&
n1
,
&
n2
,
res
);
tempname
(
&
tmp
,
n1
.
type
);
...
...
@@ -195,7 +195,7 @@ complexgen(Node *n, Node *res)
case
OSUB
:
case
OMUL
:
case
OMINUS
:
case
OC
MPL
X
:
case
OC
OMPLE
X
:
case
OREAL
:
case
OIMAG
:
break
;
...
...
src/cmd/gc/go.h
View file @
08499446
...
...
@@ -390,7 +390,7 @@ enum
ORUNESTR
,
OSELRECV
,
OIOTA
,
OREAL
,
OIMAG
,
OC
MPL
X
,
OREAL
,
OIMAG
,
OC
OMPLE
X
,
// stmts
OBLOCK
,
...
...
@@ -440,11 +440,9 @@ enum
TCOMPLEX64
,
// 12
TCOMPLEX128
,
TCOMPLEX
,
TFLOAT32
,
// 15
TFLOAT64
,
TFLOAT
,
TBOOL
,
// 18
...
...
src/cmd/gc/lex.c
View file @
08499446
...
...
@@ -1531,7 +1531,7 @@ static struct
"cap"
,
LNAME
,
Txxx
,
OCAP
,
"close"
,
LNAME
,
Txxx
,
OCLOSE
,
"closed"
,
LNAME
,
Txxx
,
OCLOSED
,
"c
mplx"
,
LNAME
,
Txxx
,
OCMPL
X
,
"c
omplex"
,
LNAME
,
Txxx
,
OCOMPLE
X
,
"copy"
,
LNAME
,
Txxx
,
OCOPY
,
"imag"
,
LNAME
,
Txxx
,
OIMAG
,
"len"
,
LNAME
,
Txxx
,
OLEN
,
...
...
src/cmd/gc/print.c
View file @
08499446
...
...
@@ -365,8 +365,8 @@ exprfmt(Fmt *f, Node *n, int prec)
fmtprint
(
f
,
")"
);
break
;
case
OC
MPL
X
:
fmtprint
(
f
,
"c
mpl
x("
);
case
OC
OMPLE
X
:
fmtprint
(
f
,
"c
omple
x("
);
exprfmt
(
f
,
n
->
left
,
0
);
fmtprint
(
f
,
", "
);
exprfmt
(
f
,
n
->
right
,
0
);
...
...
src/cmd/gc/reflect.c
View file @
08499446
...
...
@@ -419,10 +419,8 @@ enum {
KindUint32
,
KindUint64
,
KindUintptr
,
KindFloat
,
KindFloat32
,
KindFloat64
,
KindComplex
,
KindComplex64
,
KindComplex128
,
KindArray
,
...
...
@@ -453,7 +451,6 @@ kinds[] =
[
TINT64
]
=
KindInt64
,
[
TUINT64
]
=
KindUint64
,
[
TUINTPTR
]
=
KindUintptr
,
[
TFLOAT
]
=
KindFloat
,
[
TFLOAT32
]
=
KindFloat32
,
[
TFLOAT64
]
=
KindFloat64
,
[
TBOOL
]
=
KindBool
,
...
...
@@ -466,7 +463,6 @@ kinds[] =
[
TMAP
]
=
KindMap
,
[
TARRAY
]
=
KindArray
,
[
TFUNC
]
=
KindFunc
,
[
TCOMPLEX
]
=
KindComplex
,
[
TCOMPLEX64
]
=
KindComplex64
,
[
TCOMPLEX128
]
=
KindComplex128
,
};
...
...
@@ -485,10 +481,8 @@ structnames[] =
[
TINT64
]
=
"*runtime.IntType"
,
[
TUINT64
]
=
"*runtime.UintType"
,
[
TUINTPTR
]
=
"*runtime.UintType"
,
[
TCOMPLEX
]
=
"*runtime.ComplexType"
,
[
TCOMPLEX64
]
=
"*runtime.ComplexType"
,
[
TCOMPLEX128
]
=
"*runtime.ComplexType"
,
[
TFLOAT
]
=
"*runtime.FloatType"
,
[
TFLOAT32
]
=
"*runtime.FloatType"
,
[
TFLOAT64
]
=
"*runtime.FloatType"
,
[
TBOOL
]
=
"*runtime.BoolType"
,
...
...
@@ -542,7 +536,6 @@ haspointers(Type *t)
case
TINT64
:
case
TUINT64
:
case
TUINTPTR
:
case
TFLOAT
:
case
TFLOAT32
:
case
TFLOAT64
:
case
TBOOL
:
...
...
src/cmd/gc/sinit.c
View file @
08499446
...
...
@@ -917,14 +917,12 @@ gen_as_init(Node *n)
case
TPTR64
:
case
TFLOAT32
:
case
TFLOAT64
:
case
TFLOAT
:
gused
(
N
);
// in case the data is the dest of a goto
gdata
(
&
nam
,
nr
,
nr
->
type
->
width
);
break
;
case
TCOMPLEX64
:
case
TCOMPLEX128
:
case
TCOMPLEX
:
gused
(
N
);
// in case the data is the dest of a goto
gdatacomplex
(
&
nam
,
nr
->
val
.
u
.
cval
);
break
;
...
...
src/cmd/gc/subr.c
View file @
08499446
...
...
@@ -836,7 +836,7 @@ goopnames[] =
[
OCASE
]
=
"case"
,
[
OCLOSED
]
=
"closed"
,
[
OCLOSE
]
=
"close"
,
[
OC
MPLX
]
=
"cmpl
x"
,
[
OC
OMPLEX
]
=
"comple
x"
,
[
OCOM
]
=
"^"
,
[
OCONTINUE
]
=
"continue"
,
[
OCOPY
]
=
"copy"
,
...
...
@@ -993,10 +993,8 @@ etnames[] =
[
TINT64
]
=
"INT64"
,
[
TUINT64
]
=
"UINT64"
,
[
TUINTPTR
]
=
"UINTPTR"
,
[
TFLOAT
]
=
"FLOAT"
,
[
TFLOAT32
]
=
"FLOAT32"
,
[
TFLOAT64
]
=
"FLOAT64"
,
[
TCOMPLEX
]
=
"COMPLEX"
,
[
TCOMPLEX64
]
=
"COMPLEX64"
,
[
TCOMPLEX128
]
=
"COMPLEX128"
,
[
TBOOL
]
=
"BOOL"
,
...
...
@@ -1117,10 +1115,8 @@ basicnames[] =
[
TINT64
]
=
"int64"
,
[
TUINT64
]
=
"uint64"
,
[
TUINTPTR
]
=
"uintptr"
,
[
TFLOAT
]
=
"float"
,
[
TFLOAT32
]
=
"float32"
,
[
TFLOAT64
]
=
"float64"
,
[
TCOMPLEX
]
=
"complex"
,
[
TCOMPLEX64
]
=
"complex64"
,
[
TCOMPLEX128
]
=
"complex128"
,
[
TBOOL
]
=
"bool"
,
...
...
@@ -1752,8 +1748,6 @@ int
cplxsubtype
(
int
et
)
{
switch
(
et
)
{
case
TCOMPLEX
:
return
TFLOAT
;
case
TCOMPLEX64
:
return
TFLOAT32
;
case
TCOMPLEX128
:
...
...
src/cmd/gc/typecheck.c
View file @
08499446
...
...
@@ -852,7 +852,7 @@ reswitch:
n
->
type
=
types
[
TINT
];
goto
ret
;
case
OC
MPL
X
:
case
OC
OMPLE
X
:
ok
|=
Erv
;
if
(
twoarg
(
n
)
<
0
)
goto
error
;
...
...
@@ -865,7 +865,7 @@ reswitch:
n
->
right
=
r
;
if
(
l
->
type
->
etype
!=
r
->
type
->
etype
)
{
badcmplx:
yyerror
(
"invalid operation: %#N (c
mpl
x of types %T, %T)"
,
n
,
l
->
type
,
r
->
type
);
yyerror
(
"invalid operation: %#N (c
omple
x of types %T, %T)"
,
n
,
l
->
type
,
r
->
type
);
goto
error
;
}
switch
(
l
->
type
->
etype
)
{
...
...
@@ -874,9 +874,6 @@ reswitch:
case
TIDEAL
:
t
=
types
[
TIDEAL
];
break
;
case
TFLOAT
:
t
=
types
[
TCOMPLEX
];
break
;
case
TFLOAT32
:
t
=
types
[
TCOMPLEX64
];
break
;
...
...
src/cmd/gc/walk.c
View file @
08499446
...
...
@@ -671,7 +671,7 @@ walkexpr(Node **np, NodeList **init)
case
OGE
:
case
OGT
:
case
OADD
:
case
OC
MPL
X
:
case
OC
OMPLE
X
:
walkexpr
(
&
n
->
left
,
init
);
walkexpr
(
&
n
->
right
,
init
);
goto
ret
;
...
...
src/cmd/ld/dwarf.c
View file @
08499446
...
...
@@ -768,10 +768,8 @@ enum {
KindUint32
,
KindUint64
,
KindUintptr
,
KindFloat
,
KindFloat32
,
KindFloat64
,
KindComplex
,
KindComplex64
,
KindComplex128
,
KindArray
,
...
...
@@ -1049,7 +1047,6 @@ defgotype(Sym *gotype)
newattr
(
die
,
DW_AT_byte_size
,
DW_CLS_CONSTANT
,
bytesize
,
0
);
break
;
case
KindFloat
:
case
KindFloat32
:
case
KindFloat64
:
die
=
newdie
(
&
dwtypes
,
DW_ABRV_BASETYPE
,
name
);
...
...
@@ -1057,7 +1054,6 @@ defgotype(Sym *gotype)
newattr
(
die
,
DW_AT_byte_size
,
DW_CLS_CONSTANT
,
bytesize
,
0
);
break
;
case
KindComplex
:
case
KindComplex64
:
case
KindComplex128
:
die
=
newdie
(
&
dwtypes
,
DW_ABRV_BASETYPE
,
name
);
...
...
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