delete export
TBR=r
OCL=23121
CL=23127
diff --git a/src/lib/reflect/all_test.go b/src/lib/reflect/all_test.go
index 4ad8abd..631a566 100644
--- a/src/lib/reflect/all_test.go
+++ b/src/lib/reflect/all_test.go
@@ -87,9 +87,9 @@
assert(reflect.ValueToString(v), t);
}
-export type T struct { a int; b float64; c string; d *int }
+type T struct { a int; b float64; c string; d *int }
-export func TestAll(tt *testing.T) { // TODO(r): wrap up better
+func TestAll(tt *testing.T) { // TODO(r): wrap up better
var s string;
var t reflect.Type;
@@ -285,7 +285,7 @@
}
}
-export func TestInterfaceGet(t *testing.T) {
+func TestInterfaceGet(t *testing.T) {
var inter struct { e interface{ } };
inter.e = 123.456;
v1 := reflect.NewValue(&inter);
@@ -296,7 +296,7 @@
assert(v3.Type().String(), "float");
}
-export func TestCopyArray(t *testing.T) {
+func TestCopyArray(t *testing.T) {
a := []int{ 1, 2, 3, 4, 10, 9, 8, 7 };
b := []int{ 11, 22, 33, 44, 1010, 99, 88, 77, 66, 55, 44 };
c := []int{ 11, 22, 33, 44, 1010, 99, 88, 77, 66, 55, 44 };
@@ -331,7 +331,7 @@
}
}
-export func TestBigUnnamedStruct(t *testing.T) {
+func TestBigUnnamedStruct(t *testing.T) {
b := struct{a,b,c,d int64}{1, 2, 3, 4};
v := NewValue(b);
b1 := v.Interface().(struct{a,b,c,d int64});
@@ -343,7 +343,7 @@
type big struct {
a, b, c, d, e int64
}
-export func TestBigStruct(t *testing.T) {
+func TestBigStruct(t *testing.T) {
b := big{1, 2, 3, 4, 5};
v := NewValue(b);
b1 := v.Interface().(big);
diff --git a/src/lib/reflect/tostring.go b/src/lib/reflect/tostring.go
index d451e55..38d9d91 100644
--- a/src/lib/reflect/tostring.go
+++ b/src/lib/reflect/tostring.go
@@ -12,8 +12,8 @@
"strconv";
)
-export func TypeToString(typ Type, expand bool) string
-export func ValueToString(val Value) string
+func TypeToString(typ Type, expand bool) string
+func ValueToString(val Value) string
func doubleQuote(s string) string {
out := "\"";
@@ -62,7 +62,7 @@
return str;
}
-export func TypeToString(typ Type, expand bool) string {
+func TypeToString(typ Type, expand bool) string {
var str string;
if name := typ.Name(); !expand && name != "" {
return name
@@ -126,7 +126,7 @@
return strconv.Itoa64(v);
}
-export func ValueToString(val Value) string {
+func ValueToString(val Value) string {
var str string;
typ := val.Type();
switch(val.Kind()) {
diff --git a/src/lib/reflect/type.go b/src/lib/reflect/type.go
index a7e8f7f..1095ccb 100644
--- a/src/lib/reflect/type.go
+++ b/src/lib/reflect/type.go
@@ -12,13 +12,13 @@
"sync";
)
-export type Type interface
+type Type interface
-export func ExpandType(name string) Type
+func ExpandType(name string) Type
func typestrings() string // implemented in C; declared here
-export const (
+const (
MissingKind = iota;
ArrayKind;
BoolKind;
@@ -54,7 +54,7 @@
var missingString = "$missing$" // syntactic name for undefined type names
var dotDotDotString = "..."
-export type Type interface {
+type Type interface {
Kind() int;
Name() string;
String() string;
@@ -102,7 +102,7 @@
}
// Prebuilt basic types
-export var (
+var (
Missing = newBasicType(missingString, MissingKind, 1);
DotDotDot = newBasicType(dotDotDotString, DotDotDotKind, 16); // TODO(r): size of interface?
Bool = newBasicType("bool", BoolKind, 1); // TODO: need to know how big a bool is
@@ -145,7 +145,7 @@
// -- Pointer
-export type PtrType interface {
+type PtrType interface {
Sub() Type
}
@@ -164,7 +164,7 @@
// -- Array
-export type ArrayType interface {
+type ArrayType interface {
Open() bool;
Len() int;
Elem() Type;
@@ -203,7 +203,7 @@
// -- Map
-export type MapType interface {
+type MapType interface {
Key() Type;
Elem() Type;
}
@@ -228,12 +228,12 @@
// -- Chan
-export type ChanType interface {
+type ChanType interface {
Dir() int;
Elem() Type;
}
-export const ( // channel direction
+const ( // channel direction
SendDir = 1 << iota;
RecvDir;
BothDir = SendDir | RecvDir;
@@ -259,7 +259,7 @@
// -- Struct
-export type StructType interface {
+type StructType interface {
Field(int) (name string, typ Type, tag string, offset int);
Len() int;
}
@@ -319,7 +319,7 @@
// -- Interface
-export type InterfaceType interface {
+type InterfaceType interface {
Field(int) (name string, typ Type, tag string, offset int);
Len() int;
}
@@ -345,7 +345,7 @@
// -- Func
-export type FuncType interface {
+type FuncType interface {
In() StructType;
Out() StructType;
}
@@ -842,7 +842,7 @@
return s;
}
-export func ParseTypeString(name, typestring string) Type {
+func ParseTypeString(name, typestring string) Type {
if typestring == "" {
// If the typestring is empty, it represents (the type of) a nil interface value
return nilInterface
@@ -902,7 +902,7 @@
}
// Type is known by name. Find (and create if necessary) its real type.
-export func ExpandType(name string) Type {
+func ExpandType(name string) Type {
lock();
t, ok := types[name];
if ok {
diff --git a/src/lib/reflect/value.go b/src/lib/reflect/value.go
index ebd3c5f..f1651a2 100644
--- a/src/lib/reflect/value.go
+++ b/src/lib/reflect/value.go
@@ -12,13 +12,13 @@
"unsafe";
)
-export type Addr unsafe.pointer
+type Addr unsafe.Pointer
func equalType(a, b Type) bool {
return a.String() == b.String()
}
-export type Value interface {
+type Value interface {
Kind() int;
Type() Type;
Addr() Addr;
@@ -65,7 +65,7 @@
// -- Missing
-export type MissingValue interface {
+type MissingValue interface {
Kind() int;
Type() Type;
Addr() Addr;
@@ -81,7 +81,7 @@
// -- Int
-export type IntValue interface {
+type IntValue interface {
Kind() int;
Get() int;
Set(int);
@@ -106,7 +106,7 @@
// -- Int8
-export type Int8Value interface {
+type Int8Value interface {
Kind() int;
Get() int8;
Set(int8);
@@ -131,7 +131,7 @@
// -- Int16
-export type Int16Value interface {
+type Int16Value interface {
Kind() int;
Get() int16;
Set(int16);
@@ -156,7 +156,7 @@
// -- Int32
-export type Int32Value interface {
+type Int32Value interface {
Kind() int;
Get() int32;
Set(int32);
@@ -181,7 +181,7 @@
// -- Int64
-export type Int64Value interface {
+type Int64Value interface {
Kind() int;
Get() int64;
Set(int64);
@@ -206,7 +206,7 @@
// -- Uint
-export type UintValue interface {
+type UintValue interface {
Kind() int;
Get() uint;
Set(uint);
@@ -231,7 +231,7 @@
// -- Uint8
-export type Uint8Value interface {
+type Uint8Value interface {
Kind() int;
Get() uint8;
Set(uint8);
@@ -256,7 +256,7 @@
// -- Uint16
-export type Uint16Value interface {
+type Uint16Value interface {
Kind() int;
Get() uint16;
Set(uint16);
@@ -281,7 +281,7 @@
// -- Uint32
-export type Uint32Value interface {
+type Uint32Value interface {
Kind() int;
Get() uint32;
Set(uint32);
@@ -306,7 +306,7 @@
// -- Uint64
-export type Uint64Value interface {
+type Uint64Value interface {
Kind() int;
Get() uint64;
Set(uint64);
@@ -331,7 +331,7 @@
// -- Uintptr
-export type UintptrValue interface {
+type UintptrValue interface {
Kind() int;
Get() uintptr;
Set(uintptr);
@@ -356,7 +356,7 @@
// -- Float
-export type FloatValue interface {
+type FloatValue interface {
Kind() int;
Get() float;
Set(float);
@@ -381,7 +381,7 @@
// -- Float32
-export type Float32Value interface {
+type Float32Value interface {
Kind() int;
Get() float32;
Set(float32);
@@ -406,7 +406,7 @@
// -- Float64
-export type Float64Value interface {
+type Float64Value interface {
Kind() int;
Get() float64;
Set(float64);
@@ -431,7 +431,7 @@
// -- Float80
-export type Float80Value interface {
+type Float80Value interface {
Kind() int;
Get() float80;
Set(float80);
@@ -459,7 +459,7 @@
// -- String
-export type StringValue interface {
+type StringValue interface {
Kind() int;
Get() string;
Set(string);
@@ -484,7 +484,7 @@
// -- Bool
-export type BoolValue interface {
+type BoolValue interface {
Kind() int;
Get() bool;
Set(bool);
@@ -509,7 +509,7 @@
// -- Pointer
-export type PtrValue interface {
+type PtrValue interface {
Kind() int;
Type() Type;
Sub() Value;
@@ -545,7 +545,7 @@
// -- Array
-export type ArrayValue interface {
+type ArrayValue interface {
Kind() int;
Type() Type;
Open() bool;
@@ -652,7 +652,7 @@
// -- Map TODO: finish and test
-export type MapValue interface {
+type MapValue interface {
Kind() int;
Type() Type;
Len() int;
@@ -678,7 +678,7 @@
// -- Chan
-export type ChanValue interface {
+type ChanValue interface {
Kind() int;
Type() Type;
}
@@ -693,7 +693,7 @@
// -- Struct
-export type StructValue interface {
+type StructValue interface {
Kind() int;
Type() Type;
Len() int;
@@ -728,7 +728,7 @@
// -- Interface
-export type InterfaceValue interface {
+type InterfaceValue interface {
Kind() int;
Type() Type;
Get() interface {};
@@ -748,7 +748,7 @@
// -- Func
-export type FuncValue interface {
+type FuncValue interface {
Kind() int;
Type() Type;
}
@@ -799,7 +799,7 @@
return c(typ, addr);
}
-export func NewInitValue(typ Type) Value {
+func NewInitValue(typ Type) Value {
// Some values cannot be made this way.
switch typ.Kind() {
case FuncKind: // must be pointers, at least for now (TODO?)
@@ -825,7 +825,7 @@
uint32 cap; // allocated number of elements
};
*/
-export func NewOpenArrayValue(typ ArrayType, len, cap int) ArrayValue {
+func NewOpenArrayValue(typ ArrayType, len, cap int) ArrayValue {
if !typ.Open() {
return nil
}
@@ -843,7 +843,7 @@
return newValueAddr(typ, Addr(array));
}
-export func CopyArray(dst ArrayValue, src ArrayValue, n int) {
+func CopyArray(dst ArrayValue, src ArrayValue, n int) {
if n == 0 {
return
}
@@ -875,7 +875,7 @@
}
-export func NewValue(e interface {}) Value {
+func NewValue(e interface {}) Value {
value, typestring, indir := sys.Reflect(e);
typ, ok := typecache[typestring];
if !ok {