Mercurial > projects > ldc
annotate dmd2/root/async.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 | 638d16625da2 |
children |
rev | line source |
---|---|
1452
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
1 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
2 // Copyright (c) 2009-2009 by Digital Mars |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
3 // All Rights Reserved |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
4 // written by Walter Bright |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
5 // http://www.digitalmars.com |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
6 // License for redistribution is by either the Artistic License |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
7 // in artistic.txt, or the GNU General Public License in gnu.txt. |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
8 // See the included readme.txt for details. |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
9 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
10 #ifndef ASYNC_H |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
11 #define ASYNC_H |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
12 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
13 #if __DMC__ |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
14 #pragma once |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
15 #endif |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
16 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
17 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
18 /******************* |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
19 * Simple interface to read files asynchronously in another |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
20 * thread. |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
21 */ |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
22 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
23 struct AsyncRead |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
24 { |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
25 static AsyncRead *create(size_t nfiles); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
26 void addFile(File *file); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
27 void start(); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
28 int read(size_t i); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
29 static void dispose(AsyncRead *); |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
30 }; |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
31 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
32 |
638d16625da2
LDC 2 compiles again.
Robert Clipsham <robert@octarineparrot.com>
parents:
diff
changeset
|
33 #endif |