Mercurial > projects > ldc
comparison dmd2/template.c @ 847:356e65836fb5
Merged DMD 2.021 frontend.
Removed generated files from dmd/dmd2 dirs.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sat, 13 Dec 2008 16:14:37 +0100 |
parents | f04dde6e882c |
children | 5fa3e0ea06e9 |
comparison
equal
deleted
inserted
replaced
846:bc982f1ad106 | 847:356e65836fb5 |
---|---|
12 | 12 |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 #include <assert.h> | 14 #include <assert.h> |
15 | 15 |
16 #if !IN_LLVM | 16 #if !IN_LLVM |
17 #if _WIN32 | 17 #endif |
18 #include <windows.h> | |
19 long __cdecl __ehfilter(LPEXCEPTION_POINTERS ep); | |
20 #endif | |
21 #endif | |
22 | |
23 #include "root.h" | 18 #include "root.h" |
24 #include "mem.h" | 19 #include "mem.h" |
25 #include "stringtable.h" | 20 #include "stringtable.h" |
26 #include "mars.h" | 21 #include "mars.h" |
27 #include "identifier.h" | 22 #include "identifier.h" |
34 #include "aggregate.h" | 29 #include "aggregate.h" |
35 #include "declaration.h" | 30 #include "declaration.h" |
36 #include "dsymbol.h" | 31 #include "dsymbol.h" |
37 #include "hdrgen.h" | 32 #include "hdrgen.h" |
38 | 33 |
34 #if WINDOWS_SEH | |
35 #include <windows.h> | |
36 long __cdecl __ehfilter(LPEXCEPTION_POINTERS ep); | |
37 #endif | |
38 | |
39 #define LOG 0 | 39 #define LOG 0 |
40 | |
40 | 41 |
41 /******************************************** | 42 /******************************************** |
42 * These functions substitute for dynamic_cast. dynamic_cast does not work | 43 * These functions substitute for dynamic_cast. dynamic_cast does not work |
43 * on earlier versions of gcc. | 44 * on earlier versions of gcc. |
44 */ | 45 */ |
3309 //printf("isnested = %d, sc->parent = %s\n", isnested, sc->parent->toChars()); | 3310 //printf("isnested = %d, sc->parent = %s\n", isnested, sc->parent->toChars()); |
3310 sc2->parent = /*isnested ? sc->parent :*/ this; | 3311 sc2->parent = /*isnested ? sc->parent :*/ this; |
3311 sc2->tinst = this; | 3312 sc2->tinst = this; |
3312 | 3313 |
3313 #if !IN_LLVM | 3314 #if !IN_LLVM |
3314 #if _WIN32 | 3315 #if WINDOWS_SEH |
3315 __try | 3316 __try |
3316 { | 3317 { |
3317 #endif | 3318 #endif |
3318 #endif | 3319 #endif |
3319 for (int i = 0; i < members->dim; i++) | 3320 for (int i = 0; i < members->dim; i++) |
3327 s->semantic(sc2); | 3328 s->semantic(sc2); |
3328 //printf("test4: isnested = %d, s->parent = %s\n", isnested, s->parent->toChars()); | 3329 //printf("test4: isnested = %d, s->parent = %s\n", isnested, s->parent->toChars()); |
3329 sc2->module->runDeferredSemantic(); | 3330 sc2->module->runDeferredSemantic(); |
3330 } | 3331 } |
3331 #if !IN_LLVM | 3332 #if !IN_LLVM |
3332 #if _WIN32 | 3333 #if WINDOWS_SEH |
3333 } | 3334 } |
3334 __except (__ehfilter(GetExceptionInformation())) | 3335 __except (__ehfilter(GetExceptionInformation())) |
3335 { | 3336 { |
3336 global.gag = 0; // ensure error message gets printed | 3337 global.gag = 0; // ensure error message gets printed |
3337 error("recursive expansion"); | 3338 error("recursive expansion"); |