Mercurial > projects > ldc
view runtime/internal/mars.h @ 1605:1d5721f9ae18
[WIP] Merge DMD r251: bugzilla 111 (appending a dchar to a char[])
This patch needs some work in the code generation, because of the runtime
changes (functions "_d_arrayappendcd" and "_d_arrayappendwd" are added).
This doesn't affect existing code though, it just makes with patch
a little useless, because something like this:
char [] s;
s ~= '\u6211';
That failed to compile with a nice error message previously to this
change, now fails with and ugly error message (a failed assertion).
Apparently there is a regression introduced by this patch too, when
compiling Dil I get this assertion message:
ldc: /home/luca/tesis/ldc/gen/statements.cpp:132: virtual void ReturnStatement::toIR(IRState*): Assertion `p->topfunc()->getReturnType() == llvm::Type::getVoidTy(gIR->context())' failed.
0 ldc 0x08a91628
Thank god we have bisecting capabilities in VCSs now ;)
---
dmd/expression.c | 47 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 41 insertions(+), 6 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:19 -0300 |
parents | 635f91212b78 |
children |
line wrap: on
line source
/* * Placed into the Public Domain * written by Walter Bright, Digital Mars * www.digitalmars.com */ /* * Modified by Sean Kelly <sean@f4.ca> for use with Tango. */ #include <stddef.h> #if __cplusplus extern "C" { #endif struct ClassInfo; struct Vtbl; typedef struct Vtbl { size_t len; void **vptr; } Vtbl; typedef struct Interface { struct ClassInfo *classinfo; struct Vtbl vtbl; int offset; } Interface; typedef struct Object { void **vptr; void *monitor; } Object; typedef struct ClassInfo { Object object; size_t initlen; void *init; size_t namelen; char *name; Vtbl vtbl; size_t interfacelen; Interface *interfaces; struct ClassInfo *baseClass; void *destructor; void *invariant; int flags; } ClassInfo; typedef struct Exception { Object object; size_t msglen; char* msg; size_t filelen; char* file; size_t line; struct Interface *info; struct Exception *next; } Exception; typedef struct Array { size_t length; void *ptr; } Array; typedef struct Delegate { void *thisptr; void (*funcptr)(); } Delegate; void _d_monitorenter(Object *h); void _d_monitorexit(Object *h); int _d_isbaseof(ClassInfo *b, ClassInfo *c); Object *_d_dynamic_cast(Object *o, ClassInfo *ci); Object * _d_allocclass(ClassInfo *ci); void _d_delclass(Object **p); void _d_OutOfMemory(); #if __cplusplus } #endif