Mercurial > projects > ldc
diff gen/toobj.cpp @ 115:5ba6d286c941 trunk
[svn r119] Added the monitor data field that comes after the vtable pointer to all classes. Represented as a void* initialized to zero.
author | lindquist |
---|---|
date | Sun, 25 Nov 2007 03:58:55 +0100 |
parents | 27b9f749d9fe |
children | fd7ad91fd713 |
line wrap: on
line diff
--- a/gen/toobj.cpp Sun Nov 25 00:19:13 2007 +0100 +++ b/gen/toobj.cpp Sun Nov 25 03:58:55 2007 +0100 @@ -389,8 +389,11 @@ unsigned idx = 0; unsigned r = LLVM_ClassOffsetToIndex(this, os, idx); assert(r != (unsigned)-1 && "Offset not found in any aggregate field"); - r++; // vtable is 0 + // vtable is 0, monitor is 1 + r += 2; + // interface offset further r += vtblInterfaces->dim; + // the final index was not pushed result.push_back(r); }