comparison dmd/statement.h @ 336:aaade6ded589 trunk

[svn r357] Merged DMD 1.033
author lindquist
date Sat, 12 Jul 2008 19:38:31 +0200
parents d59c363fccad
children a7a26f538d6e
comparison
equal deleted inserted replaced
335:17b844102023 336:aaade6ded589
1 1
2 // Compiler implementation of the D programming language 2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2007 by Digital Mars 3 // Copyright (c) 1999-2008 by Digital Mars
4 // All Rights Reserved 4 // All Rights Reserved
5 // written by Walter Bright 5 // written by Walter Bright
6 // http://www.digitalmars.com 6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License 7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt. 8 // in artistic.txt, or the GNU General Public License in gnu.txt.
77 struct block; 77 struct block;
78 //struct elem; 78 //struct elem;
79 #endif 79 #endif
80 struct code; 80 struct code;
81 81
82 /* How a statement exits
83 */
84 enum BE
85 {
86 BEnone = 0,
87 BEfallthru = 1,
88 BEthrow = 2,
89 BEreturn = 4,
90 BEgoto = 8,
91 BEhalt = 0x10,
92 BEbreak = 0x20,
93 BEcontinue = 0x40,
94 BEany = (BEfallthru | BEthrow | BEreturn | BEgoto | BEhalt),
95 };
96
82 // LLVMDC this is used for tracking try-finally, synchronized and volatile scopes 97 // LLVMDC this is used for tracking try-finally, synchronized and volatile scopes
83 // definitions in gen/llvmhelpers.cpp 98 // definitions in gen/llvmhelpers.cpp
84 struct EnclosingHandler : Object 99 struct EnclosingHandler : Object
85 { 100 {
86 virtual void emitCode(IRState* p) = 0; 101 virtual void emitCode(IRState* p) = 0;
132 Statement *semanticScope(Scope *sc, Statement *sbreak, Statement *scontinue); 147 Statement *semanticScope(Scope *sc, Statement *sbreak, Statement *scontinue);
133 virtual int hasBreak(); 148 virtual int hasBreak();
134 virtual int hasContinue(); 149 virtual int hasContinue();
135 virtual int usesEH(); 150 virtual int usesEH();
136 virtual int fallOffEnd(); 151 virtual int fallOffEnd();
152 virtual int blockExit();
137 virtual int comeFrom(); 153 virtual int comeFrom();
138 virtual void scopeCode(Statement **sentry, Statement **sexit, Statement **sfinally); 154 virtual void scopeCode(Statement **sentry, Statement **sexit, Statement **sfinally);
139 virtual Statements *flatten(Scope *sc); 155 virtual Statements *flatten(Scope *sc);
140 virtual Expression *interpret(InterState *istate); 156 virtual Expression *interpret(InterState *istate);
141 157
162 Statement *syntaxCopy(); 178 Statement *syntaxCopy();
163 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 179 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
164 Statement *semantic(Scope *sc); 180 Statement *semantic(Scope *sc);
165 Expression *interpret(InterState *istate); 181 Expression *interpret(InterState *istate);
166 int fallOffEnd(); 182 int fallOffEnd();
183 int blockExit();
167 184
168 int inlineCost(InlineCostState *ics); 185 int inlineCost(InlineCostState *ics);
169 Expression *doInline(InlineDoState *ids); 186 Expression *doInline(InlineDoState *ids);
170 Statement *inlineScan(InlineScanState *iss); 187 Statement *inlineScan(InlineScanState *iss);
171 188
177 Expression *exp; 194 Expression *exp;
178 195
179 CompileStatement(Loc loc, Expression *exp); 196 CompileStatement(Loc loc, Expression *exp);
180 Statement *syntaxCopy(); 197 Statement *syntaxCopy();
181 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 198 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
199 Statements *flatten(Scope *sc);
182 Statement *semantic(Scope *sc); 200 Statement *semantic(Scope *sc);
183 }; 201 };
184 202
185 struct DeclarationStatement : ExpStatement 203 struct DeclarationStatement : ExpStatement
186 { 204 {
202 220
203 CompoundStatement(Loc loc, Statements *s); 221 CompoundStatement(Loc loc, Statements *s);
204 CompoundStatement(Loc loc, Statement *s1, Statement *s2); 222 CompoundStatement(Loc loc, Statement *s1, Statement *s2);
205 virtual Statement *syntaxCopy(); 223 virtual Statement *syntaxCopy();
206 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 224 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
207 Statement *semantic(Scope *sc); 225 virtual Statement *semantic(Scope *sc);
208 int usesEH(); 226 int usesEH();
227 int blockExit();
209 int fallOffEnd(); 228 int fallOffEnd();
210 int comeFrom(); 229 int comeFrom();
211 virtual Statements *flatten(Scope *sc); 230 virtual Statements *flatten(Scope *sc);
212 ReturnStatement *isReturnStatement(); 231 ReturnStatement *isReturnStatement();
213 Expression *interpret(InterState *istate); 232 Expression *interpret(InterState *istate);
233 Statement *syntaxCopy(); 252 Statement *syntaxCopy();
234 Statement *semantic(Scope *sc); 253 Statement *semantic(Scope *sc);
235 int hasBreak(); 254 int hasBreak();
236 int hasContinue(); 255 int hasContinue();
237 int usesEH(); 256 int usesEH();
257 int blockExit();
238 int fallOffEnd(); 258 int fallOffEnd();
239 int comeFrom(); 259 int comeFrom();
240 Expression *interpret(InterState *istate); 260 Expression *interpret(InterState *istate);
241 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 261 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
242 262
257 ScopeStatement *isScopeStatement() { return this; } 277 ScopeStatement *isScopeStatement() { return this; }
258 Statement *semantic(Scope *sc); 278 Statement *semantic(Scope *sc);
259 int hasBreak(); 279 int hasBreak();
260 int hasContinue(); 280 int hasContinue();
261 int usesEH(); 281 int usesEH();
282 int blockExit();
262 int fallOffEnd(); 283 int fallOffEnd();
263 int comeFrom(); 284 int comeFrom();
264 Expression *interpret(InterState *istate); 285 Expression *interpret(InterState *istate);
265 286
266 Statement *inlineScan(InlineScanState *iss); 287 Statement *inlineScan(InlineScanState *iss);
278 Statement *syntaxCopy(); 299 Statement *syntaxCopy();
279 Statement *semantic(Scope *sc); 300 Statement *semantic(Scope *sc);
280 int hasBreak(); 301 int hasBreak();
281 int hasContinue(); 302 int hasContinue();
282 int usesEH(); 303 int usesEH();
304 int blockExit();
283 int fallOffEnd(); 305 int fallOffEnd();
284 int comeFrom(); 306 int comeFrom();
285 Expression *interpret(InterState *istate); 307 Expression *interpret(InterState *istate);
286 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 308 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
287 309
300 Statement *syntaxCopy(); 322 Statement *syntaxCopy();
301 Statement *semantic(Scope *sc); 323 Statement *semantic(Scope *sc);
302 int hasBreak(); 324 int hasBreak();
303 int hasContinue(); 325 int hasContinue();
304 int usesEH(); 326 int usesEH();
327 int blockExit();
305 int fallOffEnd(); 328 int fallOffEnd();
306 int comeFrom(); 329 int comeFrom();
307 Expression *interpret(InterState *istate); 330 Expression *interpret(InterState *istate);
308 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 331 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
309 332
325 Statement *semantic(Scope *sc); 348 Statement *semantic(Scope *sc);
326 void scopeCode(Statement **sentry, Statement **sexit, Statement **sfinally); 349 void scopeCode(Statement **sentry, Statement **sexit, Statement **sfinally);
327 int hasBreak(); 350 int hasBreak();
328 int hasContinue(); 351 int hasContinue();
329 int usesEH(); 352 int usesEH();
353 int blockExit();
330 int fallOffEnd(); 354 int fallOffEnd();
331 int comeFrom(); 355 int comeFrom();
332 Expression *interpret(InterState *istate); 356 Expression *interpret(InterState *istate);
333 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 357 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
334 358
337 void toIR(IRState *irs); 361 void toIR(IRState *irs);
338 }; 362 };
339 363
340 struct ForeachStatement : Statement 364 struct ForeachStatement : Statement
341 { 365 {
342 enum TOK op; // TOKforeach or TOKforeach_reverse 366 enum TOK op; // TOKforeach or TOKforeach_reverse
343 Arguments *arguments; // array of Argument*'s 367 Arguments *arguments; // array of Argument*'s
344 Expression *aggr; 368 Expression *aggr;
345 Statement *body; 369 Statement *body;
346 EnclosingHandler* enclosinghandler; 370 EnclosingHandler* enclosinghandler;
347 371
357 Statement *syntaxCopy(); 381 Statement *syntaxCopy();
358 Statement *semantic(Scope *sc); 382 Statement *semantic(Scope *sc);
359 int hasBreak(); 383 int hasBreak();
360 int hasContinue(); 384 int hasContinue();
361 int usesEH(); 385 int usesEH();
362 int fallOffEnd(); 386 int blockExit();
363 int comeFrom(); 387 int fallOffEnd();
364 Expression *interpret(InterState *istate); 388 int comeFrom();
365 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 389 Expression *interpret(InterState *istate);
366 390 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
367 Statement *inlineScan(InlineScanState *iss); 391
368 392 Statement *inlineScan(InlineScanState *iss);
369 void toIR(IRState *irs); 393
370 }; 394 void toIR(IRState *irs);
395 };
396
397 #if DMDV2
398 struct ForeachRangeStatement : Statement
399 {
400 enum TOK op; // TOKforeach or TOKforeach_reverse
401 Argument *arg; // loop index variable
402 Expression *lwr;
403 Expression *upr;
404 Statement *body;
405
406 VarDeclaration *key;
407
408 ForeachRangeStatement(Loc loc, enum TOK op, Argument *arg,
409 Expression *lwr, Expression *upr, Statement *body);
410 Statement *syntaxCopy();
411 Statement *semantic(Scope *sc);
412 int hasBreak();
413 int hasContinue();
414 int usesEH();
415 int blockExit();
416 int fallOffEnd();
417 int comeFrom();
418 Expression *interpret(InterState *istate);
419 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
420
421 Statement *inlineScan(InlineScanState *iss);
422
423 void toIR(IRState *irs);
424 };
425 #endif
371 426
372 struct IfStatement : Statement 427 struct IfStatement : Statement
373 { 428 {
374 Argument *arg; 429 Argument *arg;
375 Expression *condition; 430 Expression *condition;
382 Statement *syntaxCopy(); 437 Statement *syntaxCopy();
383 Statement *semantic(Scope *sc); 438 Statement *semantic(Scope *sc);
384 Expression *interpret(InterState *istate); 439 Expression *interpret(InterState *istate);
385 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 440 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
386 int usesEH(); 441 int usesEH();
442 int blockExit();
387 int fallOffEnd(); 443 int fallOffEnd();
388 IfStatement *isIfStatement() { return this; } 444 IfStatement *isIfStatement() { return this; }
389 445
390 int inlineCost(InlineCostState *ics); 446 int inlineCost(InlineCostState *ics);
391 Expression *doInline(InlineDoState *ids); 447 Expression *doInline(InlineDoState *ids);
417 473
418 PragmaStatement(Loc loc, Identifier *ident, Expressions *args, Statement *body); 474 PragmaStatement(Loc loc, Identifier *ident, Expressions *args, Statement *body);
419 Statement *syntaxCopy(); 475 Statement *syntaxCopy();
420 Statement *semantic(Scope *sc); 476 Statement *semantic(Scope *sc);
421 int usesEH(); 477 int usesEH();
478 int blockExit();
422 int fallOffEnd(); 479 int fallOffEnd();
423 480
424 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 481 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
425 }; 482 };
426 483
437 494
438 struct SwitchStatement : Statement 495 struct SwitchStatement : Statement
439 { 496 {
440 Expression *condition; 497 Expression *condition;
441 Statement *body; 498 Statement *body;
499
442 DefaultStatement *sdefault; 500 DefaultStatement *sdefault;
443 EnclosingHandler* enclosinghandler; 501 EnclosingHandler* enclosinghandler;
444 502
445 Array gotoCases; // array of unresolved GotoCaseStatement's 503 Array gotoCases; // array of unresolved GotoCaseStatement's
446 Array *cases; // array of CaseStatement's 504 Array *cases; // array of CaseStatement's
449 SwitchStatement(Loc loc, Expression *c, Statement *b); 507 SwitchStatement(Loc loc, Expression *c, Statement *b);
450 Statement *syntaxCopy(); 508 Statement *syntaxCopy();
451 Statement *semantic(Scope *sc); 509 Statement *semantic(Scope *sc);
452 int hasBreak(); 510 int hasBreak();
453 int usesEH(); 511 int usesEH();
512 int blockExit();
454 int fallOffEnd(); 513 int fallOffEnd();
455 Expression *interpret(InterState *istate); 514 Expression *interpret(InterState *istate);
456 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 515 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
457 516
458 Statement *inlineScan(InlineScanState *iss); 517 Statement *inlineScan(InlineScanState *iss);
470 CaseStatement(Loc loc, Expression *exp, Statement *s); 529 CaseStatement(Loc loc, Expression *exp, Statement *s);
471 Statement *syntaxCopy(); 530 Statement *syntaxCopy();
472 Statement *semantic(Scope *sc); 531 Statement *semantic(Scope *sc);
473 int compare(Object *obj); 532 int compare(Object *obj);
474 int usesEH(); 533 int usesEH();
534 int blockExit();
475 int fallOffEnd(); 535 int fallOffEnd();
476 int comeFrom(); 536 int comeFrom();
477 Expression *interpret(InterState *istate); 537 Expression *interpret(InterState *istate);
478 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 538 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
479 539
497 557
498 DefaultStatement(Loc loc, Statement *s); 558 DefaultStatement(Loc loc, Statement *s);
499 Statement *syntaxCopy(); 559 Statement *syntaxCopy();
500 Statement *semantic(Scope *sc); 560 Statement *semantic(Scope *sc);
501 int usesEH(); 561 int usesEH();
562 int blockExit();
502 int fallOffEnd(); 563 int fallOffEnd();
503 int comeFrom(); 564 int comeFrom();
504 Expression *interpret(InterState *istate); 565 Expression *interpret(InterState *istate);
505 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 566 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
506 567
519 580
520 GotoDefaultStatement(Loc loc); 581 GotoDefaultStatement(Loc loc);
521 Statement *syntaxCopy(); 582 Statement *syntaxCopy();
522 Statement *semantic(Scope *sc); 583 Statement *semantic(Scope *sc);
523 Expression *interpret(InterState *istate); 584 Expression *interpret(InterState *istate);
585 int blockExit();
524 int fallOffEnd(); 586 int fallOffEnd();
525 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 587 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
526 588
527 void toIR(IRState *irs); 589 void toIR(IRState *irs);
528 }; 590 };
536 598
537 GotoCaseStatement(Loc loc, Expression *exp); 599 GotoCaseStatement(Loc loc, Expression *exp);
538 Statement *syntaxCopy(); 600 Statement *syntaxCopy();
539 Statement *semantic(Scope *sc); 601 Statement *semantic(Scope *sc);
540 Expression *interpret(InterState *istate); 602 Expression *interpret(InterState *istate);
603 int blockExit();
541 int fallOffEnd(); 604 int fallOffEnd();
542 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 605 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
543 606
544 void toIR(IRState *irs); 607 void toIR(IRState *irs);
545 }; 608 };
546 609
547 struct SwitchErrorStatement : Statement 610 struct SwitchErrorStatement : Statement
548 { 611 {
549 SwitchErrorStatement(Loc loc); 612 SwitchErrorStatement(Loc loc);
613 int blockExit();
550 int fallOffEnd(); 614 int fallOffEnd();
551 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 615 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
552 616
553 void toIR(IRState *irs); 617 void toIR(IRState *irs);
554 }; 618 };
560 624
561 ReturnStatement(Loc loc, Expression *exp); 625 ReturnStatement(Loc loc, Expression *exp);
562 Statement *syntaxCopy(); 626 Statement *syntaxCopy();
563 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 627 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
564 Statement *semantic(Scope *sc); 628 Statement *semantic(Scope *sc);
629 int blockExit();
565 int fallOffEnd(); 630 int fallOffEnd();
566 Expression *interpret(InterState *istate); 631 Expression *interpret(InterState *istate);
567 632
568 int inlineCost(InlineCostState *ics); 633 int inlineCost(InlineCostState *ics);
569 Expression *doInline(InlineDoState *ids); 634 Expression *doInline(InlineDoState *ids);
581 646
582 BreakStatement(Loc loc, Identifier *ident); 647 BreakStatement(Loc loc, Identifier *ident);
583 Statement *syntaxCopy(); 648 Statement *syntaxCopy();
584 Statement *semantic(Scope *sc); 649 Statement *semantic(Scope *sc);
585 Expression *interpret(InterState *istate); 650 Expression *interpret(InterState *istate);
651 int blockExit();
586 int fallOffEnd(); 652 int fallOffEnd();
587 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 653 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
588 654
589 void toIR(IRState *irs); 655 void toIR(IRState *irs);
590 656
599 665
600 ContinueStatement(Loc loc, Identifier *ident); 666 ContinueStatement(Loc loc, Identifier *ident);
601 Statement *syntaxCopy(); 667 Statement *syntaxCopy();
602 Statement *semantic(Scope *sc); 668 Statement *semantic(Scope *sc);
603 Expression *interpret(InterState *istate); 669 Expression *interpret(InterState *istate);
670 int blockExit();
604 int fallOffEnd(); 671 int fallOffEnd();
605 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 672 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
606 673
607 void toIR(IRState *irs); 674 void toIR(IRState *irs);
608 675
620 Statement *syntaxCopy(); 687 Statement *syntaxCopy();
621 Statement *semantic(Scope *sc); 688 Statement *semantic(Scope *sc);
622 int hasBreak(); 689 int hasBreak();
623 int hasContinue(); 690 int hasContinue();
624 int usesEH(); 691 int usesEH();
692 int blockExit();
625 int fallOffEnd(); 693 int fallOffEnd();
626 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 694 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
627 695
628 Statement *inlineScan(InlineScanState *iss); 696 Statement *inlineScan(InlineScanState *iss);
629 697
643 WithStatement(Loc loc, Expression *exp, Statement *body); 711 WithStatement(Loc loc, Expression *exp, Statement *body);
644 Statement *syntaxCopy(); 712 Statement *syntaxCopy();
645 Statement *semantic(Scope *sc); 713 Statement *semantic(Scope *sc);
646 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 714 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
647 int usesEH(); 715 int usesEH();
716 int blockExit();
648 int fallOffEnd(); 717 int fallOffEnd();
649 718
650 Statement *inlineScan(InlineScanState *iss); 719 Statement *inlineScan(InlineScanState *iss);
651 720
652 void toIR(IRState *irs); 721 void toIR(IRState *irs);
660 TryCatchStatement(Loc loc, Statement *body, Array *catches); 729 TryCatchStatement(Loc loc, Statement *body, Array *catches);
661 Statement *syntaxCopy(); 730 Statement *syntaxCopy();
662 Statement *semantic(Scope *sc); 731 Statement *semantic(Scope *sc);
663 int hasBreak(); 732 int hasBreak();
664 int usesEH(); 733 int usesEH();
734 int blockExit();
665 int fallOffEnd(); 735 int fallOffEnd();
666 736
667 Statement *inlineScan(InlineScanState *iss); 737 Statement *inlineScan(InlineScanState *iss);
668 738
669 void toIR(IRState *irs); 739 void toIR(IRState *irs);
680 Statement *handler; 750 Statement *handler;
681 751
682 Catch(Loc loc, Type *t, Identifier *id, Statement *handler); 752 Catch(Loc loc, Type *t, Identifier *id, Statement *handler);
683 Catch *syntaxCopy(); 753 Catch *syntaxCopy();
684 void semantic(Scope *sc); 754 void semantic(Scope *sc);
755 int blockExit();
685 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 756 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
686 }; 757 };
687 758
688 struct TryFinallyStatement : Statement 759 struct TryFinallyStatement : Statement
689 { 760 {
696 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 767 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
697 Statement *semantic(Scope *sc); 768 Statement *semantic(Scope *sc);
698 int hasBreak(); 769 int hasBreak();
699 int hasContinue(); 770 int hasContinue();
700 int usesEH(); 771 int usesEH();
772 int blockExit();
701 int fallOffEnd(); 773 int fallOffEnd();
702 774
703 Statement *inlineScan(InlineScanState *iss); 775 Statement *inlineScan(InlineScanState *iss);
704 776
705 void toIR(IRState *irs); 777 void toIR(IRState *irs);
710 TOK tok; 782 TOK tok;
711 Statement *statement; 783 Statement *statement;
712 784
713 OnScopeStatement(Loc loc, TOK tok, Statement *statement); 785 OnScopeStatement(Loc loc, TOK tok, Statement *statement);
714 Statement *syntaxCopy(); 786 Statement *syntaxCopy();
787 int blockExit();
715 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 788 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
716 Statement *semantic(Scope *sc); 789 Statement *semantic(Scope *sc);
717 int usesEH(); 790 int usesEH();
718 void scopeCode(Statement **sentry, Statement **sexit, Statement **sfinally); 791 void scopeCode(Statement **sentry, Statement **sexit, Statement **sfinally);
719 792
726 799
727 ThrowStatement(Loc loc, Expression *exp); 800 ThrowStatement(Loc loc, Expression *exp);
728 Statement *syntaxCopy(); 801 Statement *syntaxCopy();
729 Statement *semantic(Scope *sc); 802 Statement *semantic(Scope *sc);
730 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 803 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
804 int blockExit();
731 int fallOffEnd(); 805 int fallOffEnd();
732 806
733 Statement *inlineScan(InlineScanState *iss); 807 Statement *inlineScan(InlineScanState *iss);
734 808
735 void toIR(IRState *irs); 809 void toIR(IRState *irs);
742 816
743 VolatileStatement(Loc loc, Statement *statement); 817 VolatileStatement(Loc loc, Statement *statement);
744 Statement *syntaxCopy(); 818 Statement *syntaxCopy();
745 Statement *semantic(Scope *sc); 819 Statement *semantic(Scope *sc);
746 Statements *flatten(Scope *sc); 820 Statements *flatten(Scope *sc);
821 int blockExit();
747 int fallOffEnd(); 822 int fallOffEnd();
748 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 823 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
749 824
750 Statement *inlineScan(InlineScanState *iss); 825 Statement *inlineScan(InlineScanState *iss);
751 826
760 EnclosingHandler* enclosinghandler; 835 EnclosingHandler* enclosinghandler;
761 836
762 GotoStatement(Loc loc, Identifier *ident); 837 GotoStatement(Loc loc, Identifier *ident);
763 Statement *syntaxCopy(); 838 Statement *syntaxCopy();
764 Statement *semantic(Scope *sc); 839 Statement *semantic(Scope *sc);
840 int blockExit();
765 int fallOffEnd(); 841 int fallOffEnd();
766 Expression *interpret(InterState *istate); 842 Expression *interpret(InterState *istate);
767 843
768 void toIR(IRState *irs); 844 void toIR(IRState *irs);
769 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 845 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
782 LabelStatement(Loc loc, Identifier *ident, Statement *statement); 858 LabelStatement(Loc loc, Identifier *ident, Statement *statement);
783 Statement *syntaxCopy(); 859 Statement *syntaxCopy();
784 Statement *semantic(Scope *sc); 860 Statement *semantic(Scope *sc);
785 Statements *flatten(Scope *sc); 861 Statements *flatten(Scope *sc);
786 int usesEH(); 862 int usesEH();
863 int blockExit();
787 int fallOffEnd(); 864 int fallOffEnd();
788 int comeFrom(); 865 int comeFrom();
789 Expression *interpret(InterState *istate); 866 Expression *interpret(InterState *istate);
790 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 867 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
791 868
816 unsigned regs; // mask of registers modified 893 unsigned regs; // mask of registers modified
817 894
818 AsmStatement(Loc loc, Token *tokens); 895 AsmStatement(Loc loc, Token *tokens);
819 Statement *syntaxCopy(); 896 Statement *syntaxCopy();
820 Statement *semantic(Scope *sc); 897 Statement *semantic(Scope *sc);
898 int blockExit();
821 int comeFrom(); 899 int comeFrom();
822 900
823 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 901 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
824 virtual AsmStatement *isAsmStatement() { return this; } 902 virtual AsmStatement *isAsmStatement() { return this; }
825 903