Commit 1fe42e2d authored by Rob Pike's avatar Rob Pike

delete float80 from libraries

R=rsc
DELTA=40  (0 added, 38 deleted, 2 changed)
OCL=25969
CL=25969
parent 3bc6fd63
...@@ -315,8 +315,6 @@ func getFloat64(v reflect.Value) (val float64, ok bool) { ...@@ -315,8 +315,6 @@ func getFloat64(v reflect.Value) (val float64, ok bool) {
} }
case reflect.Float64Kind: case reflect.Float64Kind:
return float64(v.(reflect.Float64Value).Get()), true; return float64(v.(reflect.Float64Value).Get()), true;
case reflect.Float80Kind:
break; // TODO: what to do here?
} }
return 0.0, false; return 0.0, false;
} }
...@@ -388,7 +386,7 @@ func (p *pp) printField(field reflect.Value) (was_string bool) { ...@@ -388,7 +386,7 @@ func (p *pp) printField(field reflect.Value) (was_string bool) {
case reflect.Float32Kind: case reflect.Float32Kind:
v, ok := getFloat32(field); v, ok := getFloat32(field);
s = p.fmt.Fmt_g32(v).Str(); s = p.fmt.Fmt_g32(v).Str();
case reflect.Float64Kind, reflect.Float80Kind: case reflect.Float64Kind:
v, ok := getFloat64(field); v, ok := getFloat64(field);
s = p.fmt.Fmt_g64(v).Str(); s = p.fmt.Fmt_g64(v).Str();
case reflect.FloatKind: case reflect.FloatKind:
......
...@@ -108,7 +108,6 @@ func TestAll(tt *testing.T) { // TODO(r): wrap up better ...@@ -108,7 +108,6 @@ func TestAll(tt *testing.T) { // TODO(r): wrap up better
typedump("float", "float"); typedump("float", "float");
typedump("float32", "float32"); typedump("float32", "float32");
typedump("float64", "float64"); typedump("float64", "float64");
typedump("float80", "float80");
typedump("int8", "int8"); typedump("int8", "int8");
typedump("whoknows.whatsthis", "$missing$"); typedump("whoknows.whatsthis", "$missing$");
typedump("**int8", "**int8"); typedump("**int8", "**int8");
......
...@@ -78,7 +78,7 @@ func typeToString(typ Type, expand bool) string { ...@@ -78,7 +78,7 @@ func typeToString(typ Type, expand bool) string {
return "$missing$"; return "$missing$";
case IntKind, Int8Kind, Int16Kind, Int32Kind, Int64Kind, case IntKind, Int8Kind, Int16Kind, Int32Kind, Int64Kind,
UintKind, Uint8Kind, Uint16Kind, Uint32Kind, Uint64Kind, UintKind, Uint8Kind, Uint16Kind, Uint32Kind, Uint64Kind,
FloatKind, Float32Kind, Float64Kind, Float80Kind, FloatKind, Float32Kind, Float64Kind,
StringKind, StringKind,
DotDotDotKind: DotDotDotKind:
return typ.Name(); return typ.Name();
...@@ -170,8 +170,6 @@ func valueToString(val Value) string { ...@@ -170,8 +170,6 @@ func valueToString(val Value) string {
return strconv.Ftoa32(val.(Float32Value).Get(), 'g', -1); return strconv.Ftoa32(val.(Float32Value).Get(), 'g', -1);
case Float64Kind: case Float64Kind:
return strconv.Ftoa64(val.(Float64Value).Get(), 'g', -1); return strconv.Ftoa64(val.(Float64Value).Get(), 'g', -1);
case Float80Kind:
return "float80";
case StringKind: case StringKind:
return val.(StringValue).Get(); return val.(StringValue).Get();
case BoolKind: case BoolKind:
......
...@@ -33,7 +33,6 @@ const ( ...@@ -33,7 +33,6 @@ const (
FloatKind; FloatKind;
Float32Kind; Float32Kind;
Float64Kind; Float64Kind;
Float80Kind;
FuncKind; FuncKind;
IntKind; IntKind;
Int16Kind; Int16Kind;
...@@ -140,7 +139,6 @@ var ( ...@@ -140,7 +139,6 @@ var (
Float = newBasicType("float", FloatKind, unsafe.Sizeof(float(0))); Float = newBasicType("float", FloatKind, unsafe.Sizeof(float(0)));
Float32 = newBasicType("float32", Float32Kind, 4); Float32 = newBasicType("float32", Float32Kind, 4);
Float64 = newBasicType("float64", Float64Kind, 8); Float64 = newBasicType("float64", Float64Kind, 8);
Float80 = newBasicType("float80", Float80Kind, 10); // TODO: strange size?
String = newBasicType("string", StringKind, unsafe.Sizeof("")); String = newBasicType("string", StringKind, unsafe.Sizeof(""));
) )
...@@ -467,7 +465,6 @@ func init() { ...@@ -467,7 +465,6 @@ func init() {
types["float"] = Float; types["float"] = Float;
types["float32"] = Float32; types["float32"] = Float32;
types["float64"] = Float64; types["float64"] = Float64;
types["float80"] = Float80;
types["string"] = String; types["string"] = String;
types["bool"] = Bool; types["bool"] = Bool;
...@@ -490,7 +487,6 @@ func init() { ...@@ -490,7 +487,6 @@ func init() {
basicstub["float"] = newStubType("float", Float); basicstub["float"] = newStubType("float", Float);
basicstub["float32"] = newStubType("float32", Float32); basicstub["float32"] = newStubType("float32", Float32);
basicstub["float64"] = newStubType("float64", Float64); basicstub["float64"] = newStubType("float64", Float64);
basicstub["float80"] = newStubType("float80", Float80);
basicstub["string"] = newStubType("string", String); basicstub["string"] = newStubType("string", String);
basicstub["bool"] = newStubType("bool", Bool); basicstub["bool"] = newStubType("bool", Bool);
......
...@@ -438,34 +438,6 @@ func (v *float64ValueStruct) Set(f float64) { ...@@ -438,34 +438,6 @@ func (v *float64ValueStruct) Set(f float64) {
*(*float64)(v.addr) = f *(*float64)(v.addr) = f
} }
// -- Float80
// Float80Value represents a float80 value.
type Float80Value interface {
Value;
Get() float80; // Get the underlying float80.
Set(float80); // Get the underlying float80.
}
type float80ValueStruct struct {
commonValue
}
func float80Creator(typ Type, addr Addr) Value {
return &float80ValueStruct{ commonValue{Float80Kind, typ, addr} }
}
/*
BUG: can't gen code for float80s
func (v *Float80ValueStruct) Get() float80 {
return *(*float80)(v.addr)
}
func (v *Float80ValueStruct) Set(f float80) {
*(*float80)(v.addr) = f
}
*/
// -- String // -- String
// StringValue represents a string value. // StringValue represents a string value.
...@@ -819,7 +791,6 @@ var creator = map[int] creatorFn { ...@@ -819,7 +791,6 @@ var creator = map[int] creatorFn {
FloatKind : floatCreator, FloatKind : floatCreator,
Float32Kind : float32Creator, Float32Kind : float32Creator,
Float64Kind : float64Creator, Float64Kind : float64Creator,
Float80Kind : float80Creator,
StringKind : stringCreator, StringKind : stringCreator,
BoolKind : boolCreator, BoolKind : boolCreator,
PtrKind : ptrCreator, PtrKind : ptrCreator,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment