comparison lphobos/internal/objectimpl.d @ 54:28e99b04a132 trunk

[svn r58] Fixed cond expression resulting in a non-basic type. Fixed identity expression for dynamic arrays. Revamped the system to keep track of lvalues and rvalues and their relations. Typedef declaration now generate the custom typeinfo. Other bugfixes.
author lindquist
date Wed, 24 Oct 2007 01:37:34 +0200
parents 0c77619e803b
children 2c3cd3596187
comparison
equal deleted inserted replaced
53:06ccc817acd4 54:28e99b04a132
431 431
432 /// Get type information on the contents of the type; null if not available 432 /// Get type information on the contents of the type; null if not available
433 OffsetTypeInfo[] offTi() { return null; } 433 OffsetTypeInfo[] offTi() { return null; }
434 } 434 }
435 435
436 /+
437
438 class TypeInfo_Typedef : TypeInfo 436 class TypeInfo_Typedef : TypeInfo
439 { 437 {
440 char[] toString() { return name; } 438 char[] toString() { return name; }
441 439
442 int opEquals(Object o) 440 int opEquals(Object o)
453 int equals(void *p1, void *p2) { return base.equals(p1, p2); } 451 int equals(void *p1, void *p2) { return base.equals(p1, p2); }
454 int compare(void *p1, void *p2) { return base.compare(p1, p2); } 452 int compare(void *p1, void *p2) { return base.compare(p1, p2); }
455 size_t tsize() { return base.tsize(); } 453 size_t tsize() { return base.tsize(); }
456 void swap(void *p1, void *p2) { return base.swap(p1, p2); } 454 void swap(void *p1, void *p2) { return base.swap(p1, p2); }
457 455
458 TypeInfo next() { return base.next(); } 456 TypeInfo next() { return base; }
459 uint flags() { return base.flags(); } 457 uint flags() { return base.flags(); }
460 void[] init() { return m_init.length ? m_init : base.init(); } 458 void[] init() { return m_init.length ? m_init : base.init(); }
461 459
462 TypeInfo base; 460 TypeInfo base;
463 char[] name; 461 char[] name;
465 } 463 }
466 464
467 class TypeInfo_Enum : TypeInfo_Typedef 465 class TypeInfo_Enum : TypeInfo_Typedef
468 { 466 {
469 } 467 }
468
469 /+
470 470
471 class TypeInfo_Pointer : TypeInfo 471 class TypeInfo_Pointer : TypeInfo
472 { 472 {
473 char[] toString() { return m_next.toString() ~ "*"; } 473 char[] toString() { return m_next.toString() ~ "*"; }
474 474