Mercurial > projects > ldc
comparison druntime/src/compiler/dmd/obj.d @ 759:d3eb054172f9
Added copy of druntime from DMD 2.020 modified for LDC.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 11 Nov 2008 01:52:37 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
758:f04dde6e882c | 759:d3eb054172f9 |
---|---|
1 // Copyright (c) 2002 by Digital Mars | |
2 // All Rights Reserved | |
3 // written by Walter Bright | |
4 // www.digitalmars.com | |
5 | |
6 module rt.obj; | |
7 | |
8 extern (C): | |
9 | |
10 /******************************** | |
11 * Compiler helper for operator == for class objects. | |
12 */ | |
13 | |
14 int _d_obj_eq(Object o1, Object o2) | |
15 { | |
16 return o1 is o2 || (o1 && o1.opEquals(o2)); | |
17 } | |
18 | |
19 | |
20 /******************************** | |
21 * Compiler helper for operator <, <=, >, >= for class objects. | |
22 */ | |
23 | |
24 int _d_obj_cmp(Object o1, Object o2) | |
25 { | |
26 return o1.opCmp(o2); | |
27 } |