Mercurial > projects > ddmd
comparison dmd/UnrolledLoopStatement.d @ 56:51605de93870
TupleExp.optimize
UnrolledLoopStatement.ctor
UnrolledLoopStatement.semantic
UnrolledLoopStatement.blockExit
OrOrExp.checkSideEffect
FuncExp.syntaxCopy
FuncLiteralDeclaration.syntaxCopy
WhileStatement.hasBreak
StructInitializer.toExpression
StructLiteralExp.ctor
StructLiteralExp.optimize
BinExp.commonSemanticAssign
ModAssignExp.opId
Argument.isLazyArray
CommaExp.implicitConvTo
CommaExp.castTo
TypeClass.isBaseOf
createTypeInfoArray
TypeTuple.getTypeInfoDeclaration
TypeInfoTupleDeclaration.ctor
TypeNext.constConv
XorExp.implicitConvTo
TemplateParameter.isTemplateValueParameter
author | korDen |
---|---|
date | Sat, 21 Aug 2010 14:16:53 +0400 |
parents | 10317f0c89a5 |
children | cab4c37afb89 |
comparison
equal
deleted
inserted
replaced
55:8c2c7b7579f8 | 56:51605de93870 |
---|---|
16 | 16 |
17 class UnrolledLoopStatement : Statement | 17 class UnrolledLoopStatement : Statement |
18 { | 18 { |
19 Statements statements; | 19 Statements statements; |
20 | 20 |
21 this(Loc loc, Statements statements) | 21 this(Loc loc, Statements s) |
22 { | 22 { |
23 assert(false); | |
24 super(loc); | 23 super(loc); |
24 statements = s; | |
25 } | 25 } |
26 | 26 |
27 Statement syntaxCopy() | 27 Statement syntaxCopy() |
28 { | 28 { |
29 assert(false); | 29 assert(false); |
30 } | 30 } |
31 | 31 |
32 Statement semantic(Scope sc) | 32 Statement semantic(Scope sc) |
33 { | 33 { |
34 assert(false); | 34 //printf("UnrolledLoopStatement.semantic(this = %p, sc = %p)\n", this, sc); |
35 | |
36 sc.noctor++; | |
37 Scope scd = sc.push(); | |
38 scd.sbreak = this; | |
39 scd.scontinue = this; | |
40 | |
41 for (size_t i = 0; i < statements.dim; i++) | |
42 { | |
43 Statement s = cast(Statement) statements.data[i]; | |
44 if (s) | |
45 { | |
46 s = s.semantic(scd); | |
47 statements.data[i] = cast(void*)s; | |
48 } | |
49 } | |
50 | |
51 scd.pop(); | |
52 sc.noctor--; | |
53 return this; | |
35 } | 54 } |
36 | 55 |
37 bool hasBreak() | 56 bool hasBreak() |
38 { | 57 { |
39 assert(false); | 58 assert(false); |
49 assert(false); | 68 assert(false); |
50 } | 69 } |
51 | 70 |
52 BE blockExit() | 71 BE blockExit() |
53 { | 72 { |
54 assert(false); | 73 BE result = BEfallthru; |
74 for (size_t i = 0; i < statements.dim; i++) | |
75 { | |
76 Statement s = cast(Statement) statements.data[i]; | |
77 if (s) | |
78 { | |
79 int r = s.blockExit(); | |
80 result |= r & ~(BEbreak | BEcontinue); | |
81 } | |
82 } | |
83 return result; | |
55 } | 84 } |
56 | 85 |
57 bool comeFrom() | 86 bool comeFrom() |
58 { | 87 { |
59 assert(false); | 88 assert(false); |