comparison lphobos/internal/objectimpl.d @ 72:d7e764e62462 trunk

[svn r76] Fixed: TypeInfo for structs. Fixed: PostExp was unable to allocate storage for parameters. Fixed: Many types of functions and delegates were broken. Misc cleanups.
author lindquist
date Mon, 29 Oct 2007 03:28:12 +0100
parents 2c3cd3596187
children b706170e24a9
comparison
equal deleted inserted replaced
71:53d3086b5ad3 72:d7e764e62462
935 uint flags() { return 1; } 935 uint flags() { return 1; }
936 936
937 ClassInfo info; 937 ClassInfo info;
938 } 938 }
939 939
940 +/
941
940 class TypeInfo_Struct : TypeInfo 942 class TypeInfo_Struct : TypeInfo
941 { 943 {
942 char[] toString() { return name; } 944 char[] toString() { return name; }
943 945
944 int opEquals(Object o) 946 int opEquals(Object o)
985 // BUG: relies on the GC not moving objects 987 // BUG: relies on the GC not moving objects
986 c = (memcmp(p1, p2, init.length) == 0); 988 c = (memcmp(p1, p2, init.length) == 0);
987 return c; 989 return c;
988 } 990 }
989 991
990 int compare(void *p2, void *p1) 992 int compare(void *p1, void *p2)
991 { 993 {
992 int c = 0; 994 int c = 0;
993 995
994 // Regard null references as always being "less than" 996 // Regard null references as always being "less than"
995 if (p1 != p2) 997 if (p1 != p2)
1027 char[] function(void*) xtoString; 1029 char[] function(void*) xtoString;
1028 1030
1029 uint m_flags; 1031 uint m_flags;
1030 } 1032 }
1031 1033
1034 /+
1035
1032 class TypeInfo_Tuple : TypeInfo 1036 class TypeInfo_Tuple : TypeInfo
1033 { 1037 {
1034 TypeInfo[] elements; 1038 TypeInfo[] elements;
1035 1039
1036 char[] toString() 1040 char[] toString()