Allow returning something of type void in a function that returns void
[delight/core.git] / dmd2 / statement.h
blob9f248e71f3e857c08a66c3b87ff0e0acb0928622
2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2008 by Digital Mars
4 // All Rights Reserved
5 // written by Walter Bright
6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt.
9 // See the included readme.txt for details.
11 #ifndef DMD_STATEMENT_H
12 #define DMD_STATEMENT_H
14 #ifdef __DMC__
15 #pragma once
16 #endif /* __DMC__ */
18 #include "root.h"
20 #include "arraytypes.h"
21 #include "dsymbol.h"
23 struct OutBuffer;
24 struct Scope;
25 struct Expression;
26 struct LabelDsymbol;
27 struct Identifier;
28 struct IfStatement;
29 struct DeclarationStatement;
30 struct DefaultStatement;
31 struct VarDeclaration;
32 struct Condition;
33 struct Module;
34 struct Token;
35 struct InlineCostState;
36 struct InlineDoState;
37 struct InlineScanState;
38 struct ReturnStatement;
39 struct CompoundStatement;
40 struct Argument;
41 struct StaticAssert;
42 struct AsmStatement;
43 struct GotoStatement;
44 struct ScopeStatement;
45 struct TryCatchStatement;
46 struct TryFinallyStatement;
47 struct HdrGenState;
48 struct InterState;
50 enum TOK;
52 // Back end
53 struct IRState;
54 struct Blockx;
55 #if IN_GCC
56 union tree_node; typedef union tree_node block;
57 union tree_node; typedef union tree_node elem;
58 #else
59 struct block;
60 struct elem;
61 #endif
62 struct code;
64 /* How a statement exits
66 enum BE
68 BEnone = 0,
69 BEfallthru = 1,
70 BEthrow = 2,
71 BEreturn = 4,
72 BEgoto = 8,
73 BEhalt = 0x10,
74 BEbreak = 0x20,
75 BEcontinue = 0x40,
76 BEany = (BEfallthru | BEthrow | BEreturn | BEgoto | BEhalt),
79 struct Statement : Object
81 Loc loc;
83 Statement(Loc loc);
84 virtual Statement *syntaxCopy();
86 void print();
87 char *toChars();
89 void error(const char *format, ...);
90 virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
91 virtual TryCatchStatement *isTryCatchStatement() { return NULL; }
92 virtual GotoStatement *isGotoStatement() { return NULL; }
93 virtual AsmStatement *isAsmStatement() { return NULL; }
94 #ifdef _DH
95 int incontract;
96 #endif
97 virtual ScopeStatement *isScopeStatement() { return NULL; }
98 virtual Statement *semantic(Scope *sc);
99 Statement *semanticScope(Scope *sc, Statement *sbreak, Statement *scontinue);
100 virtual int hasBreak();
101 virtual int hasContinue();
102 virtual int usesEH();
103 virtual int fallOffEnd();
104 virtual int blockExit();
105 virtual int comeFrom();
106 virtual void scopeCode(Scope *sc, Statement **sentry, Statement **sexit, Statement **sfinally);
107 virtual Statements *flatten(Scope *sc);
108 virtual Expression *interpret(InterState *istate);
110 virtual int inlineCost(InlineCostState *ics);
111 virtual Expression *doInline(InlineDoState *ids);
112 virtual Statement *inlineScan(InlineScanState *iss);
114 // Back end
115 virtual void toIR(IRState *irs);
117 // Avoid dynamic_cast
118 virtual DeclarationStatement *isDeclarationStatement() { return NULL; }
119 virtual CompoundStatement *isCompoundStatement() { return NULL; }
120 virtual ReturnStatement *isReturnStatement() { return NULL; }
121 virtual IfStatement *isIfStatement() { return NULL; }
124 struct ExpStatement : Statement
126 Expression *exp;
128 ExpStatement(Loc loc, Expression *exp);
129 Statement *syntaxCopy();
130 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
131 Statement *semantic(Scope *sc);
132 Expression *interpret(InterState *istate);
133 int fallOffEnd();
134 int blockExit();
136 int inlineCost(InlineCostState *ics);
137 Expression *doInline(InlineDoState *ids);
138 Statement *inlineScan(InlineScanState *iss);
140 void toIR(IRState *irs);
143 struct CompileStatement : Statement
145 Expression *exp;
147 CompileStatement(Loc loc, Expression *exp);
148 Statement *syntaxCopy();
149 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
150 Statement *semantic(Scope *sc);
153 struct DeclarationStatement : ExpStatement
155 // Doing declarations as an expression, rather than a statement,
156 // makes inlining functions much easier.
158 DeclarationStatement(Loc loc, Dsymbol *s);
159 DeclarationStatement(Loc loc, Expression *exp);
160 Statement *syntaxCopy();
161 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
162 void scopeCode(Scope *sc, Statement **sentry, Statement **sexit, Statement **sfinally);
164 DeclarationStatement *isDeclarationStatement() { return this; }
167 struct InjectorMainBody : Statement {
168 ClassDeclaration *mainClass;
170 InjectorMainBody(Loc loc, ClassDeclaration *mainClass);
171 Statement *semantic(Scope *sc);
174 struct CompoundStatement : Statement
176 Statements *statements;
178 CompoundStatement(Loc loc, Statements *s);
179 CompoundStatement(Loc loc, Statement *s1, Statement *s2);
180 Statement *syntaxCopy();
181 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
182 Statement *semantic(Scope *sc);
183 int usesEH();
184 int blockExit();
185 int fallOffEnd();
186 int comeFrom();
187 Statements *flatten(Scope *sc);
188 ReturnStatement *isReturnStatement();
189 Expression *interpret(InterState *istate);
191 int inlineCost(InlineCostState *ics);
192 Expression *doInline(InlineDoState *ids);
193 Statement *inlineScan(InlineScanState *iss);
195 void toIR(IRState *irs);
197 CompoundStatement *isCompoundStatement() { return this; }
200 /* The purpose of this is so that continue will go to the next
201 * of the statements, and break will go to the end of the statements.
203 struct UnrolledLoopStatement : Statement
205 Statements *statements;
207 UnrolledLoopStatement(Loc loc, Statements *statements);
208 Statement *syntaxCopy();
209 Statement *semantic(Scope *sc);
210 int hasBreak();
211 int hasContinue();
212 int usesEH();
213 int blockExit();
214 int fallOffEnd();
215 int comeFrom();
216 Expression *interpret(InterState *istate);
217 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
219 int inlineCost(InlineCostState *ics);
220 Expression *doInline(InlineDoState *ids);
221 Statement *inlineScan(InlineScanState *iss);
223 void toIR(IRState *irs);
226 struct ScopeStatement : Statement
228 Statement *statement;
230 ScopeStatement(Loc loc, Statement *s);
231 Statement *syntaxCopy();
232 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
233 ScopeStatement *isScopeStatement() { return this; }
234 Statement *semantic(Scope *sc);
235 int hasBreak();
236 int hasContinue();
237 int usesEH();
238 int blockExit();
239 int fallOffEnd();
240 int comeFrom();
241 Expression *interpret(InterState *istate);
243 Statement *inlineScan(InlineScanState *iss);
245 void toIR(IRState *irs);
248 struct WhileStatement : Statement
250 Expression *condition;
251 Statement *body;
253 WhileStatement(Loc loc, Expression *c, Statement *b);
254 Statement *syntaxCopy();
255 Statement *semantic(Scope *sc);
256 int hasBreak();
257 int hasContinue();
258 int usesEH();
259 int blockExit();
260 int fallOffEnd();
261 int comeFrom();
262 Expression *interpret(InterState *istate);
263 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
265 Statement *inlineScan(InlineScanState *iss);
267 void toIR(IRState *irs);
270 struct DoStatement : Statement
272 Statement *body;
273 Expression *condition;
275 DoStatement(Loc loc, Statement *b, Expression *c);
276 Statement *syntaxCopy();
277 Statement *semantic(Scope *sc);
278 int hasBreak();
279 int hasContinue();
280 int usesEH();
281 int blockExit();
282 int fallOffEnd();
283 int comeFrom();
284 Expression *interpret(InterState *istate);
285 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
287 Statement *inlineScan(InlineScanState *iss);
289 void toIR(IRState *irs);
292 struct ForStatement : Statement
294 Statement *init;
295 Expression *condition;
296 Expression *increment;
297 Statement *body;
299 ForStatement(Loc loc, Statement *init, Expression *condition, Expression *increment, Statement *body);
300 Statement *syntaxCopy();
301 Statement *semantic(Scope *sc);
302 void scopeCode(Scope *sc, Statement **sentry, Statement **sexit, Statement **sfinally);
303 int hasBreak();
304 int hasContinue();
305 int usesEH();
306 int blockExit();
307 int fallOffEnd();
308 int comeFrom();
309 Expression *interpret(InterState *istate);
310 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
312 Statement *inlineScan(InlineScanState *iss);
314 void toIR(IRState *irs);
317 struct ForeachStatement : Statement
319 enum TOK op; // TOKforeach or TOKforeach_reverse
320 Arguments *arguments; // array of Argument*'s
321 Expression *aggr;
322 Statement *body;
324 VarDeclaration *key;
325 VarDeclaration *value;
327 FuncDeclaration *func; // function we're lexically in
329 Array cases; // put breaks, continues, gotos and returns here
330 Array gotos; // forward referenced goto's go here
332 ForeachStatement(Loc loc, enum TOK op, Arguments *arguments, Expression *aggr, Statement *body);
333 Statement *syntaxCopy();
334 Statement *semantic(Scope *sc);
335 int hasBreak();
336 int hasContinue();
337 int usesEH();
338 int blockExit();
339 int fallOffEnd();
340 int comeFrom();
341 Expression *interpret(InterState *istate);
342 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
344 Statement *inlineScan(InlineScanState *iss);
346 void toIR(IRState *irs);
349 struct ForeachRangeStatement : Statement
351 enum TOK op; // TOKforeach or TOKforeach_reverse
352 Argument *arg; // loop index variable
353 Expression *lwr;
354 Expression *upr;
355 Statement *body;
357 VarDeclaration *key;
359 ForeachRangeStatement(Loc loc, enum TOK op, Argument *arg,
360 Expression *lwr, Expression *upr, Statement *body);
361 Statement *syntaxCopy();
362 Statement *semantic(Scope *sc);
363 int hasBreak();
364 int hasContinue();
365 int usesEH();
366 int blockExit();
367 int fallOffEnd();
368 int comeFrom();
369 Expression *interpret(InterState *istate);
370 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
372 Statement *inlineScan(InlineScanState *iss);
374 void toIR(IRState *irs);
377 struct IfStatement : Statement
379 Argument *arg;
380 Expression *condition;
381 Statement *ifbody;
382 Statement *elsebody;
384 VarDeclaration *match; // for MatchExpression results
386 IfStatement(Loc loc, Argument *arg, Expression *condition, Statement *ifbody, Statement *elsebody);
387 Statement *syntaxCopy();
388 Statement *semantic(Scope *sc);
389 Expression *interpret(InterState *istate);
390 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
391 int usesEH();
392 int blockExit();
393 int fallOffEnd();
394 IfStatement *isIfStatement() { return this; }
396 int inlineCost(InlineCostState *ics);
397 Expression *doInline(InlineDoState *ids);
398 Statement *inlineScan(InlineScanState *iss);
400 void toIR(IRState *irs);
403 struct ConditionalStatement : Statement
405 Condition *condition;
406 Statement *ifbody;
407 Statement *elsebody;
409 ConditionalStatement(Loc loc, Condition *condition, Statement *ifbody, Statement *elsebody);
410 Statement *syntaxCopy();
411 Statement *semantic(Scope *sc);
412 Statements *flatten(Scope *sc);
413 int usesEH();
415 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
418 struct PragmaStatement : Statement
420 Identifier *ident;
421 Expressions *args; // array of Expression's
422 Statement *body;
424 PragmaStatement(Loc loc, Identifier *ident, Expressions *args, Statement *body);
425 Statement *syntaxCopy();
426 Statement *semantic(Scope *sc);
427 int usesEH();
428 int blockExit();
429 int fallOffEnd();
431 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
433 void toIR(IRState *irs);
436 struct LogStatement : Statement
438 enum Level {
439 Trace = 0,
440 Info,
441 Warn,
442 Error,
443 Fatal,
444 None,
447 int level;
448 Expressions *args;
450 LogStatement(Loc loc, int level, Expressions *args);
451 Statement *syntaxCopy();
452 Statement *semantic(Scope *sc);
454 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
457 struct StaticAssertStatement : Statement
459 StaticAssert *sa;
461 StaticAssertStatement(StaticAssert *sa);
462 Statement *syntaxCopy();
463 Statement *semantic(Scope *sc);
465 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
468 struct SwitchStatement : Statement
470 Expression *condition;
471 Statement *body;
473 DefaultStatement *sdefault;
474 TryFinallyStatement *tf;
475 Array gotoCases; // array of unresolved GotoCaseStatement's
476 Array *cases; // array of CaseStatement's
477 int hasNoDefault; // !=0 if no default statement
478 int hasVars; // !=0 if has variable case values
480 SwitchStatement(Loc loc, Expression *c, Statement *b);
481 Statement *syntaxCopy();
482 Statement *semantic(Scope *sc);
483 int hasBreak();
484 int usesEH();
485 int blockExit();
486 int fallOffEnd();
487 Expression *interpret(InterState *istate);
488 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
490 Statement *inlineScan(InlineScanState *iss);
492 void toIR(IRState *irs);
495 struct CaseStatement : Statement
497 Expression *exp;
498 Statement *statement;
499 int index; // which case it is (since we sort this)
500 block *cblock; // back end: label for the block
502 CaseStatement(Loc loc, Expression *exp, Statement *s);
503 Statement *syntaxCopy();
504 Statement *semantic(Scope *sc);
505 int compare(Object *obj);
506 int usesEH();
507 int blockExit();
508 int fallOffEnd();
509 int comeFrom();
510 Expression *interpret(InterState *istate);
511 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
513 Statement *inlineScan(InlineScanState *iss);
515 void toIR(IRState *irs);
518 struct DefaultStatement : Statement
520 Statement *statement;
521 #if IN_GCC
522 block *cblock; // back end: label for the block
523 #endif
525 DefaultStatement(Loc loc, Statement *s);
526 Statement *syntaxCopy();
527 Statement *semantic(Scope *sc);
528 int usesEH();
529 int blockExit();
530 int fallOffEnd();
531 int comeFrom();
532 Expression *interpret(InterState *istate);
533 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
535 Statement *inlineScan(InlineScanState *iss);
537 void toIR(IRState *irs);
540 struct GotoDefaultStatement : Statement
542 SwitchStatement *sw;
544 GotoDefaultStatement(Loc loc);
545 Statement *syntaxCopy();
546 Statement *semantic(Scope *sc);
547 Expression *interpret(InterState *istate);
548 int blockExit();
549 int fallOffEnd();
550 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
552 void toIR(IRState *irs);
555 struct GotoCaseStatement : Statement
557 Expression *exp; // NULL, or which case to goto
558 CaseStatement *cs; // case statement it resolves to
560 GotoCaseStatement(Loc loc, Expression *exp);
561 Statement *syntaxCopy();
562 Statement *semantic(Scope *sc);
563 Expression *interpret(InterState *istate);
564 int blockExit();
565 int fallOffEnd();
566 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
568 void toIR(IRState *irs);
571 struct SwitchErrorStatement : Statement
573 SwitchErrorStatement(Loc loc);
574 int blockExit();
575 int fallOffEnd();
576 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
578 void toIR(IRState *irs);
581 struct ReturnStatement : Statement
583 Expression *exp;
585 ReturnStatement(Loc loc, Expression *exp);
586 Statement *syntaxCopy();
587 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
588 Statement *semantic(Scope *sc);
589 int blockExit();
590 int fallOffEnd();
591 Expression *interpret(InterState *istate);
593 int inlineCost(InlineCostState *ics);
594 Expression *doInline(InlineDoState *ids);
595 Statement *inlineScan(InlineScanState *iss);
597 void toIR(IRState *irs);
599 ReturnStatement *isReturnStatement() { return this; }
602 struct BreakStatement : Statement
604 Identifier *ident;
606 BreakStatement(Loc loc, Identifier *ident);
607 Statement *syntaxCopy();
608 Statement *semantic(Scope *sc);
609 Expression *interpret(InterState *istate);
610 int blockExit();
611 int fallOffEnd();
612 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
614 void toIR(IRState *irs);
617 struct ContinueStatement : Statement
619 Identifier *ident;
621 ContinueStatement(Loc loc, Identifier *ident);
622 Statement *syntaxCopy();
623 Statement *semantic(Scope *sc);
624 Expression *interpret(InterState *istate);
625 int blockExit();
626 int fallOffEnd();
627 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
629 void toIR(IRState *irs);
632 struct SynchronizedStatement : Statement
634 Expression *exp;
635 Statement *body;
637 SynchronizedStatement(Loc loc, Expression *exp, Statement *body);
638 Statement *syntaxCopy();
639 Statement *semantic(Scope *sc);
640 int hasBreak();
641 int hasContinue();
642 int usesEH();
643 int blockExit();
644 int fallOffEnd();
645 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
647 Statement *inlineScan(InlineScanState *iss);
649 // Back end
650 elem *esync;
651 SynchronizedStatement(Loc loc, elem *esync, Statement *body);
652 void toIR(IRState *irs);
655 struct WithStatement : Statement
657 Expression *exp;
658 Statement *body;
659 VarDeclaration *wthis;
661 WithStatement(Loc loc, Expression *exp, Statement *body);
662 Statement *syntaxCopy();
663 Statement *semantic(Scope *sc);
664 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
665 int usesEH();
666 int blockExit();
667 int fallOffEnd();
669 Statement *inlineScan(InlineScanState *iss);
671 void toIR(IRState *irs);
674 struct TryCatchStatement : Statement
676 Statement *body;
677 Array *catches;
679 TryCatchStatement(Loc loc, Statement *body, Array *catches);
680 Statement *syntaxCopy();
681 Statement *semantic(Scope *sc);
682 int hasBreak();
683 int usesEH();
684 int blockExit();
685 int fallOffEnd();
687 Statement *inlineScan(InlineScanState *iss);
689 void toIR(IRState *irs);
690 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
691 TryCatchStatement *isTryCatchStatement() { return this; }
694 struct Catch : Object
696 Loc loc;
697 Type *type;
698 Identifier *ident;
699 VarDeclaration *var;
700 Statement *handler;
702 Catch(Loc loc, Type *t, Identifier *id, Statement *handler);
703 Catch *syntaxCopy();
704 void semantic(Scope *sc);
705 int blockExit();
706 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
709 struct TryFinallyStatement : Statement
711 Statement *body;
712 Statement *finalbody;
714 TryFinallyStatement(Loc loc, Statement *body, Statement *finalbody);
715 Statement *syntaxCopy();
716 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
717 Statement *semantic(Scope *sc);
718 int hasBreak();
719 int hasContinue();
720 int usesEH();
721 int blockExit();
722 int fallOffEnd();
724 Statement *inlineScan(InlineScanState *iss);
726 void toIR(IRState *irs);
729 struct OnScopeStatement : Statement
731 TOK tok;
732 Statement *statement;
734 OnScopeStatement(Loc loc, TOK tok, Statement *statement);
735 Statement *syntaxCopy();
736 int blockExit();
737 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
738 Statement *semantic(Scope *sc);
739 int usesEH();
740 void scopeCode(Scope *sc, Statement **sentry, Statement **sexit, Statement **sfinally);
742 void toIR(IRState *irs);
745 struct ThrowStatement : Statement
747 Expression *exp;
749 ThrowStatement(Loc loc, Expression *exp);
750 Statement *syntaxCopy();
751 Statement *semantic(Scope *sc);
752 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
753 int blockExit();
754 int fallOffEnd();
756 Statement *inlineScan(InlineScanState *iss);
758 void toIR(IRState *irs);
761 struct VolatileStatement : Statement
763 Statement *statement;
765 VolatileStatement(Loc loc, Statement *statement);
766 Statement *syntaxCopy();
767 Statement *semantic(Scope *sc);
768 Statements *flatten(Scope *sc);
769 int blockExit();
770 int fallOffEnd();
771 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
773 Statement *inlineScan(InlineScanState *iss);
775 void toIR(IRState *irs);
778 struct GotoStatement : Statement
780 Identifier *ident;
781 LabelDsymbol *label;
782 TryFinallyStatement *tf;
784 GotoStatement(Loc loc, Identifier *ident);
785 Statement *syntaxCopy();
786 Statement *semantic(Scope *sc);
787 int blockExit();
788 int fallOffEnd();
789 Expression *interpret(InterState *istate);
791 void toIR(IRState *irs);
792 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
793 GotoStatement *isGotoStatement() { return this; }
796 struct LabelStatement : Statement
798 Identifier *ident;
799 Statement *statement;
800 TryFinallyStatement *tf;
801 block *lblock; // back end
802 int isReturnLabel;
804 LabelStatement(Loc loc, Identifier *ident, Statement *statement);
805 Statement *syntaxCopy();
806 Statement *semantic(Scope *sc);
807 Statements *flatten(Scope *sc);
808 int usesEH();
809 int blockExit();
810 int fallOffEnd();
811 int comeFrom();
812 Expression *interpret(InterState *istate);
813 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
815 Statement *inlineScan(InlineScanState *iss);
817 void toIR(IRState *irs);
820 struct LabelDsymbol : Dsymbol
822 LabelStatement *statement;
823 #if IN_GCC
824 unsigned asmLabelNum; // GCC-specific
825 #endif
827 LabelDsymbol(Identifier *ident);
828 LabelDsymbol *isLabel();
831 struct AsmStatement : Statement
833 Token *tokens;
834 code *asmcode;
835 unsigned asmalign; // alignment of this statement
836 unsigned refparam; // !=0 if function parameter is referenced
837 unsigned naked; // !=0 if function is to be naked
838 unsigned regs; // mask of registers modified
840 AsmStatement(Loc loc, Token *tokens);
841 Statement *syntaxCopy();
842 Statement *semantic(Scope *sc);
843 int blockExit();
844 int comeFrom();
846 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
847 virtual AsmStatement *isAsmStatement() { return this; }
849 void toIR(IRState *irs);
852 #ifdef IN_GCC
854 // Assembler instructions with D expression operands
855 struct ExtAsmStatement : Statement
857 Expression *insnTemplate;
858 Expressions *args;
859 Array *argNames; // of NULL or Identifier*
860 Expressions *argConstraints; // of StringExp*
861 unsigned nOutputArgs;
862 Expressions *clobbers; // of StringExp*
864 ExtAsmStatement(Loc loc, Expression *insnTemplate, Expressions *args, Array *argNames,
865 Expressions *argConstraints, int nOutputArgs, Expressions *clobbers);
866 Statement *syntaxCopy();
867 Statement *semantic(Scope *sc);
868 int blockExit();
869 void toIR(IRState *irs);
872 #endif
874 #endif /* DMD_STATEMENT_H */